perturbation.ForcedResponse
perturbation.ForcedResponse(
freqs,
X,
L,
est,
n_solve,
scalar_names=(),
ducts=None,
)Nodal perturbation field of a physically-terminated network over a sweep.
Attributes
| Name | Description |
|---|---|
| n_char | Wave count per edge: the acoustic+entropy chars plus one per convected scalar (== n_solve). |
| wave_labels | Per-wave symbols: ("f", "g", "h") then the reacting-scalar names (:attr:scalar_names). |
Methods
| Name | Description |
|---|---|
| field | Perturbation at edge in a variable flavor; shape (n_omega, n_char). |
| plot_response | Plot the total stored acoustic energy across the domain versus frequency. |
| reflection_at | Local acoustic reflection g/f at edge; shape (n_omega,). |
| stored_energy | Total acoustic energy stored in the domain at each swept frequency. |
| waves | Wave amplitudes at edge: (f, g, h) then one convected amplitude per reacting scalar. |
field
perturbation.ForcedResponse.field(edge, basis='network')Perturbation at edge in a variable flavor; shape (n_omega, n_char).
basis is any of characteristics.BASIS_LABELS (default "network" – the solver’s own (mdot', p', h_t')) and re-expresses the acoustic+entropy block; the reacting-scalar waves pass through unchanged (they are already in network units).
plot_response
perturbation.ForcedResponse.plot_response(
n_x=120,
log=True,
title=None,
**layout,
)Plot the total stored acoustic energy across the domain versus frequency.
A first-look resonance map for a forced sweep: peaks mark the lightly-damped modes and their height/width the damping. It plots :meth:stored_energy – the whole-domain energy, with no probe and no boundary flux – so it cannot be fooled by a sensor that happens to sit on a pressure node.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| n_x | int | Interior samples per duct for the energy integral (default 120). | 120 |
| log | bool | Logarithmic energy axis (default True), so weak and strong resonances are both legible. | True |
| title | str | Figure title; a sensible default is used when omitted. | None |
| **layout | Extra Plotly update_layout keyword arguments. |
{} |
Returns
| Name | Type | Description |
|---|---|---|
| plotly.graph_objects.Figure |
reflection_at
perturbation.ForcedResponse.reflection_at(edge)Local acoustic reflection g/f at edge; shape (n_omega,).
The ratio of the upstream- to downstream-running acoustic amplitude – the reflection seen looking downstream at this station.
stored_energy
perturbation.ForcedResponse.stored_energy(n_x=120)Total acoustic energy stored in the domain at each swept frequency.
The Myers acoustic energy density integrated over every length-bearing duct (the field reconstructed from each duct’s face waves) and summed across the network. Boundary flux is deliberately excluded: this is the energy held in the domain, a probe-independent resonance indicator that peaks at every lightly-damped mode – unlike a single-point transfer function, it cannot be blinded by a probe sitting on a pressure node.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| n_x | int | Interior samples per duct for the spatial integral (default 120). | 120 |
Returns
| Name | Type | Description |
|---|---|---|
| ndarray | Stored acoustic energy at each frequency, shape (n_freq,) (arbitrary drive-scale units). |
waves
perturbation.ForcedResponse.waves(edge)Wave amplitudes at edge: (f, g, h) then one convected amplitude per reacting scalar.
Shape (n_omega, n_char). The acoustic/entropy block is the characteristic transform L_e of the network unknowns; each transported scalar’s perturbation is already its own convected wave (the operator propagates it at the mean speed u), so it is surfaced as-is (identity) under the name in :attr:wave_labels. Inert flow (no scalars) returns just (f, g, h) exactly as before.