Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omotes_simulator_core-0.0.29.tar.gz (99.1 kB view details)

Uploaded Source

Built Distribution

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

omotes_simulator_core-0.0.29-py3-none-any.whl (172.7 kB view details)

Uploaded Python 3

File details

Details for the file omotes_simulator_core-0.0.29.tar.gz.

File metadata

  • Download URL: omotes_simulator_core-0.0.29.tar.gz
  • Upload date:
  • Size: 99.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for omotes_simulator_core-0.0.29.tar.gz
Algorithm Hash digest
SHA256 fdcc88d76649eeecfe704ba196a06cb74dd16cf9f9cfcbc84e9cc6069015666d
MD5 ef0b78da92593f68767df0b2504d77db
BLAKE2b-256 f1cdf767b71bfb75c97b307d24e435392059cee4fedec2cb4b131216c2a69cbf

See more details on using hashes here.

Provenance

The following attestation bundles were made for omotes_simulator_core-0.0.29.tar.gz:

Publisher: release.yml on Project-OMOTES/simulator-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file omotes_simulator_core-0.0.29-py3-none-any.whl.

File metadata

File hashes

Hashes for omotes_simulator_core-0.0.29-py3-none-any.whl
Algorithm Hash digest
SHA256 57e900f1cf185eb45663c018f2af4533647d6933ae0214a48ea5054a477c8831
MD5 5e2af56bbd0910ef272c50cea9acbeb2
BLAKE2b-256 e37706cffbc7379c5024b5bd24caf4179c96c047c2226a878961c9e3ba4f3ab7

See more details on using hashes here.

Provenance

The following attestation bundles were made for omotes_simulator_core-0.0.29-py3-none-any.whl:

Publisher: release.yml on Project-OMOTES/simulator-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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