Repository navigation
Expand file tree
/
Copy pathfast_alpha.py
More file actions
40 lines (35 loc) · 1.5 KB
/
Copy pathfast_alpha.py
File metadata and controls
40 lines (35 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import numpy as np
from constant import Const, mass_ion_amu
def cal_beta_fast_alpha(model):
"""
input:
prof_data:
temp_e_vol_avg, ndensity_e_vol_avg, dlamii, dlamie, b_total
comp_data:
charge_eff_mass_weighted
power_data:
alpha_produce_rate_total
"""
te = model.prof_data.temp_e_vol_avg
ne = model.prof_data.ndensity_e_vol_avg
charge_mass_weighted = model.comp_data.charge_eff_mass_weighted
dlamii = model.prof_data.dlamii
dlamie = model.prof_data.dlamie
me_amu = Const.MASS_ELECTRON_KG / Const.AMU
me = Const.MASS_ELECTRON_KG
b_total = model.prof_data.b_total
e_crit = te * mass_ion_amu("he4") * (0.75 * np.sqrt(np.pi / me_amu) / ne * charge_mass_weighted * dlamii / dlamie)**(2.0/3.0)
tau_slow_down = (
3.0 * (np.sqrt(2.0*np.pi))**3 * Const.EPS0**2 * (te * Const.MILL_QE)**1.5 * mass_ion_amu("he4")
/ (np.sqrt(me) * Const.QE**4 * ne * dlamie) * (dlamii / dlamie)) * (Const.AMU)
e_alpha_0 = 8.68e3 / 3.0
x0 = np.sqrt(e_alpha_0 / e_crit)
s0 = model.power_data.alpha_produce_rate_total
n_fa = tau_slow_down / 3.0 * np.log(1.0 + x0**3) * s0
pressure = (
-np.atan(1/np.sqrt(3.0))/np.sqrt(3.0) + 0.5 * x0**2
- 1/np.sqrt(3.0) * np.atan((2.0 * x0 - 1) / np.sqrt(3.0))
+ 0.5 * np.log(1 + x0) - 1/6.0 * np.log(1 + x0**3)
) * s0 * tau_slow_down * e_crit * 2.0 / 3.0 * Const.MILL_QE # Pa
beta_fast_alpha = 2 * Const.MU0 * pressure / b_total
return beta_fast_alpha