|
[Sponsors] |
April 21, 2003, 10: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; } } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mapping of plot3d data to OpenFOAM case | Fransje | OpenFOAM | 2 | January 23, 2014 00: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 01: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 |