CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   Species mass fraction (https://www.cfd-online.com/Forums/fluent-udf/215481-species-mass-fraction.html)

aminhgn March 6, 2019 11:17

Species mass fraction
 
Hi,

I am trying to simulate the falling film flow. I have water and humid air. I want to define a constant value for the mass fraction of water vapor in air at the interface. I wrote the UDF based on Define_adjust. But every time I try to run it I got an error. Can you help me with it?
#include "udf.h"
#include "sg_mphase.h"

DEFINE_ADJUST(vol_frac, domain)
{

Thread *t;

cell_t c;
double Y_h2o;
Y_h2o = 0.02;
begin_c_loop(c,t)

{

if(C_VOF(c,t)>0. && C_VOF(c,t)<1.)

C_UDSI(c,t,0)=Y_h2o;

}

end_c_loop(c,t);

}


All times are GMT -4. The time now is 13:23.