WallGo.manager
Defines the WallGoManager class which initializes the different object needed for the wall velocity calculation.
Classes
Manages WallGo program flow |
|
|
Data class containing classes and settings for the wall velocity computation. |
|
Settings for the WallSolver. |
- class WallGoManager[source]
Manages WallGo program flow
The WallGoManager is a ‘control’ class which collects together and manages all the various parts of the WallGo Python package for the computation of the bubble wall velocity.
- buildEOM(grid, boltzmannSolver, meanFreePathScale)[source]
Constructs an
EOMobject using internal state from theWallGoManager, and the inputGridandBoltzmannSolver.- Parameters:
grid (Grid3Scales) – Grid3Scales object used to describe the mapping between the physical coordinates to the compact ones.
boltzmannSolver (BoltzmannSolver) – BoltzmannSolver object used to solve the Boltzmann equation.
meanFreePathScale (float) – Estimate of the mean free path of the plasma. This will be used to set the tail lengths in the Grid object. Should be expressed in \(1/T_n\).
- Returns:
EOM object.
- Return type:
- buildGrid(wallThicknessIni, meanFreePathScale, initialMomentumFalloffScale)[source]
Initialize a
Grid3Scalesobject- Parameters:
wallThicknessIni (float) – Initial guess of the wall thickness that will be used to solve the EOM. Should be expressed in units of \(1/T_n\).
meanFreePathScale (float) – Estimate of the mean free path of the plasma. This will be used to set the tail lengths in the Grid object. Should be expressed in units of \(1/T_n\).
initialMomentumFalloffScale (float) – TODO documentation. Should be close to temperature at the wall
- Return type:
- getCurrentCollisionDirectory()[source]
Returns the path to the directory with the collision files.
- Return type:
Path
- initTemperatureRange(freeEnergyArraysHighT=None, freeEnergyArraysLowT=None)[source]
Determine the relevant temperature range and trace the phases over this range. Interpolate the free energy in both phases and store in internal
Thermodynamicsobject.- Parameters:
freeEnergyArraysHighT (WallGo.FreeEnergyArrays, optional) – If provided, use these arrays to initialize the high-T free energy object. If None, the phase will be traced.
freeEnergyArraysLowT (WallGo.FreeEnergyArrays, optional) – If provided, use these arrays to initialize the low-T free energy object. If None, the phase will be traced.
- Return type:
None
- registerModel(model)[source]
Register a physics model with WallGo.
- Parameters:
model (GenericModel) – GenericModel object that describes the model studied.
- Return type:
None
- setPathToCollisionData(directoryPath)[source]
Specify path to collision files for use with the Boltzmann solver. This does not necessarily load the files immediately.
- Parameters:
directoryPath (pathlib.Path) – Directory containing the .hdf5 collision data.
- Returns:
None
- Return type:
None
- setVerbosity(verbosityLevel)[source]
Set the verbosity level.
- Parameters:
verbosityLevel (int) – Verbosity level. Follows the standard convention of the logging module where
DEBUG=10,INFO=20,WARNING=30andERROR=40. In WallGo, most of the information is shown at theINFOlevel. At theDEBUGlevel, more information about the calculation of the pressure at each iteration is shown.- Return type:
None
- setupThermodynamicsHydrodynamics(phaseInfo, veffDerivativeScales, freeEnergyArraysHighT=None, freeEnergyArraysLowT=None)[source]
Must run before
solveWall()and companions. Initialization of internal objects related to equilibrium thermodynamics and hydrodynamics. Specifically, we verify that the input PhaseInfo is valid (distinct phases can be found in the effective potential), estimate the relevant temperature range for wall solving and create efficient approximations for phase free energies over this range using interpolation. Finally, it initializesHydrodynamicsand confirms that it can find a reasonable value for the Jouguet velocity (the transition from hybdrid to detonation solutions). You are required to run this function whenever details of your physics model change to keep the manager’s internal state up to date.- Parameters:
phaseInfo (PhaseInfo) – WallGo object containing the approximate positions of the minima and nucleation temperature.
veffDerativeScales (VeffDerivativeSettings) – WallGo dataclass containing the typical temprature and field scale over which the potential varies.
veffDerivativeScales (VeffDerivativeSettings)
freeEnergyArraysHighT (FreeEnergyArrays)
freeEnergyArraysLowT (FreeEnergyArrays)
- Return type:
None
- setupWallSolver(wallSolverSettings)[source]
Helper for constructing an
EOMobject whose state is tied to equilibrium and hydrodynamical information stored in theWallGoManager. Specifically, uses results ofsetupThermodynamicsHydrodynamics()to find optimal grid settings for wall solving, and createsGridandBoltzmannSolverobjects to use from within theEOM. Be aware that the createdEOMobject can change state if its creatorWallGoManagerinstance is modified (e.g. ifsetupThermodynamicsHydrodynamics()is called)!- Parameters:
wallSolverSettings (WallSolverSettings)
- Return type:
- solveWall(wallSolverSettings)[source]
Solves for the wall velocity
Solves the coupled scalar equation of motion and the Boltzmann equation. Must be ran after
analyzeHydrodynamics()because the solver depends on thermodynamical and hydrodynamical info stored internally in theWallGoManager.- Parameters:
wallSolverSettings (WallSolverSettings) – Configuration settings for the solver.
- Returns:
Object containing the wall velocity and EOM solution, as well as different quantities used to assess the accuracy of the solution.
- Return type:
- solveWallDetonation(wallSolverSettings, onlySmallest=True)[source]
Finds all the detonation solutions by computing the pressure on a grid and interpolating to find the roots.
- Parameters:
wallSolverSettings (WallSolverSettings) – Configuration settings for the solver.
onlySmallest (bool, optional) – Whether or not to only look for one solution. If True, the solver will stop the calculation after finding the first root. If False, it will continue looking for solutions until it reaches the maximal velocity.
- 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]
- validatePhaseInput(phaseInput)[source]
This checks that the user-specified phases are OK. Specifically, the effective potential should have two minima at the given T, otherwise phase transition analysis is not possible.
- Parameters:
phaseInput (PhaseInfo) – Should contain approximate field values at the two phases that WallGo will analyze, and the nucleation temperature. Transition is assumed to go
phaseLocation1–>phaseLocation2.- Return type:
None
- class WallSolver(eom, grid, boltzmannSolver, initialWallThickness)[source]
Data class containing classes and settings for the wall velocity computation.
- Parameters:
eom (EOM)
grid (Grid3Scales)
boltzmannSolver (BoltzmannSolver)
initialWallThickness (float)
- boltzmannSolver: BoltzmannSolver
BoltzmannSolver object used to solve the Boltzmann equation.
- grid: Grid3Scales
Grid3Scales object used to describe the mapping between the physical coordinates to the compact ones.
- initialWallThickness: float
Initial wall thickness used by the solver. Should be expressed in physical units (the units used in
WallGo.EffectivePotential).
- class WallSolverSettings(bIncludeOffEquilibrium=True, meanFreePathScale=50.0, wallThicknessGuess=5.0)[source]
Settings for the WallSolver.
- Parameters:
bIncludeOffEquilibrium (bool)
meanFreePathScale (float)
wallThicknessGuess (float)
- bIncludeOffEquilibrium: bool = True
If False, will ignore all out-of-equilibrium effects (no Boltzmann solving).
- meanFreePathScale: float = 50.0
Estimate of the mean free path of the plasma in \(1/T_n\). This will be used to set the tail lengths in the Grid object. Default is 100.
- wallThicknessGuess: float = 5.0
Initial guess of the wall thickness that will be used to solve the EOM, in units \(1/T_n\). Default is 5.