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 |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Cylinder Entity Parameters#
The following parameters are used to create the associated cylinder entity for each BET disk:
Legacy Parameter |
Current Parameter |
---|---|
|
|
|
|
|
|
|
Note: Each cylinder entity is automatically created with:
inner_radius
set to 0name
generated as βbet_cylinder{N}β where N is the disk index
Important Considerations#
Units: The migration process allows specification of custom units for:
Length parameters
Angle parameters
Angular velocity
Geometry Parameters: The tool automatically converts geometric parameters such as:
Axis of rotation
Center of rotation
Radius
Thickness
Aerodynamic Data: The migration preserves:
Lift coefficients
Drag coefficients
Mach numbers
Reynolds numbers
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#
Always verify the converted parameters before running simulations
Ensure proper mesh resolution around BET disk regions
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": [...]
}
]
}