Models
This module provides analytical expressions for complex modulus models and WLF time-temperature superposition functions. All model constructors return callable functions that accept a complex frequency p = iω.
Rheological models
ViscoAnalysis.Mod2S2P1D — Function
Mod2S2P1D(Einf, E0, delta, tauE, k, h, beta) -> FunctionReturn the 2S2P1D complex modulus function E*(p), where p = iω.
The 2S2P1D (2 Springs, 2 Parabolic elements, 1 Dashpot) model is:
E*(p) = E∞ + (E₀ - E∞) / (1 + δ(pτ)^{-k} + (pτ)^{-h} + 1/(pβτ))Arguments
Einf— Glassy modulus E∞ [MPa] (high-frequency limit).E0— Static modulus E₀ [MPa] (zero-frequency limit, E₀ < E∞).delta— δ shape parameter.tauE— Relaxation time τ_E [s].k— Low-frequency exponent (0 < k < h).h— High-frequency exponent (k < h ≤ 1).beta— β dashpot coefficient.
Returns
A function p -> ComplexF64 that evaluates E*(p) at complex frequency p.
Example
model = Mod2S2P1D(30_000.0, 10.0, 2.0, 1e-3, 0.2, 0.6, 500.0)
E_star = model(1im * ω) # complex modulus at angular frequency ωViscoAnalysis.Mod1S2P1D — Function
Mod1S2P1D(E0, delta, tauE, k, h, beta) -> FunctionReturn the 1S2P1D complex modulus function E*(p) (one spring variant, no glassy branch):
E*(p) = E₀ / (1 + δ(pτ)^{-k} + (pτ)^{-h} + 1/(pβτ))Arguments
E0— Static modulus E₀ [MPa].delta— δ shape parameter.tauE— Relaxation time τ_E [s].k— Low-frequency exponent (0 < k < h).h— High-frequency exponent (k < h ≤ 1).beta— β dashpot coefficient.
ViscoAnalysis.ModHS — Function
ModHS(Einf, E0, delta, tauE, k, h) -> FunctionReturn the Huet-Sayegh complex modulus function E*(p) (no dashpot, β → ∞):
E*(p) = E∞ + (E₀ - E∞) / (1 + δ(pτ)^{-k} + (pτ)^{-h})Arguments
Einf— Glassy modulus E∞ [MPa].E0— Static modulus E₀ [MPa].delta— δ shape parameter.tauE— Relaxation time τ_E [s].k— Low-frequency exponent (0 < k < h).h— High-frequency exponent (k < h ≤ 1).
ViscoAnalysis.ModGM — Function
ModGM(X; Ei=nothing, taui=nothing) -> FunctionReturn the Generalised Maxwell complex modulus function G*(p).
Provide either:
Ei(stiffnesses) →Xis treated as the relaxation times τᵢ, ortaui(times) →Xis treated as the stiffnesses Eᵢ, or- neither →
X = [E₁, E₂, …, τ₁, τ₂, …](concatenated, equal halves).
Example
Ei = [1e4, 5e3, 1e3]
taui = [1e-4, 1e-2, 1.0]
model = ModGM(taui; Ei=Ei)
G_star = model(1im * ω)WLF functions
ViscoAnalysis.wlf_scalar — Function
wlf_scalar(T, Tref, C1, C2) -> Float64Evaluate the WLF shift factor: log₁₀(aT) = -C1·(T - Tref) / (C2 + T - Tref).
ViscoAnalysis.change_Tref_WLF — Function
change_Tref_WLF(C1, C2, Tref_old, Tref_new) -> (f, C1_new, C2_new)Convert WLF coefficients from one reference temperature to another using the standard transformation:
C2_new = C2_old + (Tref_new − Tref_old)
C1_new = C1_old · C2_old / C2_newViscoAnalysis.T_TEV — Function
T_TEV(Om, Tref, C1, C2, Omc) -> Float64Inverse WLF: return the temperature at which angular frequency Om is equivalent to Omc at Tref.
Usage examples
Evaluate a 2S2P1D model manually
using ViscoAnalysis
# Build the model function from known parameters
model = Mod2S2P1D(
28_500.0, # Einf [MPa]
9.5, # E0 [MPa]
2.1, # delta
3.2e-4, # tauE [s]
0.185, # k
0.625, # h
450.0, # beta
)
# Evaluate at ω = 2π·10 rad/s (f = 10 Hz)
ω = 2π * 10.0
E_star = model(1im * ω)
@show abs(E_star) # |E*| [MPa]
@show angle(E_star) * 180/π # φ [°]WLF shift factor
log_aT = wlf_scalar(25.0, 10.0, 19.5, 108.0)
# → log₁₀(aT) for T = 25 °C, Tref = 10 °CChange reference temperature
f_new, C1_new, C2_new = change_Tref_WLF(19.5, 108.0, 10.0, 0.0)
log_aT_at0 = f_new(25.0) # log₁₀(aT) with Tref = 0 °CGeneralised Maxwell model
# Specify stiffnesses; X = relaxation times
Ei = [1000.0, 5000.0, 20000.0] # MPa
tau_i = [1e-1, 1e-3, 1e-5] # s
model_gm = ModGM(tau_i; Ei=Ei)
# Or concatenate [Ei..., taui...] into a single vector
X = vcat(Ei, tau_i)
model_gm2 = ModGM(X)