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

Sinusoidal motion udf

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 23, 2010, 07:07
Default Sinusoidal motion udf
  #1
New Member
 
urmazda's Avatar
 
iman ashtiani
Join Date: May 2010
Location: australia
Posts: 3
Rep Power: 16
urmazda is on a distinguished road
Send a message via MSN to urmazda Send a message via Yahoo to urmazda Send a message via Skype™ to urmazda
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
urmazda is offline   Reply With Quote

Old   May 23, 2010, 10:47
Default
  #2
Senior Member
 
Join Date: Nov 2009
Posts: 411
Rep Power: 20
DoHander is on a distinguished road
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
DoHander is offline   Reply With Quote

Old   May 23, 2010, 10:53
Default
  #3
New Member
 
urmazda's Avatar
 
iman ashtiani
Join Date: May 2010
Location: australia
Posts: 3
Rep Power: 16
urmazda is on a distinguished road
Send a message via MSN to urmazda Send a message via Yahoo to urmazda Send a message via Skype™ to urmazda
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.
urmazda is offline   Reply With Quote

Old   May 31, 2010, 05:06
Default
  #4
Member
 
O.D.Y.'s Avatar
 
Join Date: Mar 2009
Posts: 49
Rep Power: 17
O.D.Y. is on a distinguished road
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?
O.D.Y. is offline   Reply With Quote

Old   May 31, 2010, 05:17
Default
  #5
New Member
 
urmazda's Avatar
 
iman ashtiani
Join Date: May 2010
Location: australia
Posts: 3
Rep Power: 16
urmazda is on a distinguished road
Send a message via MSN to urmazda Send a message via Yahoo to urmazda Send a message via Skype™ to urmazda
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!

urmazda is offline   Reply With Quote

Old   May 31, 2010, 06:07
Default
  #6
Member
 
O.D.Y.'s Avatar
 
Join Date: Mar 2009
Posts: 49
Rep Power: 17
O.D.Y. is on a distinguished road
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
O.D.Y. is offline   Reply With Quote

Old   July 30, 2010, 12:44
Default rotation around z axis
  #7
Member
 
ahmad
Join Date: Jul 2010
Posts: 57
Rep Power: 16
almostafa67 is on a distinguished road
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..
almostafa67 is offline   Reply With Quote

Reply


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
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


All times are GMT -4. The time now is 03:54.