Geometry Module¶
Conceptual Overview¶
The Geometry module provides the classes necessary to define the physical layout of the hydrodynamic problem. It acts as the bridge between the high-level description of physical objects (the Body Module) and the low-level fluid sub-regions (the Domain Module) used by the solver.
The conceptual hierarchy is as follows:
Body Objects: You start by defining one or more physical structures using classes like
SteppedBody. EachBodyhas its own physical properties (radii, depths, heaving status).BodyArrangement: These individual
Bodyobjects are then grouped into aBodyArrangement. This class organizes the collection of bodies. For most use cases, you will use the concreteConcentricBodyGroupclass.Geometry: Finally, a
Geometryobject is created from aBodyArrangementand the total water depth (h). The primary role of aGeometryobject is to process this physical layout and generate the corresponding list of fluidDomainobjects that theMEEMEnginecan solve.
In summary: Bodies -> Arrangement -> Geometry -> Domains
API Reference¶
The module contains three key classes that work together to define the problem’s spatial configuration.
The Geometry Class¶
- class openflash.geometry.Geometry(body_arrangement: BodyArrangement, h: float)[source]¶
Bases:
ABCAbstract base class for a complete problem geometry.
A Geometry consists of a BodyArrangement and the total water depth, and it is responsible for creating the corresponding fluid domains.
The
Geometryclass is an abstract base class. You will not use this class directly, but rather one of its concrete implementations, such asopenflash.basic_region_geometry.BasicRegionGeometry. It establishes the core responsibility of turning a physical layout into a set of solvable fluid domains.
—
The BodyArrangement Class¶
- class openflash.geometry.BodyArrangement(bodies: List[Body])[source]¶
Bases:
ABCAbstract base class for any arrangement.
Like
Geometry, theBodyArrangementclass is an abstract base class. It defines the required interface for any class that organizes a collection ofBodyobjects.- abstract property a: ndarray¶
Array of characteristic radii.
- abstract property d: ndarray¶
Array of characteristic d.
- abstract property heaving: ndarray¶
Array of heaving flags.
- abstract property slant_angle: ndarray¶
Array of slant angles.
—
The ConcentricBodyGroup Class¶
- class openflash.geometry.ConcentricBodyGroup(bodies: List[Body])[source]¶
Bases:
BodyArrangementA concrete arrangement of one or more concentric bodies. For JOSS, this class assumes all bodies are SteppedBody objects.
This is the primary concrete class you will use to group your
SteppedBodyobjects for a standard concentric cylinder problem. It takes a list ofBodyobjects and automatically concatenates their properties (like radii and depths) into single arrays that can be used by aGeometryobject.- property a: ndarray¶
Array of characteristic radii.
- property d: ndarray¶
Array of characteristic d.
- property heaving: ndarray¶
Array of heaving flags.
- property slant_angle: ndarray¶
Array of slant angles.