CADET-Python


NameCADET-Python JSON
Version 1.0.4 PyPI version JSON
download
home_pageNone
SummaryCADET-Python is a Python interface to the CADET-Core simulator
upload_time2024-12-16 09:34:03
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseBSD-3-Clause
keywords process modeling process optimization chromatography
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CADET-Python

**CADET-Python** provides a file-based Python interface for **CADET-Core**, which must be installed separately. For this, please refer to the [installation instructions](https://cadet.github.io/master/getting_started/installation.html) and the [CADET-Core repository](https://github.com/cadet/CADET-Core).

The CADET-Python package simplifies access by mapping to the [CADET interface](https://cadet.github.io/master/interface/index.html#), **with all dataset names in lowercase**.

## Installation

To install CADET-Python, use:

```
pip install cadet-python
```

## Usage Example

The package includes two primary classes:

- **`CADET`**: The main class to configure and run simulations.
- **`H5`**: A general-purpose HDF5 interface.

### Setting Up a Simulation

To set a simulation parameter, such as the column porosity for column 1.

Referring to this path in the CADET interface:
```
/input/model/unit_001/COL_POROSITY
```
In CADET-Python, this is now set as:
```
from cadet import Cadet

# Initialize simulation
sim = Cadet()

# Set column porosity for unit 001
sim.root.input.model.unit_001.col_porosity = 0.33
```
### Saving the Simulation File

Before running, save the simulation configuration to a file:
```
sim.filename = "/path/to/your/file.hdf5"
sim.save()
```
### Setting the Path to CADET

To execute the simulation, specify the path to **CADET-Core**. On Windows, set the path to `cadet-cli.exe`:
```
sim.cadet_path = '/path/to/cadet-cli'
```
### Running the Simulation and Loading Data

Run the simulation and load the output data with:
```
print(sim.run())
sim.load()
```
### Reading Data from a Pre-Simulated File

If you have a pre-simulated file, you can read it directly:
```
# Initialize a new simulation object
sim = Cadet()

# Set the filename for the existing simulation data
sim.filename = "/path/to/your/file.hdf5"
sim.load()
```
At this point, any data in the file can be accessed.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "CADET-Python",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "process modeling, process optimization, chromatography",
    "author": null,
    "author_email": "William Heymann <w.heymann@fz-juelich.de>, Samuel Leweke <s.leweke@fz-juelich.de>, Johannes Schm\u00f6lder <j.schmoelder@fz-juelich.de>, Ronald J\u00e4pel <r.jaepel@fz-juelich.de>",
    "download_url": "https://files.pythonhosted.org/packages/78/18/1c11cb34dddea4411a81ba9ea6145e5ded2e97c8ad6c2d31393886c0c96a/cadet_python-1.0.4.tar.gz",
    "platform": null,
    "description": "# CADET-Python\n\n**CADET-Python** provides a file-based Python interface for **CADET-Core**, which must be installed separately. For this, please refer to the [installation instructions](https://cadet.github.io/master/getting_started/installation.html) and the [CADET-Core repository](https://github.com/cadet/CADET-Core).\n\nThe CADET-Python package simplifies access by mapping to the [CADET interface](https://cadet.github.io/master/interface/index.html#), **with all dataset names in lowercase**.\n\n## Installation\n\nTo install CADET-Python, use:\n\n```\npip install cadet-python\n```\n\n## Usage Example\n\nThe package includes two primary classes:\n\n- **`CADET`**: The main class to configure and run simulations.\n- **`H5`**: A general-purpose HDF5 interface.\n\n### Setting Up a Simulation\n\nTo set a simulation parameter, such as the column porosity for column 1.\n\nReferring to this path in the CADET interface:\n```\n/input/model/unit_001/COL_POROSITY\n```\nIn CADET-Python, this is now set as:\n```\nfrom cadet import Cadet\n\n# Initialize simulation\nsim = Cadet()\n\n# Set column porosity for unit 001\nsim.root.input.model.unit_001.col_porosity = 0.33\n```\n### Saving the Simulation File\n\nBefore running, save the simulation configuration to a file:\n```\nsim.filename = \"/path/to/your/file.hdf5\"\nsim.save()\n```\n### Setting the Path to CADET\n\nTo execute the simulation, specify the path to **CADET-Core**. On Windows, set the path to `cadet-cli.exe`:\n```\nsim.cadet_path = '/path/to/cadet-cli'\n```\n### Running the Simulation and Loading Data\n\nRun the simulation and load the output data with:\n```\nprint(sim.run())\nsim.load()\n```\n### Reading Data from a Pre-Simulated File\n\nIf you have a pre-simulated file, you can read it directly:\n```\n# Initialize a new simulation object\nsim = Cadet()\n\n# Set the filename for the existing simulation data\nsim.filename = \"/path/to/your/file.hdf5\"\nsim.load()\n```\nAt this point, any data in the file can be accessed.\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "CADET-Python is a Python interface to the CADET-Core simulator",
    "version": "1.0.4",
    "project_urls": {
        "Bug Tracker": "https://github.com/cadet/CADET-Python/issues",
        "homepage": "https://github.com/cadet/CADET-Python"
    },
    "split_keywords": [
        "process modeling",
        " process optimization",
        " chromatography"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b6a47e8b28a99f7a71aa39b1d082ff0f0f1eb7d8ebee0ddac8926e66fc8e1738",
                "md5": "ae801bb57dfcd69735c8f0600e19e936",
                "sha256": "601cb5b9e69205fdf9b3c2a0abdad76fe1c5aafed5353f26bc8b09984cd5afba"
            },
            "downloads": -1,
            "filename": "CADET_Python-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ae801bb57dfcd69735c8f0600e19e936",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 25056,
            "upload_time": "2024-12-16T09:34:00",
            "upload_time_iso_8601": "2024-12-16T09:34:00.950892Z",
            "url": "https://files.pythonhosted.org/packages/b6/a4/7e8b28a99f7a71aa39b1d082ff0f0f1eb7d8ebee0ddac8926e66fc8e1738/CADET_Python-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "78181c11cb34dddea4411a81ba9ea6145e5ded2e97c8ad6c2d31393886c0c96a",
                "md5": "68b61ab127ed170ca8e983f240a00f0f",
                "sha256": "ce45b54eaf0e48e0e1444ab268e731c390574704102679e5595e88c001aee9b3"
            },
            "downloads": -1,
            "filename": "cadet_python-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "68b61ab127ed170ca8e983f240a00f0f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 30952,
            "upload_time": "2024-12-16T09:34:03",
            "upload_time_iso_8601": "2024-12-16T09:34:03.052408Z",
            "url": "https://files.pythonhosted.org/packages/78/18/1c11cb34dddea4411a81ba9ea6145e5ded2e97c8ad6c2d31393886c0c96a/cadet_python-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-16 09:34:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cadet",
    "github_project": "CADET-Python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cadet-python"
}
        
Elapsed time: 0.87906s