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/)
-   -   Smearing of Mass Transfer(condensation)using UDS over interface. (https://www.cfd-online.com/Forums/fluent-udf/172056-smearing-mass-transfer-condensation-using-uds-over-interface.html)

RAJ KIRAN May 23, 2016 11:19

Smearing of Mass Transfer(condensation)using UDS over interface.
 
2 Attachment(s)
Hej,

I am working on phase change problem (condensation). I wrote UDF's for calculation of source terms. I want to smear mass transfer near the interface using a Diffusion equation and then pass the smeared values as source terms to the equations. I am solving the diffusion equation using UDS and passing mass transfer as source term to UDS.
Below is the diffusion equation which I am solving,

D*del2(phi)= S
here,
D is diffusion coefficient, phi is scalar variable and S is source term,

I am passing source term using Define_source UDF,

DEFINE_SOURCE(UDS_src,c,t,dS,eqn) /*smearing source udf*/
{
real UDS_source;
UDS_source = 0.0;
UDS_source = C_UDMI(c,t,1)-C_UDSI_M1(c,t,0) ;
dS[eqn] = 0.0;
return (UDS_source);
}

In the above UDF C_UDMI(c,t,1) is the mass transfer term which is calculated in a different UDF. Diffusion coefficient D is passed using below UDF.

#include "udf.h"
DEFINE_DIFFUSIVITY(mean_age_diff,c,t,i)
{
return 0.0000001;
}

What I was expecting was a smeared mass transfer over few cells close to the interface , since mass transfer is calculated only at the interface. but I am not getting the expected result. I am not sure where I am going wrong. I would really appreciate if someone can point out where I am going wrong.

regards,
Rajukiran.

PS: I am also attaching pic of scalar value of phi and interface where source terms are added.

RAJ KIRAN May 24, 2016 08:19

Hej,

I tried a simple case, where I tried solving a steady diffusion equation using UDS. I switched off inlet Diffusion, Flux and unsteady function in the UDS. I used Neumann boundary conditions over the domain. I gave a constant source term through UDF only at the interface. I was expecting that the given source term to smear over the interface. But I got something similar to previous case. I would really appreciate if someone can answer this.

Thanks in advance :)

Regards,
Rajkiran


All times are GMT -4. The time now is 02:42.