UDF for shrinking material
1 Attachment(s)
Hi
I have a 2D Geometry attached is the picture. I have a material in the middle which shrinks 0.5 inch in 5 hours the left and the right walls. I wrote the following UDF but it did not work. #include "udf.h" #include "dynamesh_tools.h" /************************************************** ********************/ /***** UDF for displacer motiion *****/ /************************************************** ********************/ DEFINE_CG_MOTION(displacer_func_Piston_West, dt, vel, omega, time, dtime) { Thread *t; face_t f; real a = 3.215; real pai = 3.141592654; /* reset velocities */ NV_S (vel, =, 0.0); NV_S (omega, =, 0.0); if (!Data_Valid_P ()) return; t=DT_THREAD (dt); vel[0] = 0.0000007055 ; } DEFINE_CG_MOTION(displacer_func_Piston_East, dt, vel, omega, time, dtime) { Thread *t; face_t f; real a = 11.536; real pai = 3.141592654; /* reset velocities */ NV_S (vel, =, 0.0); NV_S (omega, =, 0.0); if (!Data_Valid_P ()) return; t=DT_THREAD (dt); vel[0] = -0.0000007055 ; } Please help |
All times are GMT -4. The time now is 05:48. |