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

Obtaining Secondary Phase Average Temerature

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 21, 2016, 05:00
Default Obtaining Secondary Phase Average Temerature
  #1
New Member
 
Nasser
Join Date: Mar 2014
Posts: 7
Rep Power: 12
nasergasembagloo is on a distinguished road
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);
}
nasergasembagloo is offline   Reply With Quote

Reply

Tags
fluent - udf, multi-phase flow, udf, udf code


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
Floating point exception error Alan OpenFOAM Running, Solving & CFD 11 July 1, 2021 21:51
How to obtain turbulent kinetic energy data from LES model of Ansys CFX? rsin CFX 19 December 29, 2018 04:43
multi phase flow with chemical reactions in one phase Habibfateh OpenFOAM Programming & Development 0 February 10, 2014 07:33
compressible two phase flow in CFX4.4 youngan CFX 0 July 1, 2003 23:32
secondary phase velocity with ASMM ???? fawzy FLUENT 4 November 19, 2001 11:40


All times are GMT -4. The time now is 18:28.