Fluent data structure and geometry
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; } } |
Re: Fluent data structure and geometry
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 |
Re: Fluent data structure and geometry
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 |
All times are GMT -4. The time now is 17:08. |