visualdynamics.core.fatigue¶
fatigue
¶
Fatigue damage and extreme response spectra, and time compression.
Two environments are compared for what they do to an article, not for how they look. A specification derived from field data, or a test proposed to stand for a field record, is judged by running both through the same set of single-degree-of-freedom resonators, one at each natural frequency across the band, and reading two numbers off each resonator's response:
- the extreme response spectrum (ERS): the largest response the resonator is expected to reach over the duration. It answers "is the test's peak response as high as the field's", the strength question.
- the fatigue damage spectrum (FDS): the fatigue damage the response does over the duration. It answers "does the test use up as much life as the field does", the fatigue question.
A test whose ERS and FDS lie at or above the field's at every natural frequency is at least as severe, mode for mode, whatever the shapes of the two spectra. That is what makes the pair the tool for deriving a specification and for the question "is this test harder than that one".
The resonator. Each resonator is base-excited, with natural frequency fn and amplification Q = 1 / (2 zeta). Its response is the relative displacement z between the mass and the base, the motion that strains a part, expressed as a pseudo-acceleration, (2 pi fn)^2 z, so that the response is in the units of the input and reads like the acceleration it is close to. Its gain from base acceleration is
H(f) = 1 / (1 - r^2 + j r / Q), r = f / fn,
which is one at low frequency (a stiff resonator follows its base), Q at fn, and falls as 1 / r^2 above. The mean square of the response to a one-sided acceleration density G is the integral of |H|^2 G. For a flat G that integral is exactly (pi / 2) fn Q G, Miles' equation, since the integral of |H|^2 over all frequencies is (pi / 2) fn Q; and the integral of f^2 |H|^2 is fn^2 times the same, so the response crosses zero upward exactly fn times a second.
From a spectrum. The response's spectral moments,
m_k = integral f^k |H|^2 G df for k = 0, 1, 2 and 4, are taken on a
grid of cells fine enough that every resonator's half-power band holds
CELLS of them. Each cell's share of G is the spectrum's own area over
the cell (Psd.areas), read the way the spectrum is read, per bin or
as a power law between breakpoints, so a spectrum whose lines are
coarser than a resonator's band is integrated as it is drawn and not
sampled at its lines. The response's rms is sqrt(m0), its rate of
upward crossings of zero sqrt(m2 / m0) (Rice's formula, as
time_statistics.rice_rate), its rate of peaks sqrt(m4 / m2), and its
irregularity m2 / sqrt(m0 m4), one for a pure tone and smaller the more
small peaks ride on the large ones.
The fatigue model is the S-N curve N S^b = C: a cycle of amplitude S
uses 1 / N(S) = S^b / C of the life, and the cycles add (the
Palmgren-Miner rule). The damage over a duration T is then the expected
number of cycles times the mean of S^b over their amplitudes. The
constant C and the stress per unit response are a material's and a
design's, so they are left at one, and the FDS is in the response unit
to the power b: a value to compare between environments read at the
same b and Q, not a life. Three readings of the amplitudes are offered,
METHODS:
-
'narrowband'(the default): every upward crossing of zero is one cycle, of amplitude Rayleigh-distributed with the response's rms sigma, the distribution of a narrow-band Gaussian process's peaks. The mean of S^b over a Rayleigh distribution is (sqrt(2) sigma)^b Gamma(1 + b / 2), soFDS = nu0 T (sqrt(2) sigma)^b Gamma(1 + b / 2).
A resonator's response is narrow-band, and this is the closed form
that reads it. For a broader response it expects more damage than
rainflow counting finds, so it errs on the safe side; on simulated
records it reads a few percent over their rainflow counts, and over
Dirlik's fit at every resonator.
- 'rice': every positive peak is a cycle of its own height, at the
rate of peaks, the heights distributed as Rice's peak distribution
for the response's irregularity alpha. In standard deviations u it
is the mixture
p(u) = sqrt(1 - alpha^2) / sqrt(2 pi) exp(-u^2 / (2 (1 - alpha^2)))
+ alpha u exp(-u^2 / 2) Phi(alpha u / sqrt(1 - alpha^2)),
with Phi the standard normal distribution: Rayleigh at alpha = 1,
where it is the narrow-band reading exactly, and Gaussian as alpha
falls to zero. The mean of u^b over its positive part is taken by
quadrature. Counting each peak as a whole cycle also counts high when
small peaks ride on large ones.
- 'dirlik': the rainflow ranges' distribution as Dirlik's empirical
fit gives it from m0, m1, m2 and m4: an exponential and two Rayleigh
terms in Z = range / (2 sigma), with weights
xm = (m1 / m0) sqrt(m2 / m4), g = m2 / sqrt(m0 m4),
D1 = 2 (xm - g^2) / (1 + g^2),
R = (g - xm - D1^2) / (1 - g - D1 + D1^2),
D2 = (1 - g - D1 + D1^2) / (1 - R), D3 = 1 - D1 - D2,
Qd = 1.25 (g - D3 - D2 R) / D1,
and density in Z of D1 / Qd exp(-Z / Qd) + D2 Z / R^2 exp(-Z^2 / (2 R^2)) + D3 Z exp(-Z^2 / 2), counted at the rate of peaks. With amplitude half the range the mean of S^b is sigma^b (D1 Qd^b Gamma(1 + b) + sqrt(2)^b Gamma(1 + b / 2) (D2 |R|^b + D3)). It is a fit to simulated rainflow counts, not a derivation, and it is checked here against rainflow counts of simulated records. Where the response is so narrow that the weights are 0 / 0 (a single frequency, g = 1), the narrow-band reading stands in, which is the limit the fit approaches.
The ERS is sigma times the expected largest peak over the duration,
sqrt(2 ln(nu0 T)) standard deviations
(time_statistics.expected_largest_peak), whatever the method: the
leading term of the standard result for a Gaussian process whose
up-crossings of a high level are rare and independent. A run typically
reaches a little more. It says nothing where the run holds a single
crossing or fewer, and such resonators read NaN, said in the notes.
From a time history. The record, leveled to its mean as its
spectrum would be, is run through each resonator by a recursion exact
for an input that is a straight line between samples (the assumption
core.srs makes for the absolute acceleration, made here for the
relative displacement): the resonator's state equation is integrated
over one sample with the input a ramp, by the matrix exponential of the
state matrix augmented with the input and its slope, and the result is
the second-order filter response_filter returns. Its gain at zero
frequency is exactly one. Natural frequencies above a twentieth of
the sample rate are refused. A sampled tone is a chord between samples,
not a straight line, so a resonator near the top reads its input a
little low (0.8 % at resonance at a twentieth, 3.3 % at a tenth), and
its response's peaks fall between samples (read up to
1 - cos(pi / 20), 1.2 %, low at a twentieth, 4.9 % at a tenth).
Damage goes as the amplitude to the power b, so at b = 8 a 2 %
shortfall in amplitude is 15 % of damage. The result says how low its
top resonator reads.
The response is counted by rainflow (rainflow): reduced to its
turning points, then every range smaller than or equal to both ranges
beside it is a closed cycle, taken out with its two points, until none
is left; what remains is the residue, whose ranges are counted as half
cycles. The FDS is the sum over the cycles of (range / 2)^b, half
cycles at one half, and the ERS is the largest response in the record.
Both are over the record's own length. A duration given for a time
history scales the FDS linearly to it, which assumes the record is a
stationary sample of the whole, and leaves the ERS as the record's own
largest response, which the result says.
Time compression. At one fatigue exponent, a test at a level W1 for a time t1 does the damage of a service level W2 for a time t2 when
t2 / t1 = (W1 / W2)^(b / 2) = (S1 / S2)^b,
with W a spectral density and S an rms or amplitude; the damage of the
narrow-band reading goes as T sigma^b, and sigma as sqrt(W). The ratio
W1 / W2 is the exaggeration factor on the ASD. A test document caps
it, examples of what test documents ask for being 4 on the ASD and 2 on
the rms (CAP), because a higher level can fail an article through a
mechanism the fatigue exponent does not describe; the exponent itself
is a convention of the document, commonly 7.5 for random, 5 to 8, and 6
for sine. The exponent is the m of that rule, which some documents
write as b; where a document uses b for a material's fatigue strength
exponent, a different quantity, its m is the number to give here.
Two environments read at one b and Q are set against each other by
equivalence: the test's FDS over the field's at each natural
frequency, the factor on the test's ASD that brings its FDS to the
field's at every frequency, the duration at its own level that does
the same, the exaggeration the test carries at each frequency in the
sense of the rule above, and the ERS of the two in decibels.
Refused, with the cause named: a record whose units are not declared;
a record of another quantity than acceleration; a cross spectrum; a
spectrum line or a sample that is not finite, or a line below zero,
with its frequency or time named; a spectrum with no area and a record
that does not vary; a Q or b outside Q_RANGE or B_RANGE; a
duration that is not given, or not positive, for a spectrum; and
natural frequencies that are not positive or are above a twentieth of
a time history's sample rate.
References
The peak distributions, the crossing rate and the expected largest peak are standard results of random data analysis, set out in the first; the narrow-band damage follows from the Rayleigh distribution's moments as above, and Dirlik's fit is checked against rainflow counts of simulated records rather than cited. The time-compression rule and its caps are the second's.
- Bendat, J. S., & Piersol, A. G. (2010). Random Data: Analysis and Measurement Procedures, 4th ed. Wiley. Rice's rate of zero crossings and of peaks from a spectrum's moments, the Rayleigh distribution of a narrow-band Gaussian process's peaks and Rice's distribution of the peaks of a broader one, and the expected largest peak of a stationary Gaussian process over a duration.
- MIL-STD-810H with Change 1 (2022), Environmental Engineering Considerations and Laboratory Tests, Method 514.8 (Vibration), Annex A, paragraph 2.2. The time-compression rule on the rms and on the ASD, the exponent commonly used for random and for sine, and the caps on the exaggeration factor.
Classes:
| Name | Description |
|---|---|
ResponseSpectra |
The ERS and the FDS of one record, with what they rest on. |
TimeCompression |
A test shortened at a raised level with equal damage: the time |
Equivalence |
A test set against a field environment, resonator by resonator, |
Functions:
| Name | Description |
|---|---|
checked_q |
|
checked_b |
|
checked_duration |
|
pseudo_gain |
|H|^2 of the pseudo-acceleration of a base-excited resonator, |
response_moments |
The spectral moments m0, m1, m2 and m4 of each resonator's |
narrowband_damage |
nu0 T (sqrt(2) sigma)^b Gamma(1 + b / 2): every upward crossing a |
rice_moment |
The mean over Rice's peak distribution, at irregularity |
rice_damage |
The positive peaks counted as cycles at the rate of peaks, their |
dirlik_damage |
Dirlik's rainflow range distribution counted at the rate of |
held_band |
(low, high), Hz, of what record |
spectrum_refusal |
Why record |
psd_spectra |
The ERS and the FDS of one record of an acceleration spectrum. |
response_filter |
The recursion for each resonator's pseudo-acceleration, given the |
turning_points |
The peaks and valleys of |
rainflow |
The rainflow count of |
rainflow_damage |
The sum over the rainflow cycles of |
history_refusal |
Why record |
history_spectra |
The ERS and the FDS of one channel of an acceleration time |
fatigue_spectra |
The ERS and FDS of one record of a PSD ( |
compression_ratio |
t2 / t1, the service time a test time stands for, at exaggeration |
exaggeration |
The exaggeration factor on the ASD (or the rms) that makes a test |
time_compression |
The equal-damage trade of time for level at exponent |
equivalence |
Set a candidate test against a field environment. |
compared |
Read a field record and a candidate test on one set of natural |
settings_of |
The settings |
Classes¶
ResponseSpectra
dataclass
¶
ResponseSpectra(frequency: ndarray, fds: ndarray, ers: ndarray, rms: ndarray, crossings: ndarray, peaks: ndarray, q: float, b: float, duration: float, method: str, source: str, dimension: str, label: str = '', ers_duration: float = float('nan'), notes: tuple[str, ...] = tuple())
The ERS and the FDS of one record, with what they rest on.
frequency holds the natural frequencies in Hz, and the arrays
beside it one value per natural frequency, in SI: the FDS in the
record's unit to the power b (m/s² for an acceleration), with the
S-N constant and the stress per unit response at one; the ERS and
the rms in the record's unit.
Methods:
| Name | Description |
|---|---|
describe |
The result in one line: what was read and over how long. |
at_duration |
The same result over another duration: the FDS scaled in |
Attributes:
| Name | Type | Description |
|---|---|---|
damping |
float
|
The damping ratio Q stands for. |
irregularity |
ndarray
|
Upward crossings over peaks, one per natural frequency: one |
rests_on |
str
|
What the result assumes, in words. |
Attributes¶
irregularity
property
¶
Upward crossings over peaks, one per natural frequency: one for a pure tone, smaller the more small peaks ride on large.
Methods:¶
describe
¶
The result in one line: what was read and over how long.
Source code in src/visualdynamics/core/fatigue.py
at_duration
¶
at_duration(duration: float) -> ResponseSpectra
The same result over another duration: the FDS scaled in proportion, the ERS of a spectrum read again at the new length, the ERS of a time history left as the record's own.
Source code in src/visualdynamics/core/fatigue.py
TimeCompression
dataclass
¶
A test shortened at a raised level with equal damage: the time ratio, the exaggeration factor on the ASD, and the cap it is judged against.
Methods:
| Name | Description |
|---|---|
describe |
The trade in one line, with the cap's verdict. |
Attributes:
| Name | Type | Description |
|---|---|---|
rms_factor |
float
|
The exaggeration on the rms, the square root of the ASD's. |
decibels |
float
|
The exaggeration on the ASD in decibels. |
over_cap |
bool
|
Whether the ASD factor is over the cap. |
at_cap |
float
|
The time ratio the cap allows at this exponent. |
rests_on |
str
|
What the trade assumes, in words. |
Attributes¶
Methods:¶
describe
¶
The trade in one line, with the cap's verdict.
Source code in src/visualdynamics/core/fatigue.py
Equivalence
dataclass
¶
Equivalence(field: ResponseSpectra, test: ResponseSpectra, cap: float = CAP['asd'])
A test set against a field environment, resonator by resonator, at one Q and b.
Methods:
| Name | Description |
|---|---|
compression |
The trade the test makes at the governing frequency: the |
describe |
The comparison in one line. |
Attributes:
| Name | Type | Description |
|---|---|---|
frequency |
ndarray
|
The natural frequencies, Hz. |
damage_ratio |
ndarray
|
The test's FDS over the field's, one per natural frequency. |
damage_db |
ndarray
|
The same in decibels, 10 log10, the scale a density is read |
ers_db |
ndarray
|
The test's ERS over the field's in decibels, 20 log10. |
exaggeration |
ndarray
|
The factor on the ASD the test carries over the field at each |
time_ratio |
float
|
The field's duration over the test's. |
governs |
float
|
The natural frequency where the test's FDS falls furthest |
least_ratio |
float
|
The smallest damage ratio over the natural frequencies. |
covers |
bool
|
Whether the test's FDS is at or above the field's at every |
ers_covers |
bool
|
Whether the test's ERS is at or above the field's at every |
factor_needed |
float
|
The factor on the test's ASD, at its own duration, that |
duration_needed |
float
|
The test's duration, at its own level, at which its FDS |
over_cap |
ndarray
|
The natural frequencies where the test's exaggeration is over |
rests_on |
str
|
What the comparison assumes, in words. |
Attributes¶
damage_ratio
property
¶
The test's FDS over the field's, one per natural frequency.
damage_db
property
¶
The same in decibels, 10 log10, the scale a density is read on: at one duration, 3 dB more on the ASD is 3 b / 2 dB more damage.
exaggeration
property
¶
The factor on the ASD the test carries over the field at each natural frequency, in the sense of the time-compression rule: (damage ratio times field time over test time)^(2 / b).
governs
property
¶
The natural frequency where the test's FDS falls furthest below the field's (or stands least above it), Hz.
covers
property
¶
Whether the test's FDS is at or above the field's at every natural frequency.
ers_covers
property
¶
Whether the test's ERS is at or above the field's at every natural frequency read.
factor_needed
property
¶
The factor on the test's ASD, at its own duration, that brings its FDS to the field's at every natural frequency; below one when it has room to spare, infinite where the test does no damage at all.
duration_needed
property
¶
The test's duration, at its own level, at which its FDS reaches the field's at every natural frequency, s; infinite where the test does no damage at all.
over_cap
property
¶
The natural frequencies where the test's exaggeration is over the cap, Hz.
Methods:¶
compression
¶
compression() -> TimeCompression
The trade the test makes at the governing frequency: the field's time over the test's, at the exaggeration it carries there.
Source code in src/visualdynamics/core/fatigue.py
describe
¶
The comparison in one line.
Source code in src/visualdynamics/core/fatigue.py
Functions:¶
checked_q
¶
checked_b
¶
b as a float, or a ValueError unless it is within B_RANGE:
the fatigue exponent is never assumed, so None is refused too.
Source code in src/visualdynamics/core/fatigue.py
checked_duration
¶
duration in seconds as a float, or a ValueError unless it is a
positive finite number.
Source code in src/visualdynamics/core/fatigue.py
pseudo_gain
¶
|H|^2 of the pseudo-acceleration of a base-excited resonator, 1 / ((1 - r^2)^2 + (r / Q)^2) with r = f / fn.
Broadcast over frequency and natural: one natural frequency per
row when natural is a column. One at zero frequency and Q^2 at fn.
Source code in src/visualdynamics/core/fatigue.py
response_moments
¶
response_moments(psd: Psd, record: int, natural: ArrayLike, q: float = DEFAULT_Q, *, progress: Callable[[int, int], None] | None = None) -> ndarray
The spectral moments m0, m1, m2 and m4 of each resonator's
pseudo-acceleration response to record record of psd, shape
(4, natural frequencies), in the record's units squared times Hz to
the power k.
The cells' shares of the spectrum are its own areas over them
(Psd.areas), so a spectrum read per bin or between breakpoints is
integrated as it is read, whatever its line spacing. The record is
taken as given; psd_spectra checks it first.
Source code in src/visualdynamics/core/fatigue.py
narrowband_damage
¶
nu0 T (sqrt(2) sigma)^b Gamma(1 + b / 2): every upward crossing a cycle of Rayleigh amplitude (see the module's text).
Source code in src/visualdynamics/core/fatigue.py
rice_moment
¶
The mean over Rice's peak distribution, at irregularity alpha,
of u^b on its positive part (u in standard deviations), taken by
quadrature: 2^(b/2) Gamma(1 + b/2) at alpha = 1, the Rayleigh's.
Source code in src/visualdynamics/core/fatigue.py
rice_damage
¶
The positive peaks counted as cycles at the rate of peaks, their heights distributed as Rice's peaks (see the module's text).
Source code in src/visualdynamics/core/fatigue.py
dirlik_damage
¶
dirlik_damage(m0: ArrayLike, m1: ArrayLike, m2: ArrayLike, m4: ArrayLike, b: float, duration: float) -> ndarray
Dirlik's rainflow range distribution counted at the rate of peaks (see the module's text); the narrow-band reading where the weights are 0 / 0.
Source code in src/visualdynamics/core/fatigue.py
held_band
¶
held_band(psd: Psd, record: int = 0) -> tuple[float, float]
(low, high), Hz, of what record record of psd holds above
zero: the outer edges of its lines with a level above zero, read per
bin or between breakpoints as the spectrum is. A measured PSD is
stored on every line from 0 Hz, and its zeros below and above the
band hold nothing a resonator could respond to.
Source code in src/visualdynamics/core/fatigue.py
spectrum_refusal
¶
Why record record of psd cannot be read for its ERS and FDS,
or None when it can: an acceleration autospectrum with its units
declared, every line finite and none below zero, and some area.
Source code in src/visualdynamics/core/fatigue.py
psd_spectra
¶
psd_spectra(psd: Psd, record: int = 0, *, b: float | None = None, duration: float | None = None, q: float = DEFAULT_Q, method: str = METHOD, frequencies: ArrayLike | None = None, low: float | None = None, high: float | None = None, per_octave: int = PER_OCTAVE, progress: Callable[[int, int], None] | None = None) -> ResponseSpectra
The ERS and the FDS of one record of an acceleration spectrum.
Each resonator's response moments are integrated against the
spectrum as it is read (response_moments), and the damage is read
by method (see the module's text). A Specification is read the
same way as a measured PSD, at its target.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
psd
|
Psd
|
An acceleration autospectrum, a measured PSD or a specification. |
required |
record
|
int
|
Which record. |
0
|
b
|
float
|
The fatigue exponent, within |
None
|
duration
|
float
|
The seconds the environment lasts; never assumed. |
None
|
q
|
float
|
The resonators' amplification, within |
`srs.DEFAULT_Q`
|
method
|
str
|
How the cycles are read, one of |
'narrowband'
|
frequencies
|
array - like
|
The natural frequencies, Hz. When omitted, |
None
|
low
|
float
|
The band of natural frequencies, Hz. |
None
|
high
|
float
|
The band of natural frequencies, Hz. |
None
|
per_octave
|
int
|
Natural frequencies to an octave. |
`srs.PER_OCTAVE`
|
progress
|
callable
|
Told (done, total) as the natural frequencies are read. |
None
|
Returns:
| Type | Description |
|---|---|
ResponseSpectra
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
When the record cannot be read ( |
Source code in src/visualdynamics/core/fatigue.py
660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 | |
response_filter
¶
response_filter(natural: ArrayLike, sample_rate: float, q: float = DEFAULT_Q) -> tuple[ndarray, ndarray]
The recursion for each resonator's pseudo-acceleration, given the
base acceleration sampled at sample_rate: (b, a), each
(frequencies, 3), for scipy.signal.lfilter.
Exact for an input that is a straight line between samples. With w = -z, the state x = (w, dw/dt) obeys dx/dt = A x + B u, where A = [[0, 1], [-wn^2, -2 zeta wn]] and B = (0, 1), and the response is wn^2 w. Over one sample with u a ramp of slope s, the state (x, u, s) moves by the exponential of [[A, B, 0], [0, 0, 1], [0, 0, 0]] dt, which gives x[k+1] = Phi x[k] + P u[k] + R u[k+1]; its transfer function to y = C x is a second-order filter whose denominator is the characteristic polynomial of Phi. The gain at zero frequency is exactly one.
Source code in src/visualdynamics/core/fatigue.py
turning_points
¶
The peaks and valleys of values, with its first and last
samples: runs of equal samples are one, and a sample that continues
its neighbors' direction is dropped.
Source code in src/visualdynamics/core/fatigue.py
rainflow
¶
The rainflow count of values: (ranges, counts), each cycle's
range and 1 for a closed cycle or 0.5 for a half cycle of the
residue.
Reduced to its turning points, a range that is no larger than either range beside it closes a cycle, which is taken out with its two points; the rule is applied to every such range at once, a pass at a time, leaving a neighbor of one taken in the same pass to the next, until none is left. The residue, a run whose ranges grow and then shrink, is counted as half cycles.
Source code in src/visualdynamics/core/fatigue.py
rainflow_damage
¶
The sum over the rainflow cycles of values of (range / 2)^b,
half cycles at one half: the damage with C = 1.
Source code in src/visualdynamics/core/fatigue.py
history_refusal
¶
Why record record of history cannot be read for its ERS and
FDS, or None when it can: an evenly sampled acceleration with its
units declared, every sample finite, and some variation.
Source code in src/visualdynamics/core/fatigue.py
history_spectra
¶
history_spectra(history: TimeHistory, record: int = 0, *, b: float | None = None, q: float = DEFAULT_Q, duration: float | None = None, frequencies: ArrayLike | None = None, low: float | None = None, high: float | None = None, per_octave: int = PER_OCTAVE, progress: Callable[[int, int], None] | None = None) -> ResponseSpectra
The ERS and the FDS of one channel of an acceleration time history, counted by rainflow in each resonator's response.
The channel is leveled to its mean and run through each resonator
(response_filter) from rest; the response's rainflow cycles give
the FDS (rainflow_damage) and its largest excursion the ERS. Both
are over the record's length; duration, when given, scales the
FDS to it (ResponseSpectra.at_duration).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
history
|
TimeHistory
|
An evenly sampled acceleration record. |
required |
record
|
int
|
Which channel. |
0
|
b
|
float
|
The fatigue exponent, within |
None
|
q
|
float
|
The resonators' amplification, within |
`srs.DEFAULT_Q`
|
duration
|
float
|
The seconds the FDS is scaled to; the record's length when omitted. |
None
|
frequencies
|
array - like
|
The natural frequencies, Hz, none above a twentieth of the
rate. When omitted, |
None
|
low
|
float
|
The band of natural frequencies, Hz. |
None
|
high
|
float
|
The band of natural frequencies, Hz. |
None
|
per_octave
|
int
|
Natural frequencies to an octave. |
`srs.PER_OCTAVE`
|
progress
|
callable
|
Told (done, total) as the natural frequencies are read. |
None
|
Returns:
| Type | Description |
|---|---|
ResponseSpectra
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
When the record cannot be read ( |
Source code in src/visualdynamics/core/fatigue.py
911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 | |
fatigue_spectra
¶
fatigue_spectra(data: Psd | TimeHistory, record: int = 0, **settings: Any) -> ResponseSpectra
The ERS and FDS of one record of a PSD (psd_spectra) or of a
time history (history_spectra), whichever data is.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
Psd or TimeHistory
|
The record's object. |
required |
record
|
int
|
Which record. |
0
|
**settings
|
Any
|
As |
{}
|
Returns:
| Type | Description |
|---|---|
ResponseSpectra
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
As the two raise, and for anything that is neither. |
Source code in src/visualdynamics/core/fatigue.py
compression_ratio
¶
t2 / t1, the service time a test time stands for, at exaggeration
factor on the ASD (on='asd', (W1/W2)^(b/2)) or on the rms
(on='rms', (S1/S2)^b). Raises ValueError for a factor that is not
positive or an on that is neither.
Source code in src/visualdynamics/core/fatigue.py
exaggeration
¶
The exaggeration factor on the ASD (or the rms) that makes a test
time_ratio times shorter than the service do the same damage:
the inverse of compression_ratio.
Source code in src/visualdynamics/core/fatigue.py
time_compression
¶
time_compression(*, b: float | None = None, time_ratio: float | None = None, factor: float | None = None, cap: float = CAP['asd']) -> TimeCompression
The equal-damage trade of time for level at exponent b, from
the time ratio (service over test) or from the exaggeration factor
on the ASD, whichever is given.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
b
|
float
|
The fatigue exponent, within |
None
|
time_ratio
|
float
|
t2 / t1, the service time over the test time; above one shortens the test. |
None
|
factor
|
float
|
W1 / W2, the test's ASD over the service's. |
None
|
cap
|
float
|
The most the ASD factor may be, |
4
|
Returns:
| Type | Description |
|---|---|
TimeCompression
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
Unless exactly one of |
Source code in src/visualdynamics/core/fatigue.py
equivalence
¶
equivalence(field: ResponseSpectra, test: ResponseSpectra, *, cap: float = CAP['asd']) -> Equivalence
Set a candidate test against a field environment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
field
|
ResponseSpectra
|
The two results, read at the same natural frequencies, Q and b, from records of one quantity. |
required |
test
|
ResponseSpectra
|
The two results, read at the same natural frequencies, Q and b, from records of one quantity. |
required |
cap
|
float
|
The most the exaggeration on the ASD may be, |
4
|
Returns:
| Type | Description |
|---|---|
Equivalence
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
When the two were read at different natural frequencies, Q or b, are of different quantities, or no natural frequency has a damage on both sides. |
Source code in src/visualdynamics/core/fatigue.py
compared
¶
compared(field: Any, test: Any, field_record: int = 0, test_record: int = 0, *, field_duration: float | None = None, test_duration: float | None = None, cap: float = CAP['asd'], frequencies: ArrayLike | None = None, low: float | None = None, high: float | None = None, per_octave: int = PER_OCTAVE, progress: Callable[[int, int], None] | None = None, **settings: Any) -> Equivalence
Read a field record and a candidate test on one set of natural
frequencies and set them against each other (equivalence).
The natural frequencies are the field's band when none are given,
and both are read on them. A spectrum's duration is its
field_duration or test_duration; a time history's is its own
length, scaled when one is given.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
field
|
Psd or TimeHistory
|
The two records' objects. |
required |
test
|
Psd or TimeHistory
|
The two records' objects. |
required |
field_record
|
int
|
Which record of each. |
0
|
test_record
|
int
|
Which record of each. |
0
|
field_duration
|
float
|
The seconds each lasts; required for a spectrum. |
None
|
test_duration
|
float
|
The seconds each lasts; required for a spectrum. |
None
|
cap
|
float
|
As for |
4
|
frequencies
|
ArrayLike | None
|
As for |
None
|
low
|
ArrayLike | None
|
As for |
None
|
high
|
ArrayLike | None
|
As for |
None
|
per_octave
|
ArrayLike | None
|
As for |
None
|
progress
|
callable
|
Told (done, total) as both are read. |
None
|
**settings
|
Any
|
|
{}
|
Returns:
| Type | Description |
|---|---|
Equivalence
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
As |
Source code in src/visualdynamics/core/fatigue.py
1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 | |
settings_of
¶
settings_of(spectra: ResponseSpectra) -> dict[str, Any]
The settings fatigue_spectra takes that give spectra again
from its record, for a journal line or a script.