# Looping in UDF

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

 October 22, 2012, 05:46 Looping in UDF #1 New Member   Join Date: Aug 2012 Posts: 4 Rep Power: 5 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....

October 22, 2012, 12:20
#2
Senior Member

Syavash
Join Date: Apr 2010
Location: Tehran, Karaj
Posts: 241
Rep Power: 8
Quote:
 Originally Posted by sg24589 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.

 November 30, 2012, 02:58 #3 New Member   Join Date: Aug 2012 Posts: 4 Rep Power: 5 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....

December 1, 2012, 01:03
#4
Senior Member

Syavash
Join Date: Apr 2010
Location: Tehran, Karaj
Posts: 241
Rep Power: 8
Quote:
 Originally Posted by sg24589 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.

 December 3, 2012, 01:45 #5 New Member   Join Date: Aug 2012 Posts: 4 Rep Power: 5 Thanks a lot I understood the answer too.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post shankara.2 Fluent UDF and Scheme Programming 0 November 10, 2009 18:11 ak6g08 Fluent UDF and Scheme Programming 0 September 10, 2009 10:13 safa FLUENT 0 December 11, 2007 09:07 Manoj FLUENT 2 December 1, 2005 01:30 Malcolm Wallace FLUENT 3 July 3, 2000 09:22

All times are GMT -4. The time now is 12:48.