Set up a simulation in JSON
Summary
This tutorial will take you over how to setup a simulation and different simulation types in JSON.
Prerequisites
- Latest version of Bladed Next Gen and Samples installed including the Bladed Python packages.
- Licence for Bladed Next Gen (request a licence).
- (Optional) Bladed Results Viewer.
We would recommend opening the samples folder in VS Code to follow along with these tutorials.
If you do not yet know how to run a simulation, please follow the instructions and checks in the Get started and Run a simulation tutorials before continuing.
Subjects Covered
By the end of this tutorial you should have:
- Made simple changes to the Bladed JSON input deck.
- Run bladed.exe with the modified input, and seen the effects of your changes.
- Changed the analysis to an aerodynamic information calculation.
- Gained an appreciation for how the turbine configuration is specified.
Sample Input Decks
There are example models provided in the samples (see the .json
extension files in the samples folder).
The first section of this tutorial walks you through the same exercises that are described in the _exercise
tags of demo_a_pcoeffs.json
.
The second section of this tutorial walks you through the same exercises that are described in the _exercise
tags of NG_IEA_15_Onshore_SteadyOP.json
.
Note
Currently all values in the input decks are in S.I. units, which for many users this will be the preferred behaviour. It is the intention to implement a system of units in JSON for users who interact with the file a lot, as they may prefer to use rpm for rotor speed, degrees for wind direction, etc.
Are alternative units important to you? Let us know about it
demo_a_pcoeffs.json
In this section of the tutorial we will use the performance coefficients calculation based on the demo_a model (demo_a_pcoeffs.json
). This is a very simple model which has been annotated with _description
, _comment
, and _exercise
tags. These tags can help you understand the structure of the model better.
Exercise 1.3: Switching to an Aerodynamic Information Calculation
The demo_a_pcoeffs.json
example contains a commented out definition of SteadyCalculation
which defines an aerodynamic information calculation (see the top-level node _SteadyCalculation
).
Have a look at the similarities and differences between SteadyCalculation
and _SteadyCalculation
, and then try switching the underscores of the SteadyCalculation
with _SteadyCalculation
. This will have the effect of commenting out the performance coefficients calculation and activating the aerodynamic information calculation.
Run bladed.exe with your modified input file.
You should be able to see the effect of your changes in three places:
- The output in the Windows command line (cmd)
- In the text of the $ME file
- In the results produced
Note
The full list of steady calculations can be inferred from the auto-complete options of SteadyCalculationType
, or by hovering over the properties SteadyCalculation
or SteadyCalculationType
. For those without it, they are AerodynamicInformation
, PerformanceCoefficients
, SteadyPowerCurve
, SteadyOperationalLoads
, SteadyParkedLoads
, CampbellDiagram
, BladeStabilityAnalysis
, and ModelLinearisation
. There is a mutually-exclusive node called TimeDomainSimulation
which covers all time-domain runs (this includes start-up, emergency stop, etc) as well as hardware-in-the-loop simulations.
Of the SteadyCalculationType
only the SteadyOperationalLoads
is currently supported.
NG_IEA_15_Onshore_SteadyOP.json
The turbine we are using is the IEA_15MW_240-RWT which is shipped with Bladed 4.16 upwards as a demo model. It is a direct-drive turbine with a rated wind speed of 10.6 m/s and a design tip-speed-ratio of 9, and the blade has both pre-bend and pre-sweep.
Open the NG_IEA_15_Onshore_SteadyOP.json
file in the samples folder you have downloaded and unzipped, in VS Code or your preferred editor.
The Definition of the Calculation
The first section in the file defines the calculation to be performed by Bladed:
"SteadyCalculation": {
"SteadyCalculationType": "SteadyOperationalLoads",
"Outputs": {
"FileStem": "NG_IEA_15_Onshore_SteadyOP"
},
"WindSpeedRange": {
"Minimum": 5.0,
"Maximum": 25.0,
"Interval": 1.0
}
}
In this case we are defining a SteadyCalculation
of type SteadyOperationalLoads
. This defines a WindSpeedRange
which defines the Minimum
, Maximum
, and Interval
at which the steady conditions will be evaluated.
The Outputs
section here is reduced from the demo_a_pcoeffs.json example, as we are expecting to provide the output directory on the Windows command line (cmd) when we run bladed.exe.
Running the Calculation
You are now ready to run the calculation. Go to your terminal and run the following command:
bladed.exe -d NG_IEA_15_Onshore_SteadyOP.json -o <your output directory>
To see all available command line switches type in
bladed.exe -h
After the simulation has finished you can use the Bladed Results Viewer to inspect the output.
Conclusions
By this point it is hoped that you will have a general understanding of:
- Making simple changes to the Bladed JSON input deck.
- Running bladed.exe with the modified input, and seen the effects of your changes.
- Changing the simulation type.