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.28.tar.gz (88.3 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.28-py3-none-any.whl (158.3 kB view details)

Uploaded Python 3

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

Hashes for omotes_simulator_core-0.0.28.tar.gz
Algorithm Hash digest
SHA256 1089f0062f65acf24c1a1d4f158ef0d226caba9932b8983c21c6ecc503c4fd41
MD5 e223d5c2d12959328527f3c6009ecce0
BLAKE2b-256 3ec323fd648728df724d9c54cbd74f0bf1106793575d06aee4a4ac4f52008b94

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for omotes_simulator_core-0.0.28-py3-none-any.whl
Algorithm Hash digest
SHA256 7ae0b050a02d167daa3f2abdd334bb8b26568499054d227e2e9d4079f2fb544b
MD5 797462dbb31bff3af59e3d3d7d78b079
BLAKE2b-256 ae8baf079e18cbfde632d97512895adc53d6501304f11d3cb5117c78767e9d10

See more details on using hashes here.

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

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