From 625a5d6465025e4fc6a3caa57630c45fd93f11cc Mon Sep 17 00:00:00 2001 From: Julian Quick Date: Fri, 27 Feb 2026 07:51:08 -0800 Subject: [PATCH 1/2] add support for multiple wind farms --- .../plant/plant_wind_farm/multiple_types.yaml | 48 +++- windIO/schemas/plant/wind_farm.yaml | 218 +++++++++--------- 2 files changed, 149 insertions(+), 117 deletions(-) diff --git a/windIO/examples/plant/plant_wind_farm/multiple_types.yaml b/windIO/examples/plant/plant_wind_farm/multiple_types.yaml index 567d20b..3b52af1 100644 --- a/windIO/examples/plant/plant_wind_farm/multiple_types.yaml +++ b/windIO/examples/plant/plant_wind_farm/multiple_types.yaml @@ -1,20 +1,46 @@ -name: IEA Wind Task 37 Case study 3, 25WT Wind Farm -layouts: +wind_farm: + - name: IEA Wind Task 37 Case study 3, North Farm + layouts: - coordinates: x: [ - 10363.7833, 9894.9437, 8450.2895, 9008.9311, 9567.5726, 10126.2142, 7862.2807, 8537.7355, 9213.1903, 9888.6451, 7274.2718, 8066.5399, 8858.8079, 9651.0760, 6686.2630, 7371.5049, 8056.7467, 8741.9886, 9427.2305, 6098.2541, 6750.8566, 7403.4592, 8056.0622, 8708.6700, 9361.2778 + 10363.7833, 9894.9437, 8450.2895, 9008.9311, 9567.5726, 10126.2142, + 7862.2807, 8537.7355, 9213.1903, 9888.6451, 7274.2718, 8066.5399, + 8858.8079, 9651.0760 ] y: [ - 6490.2719, 6316.9180, 6455.3421, 6043.4997, 5631.6572, 5219.8148, 5665.8933, 5093.7148, 4521.5362, 3949.3577, 4876.4446, 4143.9299, 3411.4153, 2678.9006, 4086.9958, 3416.8405, 2746.6851, 2076.5297, 1406.3743, 3297.5471, 2665.4498, 2033.3525, 1401.2557, 769.1637, 137.0718 + 6490.2719, 6316.9180, 6455.3421, 6043.4997, 5631.6572, 5219.8148, + 5665.8933, 5093.7148, 4521.5362, 3949.3577, 4876.4446, 4143.9299, + 3411.4153, 2678.9006 ] - z: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] + z: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] crs: +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs +type=crs - turbine_types: [1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1] + turbine_types: [1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0] turbine_identifiers: [ - "WT01", "WT02", "WT03", "WT04", "WT05", "WT06", "WT07", "WT08", "WT09", "WT10", - "WT11", "WT12", "WT13", "WT14", "WT15", "WT16", "WT17", "WT18", "WT19", "WT20", - "WT21", "WT22", "WT23", "WT24", "WT25" + "WT01", "WT02", "WT03", "WT04", "WT05", "WT06", "WT07", + "WT08", "WT09", "WT10", "WT11", "WT12", "WT13", "WT14" + ] + turbine_types: + 0: !include ../plant_energy_turbine/IEA37_10MW_turbine.yaml + 1: !include ../plant_energy_turbine/IEA37_15MW_turbine.yaml + + - name: IEA Wind Task 37 Case study 3, South Farm + layouts: + - coordinates: + x: [ + 6686.2630, 7371.5049, 8056.7467, 8741.9886, 9427.2305, + 6098.2541, 6750.8566, 7403.4592, 8056.0622, 8708.6700, 9361.2778 ] -turbine_types: + y: [ + 4086.9958, 3416.8405, 2746.6851, 2076.5297, 1406.3743, + 3297.5471, 2665.4498, 2033.3525, 1401.2557, 769.1637, 137.0718 + ] + z: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] + crs: +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs +type=crs + turbine_types: [0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1] + turbine_identifiers: [ + "WT15", "WT16", "WT17", "WT18", "WT19", + "WT20", "WT21", "WT22", "WT23", "WT24", "WT25" + ] + turbine_types: 0: !include ../plant_energy_turbine/IEA37_10MW_turbine.yaml - 1: !include ../plant_energy_turbine/IEA37_15MW_turbine.yaml \ No newline at end of file + 1: !include ../plant_energy_turbine/IEA37_15MW_turbine.yaml diff --git a/windIO/schemas/plant/wind_farm.yaml b/windIO/schemas/plant/wind_farm.yaml index 6005cd9..004350a 100644 --- a/windIO/schemas/plant/wind_farm.yaml +++ b/windIO/schemas/plant/wind_farm.yaml @@ -1,127 +1,133 @@ $schema: "http://json-schema.org/draft-07/schema#" $id: "windIO/plant/wind_farm" title: Definition of the wind energy conversion system -description: A file used to define either a single wind farm or multiple wind farms with turbine type mappings and additional built environment components -required: - - name - - layouts -optional: - - electrical_substations - - electrical_collection_array - - foundations - - O_&_M +description: >- + A file used to define either a single wind farm or multiple wind farms. + Each wind farm includes its own turbine layout, turbine type mappings, + and additional built environment components such as electrical substations. +oneOf: + - $ref: "#/definitions/wind_farm" + - type: array + description: Multiple wind farms sharing the same site and energy resource + minItems: 1 + items: + $ref: "#/definitions/wind_farm" -# PROPERTIES -properties: - name: - description: Name of the wind farm or wind farm system - type: string +# DEFINITIONS +definitions: + wind_farm: + title: Wind farm + description: A single wind farm definition with its own layout, turbine types, and infrastructure + type: object + required: + - name + - layouts + optional: + - electrical_substations + - electrical_collection_array + - foundations + - O_&_M + properties: + name: + description: Name of the wind farm + type: string - layouts: - description: Position of wind turbines. Supports single or multiple layouts. - oneOf: # Allow either single layout as an object or multiple layouts as an array - - type: object - required: - - coordinates - properties: - coordinates: - description: List of turbine coordinates for this layout - $ref: "./common.yaml#/definitions/coordinates" - turbine_types: - description: (Optional) List of turbine types corresponding to turbine positions. - type: array + layouts: + description: Position of wind turbines. Supports single or multiple layouts. + oneOf: + - $ref: "#/definitions/layout" + - type: array items: - type: integer - turbine_identifiers: - description: List of turbine id/tags - type: array - items: - type: string + $ref: "#/definitions/layout" + + turbines: + description: (Optional) The full turbine definition for the entire wind farm + $ref: "./turbine.yaml#" - - type: array + turbine_types: + description: >- + (Optional) List of turbine types used for layouts. + Required if turbine_types is used in layouts. + type: object + additionalProperties: + $ref: "./turbine.yaml#" + + electrical_substations: + description: Information about electrical substations for this wind farm + type: array items: type: object required: - - coordinates + - electrical_substation properties: - coordinates: - description: List of turbine coordinates for this layout - $ref: "./common.yaml#/definitions/coordinates" - turbine_types: - description: (Optional) List of turbine types corresponding to turbine positions. - type: array - items: - type: integer - turbine_identifiers: - description: List of turbine id/tags - type: array - items: - type: string + electrical_substation: + $ref: "#/definitions/electrical_substation" - turbines: - description: (Optional) The full turbine definition for the entire wind farm - $ref: "./turbine.yaml#" - - turbine_types: - description: (Optional) List of turbine types used for layouts. Required if turbine_types is used in layouts. - type: object - additionalProperties: - $ref: "./turbine.yaml#" - - electrical_substations: - description: Information about electrical substations - type: array - items: - type: object - required: - - electrical_substation - properties: - electrical_substation: - $ref: "#/definitions/electrical_substation" + electrical_collection_array: + title: Electrical collection array + description: Definition of electrical collection array (cable layout) for this wind farm. + type: object + required: + - edges + - cables + properties: + edges: + title: Edges of cable layout + description: List of edges (branches) in the cable layout [[from_node, to_node, cable_type], ...]. + type: array + cables: + title: Cables + description: List of the cables + type: object + required: + - cable_type + - cross_section + - capacity + - cost + properties: + cable_type: + title: Cable type + description: List of available cable types + type: array + units: mm^2 + cross_section: + title: Cross section + description: List of cable cross sections + type: array + units: mm^2 + capacity: + title: Cable capacity + description: List of cable capacities + type: array + cost: + title: Cable cost + description: List of cable costs + type: array + units: USD/m - electrical_collection_array: - title: Electrical collection array - description: Definition of electrical collection array (cable layout) for wind farm. + layout: + title: Wind farm layout + description: A single layout specifying turbine positions and optional type/identifier mappings type: object required: - - edges - - cables + - coordinates properties: - edges: - title: Edges of cable layout - description: List of edges (branches) in the cable layout [[from_node, to_node, cable_type], ...]. + coordinates: + description: List of turbine coordinates for this layout + $ref: "./common.yaml#/definitions/coordinates" + turbine_types: + description: >- + (Optional) List of turbine types corresponding to turbine positions. + Values are integer indices into the wind farm's turbine_types mapping. type: array - cables: - title: Cables - description: List of the cables - type: object - required: - - cable_type - - cross_section - - capacity - - cost - properties: - cable_type: - title: Cable type - description: List of available cable types - type: array - units: mm^2 - cross_section: - title: Cross section - description: List of cable cross sections - type: array - units: mm^2 - capacity: - title: Cable capacity - description: List of cable capacities - type: array - cost: - title: Cable cost - description: List of cable costs - type: array - units: USD/m + items: + type: integer + turbine_identifiers: + description: List of turbine id/tags + type: array + items: + type: string -definitions: coordinates: title: Wind turbine or substation coordinates type: object From 0b27f62c07ceb02e5bd7015cc03787123089b2de Mon Sep 17 00:00:00 2001 From: Julian Quick Date: Fri, 27 Feb 2026 08:01:57 -0800 Subject: [PATCH 2/2] typo --- .../plant/plant_wind_farm/multiple_types.yaml | 89 +++++++++---------- 1 file changed, 44 insertions(+), 45 deletions(-) diff --git a/windIO/examples/plant/plant_wind_farm/multiple_types.yaml b/windIO/examples/plant/plant_wind_farm/multiple_types.yaml index 3b52af1..03eeddc 100644 --- a/windIO/examples/plant/plant_wind_farm/multiple_types.yaml +++ b/windIO/examples/plant/plant_wind_farm/multiple_types.yaml @@ -1,46 +1,45 @@ -wind_farm: - - name: IEA Wind Task 37 Case study 3, North Farm - layouts: - - coordinates: - x: [ - 10363.7833, 9894.9437, 8450.2895, 9008.9311, 9567.5726, 10126.2142, - 7862.2807, 8537.7355, 9213.1903, 9888.6451, 7274.2718, 8066.5399, - 8858.8079, 9651.0760 - ] - y: [ - 6490.2719, 6316.9180, 6455.3421, 6043.4997, 5631.6572, 5219.8148, - 5665.8933, 5093.7148, 4521.5362, 3949.3577, 4876.4446, 4143.9299, - 3411.4153, 2678.9006 - ] - z: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] - crs: +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs +type=crs - turbine_types: [1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0] - turbine_identifiers: [ - "WT01", "WT02", "WT03", "WT04", "WT05", "WT06", "WT07", - "WT08", "WT09", "WT10", "WT11", "WT12", "WT13", "WT14" - ] - turbine_types: - 0: !include ../plant_energy_turbine/IEA37_10MW_turbine.yaml - 1: !include ../plant_energy_turbine/IEA37_15MW_turbine.yaml +- name: IEA Wind Task 37 Case study 3, North Farm + layouts: + - coordinates: + x: [ + 10363.7833, 9894.9437, 8450.2895, 9008.9311, 9567.5726, 10126.2142, + 7862.2807, 8537.7355, 9213.1903, 9888.6451, 7274.2718, 8066.5399, + 8858.8079, 9651.0760 + ] + y: [ + 6490.2719, 6316.9180, 6455.3421, 6043.4997, 5631.6572, 5219.8148, + 5665.8933, 5093.7148, 4521.5362, 3949.3577, 4876.4446, 4143.9299, + 3411.4153, 2678.9006 + ] + z: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] + crs: +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs +type=crs + turbine_types: [1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0] + turbine_identifiers: [ + "WT01", "WT02", "WT03", "WT04", "WT05", "WT06", "WT07", + "WT08", "WT09", "WT10", "WT11", "WT12", "WT13", "WT14" + ] + turbine_types: + 0: !include ../plant_energy_turbine/IEA37_10MW_turbine.yaml + 1: !include ../plant_energy_turbine/IEA37_15MW_turbine.yaml - - name: IEA Wind Task 37 Case study 3, South Farm - layouts: - - coordinates: - x: [ - 6686.2630, 7371.5049, 8056.7467, 8741.9886, 9427.2305, - 6098.2541, 6750.8566, 7403.4592, 8056.0622, 8708.6700, 9361.2778 - ] - y: [ - 4086.9958, 3416.8405, 2746.6851, 2076.5297, 1406.3743, - 3297.5471, 2665.4498, 2033.3525, 1401.2557, 769.1637, 137.0718 - ] - z: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] - crs: +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs +type=crs - turbine_types: [0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1] - turbine_identifiers: [ - "WT15", "WT16", "WT17", "WT18", "WT19", - "WT20", "WT21", "WT22", "WT23", "WT24", "WT25" - ] - turbine_types: - 0: !include ../plant_energy_turbine/IEA37_10MW_turbine.yaml - 1: !include ../plant_energy_turbine/IEA37_15MW_turbine.yaml +- name: IEA Wind Task 37 Case study 3, South Farm + layouts: + - coordinates: + x: [ + 6686.2630, 7371.5049, 8056.7467, 8741.9886, 9427.2305, + 6098.2541, 6750.8566, 7403.4592, 8056.0622, 8708.6700, 9361.2778 + ] + y: [ + 4086.9958, 3416.8405, 2746.6851, 2076.5297, 1406.3743, + 3297.5471, 2665.4498, 2033.3525, 1401.2557, 769.1637, 137.0718 + ] + z: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] + crs: +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs +type=crs + turbine_types: [0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1] + turbine_identifiers: [ + "WT15", "WT16", "WT17", "WT18", "WT19", + "WT20", "WT21", "WT22", "WT23", "WT24", "WT25" + ] + turbine_types: + 0: !include ../plant_energy_turbine/IEA37_10MW_turbine.yaml + 1: !include ../plant_energy_turbine/IEA37_15MW_turbine.yaml