UDF for y displacement
Need help
I am working on a Stirling engine , To describe the motion of piston , I have written a UDF for the y displacement or position . Is it correct * moving piston-CG movement of piston*/ #include "udf.h" DEFINE_CG_motion(piston,dt,y,time,dtime) { real x y = 0.06869+0.06496 * (sin(3.14*(x-0.22597)/0.54806)); } regards, |
It seems, that your code is not correct,
use Ansys FLuent Customization manual for more information "Dynamic Mesh DEFINE Macros" best regards |
Dear AlexanderZ
could you help me with correction of this udf ? Regards, |
You’re missing some variables such as omega I believe.
|
It should be DEFINE_CG_MOTION(whatever_name, dt,vel, omega, time ,dtime)
|
With that I also believe you should add vector placements. So your y should be vel[1] = whatever. [1] here saying the y direction. Omega should probably be added as well where it would be omega[2]=0.0 and I would probably even have a vel[0]=0.0. This may not be necessary.
Additionally, I do not think Ansys knows what “x” is here. Instead use vel[0] or you may have to look up in the manual what Ansys stores it’s positions as. I am unsure what your x is rather it is velocity or position. Best, RCamp |
All times are GMT -4. The time now is 07:21. |