# Fatigue

Sierra/SD supports two forms of high cycle fatigue analysis. We will use
both in this example.

1.  Modal Random Vibration, which we will refer to as the "Frequency
    Domain" solution.

2.  Modal or Direct Transient, which we will refer to as the "Time
    Domain" solution.

Frequency domain fatigue requires three solution cases in the input
deck, and the `Fatigue` keyword in the `OUTPUTS` section:

:::{input}
SOLUTION
  case eig
    eigen
    nmodes 36
    shift -1e6
  case rand
    modalRanVib
  case fat
    fatigue
END

OUTPUTS
  fatigue
END
:::

Time domain fatigue only requires a transient solution and the `Fatigue`
keyword in either `OUTPUTS` or `HISTORY`:

:::{input}
SOLUTION
  case trans
    transient
    nsteps 3.5e5
    time_step 1.25e-4
END

OUTPUTS
  fatigue
END
:::

Time domain and frequency domain fatigue estimates are not expected to
match for several reasons:

- Time domain estimates the total accumulated damage, while frequency
  domain estimates the damage per second.

- Time domain can represent endurance limits and mean stresses, while
  frequency domain cannot.

- Frequency domain estimates the expected damage due to a random
  process, while time domain estimates the observed damage. Generating
  long enough time series for a statistically significant estimate can
  be costly.

From here on out, we will look at a specific example in detail.

## Example Fatigue Model
### Geometry
:::{figure-md} fig:fatigue_wideGeom

![](genericPCB_wideGeom.png)

Generic Circuit Board geometry.
:::

For this example we will be using a mock printed circuit board model
(Figure {numref}`%s <fig:fatigue_wideGeom>`) with all dimensions
arbitrarily chosen for visual appeal. We will be driving the model with
a random force on the underside of the structure while constraining all
other translations and rotations to be zero at the drive point.
Components are attached to each other using all-to-all contact. We will
be focusing on the green electrical pins shown in Figure
{numref}`%s <fig:fatigue_closeGeom>`.

:::{figure-md} fig:fatigue_closeGeom

![](genericPCB_closeGeom.png)

Generic Circuit Board components.
:::
### Materials

The material properties of the electrical pins are given in Sierra/SD
syntax as:

:::{input}
MATERIAL al_with_fatigue
    E = 1e7
    NU= 0.3
    Density = 0.1
    Fatigue_A1 = 20.68
    Fatigue_A2 = -9.84
    Fatigue_A3 =  0.63
    Fatigue_A4 =  0.0
    Fatigue_Stress_Scale = 0.001
END
:::

The elastic properties are a rough approximation aluminum, while the
fatigue properties are specific to an un-notched 6061-T6 aluminum alloy.
The 5 fatigue parameters are:

1.  Fatigue_A1, complicated units, strictly positive

2.  Fatigue_A2, dimensionless, strictly negative

3.  Fatigue_A3, dimensionless, defines the damage contribution from mean
    stress, strictly positive, $3$ is large, $100$ is not physical

4.  Fatigue_A4, units of stress, defines an endurance limit below which
    no damage occurs, strictly positive

5.  Fatigue_Stress_Scale, optional, conversion rate between model stress
    units and damage function stress units, e.g. convert $psi$ to $ksi$

It is not necessary to define a Fatigue_Stress_Scale, but the option
exists to prevent accidental translation errors. The conversion rate of
Fatigue_A1 is given by:

$$
A1_{new} = A1_{old} + A2*\log_{10}(1/C), \quad A4_{new} = A4_{old}*C,
$$

where $C$ is the conversion rate from old units to new units. Note that
Sierra/SD does not attempt these conversions directly. Instead, model
stresses are converted to material units before being applied to the
damage function.

All together, these parameters define the number of cycles to failure
$N$ given a stress cycle with peak $S_{max}$ and valley $S_{min}$:

$$
\log_{10}(N) = A_1 + A_2\log_{10}(S_{max}(1-R)^{A_3}-A_4),
$$

where $R=S_{min}/S_{max}$.

In the frequency domain, we are only able to evaluate damage functions
which can be represented as:

$$
N*S_{max}^m=A,
$$

where $m$ and $A$ are material constants derived from $A1$ to $A4$. To
reduce 4 material constants down to 2, we set $A4=0$, and assume $R=-1$
when doing frequency domain analyses. This limits the types of problems
which can be represented accurately in the frequency domain. There will
be more discussion of trade-offs later.

Since the geometry is arbitrary anyway, we don't pay much attention to
the other components. The base structure and electrical components are
modeled as aluminum. The circuit board material is slightly less dense,
and significantly stiffer than the aluminum, but still arbitrary.

### Loads

The loading for this model is a single-point random force between 10 Hz
and 2000 Hz with the autocorrelation function shown in Figure
{numref}`%s <fig:fatigue_freqDomainLoad>`, evaluated at 0.025 Hz
intervals between 10 Hz and 4000 Hz.

By sampling this random function at intervals of 1.25e-4 seconds for 40
seconds (3.2e5 time steps), we are able to generate a very close
approximation in the time domain. Figure
{numref}`%s <fig:fatigue_timeDomainLoad>` shows a small snapshot of the
time domain load, and resulting Auto Spectral Density (ASD)

Figure {numref}`%s <fig:fatigue_forceHistogram>` shows a histogram of
the force levels seen in the time domain. Note that $4\sigma$ peaks
exist in the data, and some values approach $5\sigma$.

:::{figure-md} fig:fatigue_freqDomainLoad

![](freqDomainLoad.png)

Frequency Domain Loading ASD.
:::
:::{figure-md} fig:fatigue_timeDomainLoad

![](timeDomainLoad.png)

Time Domain Load Snapshot (left), and ASD (right).
:::
:::{figure-md} fig:fatigue_forceHistogram

![](forceHistogram.png)

Histogram of time domain loads with vertical bars at 1-sigma intervals.
:::
## Results
### Frequency Domain

Damage estimates in the frequency domain come in two flavors: "Narrow
Band" and "Wirsching". Both are a damage *rate*, representing the damage
per second seen by the element. "Narrow Band" damage is intended for
solutions where the stress response is occurs at a narrow band of
frequencies, while "Wirsching" damage includes a correction factor for
wider frequency bands. Unfortunately, Sierra/SD does not support
spectral density outputs for von Mises stress, and so we have no way of
knowing which we should use in this case. Narrow band damage rates are
always larger than Wirsching damage rates.

:::{figure-md} fig:fatigue_freqDamageRate

![](genericPCB_freqDamageBoth.png)

Frequency Domain Damage Rate Estimates.
:::
### Time Domain

Sierra/SD supports one fatigue damage estimate in the time domain:
"Damage". This is an accumulated damage as a result of the transient
environment, *not* a damage rate. In our case, the loading duration was
40 seconds, so the largest average damage rate is $3.19e^{-6}$. The
average damage rate has been manually calculated in Figure
{numref}`%s <fig:fatigue_timeDamage>` for comparison to frequency domain
results.

:::{figure-md} fig:fatigue_timeDamage

![](genericPCB_timeDamage.png)

Time Domain Damage Estimate.
:::
### Comparison

The most obvious difference in these solutions is the cost. The modal
transient solution took just over 3 hours to complete, while a modal
random vibration solution took only 1 minute with fatigue outputs. Note:
Requesting full acceleration and stress output on the pins also requires
3 hours, even in the frequency domain.

The solution quality suffers in the modal random vibration solution. In
this example, we chose a material with no endurance limit so that we
could make the closest comparison possible, but the frequency domain
cannot account for mean stresses either. Together, these details
significantly increase the predicted damage in the frequency domain. The
peak time domain damage estimate was 4.5x lower than the Wirsching
damage rate, and 7.4x lower than Narrow Band. This means the difference
between surviving 3.6 days at these levels, and surviving 19 hours (12
for Narrow Band).

Note: The Wirsching damage estimate was not always conservative. One
element in particular saw roughly 2x more damage in the time domain than
the Wirsching estimate, and was in the 70th percentile of damaged
elements. For that element, the Narrow Band estimate was a decent
approximation of the time domain (only 13% error).
