|
[Sponsors] |
December 30, 2011, 13:52 |
udf dynamic mesh problem
|
#1 |
New Member
hilla tor
Join Date: Jun 2009
Posts: 10
Rep Power: 17 |
I try to complie the flowing code at udf file:
Code:
/********************************************************** node motion based on simple beam deflection equation compiled UDF **********************************************************/ #include"udf.h" DEFINE_GRID_MOTION(beam,domain,dt,time,dtime) { Thread *tf = DT_THREAD(dt); face_t f; Node *v; real NV_VEC(omega), NV_VEC(axis), NV_VEC(dx); real NV_VEC(origin), NV_VEC(rvec); real sign_t; int n; /* set deforming flag on adjacent cell zone */ SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf)); sign_t = (26.178 * time); Message ("time = %f, omega = %f\n", time, sign_t); NV_S(omega, =, 0.0); NV_D(axis, =, 0.0, 1.0, 0.0); NV_D(origin, =, 0.0, 0.0, 0.152); begin_f_loop(f,tf) { f_node_loop(f,tf,n) { v = F_NODE(f,tf,n); /* update node if x position is greater than 0.02 and that the current node has not been previously visited when looping through previous faces */ // if (NODE_X(v) > 0.020 && NODE_POS_NEED_UPDATE (v)) // { /* indicate that node position has been update so that it's not updated more than once */ NODE_POS_UPDATED(v); omega[1] =0.1*sin(NODE_X(v)*6.28-sing_t); NV_VV(rvec, =, NODE_COORD(v), -, origin); NV_CROSS(dx, omega, rvec); NV_S(dx, *=, dtime); NV_V(NODE_COORD(v), +=, dx); // } } } end_f_loop(f,tf); } i would like to get some help i'm using fluent 6.3 thanks hilla |
|
December 31, 2011, 07:40 |
|
#2 |
Senior Member
duri
Join Date: May 2010
Posts: 245
Rep Power: 17 |
Your udf is from tutorial. Probably you might be having nmake issue. check this thread.
http://www.cfd-online.com/Forums/flu...iling-udf.html |
|
December 31, 2011, 07:51 |
i'm using fluent at unix
|
#3 |
New Member
hilla tor
Join Date: Jun 2009
Posts: 10
Rep Power: 17 |
there is a problem compiling at unix?
|
|
January 2, 2012, 06:19 |
|
#4 |
Senior Member
duri
Join Date: May 2010
Posts: 245
Rep Power: 17 |
post compiler error message to dig further
|
|
January 14, 2012, 08:55 |
here
|
#5 |
New Member
hilla tor
Join Date: Jun 2009
Posts: 10
Rep Power: 17 |
the pic show the grid at t=0
i try to make the botton wall to move when i compiled the udf file the error i get: incorrect cg motion UDF beam::libudf on zone 10 (assuming no motion) shell conduction zones, here is my udf code: Code:
/********************************************************** node motion based on simple beam deflection equation compiled UDF **********************************************************/ #include"udf.h" DEFINE_GRID_MOTION(beam,domain,dt,time,dtime) { Thread *tf = DT_THREAD(dt); face_t f; Node *v; real NV_VEC(omega), NV_VEC(axis), NV_VEC(dx); real NV_VEC(origin), NV_VEC(rvec); real sign; int n; /* set deforming flag on adjacent cell zone */ SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf)); sign =5 * time; Message ("time = %f, omega = %f\n", time, sign); NV_S(omega, =, 0.0); NV_D(axis, =, 0.0, 1.0, 0.0); NV_D(origin, =, 0.0, 0.0, 0.152); begin_f_loop(f,tf) { f_node_loop(f,tf,n) { v = F_NODE(f,tf,n); /* update node if x position is greater than 0.02 and that the current node has not been previously visited when looping through previous faces */ /* indicate that node position has been update so that it's not updated more than once */ NODE_POS_UPDATED(v); omega[1] = 0.1*sin(6.28*NODE_X(v)-sign); NV_VV(rvec, =, NODE_COORD(v), -, origin); NV_CROSS(dx, omega, rvec); NV_S(dx, *=, dtime); NV_V(NODE_COORD(v), +=, dx); } } end_f_loop(f,tf); } |
|
January 14, 2012, 09:35 |
|
#6 |
Member
Join Date: Nov 2011
Location: Czech Republic
Posts: 97
Rep Power: 15 |
||
January 14, 2012, 11:45 |
the pic at t=0
|
#7 |
New Member
hilla tor
Join Date: Jun 2009
Posts: 10
Rep Power: 17 |
attached
-------- |
|
January 3, 2015, 13:49 |
|
#8 | |
New Member
Renato Venturatto Junior
Join Date: May 2014
Posts: 18
Rep Power: 12 |
Quote:
Have you solved the problem of "incorrect cg motion UDF beam::libudf on zone 10 (assuming no motion)" yet? I'm facing the same problem and have now ideia how to fix it! Thanks in advance! |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic mesh & Negative volume in 3D | mahzironrazak | FLUENT | 97 | December 28, 2020 23:09 |
dynamic mesh udf sample | wlt_1985 | FLUENT | 0 | April 11, 2011 00:36 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 12:55 |
Problem related with UDF for dynamic mesh | Ryan | FLUENT | 6 | April 29, 2004 10:29 |
Problem related with UDF for dynamic mesh | Ryan | FLUENT | 1 | April 16, 2004 07:05 |