fluid

fluid.ates_model(planet_radius, planet_mass, planet_equilibrium_temperature, semi_major_axis, stellar_mass, spectrum_at_planet, he_h_ratio=0.1111, escape_radius=2.0, log_base_density=14.0, momentum_threshold=0.05, compiler='gfortran', use_euv_only=False, grid_type='Mixed', twod_approx_method='Rate/2 + Mdot/2', numerical_flux='HLLC', reconstruction='PLM', include_metastable_helium=True, load_ic=False, post_processing_only=False, force_start=False)[source]

Calculates the one-dimensional hydrodynamic escape model for a planet with given parameters using the ATES code.

Parameters:
planet_radiusfloat

Planetary radius in unit of Jupiter radius.

planet_massfloat

Planetary mass in unit of Jupiter masses.

planet_equilibrium_temperaturefloat

Planetary equilibrium temperature in Kelvin.

semi_major_axisfloat

Semi-major axis in unit of astronomical unit.

stellar_massfloat

Stellar host mass in unit of solar masses.

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 populate the helium states (4.8 eV, or 2593 Angstrom). Can be generated using tools.make_spectrum_dict.

he_h_ratiofloat, optional

Helium to hydrogen number ratio. Default value is 0.1111 (solar composition of 10 / 90).

escape_radiusfloat, optional

Escape radius for constant momentum in unit of planetary radii. Default value is 2.0.

log_base_densityfloat, optional

Log mass density at the base of the outflow. Default value is 14.0.

momentum_thresholdfloat, optional

Relative momentum change threshold to consider the simulation as converged. Default value is 0.05.

compilerstr, optional

Fortran compiler to be used. The available options are 'gfortran' and 'ifort'. Default is 'gfortran'.

use_euv_onlybool, optional

Use only EUV for the simulation. Default is False.

grid_typestr, optional

Defines the type of the radial grid. The available options are 'Uniform' (suitable for problems that do not involve large gradients), 'Stretched' (suitable for solutions with moderately high gradients close to the planet surface) or 'Mixed' (suitable for large gradients). Default value is 'Mixed'.

twod_approx_methodstr, optional

Approximation to be used to calculate 2D effects in the mass-loss rate. The available options are 'Mdot/4', 'Rate/2 + Mdot/2', 'Rate/4 + Mdot' or 'alpha = n' where n is a user-defined number. See Caldiroli+2021 (A&A 655) for a detailed discussion about which option better fits your needs. The default value is 'Rate/2 + Mdot/2'.

numerical_fluxstr, optional

Defines which Riemann solver to use in the calculation of cell fluxes. The available options are 'HLLC', 'ROE' or 'LLF'. See Caldiroli+2021 (A&A 655) for a detailed discussion about which option better fits your needs. Default value is 'HLLC'.

reconstructionstr, optional

Defines the reconstruction scheme of the left and right states at a given interface; determines the overall spatial accuracy of the numerical scheme. The available options are 'PLM' or 'WENO3'. See Caldiroli+2021 (A&A 655) for a detailed discussion about which option better fits your needs. Default value is 'PLM'.

include_metastable_heliumbool, optional

Defines whether to include metastable He in the simulation. Default is True.

load_icbool, optional

Defines whether to load an initial condition from a previous simulation Default is False.

post_processing_onlybool, optional

Defines whether to calculate a simulation that only does post-processing in a previous simulation. Default is False.

force_startbool, optional

Defines whether to force the start of a simulation. Default is False.

Returns:
resultsdict

Dictionary containing the results of the ATES simulation. Here is a short description of the dict keys:

  • r: Radial distance in Planetary radii

  • density: Mass density in unit of g / cm^3

  • velocity: Velocity in unit of km / s

  • pressure: Pressure in units of cgs

  • temperature: Temperature in unit of K

  • heating_rate: Heating rate in units of cgs

  • cooling_rate: Cooling rate in units of cgs

  • n_h_i: Neutral H number density

  • n_h_ii: Ionized H number density

  • n_he_i: Neutral He number density

  • n_he_ii: Singly-ionized He number density

  • n_he_iii: Doubly-ionized He number density

  • n_he_23s: Metastable He number density

  • log_m_dot : Log10 of mass loss rate in g / s

fluid.run_ates(compiler='gfortran')[source]

Compiles the ATES Code Fortran routines and executes the main loop.

Parameters:
compilerstr, optional

Choose which compiler to use in the compilation of ATES. The available options are 'gfortran' and 'ifort'. Default is 'gfortran'.