Skip to content

Commit

Permalink
Merge branch '284-more-friendly-output-name-of-add_strain-or-a-better…
Browse files Browse the repository at this point in the history
…-presentation-in-documentation-webpage' into 'development'

Resolve "more friendly output name of `add_strain()` or a better presentation in documentation webpage"

Closes #284

See merge request damask/DAMASK!770
  • Loading branch information
MarDiehl committed Jul 5, 2023
2 parents 5c08794 + bd0a35a commit 7166002
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions python/damask/_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ def _add_strain(F: Dict[str, Any], t: Literal['V', 'U'], m: float) -> Dict[str,
'label': f"epsilon_{t}^{m}({F['label']})",
'meta': {
'unit': F['meta']['unit'],
'description': f'strain tensor of order {m} based on {side} stretch tensor '+\
'description': f'Seth-Hill strain tensor of order {m} based on {side} stretch tensor '+\
f"of {F['label']} ({F['meta']['description']})",
'creator': 'add_strain'
}
Expand All @@ -1210,10 +1210,11 @@ def add_strain(self,
F: str = 'F',
t: Literal['V', 'U'] = 'V',
m: float = 0.0):
"""
Add strain tensor of a deformation gradient.
r"""
Add strain tensor (Seth-Hill family) of a deformation gradient.
For details, see damask.mechanics.strain.
By default, the logarithmic strain based on the
left stretch tensor is added.
Parameters
----------
Expand Down Expand Up @@ -1247,6 +1248,23 @@ def add_strain(self,
spatial/Eulerian strain measures (based on 'V') for elastic strains
when calculating averages.
The strain is defined as:
.. math::
m = 0 \\\\
\vb*{\epsilon}_V^{(0)} = \ln (\vb{V}) \\\\
\vb*{\epsilon}_U^{(0)} = \ln (\vb{U}) \\\\
m \neq 0 \\\\
\vb*{\epsilon}_V^{(m)} = \frac{1}{2m} (\vb{V}^{2m} - \vb{I}) \\\\
\vb*{\epsilon}_U^{(m)} = \frac{1}{2m} (\vb{U}^{2m} - \vb{I})
References
----------
| https://en.wikipedia.org/wiki/Finite_strain_theory
| https://de.wikipedia.org/wiki/Verzerrungstensor
"""
self._add_generic_pointwise(self._add_strain,{'F':F},{'t':t,'m':m})

Expand Down

0 comments on commit 7166002

Please sign in to comment.