CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF coding for dynamic mesh Needle valve lifting

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

Like Tree1Likes
  • 1 Post By Jiwon Y

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 18, 2019, 02:52
Default UDF coding for dynamic mesh Needle valve lifting
  #1
New Member
 
Jiwon Yoon
Join Date: Feb 2019
Posts: 11
Rep Power: 2
Jiwon Y is on a distinguished road
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.
Jiwon Y is offline   Reply With Quote

Old   July 29, 2019, 02:48
Default
  #2
Senior Member
 
Svetlana Tkachenko
Join Date: Oct 2013
Location: Australia
Posts: 284
Rep Power: 9
Светлана is on a distinguished road
What should the UDF do?
Светлана is offline   Reply With Quote

Old   August 19, 2019, 06:20
Smile dear Светлана
  #3
New Member
 
Jiwon Yoon
Join Date: Feb 2019
Posts: 11
Rep Power: 2
Jiwon Y is on a distinguished road
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
Jiwon Y is offline   Reply With Quote

Reply

Tags
dynamic mesh, udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF /Dynamic Mesh Query Subodh21 Fluent UDF and Scheme Programming 4 August 29, 2017 06:06
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 04:52
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 19:10


All times are GMT -4. The time now is 09:59.