CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   UDF: wick-vapor interface (https://www.cfd-online.com/Forums/fluent/227879-udf-wick-vapor-interface.html)

arunraj June 13, 2020 03:36

UDF: wick-vapor interface
 
Can such a UDF help me to apply source term only on the interior face ? I really believe someone can provide some idea. Thank you.

#include "udf.h"

DEFINE_SOURCE(mass_flux,c,t,dS,eqn)
{
real x[ND_ND];
real source = 0.;

C_CENTROID(x,c,t);
dS[eqn] = 0.; // derivative of source term

{
if (x[O] >= 0 && x[1] <= 0.6 && x[1] = 0.00865) // evaporation section: only if this cell belongs in the domain where 0 < x > 0.6 m and y = 0.00865
{
source = -0.13305902;
}
elseif ((0.69 < x[1] && x[1] < 0.89) && (x[1] = 0.00865)) // condenseor section: only if this cell belongs in the domain where 0 < x > 0.6 m and y = 0.00865
{
source = 0.13305902;
}
else
{
source = 0;
}
}
}


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