From af66fcef98a8db04beeed6437c4d5e8be9ba285d Mon Sep 17 00:00:00 2001 From: Ankush Aggarwal Date: Sat, 17 Aug 2024 19:57:18 +0100 Subject: [PATCH] Added first version of paper and gihub action to compile it --- .github/workflows/draft-pdf.yml | 24 +++++++++++ joss-paper/paper.bib | 0 joss-paper/paper.md | 75 +++++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+) create mode 100644 .github/workflows/draft-pdf.yml create mode 100644 joss-paper/paper.bib create mode 100644 joss-paper/paper.md diff --git a/.github/workflows/draft-pdf.yml b/.github/workflows/draft-pdf.yml new file mode 100644 index 0000000..cac1637 --- /dev/null +++ b/.github/workflows/draft-pdf.yml @@ -0,0 +1,24 @@ +name: Draft PDF +on: [push] + +jobs: + paper: + runs-on: ubuntu-latest + name: Paper Draft + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build draft PDF + uses: openjournals/openjournals-draft-action@master + with: + journal: joss + # This should be the path to the paper within your repo. + paper-path: joss-paper/paper.md + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: paper + # This is the output path where Pandoc will write the compiled + # PDF. Note, this should be the same directory as the input + # paper.md + path: paper.pdf diff --git a/joss-paper/paper.bib b/joss-paper/paper.bib new file mode 100644 index 0000000..e69de29 diff --git a/joss-paper/paper.md b/joss-paper/paper.md new file mode 100644 index 0000000..a2c2adf --- /dev/null +++ b/joss-paper/paper.md @@ -0,0 +1,75 @@ +--- +title: 'pyMechT: A Python package for mechanics of soft tissues' +tags: + - mechanics + - large deformation + - hyperelasticity + - soft tissues + - biomechanics + - ex-vivo testing + - parameter estimation + - Bayesian inference +authors: + - name: Ankush Aggarwal + orcid: 0000-0002-1755-8807 + equal-contrib: false + affiliation: 1 # (Multiple affiliations must be quoted: "1, 2") + - name: Ross Williams + orcid: + equal-contrib: false + affiliation: 1 # (Multiple affiliations must be quoted: "1, 2") + - name: Claire Rosnel + orcid: 0009-0000-0038-4321 + equal-contrib: false + affiliation: 1 # (Multiple affiliations must be quoted: "1, 2") + - name: Silvia Renon + orcid: + equal-contrib: false + affiliation: 1 # (Multiple affiliations must be quoted: "1, 2") + - name: Jude M. Hussain + orcid: + equal-contrib: false + affiliation: 1 # (Multiple affiliations must be quoted: "1, 2") + - name: André F. Schmidt + orcid: + equal-contrib: false + affiliation: 1 # (Multiple affiliations must be quoted: "1, 2") + - name: Shiting Huang + orcid: + equal-contrib: false + affiliation: 1 # (Multiple affiliations must be quoted: "1, 2") + - name: Sean McGinty + orcid: 0000-0002-2428-2669 + equal-contrib: false + affiliation: 1 # (Multiple affiliations must be quoted: "1, 2") + - name: Andrew McBride + orcid: 0000-0001-7153-3777 + equal-contrib: false + affiliation: 1 # (Multiple affiliations must be quoted: "1, 2") +affiliations: + - name: Glasgow Computational Engineering Centre (GCEC), James Watt School of Engineering, University of Glasgow, UK + index: 1 +date: 17 August 2024 +bibliography: paper.bib + +--- + +# Summary + +`pyMechT` aims to fill an important gap for simulating simplified models in soft tissue mechanics, such as for ex-vivo testing protocols. It is straightforward to perform parameter estimation and Bayesian inference. Unique capabilities include incorporating layered structure of tissues and residual stresses. + +# Statement of need + +Mechanics of soft tissues plays an important role in several physiological problems, including cardio-vascular and musculoskeletal systems. Common ex-vivo biomechanical testing protocols used to characterize tissues include uniaxial extension for one-dimensional structures, such as tendons and ligaments, biaxial extension for planar tissues, such as heart valves and skin, and inflation-extension for tubular tissue structures, such as blood vessels. These experiments aim to induce a uniform deformation that can be easily related to the generated stresses. + +While several finite element analysis packages are available for performing biomechanical simulation, these are generally intended for more complex scenarios with non-uniform/non-affine deformations. For simulating the ex-vivo experiments, which induce close-to-uniform deformations, in-house codes are commonly developed. However, absence of a common framework can lead to lack of consistency and reproducibility. Moreover, advanced analyses require statistical approaches, such as Monte Carlo simulations and Bayesian inference. To fill this gap, we have developed the open-source Python package `pyMechT`. + +# 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. + +![Structure of `pyMechT`{caption=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. + +# References