Back to module page · Back to alphabetical overview
Signature¶
IBM()
Summary¶
Consolidated IBM crossing data for both sides of an immersed interface.
Documentation¶
Each entry (index k) corresponds to one wall crossing -- a face
between a fluid cell (outside) and a solid cell (inside). The wall
position coords[k] is shared by both sides.
Indices are spatial flat indices (C-order in spatial_shape), not
full-field indices. apply_ibm expands them to the full field using
the axes / shape information.
Parameters indexed by crossing (length n_crossings)¶
n_crossings : int
Number of wall crossings.
coords : ndarray, shape (n_crossings, ndim_spatial)
Physical coordinates of each wall crossing (spatial dimensions only).
crossing_key : ndarray of int
Canonical face identifier.
axis : ndarray of int
Spatial axis of each crossing.
direction : ndarray of int
Direction (+1 or -1) from row_out to ghost_out.
Outside (fluid cut-cell) fields¶
row_out, ghost_out : ndarray of int
Spatial flat indices of the fluid cut cell and its solid ghost
neighbour.
opp_out : ndarray of int
Spatial flat index of the opposite fluid neighbour (-1 when
unavailable).
coef_c_out, coef_o_out, coef_w_out, coef_w_sib_out : ndarray of float
Lagrange coefficients.
sib_out : ndarray of int
Crossing index of the sandwich sibling (-1 if not a sandwich).
row_scale_out : ndarray of float, shape (n_spatial_cells,)
Per-spatial-cell conditioning scale for the outside (fluid cut) rows.
Inside (solid cut-cell) fields¶
row_in, ghost_in, opp_in, coef_c_in, coef_o_in, coef_w_in, coef_w_sib_in, sib_in, row_scale_in : analogous inside fields.
Shape information¶
spatial_shape : tuple
Shape of the SDF / spatial grid.
shape : tuple
Full field shape (spatial + non-spatial axes).
axes : tuple of int
Which axes of shape are spatial.
ns_shape : tuple
Non-spatial dimensions of shape.
ns_size : int
Product of non-spatial dims (1 when purely spatial).
n_cells : int
Total number of cells, math.prod(shape).
n_spatial_cells : int
Number of spatial cells, math.prod(spatial_shape).
Source¶
class IBM:
"""Consolidated IBM crossing data for both sides of an immersed interface.
Each entry (index ``k``) corresponds to one *wall crossing* -- a face
between a fluid cell (outside) and a solid cell (inside). The wall
position ``coords[k]`` is shared by both sides.
Indices are **spatial** flat indices (C-order in ``spatial_shape``), not
full-field indices. :func:`apply_ibm` expands them to the full field using
the ``axes`` / ``shape`` information.
Parameters indexed by crossing (length ``n_crossings``)
--------------------------------------------------------
n_crossings : int
Number of wall crossings.
coords : ndarray, shape (n_crossings, ndim_spatial)
Physical coordinates of each wall crossing (spatial dimensions only).
crossing_key : ndarray of int
Canonical face identifier.
axis : ndarray of int
Spatial axis of each crossing.
direction : ndarray of int
Direction (+1 or -1) from ``row_out`` to ``ghost_out``.
Outside (fluid cut-cell) fields
--------------------------------
row_out, ghost_out : ndarray of int
Spatial flat indices of the fluid cut cell and its solid ghost
neighbour.
opp_out : ndarray of int
Spatial flat index of the opposite fluid neighbour (``-1`` when
unavailable).
coef_c_out, coef_o_out, coef_w_out, coef_w_sib_out : ndarray of float
Lagrange coefficients.
sib_out : ndarray of int
Crossing index of the sandwich sibling (``-1`` if not a sandwich).
row_scale_out : ndarray of float, shape (n_spatial_cells,)
Per-spatial-cell conditioning scale for the outside (fluid cut) rows.
Inside (solid cut-cell) fields
--------------------------------
row_in, ghost_in, opp_in, coef_c_in, coef_o_in, coef_w_in,
coef_w_sib_in, sib_in, row_scale_in : analogous inside fields.
Shape information
-----------------
spatial_shape : tuple
Shape of the SDF / spatial grid.
shape : tuple
Full field shape (spatial + non-spatial axes).
axes : tuple of int
Which axes of ``shape`` are spatial.
ns_shape : tuple
Non-spatial dimensions of ``shape``.
ns_size : int
Product of non-spatial dims (1 when purely spatial).
n_cells : int
Total number of cells, ``math.prod(shape)``.
n_spatial_cells : int
Number of spatial cells, ``math.prod(spatial_shape)``.
"""
n_crossings: int
coords: np.ndarray
crossing_key: np.ndarray
axis: np.ndarray
direction: np.ndarray
row_out: np.ndarray
ghost_out: np.ndarray
opp_out: np.ndarray
coef_c_out: np.ndarray
coef_o_out: np.ndarray
coef_w_out: np.ndarray
coef_w_sib_out: np.ndarray
sib_out: np.ndarray
row_scale_out: np.ndarray
row_in: np.ndarray
ghost_in: np.ndarray
opp_in: np.ndarray
coef_c_in: np.ndarray
coef_o_in: np.ndarray
coef_w_in: np.ndarray
coef_w_sib_in: np.ndarray
sib_in: np.ndarray
row_scale_in: np.ndarray
spatial_shape: tuple
shape: tuple
axes: tuple
ns_shape: tuple
ns_size: int
n_cells: int
n_spatial_cells: int