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

material name of emissivity for a face thread

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 3, 2003, 02:24
Default material name of emissivity for a face thread
  #1
Nici
Guest
 
Posts: n/a
Hello everybody and greetings from cold Finland

I would appricate if someone could help me to access either the material name or the emissivity of a wall thread within a UDF. Other solutions to distinguish beteween different wall boundaries are also welcome.

thank you in advance

Nici
  Reply With Quote

Old   September 3, 2003, 03:45
Default Re: material name of emissivity for a face thread
  #2
Greg Perkins
Guest
 
Posts: n/a
below find some code I use to distinguish whether a thread is in a list of thread ids. It may not be super efficient but it works OK. Pass in an array of integers which have the ids - same as IDs in the boundary condition panel within the GUI. If the *thread is one of these then it returns the id else it returns NOT_WALL which you can define however.

For FLUENT 6 make sure you #define FLUENT_6 or if you only use 6.x remove the conditional compile from these lines.

Hope this is something like what you need.

Greg

/* ---------------------------------------------------------------------------

IS THREAD

-------------------------------------------------------------------------- */ int is_thread_cm(Thread *thread, int no_threads, int thread_list[]) { #ifdef FLUENT_6 Domain *domain = Get_Domain(1); #endif

int i=0;

while ((i<no_threads) && (Lookup_Thread(domain,thread_list[i])!=thread)) i++;

if (Lookup_Thread(domain,thread_list[i])==thread)

return i;

else

return NOT_WALL; }
  Reply With Quote

Old   September 3, 2003, 03:46
Default Re: material name of emissivity for a face thread
  #3
Greg Perkins
Guest
 
Posts: n/a
/* ---------------------------------------------------------------------------

IS THREAD

-------------------------------------------------------------------------- */ int is_thread_cm(Thread *thread, int no_threads, int thread_list[]) { #ifdef FLUENT_6 Domain *domain = Get_Domain(1); #endif

int i=0;

while ((i<no_threads)&&(Lookup_Thread(domain,thread_list[i])!=thread)) i++;

if (Lookup_Thread(domain,thread_list[i])==thread)

return i;

else

return NOT_WALL; }
  Reply With Quote

Old   September 3, 2003, 03:47
Default Re: material name of emissivity for a face thread
  #4
Greg Perkins
Guest
 
Posts: n/a
/* ---------------------------------------------------------------------------

IS THREAD

-------------------------------------------------------------------------- */ int is_thread_cm(Thread *thread, int no_threads, int thread_list[]) { #ifdef FLUENT_6 Domain *domain = Get_Domain(1); #endif

int i=0;

while ((i_<_no_threads)&&(Lookup_Thread(domain,thread_li st[i])!=thread)) i++;

if (Lookup_Thread(domain,thread_list[i])==thread)

return i;

else

return NOT_WALL; }
  Reply With Quote

Old   September 3, 2003, 03:48
Default Re: material name of emissivity for a face thread
  #5
Greg Perkins
Guest
 
Posts: n/a
Sorry had some trouble posting....this last one is the right code except in the while it should be while i lessthan no_threads (in C of course)
  Reply With Quote

Old   September 3, 2003, 06:02
Default Re: material name of emissivity for a face thread
  #6
Nici
Guest
 
Posts: n/a
Hej Greg,

I solved the problem on my own even though it took a while! I found in the src.h macro appropriate for my purpouse

if (strcmp( THREAD_MATERIAL(f_t), char_bed) == 0)

where char_bed is defined as

char *char_bed = "ash"

All the other walls are steel so now I can distinguish between the char bed "wall" and steel "wall"!

Thank you again for your interest,

cheers Nici
  Reply With Quote

Old   September 3, 2003, 12:21
Default how to add the second gradient of UDS
  #7
zhou
Guest
 
Posts: n/a
Hi,everybody How to add the second gradient of UDS(user defined scalar) into species equation as source terms. Thanks. I only find the macro in fluent to calculate the first gradient. By the way, is there any way to get the arrangment or distribution of cells in fluent? Thanks.
  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
Import netgen mesh to OpenFOAM hsieh Open Source Meshers: Gmsh, Netgen, CGNS, ... 32 September 13, 2011 05:50
Constant velocity of the material Sas CFX 15 July 13, 2010 08:56
BlockMeshmergePatchPairs hjasak OpenFOAM Native Meshers: blockMesh 11 August 15, 2008 07:36
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00


All times are GMT -4. The time now is 13:22.