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

Looping in UDF

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 22, 2012, 05:46
Question Looping in UDF
  #1
New Member
 
Join Date: Aug 2012
Posts: 4
Rep Power: 5
sg24589 is on a distinguished road
I am a starter in UDF. In a particular problem, I want to give an inlet velocity in a pipe using UDF. I am confused as to whether I should use looping over cells or looping over faces. What difference would it produce in results and why.....?
Plz help.....Thanks in advance....
sg24589 is offline   Reply With Quote

Old   October 22, 2012, 12:20
Default
  #2
Senior Member
 
Syavash
Join Date: Apr 2010
Location: Tehran, Karaj
Posts: 241
Rep Power: 8
syavash is on a distinguished road
Quote:
Originally Posted by sg24589 View Post
I am a starter in UDF. In a particular problem, I want to give an inlet velocity in a pipe using UDF. I am confused as to whether I should use looping over cells or looping over faces. What difference would it produce in results and why.....?
Plz help.....Thanks in advance....

You should loop over faces at inlet. Velocity is a Boundary condition. You must apply it to inlet faces not cells.
syavash is offline   Reply With Quote

Old   November 30, 2012, 02:58
Default
  #3
New Member
 
Join Date: Aug 2012
Posts: 4
Rep Power: 5
sg24589 is on a distinguished road
Thanks a lot for the reply.....
That's what is confusing me actually. It's a boundary condition, and I need to give it to the whole face. Is it that if I loop over faces, after the first iteration the values at each cell of a face will be calculated separately and stored which will be used for every subsequent calculation.
One more question - In sixdof udf solver in fluent, we have to mention moment of inertia, product of inertia among others. Is this mass moment of inertia or area moment of inertia. Also it is to be input about which point (center of gravity or geometric center).

Thank You....
sg24589 is offline   Reply With Quote

Old   December 1, 2012, 01:03
Default
  #4
Senior Member
 
Syavash
Join Date: Apr 2010
Location: Tehran, Karaj
Posts: 241
Rep Power: 8
syavash is on a distinguished road
Quote:
Originally Posted by sg24589 View Post
Thanks a lot for the reply.....
That's what is confusing me actually. It's a boundary condition, and I need to give it to the whole face. Is it that if I loop over faces, after the first iteration the values at each cell of a face will be calculated separately and stored which will be used for every subsequent calculation.
One more question - In sixdof udf solver in fluent, we have to mention moment of inertia, product of inertia among others. Is this mass moment of inertia or area moment of inertia. Also it is to be input about which point (center of gravity or geometric center).

Thank You....
1-
When you apply B.C. to certain faces of a boundary, Fluent needs to initialize the flow field by a initial condition, often the same value(s) of inlet B.C. considered. The values which you specified as B.C. is constant during the whole simulation for faces (unless you consider changing it with time in a transient case!). The first layer of cells adjacent to boundary faces are treated same as the interior cells and you don't need to specify anything to them.
2-
It refers to mass moment of inertia. The second part should be already clear! It's center of gravity.
Good luck.
syavash is offline   Reply With Quote

Old   December 3, 2012, 01:45
Default
  #5
New Member
 
Join Date: Aug 2012
Posts: 4
Rep Power: 5
sg24589 is on a distinguished road
Thanks a lot
I understood the answer too.
sg24589 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
Looping inside UDF and use of C_UDMs in DEFINE_DPM_BC shankara.2 Fluent UDF and Scheme Programming 0 November 10, 2009 18:11
looping UDF in given direction ak6g08 Fluent UDF and Scheme Programming 0 September 10, 2009 10:13
Looping in UDF!!! safa FLUENT 0 December 11, 2007 09:07
Looping over nodes of a cell (UDF) error Manoj FLUENT 2 December 1, 2005 01:30
UDF for looping over nodes in cells. Malcolm Wallace FLUENT 3 July 3, 2000 09:22


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