pttools.bubble.alpha
Functions for computing \(\alpha_n\), the strength parameter at nucleation temperature, and \(\alpha_+\), the strength parameter just in front of the wall.
Functions
- pttools.bubble.alpha.alpha_n_max_bag(v_wall, n_xi=const.N_XI_DEFAULT)
Calculates the maximum relative trace anomaly outside the bubble, \(\alpha_{n,\max}\), in the Bag Model for given \(v_\text{wall}\), which is max \(\alpha_n\) for (supersonic) deflagration.
- pttools.bubble.alpha.alpha_n_max_deflagration_bag(v_wall, n_xi=const.N_XI_DEFAULT)
Calculates the maximum relative trace anomaly outside the bubble, \(\alpha_{n,\max}\), in the Bag Model for given \(v_\text{wall}\), for deflagration. Works also for hybrids, as they are supersonic deflagrations.
- pttools.bubble.alpha.alpha_n_max_detonation_bag(v_wall)
Maximum allowed value of \(\alpha_n\) for a detonation with wall speed \(v_\text{wall}\) in the Bag Model. Same as
alpha_plus_max_detonation(), since for a detonation \(\alpha_n = \alpha_+\), as there is no fluid movement outside the wall.
- pttools.bubble.alpha.alpha_n_max_hybrid_bag(v_wall, n_xi=const.N_XI_DEFAULT)
Calculates the relative trace anomaly outside the bubble, \(\alpha_{n,\max}\), in the Bag Model for given \(v_\text{wall}\), assuming hybrid fluid shell
- Parameters:
v_wall (float) – \(v_\text{wall}\)
n_xi (int) – number of \(\xi\) points
- Returns:
\(\alpha_{n,\max}\)
- Return type:
float
- pttools.bubble.alpha.alpha_n_min_deflagration_bag(v_wall)
Minimum \(\alpha_n\) for a deflagration in the Bag Model. Equal to maximum \(\alpha_n\) for a detonation. Same as
alpha_n_min_hybrid(), as a hybrid is a supersonic deflagration.
- pttools.bubble.alpha.alpha_n_min_hybrid_bag(v_wall)
Minimum \(\alpha_n\) for a hybrid in the Bag Model. Equal to maximum \(\alpha_n\) for a detonation. Same as
alpha_n_min_deflagration(), as a hybrid is a supersonic deflagration.
- pttools.bubble.alpha.alpha_plus_initial_guess(v_wall, alpha_n_given)
Initial guess for root-finding of \(\alpha_+\) from \(\alpha_n\). Linear approx between \(\alpha_{n,\min}\) and \(\alpha_{n,\max}\). Doesn’t do obvious checks like Detonation - needs improving?
- pttools.bubble.alpha.find_alpha_n_bag(v_wall, alpha_p, sol_type=boundary.SolutionType.UNKNOWN, n_xi=const.N_XI_DEFAULT, cs2_fun=bag.cs2_bag, df_dtau_ptr=integrate.DF_DTAU_BAG_PTR)
Calculates the transition strength parameter at the nucleation temperature, \(\alpha_n\), from \(\alpha_+\), for given \(v_\text{wall}\) in the Bag Model.
\[\alpha_n = \frac{4 \Delta \theta (T_n)}{3 w(T_n)} = \frac{4}{3} \frac{ \theta_s(T_n) - \theta_b(T_n) }{w(T_n)}\]- Parameters:
v_wall (float | float64 | ndarray) – \(v_\text{wall}\), wall speed
alpha_p (float) – \(\alpha_+\), the at-wall strength parameter.
sol_type (SolutionType) – type of the bubble (detonation, deflagration etc.)
n_xi (int) – number of \(\xi\) values to investigate
cs2_fun (Callable[[float | float64 | ndarray, float | float64 | ndarray], float | float64 | ndarray] | CPUDispatcher) – \(c_s^2\) function
df_dtau_ptr ((float64, float64*, float64*, float64*) -> none*) – pointer to the differential equations
- Returns:
\(\alpha_n\), global strength parameter
- Return type:
float
- pttools.bubble.alpha.find_alpha_n_from_w_xi(w, xi, v_wall, alpha_p)
Calculates the transition strength parameter with
\[\alpha_n = \frac{w_+}{w_n} \alpha_p\].Model-independent.
- pttools.bubble.alpha.find_alpha_plus_bag(v_wall, alpha_n_given, n_xi=const.N_XI_DEFAULT, cs2_fun_ptr=bag.CS2_BAG_SCALAR_PTR, df_dtau_ptr=integrate.DF_DTAU_BAG_PTR, xtol=const.FIND_ALPHA_PLUS_TOL)
Calculate the at-wall strength parameter \(\alpha_+\) from given \(\alpha_n\) and \(v_\text{wall}\) in the Bag Model.
\[\alpha_+ = \frac{4 \Delta \theta (T_+)}{3 w_+} = \frac{4}{3} \frac{ \theta_s(T_+) - \theta_b(T_+) }{w(T_+)}\](Hindmarsh et al., 2019, eq. 2.11)Uses
scipy.optimize.fsolve()and therefore spends time in the Python interpreter even when jitted. This should be taken into account when running parallel simulations.- Parameters:
v_wall (float | float64 | ndarray) – \(v_\text{wall}\), the wall speed
alpha_n_given (float) – \(\alpha_n\), the global strength parameter
n_xi (int) – number of \(\xi\) points
cs2_fun_ptr ((float64, float64) -> float64*)
df_dtau_ptr ((float64, float64*, float64*, float64*) -> none*)
xtol (float)
- Returns:
\(\alpha_+\), the the at-wall strength parameter
- Return type:
float | float64 | ndarray | callable | CPUDispatcher