pylbo.gimli.equilibrium
Classes
Defines a set of variables and constants to be used in defining an Equilibrium |
|
Module Contents
- class pylbo.gimli.equilibrium.Variables
Defines a set of variables and constants to be used in defining an Equilibrium object.
- x, y, z
Coordinates.
- Type:
sympy symbols
- rho0, T0, B0sq
Density, temperature, and magnetic field squared for use in expressions depending on these quantities.
- Type:
sympy symbols
- k2, k3
Wavenumbers.
- Type:
sympy symbols
- rhoc, Tc, B2c, B3c, v2c, v3c, pc
Constants typically used for amplitudes or uniform terms in their corresponding equilibrium quantities.
- Type:
sympy symbols
- p1, p2, p3, p4, p5, p6, p7, p8
Additional free-use constants.
- Type:
sympy symbols
- alpha, beta, delta, theta, tau, lamda, nu
Additional free-use constants.
- Type:
sympy symbols
- r0, rc, rj, Bth0, V, j0, g
Additional constants, originally use in cylindrical coordinates.
- Type:
sympy symbols
Examples
>>> from pylbo.gimli import Variables >>> var = Variables()
- fkey
- class pylbo.gimli.equilibrium.Equilibrium(var, rho0, v02, v03, T0, B02=None, B03=None, resistivity=None, gravity=None, condpara=None, condperp=None, cooling=None, heating=None)
” Class containing all equilibrium expressions and initialisation functions. This object is a required argument when generating user files with the Legolas and Amrvac classes.
- Parameters:
var (
Variables
) – The Variables object containing the symbols to be used in the equilibrium expressions.rho0 (sympy expression) – The equilibrium density expression.
v02 (sympy expressions) – The equilibrium velocity expressions.
v03 (sympy expressions) – The equilibrium velocity expressions.
T0 (sympy expression) – The equilibrium temperature expression.
B02 (sympy expressions) – The equilibrium magnetic field expressions.
B03 (sympy expressions) – The equilibrium magnetic field expressions.
resistivity (sympy expression) – The resistivity expression.
gravity (constant) – The gravitational acceleration.
condpara (sympy expression) – The parallel conduction prescription.
condperp (sympy expression) – The perpendicular conduction prescription.
cooling (sympy expression) – The cooling prescription.
heating (sympy expression) – The heating prescription.
- variables
Variables object from which all expressions are constructed.
- Type:
Variables object
- rho0
The equilibrium density expression.
- Type:
sympy expression
- v02, v03
The equilibrium velocity expressions.
- Type:
sympy expressions
- T0
The equilibrium temperature expression.
- Type:
sympy expression
- B02, B03
The equilibrium magnetic field expressions.
- Type:
sympy expressions
Examples
The example below defines a homogeneous hydrodynamic equilibrium with constant density and temperature. Their values can be set later when passing this equilibrium to the Legolas or Amrvac class along with a dictionary.
>>> from pylbo.gimli import Equilibrium, Variables >>> var = Variables() >>> eq = Equilibrium(var, rho0=var.rhoc, v02=0, v03=0, T0=var.Tc)
- variables
- rho0
- T0
- _dict_phys
- get_physics()
Returns a dictionary containing the physics expressions and the dependencies to check for.
- get_dependencies()
Checks for dependencies on other equilibrium quantities. Returns a dictionary with the replacement expressions for use in Fortran files.