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

Help me to solve this problem !!!

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 22, 2002, 12:45
Default Help me to solve this problem !!!
  #1
kevin -Chang
Guest
 
Posts: n/a
Today , i have a very thorny problem . My model has a parameter was used to predict the binary diffusion coefficient (Dij) at species transport equation . For example Dij = 3.64*e-8* T**2.334*(Pci*Pcj)**0.416*(Tci*Tcj)**-0.48625 {Pci---critical pressure of species i Pcj---critical pressure of species j Tci---critical temperature of species i Tcj---critical temperature of species j } In my model ,five species was be existed indie the model . H2,O2,H2O,CO2,N2 i want to solve the Dij from above equation . so. i also wrote a program of UDF by visual C++ Unfortunately , this program is wrong in FLUENT . Who can assist to modify this thorny program....??? Best regrad to you

Kevin-Chang

DEFINE_PROPERTY(Binary_diffusion,cell,thread) { int i,j; real Dij; if(i==0. || j==1.) { C_DIFF_L(cell,thread,0,1)=3.64e-8*pow(C_T(cell,thread),2.334)*pow((Pc0*Pc1),1/3)*pow((Tc0*Tc1),-0.48625)*((1/M0+1/M1),1/2); /*Laminar species diffusivity */ Dij=C_DIFF_L(cell,thread,0,1); } else if(i==0. || j==2.) { C_DIFF_L(cell,thread,0,2)=3.64e-8*pow(C_T(cell,thread),2.334)*pow((Pc0*Pc2),1/3)*pow((Tc0*Tc2),-0.48625)*((1/M0+1/M2),1/2); /*Laminar species diffusivity */ Dij=C_DIFF_L(cell,thread,0,2); } else if(i==0. || j==3.) { C_DIFF_L(cell,thread,0,3)=3.64e-8*pow(C_T(cell,thread),2.334)*pow((Pc0*Pc3),1/3)*pow((Tc0*Tc3),-0.48625)*((1/M0+1/M3),1/2); /*Laminar species diffusivity */ Dij=C_DIFF_L(cell,thread,0,3); } else if(i==0. || j==4.) { C_DIFF_L(cell,thread,0,4)=3.64e-8*pow(C_T(cell,thread),2.334)*pow((Pc0*Pc4),1/3)*pow((Tc0*Tc4),-0.48625)*((1/M0+1/M4),1/2); /*Laminar species diffusivity */ Dij=C_DIFF_L(cell,thread,0,4); } else { C_DIFF_L(cell,thread,1,2)=3.64e-8*pow(C_T(cell,thread),2.334)*pow((Pc1*Pc2),1/3)*pow((Tc1*Tc2),-0.48625)*((1/M1+1/M2),1/2); /*Laminar species diffusivity */ Dij=C_DIFF_L(cell,thread,1,2); } return Dij;

}

  Reply With Quote

Old   November 22, 2002, 12:56
Default Re: Help me to solve this problem !!!
  #2
kevin -Chang
Guest
 
Posts: n/a
Today , i have a very thorny problem .

My model has a parameter was used to predict the binary diffusion coefficient (Dij) at species transport equation .

For example Dij = 3.64*e-8* T^2.334*(Pci*Pcj)^0.3333*(Tci*Tcj)^-0.48625*(1/Mi+1/Mj)^0.5

{Pci---critical pressure of species i Pcj---critical pressure of species j Tci---critical temperature of species i Tcj---critical temperature of species j }

In my model ,five species was be existed indie the model . H2,O2,H2O,CO2,N2

i want to solve the Dij from above equation . so. i also wrote a program of UDF by visual C++

Unfortunately , this program is wrong in FLUENT . Who can assist to modify this thorny program ??

Best regrad to you

Kevin-Chang

DEFINE_PROPERTY(Binary_diffusion,cell,thread)

{ int i,j;

real Dij;

if(i==0. || j==1.)

{C_DIFF_L(cell,thread,0,1)=3.64e-8*pow(C_T(cell,thread),2.334)*pow((Pc0*Pc1),1/3)*pow((Tc0*Tc1),-0.48625)*((1/M0+1/M1),1/2); /*Laminar species diffusivity */

Dij=C_DIFF_L(cell,thread,0,1); }

else if(i==0. || j==2.)

{C_DIFF_L(cell,thread,0,2)=3.64e-8*pow(C_T(cell,thread),2.334)*pow((Pc0*Pc2),1/3)*pow((Tc0*Tc2),-0.48625)*((1/M0+1/M2),1/2); /*Laminar species diffusivity */

Dij=C_DIFF_L(cell,thread,0,2); }

else if(i==0. || j==3.)

{C_DIFF_L(cell,thread,0,3)=3.64e-8*pow(C_T(cell,thread),2.334)*pow((Pc0*Pc3),1/3)*pow((Tc0*Tc3),-0.48625)*((1/M0+1/M3),1/2); /*Laminar species diffusivity */

Dij=C_DIFF_L(cell,thread,0,3); }

else if(i==0. || j==4.)

{C_DIFF_L(cell,thread,0,4)=3.64e-8*pow(C_T(cell,thread),2.334)*pow((Pc0*Pc4),1/3)*pow((Tc0*Tc4),-0.48625)*((1/M0+1/M4),1/2); /*Laminar species diffusivity */

Dij=C_DIFF_L(cell,thread,0,4); }

else

{C_DIFF_L(cell,thread,1,2)=3.64e-8*pow(C_T(cell,thread),2.334)*pow((Pc1*Pc2),1/3)*pow((Tc1*Tc2),-0.48625)*((1/M1+1/M2),1/2); /*Laminar species diffusivity */ Dij=C_DIFF_L(cell,thread,1,2); }

return Dij; }

  Reply With Quote

Old   November 23, 2002, 14:35
Default Re: Help me to solve this problem !!!
  #3
ravi varma
Guest
 
Posts: n/a
why are you defining the diffusion equation 5 for each species? you could use a for loop statement: for (i=1, i<=n, i++)
  Reply With Quote

Old   November 24, 2002, 01:43
Default Re: Help me to solve this problem !!!
  #4
mahdi saniee nezhad
Guest
 
Posts: n/a
Dear sir I have a problem with this title. If it's possible for you please send me your received responses. Very thanks for your attention to my request. With the best regards. Mahdi saniee nezhad

  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
how to solve a problem involving both laminar and turbulent flow seefd FLUENT 1 June 3, 2011 04:20
Could CFX solve hydraulic jump problem? Andy Chen CFX 0 August 18, 2009 11:13
Someone use Icepak to solve microchannel problem ? Bernie FLUENT 1 October 31, 2006 15:29
Can CFX solve problem with structured mesh? Peted CFX 2 June 1, 2004 00:45
how to solve this problem in CFX5 calculation? cfxbeginer CFX 2 May 1, 2003 09:55


All times are GMT -4. The time now is 16:29.