WallGo.effectivePotential.EffectivePotential

class EffectivePotential[source]

Bases: ABC

Base class for the effective potential Veff. WallGo uses this to identify phases and their temperature dependence, and computing free energies (pressures) in the two phases.

Hydrodynamical routines in WallGo require the full pressure in the plasma, which in principle is \(p = -V_{\rm eff}(\phi)\) if \(\phi\) is a local minimum. One should not neglect field-independent parts of \(V_{\rm eff}\) that still depend on temperature. These temperature-dependent terms do affect hydrodynamics. Hence, for example, one may not choose the common normalisation of \(V_{\rm eff}(0) = 0\), as this would eliminate these crucial terms. With this in mind, you should ensure that your effective potential is defined with full T-dependence included.

The effective potential defined here is assumed to be real. That is, the evaluate() function is assumed to return a real value.

The user must call configureDerivatives() before evaluating the derivatives to set temperature and field scales of your potential, and optionally update the effectivePotentialError attribute. These quantities are used to estimate the optimal step size when computing derivatives with finite differences. It is done by requiring that the potential error and the error from finite difference calculation contribute similarly to the derivative error. See the VeffDerivativeSettings dataclass.

__init__()

Methods

__init__()

allSecondDerivatives(fields, temperature)

Computes \(d^2V/(d\text{Field}^2)\), \(d^2V/(d\text{Field} dT)\) and \(d^2V/(dT^2)\) at the ssame time.

areDerivativesConfigured()

True if derivative routines are ready to use.

configureDerivatives(settings)

Sets the temperature and field scales.

deriv2Field2(fields, temperature)

Computes the Hessian, \(d^2V/(d\text{Field}^2)\).

deriv2FieldT(fields, temperature)

Computes \(d^2V/(d\text{Field} dT)\).

derivField(fields, temperature)

Compute field-derivative of the effective potential with respect to all background fields, at given temperature.

derivT(fields, temperature)

Calculate derivative of the effective potential with respect to temperature.

evaluate(fields, temperature)

Implement the actual computation of \(V_{\rm eff}(\phi)\) here.

findLocalMinimum(initialGuess, temperature)

Finds a local minimum starting from a given initial configuration of background fields.

getInherentRelativeError()

Attributes

fieldCount

Number of background fields in your potential.

effectivePotentialError

Typical relative accuracy at which the effective potential can be computed.

derivativeSettings

allSecondDerivatives(fields, temperature)[source]

Computes \(d^2V/(d\text{Field}^2)\), \(d^2V/(d\text{Field} dT)\) and \(d^2V/(dT^2)\) at the ssame time. This function is more efficient than calling the other functions one at a time.

Parameters:
  • fields (Fields) – The background field values (e.g.: Higgs, singlet)

  • temperature (array_like) – The temperature

Returns:

  • d2VdField2 (list[Fields]) – Field Hessian of the potential. For each temperature, this is a matrix of the same size as Fields.

  • d2fdFielddT (list[Fields]) – Field derivatives of the potential, one Fields object for each temperature. They are of Fields type since the shapes match nicely.

  • d2VdT2 (array-like) – Temperature second derivative of the potential.

areDerivativesConfigured()[source]

True if derivative routines are ready to use.

Return type:

bool

configureDerivatives(settings)[source]

Sets the temperature and field scales. These quantities are used together with the ‘effectivePotentialError’ attribute to estimate the optimal step size when computing derivatives with finite differences. It is done by requiring that the potential error and the error from finite difference calculation contribute similarly to the derivative error.

Parameters:

settings (VeffDerivativeSettings)

Return type:

None

deriv2Field2(fields, temperature)[source]

Computes the Hessian, \(d^2V/(d\text{Field}^2)\).

Parameters:
  • fields (Fields) – The background field values (e.g.: Higgs, singlet)

  • temperature (npt.ArrayLike) – Temperatures. Either scalar or a 1D array of same length as fields.NumPoints()

Returns:

d2VdField2 – Field Hessian of the potential. For each temperature, this is a matrix of the same size as Fields.

Return type:

list[Fields]

deriv2FieldT(fields, temperature)[source]

Computes \(d^2V/(d\text{Field} dT)\).

Parameters:
  • fields (Fields) – The background field values (e.g.: Higgs, singlet)

  • temperature (array_like) – The temperature

Returns:

d2fdFielddT – Field derivatives of the potential, one Fields object for each temperature. They are of Fields type since the shapes match nicely.

Return type:

list[Fields]

derivField(fields, temperature)[source]

Compute field-derivative of the effective potential with respect to all background fields, at given temperature.

Parameters:
  • fields (Fields) – The background field values (e.g.: Higgs, singlet)

  • temperature (array_like) – The temperature

Returns:

dVdField – Field derivatives of the potential, one Fields object for each temperature. They are of Fields type since the shapes match nicely.

Return type:

list[Fields]

derivT(fields, temperature)[source]

Calculate derivative of the effective potential with respect to temperature.

Parameters:
  • fields (Fields) – The background field values (e.g.: Higgs, singlet)

  • temperature (array_like) – The temperature

Returns:

dVdT – Temperature derivative of the potential, evaluated at each point of the input temperature array.

Return type:

array_like

effectivePotentialError: float

Typical relative accuracy at which the effective potential can be computed. For simple polynomial potentials this is probably close to machine precision of Python floats (1e-15). For loop-corrected potentials a limited factor can be the eg. accuracy of numerical integration. IMPORTANT: YOUR CONCRETE POTENTIAL MUST SET THIS TO A NONZERO POSITIVE FLOAT.

abstractmethod evaluate(fields, temperature)[source]

Implement the actual computation of \(V_{\rm eff}(\phi)\) here. The return value should be (the UV-finite part of) \(V_{\rm eff}\) at the input field configuration and temperature.

Normalization of the potential DOES matter: You have to ensure that full T-dependence is included. Pay special attention to field-independent “constant” terms such as (minus the) pressure from light fermions.

Parameters:
  • fields (Fields | FieldPoint)

  • temperature (_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])

Return type:

_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]

fieldCount: int

Number of background fields in your potential. IMPORTANT: YOUR CONCRETE POTENTIAL MUST SET THIS TO A NONZERO POSITIVE INTEGER.

findLocalMinimum(initialGuess, temperature, tol=None, method=None)[source]

Finds a local minimum starting from a given initial configuration of background fields. Feel free to override this if your model requires more delicate minimization.

Returns:

  • minimum, functionValue (tuple.)

  • minimum (list[float] is the location x of the minimum in field space.)

  • functionValue (float is Veff(x) evaluated at the minimum.)

  • If the input temperature is a numpy array, the returned values will be arrays of same length.

Parameters:
  • initialGuess (Fields)

  • temperature (_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str])

  • tol (float)

  • method (str | None)

Return type:

Tuple[Fields, ndarray]