UDF to input initial value of velocity throughout the domain.
I have to model a lid driven cavity flow where there is initial value of velocity throughout the domain given by some function.
I know how to write UDF for defining boundary condition of velocity, but I am completely clueless as to how write UDF to define initial velocity profile throughout the domain.
You can use "DEFINE_INIT".
thank you for your reply..
I have one question as after hooking, when is the "DEFINE_INIT" called...
Do I have to do standard initialization which I generally do as x vel =0 , y vel = 0 etc and as the solver runs it will then call my UDF to initialize.
or I do not have to do the standard/hybrid initialization rather click on something else to initialize the flow using my UDF.
Don't worry about it. DEFINE_INIT is on the top of manual initialization and the UDF is preferable to manual initialization.
I'm in a spot of bother here. I am trying to do my term project using fluent and I have to simulate the Taylor-Green vortex for Re = 100, with periodic boundary conditions in a cell of unit dimensions (1m x 1m). I want to define the initial velocity of the vortex
U = -cos(2*pi*x)sin(2*pi*y)
V = sin(2*pi*x)cos(2*pi*y)
P = -(cos(4*pi*x) + cos(4*pi*y))/4
I want to enter a .cpp code in the form of a user defined function but I don't know exactly how to do that (I am not aware about the exact syntax to be used).
Can anyone please guide me in creating such a code (in a simple way)?
Also guide me to feed this program into fluent so that it gets "interpreted" properly.
Thanking you in advance.
Could you please help me?
I did a simulation of a geometry same as shown in the following movie:
I tried to do the motion same as in the movie, but I couldn't. After I searched in the internet, I noticed that I have to use a UDF to do the motion same as shown in the movie.
Please, do you have a tutorial showing how to write a UDF file? I hope you can help me.
My email is: email@example.com
A UDF (with DEFINE_INIT) allows initilisation of a sub domain's thread VOF value. This is seen in display-contour-vof. Next, when a calculation is run with this value, even for a single time step, the value of VOF reverts back to its default value in the solution initialisation box. Am I missing something somewhere?
What I am trying to do is, in a way an external patch using a UDF.. which seems to fail..when compared to a simple internal patch provided by Fluent.
Any ideas? Thanks in advance!
|All times are GMT -4. The time now is 23:00.|