Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Tutorial 11 — Rheological model fitting

Corporate Research Analytical Laboratory, 3M

FitModel fits constitutive models to small-amplitude oscillatory shear (SAOS) moduli G′(ω)G'(\omega), G′′(ω)G''(\omega) or to a relaxation modulus G(t)G(t). It accepts a single sweep, one temperature of a time–temperature superposition (TTS) series, or a master curve. Two engines are available:

  • the built-in generalized Maxwell (Prony series) model, and

  • the classical and fractional models of pyRheo (Miranda-Valdez et al., 2025), an optional dependency.

Each fit returns a piblin Measurement holding the data, the fitted curves and, in details, the parameters and goodness of fit. The data are a discrete frequency sweep of a polymer melt at 49 °C.

pyRheo draws random initial guesses from NumPy’s global generator, so the notebook seeds it for reproducible results.

SAOS: classical and generalized Maxwell

A Maxwell element, a spring of modulus GG in series with a dashpot of viscosity η\eta, relaxes with a single time τ=η/G\tau = \eta/G:

G′(ω)=G (ωτ)21+(ωτ)2,G′′(ω)=G ωτ1+(ωτ)2.G'(\omega) = G\,\frac{(\omega\tau)^2}{1 + (\omega\tau)^2}, \qquad G''(\omega) = G\,\frac{\omega\tau}{1 + (\omega\tau)^2}.

The generalized Maxwell model places NN such elements in parallel, giving the Prony series G(t)=Ge+∑igi e−t/τiG(t) = G_e + \sum_i g_i\, e^{-t/\tau_i} and

G′(ω)=Ge+∑i=1Ngi (ωτi)21+(ωτi)2,G′′(ω)=∑i=1Ngi ωτi1+(ωτi)2.G'(\omega) = G_e + \sum_{i=1}^{N} g_i\,\frac{(\omega\tau_i)^2}{1 + (\omega\tau_i)^2}, \qquad G''(\omega) = \sum_{i=1}^{N} g_i\,\frac{\omega\tau_i}{1 + (\omega\tau_i)^2}.

With mode="nnls" (default), the τi\tau_i are fixed on a logarithmic grid spanning the data and the moduli gi≥0g_i \ge 0 are found by non-negative least squares, which is fast and needs no initial guesses. The equilibrium modulus GeG_e is included with equilibrium_modulus=True.

Maxwell {'G_s': 75030.68610525543, 'eta_s': 13741.92891933592}
4-mode Maxwell {'G_modes': [116393.8358305254, 27882.31360585928, 0.0, 38770.13968926155], 'tau_modes': [0.01591549459100615, 0.07387318085377693, 0.3428889261499121, 1.591549386630056], 'equilibrium_modulus': 0.0}

SAOS: fractional model

Many soft materials relax as a power law over decades of frequency, which requires many Maxwell modes. A spring-pot (Scott Blair element) interpolates between a spring and a dashpot,

σ(t)=V dαγ(t)dtα,G∗(ω)=V (iω)α,0≤α≤1,\sigma(t) = V\,\frac{\mathrm{d}^{\alpha}\gamma(t)}{\mathrm{d}t^{\alpha}}, \qquad G^{*}(\omega) = V\,(i\omega)^{\alpha}, \qquad 0 \le \alpha \le 1,

so α=0\alpha = 0 is a spring and α=1\alpha = 1 a dashpot, and its phase angle δ=απ/2\delta = \alpha\pi/2 is independent of frequency. Combining spring-pots gives compact models with few parameters (Bonfanti et al., 2020; Song et al., 2023). The fractional Kelvin–Voigt model places two spring-pots in parallel,

G∗(ω)=V (iω)α+G (iω)β,G^{*}(\omega) = V\,(i\omega)^{\alpha} + G\,(i\omega)^{\beta},

and captures the two power-law regimes of this sweep with four parameters. The plot compares the three models: one Maxwell mode cannot describe a broad spectrum, four modes approximate it with visible ripples, and the fractional model follows the data closely.

Fractional Kelvin–Voigt {'G': 3178.418976149676, 'V': 42725.90973579788, 'alpha': 0.17453102613238186, 'beta': 0.7293643795406608}
<Figure size 1000x400 with 2 Axes>

Relaxation domain

FrequencyToTime reconstructs G(t)G(t) from the sweep (Tutorial 12), and FitModel(domain="relaxation") fits it directly; the multi-mode Maxwell model is available only for SAOS data. The fractional Maxwell model places two spring-pots in series,

G(t)=G t−β Eα−β, 1−β ⁣(−GV tα−β),G(t) = G\,t^{-\beta}\,E_{\alpha-\beta,\,1-\beta}\!\left(-\frac{G}{V}\,t^{\alpha-\beta}\right),

where Ea,bE_{a,b} is the two-parameter Mittag-Leffler function. It describes a power-law decay G(t)∼t−βG(t) \sim t^{-\beta} at short times followed by faster relaxation at long times. Here minimization_algorithm="Powell" gives a more robust optimum than the default L-BFGS-B.

Fractional Maxwell {'G': 22397.70845533997, 'V': 52045.80882040109, 'alpha': 0.9899999996740758, 'beta': 0.3490522618921849}
<Figure size 800x600 with 1 Axes>

References

  • Bonfanti, A., Kaplan, J. L., Charras, G. and Kabla, A., Fractional viscoelastic models for power-law materials, Soft Matter 16, 6002–6020 (2020). DOI: 10.1039/d0sm00354a.

  • Song, J., Holten-Andersen, N. and McKinley, G. H., Non-Maxwellian viscoelastic stress relaxations in soft matter, Soft Matter 19, 7885–7906 (2023). DOI: 10.1039/d3sm00736g.

  • Miranda-Valdez, I. Y., Niinistö, J., Mäkinen, T., Lejon, J., Koivisto, J. and Alava, M. J., pyRheo: an open-source Python package for complex rheology, Digital Discovery 4, 1075–1082 (2025). DOI: 10.1039/d5dd00021a.