|
[Sponsors] |
May 23, 2010, 07:07 |
Sinusoidal motion udf
|
#1 |
New Member
|
hey guys
i have a problem but i am not so sure if it is due to my fluent or udf or other things i want to find the pressure distribution around an airfoil (which has a sinusoidal motion) in a water tank. i have written the following code in C: #include "udf.h" #define om 0.62831853 #define pi 3.1415926 #define scale 0.1612 /* x(t)= 2c*cos(wt) alpha(t)= pi/2 + pi/2*sin(wt) */ DEFINE_CG_MOTION(vel, omega, time) { real b,u; u = -2*scale*om*sin(om*time); b = pi/2*om*cos(om*time); vel[0] = u; vel[1] = 0.0; vel[2] = 0.0; omega[0] = 0.0; omega[1] = 0.0; omega[2] = b; } but in fluent after building it in udf compiler, in loading time i am recived the following error; Opening library "code"... Error: open_udf_library: The system cannot find the file specified. Error Object: () someone please help me thank you in advance |
|
May 23, 2010, 10:47 |
|
#2 |
Senior Member
Join Date: Nov 2009
Posts: 411
Rep Power: 20 |
If you use Windows as I suspect modify the files view menu in order to let you see the extensions of the known file types.
Do |
|
May 23, 2010, 10:53 |
|
#3 |
New Member
|
thank you, i am using windows and even i have had unmarked the "hide extension for known file type" previously.
and still the problem exists. |
|
May 31, 2010, 05:06 |
|
#4 |
Member
Join Date: Mar 2009
Posts: 49
Rep Power: 17 |
Hi,
did fluent comile this udf without an error? If you take a look at the manual, the DEFINE_CG_MOTION is defined the following way: #define DEFINE_CG_MOTION(name, dt, vel, omega, time, dtime) So I guess you forgot some variables. And you also didn't give a name, so how did you hook the udf in fluent? |
|
May 31, 2010, 05:17 |
|
#5 |
New Member
|
oops thank you but i think i pasted the wrong version of my c file here, in the main version i wrote as follow
DEFINE_CG_MOTION(pilo, dt, vel, omega, time, dtime) indeed i have put name and other necessary variable! but still i have the same problem! |
|
May 31, 2010, 06:07 |
|
#6 |
Member
Join Date: Mar 2009
Posts: 49
Rep Power: 17 |
Ok,
and do you have all your files in one directory and is there a directory named "code" after compiling? It sounds as if some environment variables are not set properly. Did you ever use another UDF before? cheers |
|
July 30, 2010, 12:44 |
rotation around z axis
|
#7 |
Member
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 16 |
hi everybody...
i am trying to simulate peristaltic pump and for this i need to write an udf file to rotate on of edges about z axis,i will be thanfull if u could help me with this problem. thank you in advance.. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UDF problem: incorrect grid motion | Fil | FLUENT | 5 | December 19, 2020 10:16 |
Grid motion with UDF | fivos | Fluent UDF and Scheme Programming | 5 | June 30, 2018 09:50 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
UDF for non sinusoidal or varying amplitude motion with respect to time | lalit kumar | FLUENT | 1 | November 13, 2010 17:58 |
UDF error CG Motion | Alex | FLUENT | 0 | March 22, 2006 18:40 |