carbon

carbon.radiative_processes(spectrum_at_planet)[source]

Calculate the photoionization rate of carbon 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 carbon (11.26 eV, or 1101 Angstrom).

Returns:
phi_cifloat

Ionization rate of C I at null optical depth in unit of 1 / s.

phi_ciifloat

Ionization rate of C II at null optical depth in unit of 1 / s.

a_cifloat

Flux-averaged photoionization cross-section of C I in unit of cm ** 2.

a_ciifloat

Flux-averaged photoionization cross-section of C II in unit of cm ** 2.

a_h_cifloat

Flux-averaged photoionization cross-section of H I in the range absorbed by C I in unit of cm ** 2.

a_h_ciifloat

Flux-averaged photoionization cross-section of H I in the range absorbed by C II in unit of cm ** 2.

a_hefloat

Flux-averaged photoionization cross-section of He I in unit of cm ** 2.

carbon.electron_impact_ionization(electron_temperature)[source]

Calculates the electron impact ionization rate that consumes neutral C and produces singly-ionized C. Based on the formula of Voronov 1997 (https://ui.adsabs.harvard.edu/abs/1997ADNDT..65….1V/abstract).

Parameters:
electron_temperaturefloat

Temperature of the plasma where the electrons are embedded in unit of Kelvin.

Returns:
ionization_rate_cifloat

Ionization rate of neutral C into singly-ionized C in unit of cm ** 3 / s.

ionization_rate_ciifloat

Ionization rate of singly-ionized C into doubly-ionized C in unit of cm ** 3 / s.

carbon.recombination(electron_temperature)[source]

Calculates the rate of recombination of singly-ionized C with an electron to produce a neutral C atom. Based on the formulation of Woodall et al. 2007 (https://ui.adsabs.harvard.edu/abs/2007A%26A…466.1197W/abstract). Also calculates the recombination of doubly-ionized C with an electron to produce a singly-ionized C ion. Based on the formulation of Aldrovandi & Péquignot 1973 (https://ui.adsabs.harvard.edu/abs/1973A%26A….25..137A/abstract).

Parameters:
electron_temperaturefloat

Temperature of the plasma where the electrons are embedded in unit of Kelvin.

Returns:
alpha_rec_cifloat

Recombination rate of C II into C I in units of cm ** 3 / s.

alpha_rec_ciifloat

Recombination rate of C III into C II in units of cm ** 3 / s.

carbon.charge_transfer(temperature)[source]

Calculates the charge exchange rates of C with H, He and Si nuclei. Based on the formulation of Stancil et al. 1998 (https://ui.adsabs.harvard.edu/abs/1998ApJ…502.1006S/abstract), Woodall et al. 2007 (https://ui.adsabs.harvard.edu/abs/2007A%26A…466.1197W/abstract), Glover & Jappsen 2007 (https://ui.adsabs.harvard.edu/abs/2007ApJ…666….1G/abstract), Kingdon & Ferland 1996 (https://ui.adsabs.harvard.edu/abs/1996ApJS..106..205K/abstract), and Brown 1972 (https://ui.adsabs.harvard.edu/abs/1972ApJ…174..511B/abstract).

Parameters:
temperaturefloat

Isothermal temperature of the upper atmosphere in unit of Kelvin.

Returns:
ct_rate_ci_hpfloat

Charge transfer rate between neutral C and H+ in units of cm ** 3 / s.

ct_rate_cii_hfloat

Charge transfer rate between C+ and neutral H in units of cm ** 3 / s.

ct_rate_ci_hepfloat

Charge transfer rate between neutral C and He+ in units of cm ** 3 / s.

ct_rate_cii_siifloat

Charge transfer rate between C+ and neutral Si in units of cm ** 3 / s.

ct_rate_ciii_hfloat)

Charge transfer rate between C++ and neutral H in units of cm ** 3 / s.

ct_rate_ciii_hefloat)

Charge transfer rate between C++ and neutral He in units of cm ** 3 / s.

carbon.ion_fraction(radius_profile, velocity, density, hydrogen_ion_fraction, helium_ion_fraction, planet_radius, temperature, h_fraction, speed_sonic_point, radius_sonic_point, density_sonic_point, spectrum_at_planet, c_fraction=0.0002691534803926914, initial_f_c_ion=array([0., 0.]), relax_solution=False, convergence=0.01, max_n_relax=10, method='odeint', return_rates=False, **options_solve_ivp)[source]

Calculates the fractions of singly- and doubly-ionized carbon 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().

helium_ion_fractionnumpy.ndarray

Number fraction of He ion over total He in the upper atmosphere in function of radius. Similar to the output of helium.population_fraction(), but should be 1 - f_1_r - f_3_r.

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 carbon (11.26 eV, or 1101 Angstrom). Can be generated using tools.make_spectrum_dict.

c_fractionfloat, optional

Fraction of total carbon in the upper atmosphere. Default value assumes solar abundance.

initial_f_c_ionnumpy.ndarray, optional

The initial ion fractions are the y0 of the differential equation to be solved. This array has two items: the initial fraction of singly-ionized and doubly-ionized carbon in the inner layer of the atmosphere. The default value for this parameter is numpy.array([0.0, 0.0]), i.e., fully neutral at the inner layer.

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 the ion fractions. 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_cii_rnumpy.ndarray

Fraction of singly-ionized carbon in function of radius.

f_ciii_rnumpy.ndarray

Fraction of doubly-ionized carbon 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_CI: Photoionization of C I into C II

  • ionization_CII: Photoionization of C II into C III

  • recombination_CII: Recombination of C II into C I

  • recombination_CIII: Recombination of C III into C II

  • e_impact_ion_CI: Electron impact ionization of C I into C II

  • e_impact_ion_CII: Electron impact ionization of C II into C III

  • charge_exchange_CI_HII: Charge exchange between C I and H II

  • charge_exchange_CI_HeII: Charge exchange between C I and He II

  • charge_exchange_CII_HI: Charge exchange between C II and H I

  • charge_exchange_CIII_HI: Charge exchange between C III and H I

  • charge_exchange_CIII_HeI: Charge exchange between C III and He I