Using Dynamic Mesh with UDF
I have a 2D Geometry which has Piston on two sides and Top and Bottom are walls. I wanna move the Two Pistons Simultaneously using the UDF. For motion I am using Sine Function. I am using Fluent. Please Help
|
Quote:
If you are newbie in udf, take a deep look at fluent udf manual. It can help you more than anyone else. (search for define_cg_motion) Good luck. |
Dynamic Wall UDF
I have gone through the Manual. I am able to compile my UDF and Hook it to the walls. But I can see both the walls moving in the same direction. I am using the following UDF:
#include "udf.h" #include "dynamesh_tools.h" /************************************************** ********************/ /***** UDF for displacer motiion *****/ /************************************************** ********************/ DEFINE_CG_MOTION(displacer_func, dt, vel, omega, time, dtime) { Thread *t; face_t f; real a = 1.58712757; real pai = 3.141592654; /* reset velocities */ NV_S (vel, =, 0.0); NV_S (omega, =, 0.0); if (!Data_Valid_P ()) return; t=DT_THREAD (dt); if(time<=8.0) vel[0] = ( a * ( cos(2*pai*75*time)) ) ; else vel[0] = -( a * ( cos(2*pai*75*time)) ) ; } I appreciate if anyone can help. |
Quote:
1.separate two pistons in two distinct zones (if not already.) 2.make a copy of your define cg motion with a different name and a minus sign in velocity. Now assign each cg motion into one of pistons. Good luck. |
Quote:
|
Quote:
1-Return to Gambit and separate two walls as you know. 2-Do this in Fluent at Grid-->Separate by region. |
All times are GMT -4. The time now is 21:51. |