From 7d4968a286e0eeb86211b722b077aef41592906f Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Mon, 25 Sep 2023 23:56:24 +0200 Subject: [PATCH 001/130] Update umat_nh_ttb_simple.f --- docs/examples/umat_nh_ttb_simple.f | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/examples/umat_nh_ttb_simple.f b/docs/examples/umat_nh_ttb_simple.f index 078fa61c..1851eebb 100644 --- a/docs/examples/umat_nh_ttb_simple.f +++ b/docs/examples/umat_nh_ttb_simple.f @@ -42,14 +42,14 @@ SUBROUTINE UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD, F1 = dfgrd1(1:3,1:3) J = det(F1) - ! right cauchy-green deformation tensor and it's inverse + ! right cauchy-green deformation tensor and its inverse C1 = transpose(F1)*F1 - invC1 = inv(C1) ! faster method: invC1 = inv(C1,J**2) + invC1 = inv(C1) ! pk2 stress S1 = 2.*C10*J**(-2./3.)*dev(C1)*invC1 + kappa*(J-1)*J*invC1 - ! push forward to cauchy stress used in abaqus + ! push forward to cauchy stress S1 = piola(F1,S1)/J ! material elasticity tensor From 77e18b8cad30cea55361ad093688094b205c0ddf Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Mon, 25 Sep 2023 23:58:23 +0200 Subject: [PATCH 002/130] Update umat_nh_ttb.f --- docs/examples/umat_nh_ttb.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/umat_nh_ttb.f b/docs/examples/umat_nh_ttb.f index 63578f1b..48c95382 100644 --- a/docs/examples/umat_nh_ttb.f +++ b/docs/examples/umat_nh_ttb.f @@ -54,7 +54,7 @@ SUBROUTINE UMAT(STRESS,STATEV,DDSDDE,SSE,SPD,SCD, F1 = dfgrd1(1:3,1:3) J = det(F1) - ! right cauchy-green deformation tensor and it's inverse + ! right cauchy-green deformation tensor and its inverse C1 = transpose(F1) * F1 invC1 = inv(C1) From bd30781881f5861dc985b879cc8cfb6399c79f85 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 15:34:29 +0200 Subject: [PATCH 003/130] Update _config.yml --- docs/_config.yml | 97 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 93 insertions(+), 4 deletions(-) diff --git a/docs/_config.yml b/docs/_config.yml index 41a2f5ba..a6be476b 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,6 +1,95 @@ -theme: jekyll-theme-cayman +title: Fortran Tensor +description: Tensor Toolbox for Modern Fortran +url: "https://adtzlr.github.io" +baseurl: "ttb" +repository: adtzlr/ttb + +theme: just-the-docs + +permalink: pretty + +# Set a path/url to a logo that will be displayed instead of the title +#logo: "/assets/images/just-the-docs.png" + +# Enable or disable the site search +search_enabled: true + +# Enable or disable heading anchors +heading_anchors: true + +# Aux links for the upper right navigation +aux_links: + "Fortran Tensor on GitHub": + - "https://github.com/adtzlr/ttb" + +# Makes Aux links open in a new tab. Default is false +aux_links_new_tab: false + +# Sort order for navigation links +# nav_sort: case_insensitive # default, equivalent to nil +nav_sort: case_sensitive # Capital letters sorted before lowercase + +# External navigation links +nav_external_links: + - title: Fortran Tensor on GitHub + url: https://github.com/adtzlr/ttb -title: Tensor Toolbox for Modern Fortran -description: High-Level Tensor Manipulation in Fortran +# Back to top link +back_to_top: true +back_to_top_text: "Back to top" + +# footer_content: "Copyright © 2017-2023" + +# Footer last edited timestamp +# last_edit_timestamp: true # show or hide edit time - page must have `last_modified_date` defined in the frontmatter +# last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format: https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html + +# Footer "Edit this page on GitHub" link text +gh_edit_link: true # show or hide edit this page link +gh_edit_link_text: "Edit this page on GitHub" +gh_edit_repository: "https://github.com/adtzlr/ttb" # the github URL for your repo +gh_edit_branch: "main" # the branch that your docs is served from +gh_edit_source: docs # the source that your files originate from +gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into the editor immediately + +# Color scheme currently only supports "dark", "light"/nil (default), or a custom scheme that you define +# color_scheme: nil + +callouts_level: quiet # or loud +callouts: + highlight: + color: yellow + important: + title: Important + color: blue + new: + title: New + color: green + note: + title: Note + color: purple + warning: + title: Warning + color: red + +plugins: + - jekyll-seo-tag + - jekyll-github-metadata + - jekyll-include-cache + +kramdown: + syntax_highlighter_opts: + block: + line_numbers: false + +theme: jekyll-theme-cayman -show_downloads: true \ No newline at end of file +compress_html: + clippings: all + comments: all + endings: all + startings: [] + blanklines: true + profile: false + # ignore: + # envs: all \ No newline at end of file From f0ed82f6d26f832143ad294d52a79d89b74b2946 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 15:37:09 +0200 Subject: [PATCH 004/130] Update _config.yml --- docs/_config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/_config.yml b/docs/_config.yml index a6be476b..67ece4ba 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -82,8 +82,6 @@ kramdown: block: line_numbers: false -theme: jekyll-theme-cayman - compress_html: clippings: all comments: all From 958b85665088f24d5d136694b6c45a49113c21c3 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 16:02:52 +0200 Subject: [PATCH 005/130] Setup GitHub Actions for the Docs --- .github/workflows/pages.yml | 71 ++++++++++++++++++++++++++++++++ docs/.gitignore | 15 +++++++ docs/Gemfile | 7 ++++ docs/Gemfile.lock | 81 +++++++++++++++++++++++++++++++++++++ 4 files changed, 174 insertions(+) create mode 100644 .github/workflows/pages.yml create mode 100644 docs/.gitignore create mode 100644 docs/Gemfile create mode 100644 docs/Gemfile.lock diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 00000000..014161ca --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,71 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# Sample workflow for building and deploying a Jekyll site to GitHub Pages +name: Deploy Jekyll site to Pages + +on: + push: + branches: + - "main" + paths: + - "docs/**" + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + # Build job + build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: docs + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.1' # Not needed with a .ruby-version file + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + cache-version: 0 # Increment this number if you need to re-download cached gems + working-directory: '${{ github.workspace }}/docs' + - name: Setup Pages + id: pages + uses: actions/configure-pages@v3 + - name: Build with Jekyll + # Outputs to the './_site' directory by default + run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" + env: + JEKYLL_ENV: production + - name: Upload artifact + # Automatically uploads an artifact from the './_site' directory by default + uses: actions/upload-pages-artifact@v1 + with: + path: "docs/_site/" + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 00000000..f9f1d493 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,15 @@ +# Not sure what a .gitignore is? +# See: https://git-scm.com/docs/gitignore + +# These are directly copied from Jekyll's first-party docs on `.gitignore` files: +# https://jekyllrb.com/tutorials/using-jekyll-with-bundler/#commit-to-source-control + +# Ignore the default location of the built site, and caches and metadata generated by Jekyll +_site/ +.sass-cache/ +.jekyll-cache/ +.jekyll-metadata + +# Ignore folders generated by Bundler +.bundle/ +vendor/ diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 00000000..58ff0c3b --- /dev/null +++ b/docs/Gemfile @@ -0,0 +1,7 @@ +source 'https://rubygems.org' + +gem "jekyll", "~> 4.3.2" # installed by `gem jekyll` +# gem "webrick" # required when using Ruby >= 3 and Jekyll <= 4.2.2 + +gem "just-the-docs", "0.6.2" # pinned to the current release +# gem "just-the-docs" # always download the latest release diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock new file mode 100644 index 00000000..1c7092ab --- /dev/null +++ b/docs/Gemfile.lock @@ -0,0 +1,81 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.8.5) + public_suffix (>= 2.0.2, < 6.0) + colorator (1.1.0) + concurrent-ruby (1.2.2) + em-websocket (0.5.3) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0) + eventmachine (1.2.7) + ffi (1.15.5) + forwardable-extended (2.6.0) + google-protobuf (3.24.3-x86_64-linux) + http_parser.rb (0.8.0) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + jekyll (4.3.2) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 1.0) + jekyll-sass-converter (>= 2.0, < 4.0) + jekyll-watch (~> 2.0) + kramdown (~> 2.3, >= 2.3.1) + kramdown-parser-gfm (~> 1.0) + liquid (~> 4.0) + mercenary (>= 0.3.6, < 0.5) + pathutil (~> 0.9) + rouge (>= 3.0, < 5.0) + safe_yaml (~> 1.0) + terminal-table (>= 1.8, < 4.0) + webrick (~> 1.7) + jekyll-include-cache (0.2.1) + jekyll (>= 3.7, < 5.0) + jekyll-sass-converter (3.0.0) + sass-embedded (~> 1.54) + jekyll-seo-tag (2.8.0) + jekyll (>= 3.8, < 5.0) + jekyll-watch (2.2.1) + listen (~> 3.0) + just-the-docs (0.6.2) + jekyll (>= 3.8.5) + jekyll-include-cache + jekyll-seo-tag (>= 2.0) + rake (>= 12.3.1) + kramdown (2.4.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.4) + listen (3.8.0) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + mercenary (0.4.0) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (5.0.3) + rake (13.0.6) + rb-fsevent (0.11.2) + rb-inotify (0.10.1) + ffi (~> 1.0) + rexml (3.2.6) + rouge (4.1.3) + safe_yaml (1.0.5) + sass-embedded (1.67.0-x86_64-linux-gnu) + google-protobuf (~> 3.23) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + unicode-display_width (2.4.2) + webrick (1.8.1) + +PLATFORMS + x86_64-linux + +DEPENDENCIES + jekyll (~> 4.3.2) + just-the-docs (= 0.6.2) + +BUNDLED WITH + 2.3.26 From 879cb28a268fa3fa8b72f392366ec8512185fe80 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 16:08:08 +0200 Subject: [PATCH 006/130] Fix docs --- README.md | 2 +- docs/_config.yml | 2 +- version.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f968ffdb..aa8f5afd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

-

Tensor Toolbox for Modern Fortran.

+

Fortran Tensor - Tensor Toolbox for Modern Fortran.

![GitHub release (latest by date)](https://img.shields.io/github/v/release/adtzlr/ttb?color=green) diff --git a/docs/_config.yml b/docs/_config.yml index 67ece4ba..63039826 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -35,7 +35,7 @@ nav_external_links: url: https://github.com/adtzlr/ttb # Back to top link -back_to_top: true +back_to_top: false back_to_top_text: "Back to top" # footer_content: "Copyright © 2017-2023" diff --git a/version.txt b/version.txt index 7ec1d6db..c10edc3f 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.1.0 +2.1.0-dev From 50e3ea958563bbb43539ff102ad70947b9f26455 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 16:10:57 +0200 Subject: [PATCH 007/130] Update _config.yml --- docs/_config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/_config.yml b/docs/_config.yml index 63039826..0c262ab7 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -74,7 +74,6 @@ callouts: plugins: - jekyll-seo-tag - - jekyll-github-metadata - jekyll-include-cache kramdown: From 0ca415fcd5cad45255966191da6365367ad19173 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 16:15:03 +0200 Subject: [PATCH 008/130] Update _config.yml --- docs/_config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/_config.yml b/docs/_config.yml index 0c262ab7..b0b42a4c 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,7 +1,6 @@ title: Fortran Tensor description: Tensor Toolbox for Modern Fortran -url: "https://adtzlr.github.io" -baseurl: "ttb" +url: "https://adtzlr.github.io/ttb" repository: adtzlr/ttb theme: just-the-docs From 1cebc8d3569aabf7244071e27d4f952ca67e4e0e Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 16:17:37 +0200 Subject: [PATCH 009/130] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aa8f5afd..f968ffdb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

-

Fortran Tensor - Tensor Toolbox for Modern Fortran.

+

Tensor Toolbox for Modern Fortran.

![GitHub release (latest by date)](https://img.shields.io/github/v/release/adtzlr/ttb?color=green) From ba2234215975ba5c088cddf9b642c1d05a1dcf76 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 16:21:54 +0200 Subject: [PATCH 010/130] Update _config.yml --- docs/_config.yml | 80 +----------------------------------------------- 1 file changed, 1 insertion(+), 79 deletions(-) diff --git a/docs/_config.yml b/docs/_config.yml index b0b42a4c..20c8e10e 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -5,87 +5,9 @@ repository: adtzlr/ttb theme: just-the-docs -permalink: pretty - # Set a path/url to a logo that will be displayed instead of the title #logo: "/assets/images/just-the-docs.png" -# Enable or disable the site search -search_enabled: true - -# Enable or disable heading anchors -heading_anchors: true - # Aux links for the upper right navigation aux_links: - "Fortran Tensor on GitHub": - - "https://github.com/adtzlr/ttb" - -# Makes Aux links open in a new tab. Default is false -aux_links_new_tab: false - -# Sort order for navigation links -# nav_sort: case_insensitive # default, equivalent to nil -nav_sort: case_sensitive # Capital letters sorted before lowercase - -# External navigation links -nav_external_links: - - title: Fortran Tensor on GitHub - url: https://github.com/adtzlr/ttb - -# Back to top link -back_to_top: false -back_to_top_text: "Back to top" - -# footer_content: "Copyright © 2017-2023" - -# Footer last edited timestamp -# last_edit_timestamp: true # show or hide edit time - page must have `last_modified_date` defined in the frontmatter -# last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format: https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html - -# Footer "Edit this page on GitHub" link text -gh_edit_link: true # show or hide edit this page link -gh_edit_link_text: "Edit this page on GitHub" -gh_edit_repository: "https://github.com/adtzlr/ttb" # the github URL for your repo -gh_edit_branch: "main" # the branch that your docs is served from -gh_edit_source: docs # the source that your files originate from -gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into the editor immediately - -# Color scheme currently only supports "dark", "light"/nil (default), or a custom scheme that you define -# color_scheme: nil - -callouts_level: quiet # or loud -callouts: - highlight: - color: yellow - important: - title: Important - color: blue - new: - title: New - color: green - note: - title: Note - color: purple - warning: - title: Warning - color: red - -plugins: - - jekyll-seo-tag - - jekyll-include-cache - -kramdown: - syntax_highlighter_opts: - block: - line_numbers: false - -compress_html: - clippings: all - comments: all - endings: all - startings: [] - blanklines: true - profile: false - # ignore: - # envs: all \ No newline at end of file + Fortran Tensor on GitHub: "https://github.com/adtzlr/ttb" \ No newline at end of file From 5a4962f9481611e966c4c92d6d9bf80aea41c84f Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 22:56:18 +0200 Subject: [PATCH 011/130] move .gitignore to root dir --- docs/.gitignore => .gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/.gitignore => .gitignore (100%) diff --git a/docs/.gitignore b/.gitignore similarity index 100% rename from docs/.gitignore rename to .gitignore From 6c382f00f3507effae85a9264f3ce61764329ed2 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 22:56:22 +0200 Subject: [PATCH 012/130] Create ci.yml --- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..948e7332 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,26 @@ +name: CI + +on: + push: + branches: ["main"] + pull_request: + +jobs: + # Build job + build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: docs + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.1' # Not needed with a .ruby-version file + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + cache-version: 0 # Increment this number if you need to re-download cached gems + working-directory: '${{ github.workspace }}/docs' + - name: Build with Jekyll + run: bundle exec jekyll build From 4cbd25a71a056edf1b4363e29893ff61de71b4b1 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 22:59:46 +0200 Subject: [PATCH 013/130] Update _config.yml --- docs/_config.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/docs/_config.yml b/docs/_config.yml index 20c8e10e..697f0cbd 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,13 +1,8 @@ title: Fortran Tensor description: Tensor Toolbox for Modern Fortran -url: "https://adtzlr.github.io/ttb" -repository: adtzlr/ttb - theme: just-the-docs -# Set a path/url to a logo that will be displayed instead of the title -#logo: "/assets/images/just-the-docs.png" +url: https://adtzlr.github.io/ttb -# Aux links for the upper right navigation aux_links: - Fortran Tensor on GitHub: "https://github.com/adtzlr/ttb" \ No newline at end of file + Fortran Tensor on GitHub: https://github.com/adtzlr/ttb \ No newline at end of file From 06859bf6f4807cdc3d3da961b6d953d867113374 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:02:22 +0200 Subject: [PATCH 014/130] Update index.md --- docs/index.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/index.md b/docs/index.md index b37f8380..f79c94a5 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,3 +1,8 @@ +--- +title: Home +layout: home +--- + # Documentation ![Tensor Toolbox for Modern Fortran](images/deformation.png) From 414f8c82376aba1ac3333c3c420aee76acf5ceeb Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:04:40 +0200 Subject: [PATCH 015/130] Create dependabot.yml --- .github/dependabot.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..ff1a3254 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: bundler + directory: / + schedule: + interval: daily + allow: + - dependency-type: direct From c2727e5d8bc49cccfc4551eb88169b3225966db4 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:06:54 +0200 Subject: [PATCH 016/130] Update installation.md --- docs/installation.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/installation.md b/docs/installation.md index 81b03319..2d59aab7 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,3 +1,8 @@ +--- +title: Installation +layout: page +--- + This Toolbox is a fortran module which can be used inside modern Fortran compilers. For compatibility reasons to commercial FEM Software packages it is written in _Fixed Format_. ## Installation Requirements From 9719a6b1c7b563e0d2d6e39fd2689c209f78bcde Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:21:23 +0200 Subject: [PATCH 017/130] Update index.md --- docs/index.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/index.md b/docs/index.md index f79c94a5..e07b5192 100644 --- a/docs/index.md +++ b/docs/index.md @@ -29,17 +29,16 @@ Andreas Dutzler. *Tensor Toolbox for Modern Fortran - High-Level Tensor Manipula ``` ## Overview -- [Installation](installation.md) -- [Quick Start Guide](quickstartguide.md) -- [Tensor Data Types](tensordatatypes.md) -- [Functions](functions.md) -- Example 1: [St.Venant-Kirchhoff Material](example_stvenantkirchhoff.md) -- Example 2: [Nearly-Incompressible Neo-Hookean Material](example_neohooke.md) +- [Installation]({% link installation.md %}) +- [Quick Start Guide]({% link quickstartguide.md %}) +- [Tensor Data Types]({% link tensordatatypes.md %}) +- [Functions]({% link functions.md %}) +- Example 1: [St.Venant-Kirchhoff Material]({% link example_stvenantkirchhoff.md) +- Example 2: [Nearly-Incompressible Neo-Hookean Material]({% link example_neohooke.md) - Example 3: [Neo-Hookean Hyperelasticity with Maxwell-Viscoelasticity](examples/hypela2_nonlinear_viscoelasticity.f) ## Author -Andreas Dutzler, Graz, Austria. -I'm a PhD student at the Insitute of Structural Durability and Railway Technology at Graz University of Technology. +Andreas Dutzler, Graz University of Technology, Austria. # Changelog 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). From 6c96ddbebb57be6aeebf91b4f1ccb3586a6b12d2 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:27:10 +0200 Subject: [PATCH 018/130] Update functions.md --- docs/functions.md | 57 ++++++++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git a/docs/functions.md b/docs/functions.md index 2cd4de79..0d180ec0 100644 --- a/docs/functions.md +++ b/docs/functions.md @@ -1,3 +1,8 @@ +--- +title: API Reference +layout: page +--- + ## Module Function Overview This module provides several useful assignments, operators and functions for the derived Tensor Data Types. @@ -13,37 +18,37 @@ To ensure consistency in calculating the virtual work shear terms are treated di All tensors, whether they are "stress"- or "strain"-like are stored with original (**no doubled**) shear components. Instead all dot- and double-dot-products are modified to take virtual work consistency into account. To be more precise, the function `asvoigt` is not really a Voigt storage - it is more a synonym for storing symmetric tensors as vectors and matrices. The user does have to take care of that storage if the strain in a user subroutine is used as an input for a `Tensor2s` data type and divide all shear components by a factor of `2`. ### Assignments -- [General behaviour of data type conversion](assignments/ass_overview.md) +- [General behaviour of data type conversion]({% link assignments/ass_overview.md %}) ### Operators -- [Dot Product](operators/operators_overview.md) -- [Double Dot Product](operators/operators_overview.md) -- [Dyadic Product](operators/operators_overview.md) -- [Crossed-dyadic Product](operators/operators_overview.md) -- [Division](operators/operators_overview.md) -- [Addition](operators/operators_overview.md) -- [Subtraction](operators/operators_overview.md) +- [Dot Product]({% link operators/operators_overview.md %}) +- [Double Dot Product]({% link operators/operators_overview.md %}) +- [Dyadic Product]({% link operators/operators_overview.md %}) +- [Crossed-dyadic Product]({% link operators/operators_overview.md %}) +- [Division]({% link operators/operators_overview.md %}) +- [Addition]({% link operators/operators_overview.md %}) +- [Subtraction]({% link operators/operators_overview.md %}) ### Scalar-valued functions -- [Trace](functions/trace.md) -- [Determinant](functions/determinant.md) -- [Norm](functions/norm.md) +- [Trace](functions/trace.md %}) +- [Determinant](functions/determinant.md %}) +- [Norm](functions/norm.md %}) ### Tensor-valued functions -- [Deviator](functions/deviator.md) -- [Unimodular](functions/unimodular.md) -- [Inverse](functions/inverse.md) -- [Transpose](functions/transpose.md) -- [Permute](functions/permute.md) -- [Square root](functions/squareroot.md) -- [Power](functions/power.md) -- [Identity](functions/identity.md) -- [Piola Operation](functions/piola.md) -- [Rotation Matrix](functions/rotation.md) +- [Deviator]({% link functions/deviator.md %}) +- [Unimodular]({% link functions/unimodular.md %}) +- [Inverse]({% link functions/inverse.md %}) +- [Transpose]({% link functions/transpose.md %}) +- [Permute]({% link functions/permute.md %}) +- [Square root]({% link functions/squareroot.md %}) +- [Power]({% link functions/power.md %}) +- [Identity]({% link functions/identity.md %}) +- [Piola Operation]({% link functions/piola.md %}) +- [Rotation Matrix]({% link functions/rotation.md %}) ### Helper Functions -- [As Array](functions/asarray.md) -- [As Abaqus Array](functions/asabqarray.md) -- [As Voigt](functions/asvoigt.md) -- [As Tensor](functions/astensor.md) -- [Import Strain](functions/voigtstrain.md) +- [As Array]({% link functions/asarray.md %}) +- [As Abaqus Array]({% link functions/asabqarray.md %}) +- [As Voigt]({% link functions/asvoigt.md %}) +- [As Tensor]({% link functions/astensor.md %}) +- [Import Strain]({% link functions/voigtstrain.md %}) From eda19bfec9306e9d7ff478ae3fa317a6204c127d Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:27:13 +0200 Subject: [PATCH 019/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 e07b5192..67e51782 100644 --- a/docs/index.md +++ b/docs/index.md @@ -33,8 +33,8 @@ Andreas Dutzler. *Tensor Toolbox for Modern Fortran - High-Level Tensor Manipula - [Quick Start Guide]({% link quickstartguide.md %}) - [Tensor Data Types]({% link tensordatatypes.md %}) - [Functions]({% link functions.md %}) -- Example 1: [St.Venant-Kirchhoff Material]({% link example_stvenantkirchhoff.md) -- Example 2: [Nearly-Incompressible Neo-Hookean Material]({% link example_neohooke.md) +- Example 1: [St.Venant-Kirchhoff Material]({% link example_stvenantkirchhoff.md %}) +- Example 2: [Nearly-Incompressible Neo-Hookean Material]({% link example_neohooke.md %}) - Example 3: [Neo-Hookean Hyperelasticity with Maxwell-Viscoelasticity](examples/hypela2_nonlinear_viscoelasticity.f) ## Author From 49feb47a027c3125c418164c91b87e2c6877198d Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:27:15 +0200 Subject: [PATCH 020/130] Update installation.md --- docs/installation.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/installation.md b/docs/installation.md index 2d59aab7..dc565bdd 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -3,6 +3,8 @@ title: Installation layout: page --- +# Installation + This Toolbox is a fortran module which can be used inside modern Fortran compilers. For compatibility reasons to commercial FEM Software packages it is written in _Fixed Format_. ## Installation Requirements From 63a9709e5c975dc2545f525f4d27776b2546bcbf Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:28:03 +0200 Subject: [PATCH 021/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 67e51782..55115109 100644 --- a/docs/index.md +++ b/docs/index.md @@ -40,7 +40,7 @@ Andreas Dutzler. *Tensor Toolbox for Modern Fortran - High-Level Tensor Manipula ## Author Andreas Dutzler, Graz University of Technology, Austria. -# Changelog +## Changelog 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). ## Credits From ea754d754f59874dc7d2e13a0e3fa79159a14569 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:29:03 +0200 Subject: [PATCH 022/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 697f0cbd..e7b80b97 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -5,4 +5,4 @@ theme: just-the-docs url: https://adtzlr.github.io/ttb aux_links: - Fortran Tensor on GitHub: https://github.com/adtzlr/ttb \ No newline at end of file + GitHub: https://github.com/adtzlr/ttb \ No newline at end of file From d32c64253e63dada8cebaacdc3bdd10efb5027f2 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:30:24 +0200 Subject: [PATCH 023/130] Navigation Orders --- docs/functions.md | 1 + docs/index.md | 1 + docs/installation.md | 1 + 3 files changed, 3 insertions(+) diff --git a/docs/functions.md b/docs/functions.md index 0d180ec0..f8a9d6a1 100644 --- a/docs/functions.md +++ b/docs/functions.md @@ -1,6 +1,7 @@ --- title: API Reference layout: page +nav_order: 3 --- ## Module Function Overview diff --git a/docs/index.md b/docs/index.md index 55115109..51d70cc7 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,6 +1,7 @@ --- title: Home layout: home +nav_order: 1 --- # Documentation diff --git a/docs/installation.md b/docs/installation.md index dc565bdd..8af84786 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -1,6 +1,7 @@ --- title: Installation layout: page +nav_order: 2 --- # Installation From 5cfd0052f7559a7c7a8e7aa962c3f2d2e30eacdc Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:31:47 +0200 Subject: [PATCH 024/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 51d70cc7..2157ba21 100644 --- a/docs/index.md +++ b/docs/index.md @@ -10,7 +10,7 @@ nav_order: 1 ## 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 [MSC.Marc](http://www.mscsoftware.com/product/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 [Naumann, C. (2016)](http://nbn-resolving.de/urn:nbn:de:bsz:ch1-qucosa-222075). ## How to cite From e6b6f0153e4614b7b5ebb5977da50f5abdb2328b Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:33:00 +0200 Subject: [PATCH 025/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 2157ba21..e8b7e5c5 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,7 +4,7 @@ layout: home nav_order: 1 --- -# Documentation +# Tensor Toolbox for Modern Fortran ![Tensor Toolbox for Modern Fortran](images/deformation.png) From 1d772ac3ff97c9e2b5f1868db11516b2c246605c Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:35:18 +0200 Subject: [PATCH 026/130] Update installation.md --- docs/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation.md b/docs/installation.md index 8af84786..15632e3a 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -9,7 +9,7 @@ nav_order: 2 This Toolbox is a fortran module which can be used inside modern Fortran compilers. For compatibility reasons to commercial FEM Software packages it is written in _Fixed Format_. ## Installation Requirements -This Toolbox is tested on Windows with both Intel Fortran >2015 (in combination with MSC.Marc) and GFortran >6.3. If you are using Linux it **should** work (but it is untested). +This Toolbox is tested on Linux and Windows with both Intel Fortran >2015 and GFortran >6.3. It has been succesfully used with Marc, Abaqus and LS Dyna. ## Download [Download the module](https://github.com/adtzlr/ttb/archive/main.zip), put the `ttb`-Folder in your working directory and you are ready to dive into comfortable tensor manipulations in Fortran. \ No newline at end of file From 10a9c2bf9ad4fb78ae6e00979399e4195d40e8a2 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:36:04 +0200 Subject: [PATCH 027/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 e7b80b97..72b9e5c4 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -5,4 +5,4 @@ theme: just-the-docs url: https://adtzlr.github.io/ttb aux_links: - GitHub: https://github.com/adtzlr/ttb \ No newline at end of file + Tensor Toolbox on GitHub: https://github.com/adtzlr/ttb \ No newline at end of file From 534ee29f4c8e818c198202b09a50742b448fd0d2 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:41:26 +0200 Subject: [PATCH 028/130] Move install-based stuff to docs/installation/ --- docs/index.md | 4 ++-- docs/{installation.md => installation/index.md} | 1 + docs/{ => installation}/quickstartguide.md | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) rename docs/{installation.md => installation/index.md} (97%) rename docs/{ => installation}/quickstartguide.md (90%) diff --git a/docs/index.md b/docs/index.md index e8b7e5c5..5fc8205b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -30,8 +30,8 @@ Andreas Dutzler. *Tensor Toolbox for Modern Fortran - High-Level Tensor Manipula ``` ## Overview -- [Installation]({% link installation.md %}) -- [Quick Start Guide]({% link quickstartguide.md %}) +- [Installation]({% link installation/index.md %}) +- [Quick Start Guide]({% link installation/quickstartguide.md %}) - [Tensor Data Types]({% link tensordatatypes.md %}) - [Functions]({% link functions.md %}) - Example 1: [St.Venant-Kirchhoff Material]({% link example_stvenantkirchhoff.md %}) diff --git a/docs/installation.md b/docs/installation/index.md similarity index 97% rename from docs/installation.md rename to docs/installation/index.md index 15632e3a..195bd830 100644 --- a/docs/installation.md +++ b/docs/installation/index.md @@ -2,6 +2,7 @@ title: Installation layout: page nav_order: 2 +has_children: true --- # Installation diff --git a/docs/quickstartguide.md b/docs/installation/quickstartguide.md similarity index 90% rename from docs/quickstartguide.md rename to docs/installation/quickstartguide.md index 1d28a4a4..d37ed26b 100644 --- a/docs/quickstartguide.md +++ b/docs/installation/quickstartguide.md @@ -1,3 +1,10 @@ +--- +title: Quick Start Guide +layout: page +nav_order: 2 +parent: Installation +--- + ## Quick Start Guide The most basic example on how to use this module is to [download the module](https://github.com/adtzlr/ttb/archive/main.zip), put the 'ttb'-Folder in your working directory and add two lines of code: From 864650ffaa988d640947db048f346cd9102fdcdd Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:43:13 +0200 Subject: [PATCH 029/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 72b9e5c4..08249506 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1,4 +1,4 @@ -title: Fortran Tensor +title: Tensor Toolbox description: Tensor Toolbox for Modern Fortran theme: just-the-docs From 9f72947324297dd76835724ed9e77e02440164e2 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:50:49 +0200 Subject: [PATCH 030/130] Move API docs --- docs/{assignments/ass_overview.md => api/assignments.md} | 0 docs/{ => api}/functions/asabqarray.md | 0 docs/{ => api}/functions/asarray.md | 0 docs/{ => api}/functions/astensor.md | 0 docs/{ => api}/functions/asvoigt.md | 0 docs/{ => api}/functions/determinant.md | 0 docs/{ => api}/functions/deviator.md | 0 docs/{ => api}/functions/identity.md | 0 docs/{ => api}/functions/inverse.md | 0 docs/{ => api}/functions/norm.md | 0 docs/{ => api}/functions/permute.md | 0 docs/{ => api}/functions/piola.md | 0 docs/{ => api}/functions/power.md | 0 docs/{ => api}/functions/rotation.md | 0 docs/{ => api}/functions/squareroot.md | 0 docs/{ => api}/functions/trace.md | 0 docs/{ => api}/functions/transpose.md | 0 docs/{ => api}/functions/unimodular.md | 0 docs/{ => api}/functions/voigtstrain.md | 0 docs/{functions.md => api/index.md} | 3 ++- docs/{ => api}/operators/operators_overview.md | 0 docs/{ => api}/tensordatatypes.md | 0 22 files changed, 2 insertions(+), 1 deletion(-) rename docs/{assignments/ass_overview.md => api/assignments.md} (100%) rename docs/{ => api}/functions/asabqarray.md (100%) rename docs/{ => api}/functions/asarray.md (100%) rename docs/{ => api}/functions/astensor.md (100%) rename docs/{ => api}/functions/asvoigt.md (100%) rename docs/{ => api}/functions/determinant.md (100%) rename docs/{ => api}/functions/deviator.md (100%) rename docs/{ => api}/functions/identity.md (100%) rename docs/{ => api}/functions/inverse.md (100%) rename docs/{ => api}/functions/norm.md (100%) rename docs/{ => api}/functions/permute.md (100%) rename docs/{ => api}/functions/piola.md (100%) rename docs/{ => api}/functions/power.md (100%) rename docs/{ => api}/functions/rotation.md (100%) rename docs/{ => api}/functions/squareroot.md (100%) rename docs/{ => api}/functions/trace.md (100%) rename docs/{ => api}/functions/transpose.md (100%) rename docs/{ => api}/functions/unimodular.md (100%) rename docs/{ => api}/functions/voigtstrain.md (100%) rename docs/{functions.md => api/index.md} (99%) rename docs/{ => api}/operators/operators_overview.md (100%) rename docs/{ => api}/tensordatatypes.md (100%) diff --git a/docs/assignments/ass_overview.md b/docs/api/assignments.md similarity index 100% rename from docs/assignments/ass_overview.md rename to docs/api/assignments.md diff --git a/docs/functions/asabqarray.md b/docs/api/functions/asabqarray.md similarity index 100% rename from docs/functions/asabqarray.md rename to docs/api/functions/asabqarray.md diff --git a/docs/functions/asarray.md b/docs/api/functions/asarray.md similarity index 100% rename from docs/functions/asarray.md rename to docs/api/functions/asarray.md diff --git a/docs/functions/astensor.md b/docs/api/functions/astensor.md similarity index 100% rename from docs/functions/astensor.md rename to docs/api/functions/astensor.md diff --git a/docs/functions/asvoigt.md b/docs/api/functions/asvoigt.md similarity index 100% rename from docs/functions/asvoigt.md rename to docs/api/functions/asvoigt.md diff --git a/docs/functions/determinant.md b/docs/api/functions/determinant.md similarity index 100% rename from docs/functions/determinant.md rename to docs/api/functions/determinant.md diff --git a/docs/functions/deviator.md b/docs/api/functions/deviator.md similarity index 100% rename from docs/functions/deviator.md rename to docs/api/functions/deviator.md diff --git a/docs/functions/identity.md b/docs/api/functions/identity.md similarity index 100% rename from docs/functions/identity.md rename to docs/api/functions/identity.md diff --git a/docs/functions/inverse.md b/docs/api/functions/inverse.md similarity index 100% rename from docs/functions/inverse.md rename to docs/api/functions/inverse.md diff --git a/docs/functions/norm.md b/docs/api/functions/norm.md similarity index 100% rename from docs/functions/norm.md rename to docs/api/functions/norm.md diff --git a/docs/functions/permute.md b/docs/api/functions/permute.md similarity index 100% rename from docs/functions/permute.md rename to docs/api/functions/permute.md diff --git a/docs/functions/piola.md b/docs/api/functions/piola.md similarity index 100% rename from docs/functions/piola.md rename to docs/api/functions/piola.md diff --git a/docs/functions/power.md b/docs/api/functions/power.md similarity index 100% rename from docs/functions/power.md rename to docs/api/functions/power.md diff --git a/docs/functions/rotation.md b/docs/api/functions/rotation.md similarity index 100% rename from docs/functions/rotation.md rename to docs/api/functions/rotation.md diff --git a/docs/functions/squareroot.md b/docs/api/functions/squareroot.md similarity index 100% rename from docs/functions/squareroot.md rename to docs/api/functions/squareroot.md diff --git a/docs/functions/trace.md b/docs/api/functions/trace.md similarity index 100% rename from docs/functions/trace.md rename to docs/api/functions/trace.md diff --git a/docs/functions/transpose.md b/docs/api/functions/transpose.md similarity index 100% rename from docs/functions/transpose.md rename to docs/api/functions/transpose.md diff --git a/docs/functions/unimodular.md b/docs/api/functions/unimodular.md similarity index 100% rename from docs/functions/unimodular.md rename to docs/api/functions/unimodular.md diff --git a/docs/functions/voigtstrain.md b/docs/api/functions/voigtstrain.md similarity index 100% rename from docs/functions/voigtstrain.md rename to docs/api/functions/voigtstrain.md diff --git a/docs/functions.md b/docs/api/index.md similarity index 99% rename from docs/functions.md rename to docs/api/index.md index f8a9d6a1..4bb0fc39 100644 --- a/docs/functions.md +++ b/docs/api/index.md @@ -2,6 +2,7 @@ title: API Reference layout: page nav_order: 3 +has_children: true --- ## Module Function Overview @@ -19,7 +20,7 @@ To ensure consistency in calculating the virtual work shear terms are treated di All tensors, whether they are "stress"- or "strain"-like are stored with original (**no doubled**) shear components. Instead all dot- and double-dot-products are modified to take virtual work consistency into account. To be more precise, the function `asvoigt` is not really a Voigt storage - it is more a synonym for storing symmetric tensors as vectors and matrices. The user does have to take care of that storage if the strain in a user subroutine is used as an input for a `Tensor2s` data type and divide all shear components by a factor of `2`. ### Assignments -- [General behaviour of data type conversion]({% link assignments/ass_overview.md %}) +- [General behaviour of data type conversion]({% link assignments.md %}) ### Operators - [Dot Product]({% link operators/operators_overview.md %}) diff --git a/docs/operators/operators_overview.md b/docs/api/operators/operators_overview.md similarity index 100% rename from docs/operators/operators_overview.md rename to docs/api/operators/operators_overview.md diff --git a/docs/tensordatatypes.md b/docs/api/tensordatatypes.md similarity index 100% rename from docs/tensordatatypes.md rename to docs/api/tensordatatypes.md From 3620eae9e895d6ac8653cfc37aa35a664dbb3f6f Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:53:14 +0200 Subject: [PATCH 031/130] Update _config.yml --- docs/_config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_config.yml b/docs/_config.yml index 08249506..06334687 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -3,6 +3,7 @@ description: Tensor Toolbox for Modern Fortran theme: just-the-docs url: https://adtzlr.github.io/ttb +logo: "/images/logo.png" aux_links: Tensor Toolbox on GitHub: https://github.com/adtzlr/ttb \ No newline at end of file From 0711c816d897ed9882b987ce51761d31c26f1ac5 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:54:46 +0200 Subject: [PATCH 032/130] Update assignments.md --- docs/api/assignments.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/api/assignments.md b/docs/api/assignments.md index f75daf43..b9df15b6 100644 --- a/docs/api/assignments.md +++ b/docs/api/assignments.md @@ -1,3 +1,10 @@ +--- +title: Assignments +layout: page +nav_order: 3 +parent: API Reference +--- + ## Assignments If there is a symmetric rank 2 tensor `type(Tensor2s) :: T2` on the left and a rank 2 tensor `type(Tensor2) :: T1` on the right hand side of the assignment `=` operator then the function `T2 = asvoigt(T1)` is automatically called. So it is possible to write the following examples: From 35f0daaa2961210f9411b4d744aa21e0db86408e Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:54:49 +0200 Subject: [PATCH 033/130] Update tensordatatypes.md --- docs/api/tensordatatypes.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/api/tensordatatypes.md b/docs/api/tensordatatypes.md index 734f6dc8..083cc61a 100644 --- a/docs/api/tensordatatypes.md +++ b/docs/api/tensordatatypes.md @@ -1,3 +1,11 @@ +--- +title: Tensor Types +layout: page +nav_order: 3 +parent: API Reference +--- + + There are several Tensor Data Types available inside this module: - `Tensor 1` rank 1 Tensor (Vector) - `Tensor 2` rank 2 Tensor From 39dcb621b0cc15bfab449767f7d31a2223c1c7aa Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:56:38 +0200 Subject: [PATCH 034/130] Update index.md --- docs/api/index.md | 52 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/docs/api/index.md b/docs/api/index.md index 4bb0fc39..a5e84c4a 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -20,37 +20,37 @@ To ensure consistency in calculating the virtual work shear terms are treated di All tensors, whether they are "stress"- or "strain"-like are stored with original (**no doubled**) shear components. Instead all dot- and double-dot-products are modified to take virtual work consistency into account. To be more precise, the function `asvoigt` is not really a Voigt storage - it is more a synonym for storing symmetric tensors as vectors and matrices. The user does have to take care of that storage if the strain in a user subroutine is used as an input for a `Tensor2s` data type and divide all shear components by a factor of `2`. ### Assignments -- [General behaviour of data type conversion]({% link assignments.md %}) +- [General behaviour of data type conversion]({% link api/assignments.md %}) ### Operators -- [Dot Product]({% link operators/operators_overview.md %}) -- [Double Dot Product]({% link operators/operators_overview.md %}) -- [Dyadic Product]({% link operators/operators_overview.md %}) -- [Crossed-dyadic Product]({% link operators/operators_overview.md %}) -- [Division]({% link operators/operators_overview.md %}) -- [Addition]({% link operators/operators_overview.md %}) -- [Subtraction]({% link operators/operators_overview.md %}) +- [Dot Product]({% link api/operators/operators_overview.md %}) +- [Double Dot Product]({% link api/operators/operators_overview.md %}) +- [Dyadic Product]({% link api/operators/operators_overview.md %}) +- [Crossed-dyadic Product]({% link api/operators/operators_overview.md %}) +- [Division]({% link api/operators/operators_overview.md %}) +- [Addition]({% link api/operators/operators_overview.md %}) +- [Subtraction]({% link api/operators/operators_overview.md %}) ### Scalar-valued functions -- [Trace](functions/trace.md %}) -- [Determinant](functions/determinant.md %}) -- [Norm](functions/norm.md %}) +- [Trace]({% link api/functions/trace.md %}) +- [Determinant]({% link api/functions/determinant.md %}) +- [Norm]({% link api/functions/norm.md %}) ### Tensor-valued functions -- [Deviator]({% link functions/deviator.md %}) -- [Unimodular]({% link functions/unimodular.md %}) -- [Inverse]({% link functions/inverse.md %}) -- [Transpose]({% link functions/transpose.md %}) -- [Permute]({% link functions/permute.md %}) -- [Square root]({% link functions/squareroot.md %}) -- [Power]({% link functions/power.md %}) -- [Identity]({% link functions/identity.md %}) -- [Piola Operation]({% link functions/piola.md %}) -- [Rotation Matrix]({% link functions/rotation.md %}) +- [Deviator]({% link api/functions/deviator.md %}) +- [Unimodular]({% link api/functions/unimodular.md %}) +- [Inverse]({% link api/functions/inverse.md %}) +- [Transpose]({% link api/functions/transpose.md %}) +- [Permute]({% link api/functions/permute.md %}) +- [Square root]({% link api/functions/squareroot.md %}) +- [Power]({% link api/functions/power.md %}) +- [Identity]({% link api/functions/identity.md %}) +- [Piola Operation]({% link api/functions/piola.md %}) +- [Rotation Matrix]({% link api/functions/rotation.md %}) ### Helper Functions -- [As Array]({% link functions/asarray.md %}) -- [As Abaqus Array]({% link functions/asabqarray.md %}) -- [As Voigt]({% link functions/asvoigt.md %}) -- [As Tensor]({% link functions/astensor.md %}) -- [Import Strain]({% link functions/voigtstrain.md %}) +- [As Array]({% link api/functions/asarray.md %}) +- [As Abaqus Array]({% link api/functions/asabqarray.md %}) +- [As Voigt]({% link api/functions/asvoigt.md %}) +- [As Tensor]({% link api/functions/astensor.md %}) +- [Import Strain]({% link api/functions/voigtstrain.md %}) From 14b2e9c19027ce48d993915fbdaa61cfd71f7a6a Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Tue, 26 Sep 2023 23:58:57 +0200 Subject: [PATCH 035/130] Update index.md --- docs/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/index.md b/docs/index.md index 5fc8205b..425dcb5a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -32,8 +32,8 @@ Andreas Dutzler. *Tensor Toolbox for Modern Fortran - High-Level Tensor Manipula ## Overview - [Installation]({% link installation/index.md %}) - [Quick Start Guide]({% link installation/quickstartguide.md %}) -- [Tensor Data Types]({% link tensordatatypes.md %}) -- [Functions]({% link functions.md %}) +- [Tensor Data Types]({% link api/tensordatatypes.md %}) +- [API Reference]({% link api/index.md %}) - Example 1: [St.Venant-Kirchhoff Material]({% link example_stvenantkirchhoff.md %}) - Example 2: [Nearly-Incompressible Neo-Hookean Material]({% link example_neohooke.md %}) - Example 3: [Neo-Hookean Hyperelasticity with Maxwell-Viscoelasticity](examples/hypela2_nonlinear_viscoelasticity.f) @@ -44,7 +44,7 @@ Andreas Dutzler, Graz University of Technology, Austria. ## Changelog 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). -## Credits +## 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 4b5d8296124dc8a1c4c4423bb0e00aa1d173e418 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Wed, 27 Sep 2023 00:02:53 +0200 Subject: [PATCH 036/130] Update asabqarray.md --- docs/api/functions/asabqarray.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/api/functions/asabqarray.md b/docs/api/functions/asabqarray.md index 81a60bda..31dcf988 100644 --- a/docs/api/functions/asabqarray.md +++ b/docs/api/functions/asabqarray.md @@ -1,3 +1,11 @@ -## As Array +--- +title: As Abaqus Array +layout: page +nav_order: 3 +parent: Functions +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 From 136c8820bf1fdf971e86e422c3ca372a23274bf9 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Wed, 27 Sep 2023 00:02:55 +0200 Subject: [PATCH 037/130] Create index.md --- docs/api/functions/index.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 docs/api/functions/index.md diff --git a/docs/api/functions/index.md b/docs/api/functions/index.md new file mode 100644 index 00000000..6c568627 --- /dev/null +++ b/docs/api/functions/index.md @@ -0,0 +1,7 @@ +--- +title: Functions +layout: page +nav_order: 3 +parent: API Reference +has_children: true +--- \ No newline at end of file From 54138a146ebd5f2fd962ac23deaa5a51cfa7ff3f Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Wed, 27 Sep 2023 00:05:25 +0200 Subject: [PATCH 038/130] Add functions to sidebar --- docs/api/functions/asarray.md | 8 ++++++++ docs/api/functions/astensor.md | 8 ++++++++ docs/api/functions/asvoigt.md | 8 ++++++++ docs/api/functions/determinant.md | 8 ++++++++ docs/api/functions/deviator.md | 8 ++++++++ docs/api/functions/identity.md | 8 ++++++++ docs/api/functions/inverse.md | 8 ++++++++ docs/api/functions/norm.md | 8 ++++++++ docs/api/functions/permute.md | 8 ++++++++ docs/api/functions/piola.md | 8 ++++++++ docs/api/functions/power.md | 8 ++++++++ docs/api/functions/rotation.md | 8 ++++++++ docs/api/functions/squareroot.md | 8 ++++++++ docs/api/functions/trace.md | 8 ++++++++ docs/api/functions/transpose.md | 8 ++++++++ docs/api/functions/unimodular.md | 8 ++++++++ docs/api/functions/voigtstrain.md | 8 ++++++++ 17 files changed, 136 insertions(+) diff --git a/docs/api/functions/asarray.md b/docs/api/functions/asarray.md index 1b0978c1..18bd1136 100644 --- a/docs/api/functions/asarray.md +++ b/docs/api/functions/asarray.md @@ -1,3 +1,11 @@ +--- +title: As Array +layout: page +nav_order: 3 +parent: Functions +grandparent: 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. diff --git a/docs/api/functions/astensor.md b/docs/api/functions/astensor.md index ce20a46a..86bb6e8e 100644 --- a/docs/api/functions/astensor.md +++ b/docs/api/functions/astensor.md @@ -1,3 +1,11 @@ +--- +title: As Tensor +layout: page +nav_order: 3 +parent: Functions +grandparent: API Reference +--- + ## As Tensor **Description:** Converts a `Tensor2s` or `Tensor4s` data type to a full tensor storage `Tensor2` or `Tensor4`. diff --git a/docs/api/functions/asvoigt.md b/docs/api/functions/asvoigt.md index d29efda5..a5b53302 100644 --- a/docs/api/functions/asvoigt.md +++ b/docs/api/functions/asvoigt.md @@ -1,3 +1,11 @@ +--- +title: As Voigt +layout: page +nav_order: 3 +parent: Functions +grandparent: API Reference +--- + ## As Voigt **Description:** Converts a `Tensor2` or `Tensor4` data type to a reduced Voigt-storage `Tensor2s` or `Tensor4s`. diff --git a/docs/api/functions/determinant.md b/docs/api/functions/determinant.md index ef0b449e..a97d0cc1 100644 --- a/docs/api/functions/determinant.md +++ b/docs/api/functions/determinant.md @@ -1,3 +1,11 @@ +--- +title: Determinant +layout: page +nav_order: 3 +parent: Functions +grandparent: API Reference +--- + ## Determinant **Description:** Determinant of a rank 2 Tensor. diff --git a/docs/api/functions/deviator.md b/docs/api/functions/deviator.md index bdb24679..3e498267 100644 --- a/docs/api/functions/deviator.md +++ b/docs/api/functions/deviator.md @@ -1,3 +1,11 @@ +--- +title: Deviator +layout: page +nav_order: 3 +parent: Functions +grandparent: API Reference +--- + ## Deviator **Description:** Deviator of a rank 2 Tensor. diff --git a/docs/api/functions/identity.md b/docs/api/functions/identity.md index cebc7df1..023f93e8 100644 --- a/docs/api/functions/identity.md +++ b/docs/api/functions/identity.md @@ -1,3 +1,11 @@ +--- +title: Identity +layout: page +nav_order: 3 +parent: Functions +grandparent: API Reference +--- + ## Identity **Description:** Calculate the identity tensor. Two functions for generating identities are implemented: diff --git a/docs/api/functions/inverse.md b/docs/api/functions/inverse.md index 9d93dab9..2ab9b271 100644 --- a/docs/api/functions/inverse.md +++ b/docs/api/functions/inverse.md @@ -1,3 +1,11 @@ +--- +title: Inverse +layout: page +nav_order: 3 +parent: Functions +grandparent: API Reference +--- + ## Inverse **Description:** Inverse of a positive definite rank 2 Tensor (Determinant > 0). Optional Argument: Determinant diff --git a/docs/api/functions/norm.md b/docs/api/functions/norm.md index 39fbbea1..1d93f86c 100644 --- a/docs/api/functions/norm.md +++ b/docs/api/functions/norm.md @@ -1,3 +1,11 @@ +--- +title: Norm +layout: page +nav_order: 3 +parent: Functions +grandparent: 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 ))`. diff --git a/docs/api/functions/permute.md b/docs/api/functions/permute.md index 3a046baf..d1bb5ba4 100644 --- a/docs/api/functions/permute.md +++ b/docs/api/functions/permute.md @@ -1,3 +1,11 @@ +--- +title: Permute +layout: page +nav_order: 3 +parent: Functions +grandparent: 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. diff --git a/docs/api/functions/piola.md b/docs/api/functions/piola.md index 1f3b2ea4..6f3784db 100644 --- a/docs/api/functions/piola.md +++ b/docs/api/functions/piola.md @@ -1,3 +1,11 @@ +--- +title: Piola Transformation +layout: page +nav_order: 3 +parent: Functions +grandparent: 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. diff --git a/docs/api/functions/power.md b/docs/api/functions/power.md index 245ea085..957d412a 100644 --- a/docs/api/functions/power.md +++ b/docs/api/functions/power.md @@ -1,3 +1,11 @@ +--- +title: Power +layout: page +nav_order: 3 +parent: Functions +grandparent: API Reference +--- + ## Power **Description:** Multiply a Tensor i-times by itself. Note that for a given Tensor C: diff --git a/docs/api/functions/rotation.md b/docs/api/functions/rotation.md index 7bb2dd60..50a533ed 100644 --- a/docs/api/functions/rotation.md +++ b/docs/api/functions/rotation.md @@ -1,3 +1,11 @@ +--- +title: Rotation Matrix +layout: page +nav_order: 3 +parent: Functions +grandparent: API Reference +--- + ## Rotation Matrix **Description:** Rotation Matrix with inputs angle in rad and rotation axis. diff --git a/docs/api/functions/squareroot.md b/docs/api/functions/squareroot.md index d94dacb7..a7b98abf 100644 --- a/docs/api/functions/squareroot.md +++ b/docs/api/functions/squareroot.md @@ -1,3 +1,11 @@ +--- +title: Matrix Square Root +layout: page +nav_order: 3 +parent: Functions +grandparent: 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. diff --git a/docs/api/functions/trace.md b/docs/api/functions/trace.md index f87dcbaa..48665398 100644 --- a/docs/api/functions/trace.md +++ b/docs/api/functions/trace.md @@ -1,3 +1,11 @@ +--- +title: Trace +layout: page +nav_order: 3 +parent: Functions +grandparent: API Reference +--- + ## Trace **Description:** Sum of diagonal terms of a rank 2 Tensor. diff --git a/docs/api/functions/transpose.md b/docs/api/functions/transpose.md index f2e9c4e5..7be3d510 100644 --- a/docs/api/functions/transpose.md +++ b/docs/api/functions/transpose.md @@ -1,3 +1,11 @@ +--- +title: Transpose +layout: page +nav_order: 3 +parent: Functions +grandparent: API Reference +--- + ## Transpose **Description:** Transpose of a rank 2 Tensor or major transpose of a rank 4 Tensor. diff --git a/docs/api/functions/unimodular.md b/docs/api/functions/unimodular.md index e84f5a40..254d6dff 100644 --- a/docs/api/functions/unimodular.md +++ b/docs/api/functions/unimodular.md @@ -1,3 +1,11 @@ +--- +title: Unimodular +layout: page +nav_order: 3 +parent: Functions +grandparent: API Reference +--- + ## Unimodular Part of Tensor **Description:** Unimodular Part of a rank 2 Tensor. diff --git a/docs/api/functions/voigtstrain.md b/docs/api/functions/voigtstrain.md index 12436f2b..6dbd364e 100644 --- a/docs/api/functions/voigtstrain.md +++ b/docs/api/functions/voigtstrain.md @@ -1,3 +1,11 @@ +--- +title: Voigtstrain +layout: page +nav_order: 3 +parent: Functions +grandparent: 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. From 2381205016c9cb66e66d80ee236074a8e7c33a2e Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Wed, 27 Sep 2023 00:10:22 +0200 Subject: [PATCH 039/130] Docs: Fix grand_parent header for functions --- 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 | 2 +- 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/power.md | 2 +- docs/api/functions/rotation.md | 2 +- docs/api/functions/squareroot.md | 2 +- docs/api/functions/trace.md | 2 +- docs/api/functions/transpose.md | 2 +- docs/api/functions/unimodular.md | 2 +- docs/api/functions/voigtstrain.md | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/api/functions/asarray.md b/docs/api/functions/asarray.md index 18bd1136..45a5ca55 100644 --- a/docs/api/functions/asarray.md +++ b/docs/api/functions/asarray.md @@ -3,7 +3,7 @@ title: As Array layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## As Array diff --git a/docs/api/functions/astensor.md b/docs/api/functions/astensor.md index 86bb6e8e..40660ab9 100644 --- a/docs/api/functions/astensor.md +++ b/docs/api/functions/astensor.md @@ -3,7 +3,7 @@ title: As Tensor layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## As Tensor diff --git a/docs/api/functions/asvoigt.md b/docs/api/functions/asvoigt.md index a5b53302..31514f95 100644 --- a/docs/api/functions/asvoigt.md +++ b/docs/api/functions/asvoigt.md @@ -3,7 +3,7 @@ title: As Voigt layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## As Voigt diff --git a/docs/api/functions/determinant.md b/docs/api/functions/determinant.md index a97d0cc1..b31e0dae 100644 --- a/docs/api/functions/determinant.md +++ b/docs/api/functions/determinant.md @@ -3,7 +3,7 @@ title: Determinant layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## Determinant diff --git a/docs/api/functions/deviator.md b/docs/api/functions/deviator.md index 3e498267..8cfa1605 100644 --- a/docs/api/functions/deviator.md +++ b/docs/api/functions/deviator.md @@ -3,7 +3,7 @@ title: Deviator layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## Deviator diff --git a/docs/api/functions/identity.md b/docs/api/functions/identity.md index 023f93e8..af5cab7d 100644 --- a/docs/api/functions/identity.md +++ b/docs/api/functions/identity.md @@ -3,7 +3,7 @@ title: Identity layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## Identity diff --git a/docs/api/functions/inverse.md b/docs/api/functions/inverse.md index 2ab9b271..6ff857a6 100644 --- a/docs/api/functions/inverse.md +++ b/docs/api/functions/inverse.md @@ -3,7 +3,7 @@ title: Inverse layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## Inverse diff --git a/docs/api/functions/norm.md b/docs/api/functions/norm.md index 1d93f86c..a75cac34 100644 --- a/docs/api/functions/norm.md +++ b/docs/api/functions/norm.md @@ -3,7 +3,7 @@ title: Norm layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## Norm diff --git a/docs/api/functions/permute.md b/docs/api/functions/permute.md index d1bb5ba4..0cf2a32f 100644 --- a/docs/api/functions/permute.md +++ b/docs/api/functions/permute.md @@ -3,7 +3,7 @@ title: Permute layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## Permute diff --git a/docs/api/functions/piola.md b/docs/api/functions/piola.md index 6f3784db..30f76c2f 100644 --- a/docs/api/functions/piola.md +++ b/docs/api/functions/piola.md @@ -3,7 +3,7 @@ title: Piola Transformation layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## Piola Transformation diff --git a/docs/api/functions/power.md b/docs/api/functions/power.md index 957d412a..ad4f8657 100644 --- a/docs/api/functions/power.md +++ b/docs/api/functions/power.md @@ -3,7 +3,7 @@ title: Power layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## Power diff --git a/docs/api/functions/rotation.md b/docs/api/functions/rotation.md index 50a533ed..abff22ae 100644 --- a/docs/api/functions/rotation.md +++ b/docs/api/functions/rotation.md @@ -3,7 +3,7 @@ title: Rotation Matrix layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## Rotation Matrix diff --git a/docs/api/functions/squareroot.md b/docs/api/functions/squareroot.md index a7b98abf..16ec494f 100644 --- a/docs/api/functions/squareroot.md +++ b/docs/api/functions/squareroot.md @@ -3,7 +3,7 @@ title: Matrix Square Root layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## Square Root diff --git a/docs/api/functions/trace.md b/docs/api/functions/trace.md index 48665398..4f5bf18d 100644 --- a/docs/api/functions/trace.md +++ b/docs/api/functions/trace.md @@ -3,7 +3,7 @@ title: Trace layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## Trace diff --git a/docs/api/functions/transpose.md b/docs/api/functions/transpose.md index 7be3d510..a660061c 100644 --- a/docs/api/functions/transpose.md +++ b/docs/api/functions/transpose.md @@ -3,7 +3,7 @@ title: Transpose layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## Transpose diff --git a/docs/api/functions/unimodular.md b/docs/api/functions/unimodular.md index 254d6dff..ebb8a0d9 100644 --- a/docs/api/functions/unimodular.md +++ b/docs/api/functions/unimodular.md @@ -3,7 +3,7 @@ title: Unimodular layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## Unimodular Part of Tensor diff --git a/docs/api/functions/voigtstrain.md b/docs/api/functions/voigtstrain.md index 6dbd364e..c49fb7c3 100644 --- a/docs/api/functions/voigtstrain.md +++ b/docs/api/functions/voigtstrain.md @@ -3,7 +3,7 @@ title: Voigtstrain layout: page nav_order: 3 parent: Functions -grandparent: API Reference +grand_parent: API Reference --- ## Voigtstrain From f84241ffa4b7740621d169854821fc55868ebef8 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Wed, 27 Sep 2023 00:13:18 +0200 Subject: [PATCH 040/130] Add operators to docs --- docs/api/index.md | 14 +++++++------- .../operators_overview.md => operators.md} | 7 +++++++ 2 files changed, 14 insertions(+), 7 deletions(-) rename docs/api/{operators/operators_overview.md => operators.md} (92%) diff --git a/docs/api/index.md b/docs/api/index.md index a5e84c4a..3c28e8e7 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -23,13 +23,13 @@ All tensors, whether they are "stress"- or "strain"-like are stored with origina - [General behaviour of data type conversion]({% link api/assignments.md %}) ### Operators -- [Dot Product]({% link api/operators/operators_overview.md %}) -- [Double Dot Product]({% link api/operators/operators_overview.md %}) -- [Dyadic Product]({% link api/operators/operators_overview.md %}) -- [Crossed-dyadic Product]({% link api/operators/operators_overview.md %}) -- [Division]({% link api/operators/operators_overview.md %}) -- [Addition]({% link api/operators/operators_overview.md %}) -- [Subtraction]({% link api/operators/operators_overview.md %}) +- [Dot Product]({% link api/operators.md %}) +- [Double Dot Product]({% link api/operators.md %}) +- [Dyadic Product]({% link api/operators.md %}) +- [Crossed-dyadic Product]({% link api/operators.md %}) +- [Division]({% link api/operators.md %}) +- [Addition]({% link api/operators.md %}) +- [Subtraction]({% link api/operators.md %}) ### Scalar-valued functions - [Trace]({% link api/functions/trace.md %}) diff --git a/docs/api/operators/operators_overview.md b/docs/api/operators.md similarity index 92% rename from docs/api/operators/operators_overview.md rename to docs/api/operators.md index 87fd9975..76ae7327 100644 --- a/docs/api/operators/operators_overview.md +++ b/docs/api/operators.md @@ -1,3 +1,10 @@ +--- +title: Operators +layout: page +nav_order: 3 +parent: API Reference +--- + ## Operators Overview This module uses derived data types where the default operators are overloaded with custom functions. Currently there are the following operators available: From 68e90ee127dd2d28dcfc30d1028d78ce082fbcd1 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Wed, 27 Sep 2023 00:15:09 +0200 Subject: [PATCH 041/130] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f968ffdb..3d51e73e 100644 --- a/README.md +++ b/README.md @@ -111,11 +111,11 @@ The isochoric part of the material elasticity tensor `C4_iso` of a nearly-incomp * + tr(C)/3. * (inv(C).dya.inv(C)) ) ``` -### Example of MSC.Marc HYPELA2 +### Example of Marc HYPELA2 -[Here](docs/examples/hypela2_nh_ttb.f) you can find an example of a nearly-incompressible version of a Neo-Hookean material for MSC.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, MSC.Marc, Total Lagrange, Tensor Toolbox +[Download HYPELA2](docs/examples/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 e2346cfb3f3f47d462c095888d13f29885c8e1dc Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Wed, 27 Sep 2023 00:20:08 +0200 Subject: [PATCH 042/130] Re-add Examples to Docs --- docs/{ => examples}/example.md | 9 ++++++++- docs/{ => examples}/example_neohooke.md | 7 +++++++ docs/{ => examples}/example_stvenantkirchhoff.md | 11 +++++++++-- docs/examples/index.md | 6 ++++++ docs/index.md | 4 ++-- 5 files changed, 32 insertions(+), 5 deletions(-) rename docs/{ => examples}/example.md (98%) rename docs/{ => examples}/example_neohooke.md (99%) rename docs/{ => examples}/example_stvenantkirchhoff.md (97%) create mode 100644 docs/examples/index.md diff --git a/docs/example.md b/docs/examples/example.md similarity index 98% rename from docs/example.md rename to docs/examples/example.md index 08ed3160..6a947ba3 100644 --- a/docs/example.md +++ b/docs/examples/example.md @@ -1,6 +1,13 @@ +--- +title: Marc (Neo-Hooke) +layout: page +nav_order: 4 +parent: Examples +--- + ## 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 MSC.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). The helmholtz free energy per unit reference volume is additively split into an isochoric and volumetric contribution. The first one is assumed to be proportional to the first invariant of the isochoric right Cauchy-Green deformation tensor whereas the volumetric part is only a function of the volumetric ratio. diff --git a/docs/example_neohooke.md b/docs/examples/example_neohooke.md similarity index 99% rename from docs/example_neohooke.md rename to docs/examples/example_neohooke.md index 2c88e4a2..976057a1 100644 --- a/docs/example_neohooke.md +++ b/docs/examples/example_neohooke.md @@ -1,3 +1,10 @@ +--- +title: Marc (Neo-Hooke, 2) +layout: page +nav_order: 4 +parent: Examples +--- + ## 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 MSC.Marc). As no special two- or three-field variational principle is used in this example, it is only suitable for elements with reduced integration schemes in cases of nearly-incompressible material behaviour. Otherwise the elements tend to show excessive volumetric locking during deformation and hence, wrong results are calculated. Conventional reduced displacement elements will give good results regarding displacement and convergence for a bulk modulus up to about 50 times the shear modulus. diff --git a/docs/example_stvenantkirchhoff.md b/docs/examples/example_stvenantkirchhoff.md similarity index 97% rename from docs/example_stvenantkirchhoff.md rename to docs/examples/example_stvenantkirchhoff.md index 6c633442..5dde4aa9 100644 --- a/docs/example_stvenantkirchhoff.md +++ b/docs/examples/example_stvenantkirchhoff.md @@ -1,3 +1,10 @@ +--- +title: Marc (Saint Venant-Kirchhoff) +layout: page +nav_order: 4 +parent: Examples +--- + ## Example: St. 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. @@ -12,7 +19,7 @@ and ## 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 MSC.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 for Marc's HYPELA2. Similar headers are provided for Abaqus, ANSYS, etc in the corresponding manuals. ```fortran include 'ttb/ttb_library.f' @@ -138,7 +145,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 MSC.Marc. +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 [1] Bonet, J., Gil, A. J., & Wood, R. D. (2016). Nonlinear Solid Mechanics for Finite Element Analysis: Statics. Cambridge University Press. [![DOI:10.1017/cbo9781316336144](https://zenodo.org/badge/DOI/10.1017/cbo9781316336144.svg)](https://doi.org/10.1017/cbo9781316336144) diff --git a/docs/examples/index.md b/docs/examples/index.md new file mode 100644 index 00000000..b1555166 --- /dev/null +++ b/docs/examples/index.md @@ -0,0 +1,6 @@ +--- +title: Examples +layout: page +nav_order: 4 +has_children: true +--- \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 425dcb5a..c1802ae9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -34,8 +34,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 example_stvenantkirchhoff.md %}) -- Example 2: [Nearly-Incompressible Neo-Hookean Material]({% link example_neohooke.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) ## Author From aa7a5d822ac8bea134c9f59abdc29c088eb71fee Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Wed, 27 Sep 2023 09:21:51 +0200 Subject: [PATCH 043/130] Enhance docs --- docs/api/functions/index.md | 4 +- docs/api/index.md | 15 ++--- docs/api/operators.md | 2 +- docs/api/tensordatatypes.md | 1 + docs/examples/example.md | 105 ------------------------------ docs/examples/example_neohooke.md | 8 +-- 6 files changed, 16 insertions(+), 119 deletions(-) delete mode 100644 docs/examples/example.md diff --git a/docs/api/functions/index.md b/docs/api/functions/index.md index 6c568627..1d0d6f58 100644 --- a/docs/api/functions/index.md +++ b/docs/api/functions/index.md @@ -4,4 +4,6 @@ layout: page nav_order: 3 parent: API Reference has_children: true ---- \ No newline at end of file +--- + +# Functions \ No newline at end of file diff --git a/docs/api/index.md b/docs/api/index.md index 3c28e8e7..8e4ea3c1 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -5,11 +5,10 @@ nav_order: 3 has_children: true --- -## Module Function Overview - +# Module Function Overview This module provides several useful assignments, operators and functions for the derived Tensor Data Types. -### A word on Voigt notation +## A word on Voigt notation Symmetric 3x3 Tensors may be stored as 6x1 column vectors with the help of the well known [Voigt notation](https://en.wikipedia.org/wiki/Voigt_notation). In an analogous way a transformation may be obtained for at least minor symmetric fourth order tensors (3x3x3x3) which may be stored as a 6x6 matrix. If the fourth order tensor is also major symmetric the reduced 6x6 matrix is also symmetric. There is no unique method for the storage ordering of tensor components - this toolbox uses the following approach: @@ -19,10 +18,10 @@ To ensure consistency in calculating the virtual work shear terms are treated di All tensors, whether they are "stress"- or "strain"-like are stored with original (**no doubled**) shear components. Instead all dot- and double-dot-products are modified to take virtual work consistency into account. To be more precise, the function `asvoigt` is not really a Voigt storage - it is more a synonym for storing symmetric tensors as vectors and matrices. The user does have to take care of that storage if the strain in a user subroutine is used as an input for a `Tensor2s` data type and divide all shear components by a factor of `2`. -### Assignments +## Assignments - [General behaviour of data type conversion]({% link api/assignments.md %}) -### Operators +## Operators - [Dot Product]({% link api/operators.md %}) - [Double Dot Product]({% link api/operators.md %}) - [Dyadic Product]({% link api/operators.md %}) @@ -31,12 +30,12 @@ All tensors, whether they are "stress"- or "strain"-like are stored with origina - [Addition]({% link api/operators.md %}) - [Subtraction]({% link api/operators.md %}) -### Scalar-valued functions +## Scalar-valued functions - [Trace]({% link api/functions/trace.md %}) - [Determinant]({% link api/functions/determinant.md %}) - [Norm]({% link api/functions/norm.md %}) -### Tensor-valued functions +## Tensor-valued functions - [Deviator]({% link api/functions/deviator.md %}) - [Unimodular]({% link api/functions/unimodular.md %}) - [Inverse]({% link api/functions/inverse.md %}) @@ -48,7 +47,7 @@ All tensors, whether they are "stress"- or "strain"-like are stored with origina - [Piola Operation]({% link api/functions/piola.md %}) - [Rotation Matrix]({% link api/functions/rotation.md %}) -### Helper Functions +## Helper Functions - [As Array]({% link api/functions/asarray.md %}) - [As Abaqus Array]({% link api/functions/asabqarray.md %}) - [As Voigt]({% link api/functions/asvoigt.md %}) diff --git a/docs/api/operators.md b/docs/api/operators.md index 76ae7327..6e24960c 100644 --- a/docs/api/operators.md +++ b/docs/api/operators.md @@ -16,6 +16,6 @@ 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` - Dyadic Product `A.dya.B` -- Symmetric Crossed-dyadic Product `A.cdya.B` to perform `C(i,j,k,l) = 1/4 * (A(i,k) B(j,l) + A(i,l) B(j,k) + B(i,k) A(j,l) + B(i,l) A(j,k))` +- 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. diff --git a/docs/api/tensordatatypes.md b/docs/api/tensordatatypes.md index 083cc61a..d52faeef 100644 --- a/docs/api/tensordatatypes.md +++ b/docs/api/tensordatatypes.md @@ -5,6 +5,7 @@ nav_order: 3 parent: API Reference --- +# Tensor Data Types There are several Tensor Data Types available inside this module: - `Tensor 1` rank 1 Tensor (Vector) diff --git a/docs/examples/example.md b/docs/examples/example.md deleted file mode 100644 index 6a947ba3..00000000 --- a/docs/examples/example.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -title: Marc (Neo-Hooke) -layout: page -nav_order: 4 -parent: Examples ---- - -## 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). - -The helmholtz free energy per unit reference volume is additively split into an isochoric and volumetric contribution. The first one is assumed to be proportional to the first invariant of the isochoric right Cauchy-Green deformation tensor whereas the volumetric part is only a function of the volumetric ratio. - - - - - -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: - - - - - -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: - - - - - -with the fourth order identity tensor - - - - - -The two equations are now implemented in a Total Lagrange user subroutine with the help of this Tensor module as follows: - -```fortran - include 'ttb/ttb_library.f' - - subroutine hypela2(d,g,e,de,s,t,dt,ngens,m,nn,kcus,matus,ndi, - 2 nshear,disp,dispt,coord,ffn,frotn,strechn,eigvn,ffn1, - 3 frotn1,strechn1,eigvn1,ncrd,itel,ndeg,ndm, - 4 nnode,jtype,lclass,ifr,ifu) - - ! HYPELA2: Nearly-Incompressible Neo-Hookean Material - ! Example for usage of Tensor Toolbox - ! capability: axisymmetric and 3D analysis - ! Formulation: Total Lagrange - ! Voigt Notation: change commented Tensor Datatypes - ! Andreas Dutzler, 2018-01-02, Graz University of Technology - - use Tensor - implicit none - - integer :: ifr,ifu,itel,jtype,ncrd,ndeg,ndi,ndm,ngens, - * nn,nnode,nshear - integer, dimension(2) :: m,matus,kcus,lclass - real(kind=8), dimension(*) :: e,de,t,dt,g,s - real(kind=8), dimension(itel) :: strechn,strechn1 - real(kind=8), dimension(ngens,*) :: d - real(kind=8), dimension(ncrd,*) :: coord - real(kind=8), dimension(ndeg,*) :: disp, dispt - real(kind=8), dimension(itel,3) :: ffn,ffn1,frotn,frotn1 - real(kind=8), dimension(itel,*) :: eigvn,eigvn1 - - type(Tensor2) :: F1 - real(kind=8) :: J,kappa,C10 - - ! to use voigt notation change to type Tensor2s, Tensor4s - type(Tensor2) :: C1,invC1,S1,Eye - type(Tensor4) :: C4 - - ! material parameters - C10 = 0.5 - kappa = 500.0 - - Eye = identity2(Eye) - F1 = ffn1(1:3,1:3) ! use slices (ffn1 is an assumed size array) - J = det(F1) - - ! right cauchy-green deformation tensor and it's inverse - C1 = transpose(F1)*F1 - invC1 = inv(C1) ! faster method: invC1 = inv(C1,J**2) - - ! pk2 stress - S1 = 2.*C10*J**(-2./3.)*dev(C1)*invC1 + kappa*(J-1)*J*invC1 - - ! 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) - - ! output as array - s(1:ngens) = asarray( voigt(S1), ngens ) - d(1:ngens,1:ngens) = asarray( voigt(C4), ngens, ngens ) - - return - 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). diff --git a/docs/examples/example_neohooke.md b/docs/examples/example_neohooke.md index 976057a1..b6030699 100644 --- a/docs/examples/example_neohooke.md +++ b/docs/examples/example_neohooke.md @@ -1,5 +1,5 @@ --- -title: Marc (Neo-Hooke, 2) +title: Marc (Neo-Hooke) layout: page nav_order: 4 parent: Examples @@ -7,11 +7,11 @@ parent: Examples ## 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 MSC.Marc). As no special two- or three-field variational principle is used in this example, it is only suitable for elements with reduced integration schemes in cases of nearly-incompressible material behaviour. Otherwise the elements tend to show excessive volumetric locking during deformation and hence, wrong results are calculated. Conventional reduced displacement elements will give good results regarding displacement and convergence for a bulk modulus up to about 50 times the shear modulus. +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 helmholtz free energy per unit reference volume is additively split into an isochoric and volumetric contribution. The first one is assumed to be proportional to the first invariant of the isochoric right Cauchy-Green deformation tensor whereas the volumetric part is only a function of the volumetric ratio. +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) $$ From 1d36cc2dde8c91e021e18c7c92e01981ba412ad0 Mon Sep 17 00:00:00 2001 From: Andreas Dutzler Date: Wed, 27 Sep 2023 10:01:12 +0200 Subject: [PATCH 044/130] Enhance the docs, add Katex --- docs/_config.yml | 4 ++- docs/_includes/head_custom.html | 6 ++++ docs/_includes/katex.html | 27 ++++++++++++++++++ docs/_layouts/katex.html | 12 ++++++++ docs/{ => assets}/images/deformation.png | Bin docs/{ => assets}/images/deformation.svg | 0 docs/{ => assets}/images/logo.png | Bin docs/{ => assets}/images/logo.svg | 0 docs/assets/js/mathtex-script-type.js | 34 +++++++++++++++++++++++ docs/index.md | 2 +- 10 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 docs/_includes/head_custom.html create mode 100644 docs/_includes/katex.html create mode 100644 docs/_layouts/katex.html rename docs/{ => assets}/images/deformation.png (100%) rename docs/{ => assets}/images/deformation.svg (100%) rename docs/{ => assets}/images/logo.png (100%) rename docs/{ => assets}/images/logo.svg (100%) create mode 100644 docs/assets/js/mathtex-script-type.js diff --git a/docs/_config.yml b/docs/_config.yml index 06334687..d8662528 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -3,7 +3,9 @@ description: Tensor Toolbox for Modern Fortran theme: just-the-docs url: https://adtzlr.github.io/ttb -logo: "/images/logo.png" +logo: "assets/images/logo.svg" + +math: katex aux_links: Tensor Toolbox on GitHub: https://github.com/adtzlr/ttb \ No newline at end of file diff --git a/docs/_includes/head_custom.html b/docs/_includes/head_custom.html new file mode 100644 index 00000000..1eace006 --- /dev/null +++ b/docs/_includes/head_custom.html @@ -0,0 +1,6 @@ +{% assign math = page.math | default: layout.math | default: site.math %} + +{% case math %} + {% when "katex" %} + {% include katex.html %} +{% endcase %} \ No newline at end of file diff --git a/docs/_includes/katex.html b/docs/_includes/katex.html new file mode 100644 index 00000000..d73e629c --- /dev/null +++ b/docs/_includes/katex.html @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_layouts/katex.html b/docs/_layouts/katex.html new file mode 100644 index 00000000..ce760bfb --- /dev/null +++ b/docs/_layouts/katex.html @@ -0,0 +1,12 @@ +--- +layout: default +math: katex +--- +
+ \( + + \) +
+ +{{ 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 -![Tensor Toolbox for Modern Fortran](images/deformation.png) +![Tensor Toolbox for Modern Fortran](assets/images/deformation.png) ## 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. [![DOI:10.1017/cbo9781316336144](https://zenodo.org/badge/DOI/10.1017/cbo9781316336144.svg)](https://doi.org/10.1017/cbo9781316336144) [2] Holland, M. (2018, May 7). Mholla/Hitchhikers-Guide-To-Abaqus: Initial Release (Version v1.0). Zenodo. [![DOI:10.5281/zenodo.1243270](https://zenodo.org/badge/DOI/10.5281/zenodo.1243270.svg)](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. [![DOI:10.1017/cbo9781316336144](https://zenodo.org/badge/DOI/10.1017/cbo9781316336144.svg)](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. [![DOI:10.1017/cbo9781316336144](https://zenodo.org/badge/DOI/10.1017/cbo9781316336144.svg)](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 ![deformation](https://github.com/adtzlr/ttb/assets/5793153/14f0f4f3-2b17-4253-ad06-c279a5d75193) -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 [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4077378.svg)](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 [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4077378.svg)](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. [![DOI:10.1017/cbo9781316336144](https://zenodo.org/badge/DOI/10.1017/cbo9781316336144.svg)](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()`.