CFD Online Logo CFD Online URL
Home > Forums > General Forums > Main CFD Forum

is it possible to define different mass diffusion coefficients in different zones?

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   June 3, 2019, 20:24
Default is it possible to define different mass diffusion coefficients in different zones?
Senior Member
Weiqiang Liu
Join Date: Feb 2018
Posts: 278
Rep Power: 9
Weiqiang Liu is on a distinguished road
Hi all,

I am trying to define an effective mass diffusion coefficient in porous zone while the other fluid zone has mass diffusion coefficient calculated by kinetic theory.

L-J parameters are imported for every species to calculate binary diffusion coefficient and then mixture averaged or multi-component diffusion coefficients are calculated according to model utilized.

In the porous zone, the mass diffusion coefficient is a function of both molecular diffusion coefficient and knudsen diffusion coefficient. In other words, in non-porous zone, diffusion coefficients for every species are calculated by kinetic theory while in porous zone, diffusion coefficients for every species are a combination of molecular diffusion(kinetic theory) and knudsen diffusion coefficient. I wonder is this doable in fluent? I put my UDF code below though it can not be loaded with some errors.

Can anybody help me to check the code whether the logic and syntax is right?

#include "udf.h"
double dpore=20e-9;
double gasconstant=8.314;
double Dknudsen;
double T=300.0;
double pi=3.14;
double tortuosity=3.0;
double porosity=0.5;
double Deffective;
double Dmolecular;
int isp;
real mw;
Domain *domain;
Material *mix_mat,*sp;
else if(THREAD_ID(t)==ZONE_16)
return Deffective;
Weiqiang Liu is offline   Reply With Quote


mass diffusivity, porous zone, udf

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Define Diffusion Source Holagee Fluent UDF and Scheme Programming 3 April 5, 2019 02:06
Define udf for mass and energy source in cfx namandoshi CFX 1 April 20, 2018 11:26
Inconsistencies in reading .dat file during run time in new injection model Scram_1 OpenFOAM 0 March 23, 2018 22:29
mass diffusion and newton's second law mohsenclick Main CFD Forum 8 October 6, 2014 08:39
mass transfer through wall by passive diffusion hagar FLUENT 3 April 10, 2006 13:53

All times are GMT -4. The time now is 08:30.