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

π (pi)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 26, 2014, 07:45
Wink π (pi)
  #1
New Member
 
He Zhao
Join Date: Feb 2013
Location: Shanghai(now)
Posts: 11
Rep Power: 13
zhereal is on a distinguished road
Hi,everyone!

I have a minor problem.
how to write π(Pi)in the UDF?

best regards
zhereal
zhereal is offline   Reply With Quote

Old   February 26, 2014, 08:14
Default
  #2
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
Check the section "Miscellaneous Macros" (3.8 in versions 14.5 and 15.0) of the Fluent UDF manual.
pakk is offline   Reply With Quote

Old   February 26, 2014, 08:35
Default
  #3
New Member
 
He Zhao
Join Date: Feb 2013
Location: Shanghai(now)
Posts: 11
Rep Power: 13
zhereal is on a distinguished road
Thank you,pakk
Now I'm dong a research.It's about 2D airfoil with heaving and pitching motion. I want to use sliding meshes.
my udf is this:


#include "udf.h"
DEFINE_ZONE_MOTION(fmotion,omega,axis,origin,veloc ity,time,dtime)
{
real omegar;
velocity[0]=0.0,velocity[1]=0.5*3.14159265*cos(0.2*3.14159265*time),velocity[2]=0.0;

origin[0]=0.0, origin[1]=time*velocity[1], origin[2]=0.0;
omegar = 0.5*3.14159265*cos(0.2*3.14159265*time);
*omega = omegar;

return;
}



I think "heaving motion" is
velocity[1]=0.5*3.14159265*cos(0.2*3.14159265*time)
and "pitching motion" is
origin[0]=0.0, origin[1]=time*velocity[1], origin[2]=0.0;
omegar = 0.5*3.14159265*cos(0.2*3.14159265*time);

I know it's wrong,But I don't know how to simulate the two motion together
.

best regards,
zhereal
zhereal 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



All times are GMT -4. The time now is 11:27.