pttools.bubble.bag
Functions for the bag equation of state.
See page 37 of Hindmarsh et al., 2021.
Functions
- pttools.bubble.bag.adiabatic_index_bag(w, phase, theta_s, theta_b=0.)
Returns array of float, adiabatic index (ratio of enthalpy to energy).
- Parameters:
- Returns:
adiabatic index
- Return type:
float | float64 | ndarray
- pttools.bubble.bag.check_thetas(theta_s, theta_b)
Check that \(\theta_s \leq \theta_b\).
- pttools.bubble.bag.cs2_bag(w, phase)
Speed of sound squared in Bag model, equal to \(\frac{1}{3}\) independent of enthalpy \(w\).
- pttools.bubble.bag.cs2_bag_arr(w, phase)
- pttools.bubble.bag.cs2_bag_scalar(w, phase)
The scalar versions of the bag functions have to be compiled to cfuncs if jitting is disabled, as otherwise the cfunc version of the differential cannot be created.
- Parameters:
w (float)
phase (Phase)
- Return type:
float
- pttools.bubble.bag.e_bag(w, phase, theta_s, theta_b=0.)
Energy density \(e\) as a function of enthalpy \(w\), assuming bag model. \(\theta = \frac{e - 3p}{4}\) (“vacuum energy”). Enthalpy and phase can be arrays of the same shape. See also the equation 4.10.
- Parameters:
- Returns:
energy density \(e\)
- Return type:
float | float64 | ndarray
- pttools.bubble.bag.p_bag(w, phase, theta_s, theta_b=0.)
Pressure as a function of enthalpy \(w\), assuming bag model. \(\theta = \frac{e - 3p}{4}\) (trace anomaly or “vacuum energy”). Enthalpy, theta and phase can be arrays of the same shape. See also the equation 4.40.
- Parameters:
- Returns:
pressure \(p\)
- Return type:
float | float64 | ndarray
- pttools.bubble.bag.theta_bag(w, phase, alpha_n)
Trace anomaly \(\theta = \frac{1}{4} (e - 3p)\) in the Bag model. Equation 7.24 in the lecture notes, equation 2.10 in the article.
- pttools.bubble.bag.w_bag(e, phase, theta_s, theta_b=0.)
Enthalpy \(w\) as a function of energy density, assuming bag model. \(\theta = \frac{e - 3p}{4}\) (“vacuum energy”). Enthalpy and phase can be arrays of the same shape. Mentioned on page 23.
- Parameters:
- Returns:
enthalpy \(w\)
- Return type:
float | float64 | ndarray