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

How to determine multicomponent diffusion using UDF

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 12, 2020, 02:37
Default How to determine multicomponent diffusion using UDF
  #1
New Member
 
Tamil Nadu
Join Date: Dec 2019
Posts: 11
Rep Power: 6
Sowmiya is on a distinguished road
Hi all,
i include 5 species in my reaction and i want to determine the multicomponent diffusion through UDF. Dij was calculated as shown

DEFINE_DIFFUSIVITY(diffusion_coef_crct,c,t,i)
{
Material *spi;
Material *spj;

int j;
real mmass_i,mmass_j,ttemp,Pressure=1e+05,aux=0.0,aux1= 0.0,aux2=0.0,aux3=0.0,spe_name;
ttemp=C_T(c,t);

{
mixture_species_loop(THREAD_MATERIAL(t),spi,i)
{
mixture_species_loop(THREAD_MATERIAL(t),spj,j)
{
if(i==0 && j==1) aux1 = collin_NplusN(ttemp);
else if(i==0 && j==2) aux1 =collin_NplusN2plus(ttemp);
else if(i==0 && j==3) aux1 =collin_NplusE(ttemp);
else if(i==0 && j==4) aux1 =collin_NplusN2(ttemp);
else if(i==1 && j==2) aux1 =collin_NN2plus(ttemp);
else if(i==1 && j==3) aux1 =collin_Ne(ttemp);
else if(i==1 && j==4) aux1 =collin_NN2(ttemp);
else if(i==2 && j==3) aux1 =collin_N2plusE(ttemp);
else if(i==2 && j==4) aux1 =collin_N2plusN2(ttemp);
else if(i==3 && j==4) aux1 =collin_EN2(ttemp);
else aux1= 1;
}
mmass_i=MATERIAL_PROP(spi,PROP_mwi);
aux2=1E-03*(mmass_i/(6.022E+23));
aux =((KB*ttemp)/Pressure)*(3/8)*pow((((M_PI*KB*ttemp)*(aux2+aux3))/(2*(aux2*aux3))),0.5)*(1/(M_PI*1E-20*aux1));
C_UDMI(c,t,1)=aux;

}
return aux;
}
while iterating i get the error to be "mass diffusivity is Zero " please check the material property .
please give me few suggestions to overcome the above issue.

or whether i have to include UDS diffusivity for solving each diffusion of species. For example-N2,N2+,N,N+,e are the species considered and Dij - i= N2 and j=N then i want to calculated diffusion of N2 into N similary N2 into N2plus and so on.

Kindly give me few suggestions to continue my work.

Last edited by Sowmiya; January 12, 2020 at 23:30.
Sowmiya is offline   Reply With Quote

Reply


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
UDF Compilation Error - Loading Library - COMMON Problem! Help! robtheslob Fluent UDF and Scheme Programming 8 July 24, 2015 00:53
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
Multicomponent fluid diffusion houwy OpenFOAM 0 April 14, 2014 08:37
mass diffusion vs temperature UDF alex FLUENT 0 March 5, 2008 11:38
UDF...UDF...UDF...UDF Luc SEMINEL FLUENT 0 November 25, 2002 04:03


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