model.HydrostaticEquilibrium#
- class model.HydrostaticEquilibrium(fields, properties=None, dm_virial=None, star_virial=None)[source]#
Equivalent to
ClusterModelMethods
__init__(fields[, properties, dm_virial, ...])Initialize the
model.ClusterModelinstance.Equivalent to
self.dm_virial.check_virialDetermine the deviation of the model from hydrostatic equilibrium.
Equivalent to
self.star_virial.check_virialcorrect([mode])Correct the
model.ClusterModelinstance.create_dataset(domain_dimensions[, ...])find_field_at_radius(field, r)Find the value of a field in the profiles at radius r.
find_radius_for_density(density)Determine the radius at which the model reaches the specified density
from_arrays(fields[, stellar_density])Initialize the
model.ClusterModelfromfieldsalone.from_dens_and_entr(rmin, rmax, density, entropy)Construct the model from density and entropy.
from_dens_and_tden(rmin, rmax, density, ...)Construct a hydrostatic equilibrium model using gas density and total density profiles
from_dens_and_temp(rmin, rmax, density, ...)Construct a hydrostatic equilibrium model using gas density and temperature profiles.
from_h5_file(filename[, r_min, r_max])Initialize a
model.ClusterModelinstance from HDF5 file.generate_dm_particles(num_particles[, ...])Generate a set of dark matter particles in virial equilibrium.
generate_gas_particles(num_particles[, ...])Generate a set of gas particles in hydrostatic equilibrium.
generate_star_particles(num_particles[, ...])Generate a set of star particles in virial equilibrium.
generate_tracer_particles(num_particles[, ...])Generate a set of tracer particles based on the gas distribution.
items()Equivalent to
self.fields.items()keys()Equivalent to
self.fields.keys()mass_in_radius(radius)Determine the mass within a given radius.
no_gas(rmin, rmax, total_density[, ...])Initialize a
model.ClusterModelwhich is composed only of collisionless species.panel_plot([fields, r_min, r_max, fig, ...])Plot all of the selected fields in a grid of axes.
plot(field[, r_min, r_max, fig, ax, defaults])Plot a field vs radius from this model using Matplotlib.
set_field(name, value)Set a field with name name to value value, which is an unyt_array.
set_magnetic_field_from_beta(beta[, gaussian])Set a magnetic field radial profile from a plasma beta parameter, assuming beta = p_th/p_B.
set_magnetic_field_from_density(B0[, eta, ...])Set a magnetic field radial profile assuming it is proportional to some power of the density, usually 2/3.
set_rmax(r_max)Truncate the model at a specified maximal radius.
values()Equivalent to
self.fields.values()write_model_to_ascii(output_filename[, ...])Write the equilibrium model to an ascii text file.
write_model_to_binary(output_filename[, ...])Write the model to unformatted Fortran binary.
write_model_to_h5(output_filename[, in_cgs, ...])Write the equilibrium model to an HDF5 file.
Attributes
The default included fields that can be accessed.
The
virial.VirialEquilibriuminstance associated with the dark matter virialization process.Determines if the
model.ClusterModelinstance is physically realizable.The properties of the
model.ClusterModelinstance.The
virial.VirialEquilibriuminstance associated with the stellar virialization process.The
fieldsassociated with thePotentialobject.The number of elements in each
fieldarray.