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_profile
numpy.ndarray
Hydrogen ion fraction in function of radial distance.
- r_profile
numpy.ndarray
Radial distance profile in unit of Jupiter radii. This is the independent variable over which the profiles are described.
- v_profile
numpy.ndarray
Velocity profile in units of km / s in function of radial distance.
- planet_mass
float
Planetary mass in unit of Jupiter mass.
- temperature
float
Isothermal temperature of the outflow in unit of K.
- he_h_fraction
float
, optional Number fraction of He particles in relation to H particles. Default is 0.1 / 0.9.
- ion_fraction_profile
- Returns:
- mu_bar
float
“Average” mean molecular weight as defined by Eq. A.3 of Lampón et al. 2020, in unit of proton mass.
- mu_bar
- parker.sound_speed(temperature, mean_molecular_weight=1.0)[source]
Speed of sound in an isothermal ideal gas.
- Parameters:
- temperature
float
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_weight
float
Mean molecular weight of the atmosphere in unit of proton mass. Default value is 1.0 (100% neutral H).
- temperature
- Returns:
- cs
float
Sound speed in the gas in unit of km / s.
- cs
- 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_mass
float
Planetary mass in unit of Jupiter mass.
- sound_speed_0
float
Constant speed of sound in unit of km / s.
- planet_mass
- Returns:
- r_sonic_point
float
Radius of the sonic point in unit of Jupiter radius.
- r_sonic_point
- 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_rate
float
Total mass loss rate of the planet in units of g / s.
- radius_sp
float
Radius at the sonic point in unit of Jupiter radius.
- sound_speed_0
float
Speed of sound, assumed to be constant, in units of km / s.
- mass_loss_rate
- Returns:
- rho_sp
float
Density at the sonic point in units of g / cm ** 3.
- rho_sp
- 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:
- r
numpy.ndarray
orfloat
Radius at which to sample the velocity in unit of radius at the sonic point.
- v_guess
numpy.ndarray
orfloat
, optional Guessed value(s) of velocity, in unit of sound speed, corresponding to the radius(ii)
r
. IfNone
, then the code assumes a standard guess for the velocity. If notNone
,v_guess
must have the same shape asr
. Default isNone
.
- r
- Returns:
- velocity_r
numpy.ndarray
orfloat
numpy array or a single value of velocity at the given radius or radii in unit of sound speed.
- density_r
numpy.ndarray
orfloat
Density sampled at the radius or radii r and in unit of density at the sonic point.
- velocity_r
- 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_mass
float
Planetary mass in unit of Jupiter mass.
- sound_speed_0
float
Constant speed of sound in unit of km / s.
- star_mass
float
Stellar mass in unit of solar mass.
- semi_major_axis
float
Planetary semimajor axis in unit of AU.
- planet_mass
- Returns:
- r_sonic_point
float
Radius of the sonic point in units of Jupiter radius.
- r_sonic_point
- 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:
- r
numpy.ndarray
orfloat
Radius at which to sample the velocity in unit of radius at the sonic point.
- sound_speed_0
float
Constant speed of sound in unit of km / s.
- r_sonic_point
float
Sonic radius in unit of Jupiter radius. Note: ensure that this is computed with
radius_sonic_point_tidal
.- planet_mass
float
Planetary mass in unit of Jupiter mass.
- star_mass
float
Stellar mass in unit of solar mass.
- semi_major_axis
float
Planetary semimajor axis in unit of AU.
- r
- Returns:
- velocity_r
numpy.ndarray
orfloat
numpy array or a single value of velocity at the given radius or radii in unit of sound speed.
- density_r
numpy.ndarray
orfloat
Density sampled at the radius or radii r and in unit of density at the sonic point.
- velocity_r