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

Explanation of a UDF codes

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

LinkBack Thread Tools Search this Thread Display Modes
Old   September 13, 2019, 05:40
Default Explanation of a UDF codes
New Member
Join Date: May 2019
Posts: 16
Rep Power: 6
Helium is on a distinguished road
Hi guys,

I am trying to apply a UDF to move one of the wall of a cubic tank in order to generate wave in the fluid inside.

Regarding these thread I found:

UDF for moving wall (oscillating)
udf for sinusoidally oscillating wall

It seems that I am in a very similar case, because I need to move just one of the faces (let's say along the x-axis for example) to obtain the effect.
Essentially I do not grasp if these codes are moving one wall back and forth, because the key point of simulation is that my wall goes REALLY back and forth between a starting and an ending position (following a cosinusoidal law for the x-velocity that I wrote).

Do they do this? In which part?
Helium is offline   Reply With Quote

Old   September 23, 2019, 05:17
Senior Member
Join Date: Apr 2013
Posts: 2,259
Rep Power: 33
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
#include "udf.h"
#include "dynamesh_tools.h" 
DEFINE_CG_MOTION(oscillate,dt,vel,omega,time,dtime )
Thread *t;
face_t f; /* define the variables */
t = DT_THREAD(dt);
begin_f_loop(f,t) /* loop over each face in the zone to create an array of data */
vel[0]= sin(time);
wall will move along x-direction with velocity value = sin(time), change thisa value according to your needs

best regards
AlexanderZ is offline   Reply With Quote


motion wall, sloshing tank 2d, sloshingtank3d, udf code, udf customize

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 for vapor pressure anuarun Fluent UDF and Scheme Programming 12 December 24, 2021 10:12
Replicating Scalable Wall Function with a UDF yousefaz FLUENT 0 August 4, 2017 02:30
Source Term UDF VS Porous Media Model pchoopanya Fluent UDF and Scheme Programming 1 August 28, 2013 06:12
DEFINE_GEOM UDF Problems Pat FLUENT 0 August 14, 2003 13:16
UDF, UDF, UDF, UDF Luc SEMINEL Main CFD Forum 0 November 25, 2002 04:01

All times are GMT -4. The time now is 17:44.