summaryrefslogtreecommitdiff
path: root/539/CH5/EX5.1/Example_5_1.sce
blob: dbe95e30c64b2bce600f86bafd88bc8994a1d937 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//Diffusion Flux Computation

clear;
clc;

printf("\tExample 5.1\n");

Ca=1.2;       //Concentration at A in  kg/m^3
Cb=0.8;       //Concentration at B in  kg/m^3

xa=5*10^-3;   //Position 1 in m
xb=10*10^-3;  //Position 2 in m

D=3*10^-11;   //Diffusion coefficient in m^2/s

J=-D*(Ca-Cb)/(xa-xb);
printf("\nDiffusion flux is %.1f * 10^-9 kg/m^2-s",J/10^-9);

//End