Skip to main content

Simulates thermodynamics of fluid tank refueling and discharging.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytanksim-1.1.2.tar.gz (11.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytanksim-1.1.2-py3-none-any.whl (84.7 kB view details)

Uploaded Python 3

File details

Details for the file pytanksim-1.1.2.tar.gz.

File metadata

  • Download URL: pytanksim-1.1.2.tar.gz
  • Upload date:
  • Size: 11.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.19

File hashes

Hashes for pytanksim-1.1.2.tar.gz
Algorithm Hash digest
SHA256 19eaab657fe9bbcba96626c5b93cead46683823279faafac8ac49f7edd590fb7
MD5 a1e393ad77c5a908a7628454c6454eb2
BLAKE2b-256 23c102226f2167589da826b86c3f0d281b54d7852061840bb9b4cea4305d30e3

See more details on using hashes here.

File details

Details for the file pytanksim-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: pytanksim-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 84.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.19

File hashes

Hashes for pytanksim-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6af2e537e18adfe1b63b011c84629daa66f5f1338d80561db699c83e8df86e80
MD5 56ac15d7333e78b82771345bab37eff2
BLAKE2b-256 9e6950a1f2405112f5cff81904532de9f2551133ca6477e950bef8ca62f53b78

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page