https://github.com/computationalphysiology/ciucci-2024

Source code for reproducing results of ciucci-2024 paper

https://github.com/computationalphysiology/ciucci-2024

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Source code for reproducing results of ciucci-2024 paper

Basic Info
Statistics
  • Stars: 1
  • Watchers: 3
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

Material from Ciucci 2024

This repository contains the source code to reproduce the modeling results from the paper

Paper here

Reproducible results

You can find a report of the results by going to the repository homepage at https://computationalphysiology.github.io/ciucci-2024/myst/report-1.

Note that the results displayed here are re-generated every time a push is made to the repository (see https://github.com/ComputationalPhysiology/ciucci-2024/actions/workflows/deploy_docs.yml). Note that all figures are also uploaded as artifacts during the build.

Also note that the results from the paper are run on a finer mesh than those displayed in the documentation.

Install dependencies

To run the code in this repo you need FEniCS and gmsh with OpenCascade installed. The easiest way to do this is to either use the provided docker image, i.e docker pull ghcr.io/computationalphysiology/ciucci-2024:latest You can create a new container using the command docker run --name ciucci -w /home/shared -v $PWD:/home/shared -it ghcr.io/computationalphysiology/ciucci-2024:latest which will also share your current directory with the container. If you are interested you can also check out the Dockerfile if you want to know how the image was created.

Running scripts

There are three types of simulation scripts.

  1. A contracting cylinder, with only one time point
  2. A contraction cylinder with a full twitch
  3. An unloaded (zero pressure) and loaded (pressure = 15 kPA) contracting left ventricle.

We refer to the documentation for more information about the models and numerical experiments.

The main script for running all the commands are located inside the code directory and you should first make sure to navigate to this directory, i.e cd code

You can list all the available options by typing python3 main.py --help Here is an example of how it looks inside the container ``` root@b2637926d9de:/home/shared/code# python3 main.py --help usage: main.py [-h] [--dry-run] {preprocess-lv,preprocess-cylinder,run-lv,run-cylinder,run-cylinder-twitch,postprocess-lv,postprocess-cylinder,postprocess-cylinder-twitch} ...

positional arguments: {preprocess-lv,preprocess-cylinder,run-lv,run-cylinder,run-cylinder-twitch,postprocess-lv,postprocess-cylinder,postprocess-cylinder-twitch} preprocess-lv Create left ventricle mesh preprocess-cylinder Create cylinder mesh run-lv Run simulations with left ventricle model run-cylinder Run simulations with cylinder model run-cylinder-twitch Run simulations with cylinder model postprocess-lv Postprocess LV results postprocess-cylinder Postprocess cylinder results postprocess-cylinder-twitch Postprocess cylinder results

options: -h, --help show this help message and exit --dry-run Just print the command and do not run it ```

Below we show the basic command. Note that you can also use the flag --help to see all the different options for each command, e.g ``` root@b2637926d9de:/home/shared/code# python3 main.py preprocess-cylinder --help usage: main.py preprocess-cylinder [-h] [-o MESH_FOLDER] [-c CHAR_LENGTH] [-l LENGTH] [-r RADIUS]

options: -h, --help show this help message and exit -o MESHFOLDER, --mesh-folder MESHFOLDER -c CHARLENGTH, --charlength CHAR_LENGTH -l LENGTH, --length LENGTH -r RADIUS, --radius RADIUS ```

Cylinder

Preprocessing

python3 main.py preprocess-cylinder -o meshes/cylinder

Simulation

python3 main.py run-cylinder -i meshes/cylinder -o results/cylinder

Simulation (twitch)

python3 main.py run-cylinder-twitch -i meshes/cylinder -o results/cylinder-twitch

Postprocessing

python3 main.py postprocess-cylinder -i meshes/cylinder -r results/cylinder -o figures/cylinder

Postprocessing (twitch)

python3 main.py postprocess-cylinder-twitch -i meshes/cylinder -r results/cylinder-twitch -o figures/cylinder-twitch

LV

Preprocessing

Native

python3 main.py preprocess-lv -o meshes/native -c native

Transplanted

python3 main.py preprocess-lv -o meshes/transplanted -c transplanted

Running simulations

Native

python3 main.py run-lv -i meshes/native -c native -o results/native

When running the simulations the following files will be created in the output folder

native ├── gammas.npy ├── pressures.npy ├── results_current.h5 ├── results_current.xdmf ├── results_current_smooth.h5 ├── results_current_smooth.xdmf ├── results_reference.h5 ├── results_reference.xdmf ├── results_reference_smooth.h5 ├── results_reference_smooth.xdmf └── volumes.npy The xdmf files are files that can be opened in Paraview. The label reference refers to the solutions are stored on the reference mesh, while in the file with the label current the mesh has been updated to the current configuration. For the results with the label smooth we have smoothed the results using a Gaussian filter and interpolated into a first order Lagrange element function space. The files gammas.npy and pressures.npy contain the values of the gamma and pressure for each time step. The file volumes.npy contains the volume of the LV at each time step.

Transplanted

python3 main.py run-lv -i meshes/transplanted -c transplanted -o results/transplanted

Postprocessing

Native

python3 main.py postprocess-lv -i meshes/native -r results/native -o figures/native

Transplanted

python3 main.py postprocess-lv -i meshes/transplanted -r results/transplanted -o figures/transplanted Get stats using python3 main.py postprocess-lv -i meshes/transplanted -r results/transplanted -o figures/transplanted --print-stats

Comparison for end-systole

python3 main.py postprocess-lv-ES -n results/native -t results/transplanted -o figures

Citation

If you use the code in this repository, please cite: TBW

Author

Henrik Finsberg and Sam Wall

License

MIT

Owner

  • Name: Computational Physiology at Simula Research Laboratory
  • Login: ComputationalPhysiology
  • Kind: organization
  • Location: Fornebu, Norway

GitHub organization for the computational physiology department at Simula Research Laboratory

GitHub Events

Total
  • Watch event: 1
  • Push event: 8
  • Pull request event: 1
  • Create event: 1
Last Year
  • Watch event: 1
  • Push event: 8
  • Pull request event: 1
  • Create event: 1

Issues and Pull Requests

Last synced: over 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • finsberg (1)
Top Labels
Issue Labels
Pull Request Labels