WallGo.hydrodynamics

Classes for solving the hydrodynamic equations for the fluid velocity and temperature.

Classes

Hydrodynamics(thermodynamics, tmax, tmin, ...)

Class for solving the hydrodynamic equations of the plasma, at distances far enough from the wall such that the wall can be treated as infinitesimally thin.

class Hydrodynamics(thermodynamics, tmax, tmin, rtol, atol)[source]

Class for solving the hydrodynamic equations of the plasma, at distances far enough from the wall such that the wall can be treated as infinitesimally thin.

NOTE: We use the conventions that the velocities are always positive, even in the wall frame (vp and vm). These conventions are consistent with the literature, e.g. with arxiv:1004.4187. These conventions differ from the conventions used in the EOM and Boltzmann part of the code. The conversion is made in findHydroBoundaries().

Initialisation

Parameters:
  • thermodynamics (class)

  • tmax (float)

  • tmin (float)

  • rtol (float)

  • atol (float)

Returns:

cls – An object of the Hydrodynamics class.

Return type:

Hydrodynamics

efficiencyFactor(vw)[source]

Computes the efficiency factor \(\kappa=\frac{4}{v_w^3 \alpha_n w_n}\int d\xi \xi^2 v^2\gamma^2 w\).

Parameters:

vw (float) – Wall velocity.

Returns:

Value of the efficiency factor \(\kappa\).

Return type:

float

fastestDeflag()[source]

Finds the largest wall velocity for which the temperature of the plasma is within the allowed regime, by finding the velocity for which Tm = TMaxLowT or Tp = TMaxHighT. Returns the Jouguet velocity if no solution can be found.

Returns:

vmax – The value of the fastest deflagration/hybrid solution for this model

Return type:

float

findHydroBoundaries(vwTry)[source]

Finds the relevant boundary conditions \(c_1,c_2,T_+,T_-\) and the fluid velocity in right in front of the wall) for the scalar and plasma equations of motion for a given wall velocity and the model’s nucletion temperature.

NOTE: the sign of \(c_1\) is chosen to match the convention for the fluid velocity used in EOM and Hydro. In those conventions, \(v_+\) would be negative, and therefore \(c_1\) has to be negative as well.

Parameters:

vwTry (float) – The value of the wall velocity

Returns:

c1,c2,Tp,Tm,velocityMid – The boundary conditions for the scalar field and plasma equation of motion

Return type:

float

findJouguetVelocity()[source]

Finds the Jouguet velocity for a thermal effective potential, defined by thermodynamics, and at the model’s nucleation temperature, using that the derivative of \(v_+\) with respect to \(T_-\) is zero at the Jouguet velocity.

Returns:

vJ – The value of the Jouguet velocity for this model.

Return type:

float

findMatching(vwTry)[source]

Finds the matching parameters \(v_+, v_-, T_+, T_-\) as a function of the wall velocity and for the nucleation temperature of the model. For detonations, these follow directly from matchDeton(), for deflagrations and hybrids, the code varies \(v_+\) until the temperature in front of the shock equals the nucleation temperature

Parameters:

vwTry (float) – The value of the wall velocity

Returns:

vp,vm,Tp,Tm – The value of the fluid velocities in the wall frame and the temperature right in front of the wall and right behind the wall.

Return type:

float

findvwLTE()[source]

Returns the wall velocity in local thermal equilibrium for the model’s nucleation temperature. The wall velocity is determined by solving the matching condition \(T_+ \gamma_+= T_-\gamma_-\). For small wall velocity \(T_+ \gamma_+> T_-\gamma_-\), and – if a solution exists – \(T_+ \gamma_+< T_-\gamma_-\) for large wall velocity. If the phase transition is too weak for a solution to exist, returns 0. If it is too strong, returns 1. The solution is always a deflagration or hybrid.

Returns:

The value of the wall velocity for this model in local thermal equilibrium.

Return type:

vwLTE

matchDeflagOrHyb(vw, vp=None)[source]

Obtains the matching parameters \(v_+, v_-, T_+, T_-\) for a deflagration or hybrid by solving the matching relations.

Parameters:
  • vw (float) – Wall velocity.

  • vp (float or None, optional) – Plasma velocity in front of the wall \(v_+\). If None, vp is determined from conservation of entropy. Default is None.

Returns:

vp,vm,Tp,Tm – The value of the fluid velocities in the wall frame and the temperature right in front of the wall and right behind the wall.

Return type:

float

matchDeton(vw)[source]

Solves the matching conditions for a detonation. In this case, \(v_w = v_+\) and \(T_+ = T_n\) and \(v_-,T_-\) are found from the matching equations.

Parameters:

vw (float) – Wall velocity

Returns:

vp,vm,Tp,Tm – The value of the fluid velocities in the wall frame and the temperature right in front of the wall and right behind the wall.

Return type:

float

minVelocity()[source]

Finds the smallest velocity for which a deflagration/hybrid is possible for the given nucleation temperature. Returns 0 if no solution can be found.

Returns:

vMin – The smallest velocity that allows for a deflagration/hybrid.

Return type:

float

shockDE(v, xiAndT, shockWave=True)[source]

Hydrodynamic equations for the self-similar coordinate \(\xi = r/t\) and the fluid temperature \(T\) in terms of the fluid velocity \(v\) See e.g. eq. (B.10, B.11) of 1909.10040

Parameters:
  • v (array) – Fluid velocities.

  • xiAndT (array) – Values of the self-similar coordinate \(\xi = r/t\) and the temperature \(T\)

  • shockWave (bool, optional) – If True, the integration happens in the shock wave. If False, it happens in the rarefaction wave. Default is True.

Returns:

eq1, eq2 – The expressions for \(\frac{\partial \xi}{\partial v}\) and \(\frac{\partial T}{\partial v}\)

Return type:

array

slowestDeton()[source]

Finds the smallest detonation wall velocity for which the temperature of the plasma is within the allowed range, by finding the velocity for which Tm = TMaxLowT. For detonations, Tp = Tn, so always in the allowed range. Returns 1 if Tm is above TMaxLowT for vw = 1, and returns the Jouguet velocity if no solution can be found.

Returns:

vmin – The value of the slowest detonation solution for this model

Return type:

float

solveHydroShock(vw, vp, Tp)[source]

Solves the hydrodynamic equations in the shock for a given wall velocity \(v_w\) and matching parameters \(v_+,T_+\) and returns the corresponding nucleation temperature \(T_n\), which is the temperature of the plasma in front of the shock.

Parameters:
  • vw (float) – Wall velocity

  • vp (float) – Value of the fluid velocity in the wall frame, right in front of the bubble

  • Tp (float) – Value of the fluid temperature right in front of the bubble

Returns:

Tn – Nucleation temperature

Return type:

float

strongestShock(vw)[source]

Finds the smallest nucleation temperature possible for a given wall velocity \(v_w\). The strongest shock is found by finding the value of \(T_+\) for which \(v_+=0\) and \(T_-\) is TMinHydro (very small). The correspdoning nucleation temperature is obtained from solveHydroShock at this value of \(T_+\) and \(v_+=0\).

Parameters:

vw (float) – Value of the wall velocity.

Returns:

Tnucl – The nucleation temperature corresponding to the strongest shock.

Return type:

float

vpvmAndvpovm(Tp, Tm)[source]

Finds \(v_+v_-\) and \(v_+/v_-\) as a function of \(T_+, T_-\), from the matching conditions.

Parameters:
  • Tp (float) – Plasma temperature right in front of the bubble wall

  • Tm (float) – Plasma temperature right behind the bubble wall

Returns:

vpvm, vpovmv_+v_- and \(v_+/v_-\)

Return type:

float