Bézier for Python users
The `bezier` python package allows you to work with power curve data in python, for time-series and other data analysis purposes.
After four years of internal use, the Bézier python package is presently being open-sourced. We're working with a select few early-stage customers to simplify and improve its performance and documentation, as well as bringing it up to date with the latest evolutions in the upcoming IEC 61400-16 standard.
If you'd like early access to the python library please contact us.
Until general release, the instructions below won't work - but this page should give you a flavour of what's coming.
Installation
The bezier
package is available on pypi so is easily installable with pip
, poetry
or any other python package manager. We recommend the use of the uv
package manager for your python environment and dependencies (here's why), so installation is as simple as:
uv add bezier
// Or if you prefer to use pip
pip install bezier
Quick Start
You can use your own turbine power curves, expressed in JSON
form. But there are turbines built in to the library for example purposes. You can load them up simply by using the label of that turbine:
>> from bezier import ALL_TURBINE_LABELS
>> print(ALL_TURBINE_LABELS)
[ "gm-5-abc-1", "gm-5-abc-2", ... ]
You can load any of the builtin power curves directly from its label, and inspect its data.
>> curve = PowerCurve('gm-5-abc-1')
>> print(curve.get_description())
"The GM-5-ABC-1 turbine, part of Generic Machines' 5MW platform, is the first totally fictional example turbine I could think of"
Each top level power curve document can represent multiple "modes" of turbine operation. See which ones are available, and which is the default:
>> print(curve.available_modes)
>> print(curve.default_mode)
Use the default mode, and determine the power and thrust for an input time-series of air density and wind speed:
>> mode_label = curve.default_mode
>> operating_point = {
"air-density": np.array([1.223, 1.224, 1.225, 1.220]),
"wind-speed": np.array([8.63, 10.89, 11.81, 6.28]),
}
>> power, thrust, parameter_labels, xi = curve.get_performance(mode_label, operating_point, as_timeseries=True)
>> print(power)
np.array([4653000, 4853000, 5053000, 2653000])
Next steps
Check the bezier-python library on GitHub for more advanced use cases and package API documentation.
Last updated
Was this helpful?