bluemira.equilibria.boundary
Boundary conditions for equilibria.
Classes
Object representing a free boundary condition, accounting for only the |
Functions
|
Applies a boundary constraint to the boundaries of an array for use on finite |
Module Contents
- class bluemira.equilibria.boundary.FreeBoundary(grid: bluemira.equilibria.grid.Grid)
Object representing a free boundary condition, accounting for only the plasma psi
- Parameters:
grid (bluemira.equilibria.grid.Grid) – The grid upon which to apply the free Dirichlet boundary condition
- __slots__ = ('dx', 'dz', 'edges', 'f_greens')
- edges
- f_greens
- __call__(psi: numpy.typing.NDArray[numpy.float64], jtor: numpy.typing.NDArray[numpy.float64])
Applies a free boundary (Dirichlet) condition using Green’s functions
- Parameters:
psi (numpy.typing.NDArray[numpy.float64]) – The poloidal magnetic flux [V.s/rad]
jtor (numpy.typing.NDArray[numpy.float64]) – The toroidal current density in the plasma [A/m^2]
Notes
Modifies psi in-place
- bluemira.equilibria.boundary.apply_boundary(rhs: numpy.typing.NDArray[numpy.float64], lhs: numpy.typing.ArrayLike)
Applies a boundary constraint to the boundaries of an array for use on finite difference grids.
- Parameters:
rhs (numpy.typing.NDArray[numpy.float64]) – The right-hand-side of the equality
lhs (numpy.typing.ArrayLike) – The left-hand-side of the equality If 0, will apply a fixed boundary condition of 0 to the rhs
Notes
Modified rhs in-place; applying lhs boundary condition