|
[Sponsors] |
December 21, 2012, 03:46 |
UDF dynamic mesh problem
|
#1 |
New Member
Gao
Join Date: Sep 2012
Posts: 13
Rep Power: 14 |
These 2 udf codes are both for the model I uploaded(one for membrane one for axis), and the membrane oscillated successfully.
The problem is the stretching of the axis.I want the point of the axis at (0,0) fixed. How should I do? |
|
December 27, 2012, 02:18 |
|
#2 |
New Member
Gao
Join Date: Sep 2012
Posts: 13
Rep Power: 14 |
I have solved the problem, the code is changed as below.
And the model is not the one I uploaded before so the number in the code is different. DEFINE_GRID_MOTION(oscilliation,domain,dt,time,dti me) { #if PARALLEL Thread *tf = DT_THREAD(dt); face_t f; Node *v; real NV_VEC(vel); real NV_VEC(del); real xx; real yy; real width; real period; int n; /* set deforming flag on adjacent cell zone */ SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf)); //Message ("time = %f, omega = %f\n", time, sign); NV_D(vel, =, 0.0,0.0,0.0); width = 0.095776 / 2.0; period = 0.05; begin_f_loop(f,tf) { f_node_loop(f,tf,n) { v = F_NODE(f,tf,n); xx = NODE_X(v); if(xx>0.058) { if (NODE_POS_NEED_UPDATE (v)) { NODE_POS_UPDATED(v); yy = (NODE_Y(v)) / width; vel[1] = 0; vel[0] = - 2 * 3.14159 / period * 0.005 * (1 - pow(yy,2)) * cos(2 * 3.14159 / period * time); NV_VS(del,=,vel,*,dtime); NV_VV(NODE_COORD(v),=,NODE_COORD(v),+,del); } } } } end_f_loop(f,tf); #endif } |
|
|
|
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 | Jkl | FLUENT | 9 | September 7, 2011 00:43 |
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 |