energetics
- energetics.calculate_epsilon_max(r_grid, spectrum, n_h, n_he, n_he_plus, R_pl, R_roche)[source]
Calculates the maximum mass-loss efficiency of an outflow given the profiles of neutral hydrogen, neutral helium, and ionized helium by Equation (19) of Vissapragada et al. (2022).
- Parameters:
- r_grid
numpy.ndarray
The radius grid for the calculation. An astropy unit (like u.Rjup) must be specified for each value on the grid.
- spectrum
dict
Spectrum of the host star arriving at the planet covering fluxes up to the wavelength corresponding to the energy to ionize hydrogen (13.6 eV, or 911.65 Angstrom). Can be generated using
tools.make_spectrum_dict
ortools.generate_muscles_spectrum
. Currently we assume that the spectrum does not include lower energies than 13.6 eV.- n_h
numpy.ndarray
The neutral hydrogen number density profile for the wind. An astropy unit (like u.cm**-3) must be specified for each value on the grid.
- n_he
numpy.ndarray
The neutral helium number density profile for the wind. An astropy unit (like u.cm**-3) must be specified for each value on the grid.
- n_he_plus
numpy.ndarray
The (singly-)ionized helium number density profile for the wind. An astropy unit (like u.cm**-3) must be specified for each value on the grid.
- R_pl
astropy.Quantity
The planetary radius. An astropy unit (like u.Rjup) must be specified.
- R_roche
astropy.Quantity
The Roche radius. An astropy unit (like u.Rjup) must be specified.
- r_grid
- Returns:
- eps
float
Maximum mass-loss efficiency of the wind assuming it is driven only by photoionization.
- eps
- energetics.calculate_mdot_max(R_pl, M_pl, M_star, a, r_grid, spectrum, n_h, n_he, n_he_plus)[source]
Calculates the maximum mass-loss rate of an outflow given the profiles of neutral hydrogen, neutral helium, and ionized helium by Equation (20) of Vissapragada et al. (2022).
- Parameters:
- R_pl
astropy.Quantity
The planetary radius. An astropy unit (like u.Rjup) must be specified.
- M_pl
astropy.Quantity
The planetary mass. An astropy unit (like u.Mjup) must be specified.
- M_star
astropy.Quantity
The stellar mass. An astropy unit (like u.Msun) must be specified.
- a
astropy.Quantity
The semimajor axis of the planetary orbit. An astropy unit (like u.au) must be specified.
- r_grid
numpy.ndarray
The radius grid for the calculation. An astropy unit (like u.Rjup) must be specified for each value on the grid.
- spectrum
dict
Spectrum of the host star arriving at the planet covering fluxes up to the wavelength corresponding to the energy to ionize hydrogen (13.6 eV, or 911.65 Angstrom). Can be generated using
tools.make_spectrum_dict
ortools.generate_muscles_spectrum
. Currently we assume that the spectrum does not include lower energies than 13.6 eV.- n_h
numpy.ndarray
The neutral hydrogen number density profile for the wind. An astropy unit (like u.cm**-3) must be specified for each value on the grid.
- n_he
numpy.ndarray
The neutral helium number density profile for the wind. An astropy unit (like u.cm**-3) must be specified for each value on the grid.
- n_he_plus
numpy.ndarray
The (singly-)ionized helium number density profile for the wind. An astropy unit (like u.cm**-3) must be specified for each value on the grid.
- R_pl
- Returns:
- md
astropy.Quantity
Maximum mass-loss rate (in g/s) of the wind assuming it is driven only by photoionization.
- md
- energetics.spec_av_cross(r_grid, spectrum, t_coef, species)[source]
Calculates the heating cross-section for photoionization using Equation (16) of Vissapragada et al. (2022).
- Parameters:
- r_grid
numpy.ndarray
The radius grid for the calculation. An astropy unit (like u.Rjup) must be specified for each value on the grid.
- spectrum
dict
Spectrum of the host star arriving at the planet covering fluxes up to the wavelength corresponding to the energy to ionize hydrogen (13.6 eV, or 911.65 Angstrom). Can be generated using
tools.make_spectrum_dict
ortools.generate_muscles_spectrum
. Currently we assume that the spectrum does not include lower energies than 13.6 eV.- t_coef
numpy.ndarray
The transmission coefficient profile for the wind as a function of frequency and altitude. In the optically-thin part of the outflow this should be very close to 1.
- species
str
The photoionzation target for which we are calculating the heating cross-section. Must be one of ‘hydrogen’, ‘helium’, or ‘helium+’.
- r_grid
- Returns:
- cross
astropy.Quantity
Heating cross-section in cm ** 2 for the selected species.
- cross
- energetics.compute_column_densities(r_grid, n_h, n_he, n_he_plus)[source]
Given the density profiles of H, He, and He+, this function calculates the column densities.
- Parameters:
- r_grid
numpy.ndarray
The radius grid for the calculation. An astropy unit (like u.Rjup) must be specified for each value on the grid.
- n_h
numpy.ndarray
The neutral hydrogen number density profile for the wind. An astropy unit (like u.cm ** -3) must be specified for each value on the grid.
- n_he
numpy.ndarray
The neutral helium number density profile for the wind. An astropy unit (like u.cm ** -3) must be specified for each value on the grid.
- n_he_plus
numpy.ndarray
The (singly-)ionized helium number density profile for the wind. An astropy unit (like u.cm ** -3) must be specified for each value on the grid.
- r_grid
- Returns:
- column_h
numpy.ndarray
The neutral hydrogen column density profile in u.cm ** -2.
- column_he
numpy.ndarray
The neutral helium column density profile in u.cm ** -2.
- column_he_plus
numpy.ndarray
The ionized helium column density profile in u.cm ** -2.
- column_h
- energetics.compute_transmission_coefficient(spectrum, r_grid, N_h, N_he, N_he_plus)[source]
Given the column density profiles of H, He, and He+, this function calculates the transmission coefficient (negative exponential of the optical depth) as a function of altitude and frequency.
- Parameters:
- r_grid
numpy.ndarray
The radius grid for the calculation. An astropy unit (like u.Rjup) must be specified for each value on the grid.
- spectrum
dict
Spectrum of the host star arriving at the planet covering fluxes up to the wavelength corresponding to the energy to ionize hydrogen (13.6 eV, or 911.65 Angstrom). Can be generated using
tools.make_spectrum_dict
ortools.generate_muscles_spectrum
. Currently we assume that the spectrum does not include lower energies than 13.6 eV.- N_h
numpy.ndarray
The neutral hydrogen column density profile. An astropy unit (like u.cm ** -2) must be specified for each value on the grid.
- N_he
numpy.ndarray
The neutral helium column density profile. An astropy unit (like u.cm ** -2) must be specified for each value on the grid.
- N_he_plus
numpy.ndarray
The ionized helium column density profile. An astropy unit (like u.cm ** -2) must be specified for each value on the grid.
- r_grid
- Returns:
- t_coef
numpy.ndarray
The transmission coefficient profile for the wind as a function of frequency and altitude.
- t_coef
- energetics.calculate_roche_radius(R_pl, M_pl, M_star, a)[source]
Calculates the Roche radius for the planet.
- Parameters:
- R_pl
astropy.Quantity
The planetary radius. An astropy unit (like u.Rjup) must be specified.
- M_pl
astropy.Quantity
The planetary mass. An astropy unit (like u.Mjup) must be specified.
- M_star
astropy.Quantity
The stellar mass. An astropy unit (like u.Msun) must be specified.
- a
astropy.Quantity
The semimajor axis of the planetary orbit. An astropy unit (like u.au) must be specified.
- R_pl
- Returns:
- R_roche
astropy.Quantity
The Roche radius.
- R_roche
- energetics.calculate_f_xuv(spectrum)[source]
Calculates the total XUV flux given the spectrum at the planet (Equation 14 of Vissapragada et al. 2022, where the minimum threshold is 13.6 eV. This function currently assumes the spectrum is truncated at 13.6 eV and does not include lower energies.
- Parameters:
- spectrum
dict
Spectrum of the host star arriving at the planet covering fluxes up to the wavelength corresponding to the energy to ionize hydrogen (13.6 eV, or 911.65 Angstrom). Can be generated using
tools.make_spectrum_dict
ortools.generate_muscles_spectrum
. Currently we assume that the spectrum does not include lower energies than 13.6 eV.
- spectrum
- Returns:
- f_xuv
astropy.Quantity
The integrated XUV flux.
- f_xuv
- energetics.h_photo_cross(nu_init)[source]
Calculates the photoionization cross-section of hydrogen (Equation 17 from Vissapragada et al. 2022). Note: potential overlap with
microphysics.hydrogen_cross_section
.- Parameters:
- nu_init
numpy.ndarray
Frequencies at which to compute the cross-section. An astropy unit (like u.Hz) must be specified for each value in the array.
- nu_init
- Returns:
- out
numpy.ndarray
The cross-section in cm ** 2.
- out
- energetics.heplus_photo_cross(nu_init)[source]
Calculates the photoionization cross-section of ionized helium (Equation 17 from Vissapragada et al. 2022).
- Parameters:
- nu_init
numpy.ndarray
Frequencies at which to compute the cross-section. An astropy unit (like u.Hz) must be specified for each value in the array.
- nu_init
- Returns:
- out
numpy.ndarray
The cross-section in cm**2.
- out
- energetics.helium_photo_cross(nu_init)[source]
Calculates the photoionization cross-section of neutral helium. This is Equation 18 from Vissapragada et al. 2022, which itself is from Yan, Sadeghpour, & Dalgarno (1998, ApJ). Note that this does not overlap with the state-resolved cross-sections from the
microphysics
module as this is a total photoionization cross-section across all states.- Parameters:
- nu_init
numpy.ndarray
Frequencies at which to compute the cross-section. An astropy unit (like u.Hz) must be specified for each value in the array.
- nu_init
- Returns:
- out
numpy.ndarray
The cross-section in cm**2.
- out