generators#

Pluggable boundary-condition generators.

A BoundaryGenerator synthesizes the missing CFD-domain outer boundaries for a DomainMesh that ships with only a geometry surface. Datasets are specialized purely by choosing a generator and its constants:

Attributes#

Classes#

BoundaryGenerator

Protocol for boundary-condition generators.

BoxTunnelBoundaries

Generate rectangular wind-tunnel boundaries (inlet/outlet/slip/no_slip).

HemisphereBoundaries

Generate hemispherical open-road boundaries (inlet/outlet/symmetry).

Module Contents#

class physicsnemo_curator.domains.mesh.boundaries.generators.BoundaryGenerator#

Bases: Protocol

Protocol for boundary-condition generators.

Implementations synthesize named outer-boundary meshes from a domain’s known geometry (interior, the existing geometry surface, and global_data).

generate(
domain: physicsnemo.mesh.domain_mesh.DomainMesh,
) dict[str, physicsnemo.mesh.Mesh]#

Return a mapping of new boundary name -> synthesized Mesh.

Parameters:

domain (DomainMesh) – The input domain mesh (interior + existing boundaries + global data).

Returns:

New outer boundaries to inject.

Return type:

dict[str, Mesh]

class physicsnemo_curator.domains.mesh.boundaries.generators.BoxTunnelBoundaries(
*,
x_min: float,
x_max: float,
y_min: float,
y_max: float,
z_height: float,
x_bl: float,
n_per_side: tuple[int, int] = (20, 20),
z_floor: float | None = None,
vehicle_key: str = 'vehicle',
)#

Generate rectangular wind-tunnel boundaries (inlet/outlet/slip/no_slip).

The vertical floor height z_floor is, by default, inferred per sample from the minimum z of the geometry boundary (tire / contact patch); pass z_floor to override.

Parameters:
  • x_min (float) – Streamwise extents of the CFD domain.

  • x_max (float) – Streamwise extents of the CFD domain.

  • y_min (float) – Lateral extents.

  • y_max (float) – Lateral extents.

  • z_height (float) – Vertical extent above the floor.

  • x_bl (float) – Streamwise coordinate of the slip-to-noslip floor transition.

  • n_per_side (tuple[int, int]) – Per-face triangulation resolution.

  • z_floor (float or None) – Fixed floor height; None infers from the geometry boundary.

  • vehicle_key (str) – Boundary key of the geometry surface used for z_floor inference.

generate(
domain: physicsnemo.mesh.domain_mesh.DomainMesh,
) dict[str, physicsnemo.mesh.Mesh]#

Synthesize inlet/outlet/slip/no_slip boundaries for domain.

class physicsnemo_curator.domains.mesh.boundaries.generators.HemisphereBoundaries(
*,
radius: float | None = None,
n_theta: int = 64,
n_phi: int = 32,
y_eps: float = 0.001,
freestream_key: str = 'U_inf',
vehicle_key: str = 'vehicle',
)#

Generate hemispherical open-road boundaries (inlet/outlet/symmetry).

The hemisphere radius is, by default, inferred per sample from the interior point-cloud bounding box; pass radius to override. The inlet/outlet split is along the great half-circle perpendicular to the freestream direction read from global_data[freestream_key], so it is sample-dependent (encodes angle of attack).

Parameters:
  • radius (float or None) – Hemisphere radius; None infers from the interior bbox.

  • n_theta (int) – Hemisphere triangulation resolution.

  • n_phi (int) – Hemisphere triangulation resolution.

  • y_eps (float) – Tolerance for “vertex on the symmetry plane”.

  • freestream_key (str) – global_data key holding the freestream velocity vector.

  • vehicle_key (str) – Boundary key of the geometry surface (provides the silhouette).

generate(
domain: physicsnemo.mesh.domain_mesh.DomainMesh,
) dict[str, physicsnemo.mesh.Mesh]#

Synthesize inlet/outlet/symmetry boundaries for domain.

physicsnemo_curator.domains.mesh.boundaries.generators.logger#