Skip to content

Commit 692f2bb

Browse files
authored
Merge branch 'main' into fix-visco-test
2 parents c421457 + 5de58ab commit 692f2bb

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

benchmark/ConstitutiveModelsBenchmark/ViscousModelsBenchmarks.jl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,25 @@ function benchmark_viscous_model()
2121
SUITE["Constitutive models"]["Visco-elastic ∂Ψuu"] = @benchmarkable $∂Ψuu($F, $Fn, $Avn)
2222
end
2323

24+
function benchmark_viscous_polyconvex_model()
25+
elasto = NeoHookean3D=1e6, μ=1e3)
26+
visco = ViscousPolyconvex=1e2, τ=10.)
27+
visco = ViscousPolyconvex=1e3, τ=1.)
28+
visco = ViscousPolyconvex=1e4, τ=.1)
29+
visco = ViscousPolyconvex=1e5, τ=.01)
30+
model = GeneralizedMaxwell(elasto, visco)
31+
update_time_step!(model, 1e-1)
32+
Ψ, ∂Ψu, ∂Ψuu = model()
33+
F = TensorValue(1.:9...) * 1e-2 + I3
34+
Fn = TensorValue(1.:9...) * 5e-3 + I3
35+
Cvn = 0.25 * (F+Fn) · (F+Fn)'
36+
F /= det(F)
37+
Fn /= det(Fn)
38+
Cvn /= det(Cvn)
39+
SUITE["Constitutive models"]["Visco-polyconvex Ψ"] = @benchmarkable $Ψ($F, $Fn, $Cvn)
40+
SUITE["Constitutive models"]["Visco-polyconvex ∂Ψu"] = @benchmarkable $∂Ψu($F, $Fn, $Cvn)
41+
SUITE["Constitutive models"]["Visco-polyconvex ∂Ψuu"] = @benchmarkable $∂Ψuu($F, $Fn, $Cvn)
42+
end
43+
2444
benchmark_viscous_model()
45+
benchmark_viscous_polyconvex_model()

0 commit comments

Comments
 (0)