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

material name of emissivity for a face thread

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 3, 2003, 03: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, 04: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, 04: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, 04: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, 04: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, 07: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, 13: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


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
[Netgen] Import netgen mesh to OpenFOAM hsieh OpenFOAM Meshing & Mesh Conversion 32 September 13, 2011 06:50
Constant velocity of the material Sas CFX 15 July 13, 2010 09:56
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 08:36
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 15:00


All times are GMT -4. The time now is 08:20.