peritalsis problem using DEFINE_GRID_MOTION
hi all,
i am doing a sinusoidal peristalsis problem in which the radius of the wave is given by: R(x,t)=epsilon+(a/2)(1-cos(2*pi/lambda(x-ct) . the respective values are provided. the program is supposed to take time, and x as input. i have used a cfd as follows: #include "udf.h" DEFINE_GRID_MOTION(peristalsis,domain,dt,time,dtim e) { Thread *tf = DT_THREAD(dt); face_t f; Node *v; real NV_VEC(axis),NV_VEC(val); real val1, val2; int n; /*** set deforming flag on adjacent zone ***/ /*SET_DEFORMING_THREAD_FLAG(THREAD_T0(tf));*/ /*NV_D(axis, =, 1.0, 0.0, 0.0);*/ begin_f_loop(f,tf) { f_node_loop(f,tf,n) { v=F_NODE(f,tf,n); if (NODE_X(v) > 0.000667 && NODE_POS_NEED_UPDATE (v)) { NODE_POS_UPDATED(v);*/ val1= 1-(cos((2*3.14/0.1)*(NODE_X(v)-0.0002*time))); printf("%d",NODE_X(v)); val2= 0.001+((0.0004/2)*val1); val[2] = val2; printf("%d",val2); NV_V(NODE_COORD(v), =, val); /*NODE_Y(v) = val2;*/ } } } end_f_loop(f,tf); } i have used very small time steps, but it is still giving negative cell volume as an error at the very first step. kindly help me. hoping for a reply. thanx a lot |
kindly help as i am eagerly waiting for it
|
All times are GMT -4. The time now is 18:22. |