parker

parker.average_molecular_weight(ion_fraction_profile, r_profile, v_profile, planet_mass, temperature, he_h_fraction=0.11111111111111112)[source]

Calculates the “average” mean molecular weight of the upper atmosphere following Eq. A.3 in Lampón et al. 2020, in unit of proton mass.

Parameters:
ion_fraction_profilenumpy.ndarray

Hydrogen ion fraction in function of radial distance.

r_profilenumpy.ndarray

Radial distance profile in unit of Jupiter radii. This is the independent variable over which the profiles are described.

v_profilenumpy.ndarray

Velocity profile in units of km / s in function of radial distance.

planet_massfloat

Planetary mass in unit of Jupiter mass.

temperaturefloat

Isothermal temperature of the outflow in unit of K.

he_h_fractionfloat, optional

Number fraction of He particles in relation to H particles. Default is 0.1 / 0.9.

Returns:
mu_barfloat

“Average” mean molecular weight as defined by Eq. A.3 of Lampón et al. 2020, in unit of proton mass.

parker.sound_speed(temperature, mean_molecular_weight=1.0)[source]

Speed of sound in an isothermal ideal gas.

Parameters:
temperaturefloat

Constant temperature of the gas in Kelvin. Assumed to be close to the maximum thermospheric temperature (see Oklopčić & Hirata 2018 and Lampón et al. 2020 for more details).

mean_molecular_weightfloat

Mean molecular weight of the atmosphere in unit of proton mass. Default value is 1.0 (100% neutral H).

Returns:
csfloat

Sound speed in the gas in unit of km / s.

parker.radius_sonic_point(planet_mass, sound_speed_0)[source]

Radius of the sonic point, i.e., where the wind speed matches the speed of sound.

Parameters:
planet_massfloat

Planetary mass in unit of Jupiter mass.

sound_speed_0float

Constant speed of sound in unit of km / s.

Returns:
r_sonic_pointfloat

Radius of the sonic point in unit of Jupiter radius.

parker.density_sonic_point(mass_loss_rate, radius_sp, sound_speed_0)[source]

Density at the sonic point, where the wind speed matches the speed of sound. The input values must be astropy.Quantity.

Parameters:
mass_loss_ratefloat

Total mass loss rate of the planet in units of g / s.

radius_spfloat

Radius at the sonic point in unit of Jupiter radius.

sound_speed_0float

Speed of sound, assumed to be constant, in units of km / s.

Returns:
rho_spfloat

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

parker.structure(r, v_guess=None)[source]

Calculate the velocity and density of the atmosphere in function of radius at the sonic point, and in units of sound speed and density at the sonic point, respectively.

Parameters:
rnumpy.ndarray or float

Radius at which to sample the velocity in unit of radius at the sonic point.

v_guessnumpy.ndarray or float, optional

Guessed value(s) of velocity, in unit of sound speed, corresponding to the radius(ii) r. If None, then the code assumes a standard guess for the velocity. If not None, v_guess must have the same shape as r. Default is None.

Returns:
velocity_rnumpy.ndarray or float

numpy array or a single value of velocity at the given radius or radii in unit of sound speed.

density_rnumpy.ndarray or float

Density sampled at the radius or radii r and in unit of density at the sonic point.

parker.radius_sonic_point_tidal(planet_mass, sound_speed_0, star_mass, semi_major_axis)[source]

Radius of the sonic point, i.e., where the wind speed matches the speed of sound, accounting for the tidal gravity of the host star.

Parameters:
planet_massfloat

Planetary mass in unit of Jupiter mass.

sound_speed_0float

Constant speed of sound in unit of km / s.

star_massfloat

Stellar mass in unit of solar mass.

semi_major_axisfloat

Planetary semimajor axis in unit of AU.

Returns:
r_sonic_pointfloat

Radius of the sonic point in units of Jupiter radius.

parker.structure_tidal(r, sound_speed_0, r_sonic_point, planet_mass, star_mass, semi_major_axis)[source]

Calculate the velocity and density of the atmosphere in function of radius at the sonic point, and in units of sound speed and density at the sonic point, respectively. This version accounts for the tidal gravity of the host star.

Parameters:
rnumpy.ndarray or float

Radius at which to sample the velocity in unit of radius at the sonic point.

sound_speed_0float

Constant speed of sound in unit of km / s.

r_sonic_pointfloat

Sonic radius in unit of Jupiter radius. Note: ensure that this is computed with radius_sonic_point_tidal.

planet_massfloat

Planetary mass in unit of Jupiter mass.

star_massfloat

Stellar mass in unit of solar mass.

semi_major_axisfloat

Planetary semimajor axis in unit of AU.

Returns:
velocity_rnumpy.ndarray or float

numpy array or a single value of velocity at the given radius or radii in unit of sound speed.

density_rnumpy.ndarray or float

Density sampled at the radius or radii r and in unit of density at the sonic point.