WallGo.manager.WallGoManager

class WallGoManager[source]

Bases: object

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.

__init__()[source]
Return type:

None

Methods

__init__()

buildEOM(grid, boltzmannSolver, ...)

Constructs an EOM object using internal state from the WallGoManager, and the input Grid and BoltzmannSolver.

buildGrid(wallThicknessIni, ...)

Initialize a Grid3Scales object

getCurrentCollisionDirectory()

Returns the path to the directory with the collision files.

getMomentumGridSize()

Returns the momentum grid size.

initTemperatureRange([...])

Determine the relevant temperature range and trace the phases over this range.

isModelValid()

True if a valid model is currently registered.

registerModel(model)

Register a physics model with WallGo.

setPathToCollisionData(directoryPath)

Specify path to collision files for use with the Boltzmann solver.

setVerbosity(verbosityLevel)

Set the verbosity level.

setupThermodynamicsHydrodynamics(phaseInfo, ...)

Must run before solveWall() and companions.

setupWallSolver(wallSolverSettings)

Helper for constructing an EOM object whose state is tied to equilibrium and hydrodynamical information stored in the WallGoManager.

solveWall(wallSolverSettings)

Solves for the wall velocity

solveWallDetonation(wallSolverSettings[, ...])

Finds all the detonation solutions by computing the pressure on a grid and interpolating to find the roots.

validatePhaseInput(phaseInput)

This checks that the user-specified phases are OK.

wallSpeedLTE()

Solves wall speed in the Local Thermal Equilibrium (LTE) approximation.

buildEOM(grid, boltzmannSolver, meanFreePathScale)[source]

Constructs an EOM object using internal state from the WallGoManager, and the input Grid and BoltzmannSolver.

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:

EOM

buildGrid(wallThicknessIni, meanFreePathScale, initialMomentumFalloffScale)[source]

Initialize a Grid3Scales object

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:

Grid3Scales

getCurrentCollisionDirectory()[source]

Returns the path to the directory with the collision files.

Return type:

Path

getMomentumGridSize()[source]

Returns the momentum grid size.

Return type:

int

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 Thermodynamics object.

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

isModelValid()[source]

True if a valid model is currently registered.

Return type:

bool

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=30 and ERROR=40. In WallGo, most of the information is shown at the INFO level. At the DEBUG level, 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 initializes Hydrodynamics and 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:
Return type:

None

setupWallSolver(wallSolverSettings)[source]

Helper for constructing an EOM object whose state is tied to equilibrium and hydrodynamical information stored in the WallGoManager. Specifically, uses results of setupThermodynamicsHydrodynamics() to find optimal grid settings for wall solving, and creates Grid and BoltzmannSolver objects to use from within the EOM. Be aware that the created EOM object can change state if its creator WallGoManager instance is modified (e.g. if setupThermodynamicsHydrodynamics() is called)!

Parameters:

wallSolverSettings (WallSolverSettings)

Return type:

WallSolver

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 the WallGoManager.

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:

WallGoResults

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

wallSpeedLTE()[source]

Solves wall speed in the Local Thermal Equilibrium (LTE) approximation.

Returns:

Wall velocity in LTE.

Return type:

float