|
[Sponsors] |
May 7, 2008, 05:27 |
Temperature calcul in UDF
|
#1 |
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 !!! |
|
May 7, 2008, 05:34 |
Re: Temperature calcul in UDF
|
#2 |
Guest
Posts: n/a
|
you could use if-statement with density. Check it
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
static temperature more than total temperature ?? | mahesh | FLUENT | 4 | May 18, 2016 07:09 |
How can i calcul the moment | Lavastre jeremie | FLUENT | 0 | September 11, 2007 07:20 |
inlet temperature = outlet temperature | Thierry | FLUENT | 4 | March 17, 2006 11:14 |
Radiation temperature and Mean radiant temperature | Arnold | FLUENT | 0 | March 16, 2006 06:35 |
Phase difference Calcul. ? | pratap | Main CFD Forum | 2 | September 30, 2003 13:19 |