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

UDF to input initial value of velocity throughout the domain.

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 1, 2013, 06:53
Default UDF to input initial value of velocity throughout the domain.
  #1
New Member
 
Delhi
Join Date: Mar 2013
Posts: 2
Rep Power: 0
sn2ou7 is on a distinguished road
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.
sn2ou7 is offline   Reply With Quote

Old   March 2, 2013, 05:12
Default
  #2
Senior Member
 
SSL
Join Date: Oct 2012
Posts: 227
Rep Power: 5
msaeedsadeghi is on a distinguished road
You can use "DEFINE_INIT".
msaeedsadeghi is offline   Reply With Quote

Old   March 2, 2013, 06:01
Default
  #3
New Member
 
Delhi
Join Date: Mar 2013
Posts: 2
Rep Power: 0
sn2ou7 is on a distinguished road
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.
sn2ou7 is offline   Reply With Quote

Old   March 2, 2013, 06:19
Default
  #4
Senior Member
 
SSL
Join Date: Oct 2012
Posts: 227
Rep Power: 5
msaeedsadeghi is on a distinguished road
Don't worry about it. DEFINE_INIT is on the top of manual initialization and the UDF is preferable to manual initialization.
msaeedsadeghi is offline   Reply With Quote

Old   October 17, 2013, 13:01
Default UDF interpretation
  #5
New Member
 
Sagar
Join Date: Oct 2013
Posts: 1
Rep Power: 0
sagarkhushalraozade is on a distinguished road
Hi guys,
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.
sagarkhushalraozade is offline   Reply With Quote

Old   October 20, 2013, 17:27
Default UDF help
  #6
New Member
 
Mohammad
Join Date: Jun 2013
Posts: 12
Rep Power: 4
Mohammad80 is on a distinguished road
Hello msaeedsadeghi

Could you please help me?

I did a simulation of a geometry same as shown in the following movie:

https://www.youtube.com/watch?v=e7kiLTy1URU

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: mas20001920@yahoo.com

Regards..
Mohammad80 is offline   Reply With Quote

Old   October 22, 2013, 14:04
Default Define INIT
  #7
New Member
 
A
Join Date: Nov 2012
Location: France
Posts: 7
Rep Power: 4
bansa9643 is on a distinguished road
Quote:
Originally Posted by msaeedsadeghi View Post
Don't worry about it. DEFINE_INIT is on the top of manual initialization and the UDF is preferable to manual initialization.
Thanks for your input. Nevertheless, I have some doubts regarding DEFINE_INIT's preference and working.

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!
Best,
A.B.
bansa9643 is offline   Reply With Quote

Reply

Tags
fluent, fluent - udf, udf

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
why divergence occures in these cases immortality OpenFOAM Running, Solving & CFD 2 January 25, 2013 11:21
pisoFoam with k-epsilon turb blows up - Some questions Heroic OpenFOAM Running, Solving & CFD 26 December 17, 2012 04:34
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 04:03
lift and drag on ship superstructures vaina74 OpenFOAM Running, Solving & CFD 3 June 8, 2010 12:30
Computational time sunnysun OpenFOAM Running, Solving & CFD 5 March 16, 2009 04:32


All times are GMT -4. The time now is 05:11.