Skip to content

Commit

Permalink
Update to the paper
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushaggarwal committed Aug 26, 2024
1 parent ab816e8 commit 4642165
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
10 changes: 10 additions & 0 deletions joss-paper/paper.bib
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,14 @@ @article{AGGARWAL2023105657
issn = {1751-6161},
doi = {10.1016/j.jmbbm.2023.105657},
author={Aggarwal, Ankush and Hudson, Luke T and Laurence, Devin W and Lee, Chung-Hao and Pant, Sanjay}
}

@bookchapter{AGGARWAL2024,
title = {Heterogeneity and multi-scale modeling in vascular biomechanics},
booktitle = {Integration and Bridging of Multiscale Bioengineering Designs and Tissue Biomechanics},
publisher = {Springer},
year = {2024},
author={Aggarwal, Ankush and Coccarelli, Alberto and McGinty, Sean},
editor={Liao, Jun and Wong, Joyce Y},
note={in press}
}
32 changes: 28 additions & 4 deletions joss-paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,41 @@ While several finite element analysis packages are available for performing biom

# Structure

The package is implemented in Python using an object-oriented structure. The package builds up on widely-used Python libraries: NumPy, SciPy, Pandas, Matplotlib, and PyTorch. `pyMechT` consists of four main modules (see Figure \ref{fig:overview}): 1) MatModel for easily defining (new) material models, 2) SampleExperiment for simulating ex-vivo uniaxial/biaxial/inflation-extension experim-ents, 3) ParamFitter for performing parameter estimation based on experimental data, and 4) MCMC/RandomParameters for performing Bayesian inference using Monte Carlo (MC) or Markov Chain Monte Carlo (MCMC) simulations.
The package is implemented in Python using an object-oriented structure. The package builds up on widely-used Python libraries: NumPy, SciPy, Pandas, Matplotlib, and PyTorch. `pyMechT` consists of four main modules (see Figure \ref{fig:overview}): 1) `MatModel` for easily defining (new) material models, 2) `SampleExperiment` for simulating ex-vivo uniaxial/biaxial/inflation-extension experim-ents, 3) `ParamFitter` for performing parameter estimation based on experimental data, and 4) `MCMC`/`RandomParameters` for performing Bayesian inference using Monte Carlo (MC) or Markov Chain Monte Carlo (MCMC) simulations. Currently, there are eighteen material models implemented in `MatModel`, including fourteen analytical hyperelastic models, two data-based hyperelastic models, one structural model, and one arbitrary hyperelastic model (equivalent to `UMAT` in Abaqus).

![Structure of `pyMechT` \label{fig:overview}](../docs/source/drawing-1.svg)

A particular focus is on parameters, for which a custom dictionary has been implemented named ParamDict. This dictionary facilitates handling large number of parameters via string-based identifiers, and stores lower/upper bounds, fixed/variable flags, in addition to the current parameter values. The dictionary can also be saved/read as csv files.
A particular focus is on parameters, for which a custom dictionary has been implemented named ParamDict. This dictionary facilitates handling large number of parameters via string-based identifiers, and stores lower/upper bounds, fixed/variable flags, in addition to the current parameter values. The dictionary can also be saved/read as csv files. An example set of parameters is shown below.


| Keys | Value | Fixed? | Lower bound | Upper bound |
| :---------------: | :---------:| :---------:| :---------: | :---------: |
| mu_0 | 100 | No | 0.01 | 500 |
| L10 | 0.3 | No | 0.1 | 0.5 |
| L20 | 1.0 | No | 0.1 | 2.0 |
| thick | 0.05 | Yes | - | - |
| phi | 50 | No | 0 | 90 |



# Documentation and examples
Detailed documentation has been created and is hosted on [`readthedocs`](https://pymecht.readthedocs.io/en/latest/index.html). The documentation starts with an overview of the package, and leads to a basic tutorial that quickly demonstrates all of the basic features. Moreover, eleven examples have been provided to illustrate all the features and options available in `pyMechT`. These include the unique features of modeling layered structures with different reference dimensions, which is commonly encountered in biological soft tissues. Simulating such a model with any finite element software would be non-trivial. Then, theoretical background of the implemented models is provided, before ending with a package reference automatically generated using `Sphinx`.
Detailed documentation has been created and is hosted on [`readthedocs`](https://pymecht.readthedocs.io/en/latest/index.html). The documentation starts with an overview of the package, and leads to a basic tutorial that helps one getting started and briefly demonstrates all of the essential features. Additionally, eleven examples have been provided to illustrate all the features and options available in `pyMechT`. These include the unique features of modeling layered structures with different reference dimensions, which is commonly encountered in biological soft tissues. Simulating such a model with any finite element software would be non-trivial. Then, theoretical background of the implemented models is provided, before ending with a package reference automatically generated using `Sphinx`.

# Advantages over finite element simulation
In principle, the problems that can be solved using `pyMechT` can also be solved using any finite element simulation software. However, `pyMechT` offers the following advantages:

- A geometry and mesh creation would be required for a finite element simulation, which usually takes some time. However, the pre-defined geometrical features in `pyMechT` means that one only needs to choose the right class and parameters. And no meshing is required. This means that setting up the problem is much faster.

- Enforcing incompressibility in a finite element simulation can be numerically challenging, thus requiring one to use approaches such as Lagrange multiplier and three-field formulation in finite element simulation. Instead, in `pyMechT`, the incompressibility is analytically enforced *exactly*. This makes the results more robust.

- The fast nature of simulations in `pyMechT` makes it feasible to run of the order to 10^5^ simulations in several minutes, thus facilitating Monte Carlo and Bayesian inference.

- The reference zero-stress state of biological tissues can be unknown or ambiguous. Moreover, the biological tissues are heterogeneous, with multiple layers each of varying properties. These aspects are non-trivial to incorporate in a finite element simulation, due to the need for recreating the geometry and/or incompatability at the starting step. However, it is straightforward to simulate these in `pyMechT`.

# Uses in literature
`pyMechT` has been used for Bayesian model selection based on extensive planar biaxial extension data [@AGGARWAL2023105657]. This work required rapid simulation of varied constitutive models, which was facilitated by `pyMechT`. Moreover, data-driven model developed in [@AGGARWAL2023115812] has also been subsequently used in `pyMechT` via the `splineI1` and `splineI1I4` material models.
`pyMechT` has been used for Bayesian model selection based on extensive planar biaxial extension data [@AGGARWAL2023105657]. This work required rapid simulation of varied constitutive models, which was facilitated by `pyMechT`. Similarly, the Bayesian inference via Markov Chain Monte Carlo in `pyMechT` was used to infer the distribution of aortic biomechanical and geometrical properties based on in-vivo measurements (as likelihood) and ex-vivo biaxial extension data (as prior distribution) [@Aggarwal2024]. Moreover, data-driven model developed in [@AGGARWAL2023115812] has also been subsequently used in `pyMechT` via the `splineI1` and `splineI1I4` material models.

# Conclusion and future plans
In conclusion, `pyMechT` fills an important gap and allows soft tissue biomechanics researchers to model ex-vivo testing setups in a fast, robust, and flexible manner. The package is numerically efficient and extensively documented. It has facilitated a few publications in our research group, and we hope that it can benefit the wider community. In the future, we plan to extend the capabilities of the package to include more material models, such as inelastic (viscoelastic, plastic, damage, growth & remodeling), and other ex-vivo setups (such as microindentation). Lastly, the package could be coupled with others to allow multi-physics simulations, such as for hemodynamics and biochemical regulation.

# References

0 comments on commit 4642165

Please sign in to comment.