External-Wake-API

Setting up external wake models

External wake API allows OpenWind users to provide their's own wake models with external programs.

To setup external wake model, go to OpenWind Preferences and choose tab C.

By pressing the highlighted button, you will get into the dialog that allows setting up external wake models:

External wake model request and response

During energy capture with external wake model specified, OpenWind starts the executable specified by Command line in External Wake Models dialog.

OpenWind sends the request in JSON format to the process standard input and then expects the external wake model to provide the results on its standard output.

Example of request:

{
	"wtg_types": [
		{
			"id": "719807390",
			"wtg_file": "<?xml version=\"1.0\" … ",
			"parameters": {
				"Name": "V100-1.8 1.20kg/m3",
				"HubHeight": 120,
				//...more parameters...
			}
		}
	],
	"wtgs": [
		{
			"easting": 500000,
			"northing": 501000,
			"elevation": 37,
			"type_id": "719807390"
		},
		// ...more wtgs...
	],
	"flow_cases": [
		{
			"windspeed": 9,
			"direction": 22.5,
			"speedups": [
				1,
				// ...more – array size is the same as number of wtgs...
			],
			"ti": [
				8.79301576538397,
				// ...more – array size is the same as number of wtgs...
			]
		},
		// ...more flow cases...
	],
	"mode": "frequency"
}

Turbine type is specified both by embedded XML "wtg_file" and duplicated as JSON map of "parameters". "type_id" of indidual wtg instance (of "wtgs" array) corresponds to "id" of "wtg_types" elements.

Flow cases contain "speedups" and "ti" – elements in these arrays correspond to individual "wtgs" elements (turbine instances).

Finally "mode" can be either "frequency" or "timeseries". In timeseries mode, flow cases contain "air_density" at wtgs and "monin_obukhov_length".

External program is supposed to process the request and return a simple JSON array of arrays with computed windspeeds for each wtg:

[[8.9, …windspeeds for more wtgs…], …more flow cases…]