Canoe
Comprehensive Atmosphere N' Ocean Engine
attenuation_electron.cpp
Go to the documentation of this file.
1 // C/C++
2 #include <cmath>
3 
4 // canoe
5 #include <constants.hpp>
6 
7 // harp
8 #include <harp/radiation.hpp>
9 
10 // cli, 190801
11 inline double SQUARE(double x) { return x * x; }
12 inline double CUBE(double x) { return x * x * x; }
13 // end
14 
15 // From F. Oyafuso
16 double attenuation_freefree_Reference(double freq, double P, double T)
17 // this is very crude
18 {
19  int const Z = 1;
20  double const fine_struct = 1.0 / 137.036;
21  double const mc2 = 0.511e6; // eV
22  double const kT = (T / 300) * .0256; // eV
23  double const hbarc = 1973e-8; // eV-cm
24  double sigma_T = 6.65e-25; // cm^2
25  // double g_ff = 1; // gaunt factor
26  double hbar_omega =
27  4.13566733e-15 * freq * 1e9; // eV (.6GHz) -- check that freq is in GHz
28 
29  double debroglie_thermal = sqrt(2.0 * M_PI * SQUARE(hbarc) / (mc2 * kT));
30  double E_ionization = 5.986; // eV
31  double n_Al = 1.6e-6 * (P * 1e5) / (kT * 1.609e-19) * 1e-6;
32 
33  double ni =
34  sqrt(2 * n_Al / pow(debroglie_thermal, 3) * exp(-E_ionization / kT));
35 
36  double kludge = 0.5;
37  double alpha_ff = kludge * sqrt(32 * CUBE(M_PI) / 3.0) *
38  (SQUARE(Z) * fine_struct) * sqrt(mc2 / kT) *
39  (ni * CUBE(hbarc / hbar_omega)) * ni * sigma_T *
40  (1.0 - exp(-hbar_omega / kT));
41  return alpha_ff;
42 }
43 
44 // from C. Li (in units of 1/cm)
45 double attenuation_freefree_Chengli(double freq, double P, double T) {
46  double ion_opacity_scale = 1.0;
47  double ion_opacity_cutoff = 1600.;
48 
49  double alpha_ff;
50  if (T < ion_opacity_cutoff)
51  alpha_ff = 0;
52  else {
53  alpha_ff = ion_opacity_scale *
54  exp(-20.957 + 9.51112E-3 * (1200. + T - ion_opacity_cutoff));
55  // convert to cm^-1
56  alpha_ff *= 1e-2;
57  }
58  return alpha_ff;
59 }
60 
61 double attenuation_appleton_hartree_nomag(double freq_GHz, double P_bar,
62  double T, double ne) {
63  ne *= 1.E-6; // m^{-3} -> cm^{-3}
64  double freq = freq_GHz * 1.E9; // GHz -> Hz
65  double P = P_bar * 1E6; // bar -> Ba
66  double e_cgs = 4.8E-10; // esu
67  double me_cgs = 9.11E-28; // g
68 
69  double num = P / (Constants::kBoltz_cgs * T); // cm^{-3}
70  double colli_radius = 1.2E-8; // cm
71  double lambda = Constants::cLight_cgs / freq; // wavelength (cm)
72  double omega = 2. * M_PI * freq; // angular frequency (rad/s)
73  // electron plasma frequency (rad/s)
74  double omega_pe = sqrt(4. * M_PI * ne * e_cgs * e_cgs / me_cgs);
75  // electron collision frequency (?)
76  double nu_e = 5. / 3. * (M_PI * colli_radius * colli_radius * num) *
77  sqrt(3. * Constants::kBoltz_cgs * T / me_cgs);
78  double X = omega_pe * omega_pe / (omega * omega);
79  double Z = nu_e / omega;
80  double n2real = 1. - X / (1. + Z * Z);
81  double n2imag = X * Z / (1. + Z * Z);
82  double Qg = n2real / n2imag;
83  double alpha = 2. * M_PI / lambda / Qg;
84  return alpha; // 1/cm
85 }
double attenuation_freefree_Reference(double freq, double P, double T)
double attenuation_freefree_Chengli(double freq, double P, double T)
double CUBE(double x)
double attenuation_appleton_hartree_nomag(double freq_GHz, double P_bar, double T, double ne)
double SQUARE(double x)
double const cLight_cgs
Definition: constants.hpp:14
double const kBoltz_cgs
Definition: constants.hpp:8