specfem::attenuation::maxwell¶
-
template<int NF, int N_SLS>
MaxwellFactors<NF> specfem::attenuation::maxwell(Kokkos::View<type_real[NF], Kokkos::LayoutRight, Kokkos::HostSpace> f, Kokkos::View<type_real[N_SLS], Kokkos::LayoutRight, Kokkos::HostSpace> tau_s, Kokkos::View<type_real[N_SLS], Kokkos::LayoutRight, Kokkos::HostSpace> tau_eps)¶ Compute Maxwell solid moduli for a series of standard linear solids.
This function computes the real ( \(real\)) and imaginary ( \(imag\)) parts of the viscoelastic modulus for a generalized Maxwell solid (also known as generalized Zener model) consisting of \(N_\text{SLS}\) standard linear solids in parallel.
The formulas match Jeroen’s Attenuation notes (43)-(44), with 1/L normalization:
For angular frequency \(\omega = 2 \pi f\):
\[real(\omega) = \frac{1}{L} \sum_{i=1}^{L} \frac{1 + \omega^2 \tau_{\epsilon_i} \tau_{\sigma_i}}{1 + \omega^2 \tau_{\sigma_i}^2}\]\[imag(\omega) = \frac{1}{L} \sum_{i=1}^{L} \frac{\omega (\tau_{\epsilon_i} - \tau_{\sigma_i})}{1 + \omega^2 \tau_{\sigma_i}^2}\]where \(L = N_\text{SLS}\). At low frequency, \(A\) approaches \(1\). The quality factor \(Q = A/B\) is independent of the normalization. \(B\) is independent of the normalization.
The quality factor \(Q = A / B\), so \(\tan(\delta) = B / A = 1 / Q\)
// Example: compute moduli for 3 SLS over a frequency range constexpr int NF = 100; constexpr int N_SLS = 3; Kokkos::View<type_real[NF], ...> f("f"); Kokkos::View<type_real[N_SLS], ...> tau_s("tau_s"); Kokkos::View<type_real[N_SLS], ...> tau_eps("tau_eps"); // ... fill in values ... auto moduli = maxwell<NF, N_SLS>(f, tau_s, tau_eps); // Q at frequency i is approximately moduli.real(i) / moduli.imag(i)
Note
the real part is often referred to as \( M_1 \) and the imaginary part as \( M_2 \) in the literature, but we use \(real\) and \(imag\) here to avoid confusion with the actual \( M_1 \) and \( M_2 \) moduli of the material, which would require multiplying by the relaxed modulus \(M_R\).
- Template Parameters:
NF – Number of frequencies to evaluate
N_SLS – Number of standard linear solids
- Parameters:
f – View containing \(N_F\) frequencies \(f\) (in Hz, not \(\log_{10}\))
tau_s – View containing \(N_\text{SLS}\) stress relaxation times \(\tau_\sigma\)
tau_eps – View containing \(N_\text{SLS}\) strain relaxation times \(\tau_\epsilon\)
- Returns:
MaxwellFactors containing \(real\) (real) and \(imag\) (imaginary) moduli
Warning
doxygenstruct: Cannot find class “specfem::attenuation::MaxwellModuli” in doxygen xml output for project “specfem++” from directory: _build/doxygen/xml