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

The radius grid for the calculation. An astropy unit (like u.Rjup) must be specified for each value on the grid.

spectrumdict

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 or tools.generate_muscles_spectrum. Currently we assume that the spectrum does not include lower energies than 13.6 eV.

n_hnumpy.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_henumpy.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_plusnumpy.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_plastropy.Quantity

The planetary radius. An astropy unit (like u.Rjup) must be specified.

R_rocheastropy.Quantity

The Roche radius. An astropy unit (like u.Rjup) must be specified.

Returns:
epsfloat

Maximum mass-loss efficiency of the wind assuming it is driven only by photoionization.

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_plastropy.Quantity

The planetary radius. An astropy unit (like u.Rjup) must be specified.

M_plastropy.Quantity

The planetary mass. An astropy unit (like u.Mjup) must be specified.

M_starastropy.Quantity

The stellar mass. An astropy unit (like u.Msun) must be specified.

aastropy.Quantity

The semimajor axis of the planetary orbit. An astropy unit (like u.au) must be specified.

r_gridnumpy.ndarray

The radius grid for the calculation. An astropy unit (like u.Rjup) must be specified for each value on the grid.

spectrumdict

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 or tools.generate_muscles_spectrum. Currently we assume that the spectrum does not include lower energies than 13.6 eV.

n_hnumpy.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_henumpy.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_plusnumpy.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.

Returns:
mdastropy.Quantity

Maximum mass-loss rate (in g/s) of the wind assuming it is driven only by photoionization.

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

The radius grid for the calculation. An astropy unit (like u.Rjup) must be specified for each value on the grid.

spectrumdict

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 or tools.generate_muscles_spectrum. Currently we assume that the spectrum does not include lower energies than 13.6 eV.

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

speciesstr

The photoionzation target for which we are calculating the heating cross-section. Must be one of ‘hydrogen’, ‘helium’, or ‘helium+’.

Returns:
crossastropy.Quantity

Heating cross-section in cm ** 2 for the selected species.

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

The radius grid for the calculation. An astropy unit (like u.Rjup) must be specified for each value on the grid.

n_hnumpy.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_henumpy.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_plusnumpy.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.

Returns:
column_hnumpy.ndarray

The neutral hydrogen column density profile in u.cm ** -2.

column_henumpy.ndarray

The neutral helium column density profile in u.cm ** -2.

column_he_plusnumpy.ndarray

The ionized helium column density profile in u.cm ** -2.

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

The radius grid for the calculation. An astropy unit (like u.Rjup) must be specified for each value on the grid.

spectrumdict

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 or tools.generate_muscles_spectrum. Currently we assume that the spectrum does not include lower energies than 13.6 eV.

N_hnumpy.ndarray

The neutral hydrogen column density profile. An astropy unit (like u.cm ** -2) must be specified for each value on the grid.

N_henumpy.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_plusnumpy.ndarray

The ionized helium column density profile. An astropy unit (like u.cm ** -2) must be specified for each value on the grid.

Returns:
t_coefnumpy.ndarray

The transmission coefficient profile for the wind as a function of frequency and altitude.

energetics.calculate_roche_radius(R_pl, M_pl, M_star, a)[source]

Calculates the Roche radius for the planet.

Parameters:
R_plastropy.Quantity

The planetary radius. An astropy unit (like u.Rjup) must be specified.

M_plastropy.Quantity

The planetary mass. An astropy unit (like u.Mjup) must be specified.

M_starastropy.Quantity

The stellar mass. An astropy unit (like u.Msun) must be specified.

aastropy.Quantity

The semimajor axis of the planetary orbit. An astropy unit (like u.au) must be specified.

Returns:
R_rocheastropy.Quantity

The Roche radius.

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

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 or tools.generate_muscles_spectrum. Currently we assume that the spectrum does not include lower energies than 13.6 eV.

Returns:
f_xuvastropy.Quantity

The integrated XUV flux.

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

Frequencies at which to compute the cross-section. An astropy unit (like u.Hz) must be specified for each value in the array.

Returns:
outnumpy.ndarray

The cross-section in cm ** 2.

energetics.heplus_photo_cross(nu_init)[source]

Calculates the photoionization cross-section of ionized helium (Equation 17 from Vissapragada et al. 2022).

Parameters:
nu_initnumpy.ndarray

Frequencies at which to compute the cross-section. An astropy unit (like u.Hz) must be specified for each value in the array.

Returns:
outnumpy.ndarray

The cross-section in cm**2.

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

Frequencies at which to compute the cross-section. An astropy unit (like u.Hz) must be specified for each value in the array.

Returns:
outnumpy.ndarray

The cross-section in cm**2.