|
[Sponsors] |
January 14, 2004, 07:56 |
setting diffusivity in different domains
|
#1 |
Guest
Posts: n/a
|
I am trying to set the diffusivity in a part of a flow domain. How do I identify on of the flows given the Boundary ID for example. say I have two volumes, flow1 and flow2, that are conncect and I wish to set the diffusivity diffently in each flow diffenetly. I can read the boundray ID for flow1 and flow2 from the fluent boundry panel and the thread pointer is passed in the udf. I am struggling to work out how to compare these. The psudo udf would look like this:
DEFINE_DIFFUSIVITY(name, c, t, i) { if (thread is in flow1) {return (value1);} if (thread is in flow2) {return (value2) } |
|
January 14, 2004, 09:35 |
Re: setting diffusivity in different domains
|
#2 |
Guest
Posts: n/a
|
My understanding is that diffusivity is a material property. Why would you want to set a different value in different parts of the domain?
DAE |
|
January 14, 2004, 10:23 |
Re: setting diffusivity in different domains
|
#3 |
Guest
Posts: n/a
|
Thanks, but that dosent answer my question. To answer yours, material properties can vary. For example, vicosity changes with temperature. My material property could change when, say, entering a magnetic or electrical field.
|
|
January 14, 2004, 10:42 |
Re: setting diffusivity in different domains
|
#4 |
Guest
Posts: n/a
|
Does this help?
/****************************************/ /* UDF that computes diffusivity */ /****************************************/ #include "udf.h" DEFINE_DIFFUSIVITY(diffusivity, c, ct, i) { Domain *domain = Get_Domain(1); Thread *ct1 = Lookup_Thread(domain,90); /* Declare ct1 as a pointer to a cell thread */ Thread *ct2 = Lookup_Thread(domain,91); /* Declare ct2 as a pointer to a cell thread */ begin_c_loop(c,ct1) { return ***************** } end_c_loop(c,ct1) begin_c_loop(c,ct2) { return ***************** } end_c_loop(c,ct2) } |
|
January 14, 2004, 10:45 |
Re: setting diffusivity in different domains
|
#5 |
Guest
Posts: n/a
|
you want to identify the zones locally (which is flow1 and which is 2?) is it that what causes your problem?
If yes, the easiest way is to create a surface zone of your fluid-zone, i.e. the boundary of the zone will form a new surface-zone which can be displayed by the display-grid panel. Creating a zone is done by the /Surface/Zone menu. Volker |
|
January 17, 2004, 09:12 |
Re: setting diffusivity in different domains
|
#6 |
Guest
Posts: n/a
|
Thankyou for your comments. DAE: Your solution to the problem is a nice one, however, the problem is that in the UDF manual, it says:
"Note that diffusivity UDFs are called by FLUENT from within a loop on cell threads. Consequently, your UDF will not need to loop over cells in a thread since FLUENT is doing it outside of the function call." So I believe that I cannot runn a cell loop in the UDF. Volker: I really need to identify my fluid zones within a UDF. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
What is UDS diffusivity of a self-defined material? | aleisia | FLUENT | 0 | March 5, 2011 22:08 |
Cells with t below lower limit | Purushothama | Siemens | 2 | May 31, 2010 21:58 |
Multiple domains - buoy. ref. temp. setting | Forrest | CFX | 8 | February 22, 2006 13:43 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 04:41 |
setting uds diffusivity | Andrew Garrard | FLUENT | 1 | January 15, 2004 05:44 |