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_planetdict

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).

Returns:
phi_oifloat

Ionization rate of O I at null optical depth in unit of 1 / s.

a_oifloat

Flux-averaged photoionization cross-section of O I in unit of cm ** 2.

a_h_oifloat

Flux-averaged photoionization cross-section of H I in the range absorbed by O I in unit of cm ** 2.

a_hefloat

Flux-averaged photoionization cross-section of He I in unit of cm ** 2.

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_temperaturefloat

Temperature of the plasma where the electrons are embedded in unit of Kelvin.

Returns:
ionization_rate_oifloat

Ionization rate of neutral O into singly-ionized O in unit of cm ** 3 / s.

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_temperaturefloat

Temperature of the plasma where the electrons are embedded in unit of Kelvin.

Returns:
alpha_rec_oifloat

Recombination rate of O II into O I in units of cm ** 3 / s.

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:
temperaturefloat

Isothermal temperature of the upper atmosphere in unit of Kelvin.

Returns:
ct_rate_oi_hpfloat

Charge transfer rate between neutral O and H+ in units of cm ** 3 / s.

ct_rate_oii_hfloat

Charge transfer rate between O+ and neutral H in units of cm ** 3 / s.

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_profilenumpy.ndarray

Radius in unit of planetary radii.

velocitynumpy.ndarray

Velocities sampled at the values of radius_profile in units of sound speed. Similar to the output of parker.structure().

densitynumpy.ndarray

Densities sampled at the values of radius_profile in units of density at the sonic point. Similar to the output of parker.structure().

hydrogen_ion_fractionnumpy.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_fractionnumpy.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 be 1 - f_1_r - f_3_r.

planet_radiusfloat

Planetary radius in unit of Jupiter radius.

temperaturefloat

Isothermal temperature of the upper atmosphere in unit of Kelvin.

h_fractionfloat

Total (ion + neutral) H number fraction of the atmosphere.

speed_sonic_pointfloat

Speed of sound in the outflow in units of km / s.

radius_sonic_pointfloat

Radius of the sonic point in unit of Jupiter radius.

density_sonic_pointfloat

Density at the sonic point in units of g / cm ** 3.

spectrum_at_planetdict

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_fractionfloat, optional

Fraction of total oxygen in the upper atmosphere. Default value assumes solar abundance.

initial_f_o_ionfloat, optional

The initial oxygen ion fraction at the layer near the surface of the planet. Default is 0.0, i.e., 100% neutral.

relax_solutionbool, 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 is False.

convergencefloat, optional

Value of delta_f at which to stop the relaxation of the solution for f_r. Default is 0.01.

max_n_relaxint, optional

Maximum number of loops to perform the relaxation of the solution for the ion fractions. Default is 10.

methodstr, optional

If method is 'odeint', then scipy.integrate.odeint() is used instead of scipy.integrate.solve_ivp() to calculate the steady-state distribution of helium. Any other method will fall back to an option of solve_ivp() methods. For example, if method is set to 'Radau', then use solve_ivp(method='Radau'). Default is 'Radau'.

return_ratesbool, optional

If True, then this function also returns a dict object containing the various reaction rates in function of radius and in units of 1 / s. Default is False.

**options_solve_ivp:

Options to be passed to the scipy.integrate.solve_ivp() solver. You may want to change the options atol (absolute tolerance; default is 1E-6) or rtol (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.

Returns:
f_oii_rnumpy.ndarray

Fraction of singly-ionized oxygen in function of radius.

reaction_ratesdict

Dictionary containing the reaction rates in function of radius and in units of 1 / s. Only returned when return_rates is set to True. 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