+
+{{ content }}
\ No newline at end of file
diff --git a/docs/images/deformation.png b/docs/assets/images/deformation.png
similarity index 100%
rename from docs/images/deformation.png
rename to docs/assets/images/deformation.png
diff --git a/docs/images/deformation.svg b/docs/assets/images/deformation.svg
similarity index 100%
rename from docs/images/deformation.svg
rename to docs/assets/images/deformation.svg
diff --git a/docs/images/logo.png b/docs/assets/images/logo.png
similarity index 100%
rename from docs/images/logo.png
rename to docs/assets/images/logo.png
diff --git a/docs/images/logo.svg b/docs/assets/images/logo.svg
similarity index 100%
rename from docs/images/logo.svg
rename to docs/assets/images/logo.svg
diff --git a/docs/assets/js/mathtex-script-type.js b/docs/assets/js/mathtex-script-type.js
new file mode 100644
index 00000000..24f35a16
--- /dev/null
+++ b/docs/assets/js/mathtex-script-type.js
@@ -0,0 +1,34 @@
+// Mostly copied from https://github.com/KaTeX/KaTeX/tree/main/contrib/mathtex-script-type
+// Options for global command definitions added by @pdmosses
+
+// import katex from "katex";
+
+const macros = {};
+
+let scripts = document.body.getElementsByTagName("script");
+scripts = Array.prototype.slice.call(scripts);
+scripts.forEach(function(script) {
+ if (!script.type || !script.type.match(/math\/tex/i)) {
+ return -1;
+ }
+ const display =
+ (script.type.match(/mode\s*=\s*display(;|\s|\n|$)/) != null);
+
+ const katexElement = document.createElement(display ? "div" : "span");
+ katexElement.setAttribute("class",
+ display ? "equation" : "inline-equation");
+ try {
+ katex.render(script.text, katexElement, {
+ displayMode: display,
+ globalGroup: true,
+ trust: true,
+ strict: false,
+ throwOnError: false,
+ macros
+ });
+ } catch (err) {
+ //console.error(err); linter doesn't like this
+ katexElement.textContent = script.text;
+ }
+ script.parentNode.replaceChild(katexElement, script);
+});
\ No newline at end of file
diff --git a/docs/index.md b/docs/index.md
index c1802ae9..2abdd74c 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -6,7 +6,7 @@ nav_order: 1
# Tensor Toolbox for Modern Fortran
-
+
## What is this toolbox about?
From b59599cda45de5187c28d31ca6eefa7ea4e43958 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 10:12:14 +0200
Subject: [PATCH 045/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index b6030699..a2ae7610 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -9,9 +9,14 @@ parent: Examples
This is a very basic example on how to implement a nearly-incompressible version of the Neo-Hookean material model in a commercial FEM package (HYPELA2 for Marc). As no special two- or three-field variational principle is used in this example, it is not suitable for nearly-incompressible material behaviour. Otherwise the elements tend to show excessive volumetric locking during deformation and hence, wrong results are calculated.
-The strain energy density function per unit reference volume is additively splitted into an isochoric and volumetric contribution. The first one is assumed to be proportional to the first invariant of the isochoric part of the right Cauchy-Green deformation tensor whereas the volumetric part is only a function of the volumetric ratio (the determinant of the deformation gradient).
-
-$$ \psi(\mathbf{C}) = \psi(\mathbf{\hat C}) + U(J) $$
+The strain energy density function per unit reference volume is additively splitted into an isochoric and volumetric contribution, see $$\eqref{eq:psi}$$. The first one is assumed to be proportional to the first invariant of the isochoric part of the right Cauchy-Green deformation tensor whereas the volumetric part is only a function of the volumetric ratio (the determinant of the deformation gradient).
+
+$$
+\begin{equation}
+\psi(\mathbf{C}) = \psi(\mathbf{\hat C}) + U(J)
+\label{eq:psi}
+\end{equation}
+$$
From 7b139290995250b478f208e2faa4a99c8858ed85 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 10:13:04 +0200
Subject: [PATCH 046/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index a2ae7610..ca14621f 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -5,7 +5,7 @@ nav_order: 4
parent: Examples
---
-## Examples
+## Marc (Neo-Hooke)
This is a very basic example on how to implement a nearly-incompressible version of the Neo-Hookean material model in a commercial FEM package (HYPELA2 for Marc). As no special two- or three-field variational principle is used in this example, it is not suitable for nearly-incompressible material behaviour. Otherwise the elements tend to show excessive volumetric locking during deformation and hence, wrong results are calculated.
From 209337f035902359aed1fedf99aa63424012c0dd Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 10:13:20 +0200
Subject: [PATCH 047/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index ca14621f..634edad7 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -1,11 +1,11 @@
---
-title: Marc (Neo-Hooke)
+title: Neo-Hooke (Marc)
layout: page
nav_order: 4
parent: Examples
---
-## Marc (Neo-Hooke)
+## Neo-Hooke (Marc)
This is a very basic example on how to implement a nearly-incompressible version of the Neo-Hookean material model in a commercial FEM package (HYPELA2 for Marc). As no special two- or three-field variational principle is used in this example, it is not suitable for nearly-incompressible material behaviour. Otherwise the elements tend to show excessive volumetric locking during deformation and hence, wrong results are calculated.
From ad3da533f18425c4ccb9b56c5f237dccfa4acf4e Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 10:29:33 +0200
Subject: [PATCH 048/130] Switch to Mathjax
---
docs/_includes/head_custom.html | 4 ++--
docs/_includes/katex.html | 27 ---------------------
docs/_includes/mathjax.html | 9 +++++++
docs/_layouts/katex.html | 12 ----------
docs/_layouts/mathjax.html | 12 ++++++++++
docs/assets/js/mathjax-script-type.js | 18 ++++++++++++++
docs/assets/js/mathtex-script-type.js | 34 ---------------------------
7 files changed, 41 insertions(+), 75 deletions(-)
delete mode 100644 docs/_includes/katex.html
create mode 100644 docs/_includes/mathjax.html
delete mode 100644 docs/_layouts/katex.html
create mode 100644 docs/_layouts/mathjax.html
create mode 100644 docs/assets/js/mathjax-script-type.js
delete mode 100644 docs/assets/js/mathtex-script-type.js
diff --git a/docs/_includes/head_custom.html b/docs/_includes/head_custom.html
index 1eace006..ef523081 100644
--- a/docs/_includes/head_custom.html
+++ b/docs/_includes/head_custom.html
@@ -1,6 +1,6 @@
{% assign math = page.math | default: layout.math | default: site.math %}
{% case math %}
- {% when "katex" %}
- {% include katex.html %}
+ {% when "mathjax" %}
+ {% include mathjax.html %}
{% endcase %}
\ No newline at end of file
diff --git a/docs/_includes/katex.html b/docs/_includes/katex.html
deleted file mode 100644
index d73e629c..00000000
--- a/docs/_includes/katex.html
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/docs/_includes/mathjax.html b/docs/_includes/mathjax.html
new file mode 100644
index 00000000..687b1f83
--- /dev/null
+++ b/docs/_includes/mathjax.html
@@ -0,0 +1,9 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/_layouts/katex.html b/docs/_layouts/katex.html
deleted file mode 100644
index ce760bfb..00000000
--- a/docs/_layouts/katex.html
+++ /dev/null
@@ -1,12 +0,0 @@
----
-layout: default
-math: katex
----
-
- \(
-
- \)
-
-
-{{ content }}
\ No newline at end of file
diff --git a/docs/_layouts/mathjax.html b/docs/_layouts/mathjax.html
new file mode 100644
index 00000000..2cd2fd4e
--- /dev/null
+++ b/docs/_layouts/mathjax.html
@@ -0,0 +1,12 @@
+---
+layout: default
+math: mathjax
+---
+
+ \(
+
+ \)
+
+
+{{ content }}
\ No newline at end of file
diff --git a/docs/assets/js/mathjax-script-type.js b/docs/assets/js/mathjax-script-type.js
new file mode 100644
index 00000000..4a1916b4
--- /dev/null
+++ b/docs/assets/js/mathjax-script-type.js
@@ -0,0 +1,18 @@
+// Copied from https://docs.mathjax.org/en/latest/upgrading/v2.html#changes-in-the-mathjax-api
+MathJax = {
+ options: {
+ renderActions: {
+ findScript: [10, function (doc) {
+ for (const node of document.querySelectorAll('script[type^="math/tex"]')) {
+ const display = !!node.type.match(/; *mode=display/);
+ const math = new doc.options.MathItem(node.textContent, doc.inputJax[0], display);
+ const text = document.createTextNode('');
+ node.parentNode.replaceChild(text, node);
+ math.start = {node: text, delim: '', n: 0};
+ math.end = {node: text, delim: '', n: 0};
+ doc.math.push(math);
+ }
+ }, '']
+ }
+ }
+};
\ No newline at end of file
diff --git a/docs/assets/js/mathtex-script-type.js b/docs/assets/js/mathtex-script-type.js
deleted file mode 100644
index 24f35a16..00000000
--- a/docs/assets/js/mathtex-script-type.js
+++ /dev/null
@@ -1,34 +0,0 @@
-// Mostly copied from https://github.com/KaTeX/KaTeX/tree/main/contrib/mathtex-script-type
-// Options for global command definitions added by @pdmosses
-
-// import katex from "katex";
-
-const macros = {};
-
-let scripts = document.body.getElementsByTagName("script");
-scripts = Array.prototype.slice.call(scripts);
-scripts.forEach(function(script) {
- if (!script.type || !script.type.match(/math\/tex/i)) {
- return -1;
- }
- const display =
- (script.type.match(/mode\s*=\s*display(;|\s|\n|$)/) != null);
-
- const katexElement = document.createElement(display ? "div" : "span");
- katexElement.setAttribute("class",
- display ? "equation" : "inline-equation");
- try {
- katex.render(script.text, katexElement, {
- displayMode: display,
- globalGroup: true,
- trust: true,
- strict: false,
- throwOnError: false,
- macros
- });
- } catch (err) {
- //console.error(err); linter doesn't like this
- katexElement.textContent = script.text;
- }
- script.parentNode.replaceChild(katexElement, script);
-});
\ No newline at end of file
From 4f0bd1d3ab920c5f3bec4f8f4e3dc3da979a3487 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 11:13:11 +0200
Subject: [PATCH 049/130] Update _config.yml
---
docs/_config.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/_config.yml b/docs/_config.yml
index d8662528..023cb0a4 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -5,7 +5,7 @@ theme: just-the-docs
url: https://adtzlr.github.io/ttb
logo: "assets/images/logo.svg"
-math: katex
+math: mathjax
aux_links:
Tensor Toolbox on GitHub: https://github.com/adtzlr/ttb
\ No newline at end of file
From dd1f76bcf1621b3e98572f0914e32f45c48035e6 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 11:17:33 +0200
Subject: [PATCH 050/130] Update mathjax-script-type.js
---
docs/assets/js/mathjax-script-type.js | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/docs/assets/js/mathjax-script-type.js b/docs/assets/js/mathjax-script-type.js
index 4a1916b4..9144a910 100644
--- a/docs/assets/js/mathjax-script-type.js
+++ b/docs/assets/js/mathjax-script-type.js
@@ -15,4 +15,9 @@ MathJax = {
}, '']
}
}
+};
+window.MathJax = {
+ tex: {
+ tags: 'ams'
+ }
};
\ No newline at end of file
From 7209038332720637c20628c1b6a525adb3f52663 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 11:25:25 +0200
Subject: [PATCH 051/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index 634edad7..ed06fa64 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -9,14 +9,12 @@ parent: Examples
This is a very basic example on how to implement a nearly-incompressible version of the Neo-Hookean material model in a commercial FEM package (HYPELA2 for Marc). As no special two- or three-field variational principle is used in this example, it is not suitable for nearly-incompressible material behaviour. Otherwise the elements tend to show excessive volumetric locking during deformation and hence, wrong results are calculated.
-The strain energy density function per unit reference volume is additively splitted into an isochoric and volumetric contribution, see $$\eqref{eq:psi}$$. The first one is assumed to be proportional to the first invariant of the isochoric part of the right Cauchy-Green deformation tensor whereas the volumetric part is only a function of the volumetric ratio (the determinant of the deformation gradient).
+The strain energy density function per unit reference volume is additively splitted into an isochoric and volumetric contribution, see \eqref{eq:psi}. The first one is assumed to be proportional to the first invariant of the isochoric part of the right Cauchy-Green deformation tensor whereas the volumetric part is only a function of the volumetric ratio (the determinant of the deformation gradient).
-$$
\begin{equation}
\psi(\mathbf{C}) = \psi(\mathbf{\hat C}) + U(J)
\label{eq:psi}
\end{equation}
-$$
From 2c4494b97f2036fae93fb95aaf09d81c6839cb91 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 11:28:24 +0200
Subject: [PATCH 052/130] Update mathjax-script-type.js
---
docs/assets/js/mathjax-script-type.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/assets/js/mathjax-script-type.js b/docs/assets/js/mathjax-script-type.js
index 9144a910..c4cc93ba 100644
--- a/docs/assets/js/mathjax-script-type.js
+++ b/docs/assets/js/mathjax-script-type.js
@@ -18,6 +18,6 @@ MathJax = {
};
window.MathJax = {
tex: {
- tags: 'ams'
+ tags: 'all'
}
};
\ No newline at end of file
From 462a9e474ba3609a361f0dbbdf4d328424a61234 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 11:32:42 +0200
Subject: [PATCH 053/130] Change mathjax
---
docs/_includes/mathjax.html | 5 +++++
docs/assets/js/mathjax-config.js | 5 +++++
docs/assets/js/mathjax-script-type.js | 5 -----
3 files changed, 10 insertions(+), 5 deletions(-)
create mode 100644 docs/assets/js/mathjax-config.js
diff --git a/docs/_includes/mathjax.html b/docs/_includes/mathjax.html
index 687b1f83..d19134af 100644
--- a/docs/_includes/mathjax.html
+++ b/docs/_includes/mathjax.html
@@ -3,6 +3,11 @@
src="/just-the-docs-tests/assets/js/mathjax-script-type.js">
+
+
+
-
-
-
+
+
+
\ No newline at end of file
From 0bd31601a271b21eafab2e43c01ca95c1fca793e Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 12:09:29 +0200
Subject: [PATCH 055/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index ed06fa64..2dbdd16f 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -9,12 +9,21 @@ parent: Examples
This is a very basic example on how to implement a nearly-incompressible version of the Neo-Hookean material model in a commercial FEM package (HYPELA2 for Marc). As no special two- or three-field variational principle is used in this example, it is not suitable for nearly-incompressible material behaviour. Otherwise the elements tend to show excessive volumetric locking during deformation and hence, wrong results are calculated.
-The strain energy density function per unit reference volume is additively splitted into an isochoric and volumetric contribution, see \eqref{eq:psi}. The first one is assumed to be proportional to the first invariant of the isochoric part of the right Cauchy-Green deformation tensor whereas the volumetric part is only a function of the volumetric ratio (the determinant of the deformation gradient).
+The strain energy density function per unit reference volume is additively splitted into an isochoric and volumetric contribution, see $$\eqref{eq:psi}$$. The first one is assumed to be proportional to the first invariant of the isochoric part of the right Cauchy-Green deformation tensor whereas the volumetric part is only a function of the volumetric ratio (the determinant of the deformation gradient).
+$$
\begin{equation}
-\psi(\mathbf{C}) = \psi(\mathbf{\hat C}) + U(J)
-\label{eq:psi}
+ \psi(\mathbf{C}) = \psi(\mathbf{\hat C}) + U(J)
+ \label{eq:psi}
\end{equation}
+$$
+
+$$
+\begin{equation}
+ \psi(\mathbf{C}) = \text{C}_{10} (\text{I}_\mathbf{\hat C}-3) + \frac{\kappa}{2} (J-1)^2
+ \label{eq:psi-nh}
+\end{equation}
+$$
From e136c98435bbb768f399d339fa2c7293ef544abe Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 12:52:22 +0200
Subject: [PATCH 056/130] Update mathjax.html
---
docs/_includes/mathjax.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/_includes/mathjax.html b/docs/_includes/mathjax.html
index 44e8c04d..e348a58d 100644
--- a/docs/_includes/mathjax.html
+++ b/docs/_includes/mathjax.html
@@ -1,6 +1,6 @@
@@ -10,5 +10,5 @@
\ No newline at end of file
From 0cecf0efe5beb712b4848cde97910b23a3c9f842 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 12:56:48 +0200
Subject: [PATCH 057/130] Update mathjax.html
---
docs/_includes/mathjax.html | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/docs/_includes/mathjax.html b/docs/_includes/mathjax.html
index e348a58d..5d4eb857 100644
--- a/docs/_includes/mathjax.html
+++ b/docs/_includes/mathjax.html
@@ -1,14 +1,17 @@
-
+
-
+
-
+
\ No newline at end of file
From 35cb64f2b2e7c0bf58cc4b912ba0d624f32077a9 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 12:57:46 +0200
Subject: [PATCH 058/130] Update mathjax.html
---
docs/_includes/mathjax.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/_includes/mathjax.html b/docs/_includes/mathjax.html
index 5d4eb857..361f159e 100644
--- a/docs/_includes/mathjax.html
+++ b/docs/_includes/mathjax.html
@@ -4,11 +4,11 @@
-->
-
- -->
+
- -->
\ No newline at end of file
From 652b0e3331b81c5fccc10fefa1a841771cf320a3 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 14:09:29 +0200
Subject: [PATCH 060/130] Update mathjax.html
---
docs/_includes/mathjax.html | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/docs/_includes/mathjax.html b/docs/_includes/mathjax.html
index de640ac8..b3df3929 100644
--- a/docs/_includes/mathjax.html
+++ b/docs/_includes/mathjax.html
@@ -1,16 +1,14 @@
-
- -->
-
From a6ab2fca8ca3137d1ef9c2cf32380f6a33b8f72f Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 14:15:36 +0200
Subject: [PATCH 061/130] Update mathjax.html
---
docs/_includes/mathjax.html | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/docs/_includes/mathjax.html b/docs/_includes/mathjax.html
index b3df3929..595d4f37 100644
--- a/docs/_includes/mathjax.html
+++ b/docs/_includes/mathjax.html
@@ -8,7 +8,4 @@
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js">
-
-
+
\ No newline at end of file
From 78e5e17dfa1cfa7a23df54dd5a1c42bae967091d Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 14:26:54 +0200
Subject: [PATCH 062/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 54 +++++++++++++++++++++++--------
1 file changed, 41 insertions(+), 13 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index 2dbdd16f..a092e72d 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -9,7 +9,7 @@ parent: Examples
This is a very basic example on how to implement a nearly-incompressible version of the Neo-Hookean material model in a commercial FEM package (HYPELA2 for Marc). As no special two- or three-field variational principle is used in this example, it is not suitable for nearly-incompressible material behaviour. Otherwise the elements tend to show excessive volumetric locking during deformation and hence, wrong results are calculated.
-The strain energy density function per unit reference volume is additively splitted into an isochoric and volumetric contribution, see $$\eqref{eq:psi}$$. The first one is assumed to be proportional to the first invariant of the isochoric part of the right Cauchy-Green deformation tensor whereas the volumetric part is only a function of the volumetric ratio (the determinant of the deformation gradient).
+The strain energy density function per unit reference volume is additively splitted into an isochoric and volumetric contribution, see Eq. $$\eqref{eq:psi}$$. The first one is assumed to be proportional to the first invariant of the isochoric part of the right Cauchy-Green deformation tensor whereas the volumetric part is only a function of the volumetric ratio (the determinant of the deformation gradient), see Eq. $$\eqref{eq:psi-nh}$$.
$$
\begin{equation}
@@ -25,25 +25,53 @@ $$
\end{equation}
$$
-
+We get the second Piola-Kirchhoff stress with the derivative of the strain energy density function per unit reference volume with respect to one half of the right Cauchy-Green deformation tensor as shown in Eq. $$\eqref{eq:pk2-nh}$$.
-We get the second Piola-Kirchhoff stress with the derivative of the helmholtz free energy per unit reference volume with respect to one half of the right Cauchy-Green deformation tensor:
-
-
+$$
+\begin{equation}
+ \mathbf{S} = \frac{\partial \psi(\mathbf{C})}{\partial \frac{1}{2}\mathbf{C}}
+ \label{eq:pk2}
+\end{equation}
+$$
-
+$$
+\begin{equation}
+ \mathbf{S} = 2\text{C}_{10} \ \text{dev}(\hat{\mathbf{C}}) \mathbf{C}^{-1} + \kappa (J-1) J \mathbf{C}^{-1}
+ \label{eq:pk2-nh}
+\end{equation}
+$$
-By evaluating the derivative of the stress with respect to one half of the right Cauchy-Green deformation tensor we get the material elasticity tensor:
+By evaluating the derivative of the stress with respect to one half of the right Cauchy-Green deformation tensor we get the material elasticity tensor, see Eq. $$\eqref{eq:c4-nh}$$,
-
+$$
+\begin{equation}
+ \mathbb{C} = \frac{\partial \mathbf{S}}{\partial\frac{1}{2}\mathbf{C}}
+ \label{eq:c4}
+\end{equation}
+$$
-
+$$
+\begin{equation}
+ \mathbb{C} = 2\text{C}_{10} J^{-2/3} \frac{2}{3} \ (\text{tr}(\mathbf{C}) \ \mathbb{I} - \mathbf{1} \otimes \mathbf{C}^{-1} - \mathbf{C}^{-1} \otimes \mathbf{1} + \frac{1}{3} \text{tr}(\mathbf{C}) \ \mathbf{C}^{-1} \otimes \mathbf{C}^{-1}) + \left(\kappa (J-1) J + \kappa J^2\right) \ \mathbf{C}^{-1} \otimes \mathbf{C}^{-1} - 2 \kappa (J-1) J \ \mathbb{I}
+ \label{eq:c4-nh}
+\end{equation}
+$$
-with the fourth order identity tensor
+with the fourth order identity tensor in Eq. $$\eqref{eq:i4}$$.
-
+$$
+\begin{equation}
+ \mathbb{I}= \mathbf{C}^{-1} \odot \mathbf{C}^{-1}
+ \label{eq:i4}
+\end{equation}
+$$
-
+$$
+\begin{equation}
+ \mathbf{C}^{-1} = \mathbb{I} : \mathbf{C}
+ \label{eq:i4-projection}
+\end{equation}
+$$
The two equations are now implemented in a Total Lagrange user subroutine with the help of this Tensor module as follows:
@@ -114,4 +142,4 @@ The two equations are now implemented in a Total Lagrange user subroutine with
end
```
-There are also examples for a [basic understandig of the tensor toolbox](examples/script_umat.f), the implementation of the [St.Venant Kirchhoff material](example_stvenantkirchhoff.md) and a [full featured MSC.Marc Neo-Hookean material HYPELA2 user subroutine](examples/hypela2_nh_ttb.f).
+There are also examples for a [basic understandig of the tensor toolbox](examples/script_umat.f), the implementation of the [St.Venant Kirchhoff material](example_stvenantkirchhoff.md) and a [full featured Marc Neo-Hookean material HYPELA2 user subroutine](examples/hypela2_nh_ttb.f).
From 6c592facca07cc0c144f6adc2e2a4b2a50a5a98e Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 14:28:30 +0200
Subject: [PATCH 063/130] Update quickstartguide.md
---
docs/installation/quickstartguide.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/installation/quickstartguide.md b/docs/installation/quickstartguide.md
index d37ed26b..2d344838 100644
--- a/docs/installation/quickstartguide.md
+++ b/docs/installation/quickstartguide.md
@@ -21,4 +21,4 @@ The most basic example on how to use this module is to [download the module](htt
```
The `include 'ttb/ttb_library.f'` statement replaces the line with the content of the ttb-module. The first line in a program or subroutine is now a `use Tensor` statement. That's it - now you're ready to go.
-Continue to [Example](example.md) section. For a list and detailed information of available functions go [here](functions.md).
\ No newline at end of file
+Continue to the [Example]({% link examples/index.md %}) section. For a list and detailed information of available functions go [here]({% link api/index.md %}).
\ No newline at end of file
From 319aa1415300286982b561dd0be1ce7c7ece1470 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 14:29:08 +0200
Subject: [PATCH 064/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index a092e72d..bc74ab5d 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -142,4 +142,4 @@ The two equations are now implemented in a Total Lagrange user subroutine with
end
```
-There are also examples for a [basic understandig of the tensor toolbox](examples/script_umat.f), the implementation of the [St.Venant Kirchhoff material](example_stvenantkirchhoff.md) and a [full featured Marc Neo-Hookean material HYPELA2 user subroutine](examples/hypela2_nh_ttb.f).
+There are also examples for a [basic understandig of the tensor toolbox](script_umat.f), the implementation of the [St.Venant Kirchhoff material](example_stvenantkirchhoff.md) and a [full featured Marc Neo-Hookean material HYPELA2 user subroutine](hypela2_nh_ttb.f).
From 234157134410ac5c3c46e5aa3ed3a59310ffca8d Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 14:30:52 +0200
Subject: [PATCH 065/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index bc74ab5d..3c3bf489 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -60,17 +60,10 @@ $$
with the fourth order identity tensor in Eq. $$\eqref{eq:i4}$$.
$$
-\begin{equation}
- \mathbb{I}= \mathbf{C}^{-1} \odot \mathbf{C}^{-1}
- \label{eq:i4}
-\end{equation}
-$$
-
-$$
-\begin{equation}
- \mathbf{C}^{-1} = \mathbb{I} : \mathbf{C}
- \label{eq:i4-projection}
-\end{equation}
+\begin{align}
+ \mathbb{I} &= \mathbf{C}^{-1} \odot \mathbf{C}^{-1} \nonumber \\
+ \mathbf{C}^{-1} &= \mathbb{I} : \mathbf{C} \label{eq:i4}
+\end{align}
$$
The two equations are now implemented in a Total Lagrange user subroutine with the help of this Tensor module as follows:
From d90d6334bb3720c5ebc0adcefa25b4f9259bdd74 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 14:31:48 +0200
Subject: [PATCH 066/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index 3c3bf489..32dd18bf 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -51,10 +51,11 @@ $$
$$
$$
-\begin{equation}
- \mathbb{C} = 2\text{C}_{10} J^{-2/3} \frac{2}{3} \ (\text{tr}(\mathbf{C}) \ \mathbb{I} - \mathbf{1} \otimes \mathbf{C}^{-1} - \mathbf{C}^{-1} \otimes \mathbf{1} + \frac{1}{3} \text{tr}(\mathbf{C}) \ \mathbf{C}^{-1} \otimes \mathbf{C}^{-1}) + \left(\kappa (J-1) J + \kappa J^2\right) \ \mathbf{C}^{-1} \otimes \mathbf{C}^{-1} - 2 \kappa (J-1) J \ \mathbb{I}
+\begin{align}
+ \mathbb{C} &= 2\text{C}_{10} J^{-2/3} \frac{2}{3} \ (\text{tr}(\mathbf{C}) \ \mathbb{I} - \mathbf{1} \otimes \mathbf{C}^{-1} - \mathbf{C}^{-1} \otimes \mathbf{1} + \frac{1}{3} \text{tr}(\mathbf{C}) \ \mathbf{C}^{-1} \otimes \mathbf{C}^{-1}) \nonumber \\
+ &+ \left(\kappa (J-1) J + \kappa J^2\right) \ \mathbf{C}^{-1} \otimes \mathbf{C}^{-1} - 2 \kappa (J-1) J \ \mathbb{I}
\label{eq:c4-nh}
-\end{equation}
+\end{align}
$$
with the fourth order identity tensor in Eq. $$\eqref{eq:i4}$$.
From f0d7143851fb1902fff5649f31954c7e8ed35cf1 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 14:32:45 +0200
Subject: [PATCH 067/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index 32dd18bf..c302b3fd 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -12,17 +12,11 @@ This is a very basic example on how to implement a nearly-incompressible version
The strain energy density function per unit reference volume is additively splitted into an isochoric and volumetric contribution, see Eq. $$\eqref{eq:psi}$$. The first one is assumed to be proportional to the first invariant of the isochoric part of the right Cauchy-Green deformation tensor whereas the volumetric part is only a function of the volumetric ratio (the determinant of the deformation gradient), see Eq. $$\eqref{eq:psi-nh}$$.
$$
-\begin{equation}
- \psi(\mathbf{C}) = \psi(\mathbf{\hat C}) + U(J)
- \label{eq:psi}
-\end{equation}
-$$
-
-$$
-\begin{equation}
+\begin{align}
+ \psi(\mathbf{C}) = \psi(\mathbf{\hat C}) + U(J) \nonumber \\
\psi(\mathbf{C}) = \text{C}_{10} (\text{I}_\mathbf{\hat C}-3) + \frac{\kappa}{2} (J-1)^2
\label{eq:psi-nh}
-\end{equation}
+\end{align}
$$
We get the second Piola-Kirchhoff stress with the derivative of the strain energy density function per unit reference volume with respect to one half of the right Cauchy-Green deformation tensor as shown in Eq. $$\eqref{eq:pk2-nh}$$.
From 89a15f8c076afc0165e4ed260f1082d37ee94d8c Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 14:33:41 +0200
Subject: [PATCH 068/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index c302b3fd..629d6739 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -23,13 +23,7 @@ We get the second Piola-Kirchhoff stress with the derivative of the strain energ
$$
\begin{equation}
- \mathbf{S} = \frac{\partial \psi(\mathbf{C})}{\partial \frac{1}{2}\mathbf{C}}
- \label{eq:pk2}
-\end{equation}
-$$
-
-$$
-\begin{equation}
+ \mathbf{S} = \frac{\partial \psi(\mathbf{C})}{\partial \frac{1}{2}\mathbf{C}} \nonumber \\
\mathbf{S} = 2\text{C}_{10} \ \text{dev}(\hat{\mathbf{C}}) \mathbf{C}^{-1} + \kappa (J-1) J \mathbf{C}^{-1}
\label{eq:pk2-nh}
\end{equation}
From 1b248f998cc65e13cc4567a10ad410a3d8bf8e91 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 14:34:11 +0200
Subject: [PATCH 069/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index 629d6739..e36d56f6 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -13,8 +13,8 @@ The strain energy density function per unit reference volume is additively split
$$
\begin{align}
- \psi(\mathbf{C}) = \psi(\mathbf{\hat C}) + U(J) \nonumber \\
- \psi(\mathbf{C}) = \text{C}_{10} (\text{I}_\mathbf{\hat C}-3) + \frac{\kappa}{2} (J-1)^2
+ \psi(\mathbf{C}) &= \psi(\mathbf{\hat C}) + U(J) \nonumber \\
+ \psi(\mathbf{C}) &= \text{C}_{10} (\text{I}_\mathbf{\hat C}-3) + \frac{\kappa}{2} (J-1)^2
\label{eq:psi-nh}
\end{align}
$$
@@ -22,11 +22,11 @@ $$
We get the second Piola-Kirchhoff stress with the derivative of the strain energy density function per unit reference volume with respect to one half of the right Cauchy-Green deformation tensor as shown in Eq. $$\eqref{eq:pk2-nh}$$.
$$
-\begin{equation}
- \mathbf{S} = \frac{\partial \psi(\mathbf{C})}{\partial \frac{1}{2}\mathbf{C}} \nonumber \\
- \mathbf{S} = 2\text{C}_{10} \ \text{dev}(\hat{\mathbf{C}}) \mathbf{C}^{-1} + \kappa (J-1) J \mathbf{C}^{-1}
+\begin{align}
+ \mathbf{S} &= \frac{\partial \psi(\mathbf{C})}{\partial \frac{1}{2}\mathbf{C}} \nonumber \\
+ \mathbf{S} &= 2\text{C}_{10} \ \text{dev}(\hat{\mathbf{C}}) \mathbf{C}^{-1} + \kappa (J-1) J \mathbf{C}^{-1}
\label{eq:pk2-nh}
-\end{equation}
+\end{align}
$$
By evaluating the derivative of the stress with respect to one half of the right Cauchy-Green deformation tensor we get the material elasticity tensor, see Eq. $$\eqref{eq:c4-nh}$$,
From 48e7b50a0e8c6687dea9b39a405857816234135a Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 14:35:37 +0200
Subject: [PATCH 070/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index e36d56f6..30cf9773 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -55,7 +55,7 @@ $$
\end{align}
$$
-The two equations are now implemented in a Total Lagrange user subroutine with the help of this Tensor module as follows:
+Eq. $$\eqref{eq:pk2-nh}$$ and Eq. $$\eqref{eq:c4-nh}$$ are now implemented in a Total Lagrange user subroutine with the help of this Tensor module as follows:
```fortran
include 'ttb/ttb_library.f'
From 62347ed9d682fea3a1ab62254fc0b1bcc4a8bc3c Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 14:36:38 +0200
Subject: [PATCH 071/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index 30cf9773..941c4dc9 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -31,15 +31,9 @@ $$
By evaluating the derivative of the stress with respect to one half of the right Cauchy-Green deformation tensor we get the material elasticity tensor, see Eq. $$\eqref{eq:c4-nh}$$,
-$$
-\begin{equation}
- \mathbb{C} = \frac{\partial \mathbf{S}}{\partial\frac{1}{2}\mathbf{C}}
- \label{eq:c4}
-\end{equation}
-$$
-
$$
\begin{align}
+ \mathbb{C} &= \frac{\partial \mathbf{S}}{\partial\frac{1}{2}\mathbf{C}} \nonumber \\
\mathbb{C} &= 2\text{C}_{10} J^{-2/3} \frac{2}{3} \ (\text{tr}(\mathbf{C}) \ \mathbb{I} - \mathbf{1} \otimes \mathbf{C}^{-1} - \mathbf{C}^{-1} \otimes \mathbf{1} + \frac{1}{3} \text{tr}(\mathbf{C}) \ \mathbf{C}^{-1} \otimes \mathbf{C}^{-1}) \nonumber \\
&+ \left(\kappa (J-1) J + \kappa J^2\right) \ \mathbf{C}^{-1} \otimes \mathbf{C}^{-1} - 2 \kappa (J-1) J \ \mathbb{I}
\label{eq:c4-nh}
From 4a9cd953ec27bd281d53139bf584a50a49c31408 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 14:37:03 +0200
Subject: [PATCH 072/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index 941c4dc9..8524f758 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -14,8 +14,7 @@ The strain energy density function per unit reference volume is additively split
$$
\begin{align}
\psi(\mathbf{C}) &= \psi(\mathbf{\hat C}) + U(J) \nonumber \\
- \psi(\mathbf{C}) &= \text{C}_{10} (\text{I}_\mathbf{\hat C}-3) + \frac{\kappa}{2} (J-1)^2
- \label{eq:psi-nh}
+ \psi(\mathbf{C}) &= \text{C}_{10} (\text{I}_\mathbf{\hat C}-3) + \frac{\kappa}{2} (J-1)^2 \label{eq:psi-nh}
\end{align}
$$
From d82f42227f7723aebe3244b33a64f3af78058d83 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 14:37:33 +0200
Subject: [PATCH 073/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index 8524f758..9cff70e2 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -13,7 +13,7 @@ The strain energy density function per unit reference volume is additively split
$$
\begin{align}
- \psi(\mathbf{C}) &= \psi(\mathbf{\hat C}) + U(J) \nonumber \\
+ \psi(\mathbf{C}) &= \psi(\mathbf{\hat C}) + U(J) \label{eq:psi} \\
\psi(\mathbf{C}) &= \text{C}_{10} (\text{I}_\mathbf{\hat C}-3) + \frac{\kappa}{2} (J-1)^2 \label{eq:psi-nh}
\end{align}
$$
From fa784f62541b35bdbf00fa11de4bce2ca7cb4d17 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:04:31 +0200
Subject: [PATCH 074/130] Enhance the examples in the docs
---
docs/examples/{ => Abaqus}/umat_nh_ttb.f | 2 +-
.../{ => Abaqus}/umat_nh_ttb_simple.f | 4 +-
docs/examples/{ => Marc}/hypela2_nh_ttb.f | 0
.../{ => Marc}/hypela2_nh_ttb_simple.f | 8 +-
.../hypela2_nonlinear_viscoelasticity.f | 0
.../{ => Marc}/hypela2_stvenantkirchhoff.f | 0
docs/examples/example_neohooke.md | 102 ++++++++++++++++--
7 files changed, 100 insertions(+), 16 deletions(-)
rename docs/examples/{ => Abaqus}/umat_nh_ttb.f (98%)
rename docs/examples/{ => Abaqus}/umat_nh_ttb_simple.f (97%)
rename docs/examples/{ => Marc}/hypela2_nh_ttb.f (100%)
rename docs/examples/{ => Marc}/hypela2_nh_ttb_simple.f (91%)
rename docs/examples/{ => Marc}/hypela2_nonlinear_viscoelasticity.f (100%)
rename docs/examples/{ => Marc}/hypela2_stvenantkirchhoff.f (100%)
diff --git a/docs/examples/umat_nh_ttb.f b/docs/examples/Abaqus/umat_nh_ttb.f
similarity index 98%
rename from docs/examples/umat_nh_ttb.f
rename to docs/examples/Abaqus/umat_nh_ttb.f
index 48c95382..0f34b203 100644
--- a/docs/examples/umat_nh_ttb.f
+++ b/docs/examples/Abaqus/umat_nh_ttb.f
@@ -9,7 +9,7 @@ SUBROUTINE UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,
! ABAQUS UMAT: Easy-to-extend Nearly-Incompressible Neo-Hookean
! Material Formulation
! Example for usage of Tensor Toolbox
- ! capability: 3D analysis
+ ! capability: 3D, Axisymmetric
! Formulation: Total Lagrange with push forward for Abaqus
! Reference: Holzapfel, G. (2001). NONLINEAR SOLID MECHANICS.
! A Continuum Approach for Engineering.
diff --git a/docs/examples/umat_nh_ttb_simple.f b/docs/examples/Abaqus/umat_nh_ttb_simple.f
similarity index 97%
rename from docs/examples/umat_nh_ttb_simple.f
rename to docs/examples/Abaqus/umat_nh_ttb_simple.f
index 1851eebb..767a1892 100644
--- a/docs/examples/umat_nh_ttb_simple.f
+++ b/docs/examples/Abaqus/umat_nh_ttb_simple.f
@@ -8,7 +8,7 @@ SUBROUTINE UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,
! ABAQUS UMAT: Nearly-Incompressible Neo-Hookean Material
! Example for usage of Tensor Toolbox
- ! capability: 3D analysis, axisymmetric?
+ ! capability: 3D, Axisymmetric
! Formulation: Total Lagrange with push forward for Abaqus
! Andreas Dutzler, 2018-07-22, Graz University of Technology
@@ -36,7 +36,7 @@ SUBROUTINE UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,
! material parameters
C10 = 0.5
- kappa = 500.0
+ kappa = 5.0
Eye = identity2(Eye)
F1 = dfgrd1(1:3,1:3)
diff --git a/docs/examples/hypela2_nh_ttb.f b/docs/examples/Marc/hypela2_nh_ttb.f
similarity index 100%
rename from docs/examples/hypela2_nh_ttb.f
rename to docs/examples/Marc/hypela2_nh_ttb.f
diff --git a/docs/examples/hypela2_nh_ttb_simple.f b/docs/examples/Marc/hypela2_nh_ttb_simple.f
similarity index 91%
rename from docs/examples/hypela2_nh_ttb_simple.f
rename to docs/examples/Marc/hypela2_nh_ttb_simple.f
index 0cdfe6f7..57209c21 100644
--- a/docs/examples/hypela2_nh_ttb_simple.f
+++ b/docs/examples/Marc/hypela2_nh_ttb_simple.f
@@ -5,11 +5,11 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,
3 frotn1,strechn1,eigvn1,ncrd,itel,ndeg,ndm,
4 nnode,jtype,lclass,ifr,ifu)
- ! HYPELA2: Nearly-Incompressible Neo-Hookean Material
+ ! UMAT: Nearly-Incompressible Neo-Hookean Material
! Example for usage of Tensor Toolbox
- ! capability: axisymmetric and 3D analysis
+ ! capability: 3D, Axisymmetric
! Formulation: Total Lagrange
- ! Voigt Notation: change commented Tensor Datatypes
+ ! Voigt Notation: Change commented Tensor Datatypes
! Andreas Dutzler, 2018-01-02, Graz University of Technology
use Tensor
@@ -35,7 +35,7 @@ subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi,
! material parameters
C10 = 0.5
- kappa = 500.0
+ kappa = 5.0
Eye = identity2(Eye)
F1 = ffn1(1:3,1:3) ! use slices (ffn1 is an assumed size array)
diff --git a/docs/examples/hypela2_nonlinear_viscoelasticity.f b/docs/examples/Marc/hypela2_nonlinear_viscoelasticity.f
similarity index 100%
rename from docs/examples/hypela2_nonlinear_viscoelasticity.f
rename to docs/examples/Marc/hypela2_nonlinear_viscoelasticity.f
diff --git a/docs/examples/hypela2_stvenantkirchhoff.f b/docs/examples/Marc/hypela2_stvenantkirchhoff.f
similarity index 100%
rename from docs/examples/hypela2_stvenantkirchhoff.f
rename to docs/examples/Marc/hypela2_stvenantkirchhoff.f
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index 9cff70e2..22798046 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -1,14 +1,14 @@
---
-title: Neo-Hooke (Marc)
+title: Neo-Hooke
layout: page
nav_order: 4
parent: Examples
---
-## Neo-Hooke (Marc)
-
-This is a very basic example on how to implement a nearly-incompressible version of the Neo-Hookean material model in a commercial FEM package (HYPELA2 for Marc). As no special two- or three-field variational principle is used in this example, it is not suitable for nearly-incompressible material behaviour. Otherwise the elements tend to show excessive volumetric locking during deformation and hence, wrong results are calculated.
+## Neo-Hooke
+This is a very basic example on how to implement a nearly-incompressible version of the Neo-Hookean material model in a commercial FEM package (HYPELA2 for Marc or UMAT for Abaqus). As no special two- or three-field variational principle is used in this example, it is not suitable for nearly-incompressible material behaviour. Otherwise the elements tend to show excessive volumetric locking during deformation and hence, wrong results are calculated.
+### Theory
The strain energy density function per unit reference volume is additively splitted into an isochoric and volumetric contribution, see Eq. $$\eqref{eq:psi}$$. The first one is assumed to be proportional to the first invariant of the isochoric part of the right Cauchy-Green deformation tensor whereas the volumetric part is only a function of the volumetric ratio (the determinant of the deformation gradient), see Eq. $$\eqref{eq:psi-nh}$$.
$$
@@ -48,7 +48,8 @@ $$
\end{align}
$$
-Eq. $$\eqref{eq:pk2-nh}$$ and Eq. $$\eqref{eq:c4-nh}$$ are now implemented in a Total Lagrange user subroutine with the help of this Tensor module as follows:
+### HYPELA2 User Subroutine for Marc
+Eq. $$\eqref{eq:pk2-nh}$$ and Eq. $$\eqref{eq:c4-nh}$$ are implemented in a Total Lagrange [user subroutine](Marc/hypela2_nh_ttb_simple.f) with the help of this Tensor module.
```fortran
include 'ttb/ttb_library.f'
@@ -60,9 +61,9 @@ Eq. $$\eqref{eq:pk2-nh}$$ and Eq. $$\eqref{eq:c4-nh}$$ are now implemented in a
! HYPELA2: Nearly-Incompressible Neo-Hookean Material
! Example for usage of Tensor Toolbox
- ! capability: axisymmetric and 3D analysis
+ ! capability: 3D, Axisymmetric
! Formulation: Total Lagrange
- ! Voigt Notation: change commented Tensor Datatypes
+ ! Voigt Notation: Change commented Tensor Datatypes
! Andreas Dutzler, 2018-01-02, Graz University of Technology
use Tensor
@@ -88,7 +89,7 @@ Eq. $$\eqref{eq:pk2-nh}$$ and Eq. $$\eqref{eq:c4-nh}$$ are now implemented in a
! material parameters
C10 = 0.5
- kappa = 500.0
+ kappa = 5.0
Eye = identity2(Eye)
F1 = ffn1(1:3,1:3) ! use slices (ffn1 is an assumed size array)
@@ -117,4 +118,87 @@ Eq. $$\eqref{eq:pk2-nh}$$ and Eq. $$\eqref{eq:c4-nh}$$ are now implemented in a
end
```
-There are also examples for a [basic understandig of the tensor toolbox](script_umat.f), the implementation of the [St.Venant Kirchhoff material](example_stvenantkirchhoff.md) and a [full featured Marc Neo-Hookean material HYPELA2 user subroutine](hypela2_nh_ttb.f).
+### UMAT User Subroutine for Abaqus
+Abaqus uses an Updated-Lagrange approach and hence, Eq. $$\eqref{eq:pk2-nh}$$ and Eq. $$\eqref{eq:c4-nh}$$ are transformed and implemented in a [user subroutine](Abaqus/umat_nh_ttb_simple.f) with the help of this Tensor module.
+
+```fortran
+ include 'ttb/ttb_library.f'
+
+ SUBROUTINE UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,
+ 1 RPL,DDSDDT,DRPLDE,DRPLDT,
+ 2 STRAN,DSTRAN,TIME,DTIME,TEMP,DTEMP,PREDEF,DPRED,CMNAME,
+ 3 NDI,NSHR,NTENS,NSTATV,PROPS,NPROPS,COORDS,DROT,PNEWDT,
+ 4 CELENT,DFGRD0,DFGRD1,NOEL,NPT,LAYER,KSPT,JSTEP,KINC)
+
+ ! ABAQUS UMAT: Nearly-Incompressible Neo-Hookean Material
+ ! Example for usage of Tensor Toolbox
+ ! capability: 3D, Axisymmetric
+ ! Formulation: Total Lagrange with push forward for Abaqus
+ ! Andreas Dutzler, 2018-07-22, Graz University of Technology
+
+ use Tensor
+
+ ! `implicit none` is not supported if 'ABA_PARAM.INC' is included.
+ ! declare all double-variables which start with `i,j,k,l,m,n`
+ ! - otherwise they will be integers
+
+ ! implicit none
+ INCLUDE 'ABA_PARAM.INC'
+
+ CHARACTER*80 CMNAME
+ DIMENSION STRESS(NTENS),STATEV(NSTATV),
+ 1 DDSDDE(NTENS,NTENS),DDSDDT(NTENS),DRPLDE(NTENS),
+ 2 STRAN(NTENS),DSTRAN(NTENS),TIME(2),PREDEF(1),DPRED(1),
+ 3 PROPS(NPROPS),COORDS(3),DROT(3,3),DFGRD0(3,3),DFGRD1(3,3),
+ 4 JSTEP(4)
+
+ type(Tensor2) :: F1
+ real(kind=8) :: J,kappa,C10
+
+ type(Tensor2s) :: C1,invC1,S1,Eye
+ type(Tensor4s) :: C4
+
+ ! material parameters
+ C10 = 0.5
+ kappa = 5.0
+
+ Eye = identity2(Eye)
+ F1 = dfgrd1(1:3,1:3)
+ J = det(F1)
+
+ ! right cauchy-green deformation tensor and its inverse
+ C1 = transpose(F1)*F1
+ invC1 = inv(C1)
+
+ ! pk2 stress
+ S1 = 2.*C10*J**(-2./3.)*dev(C1)*invC1 + kappa*(J-1)*J*invC1
+
+ ! push forward to cauchy stress
+ S1 = piola(F1,S1)/J
+
+ ! material elasticity tensor
+ C4 = 2.*C10 * J**(-2./3.) * 2./3. *
+ * ( tr(C1) * (invC1.cdya.invC1)
+ * - (Eye.dya.invC1) - (invC1.dya.Eye)
+ * + tr(C1)/3. * (invC1.dya.invC1) )
+ * + (kappa*(J-1)*J+kappa*J**2) * (invC1.dya.invC1)
+ * - 2.*kappa*(J-1)*J* (invC1.cdya.invC1)
+
+ ! push forward to jaumann tangent of cauchy stress for abaqus
+ C4 = piola(F1,C4)/J + (S1.cdya.Eye)+(Eye.cdya.S1)
+
+ ! output as array
+ STRESS(1:ntens) = asabqarray(voigt(S1),ntens)
+ DDSDDE(1:ntens,1:ntens) = asabqarray(voigt(C4),ntens,ntens)
+
+ return
+ end
+```
+
+
+There are also examples for
+
+* a [basic understandig of the tensor toolbox](script_umat.f),
+* the implementation of the [St.Venant Kirchhoff material](example_stvenantkirchhoff.md),
+* a [full featured Marc Neo-Hookean material HYPELA2 user subroutine](Marc/hypela2_nh_ttb.f) and
+* an [easy-to-extend Abaqus Neo-Hookean material UMAT user subroutine](Abaqus/umat_nh_ttb.f).
From 592ca81df1b018024f20b89b17f68b12e8e3d0db Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:07:18 +0200
Subject: [PATCH 075/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index 22798046..0093499e 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -8,7 +8,7 @@ parent: Examples
## Neo-Hooke
This is a very basic example on how to implement a nearly-incompressible version of the Neo-Hookean material model in a commercial FEM package (HYPELA2 for Marc or UMAT for Abaqus). As no special two- or three-field variational principle is used in this example, it is not suitable for nearly-incompressible material behaviour. Otherwise the elements tend to show excessive volumetric locking during deformation and hence, wrong results are calculated.
-### Theory
+### Hyperelasticity
The strain energy density function per unit reference volume is additively splitted into an isochoric and volumetric contribution, see Eq. $$\eqref{eq:psi}$$. The first one is assumed to be proportional to the first invariant of the isochoric part of the right Cauchy-Green deformation tensor whereas the volumetric part is only a function of the volumetric ratio (the determinant of the deformation gradient), see Eq. $$\eqref{eq:psi-nh}$$.
$$
From e2a7976cfbb6818936a240a54eca26d6351e915c Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:10:27 +0200
Subject: [PATCH 076/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index 0093499e..6599da07 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -193,12 +193,4 @@ Abaqus uses an Updated-Lagrange approach and hence, Eq. $$\eqref{eq:pk2-nh}$$ an
return
end
-```
-
-
-There are also examples for
-
-* a [basic understandig of the tensor toolbox](script_umat.f),
-* the implementation of the [St.Venant Kirchhoff material](example_stvenantkirchhoff.md),
-* a [full featured Marc Neo-Hookean material HYPELA2 user subroutine](Marc/hypela2_nh_ttb.f) and
-* an [easy-to-extend Abaqus Neo-Hookean material UMAT user subroutine](Abaqus/umat_nh_ttb.f).
+```
\ No newline at end of file
From a627d2f88bab2b31eb7bf50f5f7c338739a2ad86 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:10:29 +0200
Subject: [PATCH 077/130] Update index.md
---
docs/examples/index.md | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/docs/examples/index.md b/docs/examples/index.md
index b1555166..50d9aa6a 100644
--- a/docs/examples/index.md
+++ b/docs/examples/index.md
@@ -3,4 +3,11 @@ title: Examples
layout: page
nav_order: 4
has_children: true
----
\ No newline at end of file
+---
+
+This section contains examples for user subroutines for Marc and Abaqus, including
+
+* a [basic understandig of the tensor toolbox](script_umat.f),
+* the implementation of the [St.Venant Kirchhoff material]({% link examples/example_stvenantkirchhoff.md %}),
+* a [full featured Marc Neo-Hookean material HYPELA2 user subroutine](Marc/hypela2_nh_ttb.f) and
+* an [easy-to-extend Abaqus Neo-Hookean material UMAT user subroutine](Abaqus/umat_nh_ttb.f).
\ No newline at end of file
From 16e3a7049967b39f7f2b4843bf36f569f79cb6aa Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:24:16 +0200
Subject: [PATCH 078/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 90 ++++++++++++++++++----
1 file changed, 73 insertions(+), 17 deletions(-)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index 5dde4aa9..5f5ab161 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -5,21 +5,32 @@ nav_order: 4
parent: Examples
---
-## Example: St. Venant Kirchhoff Material
+## Example: Saint Venant-Kirchhoff Material
-The following example discusses the implementation of a St.Venant-Kirchhoff material in a very simple and readable user subroutine. The St.Venant-Kirchhoff material is possibly the simplest example for a hyperelastic material but suffers from practical relevance beyond the small strain range [1]. Anyway, it's a good starting point because stress tensor and elasticity matrix are of the same form as the linear elasticity formulation, except that Green-Lagrange strains are used.
+The following example discusses the implementation of a Saint Venant-Kirchhoff material in a very simple and readable user subroutine. The Saint Venant-Kirchhoff material is possibly the simplest example for a hyperelastic material but suffers from practical relevance beyond the small strain range [1]. Anyway, it's a good starting point because stress tensor and elasticity matrix are of the same form as the linear elasticity formulation, except that Green-Lagrange strains are used.
## Kinematics
-Starting from the Deformation Gradient, we calculate the Green-Lagrange strain tensor with the right Cauchy Green Deformation Tensor with
+Starting from the Deformation Gradient, we calculate the Green-Lagrange strain tensor in Eq. $$\eqref{eq:gl-strain}$$ with the right Cauchy Green Deformation Tensor, see Eq. $$\eqref{eq:cauchy-green}$$.
-
+$$
+\begin{equation}
+ \boldsymbol{E} = \frac{1}{2} (\boldsymbol{C} - \boldsymbol{1}) \label{eq:gl-strain}
+\end{equation}
+$$
and
-
+$$
+\begin{equation}
+ \boldsymbol{C} = \boldsymbol{F}^T \boldsymbol{F} \label{eq:cauchy-green}
+\end{equation}
+$$
## Subroutine Header for user materials
-Before we are able to add our own user code, we have to start with an empty fortran subroutine header for Marc's HYPELA2. Similar headers are provided for Abaqus, ANSYS, etc in the corresponding manuals.
+Before we are able to add our own user code, we have to start with an empty fortran subroutine header. Headers are provided e.g. for Marc, Abaqus, ANSYS in their corresponding manuals.
+
+
+HYPELA2 for Marc
```fortran
include 'ttb/ttb_library.f'
@@ -49,6 +60,38 @@ Before we are able to add our own user code, we have to start with an empty fort
end
```
+
+
+
+UMAT for Abaqus
+
+```fortran
+ include 'ttb/ttb_library.f'
+
+ SUBROUTINE UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD,
+ 1 RPL,DDSDDT,DRPLDE,DRPLDT,
+ 2 STRAN,DSTRAN,TIME,DTIME,TEMP,DTEMP,PREDEF,DPRED,CMNAME,
+ 3 NDI,NSHR,NTENS,NSTATV,PROPS,NPROPS,COORDS,DROT,PNEWDT,
+ 4 CELENT,DFGRD0,DFGRD1,NOEL,NPT,LAYER,KSPT,JSTEP,KINC)
+
+ use Tensor
+ implicit none
+
+ CHARACTER*80 CMNAME
+ DIMENSION STRESS(NTENS),STATEV(NSTATV),
+ 1 DDSDDE(NTENS,NTENS),DDSDDT(NTENS),DRPLDE(NTENS),
+ 2 STRAN(NTENS),DSTRAN(NTENS),TIME(2),PREDEF(1),DPRED(1),
+ 3 PROPS(NPROPS),COORDS(3),DROT(3,3),DFGRD0(3,3),DFGRD1(3,3),
+ 4 JSTEP(4)
+
+ ! ...user code...
+
+ return
+ end
+```
+
+
+
First we need to define our material parameters, which will be entered as young's modulus and poisson ratio.
```fortran
@@ -80,14 +123,24 @@ In our code implementation the strain tensor looks like:
We first initialize a rank 2 Identity Tensor `Eye`. Then the Deformation Gradient Tensor at the end of the increment `F1` is initialized with no deformation and overwritten by `ffn1` with dimension `(itel,3)` where `itel` being an integer `2` or `3` based on the analysis type. This is necessary because this module is hardcoded to three dimensions whereas MSC.Marc has reduced storage options for the Deformation Gradient in plane or axisymmetric analysis types. Finally we calculate the Green-Lagrange Strain Tensor.
## Strain Energy Potential
-We'll derive both stress and elasticity tensor in the material (reference) configuration. At first we need the definition for the helmholtz free energy per unit reference volume which depends on the Green-Lagrange strain tensor.
+We'll derive both stress and elasticity tensor in the material (reference) configuration. At first we need the definition for the strain energy density function per unit reference volume which depends on the Green-Lagrange strain tensor, see Eq. $$\eqref{eq:psi-svk}$$.
-
+$$
+\begin{equation}
+ \Psi(\boldsymbol{E}) = \frac{1}{2} \lambda(\text{tr}\boldsymbol{E})^2+\mu \boldsymbol{E} : \boldsymbol{E}
+ \label{eq:psi-svk}
+\end{equation}
+$$
## Material Stress Tensor
-In the next step, we get the 2nd Piola-Kirchhoff stress tensor as a partial derivative of the strain energy potential with respect to the Green-Lagrange strain tensor.
+In the next step, we get the 2nd Piola-Kirchhoff stress tensor as a partial derivative of the strain energy potential with respect to the Green-Lagrange strain tensor, see Eq. $$\eqref{eq:pk2-svk}$$.
-
+$$
+\begin{equation}
+ \boldsymbol{S} = \frac{\partial \Psi(\boldsymbol{E})}{\partial \boldsymbol{E}} = \lambda(\text{tr}\boldsymbol{E}) \boldsymbol{1} + 2 \mu \boldsymbol{E}
+ \label{eq:pk2-svk}
+\end{equation}
+$$
Inside our subroutine the stress tensor is
@@ -100,13 +153,14 @@ Inside our subroutine the stress tensor is
```
## Material Elasticity Tensor
-With the second derivative of the strain energy potential we get the corresponding elasticity tensor.
-
-
+With the second derivative of the strain energy potential we get the corresponding elasticity tensor, see Eq. $$\eqref{eq:c4-svk}$$.
-Or in index notation:
-
-
+$$
+\begin{equation}
+ \mathbb{C} = \frac{\partial^2 \Psi(\boldsymbol{E})}{\partial \boldsymbol{E} \partial \boldsymbol{E}} = \lambda \boldsymbol{1} \otimes \boldsymbol{1} + 2 \mu \mathbb{I}
+ \label{eq:c4-svk}
+\end{equation}
+$$
Again, in our fortran subroutine the code for this elasticity tensor is as follows:
@@ -120,6 +174,8 @@ Again, in our fortran subroutine the code for this elasticity tensor is as follo
The crossed dyadic product is implemented as the symmetric variant in this module, so writing `Eye.cdya.Eye` is enough for the symmetric version of the rank 4 Identity Tensor.
+## Marc-specific options
+
Finally we have to export our Tensor data types back to conventional fortran arrays. The integer `ngens = ndi + nshear` is based on the analysis dimension.
```fortran
@@ -147,7 +203,7 @@ If we would like to use the Updated Lagrange framework too, we'll have to check
In this code `iupdat` is an integer with `0` for total lagrange and `1` for updated lagrange. You may download the whole example as a [HYPELA2 user subroutine](examples/hypela2_stvenantkirchhoff.f) for Marc.
-## Sources
+## References
[1] Bonet, J., Gil, A. J., & Wood, R. D. (2016). Nonlinear Solid Mechanics for Finite Element Analysis: Statics. Cambridge University Press. [](https://doi.org/10.1017/cbo9781316336144)
[2] Holland, M. (2018, May 7). Mholla/Hitchhikers-Guide-To-Abaqus: Initial Release (Version v1.0). Zenodo. [](https://doi.org/10.5281/zenodo.1243270)
From 83271bbea681b0df984c499f5a77eab2695cf06e Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:24:56 +0200
Subject: [PATCH 079/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index 5f5ab161..4e323f8f 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -1,5 +1,5 @@
---
-title: Marc (Saint Venant-Kirchhoff)
+title: Saint Venant-Kirchhoff
layout: page
nav_order: 4
parent: Examples
@@ -201,7 +201,7 @@ If we would like to use the Updated Lagrange framework too, we'll have to check
endif
```
-In this code `iupdat` is an integer with `0` for total lagrange and `1` for updated lagrange. You may download the whole example as a [HYPELA2 user subroutine](examples/hypela2_stvenantkirchhoff.f) for Marc.
+In this code `iupdat` is an integer with `0` for total lagrange and `1` for updated lagrange. You may download the example as a [HYPELA2 user subroutine](Marc/hypela2_stvenantkirchhoff.f) for Marc.
## References
[1] Bonet, J., Gil, A. J., & Wood, R. D. (2016). Nonlinear Solid Mechanics for Finite Element Analysis: Statics. Cambridge University Press. [](https://doi.org/10.1017/cbo9781316336144)
From 72df469db825162e28f807aa74cd477e8c8c78b9 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:25:43 +0200
Subject: [PATCH 080/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index 4e323f8f..c723c651 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -32,6 +32,7 @@ Before we are able to add our own user code, we have to start with an empty fort
HYPELA2 for Marc
+
```fortran
include 'ttb/ttb_library.f'
@@ -60,11 +61,13 @@ Before we are able to add our own user code, we have to start with an empty fort
end
```
+
UMAT for Abaqus
+
```fortran
include 'ttb/ttb_library.f'
@@ -90,6 +93,7 @@ Before we are able to add our own user code, we have to start with an empty fort
end
```
+
First we need to define our material parameters, which will be entered as young's modulus and poisson ratio.
From f237862192d45d4caea091ce13f5a8f7072486ff Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:27:20 +0200
Subject: [PATCH 081/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index c723c651..71b649f2 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -30,8 +30,9 @@ $$
Before we are able to add our own user code, we have to start with an empty fortran subroutine header. Headers are provided e.g. for Marc, Abaqus, ANSYS in their corresponding manuals.
-HYPELA2 for Marc
+Marc
+### HYPELA2 for Marc
```fortran
include 'ttb/ttb_library.f'
@@ -61,12 +62,12 @@ Before we are able to add our own user code, we have to start with an empty fort
end
```
-
-UMAT for Abaqus
+Abaqus
+### UMAT for Abaqus
```fortran
include 'ttb/ttb_library.f'
@@ -93,7 +94,6 @@ Before we are able to add our own user code, we have to start with an empty fort
end
```
-
First we need to define our material parameters, which will be entered as young's modulus and poisson ratio.
From 5b1aaa0b57544f4f63d76d9117710d3996c2a2d2 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:27:53 +0200
Subject: [PATCH 082/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index 71b649f2..f8f056af 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -150,9 +150,7 @@ Inside our subroutine the stress tensor is
```fortran
type(Tensor2s) :: S1
-
- ! ...some code...
-
+
S1 = lambda*tr(E1)*Eye + 2.*mu*E1
```
@@ -170,9 +168,7 @@ Again, in our fortran subroutine the code for this elasticity tensor is as follo
```fortran
type(Tensor4s) :: C4
-
- ! ...some code...
-
+
C4 = lambda*(Eye.dya.Eye) + 2.*mu*(Eye.cdya.Eye)
```
From d77eebae62aab17d2a7531fe0480edb6c0253970 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:28:21 +0200
Subject: [PATCH 083/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index f8f056af..d6fa2e45 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -131,7 +131,7 @@ We'll derive both stress and elasticity tensor in the material (reference) confi
$$
\begin{equation}
- \Psi(\boldsymbol{E}) = \frac{1}{2} \lambda(\text{tr}\boldsymbol{E})^2+\mu \boldsymbol{E} : \boldsymbol{E}
+ \psi(\boldsymbol{E}) = \frac{1}{2} \lambda(\text{tr}\boldsymbol{E})^2+\mu \boldsymbol{E} : \boldsymbol{E}
\label{eq:psi-svk}
\end{equation}
$$
@@ -141,7 +141,7 @@ In the next step, we get the 2nd Piola-Kirchhoff stress tensor as a partial deri
$$
\begin{equation}
- \boldsymbol{S} = \frac{\partial \Psi(\boldsymbol{E})}{\partial \boldsymbol{E}} = \lambda(\text{tr}\boldsymbol{E}) \boldsymbol{1} + 2 \mu \boldsymbol{E}
+ \boldsymbol{S} = \frac{\partial \psi(\boldsymbol{E})}{\partial \boldsymbol{E}} = \lambda(\text{tr}\boldsymbol{E}) \boldsymbol{1} + 2 \mu \boldsymbol{E}
\label{eq:pk2-svk}
\end{equation}
$$
@@ -159,7 +159,7 @@ With the second derivative of the strain energy potential we get the correspondi
$$
\begin{equation}
- \mathbb{C} = \frac{\partial^2 \Psi(\boldsymbol{E})}{\partial \boldsymbol{E} \partial \boldsymbol{E}} = \lambda \boldsymbol{1} \otimes \boldsymbol{1} + 2 \mu \mathbb{I}
+ \mathbb{C} = \frac{\partial^2 \psi(\boldsymbol{E})}{\partial \boldsymbol{E} \partial \boldsymbol{E}} = \lambda \boldsymbol{1} \otimes \boldsymbol{1} + 2 \mu \mathbb{I}
\label{eq:c4-svk}
\end{equation}
$$
From dec9db9fefbb7655902414c30e05c3180f3be58c Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:28:48 +0200
Subject: [PATCH 084/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index d6fa2e45..dbefc2a0 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -5,7 +5,7 @@ nav_order: 4
parent: Examples
---
-## Example: Saint Venant-Kirchhoff Material
+## Saint Venant-Kirchhoff
The following example discusses the implementation of a Saint Venant-Kirchhoff material in a very simple and readable user subroutine. The Saint Venant-Kirchhoff material is possibly the simplest example for a hyperelastic material but suffers from practical relevance beyond the small strain range [1]. Anyway, it's a good starting point because stress tensor and elasticity matrix are of the same form as the linear elasticity formulation, except that Green-Lagrange strains are used.
From 93447969a86921541e3214a42b7d2cad642807b6 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:32:14 +0200
Subject: [PATCH 085/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index dbefc2a0..1ba4514c 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -29,7 +29,7 @@ $$
## Subroutine Header for user materials
Before we are able to add our own user code, we have to start with an empty fortran subroutine header. Headers are provided e.g. for Marc, Abaqus, ANSYS in their corresponding manuals.
-
+Marc
### HYPELA2 for Marc
From a5eed49a5504a95e930b60f6a90ae2462f334ac3 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:33:02 +0200
Subject: [PATCH 086/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index 1ba4514c..aa9e83d1 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -64,7 +64,7 @@ Before we are able to add our own user code, we have to start with an empty fort
-
+Abaqus
### UMAT for Abaqus
From af6c985c58f1a6d110ae38a0eac5bf688356ba93 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:34:28 +0200
Subject: [PATCH 087/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index aa9e83d1..c5e4fcbd 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -27,7 +27,7 @@ $$
$$
## Subroutine Header for user materials
-Before we are able to add our own user code, we have to start with an empty fortran subroutine header. Headers are provided e.g. for Marc, Abaqus, ANSYS in their corresponding manuals.
+Before we are able to add our own user code, we have to start with an empty fortran subroutine header. Headers are provided e.g. for Marc, Abaqus, Dyna, ANSYS in their corresponding manuals.
Marc
From 4500f9ba1f26599b63d47febf5dcf8e9633a85d2 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:34:53 +0200
Subject: [PATCH 088/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index c5e4fcbd..daee25a4 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -10,7 +10,7 @@ parent: Examples
The following example discusses the implementation of a Saint Venant-Kirchhoff material in a very simple and readable user subroutine. The Saint Venant-Kirchhoff material is possibly the simplest example for a hyperelastic material but suffers from practical relevance beyond the small strain range [1]. Anyway, it's a good starting point because stress tensor and elasticity matrix are of the same form as the linear elasticity formulation, except that Green-Lagrange strains are used.
## Kinematics
-Starting from the Deformation Gradient, we calculate the Green-Lagrange strain tensor in Eq. $$\eqref{eq:gl-strain}$$ with the right Cauchy Green Deformation Tensor, see Eq. $$\eqref{eq:cauchy-green}$$.
+Starting from the Deformation Gradient, we calculate the Green-Lagrange strain tensor in Eq. $$\eqref{eq:gl-strain}$$ with the right Cauchy-Green deformation tensor, see Eq. $$\eqref{eq:cauchy-green}$$.
$$
\begin{equation}
From 8f8354ddf7533fb3eddff8b9dd47dfa785ed0fc8 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:36:17 +0200
Subject: [PATCH 089/130] Update index.md
---
docs/examples/index.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/docs/examples/index.md b/docs/examples/index.md
index 50d9aa6a..4c750f94 100644
--- a/docs/examples/index.md
+++ b/docs/examples/index.md
@@ -5,6 +5,8 @@ nav_order: 4
has_children: true
---
+# Examples
+
This section contains examples for user subroutines for Marc and Abaqus, including
* a [basic understandig of the tensor toolbox](script_umat.f),
From 09df53f1e83cfd883af49e8f792481328f99f799 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:37:32 +0200
Subject: [PATCH 090/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index 6599da07..c0f0ff30 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -5,10 +5,10 @@ nav_order: 4
parent: Examples
---
-## Neo-Hooke
+# Neo-Hooke
This is a very basic example on how to implement a nearly-incompressible version of the Neo-Hookean material model in a commercial FEM package (HYPELA2 for Marc or UMAT for Abaqus). As no special two- or three-field variational principle is used in this example, it is not suitable for nearly-incompressible material behaviour. Otherwise the elements tend to show excessive volumetric locking during deformation and hence, wrong results are calculated.
-### Hyperelasticity
+## Hyperelasticity
The strain energy density function per unit reference volume is additively splitted into an isochoric and volumetric contribution, see Eq. $$\eqref{eq:psi}$$. The first one is assumed to be proportional to the first invariant of the isochoric part of the right Cauchy-Green deformation tensor whereas the volumetric part is only a function of the volumetric ratio (the determinant of the deformation gradient), see Eq. $$\eqref{eq:psi-nh}$$.
$$
@@ -48,7 +48,10 @@ $$
\end{align}
$$
-### HYPELA2 User Subroutine for Marc
+
+Marc
+
+## HYPELA2 User Subroutine for Marc
Eq. $$\eqref{eq:pk2-nh}$$ and Eq. $$\eqref{eq:c4-nh}$$ are implemented in a Total Lagrange [user subroutine](Marc/hypela2_nh_ttb_simple.f) with the help of this Tensor module.
```fortran
@@ -118,7 +121,12 @@ Eq. $$\eqref{eq:pk2-nh}$$ and Eq. $$\eqref{eq:c4-nh}$$ are implemented in a Tota
end
```
-### UMAT User Subroutine for Abaqus
+
+
+
+Abaqus
+
+## UMAT User Subroutine for Abaqus
Abaqus uses an Updated-Lagrange approach and hence, Eq. $$\eqref{eq:pk2-nh}$$ and Eq. $$\eqref{eq:c4-nh}$$ are transformed and implemented in a [user subroutine](Abaqus/umat_nh_ttb_simple.f) with the help of this Tensor module.
```fortran
@@ -193,4 +201,6 @@ Abaqus uses an Updated-Lagrange approach and hence, Eq. $$\eqref{eq:pk2-nh}$$ an
return
end
-```
\ No newline at end of file
+```
+
+
\ No newline at end of file
From b5165b0296f85dafec660384f1d00e7137a9be60 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:37:34 +0200
Subject: [PATCH 091/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index daee25a4..cdfc0197 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -5,7 +5,7 @@ nav_order: 4
parent: Examples
---
-## Saint Venant-Kirchhoff
+# Saint Venant-Kirchhoff
The following example discusses the implementation of a Saint Venant-Kirchhoff material in a very simple and readable user subroutine. The Saint Venant-Kirchhoff material is possibly the simplest example for a hyperelastic material but suffers from practical relevance beyond the small strain range [1]. Anyway, it's a good starting point because stress tensor and elasticity matrix are of the same form as the linear elasticity formulation, except that Green-Lagrange strains are used.
From 7fbbf8280b5d34fc09154b0bf0a2fcc4b879a33c Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:39:25 +0200
Subject: [PATCH 092/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index c0f0ff30..b951e871 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -49,7 +49,7 @@ $$
$$
-Marc
+Implementation for Marc
## HYPELA2 User Subroutine for Marc
Eq. $$\eqref{eq:pk2-nh}$$ and Eq. $$\eqref{eq:c4-nh}$$ are implemented in a Total Lagrange [user subroutine](Marc/hypela2_nh_ttb_simple.f) with the help of this Tensor module.
@@ -124,7 +124,7 @@ Eq. $$\eqref{eq:pk2-nh}$$ and Eq. $$\eqref{eq:c4-nh}$$ are implemented in a Tota
-Abaqus
+Implementation for Abaqus
## UMAT User Subroutine for Abaqus
Abaqus uses an Updated-Lagrange approach and hence, Eq. $$\eqref{eq:pk2-nh}$$ and Eq. $$\eqref{eq:c4-nh}$$ are transformed and implemented in a [user subroutine](Abaqus/umat_nh_ttb_simple.f) with the help of this Tensor module.
From bfe77b59fb9b3a8ace15b6b1345618aecaefa19b Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:40:07 +0200
Subject: [PATCH 093/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index cdfc0197..b2b366c7 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -30,7 +30,7 @@ $$
Before we are able to add our own user code, we have to start with an empty fortran subroutine header. Headers are provided e.g. for Marc, Abaqus, Dyna, ANSYS in their corresponding manuals.
-Marc
+Header for Marc
### HYPELA2 for Marc
@@ -65,7 +65,7 @@ Before we are able to add our own user code, we have to start with an empty fort
-Abaqus
+Header for Abaqus
### UMAT for Abaqus
From 19d19dc7d5c595909c1de71a0abe3559d7be3e60 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:45:27 +0200
Subject: [PATCH 094/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index b2b366c7..2b821d2e 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -159,7 +159,7 @@ With the second derivative of the strain energy potential we get the correspondi
$$
\begin{equation}
- \mathbb{C} = \frac{\partial^2 \psi(\boldsymbol{E})}{\partial \boldsymbol{E} \partial \boldsymbol{E}} = \lambda \boldsymbol{1} \otimes \boldsymbol{1} + 2 \mu \mathbb{I}
+ \mathbb{C} = \frac{\partial^2 \psi(\boldsymbol{E})}{\partial \boldsymbol{E} \partial \boldsymbol{E}} = \lambda \boldsymbol{1} \otimes \boldsymbol{1} + 2 \mu \boldsymbol{1} \odot \boldsymbol{1}
\label{eq:c4-svk}
\end{equation}
$$
From a938350fdb30ac970ce039fe7340a83161c23cd7 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:50:20 +0200
Subject: [PATCH 095/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 38 +++++++++++++++++++---
1 file changed, 34 insertions(+), 4 deletions(-)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index 2b821d2e..e323601b 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -174,16 +174,41 @@ Again, in our fortran subroutine the code for this elasticity tensor is as follo
The crossed dyadic product is implemented as the symmetric variant in this module, so writing `Eye.cdya.Eye` is enough for the symmetric version of the rank 4 Identity Tensor.
-## Marc-specific options
+## Export as Array
-Finally we have to export our Tensor data types back to conventional fortran arrays. The integer `ngens = ndi + nshear` is based on the analysis dimension.
+Finally we have to export our Tensor data back to conventional fortran arrays.
+
+
+Export for Marc
```fortran
! output as array
s(1:ngens) = asarray( asvoigt(S1), ngens )
- d(1:ngens,1:ngens) = asarray( asvoigt(C4), ngens,ngens )
+ d(1:ngens,1:ngens) = asarray( asvoigt(C4), ngens, ngens )
+```
+
+
+
+
+Export for Abaqus
+
+```fortran
+ ! push forward to cauchy stress
+ J = det(F1)
+ S1 = piola(F1,S1)/J
+
+ ! push forward to jaumann tangent of cauchy stress for abaqus
+ C4 = piola(F1,C4)/J + (S1.cdya.Eye)+(Eye.cdya.S1)
+
+ ! output as abaqus array
+ STRESS(1:ntens) = asabqarray( voigt(S1), ntens )
+ DDSDDE(1:ntens,1:ntens) = asabqarray( voigt(C4), ntens, ntens )
```
+
+
+## Updated Lagrange in Marc
+
If we would like to use the Updated Lagrange framework too, we'll have to check whether updated or total lagrange framework is active. Please note that for the updated lagrange framework it is common to use the jaumann rate of kirchhoff stress in commercial FE codes. First, the tangent matrix is pushed forward to spatial components `(i,j,k,l)`, divided by the volumetric ratio `J` and then transformed from the truesdell rate of kirchhoff stress to the jaumann rate of kirchhoff stress. For the elasticity tensor conversion have a look at Maria Holland's Hitchhiker's Guide to Abaqus [2].
```fortran
@@ -201,7 +226,12 @@ If we would like to use the Updated Lagrange framework too, we'll have to check
endif
```
-In this code `iupdat` is an integer with `0` for total lagrange and `1` for updated lagrange. You may download the example as a [HYPELA2 user subroutine](Marc/hypela2_stvenantkirchhoff.f) for Marc.
+In this code `iupdat` is an integer with
+
+* `0` for total lagrange and
+* `1` for updated lagrange.
+
+You may download the example as a [HYPELA2 user subroutine](Marc/hypela2_stvenantkirchhoff.f) for Marc.
## References
[1] Bonet, J., Gil, A. J., & Wood, R. D. (2016). Nonlinear Solid Mechanics for Finite Element Analysis: Statics. Cambridge University Press. [](https://doi.org/10.1017/cbo9781316336144)
From 1dd67caeb78c542e47b800ddf7abb692c273e5e6 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:52:53 +0200
Subject: [PATCH 096/130] Update power.md
---
docs/api/functions/power.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/docs/api/functions/power.md b/docs/api/functions/power.md
index ad4f8657..a7925732 100644
--- a/docs/api/functions/power.md
+++ b/docs/api/functions/power.md
@@ -35,6 +35,7 @@ invC3 = C**(-3)
Eye = C**0
```
-**Warning**: Don't use `C**(1/2)` because in Fortran an integer division, e.g. `1/2`, gives an integer `0` and this function will return the identity tensor instead of the square root.
+{: .warning }
+> Don't use `C**(1/2)` because in Fortran an integer division, e.g. `1/2`, gives an integer `0` and this function will return the identity tensor instead of the square root.
For the evaluation of the tensorial square root, use [sqrt](squareroot.md) instead.
\ No newline at end of file
From a9a7ed7849c94a13e682089109088ef0dfa04a35 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:53:57 +0200
Subject: [PATCH 097/130] Update _config.yml
---
docs/_config.yml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/docs/_config.yml b/docs/_config.yml
index 023cb0a4..c668a0d3 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -7,5 +7,10 @@ logo: "assets/images/logo.svg"
math: mathjax
+callouts:
+ warning:
+ title: Warning
+ color: red
+
aux_links:
Tensor Toolbox on GitHub: https://github.com/adtzlr/ttb
\ No newline at end of file
From e8636b72d5c9802e132fc71b40475996096d8b5b Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:56:28 +0200
Subject: [PATCH 098/130] Update _config.yml
---
docs/_config.yml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/docs/_config.yml b/docs/_config.yml
index c668a0d3..ce6e5589 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -11,6 +11,12 @@ callouts:
warning:
title: Warning
color: red
+ important:
+ title: Important
+ color: blue
+ note:
+ title: Note
+ color: purple
aux_links:
Tensor Toolbox on GitHub: https://github.com/adtzlr/ttb
\ No newline at end of file
From f25e94ac5b38431d60be6605c37cf235e1e8d9e3 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:58:25 +0200
Subject: [PATCH 099/130] Update asabqarray.md
---
docs/api/functions/asabqarray.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/api/functions/asabqarray.md b/docs/api/functions/asabqarray.md
index 31dcf988..16ac431c 100644
--- a/docs/api/functions/asabqarray.md
+++ b/docs/api/functions/asabqarray.md
@@ -8,4 +8,4 @@ grandparent: API Reference
## As Abaqus Array
-**Description:** Same function as `asarray` but with `11,22,33,12,13,23` output ordering for Abaqus users. For details see `asarray` documentation.
\ No newline at end of file
+Same function as [`asarray`]({% link api/functions/asarray.md %}) but with `11,22,33,12,13,23` output ordering for Abaqus. For details see [`asarray`]({% link api/functions/asarray.md %}).
\ No newline at end of file
From 629859d81f92a61feb8f5fbcfb3d0ba70c84bc01 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 15:58:27 +0200
Subject: [PATCH 100/130] Update power.md
---
docs/api/functions/power.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/docs/api/functions/power.md b/docs/api/functions/power.md
index a7925732..381955da 100644
--- a/docs/api/functions/power.md
+++ b/docs/api/functions/power.md
@@ -8,7 +8,7 @@ grand_parent: API Reference
## Power
-**Description:** Multiply a Tensor i-times by itself. Note that for a given Tensor C:
+Multiply a Tensor i-times by itself. Note that for a given Tensor C:
- `i < 0` calculate the i-th power of inv(C)
- `i == 0` calculate the identity tensor
- `i > 0` calculate the i-th power of C
@@ -38,4 +38,5 @@ Eye = C**0
{: .warning }
> Don't use `C**(1/2)` because in Fortran an integer division, e.g. `1/2`, gives an integer `0` and this function will return the identity tensor instead of the square root.
-For the evaluation of the tensorial square root, use [sqrt](squareroot.md) instead.
\ No newline at end of file
+{: .important }
+> For the evaluation of the tensorial square root, use [sqrt](squareroot.md) instead.
\ No newline at end of file
From 79f01a9abf64a2447dc0059c56fd7d6b7430c131 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 16:03:53 +0200
Subject: [PATCH 101/130] Enhance function api docs
---
docs/api/functions/asabqarray.md | 2 +-
docs/api/functions/asarray.md | 2 +-
docs/api/functions/astensor.md | 2 +-
docs/api/functions/asvoigt.md | 2 +-
docs/api/functions/determinant.md | 2 +-
docs/api/functions/deviator.md | 8 +++++--
docs/api/functions/identity.md | 2 +-
docs/api/functions/inverse.md | 2 +-
docs/api/functions/norm.md | 2 +-
docs/api/functions/permute.md | 2 +-
docs/api/functions/piola.md | 2 +-
docs/api/functions/rotation.md | 35 +++++++++++++++++++++----------
docs/api/functions/squareroot.md | 13 +++++++-----
docs/api/functions/trace.md | 2 +-
docs/api/functions/transpose.md | 2 +-
docs/api/functions/unimodular.md | 2 +-
docs/api/functions/voigtstrain.md | 2 +-
docs/api/operators.md | 3 ++-
18 files changed, 54 insertions(+), 33 deletions(-)
diff --git a/docs/api/functions/asabqarray.md b/docs/api/functions/asabqarray.md
index 16ac431c..b837be92 100644
--- a/docs/api/functions/asabqarray.md
+++ b/docs/api/functions/asabqarray.md
@@ -3,7 +3,7 @@ title: As Abaqus Array
layout: page
nav_order: 3
parent: Functions
-grandparent: API Reference
+grand_parent: API Reference
---
## As Abaqus Array
diff --git a/docs/api/functions/asarray.md b/docs/api/functions/asarray.md
index 45a5ca55..eab33348 100644
--- a/docs/api/functions/asarray.md
+++ b/docs/api/functions/asarray.md
@@ -8,7 +8,7 @@ grand_parent: API Reference
## As Array
-**Description:** Convert Tensor to Array. This is useful to export results back to the code which is not using the tensor toolbox. This function is very useful because Fortran does not allow access to Tensor components of a function result `s = (dev(S*C)*inv(C))%ab`. Instead this function can be used. If you use Abaqus please use `asabqarray` to export Tensor components.
+Convert Tensor to Array. This is useful to export results back to the code which is not using the tensor toolbox. This function is very useful because Fortran does not allow access to Tensor components of a function result `s = (dev(S*C)*inv(C))%ab`. Instead this function can be used. If you use Abaqus please use `asabqarray` to export Tensor components.
`asarray` is called with one (rank 2) or two (rank 4) integers to slice dimensions. This is useful if an axisymmetric analysis is evaluated (3 direct and 1 shear components = 4x4 tangent matrix instead of full 6x6 storage).
diff --git a/docs/api/functions/astensor.md b/docs/api/functions/astensor.md
index 40660ab9..7e4ba683 100644
--- a/docs/api/functions/astensor.md
+++ b/docs/api/functions/astensor.md
@@ -8,7 +8,7 @@ grand_parent: API Reference
## As Tensor
-**Description:** Converts a `Tensor2s` or `Tensor4s` data type to a full tensor storage `Tensor2` or `Tensor4`.
+Converts a `Tensor2s` or `Tensor4s` data type to a full tensor storage `Tensor2` or `Tensor4`.
Possible calls:
- `astensor(T)`
diff --git a/docs/api/functions/asvoigt.md b/docs/api/functions/asvoigt.md
index 31514f95..2977f7c9 100644
--- a/docs/api/functions/asvoigt.md
+++ b/docs/api/functions/asvoigt.md
@@ -8,7 +8,7 @@ grand_parent: API Reference
## As Voigt
-**Description:** Converts a `Tensor2` or `Tensor4` data type to a reduced Voigt-storage `Tensor2s` or `Tensor4s`.
+Converts a `Tensor2` or `Tensor4` data type to a reduced Voigt-storage `Tensor2s` or `Tensor4s`.
Possible calls:
- asvoigt(T)
diff --git a/docs/api/functions/determinant.md b/docs/api/functions/determinant.md
index b31e0dae..73170994 100644
--- a/docs/api/functions/determinant.md
+++ b/docs/api/functions/determinant.md
@@ -8,7 +8,7 @@ grand_parent: API Reference
## Determinant
-**Description:** Determinant of a rank 2 Tensor.
+Determinant of a rank 2 Tensor.
| Property | Value |
| --- | --- |
diff --git a/docs/api/functions/deviator.md b/docs/api/functions/deviator.md
index 8cfa1605..e93c500c 100644
--- a/docs/api/functions/deviator.md
+++ b/docs/api/functions/deviator.md
@@ -8,9 +8,13 @@ grand_parent: API Reference
## Deviator
-**Description:** Deviator of a rank 2 Tensor.
+Deviator of a rank 2 Tensor.
-
+$$
+\begin{equation}
+ \text{dev}(\mathbf{C}) = \mathbf{C} - \frac{\text{tr}(\mathbf{C})}{3} \mathbf{1}
+\end{equation}
+$$
| Property | Value |
| --- | --- |
diff --git a/docs/api/functions/identity.md b/docs/api/functions/identity.md
index af5cab7d..52dcd206 100644
--- a/docs/api/functions/identity.md
+++ b/docs/api/functions/identity.md
@@ -8,7 +8,7 @@ grand_parent: API Reference
## Identity
-**Description:** Calculate the identity tensor. Two functions for generating identities are implemented:
+Calculate the identity tensor. Two functions for generating identities are implemented:
- `Eye = identity2(C)` calculate Eye with the same tensor data type as C. The components of C are ignored.
- `I4 = identity4(Eye)` calculate the symmetric fourth order identity tensor with the property `C = I4 : C`
diff --git a/docs/api/functions/inverse.md b/docs/api/functions/inverse.md
index 6ff857a6..471c5060 100644
--- a/docs/api/functions/inverse.md
+++ b/docs/api/functions/inverse.md
@@ -8,7 +8,7 @@ grand_parent: API Reference
## Inverse
-**Description:** Inverse of a positive definite rank 2 Tensor (Determinant > 0). Optional Argument: Determinant
+Inverse of a positive definite rank 2 Tensor (Determinant > 0). Optional Argument: Determinant
| Property | Value |
| --- | --- |
diff --git a/docs/api/functions/norm.md b/docs/api/functions/norm.md
index a75cac34..b291023f 100644
--- a/docs/api/functions/norm.md
+++ b/docs/api/functions/norm.md
@@ -8,7 +8,7 @@ grand_parent: API Reference
## Norm
-**Description:** Euclidean norm of a rank 1 Tensor (Vector). Square root of the sum of the squared components `sqrt( sum( T%a**2 ))`.
+Euclidean norm of a rank 1 Tensor (Vector). Square root of the sum of the squared components `sqrt( sum( T%a**2 ))`.
| Property | Value |
| --- | --- |
diff --git a/docs/api/functions/permute.md b/docs/api/functions/permute.md
index 0cf2a32f..aa449297 100644
--- a/docs/api/functions/permute.md
+++ b/docs/api/functions/permute.md
@@ -8,7 +8,7 @@ grand_parent: API Reference
## Permute
-**Description:** Index permutation of a rank 2 or a rank 4 Tensor. For rank 2 Tensors this is equal to the transpose function.
+Index permutation of a rank 2 or a rank 4 Tensor. For rank 2 Tensors this is equal to the transpose function.
| Property | Value |
| --- | --- |
diff --git a/docs/api/functions/piola.md b/docs/api/functions/piola.md
index 30f76c2f..c0c69395 100644
--- a/docs/api/functions/piola.md
+++ b/docs/api/functions/piola.md
@@ -8,7 +8,7 @@ grand_parent: API Reference
## Piola Transformation
-**Description:** Perform a Piola transformation. It is assumed that the tensor's components are all either co- or contravariant as this toolbox has no information about co- and contravariant tensor components. All indices are transformed with the same mixed-variant argument tensor. This means it is not possible to perform a push forward of a mixed variant fourth order tensor. To perform a push forward of the contra-variant indices of the tangent matrix from material components in the reference configuration to spatial components in the current configuration write `piola(F,C4)`. When using symmetric variants of tensor data types (Voigt-notation) a faster contraction with less calculations due to symmetric properties is performed.
+Perform a Piola transformation. It is assumed that the tensor's components are all either co- or contravariant as this toolbox has no information about co- and contravariant tensor components. All indices are transformed with the same mixed-variant argument tensor. This means it is not possible to perform a push forward of a mixed variant fourth order tensor. To perform a push forward of the contra-variant indices of the tangent matrix from material components in the reference configuration to spatial components in the current configuration write `piola(F,C4)`. When using symmetric variants of tensor data types (Voigt-notation) a faster contraction with less calculations due to symmetric properties is performed.
- `piola(F,S)` where `S` is a stress tensor is equal to `F*S*transpose(F)`
- `piola(F,C4)` where `C4` is a fourth order elasticity tensor means `c4(i,j,k,l) = F(i,I) F(j,J) F(k,K) F(l,L) C4(I,J,K,L)`
diff --git a/docs/api/functions/rotation.md b/docs/api/functions/rotation.md
index abff22ae..5de6ffe7 100644
--- a/docs/api/functions/rotation.md
+++ b/docs/api/functions/rotation.md
@@ -8,23 +8,36 @@ grand_parent: API Reference
## Rotation Matrix
-**Description:** Rotation Matrix with inputs angle in rad and rotation axis.
-
-There are 3 possible cases:
-- `rotation_matrix(phi,3)`
-
-
-- `rotation_matrix(phi,2)`
-
-
-- `rotation_matrix(phi,1)`
-
+Rotation Matrix with inputs angle in rad and rotation axis.
| Property | Value |
| --- | --- |
| Result | Tensor-valued function |
| Data Types | `Tensor2` |
+There are 3 possible cases:
+
+### `rotation_matrix(phi,3)`
+$$
+\begin{equation}
+ \mathbf{R} = \begin{bmatrix} \cos \varphi & \sin \varphi & 0 \\ -\sin \varphi & \cos \varphi & 0 \\ 0 & 0 & 1 \end{bmatrix}
+\end{equation}
+$$
+
+### `rotation_matrix(phi,2)`
+$$
+\begin{equation}
+ \mathbf{R} = \begin{bmatrix} \cos \varphi & 0 & \sin \varphi\\ 0 & 1 & 0 \\ -\sin \varphi & 0 & \cos \varphi\\ \end{bmatrix}
+\end{equation}
+$$
+
+### `rotation_matrix(phi,1)`
+$$
+\begin{equation}
+ \mathbf{R} = \begin{bmatrix} 1 & 0 & 0 \\ 0 &\cos \varphi & \sin \varphi\\ 0 & -\sin \varphi & \cos \varphi\\ \end{bmatrix}
+\end{equation}
+$$
+
### Example
```fortran
diff --git a/docs/api/functions/squareroot.md b/docs/api/functions/squareroot.md
index 16ec494f..9e865565 100644
--- a/docs/api/functions/squareroot.md
+++ b/docs/api/functions/squareroot.md
@@ -8,11 +8,14 @@ grand_parent: API Reference
## Square Root
-**Description:** Tensorial square root of a positive definite rank 2 Tensor. For algorithmic details see [Franka, L.P. (1988)](https://inis.iaea.org/search/search.aspx?orig_q=RN:20064555). This function can be used to obtain the stretch tensor.
-
-
-
-
+Tensorial square root of a positive definite rank 2 Tensor. For algorithmic details see [Franka, L.P. (1988)](https://inis.iaea.org/search/search.aspx?orig_q=RN:20064555). This function can be used to obtain the stretch tensor.
+
+$$
+\begin{align}
+ \mathbf{C} &= \mathbf{U}^2 \\
+ \mathbf{U} &= \sqrt{\mathbf{C}}
+\end{align}
+$$
| Property | Value |
| --- | --- |
diff --git a/docs/api/functions/trace.md b/docs/api/functions/trace.md
index 4f5bf18d..89ecd006 100644
--- a/docs/api/functions/trace.md
+++ b/docs/api/functions/trace.md
@@ -8,7 +8,7 @@ grand_parent: API Reference
## Trace
-**Description:** Sum of diagonal terms of a rank 2 Tensor.
+Sum of diagonal terms of a rank 2 Tensor.
| Property | Value |
| --- | --- |
diff --git a/docs/api/functions/transpose.md b/docs/api/functions/transpose.md
index a660061c..1d904dfc 100644
--- a/docs/api/functions/transpose.md
+++ b/docs/api/functions/transpose.md
@@ -8,7 +8,7 @@ grand_parent: API Reference
## Transpose
-**Description:** Transpose of a rank 2 Tensor or major transpose of a rank 4 Tensor.
+Transpose of a rank 2 Tensor or major transpose of a rank 4 Tensor.
| Property | Value |
| --- | --- |
diff --git a/docs/api/functions/unimodular.md b/docs/api/functions/unimodular.md
index ebb8a0d9..5c33a696 100644
--- a/docs/api/functions/unimodular.md
+++ b/docs/api/functions/unimodular.md
@@ -8,7 +8,7 @@ grand_parent: API Reference
## Unimodular Part of Tensor
-**Description:** Unimodular Part of a rank 2 Tensor.
+Unimodular Part of a rank 2 Tensor.
diff --git a/docs/api/functions/voigtstrain.md b/docs/api/functions/voigtstrain.md
index c49fb7c3..214bcfe5 100644
--- a/docs/api/functions/voigtstrain.md
+++ b/docs/api/functions/voigtstrain.md
@@ -8,7 +8,7 @@ grand_parent: API Reference
## Voigtstrain
-**Description:** Import a strain array in voigt storage. As this Module does not use doubled shear items for the symmetric voigt-like storage a strain-like array has to be imported rather than assigned to a Tensor.
+Import a strain array in voigt storage. As this Module does not use doubled shear items for the symmetric voigt-like storage a strain-like array has to be imported rather than assigned to a Tensor.
- `ndi` number of direct compononets
- `nshear` number of shear components
- `ngens` dimension of strain array
diff --git a/docs/api/operators.md b/docs/api/operators.md
index 6e24960c..3c3ea61e 100644
--- a/docs/api/operators.md
+++ b/docs/api/operators.md
@@ -18,4 +18,5 @@ This module uses derived data types where the default operators are overloaded w
- Dyadic Product `A.dya.B`
- Symmetric Crossed-dyadic Product `A.cdya.B` to perform `C(i,j,k,l) = (A(i,k)*B(j,l) + A(i,l)*B(j,k) + B(i,k)*A(j,l) + B(i,l)*A(j,k)) / 4.`
-**Warning**: Be sure to use brackets around functions which should be evaluated first because the double contraction has the highest priority as it is replaced by the conventional power function. This leads to wrong results in combination with crossed-dyadic products as they must be evaluated first. Always use brackets like `A**(B.cdya.B)`. Unfortunately this is a limitation of Fortran.
+{: .warning }
+> Be sure to use brackets around functions which should be evaluated first because the double contraction has the highest priority as it is replaced by the conventional power function. This leads to wrong results in combination with crossed-dyadic products as they must be evaluated first. Always use brackets like `A**(B.cdya.B)`. Unfortunately this is a limitation of Fortran.
From 31e2c4aac450fd41ad979b6b09339353e6b4f184 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 16:05:53 +0200
Subject: [PATCH 102/130] Update power.md
---
docs/api/functions/power.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/api/functions/power.md b/docs/api/functions/power.md
index 381955da..31e253e9 100644
--- a/docs/api/functions/power.md
+++ b/docs/api/functions/power.md
@@ -39,4 +39,4 @@ Eye = C**0
> Don't use `C**(1/2)` because in Fortran an integer division, e.g. `1/2`, gives an integer `0` and this function will return the identity tensor instead of the square root.
{: .important }
-> For the evaluation of the tensorial square root, use [sqrt](squareroot.md) instead.
\ No newline at end of file
+> For the evaluation of the tensorial square root, use [sqrt]({% link api/functions/squareroot.md %}) instead.
\ No newline at end of file
From 09c6c6b02c2630360f5ff5994906f11094b6ce93 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 16:10:16 +0200
Subject: [PATCH 103/130] Update _config.yml
---
docs/_config.yml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/docs/_config.yml b/docs/_config.yml
index ce6e5589..22af7a21 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -18,5 +18,8 @@ callouts:
title: Note
color: purple
+last_edit_timestamp: true # requires `last_modified_date` in frontmatter
+last_edit_time_format: "%Y-%m-%d"
+
aux_links:
Tensor Toolbox on GitHub: https://github.com/adtzlr/ttb
\ No newline at end of file
From 7a7cfbf44ec8bd287df000d6d6abccae93928e80 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 16:10:18 +0200
Subject: [PATCH 104/130] Update index.md
---
docs/index.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/docs/index.md b/docs/index.md
index 2abdd74c..79a94bef 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -2,6 +2,7 @@
title: Home
layout: home
nav_order: 1
+last_modified_date: 2023-07-07
---
# Tensor Toolbox for Modern Fortran
@@ -46,5 +47,3 @@ All notable changes to this project will be documented in [this file](https://gi
## References
Naumann, C.: [Chemisch-mechanisch gekoppelte Modellierung und Simulation oxidativer Alterungsvorgänge in Gummibauteilen (German)](http://nbn-resolving.de/urn:nbn:de:bsz:ch1-qucosa-222075). PhD thesis. Fakultät für Maschinenbau der Technischen Universität Chemnitz, 2016.
-
-## Last updated: 2023/07/07
From f4c234912763d15ea48ac510c791ff3f615a5297 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 16:12:12 +0200
Subject: [PATCH 105/130] Update README.md
---
README.md | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/README.md b/README.md
index 3d51e73e..90809c04 100644
--- a/README.md
+++ b/README.md
@@ -53,11 +53,9 @@ The most basic example on how to use this module is to [download the module](htt
The `include 'ttb/ttb_library.f'` statement replaces the line with the content of the ttb-module. The first line in a program or subroutine is now a `use Tensor` statement. That's it - now you're ready to go.
## Tensor or Voigt Notation
-
-It depends on your preferences: either you store all tensors in full tensor `dimension(3,3)` or in [voigt](https://en.wikipedia.org/wiki/Voigt_notation) `dimension(6)` notation. The equations remain (nearly) the same. Dot Product, Double Dot Product - every function is implemented in both full tensor and voigt notation. Look for the voigt-comments in an [example](docs/examples/hypela2_nh_ttb.f) of a user subroutine for MSC.Marc.
+It depends on your preferences: either you store all tensors in full tensor `dimension(3,3)` or in [voigt](https://en.wikipedia.org/wiki/Voigt_notation) `dimension(6)` notation. The equations remain (nearly) the same. Dot Product, Double Dot Product - every function is implemented in both full tensor and voigt notation. Look for the voigt-comments in an [example](docs/examples/Marc/hypela2_nh_ttb.f) of a user subroutine for MSC.Marc.
## Access Tensor components by Array
-
Tensor components may be accessed by a conventional array with the name of the tensor variable `T` followed by a percent operator `%` and a type-specific keyword as follows:
- Tensor of rank 1 components as array: `T%a`. i-th component of T: `T%a(i)`
@@ -68,7 +66,6 @@ Tensor components may be accessed by a conventional array with the name of the t
- Symmetric Tensor of rank 4 (Voigt) components as array: `T%a6b6`. i,j component of T: `T%a6b6(i,j)` (at least minor symmetric)
### Warning: Output as array
-
It is not possible to access tensor components of a tensor valued function in a direct way `s = symstore(S1)%a6` - unfortunately this is a limitation of Fortran. To avoid the creation of an extra variable it is possible to use the `asarray(T,i_max[,j_max,k_max,l_max])` function to access tensor components. `i_max,j_max,k_max,l_max` is **not** the single component, instead a slice `T%abcd(1:i_max,1:j_max,1:k_max,1:l_max)` is returned. This can be useful when dealing with mixed formulation or variation principles where the last entry/entries of stress and strain voigt vectors are used for the pressure boundary. To export a full stress tensor `S1` to voigt notation use:
```fortran
@@ -77,7 +74,6 @@ It is not possible to access tensor components of a tensor valued function in a
```
#### Abaqus Users: Output as abqarray
-
To export a stress tensor to Abaqus Voigt notation use `asabqarray` which reorders the storage indices to `11,22,33,12,13,23`. This function is available for `Tensor2s` and `Tensor4s` data types.
```fortran
@@ -86,14 +82,12 @@ To export a stress tensor to Abaqus Voigt notation use `asabqarray` which reorde
```
## A note on the Permutation of Indices
-
The permutation function reorders indices in the given order for a fourth order tensor of data type `Tensor4`. Example: `(i,j,k,l) --> (i,k,j,l)` with `permute(C4,1,3,2,4)`.
## Neo-Hookean Material
With the help of the Tensor module the Second Piola-Kirchhoff stress tensor `S` of a nearly-incompressible Neo-Hookean material model is basically a one-liner:
### Second Piola Kirchhoff Stress Tensor
-
```fortran
S = mu*det(C)**(-1./3.)*dev(C)*inv(C)+p*det(C)**(1./2.)*inv(C)
```
@@ -101,7 +95,6 @@ With the help of the Tensor module the Second Piola-Kirchhoff stress tensor `S`
While this is of course not the fastest way of calculating the stress tensor it is extremely short and readable. Also the second order tensor variables `S, C` and scalar quantities `mu, p` have to be created at the beginning of the program. A minimal working example for a very simple umat user subroutine can be found in [script_umat.f](docs/examples/script_umat.f). The program is just an example where a subroutine `umat` is called and an output information is printed. It is shown that the tensor toolbox is only used inside the material user subroutine `umat`.
### Material Elasticity Tensor
-
The isochoric part of the material elasticity tensor `C4_iso` of a nearly-incompressible Neo-Hookean material model is defined and coded as:
```fortran
@@ -112,10 +105,9 @@ The isochoric part of the material elasticity tensor `C4_iso` of a nearly-incomp
```
### Example of Marc HYPELA2
+[Here](docs/examples/Marc/hypela2_nh_ttb.f) you can find an example of a nearly-incompressible version of a Neo-Hookean material for Marc. Updated Lagrange is implemented by a push forward operator of both the stress and the fourth-order elasticity tensor. Herrmann Elements are automatically detected. As HYPELA2 is called twice per iteration the stiffness calculation is only active during stage `lovl == 4`. One of the best things is the super-simple switch from tensor to voigt notation: Change data types of all symmetric tensors and save the right Cauchy-Green deformation tensor in voigt notation. See commented lines for details.
-[Here](docs/examples/hypela2_nh_ttb.f) you can find an example of a nearly-incompressible version of a Neo-Hookean material for Marc. Updated Lagrange is implemented by a push forward operator of both the stress and the fourth-order elasticity tensor. Herrmann Elements are automatically detected. As HYPELA2 is called twice per iteration the stiffness calculation is only active during stage `lovl == 4`. One of the best things is the super-simple switch from tensor to voigt notation: Change data types of all symmetric tensors and save the right Cauchy-Green deformation tensor in voigt notation. See commented lines for details.
-
-[Download HYPELA2](docs/examples/hypela2_nh_ttb.f): Neo-Hooke, Marc, Total Lagrange, Tensor Toolbox
+[Download HYPELA2](docs/examples/Marc/hypela2_nh_ttb.f): *Neo-Hooke, Marc, Total Lagrange, Tensor Toolbox*
## Credits
Naumann, C.: [Chemisch-mechanisch gekoppelte Modellierung und Simulation oxidativer Alterungsvorgänge in Gummibauteilen (German)](http://nbn-resolving.de/urn:nbn:de:bsz:ch1-qucosa-222075). PhD thesis. Fakultät für Maschinenbau der Technischen Universität Chemnitz, 2016.
From ef1860e6635503382e2b516cb48487a55353a715 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 16:12:57 +0200
Subject: [PATCH 106/130] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 90809c04..38ad6b5e 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@ The full documentation is available at [https://adtzlr.github.io/ttb](https://ad

-This tensor toolbox provides the following [basic operations for tensor calculus](docs/functions.md) (all written in double precision `real(kind=8)`):
+This tensor toolbox provides the following [basic operations for tensor calculus](docs/api/index.md) (all written in double precision `real(kind=8)`):
- Dot Product `C(i,j) = A(i,k) B(k,j)` written as `C = A*B`
- Double Dot Product `C = A(i,j) B(i,j)` written as `C = A**B`
- Dyadic Product `C(i,j,k,l) = A(i,j) B(k,l)` written as `C = A.dya.B`
From 47938372ab891a6e64830a5bbdf42f9a647a310d Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 16:13:28 +0200
Subject: [PATCH 107/130] Update index.md
---
docs/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/index.md b/docs/index.md
index 79a94bef..d4e7fb24 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -37,7 +37,7 @@ Andreas Dutzler. *Tensor Toolbox for Modern Fortran - High-Level Tensor Manipula
- [API Reference]({% link api/index.md %})
- Example 1: [St.Venant-Kirchhoff Material]({% link examples/example_stvenantkirchhoff.md %})
- Example 2: [Nearly-Incompressible Neo-Hookean Material]({% link examples/example_neohooke.md %})
-- Example 3: [Neo-Hookean Hyperelasticity with Maxwell-Viscoelasticity](examples/hypela2_nonlinear_viscoelasticity.f)
+- Example 3: [Neo-Hookean Hyperelasticity with Maxwell-Viscoelasticity](examples/Marc/hypela2_nonlinear_viscoelasticity.f)
## Author
Andreas Dutzler, Graz University of Technology, Austria.
From 86d71271e484c230e506964a413953438c7a81cf Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 16:15:00 +0200
Subject: [PATCH 108/130] Update index.md
---
docs/index.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/docs/index.md b/docs/index.md
index d4e7fb24..b3293759 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -17,7 +17,10 @@ Commercial FEM software packages offer interfaces (user subroutines written in F
[](https://doi.org/10.5281/zenodo.4077378)
-If you use *Tensor Toolbox for Modern Fortran (ttb)* in your work, please cite this toolbox in your publications. Thanks! **Hint**: The DOI-badge always resolves to the latest version of this toolbox - if you prefer a version-specific DOI, hit the DOI-badge and pick a version on Zenodo.
+If you use *Tensor Toolbox for Modern Fortran (ttb)* in your work, please cite this toolbox in your publications. Thanks!
+
+{: .note }
+>The DOI-badge always resolves to the latest version of this toolbox - if you prefer a version-specific DOI, hit the DOI-badge and pick a version on Zenodo.
Andreas Dutzler. *Tensor Toolbox for Modern Fortran - High-Level Tensor Manipulation in Fortran*. DOI: 10.5281/zenodo.4077378.
From 9aa4e7a05faed04c1677908371bcd93c2a70e1bc Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 16:15:27 +0200
Subject: [PATCH 109/130] Update index.md
---
docs/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/index.md b/docs/index.md
index b3293759..4d25d80e 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -17,7 +17,7 @@ Commercial FEM software packages offer interfaces (user subroutines written in F
[](https://doi.org/10.5281/zenodo.4077378)
-If you use *Tensor Toolbox for Modern Fortran (ttb)* in your work, please cite this toolbox in your publications. Thanks!
+If you use *Tensor Toolbox for Modern Fortran (ttb)* in your work, please cite this toolbox in your publications and let us know. Thanks!
{: .note }
>The DOI-badge always resolves to the latest version of this toolbox - if you prefer a version-specific DOI, hit the DOI-badge and pick a version on Zenodo.
From 580d39d82332328100213f670c42c16acc8f1423 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 16:16:09 +0200
Subject: [PATCH 110/130] Update index.md
---
docs/index.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/index.md b/docs/index.md
index 4d25d80e..4d3685ea 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -11,7 +11,7 @@ last_modified_date: 2023-07-07
## What is this toolbox about?
-Commercial FEM software packages offer interfaces (user subroutines written in Fortran) for custom defined user materials like UMAT in [Abaqus](https://www.3ds.com/products-services/simulia/products/abaqus/) or HYPELA2 in [Marc](https://hexagon.com/products/marc). In comparison to other scientific programming languages like MATLAB or Python Fortran is not as comfortable to use when dealing with high level programming features of tensor manipulations. On the other hand it's super fast - so why not combine the handy features from MATLAB or Python's NumPy/Scipy with the speed of Fortran? That's the reason why I started working on a simple but effective module called **Tensor Toolbox for Modern Fortran**. I adopted the idea to my needs from [Naumann, C. (2016)](http://nbn-resolving.de/urn:nbn:de:bsz:ch1-qucosa-222075).
+Commercial FEM software packages offer interfaces (user subroutines written in Fortran) for custom defined user materials like UMAT in [Abaqus](https://www.3ds.com/products-services/simulia/products/abaqus/) or HYPELA2 in [Marc](https://hexagon.com/products/marc). In comparison to other scientific programming languages like MATLAB or Python Fortran is not as comfortable to use when dealing with high level programming features of tensor manipulations. On the other hand it's super fast - so why not combine the handy features from MATLAB or Python's NumPy/Scipy with the speed of Fortran? That's the reason why I started working on a simple but effective module called **Tensor Toolbox for Modern Fortran**. I adopted the idea to my needs from [1].
## How to cite
@@ -49,4 +49,4 @@ Andreas Dutzler, Graz University of Technology, Austria.
All notable changes to this project will be documented in [this file](https://github.com/adtzlr/ttb/blob/main/CHANGELOG.md). The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## References
-Naumann, C.: [Chemisch-mechanisch gekoppelte Modellierung und Simulation oxidativer Alterungsvorgänge in Gummibauteilen (German)](http://nbn-resolving.de/urn:nbn:de:bsz:ch1-qucosa-222075). PhD thesis. Fakultät für Maschinenbau der Technischen Universität Chemnitz, 2016.
+[1] Naumann, C.: [Chemisch-mechanisch gekoppelte Modellierung und Simulation oxidativer Alterungsvorgänge in Gummibauteilen (German)](http://nbn-resolving.de/urn:nbn:de:bsz:ch1-qucosa-222075). PhD thesis. Fakultät für Maschinenbau der Technischen Universität Chemnitz, 2016.
From 0021019fa7b0ef72c0e9ca0428d1ed1de7f1c0a3 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 16:16:44 +0200
Subject: [PATCH 111/130] Update index.md
---
docs/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/index.md b/docs/index.md
index 4d3685ea..711423ec 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -11,7 +11,7 @@ last_modified_date: 2023-07-07
## What is this toolbox about?
-Commercial FEM software packages offer interfaces (user subroutines written in Fortran) for custom defined user materials like UMAT in [Abaqus](https://www.3ds.com/products-services/simulia/products/abaqus/) or HYPELA2 in [Marc](https://hexagon.com/products/marc). In comparison to other scientific programming languages like MATLAB or Python Fortran is not as comfortable to use when dealing with high level programming features of tensor manipulations. On the other hand it's super fast - so why not combine the handy features from MATLAB or Python's NumPy/Scipy with the speed of Fortran? That's the reason why I started working on a simple but effective module called **Tensor Toolbox for Modern Fortran**. I adopted the idea to my needs from [1].
+Commercial FEM software packages offer interfaces (user subroutines written in Fortran) for custom defined user materials like UMAT in [Abaqus](https://www.3ds.com/products-services/simulia/products/abaqus/) or HYPELA2 in [Marc](https://hexagon.com/products/marc). In comparison to other scientific programming languages like MATLAB or Python Fortran is not as comfortable to use when dealing with high level programming features of tensor manipulations. On the other hand it's super fast - so why not combine the handy features from MATLAB or Python's NumPy/Scipy with the speed of Fortran? That's the reason why I started working on a simple but effective module called **Tensor Toolbox for Modern Fortran**. The idea is adopted from [1].
## How to cite
From a461bc6fb4a044af147f88ef0bb9d4deec4f99e9 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 27 Sep 2023 16:31:19 +0200
Subject: [PATCH 112/130] Update example_neohooke.md
---
docs/examples/example_neohooke.md | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index b951e871..a2a754af 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -6,7 +6,7 @@ parent: Examples
---
# Neo-Hooke
-This is a very basic example on how to implement a nearly-incompressible version of the Neo-Hookean material model in a commercial FEM package (HYPELA2 for Marc or UMAT for Abaqus). As no special two- or three-field variational principle is used in this example, it is not suitable for nearly-incompressible material behaviour. Otherwise the elements tend to show excessive volumetric locking during deformation and hence, wrong results are calculated.
+This is a very basic example on how to implement a nearly-incompressible version of the Neo-Hookean material model in a commercial FEM package (HYPELA2 for Marc or UMAT for Abaqus).
## Hyperelasticity
The strain energy density function per unit reference volume is additively splitted into an isochoric and volumetric contribution, see Eq. $$\eqref{eq:psi}$$. The first one is assumed to be proportional to the first invariant of the isochoric part of the right Cauchy-Green deformation tensor whereas the volumetric part is only a function of the volumetric ratio (the determinant of the deformation gradient), see Eq. $$\eqref{eq:psi-nh}$$.
@@ -54,6 +54,9 @@ $$
## HYPELA2 User Subroutine for Marc
Eq. $$\eqref{eq:pk2-nh}$$ and Eq. $$\eqref{eq:c4-nh}$$ are implemented in a Total Lagrange [user subroutine](Marc/hypela2_nh_ttb_simple.f) with the help of this Tensor module.
+{: .warning }
+> As no special two- or three-field variational principle is used in this example, it is not suitable for nearly-incompressible material behaviour. Otherwise the elements tend to show excessive volumetric locking during deformation and hence, wrong results are calculated.
+
```fortran
include 'ttb/ttb_library.f'
@@ -203,4 +206,4 @@ Abaqus uses an Updated-Lagrange approach and hence, Eq. $$\eqref{eq:pk2-nh}$$ an
end
```
-
\ No newline at end of file
+
From 7f2b1021a1374e7d57a0b5ecb4646b452e9222b5 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Thu, 28 Sep 2023 11:13:20 +0200
Subject: [PATCH 113/130] Left-aligned equations
---
docs/_includes/mathjax.html | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/docs/_includes/mathjax.html b/docs/_includes/mathjax.html
index 595d4f37..77462cba 100644
--- a/docs/_includes/mathjax.html
+++ b/docs/_includes/mathjax.html
@@ -8,4 +8,14 @@
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js">
-
\ No newline at end of file
+
+
+
\ No newline at end of file
From 4c104bc4e778da41c410921ccaeb30b50ff7ae4b Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Thu, 28 Sep 2023 11:15:19 +0200
Subject: [PATCH 114/130] Update _config.yml
---
docs/_config.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/_config.yml b/docs/_config.yml
index 22af7a21..69f52b8a 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -3,7 +3,7 @@ description: Tensor Toolbox for Modern Fortran
theme: just-the-docs
url: https://adtzlr.github.io/ttb
-logo: "assets/images/logo.svg"
+logo: "assets/images/logo.png"
math: mathjax
From 5ee165bf3719c9147dc27686084354c3de1c9b49 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Thu, 28 Sep 2023 11:16:45 +0200
Subject: [PATCH 115/130] Update mathjax.html
---
docs/_includes/mathjax.html | 6 ------
1 file changed, 6 deletions(-)
diff --git a/docs/_includes/mathjax.html b/docs/_includes/mathjax.html
index 77462cba..3d867540 100644
--- a/docs/_includes/mathjax.html
+++ b/docs/_includes/mathjax.html
@@ -12,10 +12,4 @@
window.MathJax = {
tex: { tags: 'ams' }
};
-
-
-
\ No newline at end of file
From 72e19a443a7dbc8a6deaed642e9aa1fab9f82339 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Thu, 28 Sep 2023 11:18:44 +0200
Subject: [PATCH 116/130] Add Ex. no. to examples
---
docs/examples/example_neohooke.md | 2 +-
docs/examples/example_stvenantkirchhoff.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md
index a2a754af..44a94bbf 100644
--- a/docs/examples/example_neohooke.md
+++ b/docs/examples/example_neohooke.md
@@ -1,5 +1,5 @@
---
-title: Neo-Hooke
+title: Ex. 02 - Neo-Hooke
layout: page
nav_order: 4
parent: Examples
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index e323601b..e2dcc473 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -1,5 +1,5 @@
---
-title: Saint Venant-Kirchhoff
+title: Ex. 01 - Saint Venant-Kirchhoff
layout: page
nav_order: 4
parent: Examples
From b881f85c4d59a4f6acb0d2c54e54f85b9c7cf4d6 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Thu, 28 Sep 2023 11:26:38 +0200
Subject: [PATCH 117/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 52 +++++++++++-----------
1 file changed, 25 insertions(+), 27 deletions(-)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index e2dcc473..15f589a0 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -175,18 +175,42 @@ Again, in our fortran subroutine the code for this elasticity tensor is as follo
The crossed dyadic product is implemented as the symmetric variant in this module, so writing `Eye.cdya.Eye` is enough for the symmetric version of the rank 4 Identity Tensor.
## Export as Array
-
Finally we have to export our Tensor data back to conventional fortran arrays.
Export for Marc
+## Updated Lagrange in Marc
+If we would like to use the Updated Lagrange framework in Marc, we'll have to check whether the updated or the total lagrange framework is active. Please note that for the updated lagrange framework it is common to use the jaumann rate of kirchhoff stress in commercial FE codes. First, the tangent matrix is pushed forward to spatial components `(i,j,k,l)`, divided by the volumetric ratio `J` and then transformed to the jaumann rate of kirchhoff stress. For the elasticity tensor conversion have a look at Maria Holland's Hitchhiker's Guide to Abaqus [2].
+
+```fortran
+ real(kind=8) :: J
+
+ ! ...some code...
+
+ if (iupdat.eq.1) then ! updated lagrange
+ J = det(F1)
+ ! cauchy stress
+ S1 = piola(F1,S1)/J
+ ! tangent matrix (jaumann)
+ C4 = piola(F1,C4)/J
+ * + (S1.cdya.Eye) + (Eye.cdya.S1)
+ endif
+```
+
+In this code `iupdat` is an integer with
+
+* `0` for total lagrange and
+* `1` for updated lagrange.
+
```fortran
! output as array
s(1:ngens) = asarray( asvoigt(S1), ngens )
d(1:ngens,1:ngens) = asarray( asvoigt(C4), ngens, ngens )
```
+You may download the example as a [HYPELA2 user subroutine](Marc/hypela2_stvenantkirchhoff.f) for Marc.
+
@@ -207,32 +231,6 @@ Finally we have to export our Tensor data back to conventional fortran arrays.
-## Updated Lagrange in Marc
-
-If we would like to use the Updated Lagrange framework too, we'll have to check whether updated or total lagrange framework is active. Please note that for the updated lagrange framework it is common to use the jaumann rate of kirchhoff stress in commercial FE codes. First, the tangent matrix is pushed forward to spatial components `(i,j,k,l)`, divided by the volumetric ratio `J` and then transformed from the truesdell rate of kirchhoff stress to the jaumann rate of kirchhoff stress. For the elasticity tensor conversion have a look at Maria Holland's Hitchhiker's Guide to Abaqus [2].
-
-```fortran
- real(kind=8) :: J
-
- ! ...some code...
-
- if (iupdat.eq.1) then ! updated lagrange
- J = det(F1)
- ! cauchy stress
- S1 = piola(F1,S1)/J
- ! tangent matrix (jaumann)
- C4 = piola(F1,C4)/J
- * + (S1.cdya.Eye) + (Eye.cdya.S1)
- endif
-```
-
-In this code `iupdat` is an integer with
-
-* `0` for total lagrange and
-* `1` for updated lagrange.
-
-You may download the example as a [HYPELA2 user subroutine](Marc/hypela2_stvenantkirchhoff.f) for Marc.
-
## References
[1] Bonet, J., Gil, A. J., & Wood, R. D. (2016). Nonlinear Solid Mechanics for Finite Element Analysis: Statics. Cambridge University Press. [](https://doi.org/10.1017/cbo9781316336144)
From 9319f23f1cc47ceb9dc47e92aafbbf9d48b64880 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Thu, 28 Sep 2023 11:35:00 +0200
Subject: [PATCH 118/130] Update example_stvenantkirchhoff.md
---
docs/examples/example_stvenantkirchhoff.md | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md
index 15f589a0..e68839ea 100644
--- a/docs/examples/example_stvenantkirchhoff.md
+++ b/docs/examples/example_stvenantkirchhoff.md
@@ -180,8 +180,8 @@ Finally we have to export our Tensor data back to conventional fortran arrays.
Export for Marc
-## Updated Lagrange in Marc
-If we would like to use the Updated Lagrange framework in Marc, we'll have to check whether the updated or the total lagrange framework is active. Please note that for the updated lagrange framework it is common to use the jaumann rate of kirchhoff stress in commercial FE codes. First, the tangent matrix is pushed forward to spatial components `(i,j,k,l)`, divided by the volumetric ratio `J` and then transformed to the jaumann rate of kirchhoff stress. For the elasticity tensor conversion have a look at Maria Holland's Hitchhiker's Guide to Abaqus [2].
+{: .important }
+> If we would like to use the Updated Lagrange framework in Marc, we'll have to check whether the updated or the total lagrange framework is active. Please note that for the updated lagrange framework it is common to use the jaumann rate of kirchhoff stress in commercial FE codes. First, the tangent matrix is pushed forward to spatial components `(i,j,k,l)`, divided by the volumetric ratio `J` and then transformed to the jaumann rate of kirchhoff stress. For the elasticity tensor conversion have a look at Maria Holland's Hitchhiker's Guide to Abaqus [2].
```fortran
real(kind=8) :: J
@@ -216,6 +216,9 @@ You may download the example as a [HYPELA2 user subroutine](Marc/hypela2_stvenan
Export for Abaqus
+{: .important }
+> Abaqus uses the Updated Lagrange framework. Please note that for the updated lagrange framework it is common to use the jaumann rate of kirchhoff stress in commercial FE codes. First, the tangent matrix is pushed forward to spatial components `(i,j,k,l)`, divided by the volumetric ratio `J` and then transformed to the jaumann rate of kirchhoff stress. For the elasticity tensor conversion have a look at Maria Holland's Hitchhiker's Guide to Abaqus [2].
+
```fortran
! push forward to cauchy stress
J = det(F1)
From f41cfdc1f461650ed1ecc0728e7171487403e701 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Thu, 28 Sep 2023 11:36:39 +0200
Subject: [PATCH 119/130] Rename example file names
---
...example_stvenantkirchhoff.md => ex01_stvenantkirchhoff.md} | 0
docs/examples/{example_neohooke.md => ex02_neohooke.md} | 0
docs/examples/index.md | 3 ++-
docs/index.md | 4 ++--
4 files changed, 4 insertions(+), 3 deletions(-)
rename docs/examples/{example_stvenantkirchhoff.md => ex01_stvenantkirchhoff.md} (100%)
rename docs/examples/{example_neohooke.md => ex02_neohooke.md} (100%)
diff --git a/docs/examples/example_stvenantkirchhoff.md b/docs/examples/ex01_stvenantkirchhoff.md
similarity index 100%
rename from docs/examples/example_stvenantkirchhoff.md
rename to docs/examples/ex01_stvenantkirchhoff.md
diff --git a/docs/examples/example_neohooke.md b/docs/examples/ex02_neohooke.md
similarity index 100%
rename from docs/examples/example_neohooke.md
rename to docs/examples/ex02_neohooke.md
diff --git a/docs/examples/index.md b/docs/examples/index.md
index 4c750f94..cafc7d96 100644
--- a/docs/examples/index.md
+++ b/docs/examples/index.md
@@ -9,7 +9,8 @@ has_children: true
This section contains examples for user subroutines for Marc and Abaqus, including
+* the implementation of the [St.Venant Kirchhoff material]({% link examples/ex01_stvenantkirchhoff.md %}),
+* the implementation of the [Neo-Hookean material]({% link examples/ex02_neohooke.md %}),
* a [basic understandig of the tensor toolbox](script_umat.f),
-* the implementation of the [St.Venant Kirchhoff material]({% link examples/example_stvenantkirchhoff.md %}),
* a [full featured Marc Neo-Hookean material HYPELA2 user subroutine](Marc/hypela2_nh_ttb.f) and
* an [easy-to-extend Abaqus Neo-Hookean material UMAT user subroutine](Abaqus/umat_nh_ttb.f).
\ No newline at end of file
diff --git a/docs/index.md b/docs/index.md
index 711423ec..c61ad91f 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -38,8 +38,8 @@ Andreas Dutzler. *Tensor Toolbox for Modern Fortran - High-Level Tensor Manipula
- [Quick Start Guide]({% link installation/quickstartguide.md %})
- [Tensor Data Types]({% link api/tensordatatypes.md %})
- [API Reference]({% link api/index.md %})
-- Example 1: [St.Venant-Kirchhoff Material]({% link examples/example_stvenantkirchhoff.md %})
-- Example 2: [Nearly-Incompressible Neo-Hookean Material]({% link examples/example_neohooke.md %})
+- Example 1: [St.Venant-Kirchhoff Material]({% link examples/ex01_stvenantkirchhoff.md %})
+- Example 2: [Nearly-Incompressible Neo-Hookean Material]({% link examples/ex02_neohooke.md %})
- Example 3: [Neo-Hookean Hyperelasticity with Maxwell-Viscoelasticity](examples/Marc/hypela2_nonlinear_viscoelasticity.f)
## Author
From 320ec590a4dada99bfd08b63d68b50f413900b31 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Tue, 2 Jan 2024 10:35:30 +0100
Subject: [PATCH 120/130] Fix `rotation_matrix()` at axis 2 and docs for axes 1
and 3
---
CHANGELOG.md | 3 +++
docs/api/functions/rotation.md | 4 ++--
ttb/librotation.f | 4 ++--
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 38b0c6d2..37d8c7af 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file. The format
## [Unreleased]
+### Fixed
+- Fix the orientation of `rotation_matrix(phi,2)` for a rotation matrix around axis 2. Also fix the docs for `rotation_matrix(phi,1)` and `rotation_matrix(phi,3)`.
+
## [2.1.0] - 2023-09-25
### Added
diff --git a/docs/api/functions/rotation.md b/docs/api/functions/rotation.md
index 5de6ffe7..c05c191d 100644
--- a/docs/api/functions/rotation.md
+++ b/docs/api/functions/rotation.md
@@ -20,7 +20,7 @@ There are 3 possible cases:
### `rotation_matrix(phi,3)`
$$
\begin{equation}
- \mathbf{R} = \begin{bmatrix} \cos \varphi & \sin \varphi & 0 \\ -\sin \varphi & \cos \varphi & 0 \\ 0 & 0 & 1 \end{bmatrix}
+ \mathbf{R} = \begin{bmatrix} \cos \varphi & -\sin \varphi & 0 \\ \sin \varphi & \cos \varphi & 0 \\ 0 & 0 & 1 \end{bmatrix}
\end{equation}
$$
@@ -34,7 +34,7 @@ $$
### `rotation_matrix(phi,1)`
$$
\begin{equation}
- \mathbf{R} = \begin{bmatrix} 1 & 0 & 0 \\ 0 &\cos \varphi & \sin \varphi\\ 0 & -\sin \varphi & \cos \varphi\\ \end{bmatrix}
+ \mathbf{R} = \begin{bmatrix} 1 & 0 & 0 \\ 0 &\cos \varphi & -\sin \varphi\\ 0 & \sin \varphi & \cos \varphi\\ \end{bmatrix}
\end{equation}
$$
diff --git a/ttb/librotation.f b/ttb/librotation.f
index d1e8da58..216e6532 100644
--- a/ttb/librotation.f
+++ b/ttb/librotation.f
@@ -18,8 +18,8 @@ function rotation_2(phi,i)
else !i == 2
rotation_2%ab(1,1) = R(1,1)
rotation_2%ab(3,3) = R(2,2)
- rotation_2%ab(1,3) = R(1,2)
- rotation_2%ab(3,1) = R(2,1)
+ rotation_2%ab(1,3) = R(2,1)
+ rotation_2%ab(3,1) = R(1,2)
end if
end function rotation_2
\ No newline at end of file
From 07e4f3de39250e11556e0f6c9cfa03247afd31cd Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Tue, 2 Jan 2024 10:13:31 +0100
Subject: [PATCH 121/130] Rename internal functions `stretch_2[s]` to
`sqrt_2[s]`
---
CHANGELOG.md | 3 +++
docs/api/functions/squareroot.md | 2 +-
ttb/libsqrt.f | 20 ++++++++++----------
ttb/ttb_library.f | 8 ++++----
version.txt | 2 +-
5 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 37d8c7af..8fbaf7b4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file. The format
## [Unreleased]
+### Changed
+- Rename internal matrix square-root from `stretch_2` and `stretch_2s` to `sqrt_2` and `sqrt_2s`. This does not affect the public API which remains unchanged as (matrix) square root `sqrt(T)`.
+
### Fixed
- Fix the orientation of `rotation_matrix(phi,2)` for a rotation matrix around axis 2. Also fix the docs for `rotation_matrix(phi,1)` and `rotation_matrix(phi,3)`.
diff --git a/docs/api/functions/squareroot.md b/docs/api/functions/squareroot.md
index 9e865565..1dbf7d46 100644
--- a/docs/api/functions/squareroot.md
+++ b/docs/api/functions/squareroot.md
@@ -8,7 +8,7 @@ grand_parent: API Reference
## Square Root
-Tensorial square root of a positive definite rank 2 Tensor. For algorithmic details see [Franka, L.P. (1988)](https://inis.iaea.org/search/search.aspx?orig_q=RN:20064555). This function can be used to obtain the stretch tensor.
+Tensorial (matrix) square root of a positive definite rank 2 Tensor. For algorithmic details see [Franka, L.P. (1988)](https://inis.iaea.org/search/search.aspx?orig_q=RN:20064555). This function can be used to obtain the stretch tensor. For a rank 1 Tensor (vector), the element-wise square root is returned.
$$
\begin{align}
diff --git a/ttb/libsqrt.f b/ttb/libsqrt.f
index c36e331a..236e0317 100644
--- a/ttb/libsqrt.f
+++ b/ttb/libsqrt.f
@@ -8,7 +8,7 @@ function sqrt_1(T)
end function sqrt_1
- function stretch_2(T)
+ function sqrt_2(T)
! Source:
!
! Franca, L.P. (1989): AN ALGORITHM TO COMPUTE
@@ -17,7 +17,7 @@ function stretch_2(T)
implicit none
type(Tensor2), intent(in) :: T
- type(Tensor2) :: stretch_2
+ type(Tensor2) :: sqrt_2
real(kind=8) :: I_T,II_T,III_T,I_U,II_U,III_U,k,l,lam,phi
@@ -30,7 +30,7 @@ function stretch_2(T)
! Isotropy check
if (dabs(k).le.1.0d-8) then
lam = (I_T/3.)**(1./2.)
- stretch_2 = lam * identity2(T)
+ sqrt_2 = lam * identity2(T)
return
end if
@@ -46,12 +46,12 @@ function stretch_2(T)
print *, 'test', l,k,1-l**2/k**3
- stretch_2 = 1./(I_U*II_U-III_U)
+ sqrt_2 = 1./(I_U*II_U-III_U)
* *(I_U*III_U*identity2(T) + (I_U**2-II_U)*T-T**2)
- end function stretch_2
+ end function sqrt_2
- function stretch_2s(T)
+ function sqrt_2s(T)
! Source:
!
! Franca, L.P. (1989): AN ALGORITHM TO COMPUTE
@@ -60,7 +60,7 @@ function stretch_2s(T)
implicit none
type(Tensor2s), intent(in) :: T
- type(Tensor2s) :: stretch_2s
+ type(Tensor2s) :: sqrt_2s
real(kind=8) :: I_T,II_T,III_T,I_U,II_U,III_U,k,l,lam,phi
@@ -73,7 +73,7 @@ function stretch_2s(T)
! Isotropy check
if (k.le.1.0d-8) then
lam = (I_T/3.)**(1./2.)
- stretch_2s = lam * identity2(T)
+ sqrt_2s = lam * identity2(T)
return
end if
@@ -87,7 +87,7 @@ function stretch_2s(T)
I_U = lam + dsqrt(-lam**2+I_T+2.*III_U/lam)
II_U = (I_U**2-I_T)/2.
- stretch_2s = 1./(I_U*II_U-III_U)
+ sqrt_2s = 1./(I_U*II_U-III_U)
* *(I_U*III_U*identity2(T) + (I_U**2-II_U)*T-T*T)
- end function stretch_2s
\ No newline at end of file
+ end function sqrt_2s
\ No newline at end of file
diff --git a/ttb/ttb_library.f b/ttb/ttb_library.f
index 09734b3f..05517395 100644
--- a/ttb/ttb_library.f
+++ b/ttb/ttb_library.f
@@ -268,14 +268,14 @@ module Tensor
interface sqrt
module procedure sqrt_1
- module procedure stretch_2
- module procedure stretch_2s
+ module procedure sqrt_2
+ module procedure sqrt_2s
end interface
interface dsqrt
module procedure sqrt_1
- module procedure stretch_2
- module procedure stretch_2s
+ module procedure sqrt_2
+ module procedure sqrt_2s
end interface
interface rotation_matrix
diff --git a/version.txt b/version.txt
index c10edc3f..97ade152 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-2.1.0-dev
+2.2.0-dev
From 09fcba96f3943348cd213696032ce3d4d4ff56ec Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Tue, 2 Jan 2024 10:56:02 +0100
Subject: [PATCH 122/130] Update operators.md
---
docs/api/operators.md | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/docs/api/operators.md b/docs/api/operators.md
index 3c3ea61e..d1aea809 100644
--- a/docs/api/operators.md
+++ b/docs/api/operators.md
@@ -15,8 +15,11 @@ This module uses derived data types where the default operators are overloaded w
- Multiplication by scalar `A*5.`
- Dot-Product (single contraction) `A*B`
- Double-Dot-Product (double contraction) `A**B`
-- Dyadic Product `A.dya.B`
-- Symmetric Crossed-dyadic Product `A.cdya.B` to perform `C(i,j,k,l) = (A(i,k)*B(j,l) + A(i,l)*B(j,k) + B(i,k)*A(j,l) + B(i,l)*A(j,k)) / 4.`
+
+{: .note }
+> See Also
+>
+> There are also functions available for the dyadic product `A.dya.B` and the symmetric crossed-dyadic product `A.cdya.B` to perform `C(i,j,k,l) = (A(i,k)*B(j,l) + A(i,l)*B(j,k) + B(i,k)*A(j,l) + B(i,l)*A(j,k)) / 4.`.
{: .warning }
> Be sure to use brackets around functions which should be evaluated first because the double contraction has the highest priority as it is replaced by the conventional power function. This leads to wrong results in combination with crossed-dyadic products as they must be evaluated first. Always use brackets like `A**(B.cdya.B)`. Unfortunately this is a limitation of Fortran.
From e4b2e21f6726413ba35733fbeb92888590bfc0a1 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Tue, 2 Jan 2024 11:01:27 +0100
Subject: [PATCH 123/130] Update LICENSE
---
LICENSE | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/LICENSE b/LICENSE
index edb8d3fd..515dbad7 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2023 Andreas Dutzler
+Copyright (c) 2024 Andreas Dutzler
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
From a80dc8cbb8d91a092b9acb1b8221197f158aa644 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Tue, 2 Jan 2024 11:06:47 +0100
Subject: [PATCH 124/130] Docs: Add See Also callout
---
docs/_config.yml | 3 +++
docs/api/operators.md | 4 +---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/docs/_config.yml b/docs/_config.yml
index 69f52b8a..e3071c1e 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -17,6 +17,9 @@ callouts:
note:
title: Note
color: purple
+ seealso:
+ title: See Also
+ color: green
last_edit_timestamp: true # requires `last_modified_date` in frontmatter
last_edit_time_format: "%Y-%m-%d"
diff --git a/docs/api/operators.md b/docs/api/operators.md
index d1aea809..06d08be1 100644
--- a/docs/api/operators.md
+++ b/docs/api/operators.md
@@ -16,9 +16,7 @@ This module uses derived data types where the default operators are overloaded w
- Dot-Product (single contraction) `A*B`
- Double-Dot-Product (double contraction) `A**B`
-{: .note }
-> See Also
->
+{: .seealso }
> There are also functions available for the dyadic product `A.dya.B` and the symmetric crossed-dyadic product `A.cdya.B` to perform `C(i,j,k,l) = (A(i,k)*B(j,l) + A(i,l)*B(j,k) + B(i,k)*A(j,l) + B(i,l)*A(j,k)) / 4.`.
{: .warning }
From 6a940698edc6833e0795fbbd819e13fa5aedc0fc Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 3 Jan 2024 17:39:34 +0100
Subject: [PATCH 125/130] Remove unsed print in `sqrt_2()`
---
ttb/libsqrt.f | 2 --
1 file changed, 2 deletions(-)
diff --git a/ttb/libsqrt.f b/ttb/libsqrt.f
index 236e0317..8a89f7e9 100644
--- a/ttb/libsqrt.f
+++ b/ttb/libsqrt.f
@@ -44,8 +44,6 @@ function sqrt_2(T)
I_U = lam + dsqrt(-lam**2+I_T+2.*III_U/lam)
II_U = (I_U**2-I_T)/2.
- print *, 'test', l,k,1-l**2/k**3
-
sqrt_2 = 1./(I_U*II_U-III_U)
* *(I_U*III_U*identity2(T) + (I_U**2-II_U)*T-T**2)
From 3b8afd14779a7ecc3d5943817748832f6dd55fdc Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 3 Jan 2024 17:40:23 +0100
Subject: [PATCH 126/130] Update CHANGELOG.md
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8fbaf7b4..220cbcf9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. The format
### Changed
- Rename internal matrix square-root from `stretch_2` and `stretch_2s` to `sqrt_2` and `sqrt_2s`. This does not affect the public API which remains unchanged as (matrix) square root `sqrt(T)`.
+- Remove unsed print statement in `sqrt_2()`.
### Fixed
- Fix the orientation of `rotation_matrix(phi,2)` for a rotation matrix around axis 2. Also fix the docs for `rotation_matrix(phi,1)` and `rotation_matrix(phi,3)`.
From 03382758e821cdae120cd6890f61f49c776b745c Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 3 Jan 2024 17:42:51 +0100
Subject: [PATCH 127/130] Update CHANGELOG.md
fix typo
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 220cbcf9..50c165a8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format
### Changed
- Rename internal matrix square-root from `stretch_2` and `stretch_2s` to `sqrt_2` and `sqrt_2s`. This does not affect the public API which remains unchanged as (matrix) square root `sqrt(T)`.
-- Remove unsed print statement in `sqrt_2()`.
+- Remove unused print statement in `sqrt_2()`.
### Fixed
- Fix the orientation of `rotation_matrix(phi,2)` for a rotation matrix around axis 2. Also fix the docs for `rotation_matrix(phi,1)` and `rotation_matrix(phi,3)`.
From bd2d59ed1185ae1fe0ecef6f46a67152cbdde27d Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 3 Jan 2024 23:27:46 +0100
Subject: [PATCH 128/130] Update CHANGELOG.md
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 50c165a8..b8eb4284 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format
### Changed
- Rename internal matrix square-root from `stretch_2` and `stretch_2s` to `sqrt_2` and `sqrt_2s`. This does not affect the public API which remains unchanged as (matrix) square root `sqrt(T)`.
-- Remove unused print statement in `sqrt_2()`.
+- Remove an unused print statement in `sqrt_2()`.
### Fixed
- Fix the orientation of `rotation_matrix(phi,2)` for a rotation matrix around axis 2. Also fix the docs for `rotation_matrix(phi,1)` and `rotation_matrix(phi,3)`.
From 3d6a217974062cd262c5f478a297120a10ee35a6 Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 3 Jan 2024 23:27:56 +0100
Subject: [PATCH 129/130] Update version.txt
---
version.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/version.txt b/version.txt
index 97ade152..3e3c2f1e 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-2.2.0-dev
+2.1.1
From 1b1b7ee40e76a69e1dfb52b6a409c12a4ff97c7b Mon Sep 17 00:00:00 2001
From: Andreas Dutzler
Date: Wed, 3 Jan 2024 23:28:22 +0100
Subject: [PATCH 130/130] Update CHANGELOG.md
---
CHANGELOG.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b8eb4284..fe2aad87 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file. The format
## [Unreleased]
+## [2.1.1] - 2024-01-03
+
### Changed
- Rename internal matrix square-root from `stretch_2` and `stretch_2s` to `sqrt_2` and `sqrt_2s`. This does not affect the public API which remains unchanged as (matrix) square root `sqrt(T)`.
- Remove an unused print statement in `sqrt_2()`.