.. _physics-hiiRegionDensityDistribution: HII Region Density Distributions ================================ Class providing models for the distribution of hydrogen number density :math:`n_\mathrm{H}` within H**ii** regions---the probability distribution of gas density within the photoionized nebula. The cumulative density distribution is returned between specified minimum and maximum :math:`n_\mathrm{H}` values, and is used to model the density-dependent emission line ratios and ionization structure of the nebula. Different implementations (e.g.\ log-normal) capture the clumpy, inhomogeneous nature of real H**ii** regions, which affects nebular line luminosities and the ionizing photon budget. **Default implementation:** ``hiiRegionDensityDistributionLogNormal`` Methods ------- ``cumulativeDensityDistribution`` → ``double precision`` Return the cumulative distribution of HII region hydrogen density between a minimum and maximum :math:`n_\mathrm{H}`. * ``double precision, intent(in ) :: densityHydrogenMinimum, densityHydrogenMaximum`` .. _physics-hiiRegionDensityDistributionDeltaFunction: ``hiiRegionDensityDistributionDeltaFunction`` --------------------------------------------- A class for the distribution of hydrogen density in a HII region in which the distribution is a delta function. Specifically: .. math:: p(n_\mathrm{H}) = \delta(n_\mathrm{H} - n_\mathrm{H,0}), where :math:`n_\mathrm{H,0}=`\ ``[densityHydrogen]``. **Parameters** * ``[densityHydrogen]`` (default ``100.0d0``) — The density of hydrogen, :math:`n_\mathrm{H}`, in HII regions (in units of cm\ :math:`^{-3}`). * ``[spin]`` (default ``0.03687d0``) — The fixed value of spin in a :math:`\delta`-function spin distribution. .. _physics-hiiRegionDensityDistributionLogNormal: ``hiiRegionDensityDistributionLogNormal`` ----------------------------------------- A class for the distribution of hydrogen density in a HII region in which the distribution is a lognormal, specifically: .. math:: p(n_\mathrm{H}) = \left\{ \begin{array}{ll} \frac{1}{\sqrt{2\pi} n_\mathrm{H} \sigma} \exp\left(-\frac{1}{2}\left[\frac{\log(n_\mathrm{H})-\log(n_\mathrm{H,0})}{\sigma}\right]^2\right) & \hbox{ if } n_\mathrm{H,min} < n_\mathrm{H} < n_\mathrm{H,max}, \\ 0 & \hbox{ otherwise.} \end{array} \right. **(Default implementation)** **Parameters** * ``[densityHydrogenReference]`` (default ``250.0d0``) — The parameter :math:`n_\mathrm{H,0}` in the log normal distribution of HII region densities. * ``[sigma]`` (default ``1.8d0``) — The parameter :math:`\sigma` in the log normal distribution of HII region densities. * ``[densityHydrogenMinimum]`` (default ``1.0d1``) — Minimum value of hydrogen density in HII regions. * ``[densityHydrogenMaximum]`` (default ``1.0d5``) — Maximum value of hydrogen density in HII regions.