WallGo.config

Dataclasses to store the configs

Classes

Config([configGrid, configEOM, ...])

Data class that holds all the model-independent configs.

ConfigBoltzmannSolver([basisM, basisN, ...])

Holds the config of the BoltzmannSolver class.

ConfigEOM([errTol, pressRelErrTol, ...])

Holds the config of the EOM class.

ConfigGrid([spatialGridSize, ...])

Holds the config of the Grid3Scales class.

ConfigHydrodynamics([tmin, tmax, ...])

Holds the config of the Hydrodynamics class.

ConfigThermodynamics([tmin, tmax, ...])

Holds the config of the Hydrodynamics class.

class Config(configGrid=<factory>, configEOM=<factory>, configHydrodynamics=<factory>, configThermodynamics=<factory>, configBoltzmannSolver=<factory>)[source]

Data class that holds all the model-independent configs. It contains objects of the data classes ConfigGrid, ConfigEOM, ConfigEffectivePotential, ConfigHydrodynamics, ConfigThermodynamics and ConfigBoltzmannSolver. It can also load the configs from an .ini file.

Parameters:
configBoltzmannSolver: ConfigBoltzmannSolver

Holds the config of the BoltzmannSolver class.

configEOM: ConfigEOM

Holds the config of the EOM class.

configGrid: ConfigGrid

Holds the config of the Grid3Scales class.

configHydrodynamics: ConfigHydrodynamics

Holds the config of the Hydrodynamics class.

configThermodynamics: ConfigThermodynamics

Holds the config of the Thermodynamics class.

loadConfigFromFile(filePath)[source]

Load the configs from a file.

Parameters:

filePath (str) – Path of the file where the configs are.

Return type:

None

class ConfigBoltzmannSolver(basisM='Cardinal', basisN='Chebyshev', collisionMultiplier=1.0, truncationOption='AUTO')[source]

Holds the config of the BoltzmannSolver class.

Parameters:
  • basisM (str)

  • basisN (str)

  • collisionMultiplier (float)

  • truncationOption (str)

basisM: str = 'Cardinal'

The position polynomial basis type, either ‘Cardinal’ or ‘Chebyshev’.

basisN: str = 'Chebyshev'

The momentum polynomial basis type, either ‘Cardinal’ or ‘Chebyshev’.

collisionMultiplier: float = 1.0

Factor multiplying the collision term in the Boltzmann equation. Can be used for testing or for studying the solution’s sensibility to the collision integrals. Don’t forget to adjust meanFreePathScale accordingly if this is different from 1 (meanFreePathScale should scale like 1/collisionMultiplier). WARNING: THIS CHANGES THE COLLISION TERMS WRT TO THEIR PHYSICAL VALUE.

truncationOption: str = 'AUTO'

Truncation option for spectral expansions. Can be ‘NONE’ for no truncation, ‘AUTO’ to automatically detect if the spectral expansion is converging and truncate if not, or ‘THIRD’ which always truncates the last third.

class ConfigEOM(errTol=0.001, pressRelErrTol=0.1, maxIterations=20, conserveEnergyMomentum=True, wallThicknessBounds=<factory>, wallOffsetBounds=<factory>, vwMaxDeton=0.99, nbrPointsMinDeton=5, nbrPointsMaxDeton=20, overshootProbDeton=0.05)[source]

Holds the config of the EOM class.

Parameters:
  • errTol (float)

  • pressRelErrTol (float)

  • maxIterations (int)

  • conserveEnergyMomentum (bool)

  • wallThicknessBounds (list[float])

  • wallOffsetBounds (list[float])

  • vwMaxDeton (float)

  • nbrPointsMinDeton (int)

  • nbrPointsMaxDeton (int)

  • overshootProbDeton (float)

conserveEnergyMomentum: bool = True

Flag to enforce conservation of energy and momentum. Normally, this should be set to True, but it can help with numerical stability to set it to False. If True, there is an ambiguity in the separation between \(f_{eq}\) and \(\delta f\) when the out-of-equilibrium particles form a closed system (or nearly closed). This can lead to a divergence of the iterative loop. In the end, it is better to set this to False if most of the degrees of freedom are treated as out-of-equilibrium particle. If most of the dofs are in the background fluid, setting it to True will give better results.

errTol: float = 0.001

The absolute error tolerance for the wall velocity result.

maxIterations: int = 20

Maximum number of iterations for the convergence of the pressure.

nbrPointsMaxDeton: int = 20

Maximal number of points probed to bracket the detonation roots.

nbrPointsMinDeton: int = 5

Minimal number of points probed to bracket the detonation roots.

overshootProbDeton: float = 0.05

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.

pressRelErrTol: float = 0.1

Relative error tolerance for the pressure.

vwMaxDeton: float = 0.99

Maximal Velocity at which the solver will look to find a detonation solution

wallOffsetBounds: list[float]

Lower and upper bounds on wall offset.

wallThicknessBounds: list[float]

Lower and upper bounds on wall thickness (in units of 1/Tnucl).

class ConfigGrid(spatialGridSize=40, momentumGridSize=11, ratioPointsWall=0.5, smoothing=0.1)[source]

Holds the config of the Grid3Scales class.

Parameters:
  • spatialGridSize (int)

  • momentumGridSize (int)

  • ratioPointsWall (float)

  • smoothing (float)

momentumGridSize: int = 11

Number of grid points in the momentum directions (N in 2204.13120). MUST BE ODD.

ratioPointsWall: float = 0.5

Fraction of points inside the wall defined by the interval [-wallThickness+wallCenter, wallThickness+wallCenter]. Should be a number between 0 and 1.

smoothing: float = 0.1

Smoothing factor of the mapping function (the larger the smoother).

spatialGridSize: int = 40

Number of grid points in the spatial direction (M in 2204.13120).

class ConfigHydrodynamics(tmin=0.01, tmax=10.0, relativeTol=1e-06, absoluteTol=1e-10)[source]

Holds the config of the Hydrodynamics class.

Parameters:
  • tmin (float)

  • tmax (float)

  • relativeTol (float)

  • absoluteTol (float)

absoluteTol: float = 1e-10

Absolute tolerance used in Hydrodynamics.

relativeTol: float = 1e-06

Relative tolerance used in Hydrodynamics.

tmax: float = 10.0

Maximum temperature that is probed in Hydrodynamics (in units of Tnucl).

tmin: float = 0.01

Minimum temperature that is probed in Hydrodynamics (in units of Tnucl).

class ConfigThermodynamics(tmin=0.8, tmax=1.2, phaseTracerTol=1e-06, phaseTracerFirstStep=None, interpolationDegree=1)[source]

Holds the config of the Hydrodynamics class.

Parameters:
  • tmin (float)

  • tmax (float)

  • phaseTracerTol (float)

  • phaseTracerFirstStep (float | None)

  • interpolationDegree (int)

interpolationDegree: int = 1

Degree of the splines used in FreeEnergy to interpolate the potential and its derivatives.

phaseTracerFirstStep: float | None = None

Starting step for phaseTrace. If a float, this gives the starting step size in units of the maximum step size dT. If None then uses the initial step size algorithm of scipy.integrate.solve_ivp.

phaseTracerTol: float = 1e-06

Desired accuracy of the phase tracer and the resulting FreeEnergy interpolation.

tmax: float = 1.2

Maximum temperature used in the phase tracing (in units of the estimate for the maximum temperature obtained in the template model).

tmin: float = 0.8

Minimum temperature used in the phase tracing (in units of the estimate for the minimum temperature obtained in the template model).