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

setting diffusivity in different domains

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 14, 2004, 08:56
Default setting diffusivity in different domains
  #1
Andrew Garrard
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)

}
  Reply With Quote

Old   January 14, 2004, 10:35
Default Re: setting diffusivity in different domains
  #2
DAE
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
  Reply With Quote

Old   January 14, 2004, 11:23
Default Re: setting diffusivity in different domains
  #3
Andrew Garrard
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.
  Reply With Quote

Old   January 14, 2004, 11:42
Default Re: setting diffusivity in different domains
  #4
DAE
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)

}
  Reply With Quote

Old   January 14, 2004, 11:45
Default Re: setting diffusivity in different domains
  #5
Volker Pawlik
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
  Reply With Quote

Old   January 17, 2004, 10:12
Default Re: setting diffusivity in different domains
  #6
Andrew Garrard
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.
  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
What is UDS diffusivity of a self-defined material? aleisia FLUENT 0 March 5, 2011 23:08
Cells with t below lower limit Purushothama CD-adapco 2 May 31, 2010 21:58
Multiple domains - buoy. ref. temp. setting Forrest CFX 8 February 22, 2006 14:43
Warning 097- AB CD-adapco 6 November 15, 2004 05:41
setting uds diffusivity Andrew Garrard FLUENT 1 January 15, 2004 06:44


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