# UDF coding for dynamic mesh Needle valve lifting

 Register Blogs Members List Search Today's Posts Mark Forums Read

 July 18, 2019, 01:52 UDF coding for dynamic mesh Needle valve lifting #1 New Member   Jiwon Yoon Join Date: Feb 2019 Posts: 11 Rep Power: 3 Hello I'm having trouble coding a needle valve lift for a fuel injectior. I have set my geometry and mesh but the udf code for dynamic mesh is harsh. Please help me out with coding of UDF or indications would also be very helpful. the maximum lifting length for the needle valve is 0.8(mm) and power stroke time length is 0.000232(sec) Светлана likes this.

 July 29, 2019, 01:48 #2 Senior Member   Svetlana Tkachenko Join Date: Oct 2013 Location: Australia, Sydney Posts: 374 Rep Power: 9 What should the UDF do?

 August 19, 2019, 05:20 dear Светлана #3 New Member   Jiwon Yoon Join Date: Feb 2019 Posts: 11 Rep Power: 3 Trying to make a up and down movement(Y-axis movement) of 0.8mm with my geometry model. upward movement should take place with velocity of 0.65m/s during time 0~0.0014 sec. downward movement should take place with velocity of 0.43m/s during 0.0014~0.0033 sec. down below is my UDF but it does not compile properly #include "udf.h" #include "dynamesh_tools.h" DEFINE_CG_MOTION(nozzle, dt, cg_vel, cg_omega, time, dtime) { /* reset velocities */ NV_S (cg_vel, =, 0.0); NV_S (cg_omega, =, 0.0); /* compute velocity formula */ if (time <= 0.0014) { cg_vel[1] = 0.65; } else if (0.0014 < time < 0.0033) { cg_vel[1] = -0.43; } else { NV_S (cg_vel, =, 0.0); NV_S (cg_omega, =, 0.0); } message("\n"); message("\n y_velocity = %g \n",cg_vel[1]); } any corrections to UDF or suggestions would be VERY helpful

 Tags dynamic mesh, udf