SpectraSim Documentation
Parameter · 07 Run Settings

Export the full scattering matrix

acoustics.full_s_matrix Step 07 · Run Settings

Writes the power-normalised scattering matrix between every propagating mode of every port, at every frequency, to acoustics/s_matrix.csv.

Last updated

Theory

The sweep always solves for ALL ports and modes as excitations at once (one factorisation per frequency), so the scattering matrix costs nothing extra; this switch only decides whether it is written out. The solver gives the outgoing modal amplitudes BB for unit incident amplitudes. The export scales them with the modal powers so that ∣Sab∣2\lvert S_{ab}\rvert^2 is the fraction of the incident power in mode bb that leaves as mode aa, equation (1). Only propagating modes (positive power) are written. The modal amplitudes of every frequency are also stored in acoustics/results.npz, whether or not the switch is on.

For a model without losses the power-normalised matrix is unitary and, without flow, symmetric (reciprocal).

Equations

Sab=Babwaoutwbin,wm=S Re(kz,m)2ρωS_{ab} = B_{ab}\sqrt{\frac{w_a^{out}}{w_b^{in}}}, \qquad w_m = \frac{S\,\mathrm{Re}(k_{z,m})}{2\rho\omega}
(1)
wheremeaningunit
SabS_{ab}Power-normalised scattering coefficient from mode bb (incident) to mode aa (outgoing)-
BabB_{ab}Outgoing amplitude of mode aa for a unit incident amplitude of mode bb-
wmw_mPower per squared amplitude of mode mm at its port (with mean-flow convection: times the convective factor)W/Pa²
SSPort aream²
kz,mk_{z,m}Axial wavenumber1/m
ρ\rhoDensity at the portkg/m³

Default and rule

Default
off
Rule

Off.

Source

The matrix is written from the program's modal solution. Validation: for a straight duct at 5 kHz the six-mode matrix is unitary and reciprocal to 10−910^{-9}.

Valid range on | off

File

Columns f_Hz, row, col, re, im; row and column names are <port>#<mode>. The file grows with the square of the number of modes.