Skip to content

Commit

Permalink
Added Viscoelastic_MR to templates
Browse files Browse the repository at this point in the history
  • Loading branch information
Sad-Abd committed May 10, 2024
1 parent f0c91a3 commit 1faa9cc
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/matadi/models/_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from ._hyperelasticity_isotropic import neo_hooke
from ._misc import morph
from ._pseudo_elasticity import ogden_roxburgh
from ._viscoelasticity import finite_strain_viscoelastic
from ._viscoelasticity import finite_strain_viscoelastic, finite_strain_viscoelastic_MR


class NeoHookeOgdenRoxburgh(MaterialTensorGeneral):
Expand Down Expand Up @@ -81,3 +81,26 @@ def fun(x, mu, eta, dtime):
eta=eta,
dtime=dtime,
)

class Viscoelastic_MR(MaterialTensorGeneral):
"Finite strain viscoelastic material formulation with Mooney-Rivlin hyperelasticity."

def __init__(
self,
c10 = 1,
c01 = 1,
eta = 1,
dtime=1,
):
def fun(x, c10, c01, eta, dtime):
P, statevars = finite_strain_viscoelastic_MR(x, c10, c01, eta, dtime)
return P, statevars

super().__init__(
fun=fun,
statevars_shape=(6, 1),
c10 = c10,
c01 = c01,
eta=eta,
dtime=dtime,
)

0 comments on commit 1faa9cc

Please sign in to comment.