oxygen
- oxygen.radiative_processes(spectrum_at_planet)[source]
Calculate the photoionization rate of oxygen at null optical depth based on the EUV spectrum arriving at the planet.
- Parameters:
- spectrum_at_planet
dict
Spectrum of the host star arriving at the planet covering fluxes at least up to the wavelength corresponding to the energy to ionize oxygen (13.62 eV, or 910 Angstrom).
- spectrum_at_planet
- Returns:
- phi_oi
float
Ionization rate of O I at null optical depth in unit of 1 / s.
- a_oi
float
Flux-averaged photoionization cross-section of O I in unit of cm ** 2.
- a_h_oi
float
Flux-averaged photoionization cross-section of H I in the range absorbed by O I in unit of cm ** 2.
- a_he
float
Flux-averaged photoionization cross-section of He I in unit of cm ** 2.
- phi_oi
- oxygen.electron_impact_ionization(electron_temperature)[source]
Calculates the electron impact ionization rate that consumes neutral O and produces singly-ionized O. Based on the formula of Voronov 1997 (https://ui.adsabs.harvard.edu/abs/1997ADNDT..65….1V/abstract).
- Parameters:
- electron_temperature
float
Temperature of the plasma where the electrons are embedded in unit of Kelvin.
- electron_temperature
- Returns:
- ionization_rate_oi
float
Ionization rate of neutral O into singly-ionized O in unit of cm ** 3 / s.
- ionization_rate_oi
- oxygen.recombination(electron_temperature)[source]
Calculates the rate of recombination of singly-ionized O with an electron to produce a neutral O atom. Based on the formulation of Woodall et al. 2007 (https://ui.adsabs.harvard.edu/abs/2007A%26A…466.1197W/abstract).
- Parameters:
- electron_temperature
float
Temperature of the plasma where the electrons are embedded in unit of Kelvin.
- electron_temperature
- Returns:
- alpha_rec_oi
float
Recombination rate of O II into O I in units of cm ** 3 / s.
- alpha_rec_oi
- oxygen.charge_transfer(temperature)[source]
Calculates the charge exchange rates of O with H nuclei. Based on the formulation of Woodall et al. 2007 (https://ui.adsabs.harvard.edu/abs/2007A%26A…466.1197W/abstract).
- Parameters:
- temperature
float
Isothermal temperature of the upper atmosphere in unit of Kelvin.
- temperature
- Returns:
- ct_rate_oi_hp
float
Charge transfer rate between neutral O and H+ in units of cm ** 3 / s.
- ct_rate_oii_h
float
Charge transfer rate between O+ and neutral H in units of cm ** 3 / s.
- ct_rate_oi_hp
- oxygen.ion_fraction(radius_profile, velocity, density, hydrogen_ion_fraction, helium_ion_fraction, planet_radius, temperature, h_fraction, speed_sonic_point, radius_sonic_point, density_sonic_point, spectrum_at_planet, o_fraction=0.0004897788193684457, initial_f_o_ion=0.0, relax_solution=False, convergence=0.01, max_n_relax=10, method='Radau', return_rates=False, **options_solve_ivp)[source]
Calculate the fraction of ionized oxygen in the upper atmosphere in function of the radius in unit of planetary radius.
- Parameters:
- radius_profile
numpy.ndarray
Radius in unit of planetary radii.
- velocity
numpy.ndarray
Velocities sampled at the values of
radius_profile
in units of sound speed. Similar to the output ofparker.structure()
.- density
numpy.ndarray
Densities sampled at the values of
radius_profile
in units of density at the sonic point. Similar to the output ofparker.structure()
.- hydrogen_ion_fraction
numpy.ndarray
Number fraction of H ion over total H in the upper atmosphere in function of radius. Similar to the output of
hydrogen.ion_fraction()
.- helium_ion_fraction
numpy.ndarray
Number fraction of He ion over total He in the upper atmosphere in function of radius. Similar to the output of
helium.population_fraction()
, but should be1 - f_1_r - f_3_r
.- planet_radius
float
Planetary radius in unit of Jupiter radius.
- temperature
float
Isothermal temperature of the upper atmosphere in unit of Kelvin.
- h_fraction
float
Total (ion + neutral) H number fraction of the atmosphere.
- speed_sonic_point
float
Speed of sound in the outflow in units of km / s.
- radius_sonic_point
float
Radius of the sonic point in unit of Jupiter radius.
- density_sonic_point
float
Density at the sonic point in units of g / cm ** 3.
- spectrum_at_planet
dict
Spectrum of the host star arriving at the planet covering fluxes at least up to the wavelength corresponding to the energy to ionize oxygen (13.62 eV, or 910 Angstrom). Can be generated using
tools.make_spectrum_dict
.- o_fraction
float
, optional Fraction of total oxygen in the upper atmosphere. Default value assumes solar abundance.
- initial_f_o_ion
float
, optional The initial oxygen ion fraction at the layer near the surface of the planet. Default is 0.0, i.e., 100% neutral.
- relax_solution
bool
, optional The first solution is calculating by initially assuming the entire atmosphere is in neutral state. If
True
, the solution will be re-calculated in a loop until it converges to a delta_f of 1%, or for a maximum of 10 loops (default parameters). Default isFalse
.- convergence
float
, optional Value of delta_f at which to stop the relaxation of the solution for
f_r
. Default is 0.01.- max_n_relax
int
, optional Maximum number of loops to perform the relaxation of the solution for the ion fractions. Default is 10.
- method
str
, optional If method is
'odeint'
, thenscipy.integrate.odeint()
is used instead ofscipy.integrate.solve_ivp()
to calculate the steady-state distribution of helium. Any other method will fall back to an option ofsolve_ivp()
methods. For example, ifmethod
is set to'Radau'
, then usesolve_ivp(method='Radau')
. Default is'Radau'
.- return_rates
bool
, optional If
True
, then this function also returns adict
object containing the various reaction rates in function of radius and in units of 1 / s. Default isFalse
.- **options_solve_ivp:
Options to be passed to the
scipy.integrate.solve_ivp()
solver. You may want to change the optionsatol
(absolute tolerance; default is 1E-6) orrtol
(relative tolerance; default is 1E-3). If you are having numerical issues, you may want to decrease the tolerance by a factor of 10 or 100, or 1000 in extreme cases.
- radius_profile
- Returns:
- f_oii_r
numpy.ndarray
Fraction of singly-ionized oxygen in function of radius.
- reaction_rates
dict
Dictionary containing the reaction rates in function of radius and in units of 1 / s. Only returned when
return_rates
is set toTrue
. Here is a short description of the dict keys:photoionization: Photoionization of O I into O II
recombination: Recombination of O II into O I
e_impact_ionization: Electron impact ionization of O I into O II
charge_exchange_HII: Charge exchange between O I and H II
charge_exchange_HI: Charge exchange between O II and H I
- f_oii_r