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

Using C_VOF to compute saturation temperature

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By pakk
  • 1 Post By annan

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   February 26, 2019, 22:30
Default Using C_VOF to compute saturation temperature
  #1
New Member
 
Alexandre Coulombe
Join Date: Feb 2019
Posts: 7
Rep Power: 7
alex2293 is on a distinguished road
Hello everyone,

I want to simulate humid air condensing on a cold surface. I'm using the VOF multiphase model with Lee condensation-evaporation model.

I'm trying to write my first UDF to define the saturation temperature of humid air in the Lee model based on the C_VOF of water vapor, the water vapor density, the C_VOF of air, the air density and the temperature.

I tried to follow this thread: UDF for volume fraction

#include "udf.h"
#define rho_water_vapor 0.59;
#define rho_air 1.2;
#define mix_pressure 101325;
DEFINE_PROPERTY(saturation_temperature,c,t)
{
real sat_temp;
real partial_vapor_pressure;
cell_t cell;
Thread **pt;
Thread *cell_threads;
Domain *mixture_domain;
{
mp_thread_loop_c(t, mixture_domain, pt)
{
begin_c_loop(cell,pt)
{
real temp = C_T(cell,pt[0]);
real VOF_air = C_VOF(cell,pt[2]);
real VOF_water_vapor = C_VOF(cell,pt[2])
w = (VOF_water_vapor*rho_water_vapor)/(VOF_air*rho_air);
sat_temp = w*0.008-0.14;
}
end_c_loop(cell,pt)
}
return sat_temp;
}
}

I'm getting parse error on line 21. I think that the domain 1 is the mixture level, 1 is the air phase and 2 is the water vapor phase. However I'm not sure how to use mp_thread_loop_c and C_VOF.

Do you have any tips for me?

Alex
alex2293 is offline   Reply With Quote

 


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
Ansys CFX problem: unexpected very high temperatures in premix laminar combustion faizan_habib7 CFX 4 February 1, 2016 17:00
Plotting Saturation Temperature Jannssen CFX 4 January 27, 2016 16:04
unexpected constant Temperature on a clip surface Sungki OpenFOAM Running, Solving & CFD 0 August 4, 2015 04:50
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
Bulk temperature Tf is obtained from total or static temperature? NPU_conanxie FLUENT 0 March 30, 2011 05:56


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