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

DEFINE_CG_MOTION

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 26, 2006, 06:55
Default DEFINE_CG_MOTION
  #1
s
Guest
 
Posts: n/a
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
  Reply With Quote

Old   April 5, 2006, 04:30
Default Re: DEFINE_CG_MOTION
  #2
Jura
Guest
 
Posts: n/a
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
  Reply With Quote

Old   November 24, 2010, 08:15
Default
  #3
New Member
 
DuyThao
Join Date: Nov 2010
Posts: 2
Rep Power: 0
ndthao is on a distinguished road
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.
ndthao is offline   Reply With Quote

Old   November 24, 2010, 13:38
Default
  #4
New Member
 
Join Date: Sep 2010
Location: germany
Posts: 20
Rep Power: 15
JohannVV is on a distinguished road
Quote:
Originally Posted by ndthao View Post
... 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.
JohannVV is offline   Reply With Quote

Old   November 24, 2010, 20:59
Default
  #5
New Member
 
DuyThao
Join Date: Nov 2010
Posts: 2
Rep Power: 0
ndthao is on a distinguished road
Quote:
Originally Posted by JohannVV View Post
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...!!!
ndthao 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:17.