pttools.bubble.bubble
A solution of the hydrodynamic equations
Classes
- class pttools.bubble.bubble.Bubble(model, v_wall, alpha_n, solve=True, sol_type=None, label_latex=None, label_unicode=None, wn_guess=None, wm_guess=None, theta_bar=False, t_end=const.T_END_DEFAULT, n_xi=const.N_XI_DEFAULT, thin_shell_t_points_min=const.THIN_SHELL_T_POINTS_MIN, use_bag_solver=False, use_giese_solver=False, log_success=False, allow_invalid=False, log_invalid=True)
Bases:
objectA solution of the hydrodynamic equations
- Parameters:
model (Model)
v_wall (float)
alpha_n (float)
solve (bool)
sol_type (SolutionType)
label_latex (str)
label_unicode (str)
wn_guess (float)
wm_guess (float)
theta_bar (bool)
t_end (float)
n_xi (int)
thin_shell_t_points_min (int)
use_bag_solver (bool)
use_giese_solver (bool)
log_success (bool)
allow_invalid (bool)
log_invalid (bool)
- add_note(note)
Add a note to the bubble
- Parameters:
note (str)
- property ebar: float
- en()
Nucleation energy density \(e_n = e(T_n, \phi_s)\)
- Return type:
float
- property entropy_density_diff: float
- property entropy_density_diff_relative: float
- property entropy_flux_diff: float
Entropy flux difference at the wall
\[\tilde{\gamma}_- \tilde{v}_- {s}_- - \tilde{\gamma}_+ \tilde{v}_+ {s}_+ \]
- property entropy_flux_diff_sh: float
Entropy flux difference at the wall
\[\tilde{\gamma}_{-,sh} \tilde{v}_{-,sh} s_{-,sh} - \tilde{\gamma}_{+,sh} \tilde{v}_{+,sh} s_{+,sh}\]
- property entropy_flux_m: float
Outgoing entropy flux at the wall
\[\tilde{\gamma}_- \tilde{v}_- {s}_- \]
- property entropy_flux_m_sh: float
Outgoing entropy flux at the shock
\[\tilde{\gamma}_{-,sh} \tilde{v}_{-,sh} s_{-,sh}\]
- property entropy_flux_p: float
Incoming entropy flux at the wall
\[\tilde{\gamma}_+ \tilde{v}_+ s_+\]
- property entropy_flux_p_sh: float
Incoming entropy flux at the shock
\[\tilde{\gamma}_{+,sh} \tilde{v}_{+,sh} s_{+,sh}\]
- export(path=None)
Export the bubble data as JSON
- Parameters:
path (str)
- Return type:
Dict[str, any]
- info_str(prec='.4f')
Get a string describing the key quantities of the bubble
- Parameters:
prec (str)
- Return type:
str
- property kappa: float
- property kappa_giese: float
- property kinetic_energy_density: float
- property kinetic_energy_fraction: float
- property mean_adiabatic_index: float
- property omega: float
- plot(fig=None, path=None, **kwargs)
Plot the velocity and enthalpy profiles of the bubble
- plot_v(fig=None, ax=None, path=None, **kwargs)
Plot the velocity profile of the bubble
- plot_w(fig=None, ax=None, path=None, **kwargs)
Plot the enthalpy profile of the bubble
- property s
- solve(sum_rtol_warning=1.5e-2, sum_rtol_error=5e-2, error_prec='.4f', use_bag_solver=False, use_giese_solver=False, log_high_alpha_n_failures=True, log_negative_entropy=True)
Simulate the fluid velocity profile of the bubble
- Parameters:
sum_rtol_warning (float)
sum_rtol_error (float)
error_prec (str)
use_bag_solver (bool)
use_giese_solver (bool)
log_high_alpha_n_failures (bool)
log_negative_entropy (bool)
- property thermal_energy_density: float
- property thermal_energy_density_diff: float
- property thermal_energy_fraction: float
- property trace_anomaly: float
- property ubarf2: float
- property v_mu: float
Maximum fluid velocity behind the bubble wall, \(\mu(\xi)\)
- property va_enthalpy_density: float
- property va_entropy_density_diff: float
- property va_entropy_density_diff_relative: float
- property va_kinetic_energy_density: float
- property va_kinetic_energy_fraction: float
- property va_thermal_energy_density: float
- property va_thermal_energy_density_diff: float
- property va_thermal_energy_fraction: float
- property va_trace_anomaly_diff: float
- property vp_tilde_sh
Velocity in front of the shock in the shock frame
The fluid ahead of the shock is still, and therefore $$ ilde{v}_{+,sh} = v_{sh}$$.
- property vp_vm_tilde_ratio: float
- \[\frac{\tilde{v}_+}{\tilde{v}_-}\]
- property vp_vm_tilde_ratio_giese: float
Giese approximation for \(\frac{\tilde{v}_+}{\tilde{v}_-}\), Giese et al., 2021 eq. 11
- $$frac{tilde{v}_+}{tilde{v}_-} approx frac{
(tilde{v}_+ tilde{v}_- / c_{s,b}^2 - 1) + 3alpha_{bar{theta}_+} }{ (tilde{v}_+ tilde{v}_- / c_{s,b}^2 - 1) + 3 tilde{v}_+ tilde{v}_- alpha_{bar{theta}}_+
}$$
- property vp_vm_tilde_ratio_giese_rel_diff: float
Relative difference of the ratio of the exact and approximate \(\tilde{v}_+, \tilde{v}_-\) ratios from unity
- property wbar: float
Exceptions
- exception pttools.bubble.bubble.NotYetSolvedError
Bases:
RuntimeErrorError for accessing the properties of a bubble that has not been solved yet