CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   help! udf for moving and deforming mesh (http://www.cfd-online.com/Forums/fluent/30448-help-udf-moving-deforming-mesh.html)

xie haibo October 29, 2002 23:29

help! udf for moving and deforming mesh
 
hi,everyone

I want to use UDF to apply the motion to one boundary.and I know the velocity of motion. But I don't know how to use DEFINE_CG_MOTION marco.

can anybody give me some UDF examples about this? Thanks!

J.W.Ryu November 3, 2002 22:07

Re: help! udf for moving and deforming mesh
 
Hello,

Following is UDF that I am using for moving voundary. By time step, velocity of moving mesh is being changed.

Thanks,

/****** Boundary Condition - [ Dynamic Meshing ] ********/

DEFINE_CG_MOTION(pull, dt, vel, omega, time, dtime) { Thread *t; face_t f; real x[ND_ND], y, u_vel ; real tt = RP_Get_Real ("flow-time");

/* time dependent velocity always can be changed by experimental condition */

if (tt <= 12045.6)

{

u_vel = 1.67e-5 - 2.82e-9*tt + 3.98e-13*pow(tt,2.0) ;

}

else if (tt < 32696.6)

{

u_vel = 1.18e-5 - 6.91e-10*tt + 3.43e-14*pow(tt,2.0) ;

}

else if (tt <= 41492.)

{

u_vel = 6.9e-6 - 8.01e-11*tt + 1.79e-15*pow(tt,2.0) ;

}

else if (tt <= 102991.9)

{

u_vel = 4.79e-6 + 1.79e-11*tt ;

}

else if (tt <= 188854.2)

{

u_vel = 1.15e-5 - 4.59e-11*tt ;

}

else if (tt <= 233493.3)

{

u_vel = 2.8e-6 + 1.23e-12*tt + 5.67e-17*pow(tt,2.0) ;

}

else

{

u_vel= 6.182e-06 ;

}

vel[0] = u_vel;

}

xie haibo November 4, 2002 04:52

Re: help! udf for moving and deforming mesh
 
hi,J.W.Ryu

thank you very much!

I have another question.I want to know which mode to select to compile the UDF? interpreted or compiled? thanks again!

Xie Haibo

J.W.Ryu November 4, 2002 07:47

Re: help! udf for moving and deforming mesh
 
Hi, Xie,

UDF that I posted is a part of my UDF, which has Moving mesh and other source/boundary conditions. You need to select compiled. In addition, you need to aware that moving mesh is alloweded at Fluent ver. 6.0.

Please see users manual and Tutorial regarding to moving/deforming mesh. It will let you know how you can easily learn moving/deforming mesh.

Thanks,

J.W.Ryu

xie haibo November 4, 2002 08:09

Re: help! udf for moving and deforming mesh
 
hi,J.W.Ryu,

thanks again!

I have read the fluent6.0 user's manual for dynamic mesh sereral times. But you know the UDF of deforming/moving mesh in the manual is not detailed. I will try again and hope to keep touch with you if i reach new problems. thank you!

Xie Haibo


All times are GMT -4. The time now is 19:49.