Note
Go to the end to download the full example code.
Download a PyAnsys Heart-compatible case from Zenodo#
This example shows how to download a Strocchi 2020 or Rodero 2021 case from the Zenodo database.
Note
You can also manually download the CASE or VTK files from the Strocchi 2020 and Rodero 2021 databases. For more information, see:
Alternatively you can make use of the download module instead. See the example below.
# Perform the required imports
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Import the required modules and set relevant paths, including that of the working
# directory and generated model.
from pathlib import Path
from ansys.health.heart.utils.download import download_case_from_zenodo, unpack_case
# Download the tar file of Rodero2021 from the Zenodo database.
download_dir = Path.home() / "pyansys-heart" / "downloads"
tar_file = download_case_from_zenodo("Rodero2021", 1, download_dir, overwrite=True)
# Unpack the tar file and get the path to the input .vtk/.case file.
path = unpack_case(tar_file)
print(path)
100% ---------------------------------------------------- 91.1/91.1 MB 6.5 MB/s
C:\Users\ansys\pyansys-heart\downloads\Rodero2021\01\01.vtk
Total running time of the script: (0 minutes 21.495 seconds)