pyflightstream.post.qsteady_noise (provisional)¶
Generated from the docstrings at build time: every one of the 16 names in the __all__ of pyflightstream.post.qsteady_noise has an entry below. The names a guide or an example uses come first; the others follow under Advanced.
The quasi-steady rotor noise model (QS-NOISE, work package F): EXPLORATORY.
Pipeline role: the opt-in exploratory post model. The workspace writes observer
signals, Gutin harmonics and reference comparisons, indexed by
:func:write_qsteady_noise_report.
QS-NOISE is exploratory: it carries no threshold and no gate, and the package
does not wait on it. The module holds the model of route A of the scope (GEO-066
section 2.6 part 5): reconstruct a blade's load against azimuth from the loads
a qsteady_rotor wheel wrote at its clockings, and propagate it to an
observer by a compact tonal model. The comparison with the solver's own
acoustic signals of an unsteady_rotor run is report RPT-099.
THE MODEL. Every blade is replaced by two compact point forces turning with it: its axial force at the axial load's centroid radius, and its in-plane force (tangential and radial) at the torque's centroid radius. The pressure of a point force is the loading term of Farassat's Formulation 1A for a compact source (F. Farassat, "Derivation of Formulations 1 and 1A of Farassat", NASA/TM-2007-214853, 2007; K. S. Brentner and F. Farassat, "Modeling aerodynamically generated sound of helicopter rotors", Progress in Aerospace Sciences 39, 2003, the loading-noise equation of section 3), with the medium at rest: [REF-10], [REF-11]
4 pi p_L(x, t) = [ Ldot_r / (c0 r (1 - M_r)^2) ]
+ [ (L_r - L_M) / (r^2 (1 - M_r)^2) ]
+ [ L_r (r Mdot_r + c0 (M_r - M^2)) / (c0 r^2 (1 - M_r)^3) ]
every bracket taken at the emission time tau. L is the force the
surface exerts ON THE FLUID (the negative of the aerodynamic load a solver
reports on the blade), r the distance from the source to the observer and
rhat its direction, M the source velocity over c0, L_r = L . rhat,
Ldot_r = (dL/dtau) . rhat, L_M = L. M, M_r = M. rhat and
Mdot_r = (dM/dtau) . rhat. The first term is the far field; the other two
are the near field, which is kept because an observer a few radii away is
inside it at the shaft harmonic. The first bracket is of order 1/r, the second of
order 1/r^2, and the third mixes the two: its r Mdot_r part is of order 1/r,
so the source acceleration is not purely near field.
THE RETARDATION. The emission time of an observer time t is the root
tau < t of |x(t) - y(tau)| = c0 (t - tau), unique for a subsonic
source, found by bisection between t and t - |x(t) - y(t)| / (c0 - v_max)
where the left side is known to be negative. The observer may move (an
observer carried with the hub in flight is x(t) = x0 + V t): the equation
holds point by point, so a moving observer only changes which points are
sampled.
NO THICKNESS TERM. The model carries loading noise only, so an unloaded moving blade is silent. The thickness term needs the blade's volume, which no loads export holds.
THE CHECK IN CLOSED FORM. For a steady load turning on a circle with a hub
at rest, the far-field harmonic n (of the shaft frequency) of B
identical blades has the rms amplitude (Gutin 1936, in the form of
M. E. Goldstein, Aeroacoustics, 1976, chapter 3, and of the compact steady
limit of D. B. Hanson, "Helicoidal surface theory for harmonic noise of
propellers in the far field", AIAA Journal 18, 1980) [REF-12], [REF-13], [REF-14]
p_n = B n Omega / (2 sqrt(2) pi c0 r)
| F_a cos(theta) J_n(n M_a sin(theta)) + F_t c0 / (Omega r_t) J_n(n M_t sin(theta)) |
for n a multiple of B and zero otherwise, theta from the axis,
M_a and M_t the rotational Mach numbers of the two centroids and
F_a, F_t the force on the fluid. :func:gutin_harmonic_rms computes
it and the tests hold the time-domain model to it.
THE CONVENTIONS. axis is the rotor's axis and reference the
direction of azimuth zero (its part square to the axis). Azimuth is
right-handed about the axis, from e1 (the reference) towards
e2 = axis x e1; e_r = cos psi e1 + sin psi e2 and
e_t = axis x e_r. A tangential force is counted along e_t and a
signed omega_rad_s turns the blades in that sense when positive. Blade
b (from zero) sits b / B of a turn from blade one, right-handed, as
:func:pyflightstream.post.axes.placed_blade_azimuth_deg places them.
The workspace writer :func:write_qsteady_noise_report indexes the exploratory
loading signals recorded by the ordinary post stage.
Advanced¶
pyflightstream.post.qsteady_noise.AzimuthalSeries
dataclass
¶
AzimuthalSeries(
mean: float,
cosines: tuple[float, ...] = (),
sines: tuple[float, ...] = (),
)
A periodic function of azimuth: mean + sum_n (a_n cos n psi + b_n sin n psi).
cosines[n - 1] is a_n and sines[n - 1] is b_n.
pyflightstream.post.qsteady_noise.BladeLoad
dataclass
¶
BladeLoad(
axial: AzimuthalSeries,
tangential: AzimuthalSeries,
radial: AzimuthalSeries,
axial_radius_m: float,
inplane_radius_m: float,
)
One blade's aerodynamic load (ON THE BLADE, in N) against its own azimuth.
axial is along the rotor axis, tangential along e_t and
radial along e_r (module docstring). The axial force acts at
axial_radius_m and the in-plane force at inplane_radius_m.
steady
classmethod
¶
steady(
*,
axial: float,
tangential: float,
axial_radius_m: float,
radial: float = 0.0,
inplane_radius_m: float | None = None,
) -> BladeLoad
Return a load the same at every azimuth (the in-plane radius defaults to the axial).
pyflightstream.post.qsteady_noise.PointForce
dataclass
¶
PointForce(
position: Trajectory,
velocity: Trajectory,
acceleration: Trajectory,
force: Trajectory,
force_rate: Trajectory,
max_speed_m_s: float,
)
A compact source: a point force ON THE FLUID moving through the medium at rest.
Each callable takes emission times tau (shape (n,)) and returns an
(n, 3) array: the position, velocity and acceleration of the point,
the force and its rate of change. max_speed_m_s bounds the speed.
pyflightstream.post.qsteady_noise.RotorMotion
dataclass
¶
RotorMotion(
blades: int,
omega_rad_s: float,
azimuth0_deg: float,
axis: tuple[float, float, float],
reference: tuple[float, float, float],
hub_m: tuple[float, float, float] = (0.0, 0.0, 0.0),
hub_velocity_m_s: tuple[float, float, float] = (
0.0,
0.0,
0.0,
),
)
How a rotor's blades move through the medium at rest.
omega_rad_s is signed (positive right-handed about axis);
azimuth0_deg is blade one's azimuth at tau = 0; hub_m the hub
at tau = 0 and hub_velocity_m_s its velocity through the medium (in
flight, the negative of the free stream).
pyflightstream.post.qsteady_noise.SignalComparison
dataclass
¶
SignalComparison(
rms_ratio: float,
level_difference_db: float,
correlation: float,
normalized_rms_difference: float,
mean_ratio: float | None,
)
How a predicted pressure record compares with a reference on the same times.
Every measure is of the fluctuation about each record's own mean:
rms_ratio is predicted over reference, level_difference_db is
20 log10 of it, correlation the Pearson coefficient and
normalized_rms_difference the rms of the difference of the two
fluctuations over the reference's rms. mean_ratio compares the means
(None when the reference's is zero).
pyflightstream.post.qsteady_noise.azimuth_from_moment
¶
azimuth_from_moment(
moment: ArrayLike,
axial_force: float,
*,
axis: ArrayLike,
reference: ArrayLike,
) -> float
Return a blade's azimuth in degrees in [0, 360) from its moment about the hub.
The in-plane part of the moment of an axial force F_a applied at
r e_r is -r F_a e_t, so its direction gives e_t and the
azimuth. It neglects the in-plane moment of the in-plane force (a blade
whose load centroid sits off the disc plane); used where a record gives
the loads but not the blade's position (the unsteady run of RPT-099).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
moment
|
array_like
|
The blade's moment about the hub, three components in the fixed frame. |
required |
axial_force
|
float
|
The blade's axial force F_a, in newtons. |
required |
axis
|
array_like
|
The rotor's axis, a vector of three in the fixed frame. |
required |
reference
|
array_like
|
The direction of azimuth zero, its part square to the axis, in the fixed frame. |
required |
Returns:
| Type | Description |
|---|---|
float
|
The azimuth in degrees in [0, 360). |
Raises:
| Type | Description |
|---|---|
ProductError
|
When the axial force is zero or the moment has no in-plane part. |
pyflightstream.post.qsteady_noise.compare_signals
¶
compare_signals(
reference: Sequence[float] | Array,
predicted: Sequence[float] | Array,
) -> SignalComparison
Return the :class:SignalComparison of two records sampled at the same times.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
reference
|
sequence of float or Array
|
The reference pressure record, in Pa. |
required |
predicted
|
sequence of float or Array
|
The predicted record at the same times, in Pa. |
required |
Returns:
| Type | Description |
|---|---|
SignalComparison
|
The rms ratio, the level difference in dB and the correlation of the two records. |
Raises:
| Type | Description |
|---|---|
ProductError
|
When the records differ in length, hold fewer than two samples, or either is constant. |
pyflightstream.post.qsteady_noise.emission_times
¶
emission_times(
observer_times_s: ArrayLike,
observer_positions_m: ArrayLike,
position: Trajectory,
*,
c0: float,
max_speed_m_s: float,
) -> Array
Return the emission time of every observer time (module docstring, THE RETARDATION).
observer_positions_m holds the observer's position at each of its
times, one row of three per time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
observer_times_s
|
array_like
|
The observer times, in seconds. |
required |
observer_positions_m
|
array_like
|
The observer's position at each of its times, one row of three per time, in metres. |
required |
position
|
Trajectory
|
The source's position as a function of time. |
required |
c0
|
float
|
The speed of sound, in m/s. |
required |
max_speed_m_s
|
float
|
The source's largest speed, in m/s, which must be below |
required |
Returns:
| Type | Description |
|---|---|
Array
|
The emission time of each observer time, in seconds. |
Raises:
| Type | Description |
|---|---|
ProductError
|
When the source is not subsonic. |
pyflightstream.post.qsteady_noise.fit_azimuthal_series
¶
fit_azimuthal_series(
azimuths_deg: ArrayLike,
values: ArrayLike,
*,
orders: int | None = None,
) -> AzimuthalSeries
Fit an :class:AzimuthalSeries to samples by least squares.
orders harmonics need 2 orders + 1 distinct azimuths; by default
the fit takes the most the samples carry, (distinct - 1) // 2.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
azimuths_deg
|
array_like
|
Each sample's azimuth, in degrees. |
required |
values
|
array_like
|
The value at each azimuth. |
required |
orders
|
int
|
The harmonics fitted; the most the samples carry when None. |
None
|
Returns:
| Type | Description |
|---|---|
AzimuthalSeries
|
The mean and the cosine and sine coefficients of each order. |
Raises:
| Type | Description |
|---|---|
ProductError
|
When there is not one value per azimuth, no sample at all, or more harmonics are asked than the samples carry. |
Examples:
>>> fit = fit_azimuthal_series([0.0, 120.0, 240.0], [3.0, 0.0, 0.0])
>>> round(fit.mean, 12), round(fit.cosines[0], 12), round(fit.sines[0], 12) + 0.0
(1.0, 2.0, 0.0)
pyflightstream.post.qsteady_noise.gutin_harmonic_rms
¶
gutin_harmonic_rms(
harmonic: int,
*,
blades: int,
omega_rad_s: float,
c0: float,
distance_m: float,
theta_rad: float,
axial_force_n: float,
tangential_force_n: float,
axial_radius_m: float,
inplane_radius_m: float,
) -> float
Return the far-field rms amplitude of shaft harmonic harmonic of a steady rotor, in Pa.
The closed form of the module docstring (Gutin), for blades identical
blades with a steady load, the hub at rest in the medium, omega_rad_s
positive and the tangential force counted along the rotation; zero for a
harmonic that is not a multiple of blades. The sign convention of the
forces cancels in the amplitude as long as both are on the blade or both
on the fluid.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
harmonic
|
int
|
The shaft harmonic. |
required |
blades
|
int
|
The blade count. |
required |
omega_rad_s
|
float
|
The rotor's angular speed, in rad/s, positive. |
required |
c0
|
float
|
The speed of sound, in m/s. |
required |
distance_m
|
float
|
The observer's distance from the hub, in metres. |
required |
theta_rad
|
float
|
The observer's angle from the rotor's axis, in radians. |
required |
axial_force_n
|
float
|
Each blade's steady axial force, in newtons. |
required |
tangential_force_n
|
float
|
Each blade's steady tangential force, along the rotation, in newtons. |
required |
axial_radius_m
|
float
|
The radius the axial force acts at, in metres. |
required |
inplane_radius_m
|
float
|
The radius the tangential force acts at, in metres. |
required |
Returns:
| Type | Description |
|---|---|
float
|
The rms amplitude in Pa; 0.0 for a harmonic that is not a multiple of |
Raises:
| Type | Description |
|---|---|
ProductError
|
If |
Examples:
>>> gutin_harmonic_rms(1, blades=2, omega_rad_s=100.0, c0=340.0, distance_m=10.0,
... theta_rad=0.5, axial_force_n=1.0, tangential_force_n=0.0,
... axial_radius_m=1.0, inplane_radius_m=1.0)
0.0
pyflightstream.post.qsteady_noise.loading_noise
¶
loading_noise(
observer_times_s: ArrayLike,
observer_positions_m: ArrayLike,
source: PointForce,
*,
c0: float,
) -> Array
Return the loading-noise pressure of one compact source (Formulation 1A), in Pa.
The equation is in the module docstring; observer_positions_m holds
the observer's position at each of its times.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
observer_times_s
|
array_like
|
The observer times, in seconds. |
required |
observer_positions_m
|
array_like
|
The observer's position at each of its times, one row of three per time, in metres. |
required |
source
|
PointForce
|
The compact source: its force on the fluid and its trajectory. |
required |
c0
|
float
|
The speed of sound, in m/s. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
The pressure at each observer time, in Pa. |
pyflightstream.post.qsteady_noise.reconstruct_blade_load
¶
reconstruct_blade_load(
azimuths_deg: ArrayLike,
forces: ArrayLike,
moments: ArrayLike,
*,
axis: ArrayLike,
reference: ArrayLike,
orders: int | None = None,
axial_radius_m: float | None = None,
inplane_radius_m: float | None = None,
) -> BladeLoad
Return one blade's load against azimuth from blade samples at known azimuths.
Route A of QS-NOISE: a quasi-steady wheel of B blades solved at k
clockings gives B k samples of one blade's load, each blade at its own
azimuth, when the blades are identical. The three force components are
fitted by :func:fit_azimuthal_series (orders as there) and the
radii are the centroids of the mean loads, r_a = -mean(M_t) / mean(F_a)
and r_t = mean(M_a) / mean(F_t), unless stated.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
azimuths_deg
|
array_like
|
Each sample's azimuth, in degrees. |
required |
forces
|
array_like
|
The blade's force at each sample, one row of three per sample, in newtons in the fixed frame. |
required |
moments
|
array_like
|
The blade's moment about the hub at each sample, one row of three per sample, in N m in the fixed frame. |
required |
axis
|
array_like
|
The rotor's axis, a vector of three in the fixed frame. |
required |
reference
|
array_like
|
The direction of azimuth zero, its part square to the axis, in the fixed frame. |
required |
orders
|
int
|
The harmonics fitted, as :func: |
None
|
axial_radius_m
|
float
|
The radius of the axial force, in metres; the load centroid when None. |
None
|
inplane_radius_m
|
float
|
The radius of the in-plane force, in metres; the load centroid when None. |
None
|
Returns:
| Type | Description |
|---|---|
BladeLoad
|
The axial, tangential and radial force series and the two radii. |
Raises:
| Type | Description |
|---|---|
ProductError
|
When a centroid is asked of a mean force that is zero, or comes out not positive. |
pyflightstream.post.qsteady_noise.rotating_components
¶
rotating_components(
azimuths_deg: ArrayLike,
forces: ArrayLike,
moments: ArrayLike,
*,
axis: ArrayLike,
reference: ArrayLike,
) -> Array
Return, per sample, (F_a, F_t, F_r, M_a, M_t) of a blade at its azimuth.
forces and moments are the blade's force and its moment about the
HUB in the fixed frame, one row of three per sample. F_a, F_t and
F_r are the force along the axis, e_t and e_r; M_a and
M_t the moment about the axis and about e_t. For a force applied at
r e_r, M_a = r F_t and M_t = -r F_a.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
azimuths_deg
|
array_like
|
Each sample's azimuth, in degrees. |
required |
forces
|
array_like
|
The blade's force at each sample, one row of three per sample, in newtons in the fixed frame. |
required |
moments
|
array_like
|
The blade's moment about the hub at each sample, one row of three per sample, in N m in the fixed frame. |
required |
axis
|
array_like
|
The rotor's axis, a vector of three in the fixed frame. |
required |
reference
|
array_like
|
The direction of azimuth zero, its part square to the axis, in the fixed frame. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
One row |
pyflightstream.post.qsteady_noise.rotor_loading_noise
¶
rotor_loading_noise(
observer_times_s: ArrayLike,
observer_position_m: ArrayLike,
motion: RotorMotion,
load: BladeLoad,
*,
c0: float,
observer_velocity_m_s: ArrayLike = (0.0, 0.0, 0.0),
) -> Array
Return a rotor's loading-noise pressure at one observer, in Pa.
The observer is at observer_position_m at time zero and moves at
observer_velocity_m_s through the medium (the hub's velocity for an
observer carried with the aircraft). The sum of :func:loading_noise
over :func:rotor_point_forces.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
observer_times_s
|
array_like
|
The observer times, in seconds. |
required |
observer_position_m
|
array_like
|
The observer's position at time zero, in metres. |
required |
motion
|
RotorMotion
|
The rotor's motion: its hub, axis, speed and blades. |
required |
load
|
BladeLoad
|
One blade's load against azimuth. |
required |
c0
|
float
|
The speed of sound, in m/s. |
required |
observer_velocity_m_s
|
array_like
|
The observer's velocity through the medium, in m/s. |
(0.0, 0.0, 0.0)
|
Returns:
| Type | Description |
|---|---|
Array
|
The pressure at each observer time, in Pa. |
pyflightstream.post.qsteady_noise.rotor_point_forces
¶
rotor_point_forces(
motion: RotorMotion, load: BladeLoad
) -> list[PointForce]
Return the compact sources of a rotor: per blade, its axial then its in-plane force.
Each is the negative of the blade's load (the force on the fluid), at its centroid radius, turning with the blade; the blade's load is the series evaluated at the blade's own azimuth.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
motion
|
RotorMotion
|
The rotor's motion. |
required |
load
|
BladeLoad
|
One blade's load against azimuth. |
required |
Returns:
| Type | Description |
|---|---|
list of PointForce
|
Per blade, its axial then its in-plane source. |
Raises:
| Type | Description |
|---|---|
ProductError
|
When the blade count is not a positive whole number, or a vector is not three finite numbers. |
pyflightstream.post.qsteady_noise.write_qsteady_noise_report
¶
write_qsteady_noise_report(
root: str | Path | CampaignWorkspace,
*,
matrix: str | None = None,
overwrite: bool = True,
) -> Path
Index the exploratory loading signals in the current product manifest.
A recorded noise request with no products or skips writes an empty
outcome, so an enabled post always leaves an inspectable report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
str or Path or CampaignWorkspace
|
The workspace root, or its view when posting an alternate manifest. |
required |
matrix
|
str
|
The matrix stem whose points are compared. |
None
|
overwrite
|
bool
|
Replace a file that already exists, as the writer always did (the default). False refuses an existing file, naming it, before it is replaced. |
True
|
Returns:
| Type | Description |
|---|---|
Path
|
The file written. |
Raises:
| Type | Description |
|---|---|
ProductError
|
The manifest cannot be read or has no noise request, products or skips. |