Physics ======================= At the current moment, the module supports: Maxwell phase transition ------------------------ The Maxwell phase transition requires only two EoS files, specified via the **eos_input_file** options under the `model1_BetaEq_files` and `model2_BetaEq_files` sections. This type of phase transition (PT) occurs when the baryon chemical potentials and pressures cross: .. math:: \mu_B^I = \mu_B^{II} \qquad P^I = P^{II} While these quantities are continuous, others such as the baryon density (:math:`n_B`), energy density (:math:`\varepsilon`), charge chemical potential (:math:`\mu_Q`), and charge density (:math:`n_Q`) are discontinuous. To use this phase transition, set the option **synthesis_type** to *'maxwell'*. Gibbs phase transition ---------------------- The Gibbs phase transition requires two beta-equilibrated EoS files, the pure leptonic EoS, and the two gridded EoS files without leptons (i.e., the EoS files that come directly from the Nuclear physics module). \ All of these are specified in the **eos_input_file** options. The gridded EoS files must be a :math:`(\mu_B, \mu_Q)` grid at a single fixed temperature (strangeness-neutral rows only, :math:`\mu_S = 0`) - the module raises an error if more than one temperature value is present. The leptonic EoS file is read as a function of the electron chemical potential :math:`\mu_e` at that same fixed temperature. This is a different grid convention from the one used by the :ref:`statistical mixture ` method, described below. This type of PT occurs over a certain range of densities, where phase II occupies a volume fraction :math:`f` (denoted ``vol_M2`` in the code and in the ``transition.csv`` output) and phase I occupies :math:`1-f`. In this case, pressure, baryon chemical potential, and charge chemical potentials match: .. math:: \mu_B^I = \mu_B^{II} \qquad \mu_Q^I = \mu_Q^{II} \qquad P^I = P^{II} and the net electric charge must be zero: .. math:: (1-f) n_Q^I + f\, n_Q^{II} + n_Q^{leptons} = 0 To use this phase transition, set the option **synthesis_type** to *'gibbs'*. Equation of State interpolation -------------------------------- The interpolation is a well-known method for joining different EoS's by interpolating between them. In this module, the options to use either a hyperbolic-tangent, a Gaussian or a bump function are implemented, where the interpolating functions are defined as: - **Hyperbolic-tangent function**: .. math:: f_\pm(x) = \frac{1}{2} \left[ 1 \pm \tanh \left( \frac{x - \bar{x}}{\Gamma} \right) \right], - **Gaussian-like function**: .. math:: f_-(x) = \begin{cases} 1 & \text{if } x \leq \bar{x} \\ \exp\left( -\dfrac{(x - \bar{x})^n}{\Gamma^n} \right) & \text{if } x > \bar{x} \end{cases} \quad, \qquad f_+(x) = 1 - f_-(x) - **Bump function**: .. math:: f_-(x) = 1 - \exp\left( -\dfrac{ \bar{x}}{x}\right)^n \qquad f_+(x) = 1 - f_-(x) - **Smoothstep function**: .. math:: f_-(x) = \begin{cases} 1 & \text{if } x \leq \bar{x} - \Gamma \\ 1 - \left[ 3t^2 - 2t^3 \right] & \text{if } \bar{x} - \Gamma < x < \bar{x} + \Gamma \\ 0 & \text{if } x \geq \bar{x} + \Gamma \end{cases} \quad, \qquad f_+(x) = 1 - f_-(x), \qquad t = \dfrac{x - (\bar{x} - \Gamma)}{2\Gamma} where :math:`f_+` and :math:`f_-` are the functions used to interpolate between the two EoS's, :math:`\bar{x}` is the midpoint (start) of the merging for the hyperbolic-tangent and smoothstep (Gaussian and Bump) functions, and :math:`\Gamma` controls the width. :math:`x` is some thermodynamic variable to be chosen. The function :math:`Y(x)` to be interpolated can be chosen and it is defined as: .. math:: Y(x) = Y^I f_- (x) + Y^{II} f_+ (x) The options for the variables :math:`Y(x)` are the following: .. math:: \varepsilon(n_B), \quad P(n_B), \quad P(\mu_B), c_s^2(n_B) Other thermodynamic quantities are obtained from standard thermodynamic relations, such as .. math:: P= n_B^2 \frac{\partial \varepsilon/n_B}{\partial n_B} \text{,} \quad n_B = \frac{\partial P}{\partial \mu_B} \text{and} \mu_B= \frac{\varepsilon+ P}{n_B} except in the speed of sound interpolation, where we integrate the EoS upwards, using .. math:: n_{B, i+1} = n_{B, i} + \Delta n_B .. math:: \varepsilon_{i+1} = \varepsilon_i + \Delta n_B \left( \frac{\varepsilon_i + P_i}{n_{B, i}} \right) .. math:: P_{i+1} = P_i + c_s^2(n_{B, i}) \Delta \varepsilon following `arXiv:2106.03890 `_. To use the interpolation, set **synthesis_type** to *'hyperbolic-tangent'*, *'gaussian'*, *'bump'* or *'smoothstep'* in the config file, and use the variables in the **interpolation_method** section. The option **use_thermodynamic_consistency** is enabled by default, and it is highly recommended. If it is disabled by the user, all thermodynamic variables will be obtained by the same equation as for :math:`Y(x)`, which is equivalent to setting the rearrangement terms to zero. Additionally, the parameters :math:`\bar{X}` and :math:`\Gamma` can be computed from the endpoints of the interpolation range, or they can be set by the user. They will be computed automatically if **auto_profile_from_bounds** is enabled. The user can define a small epsilon to avoid numerical problems, such that the boundaries are defined as: .. math:: f_-(x_{\text{start}}) = 1 - \epsilon, \qquad f_-(x_{\text{end}}) = \epsilon Attachment method ----------------- To simply attach the EoS, set **synthesis_type** to '*attach*' and define the **attach_variable** and **attach_value**. For example, if the user chooses **attach_variable=pressure** and **attach_value=10**, then the output will contain the first EoS at :math:`P < 10` MeV fm\ :sup:`-3` and the second EoS at :math:`P > 10` MeV fm\ :sup:`-3`. .. _statistical-mixture: Statistical Mixture ------------------- The statistical mixture requires only two EoS files, specified via the **eos_input_file** options under the `model1_Grid_files` and `model2_Grid_files` sections - the leptonic EoS is not used. These files use a different grid convention from the one required by the Gibbs construction above: they must be a :math:`(T, \mu_B)` grid spanning *multiple* temperature values (the method solves for the mixture point-by-point over the full temperature-baryon chemical potential mesh), and rows are not filtered by :math:`\mu_S`. The method defines a grand potential density (negative pressure) :math:`\omega = -P` that combines the grand potential density from EoS 1 :math:`\omega_1 = -P_1` and EoS 2 :math:`\omega_2 = -P_2` .. math:: \omega = p\,\omega_1 + (1-p)\,\omega_2 + a\,\left[p\,\ln p + (1-p)\,\ln(1-p)\right] + p\,(1-p)\,b, where :math:`a = T/\Delta V` and :math:`b = 2\,T_c/\Delta V`. :math:`\Delta V` is a pseudo-volume that the user can tune to control the stiffness of the phase transitions, and :math:`T_c` is the temperature of the critical point that can be set by the user. For each :math:`(T, \mu_B)` point, the mixing weight :math:`p` is obtained by minimising :math:`\omega` over :math:`p \in (0, 1)`, keeping only stationary points with :math:`\partial^2\omega/\partial p^2 > 0` (local stability); if no stable interior minimum exists, the construction falls back to the lower-:math:`\omega` (higher-pressure) pure phase, :math:`p \in \{0, 1\}`. All the thermodynamics can be calculated following the grand potential density defined above, following `arXiv:2601.07987 `_. If a given :math:`(T, \mu_B)` point lies inside the domain of only one of the two input tables, that table is copied through unchanged (no mixing), which can leave a discontinuity at the edge of the overlap region.