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

How to write UDF programme inside FLUENT?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 26, 2009, 00:54
Default How to write an UDF programming inside FLUENT?
  #1
New Member
 
oscar
Join Date: Mar 2009
Posts: 7
Rep Power: 8
coolyihao is on a distinguished road
I have a brick region..the front surface i make it as inlet and i would like to write a UDF programme for the inlet velocity which is parabolic shape.. eg: at the center of the inlet is the highest velociy. (a parabolic shape)

secondly, left, right and behind surface i make it as pressure outlet and write a UDF programme for pressure different. Due to the brick region as a sea. and the lower surface is a seabed.. therefore if from top surface to lower surface(deeper) , the pressure will increase..(a triangle shape)

May I know how to write a UDF programme for this..THX

Last edited by coolyihao; March 26, 2009 at 22:19.
coolyihao is offline   Reply With Quote

Old   March 26, 2009, 06:19
Default
  #2
Senior Member
 
Rami Ben-Zvi
Join Date: Mar 2009
Posts: 147
Rep Power: 8
Rami is on a distinguished road
There is a detailed example of a parabolic velocity profile in the UDF manual (chapter 8). Once you learn how to do it, the pressure BCs would be easy to add.
Rami is offline   Reply With Quote

Old   March 26, 2009, 06:49
Default
  #3
New Member
 
oscar
Join Date: Mar 2009
Posts: 7
Rep Power: 8
coolyihao is on a distinguished road
ya..i saw it be4..but then i got the result that doesnt make sense..for example: i put X=0 , Y=1, Z=0..inside the grapgh, ya i get the parabolic shape which is 'u' shape..OR is it suppose a 'n' shape.

But for the pressure difference is it necessary use this function?F_CENTROID(x,f,thread)

regards
coolyihao is offline   Reply With Quote

Old   March 28, 2009, 21:12
Default
  #4
New Member
 
Andrew Slezak
Join Date: Mar 2009
Posts: 1
Rep Power: 0
Drew is on a distinguished road
yes, probably. f_centroid will return the position vector of the cell in 'x'. The solver should produce the pressure profile throughout your domain given appropriate initial and boundary conditions.
Drew is offline   Reply With Quote

Old   April 1, 2009, 02:07
Default
  #5
Member
 
Buddy
Join Date: Mar 2009
Location: P.R.C.
Posts: 30
Rep Power: 8
zjbwow is on a distinguished road
Quote:
Originally Posted by Drew View Post
yes, probably. f_centroid will return the position vector of the cell in 'x'. The solver should produce the pressure profile throughout your domain given appropriate initial and boundary conditions.
there are two kinds of parallel functions such as begin _c_loop and begin_f_loop, can you tell me the differents bwteen face and cell?

and if the using of the cell will return the vector of it,what will return if we use face instead? O(∩_∩)O~

thx in advance
zjbwow is offline   Reply With Quote

Reply

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
Fluent UDF in CFX CFX User CFX 6 October 22, 2008 17:21
developing FLUENT UDF programs by VC++ 6.0 IDE huang peng FLUENT 2 February 25, 2007 15:58
Parallel UDF data passing causes Fluent to hang Tom FLUENT 2 June 9, 2006 13:17
Trying to Write pitch and Plunge UDF Alex FLUENT 0 March 18, 2006 17:14
How to write UDF for pitching&plunging airfoil? Alex FLUENT 0 March 17, 2006 13:37


All times are GMT -4. The time now is 07:53.