CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   DEFINE_CG_MOTION (http://www.cfd-online.com/Forums/fluent/40317-define_cg_motion.html)

s March 26, 2006 06:55

DEFINE_CG_MOTION
 
Hi,

I have a model with two moving valves. I'm using one define_cg_motion macro for each valve. The problem is that only one valve moves like it should and that is the valve which is defined in the last define_CG_motion. I have tried to change the order of the two macroes, but it is always the valve which is defiend in the last macro which moves...

How does I solve this problem? Is there any other way than using two separate define_cg_motion macroes? Can I put both into one and how?

S

Jura April 5, 2006 04:30

Re: DEFINE_CG_MOTION
 
Hi, try anything like this (it should help): #include "udf.h" DEFINE_CG_MOTION(valve1, dt, velocity, omega, time, dtime) { if (!Data_Valid_P()) {

Message("Pas bon du tout!\n");

return; }

NV_S(velocity, =, 0.0); NV_S(omega, =, 0.0);

/*movement of the body*/ vel[1]=...; omega[2]=...;

Message("\n moving valve No. 1"); }

DEFINE_CG_MOTION(valve2, dt, vel, omega, time, dtime) { if (!Data_Valid_P()) {

Message("Pas bon du tout!\n");

return; }

NV_S(vel, =, 0.0); NV_S(omega, =, 0.0);

/*movement of the body*/ vel[1]=...; omega[2]=...;

Message("\n moving valve No. 2"); }

Than you can choose in the panel Dynamic Mesh Zones for the one valve the function called valve1, and for the another function valve2. I hope it's usefull. J

ndthao November 24, 2010 09:15

Hi everybody......, I am a new in Fluent. I am solving the moving wall (Like wave generation in a Tank), but the wall moves with various discrete accelerations (not periodic function). I can't use DEFINE_CG_MOTION to simulate the moving wall .

Hope people can answer my questions....!!Thank so much.

JohannVV November 24, 2010 14:38

Quote:

Originally Posted by ndthao (Post 284608)
... but the wall moves with various discrete accelerations (not periodic function). I can't use DEFINE_CG_MOTION to simulate the moving wall .

Hope people can answer my questions....!!Thank so much.

hi what is about fourier tratransformation. after the transformation you can transform the acceleration to the movement of your wall.

ndthao November 24, 2010 21:59

Quote:

Originally Posted by JohannVV (Post 284668)
hi what is about fourier tratransformation. after the transformation you can transform the acceleration to the movement of your wall.

My wall is assigned a motion with artificial earthquake (1500 values of discrete accelerations). I had transfered accelerations to velocity by using integrating discrete function.

My problem is that I can't define the motion of the wall with various discrete velocity (discrete acceleration) in DEFINE_CG_MOTION of Fluent. Because the velocity of wall are discrete values (not periodic function).

Hope people answer my questions...???? Thank a lot...!!!


All times are GMT -4. The time now is 10:34.