|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
Functions | |
| List[float] | webster_modes (ChamberAcousticContour contour, float c_sound, int n_modes, int n_elements=4000) |
| float | revolved_volume (ChamberAcousticContour contour) |
Verification helpers for the P1 contour->mesh path (supplementary to the paper's
V1-V6 ladder; these guard the *geometry* machinery specifically, before the V4
cross-code benchmark exists).
Two independent references are built here:
1. ``webster_modes`` — Webster's horn equation, the 1-D limit of the thermoacoustic
Helmholtz equation (paper Eq. 6, passive, uniform c) in a duct of slowly varying
cross-section A(x). Derivation: assume p_hat uniform over each cross-section
(valid when the wall slope is small and the frequency is below the first
transverse cutoff), integrate Eq. 6 over the cross-section, and use the rigid-wall
condition to drop the wall flux:
d/dx ( A(x) c^2 dp_hat/dx ) + omega^2 A(x) p_hat = 0, p_hat'(0)=p_hat'(L)=0.
This is NOT exact for our 2-D domains — its error is O(wall slope^2) — so it is
used as a cross-check on gently tapered contours (10 deg cone: slope^2 ~ 0.03),
where sub-1% agreement is expected, and deliberately NOT on the 45-deg hardware
contour (slope^2 = 1), where self-convergence is the right check instead.
Discretized by 1-D P1 FEM with A(x) linear per element (exact element integrals),
on a grid fine enough (thousands of elements) that its own discretization error is
negligible against the model error being tolerated.
2. ``revolved_volume`` — the exact volume of the revolved contour by adaptive
quadrature of pi * r_wall(x)^2 dx (piecewise-analytic integrand, split at the
segment breaks). The FEM mesh must reproduce this through the identity
2*pi*sum_ij(M2_ij) = 2*pi*int r dOmega = Volume (rows of M2 sum shape functions
to 1) — a direct test that the mapped mesh covers exactly the intended solid of
revolution, independent of any eigenvalue.
| float engine.stability_hifi.validation.contour_checks.revolved_volume | ( | ChamberAcousticContour | contour | ) |
Exact volume [m^3] of the revolved acoustic domain, by adaptive quadrature of pi * r_wall^2 dx split at the segment breaks (integrand is analytic per segment).
Definition at line 77 of file contour_checks.py.
References min.
| List[float] engine.stability_hifi.validation.contour_checks.webster_modes | ( | ChamberAcousticContour | contour, |
| float | c_sound, | ||
| int | n_modes, | ||
| int | n_elements = 4000 ) |
Lowest ``n_modes`` longitudinal frequencies [Hz] of the Webster horn equation
on [0, x_end] with rigid ends, A(x) = pi * r_wall(x)^2.
1-D P1 FEM: with A linear over each element (endpoint values A1, A2, length h),
K_e = c^2 * (A1+A2)/2 / h * [[1, -1], [-1, 1]] (A linear, p' const: exact)
M_e = h/12 * [[3*A1 + A2, A1 + A2], [A1 + A2, A1 + 3*A2]] (cubic integrand: exact)
giving the symmetric GEVP K p = omega^2 M p; rigid ends are natural (no boundary
term). Dense solve — a 1-D problem of a few thousand nodes is trivial.
Definition at line 43 of file contour_checks.py.