CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

Fluent data structure and geometry

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

Reply
 
LinkBack Thread Tools Display Modes
Old   April 21, 2003, 10:18
Default Fluent data structure and geometry
  #1
Steven
Guest
 
Posts: n/a
Hi, All,

Sometimes, I felt myself really by those data types like cell,face,thread,domain,etc when writing UDFs. I do not think Fluent UDF manual gives sufficient information and guide on this topic.

For example, I would like to apply 3 different values for the diffusivity over 3 different zones. I got a kind help for Murali, and I wrote the attached code based on his suggestion. However, this code gives me problem, it cannot go over all the regions and distribute values respectively. It just gave me the same value for all the three zones.

Anyone can help me out? Also, is there any source that I can get some more information on how to conduct the calculation or define properties over zones,faces,cells? The manual looks very simple and not systematic on this.

Thanks in advance.

DEFINE_DIFFUSIVITY(my_diff,c,t,i) {

int zone_id;

Thread *c_thread;

Domain *dom;

real D;

Get_Domain(dom); /*Obtain the zone id of the face*/

for (i=2;i<=4;i++)

{

if (c_thread==Lookup_Thread(dom,i))

{

zone_id=i;

}

switch (zone_id)

{

case 2:

D=2;

break;

case 3:

D=3;

break;

case 4:

D=4;

break;

}

return D;

} }
  Reply With Quote

Old   April 21, 2003, 13:43
Default Re: Fluent data structure and geometry
  #2
Alex Munoz
Guest
 
Posts: n/a
Hi

Careful

In fluent you must to use "." for real number example

you write D=3;

you must write D=3.0; or D=3.;

The other problems you must to write several examples to understand how to write a good UDF

Best regards

Alex
  Reply With Quote

Old   April 22, 2003, 11:25
Default Re: Fluent data structure and geometry
  #3
Steven
Guest
 
Posts: n/a
Thanks, Alex. I just wanted to give a simple example, but made a mistake there. Actually, I have some experience with Fluent UDF, but I think the manual does not give sufficient guide in applying different properties or math equations to different regions. Any hint on this. Thank you.

Steven
  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
Mapping of plot3d data to OpenFOAM case Fransje OpenFOAM 2 January 23, 2014 01:13
Generic case structure for iterative design process capucsc OpenFOAM 4 May 6, 2011 11:26
structured and unstructured grids user Main CFD Forum 6 November 25, 2010 02:14
Modelling deforming inflatable geometry in Fluent Mark FLUENT 2 October 4, 2006 05:36
Fluent for turbulence modeling Sujit FLUENT 2 August 18, 2003 17:17


All times are GMT -4. The time now is 15:17.