Skip to main content

mosaik simulator for Wind turbine

Project description

This package is a mosaik simulator for wind turbines. It uses wind speed data to calculate the power output of a wind turbine given a power curve.

Attributes:

  • P[MW] - output attribute, generated active power [MW] (note that it was named P_gen in the old version)

  • wind_speed - input attribute, wind speed [m/s]

Parameters:

The simulator entities can be configured using these parameters in two ways:

  1. Calculating power using the power curve that is given as the instant power in kW or MW (power_kw or power_mw). In this case the power is interpolated based on given wind speed, see CSV formatting section below.

  2. Calculating power using the wind turbine power formula and so called power_factor (cp or the coefficient of performance, see also). In this case either the rotor_area or the max_power_mw of the turbine must be specified.

Installation

  • To use this project, you have to install at least version 3.4.0 of mosaik

  • It is recommended, to use the mosaik_csv library to import wind data.

You can install this project through pip with the following command:

pip install mosaik-wind

How to Use

Note that one working example can be found in tests folder.

Specify simulators configurations within your scenario script:

sim_config = {
    'CSV': {
        'python': 'mosaik_csv:CSV',
    },
    'Wind': {
        'python': 'mosaik_components.wind:Simulator'
    },
    ...
}

Initialize the wind- and csv-simulator:

wind_data = world.start("CSV",
                   sim_start='YYYY-MM-DD HH:mm:ss',
                   datafile='path/to/wind_speed/data.csv')

wind_sim = world.start('Wind',
                    power_curve_file='path/to/power_curve/data.csv',
                    step_size=3600
                    gen_neg=True)

Instantiate model entities:

wind_speed = wind_data.Wind()
wind_model = wind_sim.WT()

Connect wind- with csv-simulator:

world.connect(wind_speed, wind_model, 'wind_speed')

CSV-Formatting

For the simulator to work correctly, both .csv files have to be specifically formatted!

wind-data

Each row in the .csv needs a DateTime entry in the YYYY-MM-DD HH:mm:ss format and a wind_speed value, measured in meters per second. The wind_data.csv is formatted accordingly to the conventions of the mosaik_csv simulator:

Wind
Time,wind_speed
YYYY-MM-DD HH:mm:ss,v1
YYYY-MM-DD HH:mm:ss,v2
...

power-curve

Note that the entries for each data point require the wind_speed [m/s], as well as a corresponding power_factor or related power values power_kw [kW] or power_mw [MW]. The power-curve .csv does not need the mosaik_csv formatting:

wind_speed,power_factor
0,0
1,0
2,0.12
3,0.29
...

wind_speed,power_kw
0,0
3.5,100
4.0,205
4.5,355
...

wind_speed,power_mw
0,0
3.5,0.1
4.0,0.205
4.5,0.355
...

Changelog

0.1.0 - 2024-03-06

  • Initial release of the mosaik-wind simulator

0.2.0 - 2025-03-18

  • Refactoring of attributes and parameters: power_curve_csv -> power_curve_file; P_gen -> P[MW].

  • The power_curve_file can now be specified during simulator initialization and during model creation.

  • power_factor, power_kw or power_mw can be used as input data for the power curve.

  • To calculate a power curve based on power_factor, either rotor_area or max_power_mw is required as input data.

Authors

The simulator was initially developed by Fernando Penaherrera, modified by Thomas Raub, extended by Malte Trauernicht, Kaja Petersen and Danila Valko

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

mosaik_wind-0.2.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

mosaik_wind-0.2.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file mosaik_wind-0.2.0.tar.gz.

File metadata

  • Download URL: mosaik_wind-0.2.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.9.21 Linux/5.15.154+

File hashes

Hashes for mosaik_wind-0.2.0.tar.gz
Algorithm Hash digest
SHA256 48176666b3aeeac40df40ef05105ea9b62e2eca820a3d568e84c21f688d48f74
MD5 003a11cff8c9b620c040f78b03113dcd
BLAKE2b-256 c2f8a8ad4f370b0cdacc20e657c472f5e54f173264d99e79baf84a312950a644

See more details on using hashes here.

File details

Details for the file mosaik_wind-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mosaik_wind-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.9.21 Linux/5.15.154+

File hashes

Hashes for mosaik_wind-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10c3b18bcc3190b0a5a1bf5c06e7213055fd7959b0878ca12f9709d6ebe61c18
MD5 ab55ec32fa8de3587697e7e9832dbf88
BLAKE2b-256 d6f09a0d94f6ea153f2edf174f5c3694e4fcacf91aa5bfe2651c257d09ad8407

See more details on using hashes here.

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