BET Migration Tools#

Overview#

The Blade Element Theory (BET) migration tools in Flow360 provide a robust framework for converting legacy V1 BET configurations to the current Flow360 version. This guide outlines the process of migrating BET disk configurations to the latest Flow360 format.

Function Details#

bet_disk_convert(file, save=False, length_unit=m, angle_unit=degree, omega_unit=degree / s)[source]#

Convert old BETDisks input from a json file into the new BETDisk format.

This function provides the updated version of BETDisk parameters used in describing simulation cases.

Parameters:
  • file (str) – Name of the json file containing BETDisk information. Default is None.

  • save_to_file (bool, optional) – Choose whether to save the output to a file/files.

  • length_unit (LengthType, optional) – BETDisk parameters length unit. Default is u.m

  • angle_unit (AngleType, optional) – BETDisk parameters angle unit. Default is u.deg

  • omega_unit (AngularVelocityType, optional) – BETDisk omega’s unit. Default is u.deg / u.s.

  • save (bool | None)

Returns:

List of BETDisks defined using the provided file. List of Cylinders defined using the provided file.

Return type:

BETDisks, Cylinders

Raises:
  • AttributeError – If the input unit values don’t exit in the β€˜unyt’ module.

  • TypeError – If required file name is not provided.

  • FileNotFoundError – If the provided file does not exist.

Examples

Example usage:

>>> BETDisks, Cylinders = bet_disk_convert(
...     file="xv15_bet_line_hover_good.json",
...     length_unit = u.ft,
...     save = True,
... )
>>> print(BETDisks[0])

The function automatically handles:

  • Unit conversion for all parameters based on specified units

  • Creation of associated cylinder entities for each BET disk

  • Parameter name mapping from legacy to current format

  • Optional saving of converted configurations to JSON files

Usage Examples#

Basic BET Disk Migration#

import flow360 as fl
from flow360.component.simulation.unit_system import u

# Convert BET disk configuration with default units
bet_disks, cylinders = bet_disk_convert(
    file="BET_tutorial_Flow360.json",
    save=True,
)

# Print the converted BET disk configuration
print(bet_disks[0])

# Use the converted BET disks in simulation
with fl.SI_unit_system:
    params = fl.SimulationParams(
        models=[fl.BETDisk(bet_disks[0])],
        # ... other parameters ...
    )

Custom Unit Migration#

import flow360 as fl
from flow360.component.simulation.unit_system import u

# Convert BET disk configuration with custom units
bet_disks, cylinders = bet_disk_convert(
    file="BET_tutorial_Flow360.json",
    save=True,
    length_unit=u.ft,
    angle_unit=u.rad,
    omega_unit=fl.u.rpm,
)

# Print the converted BET disk configuration
print(bet_disks[0])

Parameter Mapping#

The migration process automatically handles the conversion of legacy parameters to their current equivalents. The following tables show the complete mapping of parameters:

BET Disk Parameters#

Legacy Parameter

Current Parameter

rotationDirectionRule

rotation_direction_rule

numberOfBlades

number_of_blades

ReynoldsNumbers

reynolds_numbers

chordRef

chord_ref

nLoadingNodes

n_loading_nodes

sectionalRadiuses

sectional_radiuses

sectionalPolars

sectional_polars

MachNumbers

mach_numbers

liftCoeffs

lift_coeffs

dragCoeffs

drag_coeffs

tipGap

tip_gap

initialBladeDirection

initial_blade_direction

bladeLineChord

blade_line_chord

Cylinder Entity Parameters#

The following parameters are used to create the associated cylinder entity for each BET disk:

Legacy Parameter

Current Parameter

axisOfRotation

axis

centerOfRotation

center

radius

outer_radius

thickness

height

Note: Each cylinder entity is automatically created with:

  • inner_radius set to 0

  • name generated as β€œbet_cylinder{N}” where N is the disk index

Important Considerations#

  1. Units: The migration process allows specification of custom units for:

    • Length parameters

    • Angle parameters

    • Angular velocity

  2. Geometry Parameters: The tool automatically converts geometric parameters such as:

    • Axis of rotation

    • Center of rotation

    • Radius

    • Thickness

  3. Aerodynamic Data: The migration preserves:

    • Lift coefficients

    • Drag coefficients

    • Mach numbers

    • Reynolds numbers

  4. File Output: When save=True, the function creates separate JSON files for:

    • Each BET disk configuration (betdisk{N}.json)

    • Each associated cylinder (cylinder{N}.json)

Best Practices#

  1. Always verify the converted parameters before running simulations

  2. Ensure proper mesh resolution around BET disk regions

  3. Consider tip gap effects in the simulation setup

Example Configuration#

A typical Legacy BET disk configuration includes:

{
    "BETDisks": [
        {
            "axisOfRotation": [0, 0, 1],
            "centerOfRotation": [0, 0, 0],
            "radius": 1.0,
            "thickness": 0.1,
            "numberOfBlades": 4,
            "omega": 1000,
            "sectionalPolars": [...],
            "twists": [...],
            "chords": [...]
        }
    ]
}