Skip to main content

Revised Chapman-Enskog solutions of the Boltzmann Equations for diffusion, thermal diffusion and thermal conductivity. Implemented for Hard spheres and Mie-fluids.

Project description

KineticGas

Implementation of Chapman-Enskog solutions to the Boltzmann equations for diffusion, thermal diffusion and conductivity for hard spheres and Mie-fluids. The file theory.pdf contains an excerpt of the thesis this package was created to produce, that outlines the elements of kinetic gas theory used in the package and some notable results regarding the stability, accuracy and reliability of the solutions. See the documentation for SAFT-VR-Mie at ThermoPack for more details on mixing rules and the Barker-Henderson diameter.

Dependencies

C++ module uses the pybind11 package to expose itself to the Python wrapper, removing this dependency does not amount to more than removing bindings.cpp from the SOURCES listed in cpp/CMakeLists.txt.

The Python wrapper requires the ThermoPack python module (pyctp) and associated dependencies. The ThermoPack module is only used as a database for Mie-parameters. Removing the appropriate import statements and associated function calls will not break the code, but require that Mie-parameters are explicitly supplied.

Setup

The package that can be installed with pip comes with the compiled files KineticGas_r.so and KineticGas_d.so, compiled on MacOS 10.14.6 for Python 3.9.

Build for Python 3.9 by running bash cpp/build_kingas.sh from the top-level directory. For a debug build, run bash cpp/build_kingas.sh --Debug The same script works for Linux, possibly with minor modifications. To build for different Python versions, edit the variable PYBIND11_PYTHON_VERSION in cpp/CMakeLists.txt. For Windows, may God be with you.

Install with pip by running pip install pykingas/ from the top-level directory after activating your python-installation of choice.

The Integration and meshing module can be built separately by running bash cpp/build_integration.sh. The integration build script also accepts the --Debug flag.

Usage

Initialize a KineticGas object with the desired components and potential model, compute diffusion coefficients, thermal diffusion coefficients and thermal conductivity with the respective functions in py_KineticGas.py

If the argument -d or -debug or -Debug is passed to a script using the pykingas module as python <MyScript.py> -d the Debug build of the C++ module will be called by the python wrapper.

Some example usage can be found in the various *_unittests.py files.

Acknowledgments and sources

This implementation of the Enskog solutions presented by Chapman and Cowling (The mathematical theory of non-uniform gases 2nd ed. Cambridge University Press, 1964) utilises the explicit summational expressions for the required bracket integrals published by Tompson, Tipton and Loyalka in Chapman–Enskog solutions to arbitrary order in Sonine polynomials IV: Summational expressions for the diffusion- and thermal conductivity-related bracket integrals, European Journal of Mechanics - B/Fluids, 28, 6, pp. 695 - 721, 2009. For a summary of the relevant theory, see the Theory docs.

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

pykingas-1.2.2.tar.gz (539.4 kB view details)

Uploaded Source

Built Distribution

pykingas-1.2.2-py3-none-any.whl (548.6 kB view details)

Uploaded Python 3

File details

Details for the file pykingas-1.2.2.tar.gz.

File metadata

  • Download URL: pykingas-1.2.2.tar.gz
  • Upload date:
  • Size: 539.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.12

File hashes

Hashes for pykingas-1.2.2.tar.gz
Algorithm Hash digest
SHA256 32141624fc95114b2a7aa7796dd9e04c75ecc7a53a40a14bf493ace4782e48c3
MD5 dfb6542a84ceee5613d6631add764cfd
BLAKE2b-256 9d7275dd464218b7d2084ea9f95cdfac8b4a3658d5e12de911426dcfcdb4340c

See more details on using hashes here.

File details

Details for the file pykingas-1.2.2-py3-none-any.whl.

File metadata

  • Download URL: pykingas-1.2.2-py3-none-any.whl
  • Upload date:
  • Size: 548.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.12

File hashes

Hashes for pykingas-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 23440c41fa46fa1fc8f60cebce489c4b7f7bbec4f49bfd188557820c0ec08f72
MD5 d2a6e79240544038a4c355b85181f34f
BLAKE2b-256 c4d48ba7967b43867fb3b45781a8e5afdb76409a383ab4d851b8d9b9f30e78e2

See more details on using hashes here.

Supported by

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