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.30.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.30-py3-none-any.whl (172.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: omotes_simulator_core-0.0.30.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.30.tar.gz
Algorithm Hash digest
SHA256 0ac831d0251ac4c63f3348dc12035476502baaff6aa0b9cdaccefde11f4f4dde
MD5 aeb33685aa9cf745c38024d483f13de0
BLAKE2b-256 4d48c007930b47ee49a69fe8b97996c13049e9beb90ed258ce8f1976ebd26f51

See more details on using hashes here.

Provenance

The following attestation bundles were made for omotes_simulator_core-0.0.30.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.30-py3-none-any.whl.

File metadata

File hashes

Hashes for omotes_simulator_core-0.0.30-py3-none-any.whl
Algorithm Hash digest
SHA256 51b8aaacb23d6b6f42e7e90e999ae1f065b57c9235bd932be616899ebd3a9108
MD5 8ebd65d05bc2cf56fbab719ca5028cf0
BLAKE2b-256 5b99ca885430f876b64d75ebc95112c7e155c8cf4dbf450062921ba90d9c7a60

See more details on using hashes here.

Provenance

The following attestation bundles were made for omotes_simulator_core-0.0.30-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