CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

UDF /Dynamic Mesh Query

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

LinkBack Thread Tools Search this Thread Display Modes
Old   March 24, 2014, 07:52
Default UDF /Dynamic Mesh Query
New Member
Join Date: Sep 2013
Location: Canada
Posts: 20
Rep Power: 8
Subodh21 is on a distinguished road
Hi all,
I am able to run the first tutorial on dynamic mesh i.e falling box example.
The UDF given in example is 6dof_2d.c

#include "udf.h"

#define BMODULUS 2.2e9
#define rho_ref 1000.0

real rho;
real p, dp, p_operating;

p_operating = RP_Get_Real("operating-pressure"); p = C_P(c,t);
dp = p-p_operating;
rho = rho_ref/(1.0-dp/BMODULUS);

return rho;

real a;
real p, dp, p_operating;

p_operating = RP_Get_Real ("operating-pressure"); p = C_P(c,t);
dp = p-p_operating;
a = (1.-dp/BMODULUS)*sqrt(BMODULUS/rho_ref);

return a;

DEFINE_SDOF_PROPERTIES(test_box, prop, dt, time, dtime)
prop[SDOF_MASS] = 666.66;
prop[SDOF_IXX] = 129.6296;
prop[SDOF_IYY] = 111.1111;
prop[SDOF_IZZ] = 129.6296;

printf ("\n2d_test_box: Updated 6DOF properties");

As my understanding its a Lagrange mesh which is being updated.

My question is how this UDF works on updating the mesh and how its making the mesh dynamic?

Also in the geometry i can see a thin mesh around the solid boundary,is it a boundary layer mesh,which interacts with the fluid mesh?

What is the mechanics behind the dynamic mesh?

I have gone through tutorial but mostly it talk about the steps to run the simulation.

Subodh21 is offline   Reply With Quote

Old   August 19, 2017, 02:50
New Member
Join Date: Dec 2013
Posts: 12
Rep Power: 8
spz is on a distinguished road
hi dear ..
i start working on this tutorial and i cant understand what is the
relation for density and speed and sound. actually i cant understand the physics of problem. i would be very pleasure if u could answer my question kindly,
tanks a lot
spz is offline   Reply With Quote

Old   August 23, 2017, 06:51
Default udf for telescopic motion
New Member
Join Date: Aug 2017
Location: Malaysia
Posts: 14
Rep Power: 4
musa19 is on a distinguished road
Hi everyone,
I do not have good experience in ANSYS Fluent UDF coding, and am trying to impose a simple UDF to move an extended section of telescopic jack from a fixed main part. I want to move the jack extended section in x-direction in small time intervals (t) with some velocity (v).

Could anyone please help me to write this UDF? I will be very thankful.

musa19 is offline   Reply With Quote

Old   August 28, 2017, 21:43
Super Moderator
diamondx's Avatar
Ghazlani M. Ali
Join Date: May 2011
Location: Tokyo, Japan
Posts: 1,385
Blog Entries: 23
Rep Power: 25
diamondx will become famous soon enough
I'm no UDF guru but here is my two cents on how it works:
The udf does not update the mesh, It only contains the information regarding how the mesh moves. In Fluent, you have to enable ''dynamic mesh'', and select your compiled UDF in the drop down menu list. this is where the magic happens. Fluent will load the udf information and start deforming or remeshing your domain...
New to ICEM CFD, try this document -->
diamondx is offline   Reply With Quote

Old   August 29, 2017, 05:06
Default Thanks note
New Member
Join Date: Aug 2017
Location: Malaysia
Posts: 14
Rep Power: 4
musa19 is on a distinguished road
Thank you very much brother. I will go through the tutorial attached, and hopefully it will guide me for what i am aiming for. I have seen your other posts and got a lot of information from those posts.

Thank you.
musa19 is offline   Reply With Quote


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
Dynamic Mesh UDF Qureshi FLUENT 7 March 23, 2017 07:37
[Gmsh] 2D Mesh Generation Tutorial for GMSH aeroslacker OpenFOAM Meshing & Mesh Conversion 12 January 19, 2012 03:52
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 21:11
with UDF to change mesh by external mesh generator zou_mo FLUENT 0 June 30, 2009 07:15
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 14:09

All times are GMT -4. The time now is 00:04.