Skip to main content

CADET is a python interface to the CADET chromatography simulator

Project description

CADET-Python is a file based Python interface for CADET. For this, CADET must be installed separately (see https://github.com/modsim/CADET).

CADET-Python almost exactly maps to the documented CADET interface except that all dataset names are lowercase. This simplifies using the interface.

To install CADET-Python simply

pip install cadet-python

Usage

This package includes the CADET class and H5 class. H5 can be used as a simple generic HDF5 interface.

As an example look at setting column porosity for column 1. From the CADET manual, the path for this is:

/input/model/unit_001/COL_POROSITY

In the Python interface this becomes:

sim = Cadet()
sim.root.input.model.unit_001.col_porosity = 0.33

Once the simulation has been created it must be saved before it can be run.

sim.filename = "/path/to/where/you/want/the/file.hdf5"
sim.save()

Next the path to CADET needs to be set before a simulation can be run. If running on Microsoft Windows you need the path to cadet-cli.exe

sim.cadet_path = '/path/to/cadet-cli'

run the simulation and load the data

print(sim.run())
sim.load()

At this point any data can be read.

If you have a file you want to read that has already been simulated this is also easy to do.

sim = Cadet()
sim.filename = "/path/to/where/you/want/the/file.hdf5"
sim.load()

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

CADET-Python-0.12.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

CADET_Python-0.12-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file CADET-Python-0.12.tar.gz.

File metadata

  • Download URL: CADET-Python-0.12.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for CADET-Python-0.12.tar.gz
Algorithm Hash digest
SHA256 7fabe1be3355019ad75293185824ad84ae8ca9c5090cb7192576a36eb13a6b85
MD5 19ecdba186f2dd37832215c18f60dadb
BLAKE2b-256 aab70cceb0c6334ba64b1cefb71e13af0a2af23e8948537a3e63e8127088d27a

See more details on using hashes here.

File details

Details for the file CADET_Python-0.12-py3-none-any.whl.

File metadata

  • Download URL: CADET_Python-0.12-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for CADET_Python-0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 acbc0074b83ceb7a4ab23984d3b52169c2167af3d74e1ffa90cf94d859f34301
MD5 ae7bb8480c46edec76f37d81ae0b82ca
BLAKE2b-256 de143b4589bdea4102927a87304e253807501ef6cd5eb5d833b4171ff365bec2

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