Core library of the OMOTES simulator
Project description
OMOTES-simulator-core
This repository is part of the 'Nieuwe Warmte Nu Design Toolkit' project. Omotes-simulator-core is the core library for the thermo-hydraulic numerical simulations within the NWN Design toolkit. The simulator requires a network schematization in ESDL format, simulation start/end time and a timestep-duration as input. The simulator will return a pandas dataframe that contains the all the output time series.
Installation
Use the package manager pip to install omotes-simulator-core.
pip install omotes-simulator-core
Usage
from omotes_simulator_core.entities.esdl_object import EsdlObject
from omotes_simulator_core.entities.simulation_configuration import SimulationConfiguration
from omotes_simulator_core.infrastructure.simulation_manager import SimulationManager
from omotes_simulator_core.infrastructure.utils import pyesdl_from_file
# Create a callable that prints the progress messages
def progressLogger(progress: float, message: str) -> None:
"""Function to report progress to logging/stdout."""
logger.info(f"({progress*100:.2f}%) {message}")
# Create simulation config parameters
config = SimulationConfiguration(
simulation_id=uuid.uuid1(), #creates a new uuid for this simulation
name="test run", # user defined name
timestep=3600, # timestep, start and stop datetime (simulation period)
start=datetime.strptime("2019-01-01T00:00:00", "%Y-%m-%dT%H:%M:%S"),
stop=datetime.strptime("2019-01-01T01:00:00", "%Y-%m-%dT%H:%M:%S"),
)
esdl_file_path = "path/to/whatever/file.esdl"
# Run the simulation
sim = SimulationManager(EsdlObject(pyesdl_from_file(esdl_file_path)), config)
result = sim.execute(progressLogger)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
For more information, please see [CONTRIBUTING.md]
License
GPLv3, see [LICENSE]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file omotes_simulator_core-0.0.28.tar.gz.
File metadata
- Download URL: omotes_simulator_core-0.0.28.tar.gz
- Upload date:
- Size: 88.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1089f0062f65acf24c1a1d4f158ef0d226caba9932b8983c21c6ecc503c4fd41
|
|
| MD5 |
e223d5c2d12959328527f3c6009ecce0
|
|
| BLAKE2b-256 |
3ec323fd648728df724d9c54cbd74f0bf1106793575d06aee4a4ac4f52008b94
|
Provenance
The following attestation bundles were made for omotes_simulator_core-0.0.28.tar.gz:
Publisher:
release.yml on Project-OMOTES/simulator-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omotes_simulator_core-0.0.28.tar.gz -
Subject digest:
1089f0062f65acf24c1a1d4f158ef0d226caba9932b8983c21c6ecc503c4fd41 - Sigstore transparency entry: 750758091
- Sigstore integration time:
-
Permalink:
Project-OMOTES/simulator-core@e43e1d6ce13cb3fb7ca80b0080d4fcfd4b0d22fd -
Branch / Tag:
refs/tags/0.0.28 - Owner: https://github.com/Project-OMOTES
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e43e1d6ce13cb3fb7ca80b0080d4fcfd4b0d22fd -
Trigger Event:
push
-
Statement type:
File details
Details for the file omotes_simulator_core-0.0.28-py3-none-any.whl.
File metadata
- Download URL: omotes_simulator_core-0.0.28-py3-none-any.whl
- Upload date:
- Size: 158.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ae0b050a02d167daa3f2abdd334bb8b26568499054d227e2e9d4079f2fb544b
|
|
| MD5 |
797462dbb31bff3af59e3d3d7d78b079
|
|
| BLAKE2b-256 |
ae8baf079e18cbfde632d97512895adc53d6501304f11d3cb5117c78767e9d10
|
Provenance
The following attestation bundles were made for omotes_simulator_core-0.0.28-py3-none-any.whl:
Publisher:
release.yml on Project-OMOTES/simulator-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
omotes_simulator_core-0.0.28-py3-none-any.whl -
Subject digest:
7ae0b050a02d167daa3f2abdd334bb8b26568499054d227e2e9d4079f2fb544b - Sigstore transparency entry: 750758149
- Sigstore integration time:
-
Permalink:
Project-OMOTES/simulator-core@e43e1d6ce13cb3fb7ca80b0080d4fcfd4b0d22fd -
Branch / Tag:
refs/tags/0.0.28 - Owner: https://github.com/Project-OMOTES
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e43e1d6ce13cb3fb7ca80b0080d4fcfd4b0d22fd -
Trigger Event:
push
-
Statement type: