CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF value too large for defined data type

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 27, 2018, 07:07
Default UDF value too large for defined data type
  #1
New Member
 
Join Date: Jun 2018
Posts: 4
Rep Power: 4
Intern_SG is on a distinguished road
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?
Intern_SG is offline   Reply With Quote

Old   June 27, 2018, 08:44
Default
  #2
Member
 
zobekenobe
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 72
Rep Power: 14
zobekenobe is on a distinguished road
Can you post your code, it would be easier to debug it that way
zobekenobe is offline   Reply With Quote

Old   June 27, 2018, 10:38
Default
  #3
New Member
 
Join Date: Jun 2018
Posts: 4
Rep Power: 4
Intern_SG is on a distinguished road
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)
}
Intern_SG is offline   Reply With Quote

Old   June 27, 2018, 10:44
Default
  #4
Member
 
zobekenobe
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 72
Rep Power: 14
zobekenobe is on a distinguished road
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??
zobekenobe is offline   Reply With Quote

Old   June 27, 2018, 11:14
Default
  #5
New Member
 
Join Date: Jun 2018
Posts: 4
Rep Power: 4
Intern_SG is on a distinguished road
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. **
************************************************** **************************
************************************************** **************************
Intern_SG is offline   Reply With Quote

Old   June 27, 2018, 11:23
Default
  #6
New Member
 
Join Date: Jun 2018
Posts: 4
Rep Power: 4
Intern_SG is on a distinguished road
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.
Intern_SG is offline   Reply With Quote

Reply

Tags
linux error udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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 00:21
rSF: p divergence in combustor (wt negative value) zonda OpenFOAM Pre-Processing 4 April 10, 2018 06:59
Problem with continuity simpleFoam kkl omega airfoils ibelunatic OpenFOAM Running, Solving & CFD 0 March 20, 2018 11:48
time step continuity problem in VAWT simulation lpz_michele OpenFOAM Running, Solving & CFD 5 February 22, 2018 19:50
[swak4Foam] Air Conditioned room groovyBC Sebaj OpenFOAM Community Contributions 7 October 31, 2012 14:16


All times are GMT -4. The time now is 01:02.