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

Diffusion-coefficient based on mole fraction

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 9, 2006, 10:27
Default Diffusion-coefficient based on mole fraction
  #1
Fady
Guest
 
Posts: n/a
Hello,

i want to write an UDF that defines my diffusion coefficient dependend on the mole fraction. Because there is no mole fraction macro i have to calculate it by my own. So i used the Molecular-Weight of the Molecules and the Mass Fraction to calculate the mole fraction. But something is still going wrong, i get an error when i want to interrate my Diffusionmodel. The file gets compiled and everything. anyone got an idea? thanks for the help

#include "udf.h"

DEFINE_DIFFUSIVITY(diffcoef, c, t, i) {

double M_ETH = 88.11; // [kg/kmol]

double M_CYC = 84.16; // [kg/kmol] double mass; // [kg]

double n_ETH; // [kmol]

double n_CYC; // [kmol]

double n_frac_ETH; // [-]

mass = C_R(c,t) * C_VOLUME(c,t);

n_CYC = C_YI(c,t,2) * mass / M_CYC;

n_ETH = C_YI(c,t,1) * mass / M_ETH;

n_frac_ETH = n_ETH / (n_ETH + n_CYC);

return 0.0833*pow(10,-7) * pow(n_frac_ETH,4)

- 0.1625*pow(10,-7) * pow(n_frac_ETH,3)

+ 0.1367*pow(10,-7)* pow(n_frac_ETH,2)

- 0.0494*pow(10,-7) * n_frac_ETH

+ 0.0184*pow(10,-7);

}

  Reply With Quote

Old   November 11, 2006, 10:00
Default Re: Diffusion-coefficient based on mole fraction
  #2
Fady
Guest
 
Posts: n/a
no one got anythig...?

it is quite important, and i have to get this working soon.

thanks for the help
  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
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 07:20
Water subcooled boiling Attesz CFX 7 January 5, 2013 04:32
On the damBreak4phaseFine cases paean OpenFOAM Running, Solving & CFD 0 November 14, 2008 22:14
CFX Solver Memory Error mike CFX 1 March 19, 2008 08:22
Species diffusion coefficient iceabc FLUENT 1 June 10, 2004 11:04


All times are GMT -4. The time now is 06:33.