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:

  1. Body Objects: You start by defining one or more physical structures using classes like SteppedBody. Each Body has its own physical properties (radii, depths, heaving status).

  2. BodyArrangement: These individual Body objects are then grouped into a BodyArrangement. This class organizes the collection of bodies. For most use cases, you will use the concrete ConcentricBodyGroup class.

  3. Geometry: Finally, a Geometry object is created from a BodyArrangement and the total water depth (h). The primary role of a Geometry object is to process this physical layout and generate the corresponding list of fluid Domain objects that the MEEMEngine can 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: ABC

Abstract 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 Geometry class is an abstract base class. You will not use this class directly, but rather one of its concrete implementations, such as openflash.basic_region_geometry.BasicRegionGeometry. It establishes the core responsibility of turning a physical layout into a set of solvable fluid domains.

property fluid_domains: List[Domain]
abstract make_fluid_domains() List[Domain][source]

Creates the list of Domain objects from the BodyArrangement.

The BodyArrangement Class

class openflash.geometry.BodyArrangement(bodies: List[Body])[source]

Bases: ABC

Abstract base class for any arrangement.

Like Geometry, the BodyArrangement class is an abstract base class. It defines the required interface for any class that organizes a collection of Body objects.

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: BodyArrangement

A 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 SteppedBody objects for a standard concentric cylinder problem. It takes a list of Body objects and automatically concatenates their properties (like radii and depths) into single arrays that can be used by a Geometry object.

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.