|
[Sponsors] |
April 21, 2003, 11:18 |
Fluent data structure and geometry
|
#1 |
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; } } |
|
April 21, 2003, 14:43 |
Re: Fluent data structure and geometry
|
#2 |
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 |
|
April 22, 2003, 12:25 |
Re: Fluent data structure and geometry
|
#3 |
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 |
|
|
|
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 12: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 06:36 |
Fluent for turbulence modeling | Sujit | FLUENT | 2 | August 18, 2003 18:17 |