STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
engine.stability_hifi.acoustics.mesh.MeridionalMesh Class Reference

Public Member Functions

int n_nodes (self)
int n_tri (self)
np.ndarray axis_nodes (self, float tol=1e-9)
np.ndarray nodes_at_x (self, float x_value, float tol=1e-9)
tuple[int, np.ndarray] locate_point (self, float x0, float r0, float tol=1e-9)

Static Public Attributes

np nodes .ndarray
np triangles .ndarray

Detailed Description

P1 (linear) triangular mesh of the meridional half-plane.

``nodes[k] = (x_k, r_k)`` and ``triangles[e] = (i, j, k)`` are node indices with
counter-clockwise winding in the (x, r) plane.

Definition at line 21 of file mesh.py.

Member Function Documentation

◆ axis_nodes()

np.ndarray engine.stability_hifi.acoustics.mesh.MeridionalMesh.axis_nodes ( self,
float tol = 1e-9 )
Node indices on the r=0 axis.

Needed for the axis-regularity condition (Section III.E): p=0 there for m>=1
(essential Dirichlet BC), nothing imposed for m=0 (the ``1/r`` weak-form measure
already enforces the natural condition automatically).

Definition at line 39 of file mesh.py.

References nodes, feedtwin.pid.document.Diagram.nodes, feedtwin.session.model.AssemblyReport.nodes, feedtwin.session.network_trace.NetworkTrace.nodes, and feedtwin.solve.network.Network.nodes.

◆ locate_point()

tuple[int, np.ndarray] engine.stability_hifi.acoustics.mesh.MeridionalMesh.locate_point ( self,
float x0,
float r0,
float tol = 1e-9 )
Find the element containing ``(x0, r0)`` and its P1 barycentric weights there.

Needed to place a *compact* (point) source — like V3's point flame — at an
arbitrary location that generally does not sit exactly on a mesh node: the
weak-form contribution of a point source is the test function evaluated there,
which for a P1 field is exactly the barycentric-coordinate interpolation
returned here (see ``assembly.point_sampling_vector``).

A plain linear scan over triangles, computing barycentric coordinates and
checking they are all in [0, 1] — simple and unambiguous, and fast enough for
the verification-case mesh sizes this is used on (a handful of thousand
triangles, done once per case setup, not per eigen-solve iteration).

Returns ``(triangle_index, weights)`` with ``weights`` the 3 barycentric
coordinates (summing to 1) at the 3 nodes of that triangle.

Definition at line 59 of file mesh.py.

References nodes, feedtwin.pid.document.Diagram.nodes, feedtwin.session.model.AssemblyReport.nodes, feedtwin.session.network_trace.NetworkTrace.nodes, feedtwin.solve.network.Network.nodes, and triangles.

◆ n_nodes()

int engine.stability_hifi.acoustics.mesh.MeridionalMesh.n_nodes ( self)

◆ n_tri()

int engine.stability_hifi.acoustics.mesh.MeridionalMesh.n_tri ( self)

Definition at line 36 of file mesh.py.

References triangles.

◆ nodes_at_x()

np.ndarray engine.stability_hifi.acoustics.mesh.MeridionalMesh.nodes_at_x ( self,
float x_value,
float tol = 1e-9 )
Node indices lying on the vertical (constant-x) line ``x = x_value``, sorted
by radius. Used to find the boundary column for a Robin/admittance condition
(verification case V3's choked-nozzle end) — any structured mesh built by
``_structured_mesh`` has an exact shared column there, so this is exact, not a
nearest-node approximation, as long as ``x_value`` matches a column that was
actually built into the grid (e.g. ``L`` for ``cylinder_mesh(L, ...)``).

Definition at line 48 of file mesh.py.

References nodes, feedtwin.pid.document.Diagram.nodes, feedtwin.session.model.AssemblyReport.nodes, feedtwin.session.network_trace.NetworkTrace.nodes, and feedtwin.solve.network.Network.nodes.

Member Data Documentation

◆ nodes

np engine.stability_hifi.acoustics.mesh.MeridionalMesh.nodes .ndarray
static

◆ triangles

engine.stability_hifi.acoustics.mesh.MeridionalMesh.triangles .ndarray
static

Definition at line 29 of file mesh.py.

Referenced by locate_point(), and n_tri().


The documentation for this class was generated from the following file:
  • EngineDesign/engine/stability_hifi/acoustics/mesh.py