Skip to content

Commit

Permalink
Merge pull request #57 from M3Group/devel
Browse files Browse the repository at this point in the history
For JOSS paper
  • Loading branch information
yangbai90 committed Feb 16, 2022
2 parents 2a55333 + 9d6ba2d commit 35198d5
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 3 deletions.
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
```
Expand All @@ -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:
Expand All @@ -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/)

Expand All @@ -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:[email protected]) or join the QQ group for more discussion .
```
QQ group: 879908352
Expand Down
55 changes: 55 additions & 0 deletions paper.bib
Original file line number Diff line number Diff line change
@@ -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}
}
56 changes: 56 additions & 0 deletions paper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
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^[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 #
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
index: 1
- 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

# 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;@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], 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

0 comments on commit 35198d5

Please sign in to comment.