Skip to content

Commit

Permalink
Enhance the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
adtzlr committed Sep 23, 2024
1 parent 8268e9d commit bf315fc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/tutorial/examples/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ The :class:`step <felupe.Step>` is further added to a list of steps of a :class:
job.evaluate(filename="result.xdmf")

fig, ax = job.plot(
xlabel="Displacement $d_1$ in mm $\longrightarrow$",
ylabel="Normal Force $F_1$ in N $\longrightarrow$",
xlabel=r"Displacement $d_1$ in mm $\longrightarrow$",
ylabel=r"Normal Force $F_1$ in N $\longrightarrow$",
)

.. pyvista-plot::
Expand Down
23 changes: 14 additions & 9 deletions src/felupe/constitution/_material.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,20 +184,21 @@ def hessian(x, **kwargs):
Examples
--------
The compressible isotropic hyperelastic Neo-Hookean material formulation is given
by the strain energy density function.
by the strain energy density function
.. math::
\psi &= \psi(\boldsymbol{C})
\psi(\boldsymbol{C}) &= \frac{\mu}{2} \text{tr}(\boldsymbol{C})
\psi(\boldsymbol{C}) = \frac{\mu}{2} \text{tr}(\boldsymbol{C})
- \mu \ln(J) + \frac{\lambda}{2} \ln(J)^2
with
with the determinant of the deformation gradient and the right Cauchy Green
deformation tensor.
.. math::
J = \text{det}(\boldsymbol{F})
J &= \text{det}(\boldsymbol{F})
C &= \boldsymbol{F}^T\ \boldsymbol{F}
The first Piola-Kirchhoff stress tensor is evaluated as the gradient
of the strain energy density function.
Expand Down Expand Up @@ -227,6 +228,7 @@ def hessian(x, **kwargs):
>>> import numpy as np
>>> import felupe as fem
>>>
>>> from felupe.math import (
... cdya_ik,
... cdya_il,
Expand Down Expand Up @@ -255,19 +257,22 @@ def hessian(x, **kwargs):
... (mu - lmbda * np.log(J)) * cdya_il(iFT, iFT)
... ]
>>>
>>> umat = fem.Material(stress, elasticity, mu=1.0, lmbda=2.0)
The material formulation is tested in a minimal example of non-homogeneous uniaxial
tension.
.. pyvista-plot::
:context:
>>> mesh = fem.Cube(n=6)
>>> mesh = fem.Cube(n=3)
>>> region = fem.RegionHexahedron(mesh)
>>> field = fem.FieldContainer([fem.Field(region, dim=3)])
>>> boundaries, loadcase = fem.dof.uniaxial(field, clamped=True, move=0.5)
>>>
>>> umat = fem.Material(stress, elasticity, mu=1.0, lmbda=2.0)
>>> solid = fem.SolidBodyNearlyIncompressible(umat, field, bulk=5000)
>>>
>>> boundaries, loadcase = fem.dof.uniaxial(field, clamped=True, move=0.5)
>>>
>>> step = fem.Step(items=[solid], boundaries=boundaries)
>>> job = fem.Job(steps=[step]).evaluate()
Expand Down

0 comments on commit bf315fc

Please sign in to comment.