adtzlr / matadi

Material Definition with Automatic Differentiation
GNU General Public License v3.0
21 stars 2 forks source link

Implementation of finite Strain Viscoelastic Model with Mooney-Rivlin Hyperelasticity #140

Closed Sad-Abd closed 6 months ago

Sad-Abd commented 6 months ago

This pull request addresses the issue #139, which proposed the addition of Finite Strain Viscoelastic Model with Mooney-Rivlin Hyperelasticity.

  1. Unimodular Part Computation (unimodular)

    • Implemented a new unimodular function in the math module that computes the unimodular part of a given tensor.
  2. Matrix Square Root Function (sqrtm)

    • Added a new sqrtm function to the math module that computes the matrix square root of a given square matrix.
  3. Finite Strain Viscoelastic Material Formulation (finite_strain_viscoelastic_MR)

    • Added a new material formulation, 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].
    • This formulation will enable more accurate and realistic simulations involving viscoelastic materials under finite strain conditions.
  4. Viscoelastic Material Template (Viscoelastic_MR)

    • Included a new material template, Viscoelastic_MR.

Please review the changes and provide feedback or suggestions. If everything looks good, feel free to merge this pull request.

adtzlr commented 6 months ago

Hi @Sad-Abd, thanks, very well done! 🥇

I'll do some small changes here and there and merge this afterwards.

Tasks

adtzlr commented 6 months ago

FYI, 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")

image

image

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)

image

Sad-Abd commented 6 months ago

I'm happy to see everything is alright. Looking forward to contribute even more ✌️