carafe.spatial.regions
Regions of the plane, marked on the cells of a grid (tensor or patches).
A PlasmaRegion is where the plasma is (the driver and the expansion region,
say): the union of its shapes minus the excluded ones. The spatial models set the plasma
to zero outside it; a fluid model (Fluid2D) will take its cells as unknowns and its
edges as walls. Shapes are anything with contains_points (simgeometry shapes), as
everywhere in carafe.spatial.
Classes
| Name | Description |
|---|---|
PlasmaRegion | The cells of a plasma: the union of shapes minus the union of excluded. |
PlasmaRegionclassdataclass#
class PlasmaRegion(shapes: Sequence[Any], excluded: Sequence[Any] = ())The cells of a plasma: the union of shapes minus the union of excluded.
Attributes
excludedattributeclass attributeinstance attribute#
excluded: Sequence[Any] = ()shapesattributeinstance attribute#
shapes: Sequence[Any]maskmethod#
def mask(grid: CellGrid | PatchGrid) -> np.ndarrayThe cells whose centre is in the region, shape grid.shape.
wall_facesmethod#
def wall_faces(grid: CellGrid | PatchGrid) -> np.ndarrayThe region’s cells that have a neighbour outside it (or the domain edge).
The cells next to a wall, where a fluid model applies its wall conditions; the axis of an r–z domain and periodic seams are not walls.