|
[Sponsors] |
June 21, 2016, 06:00 |
Obtaining Secondary Phase Average Temerature
|
#1 |
New Member
Nasser
Join Date: Mar 2014
Posts: 7
Rep Power: 12 |
High friends,
I need to calculate Secondary Phase average temperature using a UDF in my multiphase problem. There are two phases here as water-liquid and air; I wrote the following UDF to calculate and show the variable at the end of every time-step; as shown there is a Get_Domain argument at written UDF. But no matter of what number I write between the parantheses of Get_Domain, shown temperature dosn't change and I think it shows the mixture average temp every time. How can I get the seconadry phase avergae temperature. Regards, #include "udf.h" DEFINE_EXECUTE_AT_END(execute_at_end) { real sumtemp = 0; real sumvolume = 0; real twater; Domain *d; Thread *t; cell_t c; d = Get_Domain(2); thread_loop_c (t,d) { /* loop over all cells in secondary phase cell threads */ begin_c_loop (c,t) { sumtemp1 += C_T(c,t) * C_VOLUME(c,t); sumvolume1 += C_VOLUME(c,t); } end_c_loop (c,t) } twater = sumtemp / sumvolume; printf("temp is: %g\n", twater); } |
|
Tags |
fluent - udf, multi-phase flow, udf, udf code |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Floating point exception error | Alan | OpenFOAM Running, Solving & CFD | 11 | July 1, 2021 22:51 |
How to obtain turbulent kinetic energy data from LES model of Ansys CFX? | rsin | CFX | 19 | December 29, 2018 05:43 |
multi phase flow with chemical reactions in one phase | Habibfateh | OpenFOAM Programming & Development | 0 | February 10, 2014 08:33 |
compressible two phase flow in CFX4.4 | youngan | CFX | 0 | July 2, 2003 00:32 |
secondary phase velocity with ASMM ???? | fawzy | FLUENT | 4 | November 19, 2001 12:40 |