helium

helium.radiative_processes(spectrum_at_planet, combined_ionization=False)[source]

Calculate the photoionization rate of helium 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 helium (4.8 eV, or 2593 Angstrom).

combined_ionizationbool

If combined_ionization is False, the code returns the rates for singlet and triplet individually. Otherwise, they are combined. Default is False.

Returns:
phi_1float

Ionization rate of helium singlet at null optical depth in unit of 1 / s. This is returned if combined_ionization is set to False.

phi_3float

Ionization rate of helium triplet at null optical depth in unit of 1 / s. This is returned if combined_ionization is set to False.

a_1float

Flux-averaged photoionization cross-section of helium singlet in unit of cm ** 2. This is returned if combined_ionization is set to False.

a_3float

Flux-averaged photoionization cross-section of helium triplet in unit of cm ** 2. This is returned if combined_ionization is set to False.

a_h_1float

Flux-averaged photoionization cross-section of hydrogen in the range absorbed by helium singlet in unit of cm ** 2. This is returned if combined_ionization is set to False.

a_h_3float

Flux-averaged photoionization cross-section of hydrogen in the range absorbed by helium triplet in unit of cm ** 2. This is returned if combined_ionization is set to False.

phifloat

Ionization rate of helium at null optical depth in unit of 1 / s. This is returned if combined_ionization is set to True.

a_hefloat

Flux-averaged photoionization cross-section of helium in unit of cm ** 2. This is returned if combined_ionization is set to True.

a_hfloat

Flux-averaged photoionization cross-section of hydrogen in the range absorbed by helium atoms in unit of cm ** 2. This is returned if combined_ionization is set to True.

helium.radiative_processes_mono(flux_euv, flux_fuv, average_euv_photon_wavelength=242.0, average_fuv_photon_wavelength=2348.0)[source]

Calculate the photoionization rate of helium at null optical depth based on the EUV spectrum arriving at the planet.

Parameters:
flux_euvfloat

Monochromatic extreme-ultraviolet (0 - 504 Angstrom) flux arriving at the planet in units of erg / s / cm ** 2. Attention: notice that this flux_euv is different from the one used for hydrogen, since helium ionization happens at a shorter wavelength.

flux_fuvfloat

Monochromatic far- to middle-ultraviolet (911 - 2593 Angstrom) flux arriving at the planet in units of erg / s / cm ** 2.

average_euv_photon_wavelengthfloat

Average wavelength of EUV photons ionizing the He singlet state, in unit of Angstrom. Default value is 242 Angstrom. The default value is based on a flux-weighted average of the solar spectrum between 0 and 504 Angstrom.

average_fuv_photon_wavelengthfloat

Average wavelength of FUV-NUV photons ionizing the He triplet state, in unit of Angstrom. Default value is 2348 Angstrom. The default value is based on a flux-weighted average of the solar spectrum between 911 and 2593 Angstrom.

Returns:
phi_1float

Ionization rate of helium singlet at null optical depth in unit of 1 / s.

phi_3float

Ionization rate of helium triplet at null optical depth in unit of 1 / s.

a_1float

Flux-averaged photoionization cross-section of helium singlet in unit of cm ** 2.

a_3float

Flux-averaged photoionization cross-section of helium triplet in unit of cm ** 2.

a_h_1float

Flux-averaged photoionization cross-section of hydrogen in the range absorbed by helium singlet in unit of cm ** 2.

a_h_3float

Flux-averaged photoionization cross-section of hydrogen in the range absorbed by helium triplet in unit of cm ** 2.

helium.recombination(temperature)[source]

Calculates the helium singlet and triplet recombination rates for a gas at a certain temperature.

Parameters:
temperaturefloat

Isothermal temperature of the upper atmosphere in unit of Kelvin.

Returns:
alpha_rec_1float

Recombination rate of helium singlet in units of cm ** 3 / s.

alpha_rec_3float

Recombination rate of helium triplet in units of cm ** 3 / s.

helium.recombination_all(temperature)[source]

Calculates the helium recombination rates for a gas at a certain temperature, with no distinction between singlet and triplet states.

Parameters:
temperaturefloat

Isothermal temperature of the upper atmosphere in unit of Kelvin.

Returns:
alpha_recfloat

Recombination rate of helium in units of cm ** 3 / s.

helium.collision(temperature)[source]

Calculates the helium singlet and triplet collisional population rates for a gas at a certain temperature.

Parameters:
temperaturefloat

Isothermal temperature of the upper atmosphere in unit of Kelvin.

Returns:
q_13float

Rate of helium transition from singlet (1^1S) to triplet (2^3S) due to collisions with free electrons in units of cm ** 3 / s.

q_31afloat

Rate of helium transition from triplet (2^3S) to 2^1S due to collisions with free electrons in units of cm ** 3 / s.

q_31bfloat

Rate of helium transition from triplet (2^3S) to 2^1P due to collisions with free electrons in units of cm ** 3 / s.

big_q_hefloat

Rate of charge exchange between helium singlet and ionized hydrogen in units of cm ** 3 / s.

big_q_he_plusfloat

Rate of charge exchange between ionized helium and atomic hydrogen in units of cm ** 3 / s.

helium.population_fraction(radius_profile, velocity, density, hydrogen_ion_fraction, planet_radius, temperature, h_fraction, speed_sonic_point, radius_sonic_point, density_sonic_point, spectrum_at_planet=None, flux_euv=None, flux_fuv=None, initial_state=array([0.5, 0.5]), relax_solution=False, convergence=0.01, max_n_relax=10, method='odeint', return_rates=False, **options_solve_ivp)[source]

Calculate the fraction of helium in singlet and triplet state 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().

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

Spectrum of the host star arriving at the planet covering fluxes at least up to the wavelength corresponding to the energy to populate the helium states (4.8 eV, or 2593 Angstrom). Can be generated using tools.make_spectrum_dict. If None, then flux_euv and flux_fuv must be provided instead. Default is None.

flux_euvfloat, optional

Monochromatic extreme-ultraviolet (0 - 1200 Angstrom) flux arriving at the planet in units of erg / s / cm ** 2. If None, then spectrum_at_planet must be provided instead. Default is None.

flux_fuvfloat, optional

Monochromatic far- to middle-ultraviolet (1200 - 2600 Angstrom) flux arriving at the planet in units of erg / s / cm ** 2. If None, then spectrum_at_planet must be provided instead. Default is None.

initial_statenumpy.ndarray, optional

The initial state is the y0 of the differential equation to be solved. This array has two items: the initial value of the fractions of singlet and triplet state in the inner layer of the atmosphere. The default value for this parameter is numpy.array([0.5, 0.5]), i.e., fully neutral at the inner layer with 50% in singlet and 50% in triplet states.

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 f_r. 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. The first seems to be at least twice faster than the second in some situations. 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 'odeint'.

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

Fraction of helium in singlet state in function of radius.

f_3_rnumpy.ndarray

Fraction of helium in triplet state 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:

  • ionization_1: Photoionization of He singlet atoms

  • ionization_3: Photoionization of He triplet atoms

  • recombination_1: Recombination of He ions into He singlet

  • recombination_3: Recombination of He ions into He triplet

  • radiative_transition: Radiative transition of He triplet into singlet

  • transition_1_to_3: Transition of He singlet to triplet due to collisions with electrons

  • transition_3_to_21s: Transition of He triplet to 2$^1$S due to collisions with electrons

  • transition_3_to_21p: Transition of He triplet to 2$^1$P due to collisions with electrons

  • other_ionization: Combined rate of associative ionization and Penning ionization

  • charge_exchange_1: Charge exchange between helium singlet and ionized hydrogen

  • charge_exchange_he_ion: Charge exchange between ionized helium and atomic hydrogen

helium.ion_fraction(radius_profile, velocity, density, hydrogen_ion_fraction, planet_radius, temperature, h_fraction, speed_sonic_point, radius_sonic_point, density_sonic_point, spectrum_at_planet, initial_f_he_ion=0.0, relax_solution=False, convergence=0.01, max_n_relax=10, method='Radau', **options_solve_ivp)[source]

Sometimes we need to calculate only the fraction of ionized helium and not necessarily the triplet and singlet fractions. This function does that, which is faster than population_fraction(). The result is 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().

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 helium (4.8 eV, or 2593 Angstrom). Can be generated using tools.make_spectrum_dict.

initial_f_he_ionnumpy.ndarray, optional

The initial helium 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 f_r. 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. The first seems to be at least twice faster than the second in some situations. 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'.

**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_rnumpy.ndarray

Fraction of ionized helium in function of radius.