Closed Sad-Abd closed 6 months ago
Hi @Sad-Abd, thanks, very well done! 🥇
I'll do some small changes here and there and merge this afterwards.
finite_strain_viscoelastic_mr()
, see https://peps.python.org/pep-0008/#function-and-variable-namesViscoelasticMooneyRivlin
, see https://peps.python.org/pep-0008/#class-namesmodels/__init__.py
to make it available in the package namespaceViscoelasticMooneyRivlin
to the tests, this automatically includes all other additionsFYI, this also works well with FElupe.
import felupe as fem
import matadi as mat
mesh = fem.Cube(n=6)
region = fem.RegionHexahedron(mesh)
field = fem.FieldContainer([fem.Field(region, dim=3)])
boundaries, loadcase = fem.dof.uniaxial(field, clamped=True)
umat = fem.constitutive_material(fem.CompositeMaterial)(
mat.models.ViscoelasticMooneyRivlin(), fem.NeoHooke(mu=0.4)
)
solid = fem.SolidBodyNearlyIncompressible(umat, field, bulk=5000)
move = fem.math.linsteps([0, 0.2, 0, 0.3], num=[10, 10, 15])
step = fem.Step(items=[solid], ramp={boundaries["move"]: move}, boundaries=boundaries)
job = fem.CharacteristicCurve(steps=[step], boundary=boundaries["move"])
job.evaluate(verbose=2)
fig, ax = job.plot()
ax2 = solid.imshow("Principal Values of Cauchy Stress")
With fem.constitutive_material()
(to be released in v8.6.0) it is possible to enable the plot()
- and optimize()
-methods from fem.ConstitutiveMaterial
on any user material class, e.g. a matADi object. This is an alternative for mat.LabIncompressible
.
umat = fem.CompositeMaterial(
fem.constitutive_material(mat.models.ViscoelasticMooneyRivlin)(), fem.NeoHooke(mu=0.4)
)
ax3 = umat.plot(incompressible=True, ux=1 + move, bx=None, ps=None)
I'm happy to see everything is alright. Looking forward to contribute even more ✌️
This pull request addresses the issue #139, which proposed the addition of Finite Strain Viscoelastic Model with Mooney-Rivlin Hyperelasticity.
Unimodular Part Computation (
unimodular
)unimodular
function in themath
module that computes the unimodular part of a given tensor.Matrix Square Root Function (
sqrtm
)sqrtm
function to themath
module that computes the matrix square root of a given square matrix.Finite Strain Viscoelastic Material Formulation (
finite_strain_viscoelastic_MR
)finite_strain_viscoelastic_MR
, which implements a finite strain viscoelastic material model with Mooney-Rivlin hyperelasticity based on the paper by Shutov (2018) [https://doi.org/10.1002/nme.5724].Viscoelastic Material Template (
Viscoelastic_MR
)Viscoelastic_MR
.Please review the changes and provide feedback or suggestions. If everything looks good, feel free to merge this pull request.