bluemira.equilibria.grad_shafranov

Grad-Shafranov operator classes

Classes

GSSolver

Solver for the Grad-Shafranov system.

Module Contents

class bluemira.equilibria.grad_shafranov.GSSolver(grid: bluemira.equilibria.grid.Grid, *, force_symmetry: bool = False)

Bases: DirectSolver

Inheritance diagram of bluemira.equilibria.grad_shafranov.GSSolver

Solver for the Grad-Shafranov system. Uses lower-upper decomposition during linear solve.

Parameters:
  • grid (bluemira.equilibria.grid.Grid) – The grid upon which to solve the G-S equation.

  • force_symmetry (bool) – If true, the G-S operator will be constructed for the lower half space Z<=0 with symmetry conditions imposed at Z=0.

grid
force_symmetry = False
__call__(b: numpy.typing.NDArray[numpy.float64]) numpy.typing.NDArray[numpy.float64]

Solves the linear system Ax=b using LU decomposition, If the G-S operator is in symmetric form, problem symmetry is explicitly enforced.

Parameters:

b (np.array(nx, nz)) – 2-D X, Z map of the RHS of the G-S equation.

Return type:

numpy.typing.NDArray[numpy.float64]