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:

  • 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 . Copyright 2014 Elsevier.

  • 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 . Copyright 2008 Elsevier.

  • 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 . Copyright 2011 American Chemical Society.

  • 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 . Copyright 2013 Elsevier.

  • 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. Copyright 2009 Springer.

  • 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. Copyright 2012 American Chemical Society.

  • 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 . Copyright 2007 American Chemical Society.

  • 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

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.0.0.tar.gz (10.1 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.0.0-py3-none-any.whl (83.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pytanksim-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8cf3d598a6fff9ccbb92ce1bfe8fdc3229d5f859c7790caf2e5c425a7049a995
MD5 1356bf8fc607674c5b4109b6435d06a3
BLAKE2b-256 89455504c205984c420abf99c34fd969aaa381d872e0ce5cc5304737d9fc01c5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytanksim-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 83.3 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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1210e065e3848577753697ee37d6aa431d3525c105aa4c5f2b11e1f726097fe
MD5 bf6fed4eae0c04dbd5d90271cf5f5288
BLAKE2b-256 8e3e357236b34c2866d1c8e90e31d6c7def306d146046ef99efb693756eae17d

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