From 380959e3b96ff28e44ddd57abe332094f891aa02 Mon Sep 17 00:00:00 2001 From: yangbai90 Date: Wed, 16 Feb 2022 21:30:18 +0100 Subject: [PATCH 1/5] update README --- README.md | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7be65a54..92907243 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4603558.svg?style=flat-square)](https://doi.org/10.5281/zenodo.4603557) # AsFem + A **simple** finite element method program, which is short for **AsFem**. AsFem is written in C++ and designed for phase-field modeling and multiphysics coupling. The [PETSc](https://www.mcs.anl.gov/petsc/) library is involved in AsFem for the efficient computing. For '**simple**', we try to make the finite element programming and modeling, as simple as possible. # Download + ``` git clone https://github.com/M3Group/AsFem.git ``` @@ -17,7 +19,8 @@ git clone https://gitee.com/m3group/AsFem.git ``` -## Installation +# Installation + The installation details of AsFem can be found here [AsFem-Installation](https://m3group.github.io/AsFem/install/) . After you've installed your PETSc (PETSC_DIR) and MPI (MPI_DIR), all you have to do is: @@ -33,17 +36,21 @@ spinodal-decomposition | double-notch failure :-------------------------:|:-------------------------: ![](figures/CahnHilliard.gif) | ![](figures/DoubleNotch.gif) -# Tutorial +# Tutorial & examples The tutorial is avialable here https://m3group.github.io/AsFem/Tutorial/step-0/ For Chinese users, the video lecture is available on bilibili, please see [AsFem-Lecture](https://space.bilibili.com/100272198/channel/detail?cid=193605). +Currently, one can find the tested input files in both the `AsFem/examples` folder as well as `AsFem/test_input` folder. For a better understanding of how to use AsFem, please take a look at these input files first. + # Document The code is documented by the [Doxygen](https://www.doxygen.nl/index.html) package, one can generate the pdf file or html files via: ``` doxygen ``` +More documents and details can be found in AsFem's [homepage](https://m3group.github.io/AsFem/). + # Author [Yang Bai](https://yangbai90.github.io/) @@ -63,7 +70,20 @@ doxygen } ``` -# Discussion & bug report +# Contribute + +If you discover bugs in the `AsFem` package, please create an issue at the project repository on GitHub at https://github.com/M3Group/AsFem. + +If you find the AsFem package useful, we welcome your code and documentation contributions. To contribute, fork the repository on GitHub, and submit a pull request at https://github.com/M3Group/AsFem. + + +# Contact + +Submit bug reports and feature requests on the [repository issue tracker](https://github.com/M3Group/AsFem/issues). + + +# Discussion + If you are interested in AsFem or have any questions, just feel free to send me an email [Mail2Me](mailto:yangbai90@outlook.com) or join the QQ group for more discussion . ``` QQ group: 879908352 From fc8c86b757117acc825bc45c34e339e0c7868e66 Mon Sep 17 00:00:00 2001 From: yangbai90 Date: Wed, 16 Feb 2022 21:30:54 +0100 Subject: [PATCH 2/5] add paper --- paper.bib | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ paper.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 paper.bib create mode 100644 paper.md diff --git a/paper.bib b/paper.bib new file mode 100644 index 00000000..2204d9d9 --- /dev/null +++ b/paper.bib @@ -0,0 +1,55 @@ +@misc{petsc-web-page, + author = {Satish Balay and Shrirang Abhyankar and Mark~F. Adams and Steven Benson and Jed Brown + and Peter Brune and Kris Buschelman and Emil~M. Constantinescu and Lisandro Dalcin and Alp Dener + and Victor Eijkhout and William~D. Gropp and V\'{a}clav Hapla and Tobin Isaac and Pierre Jolivet + and Dmitry Karpeev and Dinesh Kaushik and Matthew~G. Knepley and Fande Kong and Scott Kruger + and Dave~A. May and Lois Curfman McInnes and Richard Tran Mills and Lawrence Mitchell and Todd Munson + and Jose~E. Roman and Karl Rupp and Patrick Sanan and Jason Sarich and Barry~F. Smith + and Stefano Zampini and Hong Zhang and Hong Zhang and Junchao Zhang}, + title = {{PETS}c {W}eb page}, + url = {https://petsc.org/}, + howpublished = {\url{https://petsc.org/}}, + year = {2021}, +} + +@article{bai2021chemo, + title={A chemo-mechanical damage model at large deformation: numerical and experimental studies on polycrystalline energy materials}, + author={Bai, Yang and Santos, David A and Rezaei, Shahed and Stein, Peter and Banerjee, Sarbajit and Xu, Bai-Xiang}, + journal={International Journal of Solids and Structures}, + volume={228}, + pages={111099}, + year={2021}, + publisher={Elsevier} +} + +@article{bai2020chemo, + title={A chemo-mechanical grain boundary model and its application to understand the damage of Li-ion battery materials}, + author={Bai, Yang and Zhao, Kejie and Liu, Yao and Stein, Peter and Xu, Bai-Xiang}, + journal={Scripta Materialia}, + volume={183}, + pages={45--49}, + year={2020}, + publisher={Elsevier} +} + +@article{miehe2010phase, + title={A phase field model for rate-independent crack propagation: Robust algorithmic implementation based on operator splits}, + author={Miehe, Christian and Hofacker, Martina and Welschinger, Fabian}, + journal={Computer Methods in Applied Mechanics and Engineering}, + volume={199}, + number={45-48}, + pages={2765--2778}, + year={2010}, + publisher={Elsevier} +} + +@article{kobayashi1993modeling, + title={Modeling and numerical simulations of dendritic crystal growth}, + author={Kobayashi, Ryo}, + journal={Physica D: Nonlinear Phenomena}, + volume={63}, + number={3-4}, + pages={410--423}, + year={1993}, + publisher={Elsevier} +} \ No newline at end of file diff --git a/paper.md b/paper.md new file mode 100644 index 00000000..57a33487 --- /dev/null +++ b/paper.md @@ -0,0 +1,54 @@ +--- +title: 'AsFem: A simple to use finite element package for phase-field modeling and multiphysics simulation' +tags: + - c++ + - phase-field + - finite element method + - simulation + - solid mechanics + - computational materials +authors: + - name: Yang Bai^[co-first author] # note this makes a footnote saying 'co-first author' + orcid: 0000-0003-1946-4377 + affiliation: "1" # (Multiple affiliations must be quoted) + - name: Yunxia Li^[co-first author] # + affiliation: "2" +affiliations: + - name: Department of Microstructure Physics and Alloy Design, Max-Planck-Institut f\"ur Eisenforschung GmbH, Max-Planck-Strasse 1, 40237 D\"usseldorf, Germany + index: 1 + - name: Faculty of Arts and Humanities, University of Cologne, D\"urener Strasse 56–60, 50931 K\"oln, Germany + index: 2 +date: 16 February 2022 +bibliography: paper.bib + +# Optional fields if submitting to a AAS journal too, see this blog post: +# https://blog.joss.theoj.org/2018/12/a-new-collaboration-with-aas-publishing +#aas-doi: 10.3847/xxxxx <- update this with the DOI from AAS once you know it. +#aas-journal: Astrophysical Journal <- The name of the AAS journal. +--- + +# Summary + +The kinetics of multiphysics are naturally involved in the application of energy materials, such as lithium-ion batteries (LIBs) for example. Multiphysics modeling plays a crucial role in understanding the interactions between fields in these applications, such as the chemo-mechanical interaction in LIBs `[@bai2021chemo:2021,@bai2020chemo:2021]`. The field of "multiphysics" or the "chemo-mechanics", aims to model the multiphysical problem in material science, for example, the diffusion of species, the phase transformation, and the large deformation under different fields. The major challenge of these models requires efficient numerical tools, easy-to-use parallelization, as well as a simple way to define the physical model. For this purpose, `AsFem`, a simple to use finite element method (FEM) simulation package for phase-field modeling and multiphysics coupling has been developed. + + +# Statement of need + +`AsFem` is an open-source c++ package powered by the high-performance scientific computing library PETSc `[@petsc-web-page]`. By using C++, `AsFem` implement the object-oriented design for the finite element calculation without losing the flexibility and ease-of-use in parallelization. Due to the complexity of the finite element simulation procedure, it is important to simplify the model definition as well as the pre/post-processes. For this purpose, `AsFem` is intended to offer users the easy-to-use mathematic operators, i.e. the Laplacian operator and the inner product for vectors, as well as the tensor calculation (both the second-order tensor and fourth-order tensor) operators and functions to simplify the model definition. Furthermore, `AsFem` offers the user-defined-element (UEL) and user-defined-material (UMAT) to further minimize complexity, where all calculations are centered on the integration point (gauss point). Therefore, there is no need to write the nodal loop or the elemental loop for their calculation, which is still a standard procedure in other packages. Furthermore, instead of re-writting the code, users can easily swap their model from 2D to 3D by simply changing the mesh in the input file. + +Currently, `AsFem` has implemented the phase-field fracture model for brittle materials `[@miehe2010phase]`, mechanically coupled spinodal decomposition `[@bai2021chemo:2021]`, the dendrite growth model `[@kobayashi1993modeling]`, J2 plasticity model, as well as the chemo-mechanical phase-field fracture model, and more. Besides that, users can easily implement their own model by either combing the built-in models or using the UEL/UMAT system. In such a way, `AsFem` will enable the easy and rapid development of the physical model for FEM simulation. + +Part of `AsFem` features are list below: +- user-defined boundary condition (ubc) +- user-defined initial condition (uic) +- user-defined element (UEL) +- user-defined material (UMAT) +- built-in 1st order and 2nd mesh generation for 1D, 2D, and 3D regular domain +- external mesh import, i.e., gmsh, netgen +- built-in postprocess +- vtu file output for results +- etc + + + +# References From 60eb1a258a78bd5915966eee1d3f97f7abee7e97 Mon Sep 17 00:00:00 2001 From: yangbai90 Date: Wed, 16 Feb 2022 21:37:29 +0100 Subject: [PATCH 3/5] Update paper.md --- paper.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/paper.md b/paper.md index 57a33487..19d06fcd 100644 --- a/paper.md +++ b/paper.md @@ -8,15 +8,15 @@ tags: - solid mechanics - computational materials authors: - - name: Yang Bai^[co-first author] # note this makes a footnote saying 'co-first author' + - name: Yang Bai^[corresponding author] # note this makes a footnote saying 'co-first author' orcid: 0000-0003-1946-4377 affiliation: "1" # (Multiple affiliations must be quoted) - - name: Yunxia Li^[co-first author] # + - name: Yunxia Li^[] # affiliation: "2" affiliations: - - name: Department of Microstructure Physics and Alloy Design, Max-Planck-Institut f\"ur Eisenforschung GmbH, Max-Planck-Strasse 1, 40237 D\"usseldorf, Germany + - name: Department of Microstructure Physics and Alloy Design, Max-Planck-Institut für Eisenforschung GmbH, Max-Planck-Strasse 1, 40237 Düsseldorf, Germany index: 1 - - name: Faculty of Arts and Humanities, University of Cologne, D\"urener Strasse 56–60, 50931 K\"oln, Germany + - name: Faculty of Arts and Humanities, University of Cologne, Dürener Straße 56–60, 50931 Köln, Germany index: 2 date: 16 February 2022 bibliography: paper.bib @@ -29,16 +29,17 @@ bibliography: paper.bib # Summary -The kinetics of multiphysics are naturally involved in the application of energy materials, such as lithium-ion batteries (LIBs) for example. Multiphysics modeling plays a crucial role in understanding the interactions between fields in these applications, such as the chemo-mechanical interaction in LIBs `[@bai2021chemo:2021,@bai2020chemo:2021]`. The field of "multiphysics" or the "chemo-mechanics", aims to model the multiphysical problem in material science, for example, the diffusion of species, the phase transformation, and the large deformation under different fields. The major challenge of these models requires efficient numerical tools, easy-to-use parallelization, as well as a simple way to define the physical model. For this purpose, `AsFem`, a simple to use finite element method (FEM) simulation package for phase-field modeling and multiphysics coupling has been developed. +The kinetics of multiphysics are naturally involved in the application of energy materials, such as lithium-ion batteries (LIBs) for example. Multiphysics modeling plays a crucial role in understanding the interactions between fields in these applications, such as the chemo-mechanical interaction in LIBs [@bai2021chemo:2021,@bai2020chemo:2021]. The field of "multiphysics" or the "chemo-mechanics", aims to model the multiphysical problem in material science, for example, the diffusion of species, the phase transformation, and the large deformation under different fields. The major challenge of these models requires efficient numerical tools, easy-to-use parallelization, as well as a simple way to define the physical model. For this purpose, `AsFem`, a simple to use finite element method (FEM) simulation package for phase-field modeling and multiphysics coupling has been developed. # Statement of need -`AsFem` is an open-source c++ package powered by the high-performance scientific computing library PETSc `[@petsc-web-page]`. By using C++, `AsFem` implement the object-oriented design for the finite element calculation without losing the flexibility and ease-of-use in parallelization. Due to the complexity of the finite element simulation procedure, it is important to simplify the model definition as well as the pre/post-processes. For this purpose, `AsFem` is intended to offer users the easy-to-use mathematic operators, i.e. the Laplacian operator and the inner product for vectors, as well as the tensor calculation (both the second-order tensor and fourth-order tensor) operators and functions to simplify the model definition. Furthermore, `AsFem` offers the user-defined-element (UEL) and user-defined-material (UMAT) to further minimize complexity, where all calculations are centered on the integration point (gauss point). Therefore, there is no need to write the nodal loop or the elemental loop for their calculation, which is still a standard procedure in other packages. Furthermore, instead of re-writting the code, users can easily swap their model from 2D to 3D by simply changing the mesh in the input file. +`AsFem` is an open-source c++ package powered by the high-performance scientific computing library PETSc [@petsc-web-page]. By using C++, `AsFem` implement the object-oriented design for the finite element calculation without losing the flexibility and ease-of-use in parallelization. Due to the complexity of the finite element simulation procedure, it is important to simplify the model definition as well as the pre/post-processes. For this purpose, `AsFem` is intended to offer users the easy-to-use mathematic operators, i.e. the Laplacian operator and the inner product for vectors, as well as the tensor calculation (both the second-order tensor and fourth-order tensor) operators and functions to simplify the model definition. Furthermore, `AsFem` offers the user-defined-element (UEL) and user-defined-material (UMAT) to further minimize complexity, where all calculations are centered on the integration point (gauss point). Therefore, there is no need to write the nodal loop or the elemental loop for their calculation, which is still a standard procedure in other packages. Furthermore, instead of re-writting the code, users can easily swap their model from 2D to 3D by simply changing the mesh in the input file. -Currently, `AsFem` has implemented the phase-field fracture model for brittle materials `[@miehe2010phase]`, mechanically coupled spinodal decomposition `[@bai2021chemo:2021]`, the dendrite growth model `[@kobayashi1993modeling]`, J2 plasticity model, as well as the chemo-mechanical phase-field fracture model, and more. Besides that, users can easily implement their own model by either combing the built-in models or using the UEL/UMAT system. In such a way, `AsFem` will enable the easy and rapid development of the physical model for FEM simulation. +Currently, `AsFem` has implemented the phase-field fracture model for brittle materials [@miehe2010phase], mechanically coupled spinodal decomposition [@bai2021chemo:2021], the dendrite growth model [@kobayashi1993modeling], J2 plasticity model, as well as the chemo-mechanical phase-field fracture model, and more. Besides that, users can easily implement their own model by either combing the built-in models or using the UEL/UMAT system. In such a way, `AsFem` will enable the easy and rapid development of the physical model for FEM simulation. Part of `AsFem` features are list below: + - user-defined boundary condition (ubc) - user-defined initial condition (uic) - user-defined element (UEL) From 0e9034bed065ed94c9ba1390118d4b790f894539 Mon Sep 17 00:00:00 2001 From: yangbai90 Date: Wed, 16 Feb 2022 21:40:44 +0100 Subject: [PATCH 4/5] Update paper.md --- paper.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/paper.md b/paper.md index 19d06fcd..3e5d336a 100644 --- a/paper.md +++ b/paper.md @@ -11,7 +11,7 @@ authors: - name: Yang Bai^[corresponding author] # note this makes a footnote saying 'co-first author' orcid: 0000-0003-1946-4377 affiliation: "1" # (Multiple affiliations must be quoted) - - name: Yunxia Li^[] # + - name: Yunxia Li # affiliation: "2" affiliations: - name: Department of Microstructure Physics and Alloy Design, Max-Planck-Institut für Eisenforschung GmbH, Max-Planck-Strasse 1, 40237 Düsseldorf, Germany @@ -29,14 +29,15 @@ bibliography: paper.bib # Summary -The kinetics of multiphysics are naturally involved in the application of energy materials, such as lithium-ion batteries (LIBs) for example. Multiphysics modeling plays a crucial role in understanding the interactions between fields in these applications, such as the chemo-mechanical interaction in LIBs [@bai2021chemo:2021,@bai2020chemo:2021]. The field of "multiphysics" or the "chemo-mechanics", aims to model the multiphysical problem in material science, for example, the diffusion of species, the phase transformation, and the large deformation under different fields. The major challenge of these models requires efficient numerical tools, easy-to-use parallelization, as well as a simple way to define the physical model. For this purpose, `AsFem`, a simple to use finite element method (FEM) simulation package for phase-field modeling and multiphysics coupling has been developed. +The kinetics of multiphysics are naturally involved in the application of energy materials, such as lithium-ion batteries (LIBs) for example. Multiphysics modeling plays a crucial role in understanding the interactions between fields in these applications, such as the chemo-mechanical interaction in LIBs [@bai2021chemo,@bai2020chemo]. The field of "multiphysics" or the "chemo-mechanics", aims to model the multiphysical problem in material science, for example, the diffusion of species, the phase transformation, and the large deformation under different fields. The major challenge of these models requires efficient numerical tools, easy-to-use parallelization, as well as a simple way to define the physical model. For this purpose, `AsFem`, a simple to use finite element method (FEM) simulation package for phase-field modeling and multiphysics coupling has been developed. # Statement of need `AsFem` is an open-source c++ package powered by the high-performance scientific computing library PETSc [@petsc-web-page]. By using C++, `AsFem` implement the object-oriented design for the finite element calculation without losing the flexibility and ease-of-use in parallelization. Due to the complexity of the finite element simulation procedure, it is important to simplify the model definition as well as the pre/post-processes. For this purpose, `AsFem` is intended to offer users the easy-to-use mathematic operators, i.e. the Laplacian operator and the inner product for vectors, as well as the tensor calculation (both the second-order tensor and fourth-order tensor) operators and functions to simplify the model definition. Furthermore, `AsFem` offers the user-defined-element (UEL) and user-defined-material (UMAT) to further minimize complexity, where all calculations are centered on the integration point (gauss point). Therefore, there is no need to write the nodal loop or the elemental loop for their calculation, which is still a standard procedure in other packages. Furthermore, instead of re-writting the code, users can easily swap their model from 2D to 3D by simply changing the mesh in the input file. -Currently, `AsFem` has implemented the phase-field fracture model for brittle materials [@miehe2010phase], mechanically coupled spinodal decomposition [@bai2021chemo:2021], the dendrite growth model [@kobayashi1993modeling], J2 plasticity model, as well as the chemo-mechanical phase-field fracture model, and more. Besides that, users can easily implement their own model by either combing the built-in models or using the UEL/UMAT system. In such a way, `AsFem` will enable the easy and rapid development of the physical model for FEM simulation. +Currently, `AsFem` has implemented the phase-field fracture model for brittle materials [@miehe2010phase], mechanically coupled spinodal decomposition [@bai2021chemo], the dendrite growth model [@kobayashi1993modeling], J2 plasticity model, as well as the chemo-mechanical phase-field fracture model, and more. Besides that, users can easily implement their own model by either combing the built-in models or using the UEL/UMAT system. In such a way, `AsFem` will enable the easy and rapid development of the physical model for FEM simulation. + Part of `AsFem` features are list below: From 9d6ba2d5b336bb0ed9b52027ce4c93638808be51 Mon Sep 17 00:00:00 2001 From: yangbai90 Date: Wed, 16 Feb 2022 21:42:30 +0100 Subject: [PATCH 5/5] Update paper.md --- paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper.md b/paper.md index 3e5d336a..fbe0ec90 100644 --- a/paper.md +++ b/paper.md @@ -29,7 +29,7 @@ bibliography: paper.bib # Summary -The kinetics of multiphysics are naturally involved in the application of energy materials, such as lithium-ion batteries (LIBs) for example. Multiphysics modeling plays a crucial role in understanding the interactions between fields in these applications, such as the chemo-mechanical interaction in LIBs [@bai2021chemo,@bai2020chemo]. The field of "multiphysics" or the "chemo-mechanics", aims to model the multiphysical problem in material science, for example, the diffusion of species, the phase transformation, and the large deformation under different fields. The major challenge of these models requires efficient numerical tools, easy-to-use parallelization, as well as a simple way to define the physical model. For this purpose, `AsFem`, a simple to use finite element method (FEM) simulation package for phase-field modeling and multiphysics coupling has been developed. +The kinetics of multiphysics are naturally involved in the application of energy materials, such as lithium-ion batteries (LIBs) for example. Multiphysics modeling plays a crucial role in understanding the interactions between fields in these applications, such as the chemo-mechanical interaction in LIBs [@bai2021chemo;@bai2020chemo]. The field of "multiphysics" or the "chemo-mechanics", aims to model the multiphysical problem in material science, for example, the diffusion of species, the phase transformation, and the large deformation under different fields. The major challenge of these models requires efficient numerical tools, easy-to-use parallelization, as well as a simple way to define the physical model. For this purpose, `AsFem`, a simple to use finite element method (FEM) simulation package for phase-field modeling and multiphysics coupling has been developed. # Statement of need