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

Temperature calcul in UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 7, 2008, 04:27
Default Temperature calcul in UDF
  #1
DEPRET
Guest
 
Posts: n/a
Hi,

I am using a VOF model and I would like to know the average temperature of each phases. My problem is that I can't acces to one phase. My calcul is all over my volume. How can I proceed ?

I have tried this udf :

#include "udf.h"

DEFINE_EXECUTE_AT_END(calcul_temp) { Domain *d; real tavg = 0.; real volume,vol_tot,temp; Thread *t; cell_t;

d = Get_Domain(3) /* Phase Id I want is 3 */

thread_loop_c(t,d) { begin_c_loop(c,t)

{

volume=C_VOLUME(c,t);

temp=C_T(c,t);

vol_tot+=volume;

tavg+=temp*volume;

} end_c_loop(c,t) } tavg=tavg/vol_tot

printf("\n Temp = %g\n",tavg);

}

Thanks !!!

  Reply With Quote

Old   May 7, 2008, 04:34
Default Re: Temperature calcul in UDF
  #2
bohis
Guest
 
Posts: n/a
you could use if-statement with density. Check 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
static temperature more than total temperature ?? mahesh FLUENT 4 May 18, 2016 06:09
How can i calcul the moment Lavastre jeremie FLUENT 0 September 11, 2007 06:20
inlet temperature = outlet temperature Thierry FLUENT 4 March 17, 2006 10:14
Radiation temperature and Mean radiant temperature Arnold FLUENT 0 March 16, 2006 05:35
Phase difference Calcul. ? pratap Main CFD Forum 2 September 30, 2003 12:19


All times are GMT -4. The time now is 10:14.