Inputs.py

class wind_ae.wrapper.wrapper_utils.inputs.input_handler

Bases: object

Class for handling input files (in self.path+’inputs/’) for relaxation code

path = '/home/docs/checkouts/readthedocs.org/user_builds/wind-ae/envs/latest/lib/python3.13/site-packages/wind_ae/'
write_planet_params(Mp, Ruv, Mstar, semimajor, Ftot, Lstar)

Writes planet parameters to wind_ae/inputs/planet_params.inp input file.

Parameters:
  • Mp (float) – Mass of the planet in g

  • Ruv (float) – Radius of the planet in cm

  • Mstar (float) – Mass of the star in g

  • semimajor (float) – Semimajor axis in cm

  • Ftot (float) – Total incident flux in erg/cm^2/s

  • Lstar (float) – Luminosity of the star in erg/s

write_additional_params(num_additional_params, additional_param_names=[0], additional_param_vals=[0])

Writes additional parameters to wind_ae/inputs/add_params.inp input file. This file is intended to allow users to add custom input parameters to the simulation without having to modify the C source code as heavily.

Parameters:
  • num_additional_params (int) – Number of additional parameters

  • additional_param_names (list) – List of additional parameter names

  • additional_param_vals (list) – List of additional parameter values

write_physics_params(mass_fraction, species_list, molec_adjust, atomic_masses=array([0]), phys_file='/home/docs/checkouts/readthedocs.org/user_builds/wind-ae/envs/latest/lib/python3.13/site-packages/wind_ae/inputs/phys_params.inp')

Writes physics parameters to wind_ae/inputs/phys_params.inp input file.

Parameters:
  • mass_fraction (np.array) – MASS fractions of each species

  • species_list (list of str) – List of species names (e.g., ‘Fe III’, ‘fe4’, etc.)

  • molec_adjust (float) – Molecular adjustment factor (default = 2.3 for molec. hydrogen)

  • atomic_masses (np.array) – Atomic masses of each species in g

  • phys_file (str) – Path to the physics parameters input file

write_spectrum(npts, nspecies, spec_date, spec_file, spec_kind, window, resolved, normalized, ion_pot, E_wl, wPhi_wl, sigma_wl, species)

Writes spectrum data to wind_ae/inputs/spectrum.inp input file. NOTE: Windows are in NANOMETERS

Parameters:
  • npts (int) – Number of points in the smoothed spectrum

  • nspecies (int) – Number of species

  • spec_date (str) – ‘YYYY-MM-DD’; Date of the spectrum if using a Lisird spectrum (‘0000-00-00’ otherwise)

  • spec_file (str) – File name of spectrum if using custom (default=’scaled-solar’)

  • spec_kind (str) – Kind of the spectrum (options: ‘mono’, ‘multi’)

  • window (list/array) – Window for the spectrum IN NANOMETERS

  • resolved (list/array) – Resolved values for the spectrum IN NANOMETERS (somewhat DEPRECATED, most functionalities can be covered by “window”)

  • normalized (list/array) – Normalized values for the spectrum IN NANOMETERS(somewhat DEPRECATED, most functionalities can be covered by “window”)

  • ion_pot (list of floats) – Ionization potentials for each species in ergs

  • E_wl (array) – Spectrum’s photon energies (wavelengths) in ergs, array of length npts

  • wPhi_wl (array) – Number of photons per wavelength bin over Ftot, array of length npts

  • sigma_wl (array) – Ionization cross-sections for each species at E_wl, array [npts, nspecies]

  • species (list of str) – List of species names

write_bcs(Rmin, Rmax, rho_rmin, T_rmin, Ys_rmin, Ncol_sp, erf_drop)

Write boundary condition parameters to the wind_ae/inputs/bcs.inp file.

Parameters:
  • Rmin (float) – Minimum radius in units of Rp

  • Rmax (float) – Maximum radius in units of Rp

  • rho_rmin (float) – Density at Rmin in units of RHO0 (default = 1.0E-15 g cm$^{-3}$)

  • T_rmin (float) – Temperature at Rmin in units of T0 (default = 1e4 K)

  • Ys_rmin (list/array) – Neutral fraction of each species at Rmin (default [1.0,…], where 1.0 is completely neutral)

  • Ncol_sp (list/array) – Column densities in units of cm$^{-2}$ at R_sp

  • erf_drop (list/array) – Drop-off parameters for the erf function that transitions from molecular to atomic and bolometric-heating-dominated to photoionization-heating-dominated regions (to compute, run sim.erf_velocity()). Ignored if bolo_heat_cool flag = 0 in inputs/flags.inp.

write_tech(breezeparam, rapidity, erfn, mach_limit)

Write technical parameters to the wind_ae/inputs/tech_params.inp file. Rarely needed.

Parameters:
  • breezeparam (float) – Fraction of sound speed at critical point. If 1.0, is Mach 1 at the sonic point and solution is a transonic wind. If <1.0, is a subsonic breeze.

  • rapidity (float) – Rapidity of linearization transition at critical point.

  • erfn (float) – Used with rapidity to calculate analytic dvdr weighting (DISTINCT FROM bolometric/molecular complementary erf)

  • mach_limit (float) – Limit past which dvdr is purely linearized

write_flags(lyacool, tidalforce, bolo_heat_cool, integrate_outward, integrate_out=True)

Write flags to the wind_ae/inputs/term_ind.inp file.

Parameters:
  • lyacool (int) – Flag for Lya and atomic line cooling (0 or 1)

  • tidalforce (float) – Tidal force scaling factor (1.0 = on, 0 = off)

  • bolo_heat_cool (float) – Bolometric heating/cooling scaling factor (1.0 = on, 0 = off). If 0, complementary error function is not used and there is no bolometric heating/cooling included in the simulation and there is no molecular layer below wind (mu is purely atomic).

  • integrate_outward (int) – If 1, integrates out from sonic point to coriolis radius (0 or 1)

  • integrate_out (bool) – Whether to integrate outward (default: True) (implemented to avoid issues with integrate_outward flag being overwritten elsewhere)