|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Classes | |
| class | ChamberAcousticContour |
Functions | |
| float | area_ratio_from_mach (float M, float gamma) |
| float | subsonic_mach_from_area_ratio (float area_ratio, float gamma) |
| ChamberAcousticContour | build_chamber_contour (*, float chamber_diameter, float A_throat, float length_cylindrical, float gamma, float theta_contraction_deg=45.0, float arc_factor=1.5, Optional[float] truncate_area_ratio=None) |
| np.ndarray | _segment_xs (ChamberAcousticContour contour, int n_axial) |
| MeridionalMesh | contour_mesh (ChamberAcousticContour contour, int n_axial, int nr) |
Real chamber contour -> meridional acoustic mesh (P1, paper Sections III.F and IX).
Replaces the synthetic rectangles of the P0 verification cases with the true chamber
shape. The wall geometry deliberately MIRRORS the suite's hardware construction
(``engine/core/chamber_geometry.py`` / ``chamber_geometry_solver.py`` — the same code
that drives the DXF export), rather than inventing its own parameterization, so the
acoustic domain is the machined part:
x = 0 (injector face)
|-- cylindrical section, radius R_c, length L_cyl
|-- straight contraction cone at half-angle theta_c (hardware default 45 deg)
|-- circular entrance arc, radius f*R_t (hardware f = 1.5), tangent to the cone
| and to the throat: center at (x_throat, (1+f)*R_t), swept down to the throat
x = x_end (truncation plane; the throat itself is never in the domain)
Tangency algebra (matches ``rao()``'s entrance arc and
``contraction_length_horizontal_calc`` exactly): the arc point at angle theta from its
center has slope theta from vertical, so the cone (slope theta_c) meets it smoothly at
r_tangent = R_t * (1 + f*(1 - cos(theta_c))),
L_cone = (R_c - r_tangent) / tan(theta_c),
arc axial span (tangency -> throat) = f * R_t * sin(theta_c).
Where does the ACOUSTIC domain end? (paper Section III.E)
---------------------------------------------------------
Not at the throat: the mean flow is sonic there, and the Helmholtz reduction (paper
Appendix B, assumption i) requires low Mach. Instead the domain is truncated at a plane
in the subsonic chamber, and everything downstream of that plane — convergent remainder,
throat, supersonic bell — is represented by the Marble–Candel compact-nozzle admittance
y = (gamma-1)*Mbar_e/2 (paper Appendix C) applied AT the truncation plane, with Mbar_e
the mean Mach number there. Two defensible conventions, both supported:
* ``truncate_area_ratio=None`` (default): truncate at the convergence-start plane
(end of the cylinder). This is the classical rocket-stability treatment and the
paper's own words ("applied at the nozzle-entrance plane"): the ENTIRE convergent
section + throat is "the compact nozzle". Mbar_e is then the chamber Mach — low
(M ~ 0.1 for a contraction ratio of 6), where the Helmholtz assumptions are most
comfortable. Price: the convergent section's volume is excluded from the mode
computation, so longitudinal frequencies come out slightly high.
* ``truncate_area_ratio = A_plane/A_t in (1, CR)``: extend the domain down the cone/
arc to the plane with that area ratio, and evaluate Mbar_e there. Captures the
convergent volume's effect on the modes (more accurate frequencies); price is that
the neglected mean-flow terms, O(M), grow toward the plane. Keep the plane where
M <~ 0.4 (area ratio >~ 1.6) unless deliberately studying the sensitivity.
Mbar_e comes from the subsonic branch of the isentropic area–Mach relation
(``subsonic_mach_from_area_ratio``); the compact admittance itself is deliberately NOT
computed here — geometry provides the Mach number, ``bcs``/assembly applies
(gamma-1)/2 * M, keeping the physics of the boundary condition in one place.
Meshing a mapped domain
-----------------------
The wall is now a function r_wall(x) instead of a constant, so the structured grid maps
radially: logical node (i, j) sits at (x_i, r_wall(x_i) * j/(nr-1)). The triangulation
topology (``mesh._grid_triangles``) is IDENTICAL to the P0 rectangles — which is the
point: axis handling (row j=0 is exactly r=0), ``nodes_at_x`` for the admittance
column (x_end is an exact grid column by construction), and all of ``assembly.py``
work unchanged. The rigid sloped wall costs nothing: homogeneous Neumann is the
natural BC of the weak form — it is imposed by NOT adding a boundary term there.
The axial grid is built per segment (cylinder / cone / arc), sharing endpoints, so the
segment breaks are exact node columns and no element straddles a slope discontinuity
(same reasoning as ``two_zone_duct_mesh``'s interface column: the pressure is smooth
there, but the wall slope is not, and elements that straddle a corner would smear it).
|
protected |
Axial node columns: per-segment linspaces sharing endpoints, counts allocated proportionally to segment length (minimum 2 columns per nonempty segment), so the cylinder/cone and cone/arc breaks — and x_end itself — are exact node columns.
Definition at line 207 of file contour.py.
Referenced by contour_mesh().
| float engine.stability_hifi.acoustics.contour.area_ratio_from_mach | ( | float | M, |
| float | gamma ) |
Isentropic A/A* as a function of Mach number (either branch). A/A* = (1/M) * [ (2/(gamma+1)) * (1 + (gamma-1)/2 * M^2) ]^((gamma+1)/(2(gamma-1))) Standard 1-D compressible flow result (mass conservation + isentropic relations between a plane at Mach M and the sonic throat).
Definition at line 82 of file contour.py.
Referenced by subsonic_mach_from_area_ratio().
| ChamberAcousticContour engine.stability_hifi.acoustics.contour.build_chamber_contour | ( | * | , |
| float | chamber_diameter, | ||
| float | A_throat, | ||
| float | length_cylindrical, | ||
| float | gamma, | ||
| float | theta_contraction_deg = 45.0, | ||
| float | arc_factor = 1.5, | ||
| Optional[float] | truncate_area_ratio = None ) |
Build the acoustic contour from the same inputs the hardware geometry uses (``ChamberGeometryConfig``: chamber_diameter, A_throat, length_cylindrical; the 45 deg cone and 1.5*R_t arc are the hardware defaults from ``chamber_geometry_solver.solved_chamber_plot``). ``truncate_area_ratio`` selects the acoustic truncation plane (module docstring): None = convergence-start plane; else the plane where A(x)/A_t equals it.
Definition at line 147 of file contour.py.
References subsonic_mach_from_area_ratio().
| MeridionalMesh engine.stability_hifi.acoustics.contour.contour_mesh | ( | ChamberAcousticContour | contour, |
| int | n_axial, | ||
| int | nr ) |
Wall-mapped structured mesh of the acoustic domain. Logical node (i, j) -> (x_i, r_wall(x_i) * j/(nr-1)): row j=0 is exactly the axis, row j=nr-1 exactly the wall, and every column is a constant-x line (so ``nodes_at_x(contour.x_end)`` finds the admittance-plane column exactly, as the boundary assembly requires). Topology shared with the P0 meshes via ``_grid_triangles`` — nothing downstream (assembly, axis conditions, solvers) changes for a mapped domain.
Definition at line 229 of file contour.py.
References _segment_xs().
| float engine.stability_hifi.acoustics.contour.subsonic_mach_from_area_ratio | ( | float | area_ratio, |
| float | gamma ) |
Invert the area–Mach relation on the SUBSONIC branch (0 < M < 1). The relation is not analytically invertible; on (0, 1) it is strictly decreasing from +inf to 1, so for any area_ratio > 1 there is exactly one subsonic root, bracketed and found by Brent's method. Used to get the mean Mach at the acoustic truncation plane for the Marble–Candel admittance.
Definition at line 97 of file contour.py.
References area_ratio_from_mach().
Referenced by build_chamber_contour().