hyperion.model.helpers¶
-
hyperion.model.helpers.
run_with_vertical_hseq
(prefix, model, n_iter=10, mpi=False, n_processes=4, overwrite=False)¶ Run a model with vertical hydrostatic equilibrium.
Note
this is an experimental function that is currently in development. Please use with care!
The hydrostatic equilibrium condition is only applied to the disk components. The following requirements must be met:
- The model should be an AnalyticalYSOModel
- The model should be defined on a cylindrical polar grid
- The stellar mass should be set
- The model should include at least one disk
The dust properties for the model can be specified as dust or dust+gas densities as this does not have an impact on this calculation - however, the hydrostatic equilibrium is computed assuming an H2 + He mix of gas (i.e. mu=2.279). Note that this calculation also ignores the effects of self-gravity in the disk, which might be important for more massive disks.
Parameters: - prefix : str
The prefix for the output
- model : ~hyperion.model.analytical_yso_model.AnalyticalYSOModel
The model to run
- n_iter : int, optional
The number of iterations to run the model for
- mpi : bool, optional
Whether to run the model in parallel
- n_processes : int, optional
The number of processes to use if
mpi
isTrue
- overwrite : bool, optional
Whether to overwrite previous files
-
hyperion.model.helpers.
tau_to_radius
(model, tau, wav)¶ Given a Model instance with a spherical polar coordinate grid, find the radius from which the optical depth to escape radially is a fixed value.
This only works for spherical polar grids, but works for 1-, 2-, and 3-d grids.
Parameters: - model : ~hyperion.model.Model instance
- tau : float
The optical depth for which to find the surface
- wav : float
The wavelength at which the optical depth is defined
Returns: - r : np.ndarray
The radius or radii at which the optical depth to escape radially is
tau
atwav
. This is a scalar, a 1-d, or a 2-d array depending on the dimensionality of the grid.