Table of Contents

Upgrader

The Upgrader is a set of tools and scripts that convert PRJ or $PJ files from the latest Bladed 4.14 to a Bladed Next Gen JSON format. The changes on the outputs incurred when upgrading should be minimal as can be seen documented in the migration section of the reference pages.

The process of upgrading a file can be seen in Figure-1.

Upgrading Process

Figure-1: Full upgrading process schematic.

The upgrading steps are the following:

  1. Read the PRJ or $PJ into the latest Bladed 4.14 GUI
  2. Produce an XML file corresponding to the active simulation
  3. Run the xml-upgrader.exe tool and produce a JSON file

When using the PRJ as an input the Upgrader will only upgrade the active simulation. However, unlike the $PJ, it does upgrade modelling information that is not necessary for that simulation but is contained in the input file.

Prerequisites

The upgrading process requires the installation of the latest Bladed 4.14 and a valid Graphical User Interface (GUI) license whenever the user intends to upgrade either PRJ or $PJ files.

Supported Simulation Types

Currently, the Upgrader tools will only upgrade the following simulation types:

  • Power Coefficient
  • Aerodynamic Information

Any other calculation type will terminate the process with exit code 1

Current Limitations

ModalModelling.WholeBladeModes

ModalModelling.WholeBladeModes is a collection of Structural Modes with a size that matches the number of WholeBladedModes provided by the Bladed 4.14 API. It should only contain a collection of Structural Modes with a size taken from NewGUI.Turbine.Blades.FlexibilityModel.Settings.ModesWithDampingDefined. Currently the variables are populated with all whole blade modes available in the Bladed 4.14 API, which tends to have more values than it should.

  • Expected behaviour: ModalModelling.WholeBladeModes is a collection of structural modes with a size matching NewGUI.Turbine.Blades.FlexibilityModel.Settings.ModesWithDampingDefined, and populated from the first n WholeBladedModes provided by the B4 API, where n = NewGUI.Turbine.Blades.FlexibilityModel.Settings.ModesWithDampingDefined
  • Current behaviour: ModalModelling.WholeBladeModes is a collection of structural modes with a size that matches the number of WholeBladedModes provided by the B4 API (sometimes this is too many)

Failure to upgrade models with split stations

There is a known issue when upgrading blades with multiple split stations.

The upgrader omits both sides of the split station - rather than including both.

Mass properties being added where none existed

Mass Properties are being added by the Upgrader to JSON input in cases where the dtbalded.in file doesn't have any Mass Properties defined.

It upgrades the values that it sees in the PRJ even when the Mass Properties are of no value for the selected calculation. It is possible that there is no repercussions on the results but further tests need to be made.

Multi-rotor turbines are not supported

Multi-rotor turbines are currently not upgraded properly.

Simulation Options panel is upgraded to the default options

The simulations Options panel are set as the defaults for the specific calculation instead of being upgraded to the values shown in the bladed 4.14 graphical interface.

Contents

The Upgrader is installed together with the Bladed Next Gen standard installation, all the necessary files can be found in the following subfolder of Bladed Next Gen installation location:

Bladed Next Generation 
  > bin
    bladed-upgrader.cmd
    ..
  > upgrader 
    > scripts
      bladed-upgrader.ps1
      ..
  ..
..

In the main bin folder you will find the Windows Command Prompt script bladed-upgrader.cmd.

In the ../upgrader/scripts folder you will find the PowerShell alternative script bladed-upgrader.ps1 to upgrade your PRJ or $PJ to JSON.

Both bladed-upgrader.cmd and bladed-upgrader.ps1 wrap the entire Bladed Upgrader process into a single simple set of commands.

Upgrading Scripts

Figure-2: Scripts wrapping the upgrading process.

Command Line Basic Upgrading Process (bladed-upgrader.cmd)

bladed-upgrader.cmd is the easiest way to upgrade your simulation, by directly converting PRJ or $PJ to JSON files. This application is accessible in your environmental PATH variable, which means that just like bladed.exe it can be invoked from any folder you might be working on in your Command Prompt without needing to know where it has been installed by simply typing it's name.

Bladed Next Generation 
  > bin
    bladed-upgrader.cmd
    ..
  ..
..

Command Line Interface (CLI) Usage

For examples on how to use this application please see the Upgrader tutorial page Upgrade using Command Line.

The Command Prompt script should be run invoking the different commands explained bellow.

> bladed-upgrader -PrjFilePath <path-to-project-file>
Note

In the Windows Command Prompt a path or file name with spaces has to be limited by double quotation marks , e.g.: bladed-upgrader -PrjFilePath "c:\dir with spaces\name with space" Do not include a backslash at the end of the folder path before the end of the double quotation marks like this: \". Doing so will be interpreted as an escape character and will assume that the quotation mark is part of the path name and not a path termination character.

Command Line Interface (CLI) Parameter

-h
    Display help doc

-PrjFilePath <String>
  
  [`Mandatory`] The file selector that specifies which PRJ file is to be upgraded.
  Note- use single quotes to specify file paths.

-OutputDir <String>

  [Optional] The directory to which the upgraded JSON file will be written.
  This will default to the directory of the PRJ file being upgraded.

-OutputName <String>
  
  [Optional] The file name of the upgraded JSON file.
  This will default to the base of the PRJ file name.

-Force
  
  [Optional] If there is already a JSON file with same name present no upgrade will be performed.
  Set this flag to force an upgrade.

-Bladed4Path <String>
  
  [Optional] The path to the Bladed 4.14 installation
  Defaults to "C:\DNV\Bladed 4.14"

-Quiet
  
  [Optional] To enable minimum console output
  Defaults to false

PowerShell Alternative Upgrading Process (bladed-upgrader.ps1)

In the case of the PowerShell script bladed-upgrader.ps1, you need to correctly manage the file paths as it is not included in the environmental PATH variable nor does it run by pressing it twice in the Windows Explorer navigation window.

Bladed Next Generation 
  > upgrader 
    > scripts
      bladed-upgrader.ps1
      ..
  ..
..

PowerShell Usage

Important

The PowerShell script is coded with relative paths and therefore should not be moved from its original installation location. It requires and assumes a specific location for the 'xml-upgrader.exe' utility needed to complete the upgrading process.

Upgrade-PRJ.ps1 is invoked by passing a single project file (PRJ or $PJ) path to upgrade. Only the active simulation will be upgraded.

To run a simple upgrade you can call the PowerShell script followed by the input file:

>.\Upgrade-PRJ.ps1 <path-to-project-file>
Note

In the PowerShell terminal a path or file name with spaces can should be limited by single quotation marks, e.g.: bladed-upgrader.ps1 -PrjFilePath 'c:\dir with spaces\name with space'

Extended options can be added to the PowerShell command line as follow:

>.\bladed-upgrader.ps1 [-PrjFilePath] <path-to-project-file> [[-OutputDir]
    <DirectoryInfo>] [[-OutputName] <String>] [-Force] [[-Bladed4Path] <String>] [-Quiet] [-WhatIf] [-Confirm]
    [<CommonParameters>]

The output directory and file names can be customised via the -OutputDir and -OutputName parameters to this script.

The option -Bladed4Path can be used explicitly provide the location of Bladed 4.14 in case the location is not automatically caught by the Upgrader. The script requires a Bladed 4.14 installation on the same machine and by default it assumes it is installed at 'C:\DNV\Bladed 4.14' folder.

PowerShell Parameters

You can display all the available info about the script and its parameters by using Get-Help command:

> Get-Help .\bladed-upgrader.ps1 -Full

This will show you a description of the script and the following parameters:

-PrjFilePath <String>
    The file selector that specifies which PRJ file is to be upgraded.
    Note, use single quotes to specify file paths.

    Required?                    true
    Position?                    1
    Default value
    Accept pipeline input?       true (ByValue)
    Accept wildcard characters?  false

-OutputDir <DirectoryInfo>
    [Optional] The directory to which the upgraded JSON file will be written.

    This will default to the directory of the PRJ file being upgraded.

    Required?                    false
    Position?                    2
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-OutputName <String>
    [Optional] The file name of the upgraded JSON file.

    This will default to the base of the PRJ file name.

    Required?                    false
    Position?                    3
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Force [<SwitchParameter>]
    [Optional] If there is already a JSON file with same name present no upgrade will be performed.
    Set this flag to force an upgrade.

    Required?                    false
    Position?                    named
    Default value                False
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Bladed4Path <String>
    [Optional] The path to the Bladed 4.14 installation
    Defaults to 'C:\DNV\Bladed 4.14'

    Required?                    false
    Position?                    4
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Quiet [<SwitchParameter>]
    [Optional] To enable minimum console output
    Defaults to false

    Required?                    false
    Position?                    named
    Default value                False
    Accept pipeline input?       false
    Accept wildcard characters?  false

-WhatIf [<SwitchParameter>]

    Required?                    false
    Position?                    named
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

-Confirm [<SwitchParameter>]

    Required?                    false
    Position?                    named
    Default value
    Accept pipeline input?       false
    Accept wildcard characters?  false

<CommonParameters>
    This cmdlet supports the common parameters: Verbose, Debug,
    ErrorAction, ErrorVariable, WarningAction, WarningVariable,
    OutBuffer, PipelineVariable, and OutVariable. For more information, see
    about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).

What next?

To learn the basics of the upgrade process, you can try the following tutorial: Upgrade using Command Line