|
[Sponsors] |
June 27, 2018, 08:07 |
UDF value too large for defined data type
|
#1 |
New Member
Join Date: Jun 2018
Posts: 4
Rep Power: 8 |
Dear all,
I made an UDF in Linux. When I want to interpreted the UDF ANSYS keeps telling me the following " Value too large for defined data type" and " line 1: syntax error". Line one is the standard line for the UDF. #include "udf.h" This ANSYS version is also running on Linux so it has nothing to do with converting windows files to Linux files. Can anyone help me? |
|
June 27, 2018, 09:44 |
|
#2 |
Member
zobekenobe
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 72
Rep Power: 17 |
Can you post your code, it would be easier to debug it that way
|
|
June 27, 2018, 11:38 |
|
#3 |
New Member
Join Date: Jun 2018
Posts: 4
Rep Power: 8 |
Dear zobekenobe,
This is the UDF which doesn't work in Linux but does work in Windows. #include "udf.h" /* Defining the profile for the inlet pressure */ DEFINE_PROFILE(aortic_pressure,th,i) { face_t f; real a0 = 6018; real a1 = -657.9; real b1 = 1722; real a2 = -706.3; real b2 = 281.7; real a3 = -255.8; real b3 = -162.7; real a4 = -31.35; real b4 = 36.84; real a5 = -166.1; real b5 = 65.06; real a6 = -116.3; real b6 = -69.13; real a7 = -30.85; real b7 = -1.664; real a8 = -95.44; real b8 = -16.19; real w = 4*M_PI; real pressure_inlet = 0.0; real t = CURRENT_TIME; begin_f_loop(f,th) { pressure_inlet = a0 + a1*cos(t*w) + b1*sin(t*w) + a2*cos(2*t*w) + b2*sin(2*t*w) + a3*cos(3*t*w) + b3*sin(3*t*w) + a4*cos(4*t*w) + b4*sin(4*t*w) + a5*cos(5*t*w) + b5*sin(5*t*w) + a6*cos(6*t*w) + b6*sin(6*t*w) + a7*cos(7*t*w) + b7*sin(7*t*w) + a8*cos(8*t*w) + b8*sin(8*t*w); F_PROFILE(f,th,i) = pressure_inlet; } end_f_loop(f,th) } |
|
June 27, 2018, 11:44 |
|
#4 |
Member
zobekenobe
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 72
Rep Power: 17 |
It compiles and builds fine with Windows!!! No problems
I cant run it on the linux system right now. Did a search for the same problem apparently it happens with other softwares with one suggestion being the OS or the installed software is probably 32bit. Many suggested using dos2linux (probably create a udf in windows and then convert and run it) Have you tried compiling it instead of interpreting it?? |
|
June 27, 2018, 12:14 |
|
#5 |
New Member
Join Date: Jun 2018
Posts: 4
Rep Power: 8 |
Yes I tried to compile it however the ANSYS I use changes from serial to parallel during launching. It gives the following warning without assigning an UDF.
************************************************** ************************** ************************************************** ************************** ** WARNING: Automatically switched to run in parallel -t1 mode. ** ** Detected non-parallelized UDF usage, enabling parallel usage. ** ** If you encounter any issues, please re-run with -t0 flag. ** ************************************************** ************************** ************************************************** ************************** |
|
June 27, 2018, 12:23 |
|
#6 |
New Member
Join Date: Jun 2018
Posts: 4
Rep Power: 8 |
I got a student version in windows so I can't use that one for my mesh. In Linux however I got the full version, so I have to use the Linux version.
|
|
Tags |
linux error udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.org] compile error in dynamicMesh and thermophysicalModels libraries | NickG | OpenFOAM Installation | 3 | December 30, 2019 01:21 |
rSF: p divergence in combustor (wt negative value) | zonda | OpenFOAM Pre-Processing | 4 | April 10, 2018 07:59 |
Problem with continuity simpleFoam kkl omega airfoils | ibelunatic | OpenFOAM Running, Solving & CFD | 0 | March 20, 2018 12:48 |
time step continuity problem in VAWT simulation | lpz_michele | OpenFOAM Running, Solving & CFD | 5 | February 22, 2018 20:50 |
[swak4Foam] Air Conditioned room groovyBC | Sebaj | OpenFOAM Community Contributions | 7 | October 31, 2012 15:16 |