Skip to main content

pytanksim

Python package for simulating sorbent-filled hydrogen (and other fluids) storage tanks

pytanksim is a package which calculates the mass and energy balances in fluid storage tanks and simulates the dynamics during processes such as refueling, discharging, dormancy, and boil-off.

It is also equipped to fit gas adsorption data on nanoporous materials to adsorption models, which then allows the inclusion of sorbent materials in the dynamic simulation.

Getting Started

Dependencies

The installation of pytanksim requires:

  • python versions 3.7 and above
  • CoolProp
  • pandas
  • numpy>=1.6.1
  • scipy
  • tqdm
  • assimulo>=3.0
  • matplotlib

Installation

Pytanksim is listed on PyPI, so it should be possible in theory to install it with a single command via pip. Unfortunately, one of its dependencies, assimulo, tend to cause issues if one were to try installing pytanksim directly via pip, since the PyPI version of assimulo is not up to date and seems to be broken for newer versions of python, therefore causing pytanksim's install to fail. However, the build of assimulo on Anaconda seems to be well-maintained and working fine.

Thus, the easiest way to get pytanksim running if you don't have python installed on your computer, is to install python via Anaconda or Miniconda. In Anaconda or Miniconda, you can create a virtual environment that contains python version 3.7 using the following command on the Anaconda prompter (just change the myenv name to whatever you want to name your working environment):

conda create -n myenv python=3.7 

Then, activate this new virtual environment.

conda activate myenv

You can then write the following to install a working version of assimulo in this virtual environment:

conda install conda-forge::assimulo

Finally, you can install pytanksim to this virtual environment.

pip install pytanksim

You should be able to use pytanksim in this virtual environment after this!

If you need an Integrated Development Environment (IDE), you need to install the IDE through Anaconda within the virtual environment as well. For more information on how to work with virtual environments via Anaconda, you may want to see the Anaconda website.

As an alternative to working with Anaconda, you may also install assimulo directly from the source and then you can pip install pytanksim without having to use a virtual environment, but that process is generally more involved.

Validation Case Studies

Several case studies are available under the validation folder which illustrates pytanksim's various functionalities. First time users are recommended to go through the example case studies.

Datasets

The data used in the case studies are taken from the following papers:

  • Ahluwalia, R. K., & Peng, J. K. (2008). Dynamics of cryogenic hydrogen storage in insulated pressure vessels for automotive applications. International Journal of Hydrogen Energy, 33(17), 4622–4633. https://doi.org/10.1016/j.ijhydene.2008.05.090 .

  • Kusdhany, M.I.M., Ma, Z., Mufundirwa, A., Li, H.-W., Sasaki, K., Hayashi, A., Lyth, S.M., 2022. Hydrogen and carbon dioxide uptake on scalable and inexpensive microporous carbon foams. Microporous and Mesoporous Materials 343, 112141. https://doi.org/10.1016/j.micromeso.2022.112141

  • Petitpas, G., Bénard, P., Klebanoff, L. E., Xiao, J., & Aceves, S. (2014). A comparative analysis of the cryo-compression and cryo-adsorption hydrogen storage methods. International Journal of Hydrogen Energy, 39(20), 10564–10584. https://doi.org/10.1016/j.ijhydene.2014.04.200 .

  • Purewal, J., Liu, D., Sudik, A., Veenstra, M., Yang, J., Maurer, S., Müller, U., & Siegel, D. J. (2012). Improved Hydrogen Storage and Thermal Conductivity in High-Density MOF-5 Composites. The Journal of Physical Chemistry C, 116(38), 20199–20212. https://doi.org/10.1021/jp305524f.

  • Richard, M.-A., Bénard, P., & Chahine, R. (2009). Gas adsorption process in activated carbon over a wide temperature range above the critical point. Part 1: Modified Dubinin-Astakhov model. Adsorption, 15, 43–51.

  • Richard, M.-A., Cossement, D., Chandonia, P.-A., Chahine, R., Mori, D., & Hirose, K. (2009). Preliminary evaluation of the performance of an adsorption-based hydrogen storage system. AIChE Journal, 55(11), 2985–2996. https://doi.org/10.1002/aic.11904

  • Sahoo, P. K., John, M., Newalkar, B. L., Choudhary, N. V., & Ayappa, K. G. (2011). Filling Characteristics for an Activated Carbon Based Adsorbed Natural Gas Storage System. Industrial & Engineering Chemistry Research, 50(23), 13000–13011. https://doi.org/10.1021/ie200241x .

  • Xiao, J., Zhou, Z., Cossement, D., Bénard, P., & Chahine, R. (2013). Lumped parameter model for charge–discharge cycle of adsorptive hydrogen storage system. International Journal of Heat and Mass Transfer, 64, 245–253. https://doi.org/10.1016/j.ijheatmasstransfer.2013.04.029 .

  • Zhou, W., Wu, H., Hartman, M. R., & Yildirim, T. (2007). Hydrogen and Methane Adsorption in Metal−Organic Frameworks: A High-Pressure Volumetric Study. The Journal of Physical Chemistry C, 111(44), 16131–16137. https://doi.org/10.1021/jp074889i .

Please cite them if you use the data from the case studies in your own work. If you wish to redistribute the data for your own work, you are advised to contact the original authors or publishers for the copyright information.

License

pytanksim is available under an LGPL v3+ open source license. See FSF's website for more detail regarding what this license allows.

Contact Information

If you have any questions or inquiries regarding this package, please contact Muhammad Irfan Maulana Kusdhany, Kyushu University, at ikusdhany@kyudai.jp.

Acknowledgement

This work was supported by JST, the establishment of university fellowships towards the creation of science technology innovation, Grant Number JPMJFS2132, and by an external research grant from Mitsubishi Fuso Truck & Bus Corporation.

Metadata

Release files for pytanksim 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytanksim 1.1.2
File Size Uploaded
pytanksim-1.1.2.tar.gz 11.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytanksim 1.1.2
File Interpreter ABI Platform
pytanksim-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 MB

Release files / pytanksim-1.1.2.tar.gz

Download URL pytanksim-1.1.2.tar.gz
Size 11.4 MB
Tags Source
SHA-256 checksum
How to use checksums
19eaab657fe9bbcba96626c5b93cead46683823279faafac8ac49f7edd590fb7
BLAKE2b-256 checksum
How to use checksums
23c102226f2167589da826b86c3f0d281b54d7852061840bb9b4cea4305d30e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.19

Release files / pytanksim-1.1.2-py3-none-any.whl

Download URL pytanksim-1.1.2-py3-none-any.whl
Size 84.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6af2e537e18adfe1b63b011c84629daa66f5f1338d80561db699c83e8df86e80
BLAKE2b-256 checksum
How to use checksums
9e6950a1f2405112f5cff81904532de9f2551133ca6477e950bef8ca62f53b78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.19

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page