WallGo.equationOfMotion.EOM
- class EOM(boltzmannSolver, thermodynamics, hydrodynamics, grid, nbrFields, meanFreePathScale, wallThicknessBounds, wallOffsetBounds, includeOffEq=False, forceEnergyConservation=True, forceImproveConvergence=False, errTol=0.001, maxIterations=10, pressRelErrTol=0.3679)[source]
Bases:
objectClass that solves the energy-momentum conservation equations and the scalar equations of motion to determine the wall velocity.
Initialization
- Parameters:
boltzmannSolver (BoltzmannSolver) – BoltzmannSolver instance.
thermodynamics (Thermodynamics) – Thermodynamics object
hydrodynamics (Hydrodynamics) – Hydrodynamics object
grid (Grid3Scales) – Object of the class Grid3Scales.
nbrFields (int) – Number of scalar fields on which the scalar potential depends.
meanFreePathScale (float) – Estimate of the mean free path of the particles in the plasma. Should be expressed in physical units (the units used in EffectivePotential).
wallThicknessBounds (tuple) – Tuple containing the bounds the wall thickness (in units of 1/Tnucl). The solver will never explore outside of this interval.
wallOffsetBounds (tuple) – Tuple containing the bounds the wall offset. The solver will never explore outside of this interval.
includeOffEq (bool, optional) – If False, all the out-of-equilibrium contributions are neglected. The default is False.
forceEnergyConservation (bool, optional) – If True, enforce energy-momentum conservation by solving for the appropriate T and vpl profiles. If false, use fixed T and vpl profiles. Default is True.
forceImproveConvergence (bool, optional) – If True, uses a slower algorithm that improves the convergence when computing the pressure. The improved algorithm is automatically used for detonation. Default is False.
errTol (float, optional) – Absolute error tolerance. The default is 1e-3.
maxIterations (int, optional) – Maximum number of iterations for the convergence of pressure. The default is 10.
pressRelErrTol (float, optional) – Relative tolerance in pressure when finding its root.
- Return type:
None.
- __init__(boltzmannSolver, thermodynamics, hydrodynamics, grid, nbrFields, meanFreePathScale, wallThicknessBounds, wallOffsetBounds, includeOffEq=False, forceEnergyConservation=True, forceImproveConvergence=False, errTol=0.001, maxIterations=10, pressRelErrTol=0.3679)[source]
Initialization
- Parameters:
boltzmannSolver (BoltzmannSolver) – BoltzmannSolver instance.
thermodynamics (Thermodynamics) – Thermodynamics object
hydrodynamics (Hydrodynamics) – Hydrodynamics object
grid (Grid3Scales) – Object of the class Grid3Scales.
nbrFields (int) – Number of scalar fields on which the scalar potential depends.
meanFreePathScale (float) – Estimate of the mean free path of the particles in the plasma. Should be expressed in physical units (the units used in EffectivePotential).
wallThicknessBounds (tuple) – Tuple containing the bounds the wall thickness (in units of 1/Tnucl). The solver will never explore outside of this interval.
wallOffsetBounds (tuple) – Tuple containing the bounds the wall offset. The solver will never explore outside of this interval.
includeOffEq (bool, optional) – If False, all the out-of-equilibrium contributions are neglected. The default is False.
forceEnergyConservation (bool, optional) – If True, enforce energy-momentum conservation by solving for the appropriate T and vpl profiles. If false, use fixed T and vpl profiles. Default is True.
forceImproveConvergence (bool, optional) – If True, uses a slower algorithm that improves the convergence when computing the pressure. The improved algorithm is automatically used for detonation. Default is False.
errTol (float, optional) – Absolute error tolerance. The default is 1e-3.
maxIterations (int, optional) – Maximum number of iterations for the convergence of pressure. The default is 10.
pressRelErrTol (float, optional) – Relative tolerance in pressure when finding its root.
- Return type:
None.
Methods
__init__(boltzmannSolver, thermodynamics, ...)Initialization
action(wallParams, vevLowT, vevHighT, ...)Computes the action by using gaussian quadratrure to integrate the Lagrangian.
deltaToTmunu(index, fields, velocityMid, ...)Computes the out-of-equilibrium part of the energy-momentum tensor.
estimatePressureDerivative(wallVelocity)Estimates the derivative of the preessure with respect to the wall velocity from a least square fit of the computed pressure to a line.
estimateTanhError(wallParams, ...)Estimates the EOM error due to the tanh ansatz.
findPlasmaProfile(c1, c2, velocityMid, ...)Solves Eq.
findPlasmaProfilePoint(index, c1, c2, ...)Solves Eq.
Finds the wall velocity by minimizing the action and solving for the solution with 0 total pressure on the wall.
findWallVelocityDetonation(vmin, vmax[, ...])Finds the wall velocity of detonation solutions.
Mostly to estimate errors, recomputes Boltzmann stuff using finite difference derivatives.
plasmaVelocity(fields, T, s1)Computes the plasma velocity as a function of the temperature.
solveWall(wallVelocityMin, wallVelocityMax, ...)Solves the equation \(P_{\rm tot}(\xi_w)=0\) for the wall velocity and wall thicknesses/offsets.
temperatureProfileEqLHS(fields, dPhidz, T, ...)The LHS of Eq.
violationEMPoint(index, c1, c2, velocityMid, ...)Determines the residual of the energy-momentum equations (18) of arXiv:2204.13120v1 locally.
violationOfEMConservation(c1, c2, ...)Determines the RMS (along the grid) of the residual of the energy-momentum equations (18) of arXiv:2204.13120v1.
wallPressure(wallVelocity, wallParams[, ...])Computes the total pressure on the wall by finding the tanh profile that minimizes the action.
wallProfile(z, vevLowT, vevHighT, wallParams)Computes the scalar field profile and its derivative with respect to the position in the wall.
- action(wallParams, vevLowT, vevHighT, temperatureProfile, offEquilDelta00)[source]
Computes the action by using gaussian quadratrure to integrate the Lagrangian.
- Parameters:
wallParams (WallParams) – WallParams object.
vevLowT (Fields) – Field values in the low-T phase.
vevHighT (Fields) – Field values in the high-T phase.
temperatureProfile (ndarray) – Temperature profile on the grid.
offEquilDelta00 (Polynomial) – Off-equilibrium function Delta00.
- Returns:
action – Action spent by the scalar field configuration.
- Return type:
float
- deltaToTmunu(index, fields, velocityMid, offEquilDeltas)[source]
Computes the out-of-equilibrium part of the energy-momentum tensor. See eq. (14) of arXiv:2204.13120v1.
- Parameters:
index (int) – Index of the grid point on which to find the plasma profile.
fields (FieldPoint) – Scalar field profile.
velocityMid (float) – Midpoint of plasma velocity in the wall frame, \((v_+ + v_-)/2\).
offEquilDeltas (BoltzmannDeltas) – BoltzmannDeltas object containing the off-equilibrium Delta functions
- Returns:
T30 (float) – Out-of-equilibrium part of \(T^{30}\).
T33 (float) – Out-of-equilibrium part of \(T^{33}\).
- Return type:
Tuple[float, float]
- estimatePressureDerivative(wallVelocity)[source]
Estimates the derivative of the preessure with respect to the wall velocity from a least square fit of the computed pressure to a line. Must have run wallPressure at velocities close to wallVelocity before calling this function.
- Parameters:
wallVelocity (float) – Wall velocity.
- Returns:
Derivative of the pressure at wallVelocity.
- Return type:
float
- estimateTanhError(wallParams, boltzmannResults, boltzmannBackground, hydroResults)[source]
Estimates the EOM error due to the tanh ansatz. It is estimated by the integral
\[\sqrt{\Delta[\mathrm{EOM}^2]/|\mathrm{EOM}^2|},\]\[\sqrt{\Delta[\mathrm{EOM}^2]/|\mathrm{EOM}^2|},\]with
\[\Delta[\mathrm{EOM}^2]=\int\! dz\, (-\partial_z^2 \phi+ \partial V_{\mathrm{eq}}/ \partial \phi+ \partial V_{\mathrm{out}}/ \partial \phi )^2\]and
\[|\mathrm{EOM}^2|=\int\! dz\, [(\partial_z^2 \phi)^2+ (\partial V_{\mathrm{eq}}/ \partial \phi)^2+ (\partial V_{\mathrm{out}}/ \partial \phi)^2].\]- Parameters:
wallParams (WallParams)
boltzmannResults (BoltzmannResults)
boltzmannBackground (BoltzmannBackground)
hydroResults (HydroResults)
- Return type:
ndarray
- findPlasmaProfile(c1, c2, velocityMid, fields, dPhidz, offEquilDeltas, Tplus, Tminus)[source]
Solves Eq. (20) of arXiv:2204.13120v1 globally. If no solution, the minimum of LHS.
- Parameters:
c1 (float) – Value of the \(T^{30}\) component of the energy-momentum tensor.
c2 (float) – Value of the \(T^{33}\) component of the energy-momentum tensor.
velocityMid (float) – Midpoint of plasma velocity in the wall frame, \((v_+ + v_-)/2\).
fields (Fields) – Scalar field profiles.
dPhidz (Fields) – Derivative with respect to the position of the scalar field profiles.
offEquilDeltas (BoltzmannDeltas) – BoltzmannDeltas object containing the off-equilibrium Delta functions
Tplus (float) – Plasma temperature in front of the wall.
Tminus (float) – Plasma temperature behind the wall.
- Returns:
temperatureProfile (array-like) – Temperature profile in the wall.
velocityProfile (array-like) – Plasma velocity profile in the wall.
success (bool) – Whether or not the temperature profile was found successfully.
- Return type:
Tuple[ndarray, ndarray, bool]
- findPlasmaProfilePoint(index, c1, c2, velocityMid, fields, dPhidz, offEquilDeltas, Tplus, Tminus)[source]
Solves Eq. (20) of arXiv:2204.13120v1 locally. If no solution, the minimum of LHS.
- Parameters:
index (int) – Index of the grid point on which to find the plasma profile.
c1 (float) – Value of the \(T^{30}\) component of the energy-momentum tensor.
c2 (float) – Value of the \(T^{33}\) component of the energy-momentum tensor.
velocityMid (float) – Midpoint of plasma velocity in the wall frame, \((v_+ + v_-)/2\).
fields (FieldPoint) – Scalar field profile.
dPhidz (FieldPoint) – Derivative with respect to the position of the scalar field profile.
offEquilDeltas (BoltzmannDeltas) – BoltzmannDeltas object containing the off-equilibrium Delta functions
Tplus (float) – Plasma temperature in front of the wall.
Tminus (float) – Plasma temperature behind the wall.
- Returns:
T (float) – Temperature at the point grid.xiValues[index].
vPlasma (float) – Plasma velocity at the point grid.xiValues[index].
- Return type:
Tuple[float, float]
- findWallVelocityDeflagrationHybrid(wallThicknessIni=None)[source]
Finds the wall velocity by minimizing the action and solving for the solution with 0 total pressure on the wall. This function only looks for deflagration or hybrid solutions. Returns a velocity of 1 if the pressure peak at \(v_w = v_J\) is not large enough to stop the wall. For detonation solutions, use instead
findWallVelocityDetonation().- Parameters:
wallThicknessIni (float or None, optional) – Initial thickness used for all the walls. Should be expressed in physical units (the units used in EffectivePotential). If None, uses 5/Tnucl. Default is None.
- Returns:
WallGoResults object containing the solution of the equation of motion.
- Return type:
- findWallVelocityDetonation(vmin, vmax, wallThicknessIni=None, nbrPointsMin=5, nbrPointsMax=20, overshootProb=0.05, rtol=0.01, onlySmallest=True)[source]
Finds the wall velocity of detonation solutions. This is more complicated than for deflagrations or hybrids since the pressure is not necessarily monotonous, so the root cannot be bracketed easily. To bracket it, we start at
vminand increase it until the pressure goes from negative to positive. We then use a normal bracketed root finding algorithm to find the wall velocity. In principles, several solutions can exist. The function can either return a list containing all the solutions or the solution containing the smallest wall velocity. For deflagration and hybrid solutions, instead usefindWallVelocityDeflagrationHybrid().- Parameters:
vmin (float) – Smallest wall velocity probed. Must be between the Jouguet velocity and 1.
vmax (float) – Largest wall velocity probed. Must be between vmin and 1.
wallThicknessIni (float | None, optional) – Initial value of the wall thickness. Should be expressed in physical units (the units used in EffectivePotential). If None, it is set to 5/Tnucl. The default is None.
nbrPointsMin (int, optional) – Minimal number of points to bracket the roots. The default is 5.
nbrPointsMax (int, optional) – Maximal number of points to bracket the roots. The default is 20.
overshootProb (float, optional) – Desired probability of overshooting a root. Must be between 0 and 1. A smaller value will lead to more pressure evaluations (and thus a longer time), but is less likely to miss a root. The default is 0.05.
rtol (float, optional) – Relative tolerance on the pressure. The default is 0.01.
onlySmallest (bool, optional) – If True, returns a list containing only the root with the smallest wall velocity. Otherwise, the list contains all the roots. The default is True.
- Returns:
List containing the detonation solutions. If no solutions were found, returns a wall velocity of 0 if the pressure is always positive, or 1 if it is negative (runaway wall). If it is positive at vmin and negative at vmax, the outcome is uncertain and would require a time-dependent analysis, so it returns an empty list.
- Return type:
list[WallGoResults]
- getBoltzmannFiniteDifference()[source]
Mostly to estimate errors, recomputes Boltzmann stuff using finite difference derivatives.
- Return type:
- plasmaVelocity(fields, T, s1)[source]
Computes the plasma velocity as a function of the temperature.
- Parameters:
fields (FieldPoint) – Scalar field profiles.
T (float) – Temperature.
s1 (float) – Value of \(T^{30}-T_{\rm out}^{30}\).
- Returns:
Plasma velocity.
- Return type:
float
- solveWall(wallVelocityMin, wallVelocityMax, wallParamsGuess, wallPressureResultsMin=None, wallPressureResultsMax=None)[source]
Solves the equation \(P_{\rm tot}(\xi_w)=0\) for the wall velocity and wall thicknesses/offsets. The solver only looks between wallVelocityMin and wallVelocityMax
- Parameters:
wallVelocityMin (float) – Lower bound of the bracket in which the root finder will look for a solution. Should satisfy \(0<{\rm wallVelocityMin}<{\rm wallVelocityMax}\).
wallVelocityMax (float) – Upper bound of the bracket in which the root finder will look for a solution. Should satisfy \({\rm wallVelocityMin}<{\rm wallVelocityMax}\leq\xi_J\).
wallParamsGuess (WallParams) – Contains a guess of the wall thicknesses and wall offsets.
wallPressureResultsMin (tuple or None, optional) – Tuple containing the results of the self.wallPressure function evaluated at wallVelocityMin. If None, computes it manually. Default is None.
wallPressureResultsMax (tuple or None, optional) – Tuple containing the results of the self.wallPressure function evaluated at wallVelocityMax. If None, computes it manually. Default is None.
- Returns:
results – Data class containing results.
- Return type:
- temperatureProfileEqLHS(fields, dPhidz, T, s1, s2)[source]
The LHS of Eq. (20) of arXiv:2204.13120v1.
- Parameters:
fields (FieldPoint) – Scalar field profile.
dPhidz (FieldPoint) – Derivative with respect to the position of the scalar field profile.
T (float) – Temperature.
s1 (float) – Value of \(T^{30}-T_{\rm out}^{30}\).
s2 (float) – Value of \(T^{33}-T_{\rm out}^{33}\).
- Returns:
LHS of Eq. (20) of arXiv:2204.13120v1.
- Return type:
float
- violationEMPoint(index, c1, c2, velocityMid, fields, dPhidz, offEquilDeltas, T, v)[source]
Determines the residual of the energy-momentum equations (18) of arXiv:2204.13120v1 locally.
- Parameters:
index (int) – Index of the grid point.
c1 (float) – Value of the \(T^{30}\) component of the energy-momentum tensor.
c2 (float) – Value of the \(T^{33}\) component of the energy-momentum tensor.
velocityMid (float) – Midpoint of plasma velocity in the wall frame, \((v_+ + v_-)/2\).
fields (FieldPoint) – Scalar field profile.
dPhidz (FieldPoint) – Derivative with respect to the position of the scalar field profile.
offEquilDeltas (BoltzmannDeltas) – BoltzmannDeltas object containing the off-equilibrium Delta functions
T (float) – Plasma temperature at the point grid.xiValues[index].
v (float) – Plasma velocity at the point grid.xiValues[index].
- Returns:
violationEM30, violationEM33 – Violation of energy-momentum conservation in T03 and T33 at the point grid.xiValues[index].
- Return type:
float
- violationOfEMConservation(c1, c2, velocityMid, fields, dPhidz, offEquilDeltas, temperatureProfile, velocityProfile, wallThickness)[source]
Determines the RMS (along the grid) of the residual of the energy-momentum equations (18) of arXiv:2204.13120v1.
- Parameters:
index (int) – Index of the grid point.
c1 (float) – Value of the \(T^{30}\) component of the energy-momentum tensor.
c2 (float) – Value of the \(T^{33}\) component of the energy-momentum tensor.
velocityMid (float) – Midpoint of plasma velocity in the wall frame, \((v_+ + v_-)/2\).
fields (FieldPoint) – Scalar field profile.
dPhidz (FieldPoint) – Derivative with respect to the position of the scalar field profile.
offEquilDeltas (BoltzmannDeltas) – BoltzmannDeltas object containing the off-equilibrium Delta functions
temperatureProfile (np.ndarray) – Plasma temperature profile at the grid points.
velocityProfile (np.ndarray) – Plasma velocity profile at the grid points.
wallThickness (float) – Thickness of the wall, used to normalize the violations.
- Returns:
violationEM30, violationEM33 – Violation of energy-momentum conservation in T03 and T33 integrated over the grid, normalized by the wall thickness.
- Return type:
(float, float)
- wallPressure(wallVelocity, wallParams, atol=None, rtol=None, boltzmannResultsInput=None)[source]
Computes the total pressure on the wall by finding the tanh profile that minimizes the action. Can use two different iteration algorithms to find the pressure. If
self.forceImproveConvergence=FalseandwallVelocity<self.hydrodynamics.vJ, it uses a fast algorithm that sometimes fails to converge. Otherwise, or if the previous algorithm converges slowly, it uses a slower, but more robust algorithm.- Parameters:
wallVelocity (float) – Wall velocity at which the pressure is computed.
wallParams (WallParams) – Contains a guess of the wall thicknesses and wall offsets.
atol (float or None, optional) – Absolute tolerance. If None, uses self.pressAbsErrTol. Default is None.
rtol (float or None, optional) – Relative tolerance. If None, uses self.pressRelErrTol. Default is None.
boltzmannResultsInput (BoltzmannResults or None, optional) – Object of the BoltzmannResults class containing the initial solution of the Boltzmann equation. If None, sets the initial deltaF to 0. Default is None.
- Returns:
pressure (float) – Total pressure on the wall.
wallParams (WallParams) – WallParams object containing the wall thicknesses and wall offsets that minimize the action and solve the equation of motion. Only returned if returnExtras is True.
boltzmannResults (BoltzmannResults) – BoltzmannResults object containing the solution of the Boltzmann equation. Only returned if returnExtras is True
boltzmannBackground (BoltzmannBackground) – BoltzmannBackground object containing the solution of the hydrodynamic equations and the scalar field profiles. Only returned if returnExtras is True.
hydroResults (HydroResults) – HydroResults object containing the solution obtained from Hydrodynamics. Only returned if returnExtras is True
emViolationAfter[0] (float) – Violation of energy-momentum conservation in T30 after solving the Boltzmann equation
emViolationAfter[1] (float) – Violation of energy-momentum conservation in T33 after solving the Boltzmann equation
- Return type:
tuple[float, WallParams, BoltzmannResults, BoltzmannBackground, HydroResults, float, float]
- wallProfile(z, vevLowT, vevHighT, wallParams)[source]
Computes the scalar field profile and its derivative with respect to the position in the wall.
- Parameters:
z (ndarray) – Position grid on which to compute the scalar field profile.
vevLowT (Fields) – Scalar field VEVs in the low-T phase.
vevHighT (Fields) – Scalar field VEVs in the high-T phase.
wallParams (WallParams) – WallParams object.
- Returns:
fields (Fields) – Scalar field profile.
dPhidz (Fields) – Derivative with respect to the position of the scalar field profile.
- Return type: