Skip to content

Commit df1d63e

Browse files
authored
Merge pull request #15050 from rmcdermo/master
Python: add script to document verification case
2 parents a213a35 + 1c73e7a commit df1d63e

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/usr/bin/python
2+
#McDermott
3+
#2025-09-03
4+
5+
import numpy as np
6+
7+
R = 8314.5
8+
P = 101325
9+
W = 28.8
10+
mu = 2.E-5
11+
T_g_1 = 25 + 273.15
12+
T_w_1 = 20 + 273.15
13+
T_g_2 = 115 + 273.15
14+
T_w_2 = 120 + 273.15
15+
dx = 0.001
16+
Vc = dx**3
17+
L = 0.01
18+
Y_0 = 1.E-5 # initial mass fraction of aerosol
19+
rhoa = 2000
20+
ra = 1.E-6/2 # see input file
21+
dTdx_1 = (T_g_1-T_w_1)/(0.5*dx)
22+
dTdx_2 = (T_g_2-T_w_2)/(0.5*dx)
23+
rho_g_1 = P*W/(R*T_g_1)
24+
rho_g_2 = P*W/(R*T_g_2)
25+
26+
# FDS Tech Guide Eq. 8.9
27+
alpha = 0.025/1.0 # see input file
28+
Cs = 1.17
29+
Ct = 2.2
30+
Cm = 1.146
31+
lam_1 = mu*np.sqrt(np.pi/(2*P*rho_g_1))
32+
lam_2 = mu*np.sqrt(np.pi/(2*P*rho_g_2))
33+
Kn_1 = lam_1/ra
34+
Kn_2 = lam_2/ra
35+
Cn_1 = 1 + 1.257*Kn_1 + 0.4*Kn_1*np.exp(-1.1/Kn_1)
36+
Cn_2 = 1 + 1.257*Kn_2 + 0.4*Kn_2*np.exp(-1.1/Kn_2)
37+
Kth_1 = 2*Cs*(alpha + Ct*Kn_1)*Cn_1/ ( (1 + 3*Cm*Kn_1)*(1 + 2*alpha + 2*Ct*Kn_1) )
38+
Kth_2 = 2*Cs*(alpha + Ct*Kn_2)*Cn_2/ ( (1 + 3*Cm*Kn_2)*(1 + 2*alpha + 2*Ct*Kn_2) )
39+
40+
# note: for this case surface 1 is cold and soot deposits there
41+
# surface 2 is hot and soot moves away from it due to thermophoresis
42+
u_th_1 = Kth_1*mu/rho_g_1/T_g_1 * dTdx_1; print(u_th_1)
43+
u_th_2 = Kth_2*mu/rho_g_2/T_g_2 * dTdx_2; print(u_th_2)
44+
45+
T_END=2
46+
f_1 = u_th_1*T_END / dx
47+
f_2 = u_th_2*T_END / dx
48+
49+
# Y_0 = rhoa*Va/(rhoa*Va + rhog*(Vc-Va)); Y_0 = 1.E-5 per input file
50+
Va_1 = Y_0*rho_g_1*Vc/( rhoa-Y_0*(rhoa-rho_g_1) )
51+
Va_2 = Y_0*rho_g_2*Vc/( rhoa-Y_0*(rhoa-rho_g_2) )
52+
53+
ma_1 = rhoa*Va_1
54+
ma_2 = rhoa*Va_2
55+
56+
Ma_1 = f_1*ma_1 *L**2/dx**2
57+
Ma_2 = f_2*ma_2 *L**2/dx**2
58+
59+
# the value Ma_1 is the target mass deposited for this verification case
60+
print(Ma_1,Ma_2)

0 commit comments

Comments
 (0)