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

How to let Fluent recognize diffrent faces

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 1, 2003, 16:35
Default How to let Fluent recognize diffrent faces
  #1
Steven
Guest
 
Posts: n/a
I am trying to implement a user defined scalar with UDF. There are three regions with different properties in my mesh, and therefore, there will be three different diffusivities for the mass transfer in these three regions. I could not figure out what macros to be used for this purpose, and how to let Fluent recognize the zones in my mesh. The structure could be something like this:

If region==1 diffusivity=value1; else if region==2 diffusivity=value2; else diffusivity=value3;

My questions are:

What macros to be used? Are threads used by UDF to represent different regions in my mesh? What will be the names of the threads? The names of faces in my mesh? Can somebody give me some ideas or hints? I will really appreciate it.

Steven
  Reply With Quote

Old   March 2, 2003, 21:34
Default Re: How to let Fluent recognize diffrent faces
  #2
Murali
Guest
 
Posts: n/a
<font face = "courier new">After you have imported the mesh into fluent and come to the juncture of specifying boundary conditions, you will find in the boundary conditions panel that you have a zone_id for every region. This number in unchangeable and is assigned internally by FLUENT. This is the number you need to use through "hardcoding" in UDFs. The way to do is to us the Macro Lookup_thread(zone_id). Refer to 6.5.7 of UDF manual.

The diffusivity can be specified by DEFINE_DIFFUSIVITY macro. Suppose I have zone-ids ranging from 3 to 11. First I obtain the domain number, and the cell and thread info are passed into the macro as arguements. I obtain the *thread pointer from the zone-id. If this *thread is equal to the cell thread that is passed, then the corresponding zone-id is the region where the cell belongs. Once I know in which region or zone-id the cell resides, I would know how to assign the value of diffusivity. See the example:



DEFINE_DIFFUSIVITY(my_diff,c,t,i)
{

int zone_id,i;
Thread *c_thread;
Domain dom;
real diff;

Get_domain(dom);

//Obtain the zone-id of the cell

for (i = 3; i < 11; i++)

{

if (c_thread == Lookup_Thread(dom,i))
{
zone_id = i;
}

}

//Assign values of diffusivity accordingly

switch (zone_id)

{

case 3:

diff = value1;
break;

case 4:

diff = value2;
break;

..
..
.

}

return diff;

}


</font>
  Reply With Quote

Old   March 5, 2003, 10:03
Default Re: How to let Fluent recognize diffrent faces
  #3
Steven
Guest
 
Posts: n/a
Thanks a lot, Murali. I'm working on it.
  Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shadow Faces in Fluent Kjt FLUENT 6 November 12, 2019 07:45
[snappyHexMesh] SnappyHexMesh for internal Flow vishwa OpenFOAM Meshing & Mesh Conversion 24 June 27, 2016 08:54
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Meshing & Mesh Conversion 2 March 27, 2011 21:11
.msh file cann't be by Fluent nchuche FLUENT 1 June 29, 2010 10:38
[snappyHexMesh] external flow with snappyHexMesh chelvistero OpenFOAM Meshing & Mesh Conversion 11 January 15, 2010 19:43


All times are GMT -4. The time now is 07:28.