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.
Key Components#
The migration tools consist of two primary functions:
- read_single_v1_BETDisk(file_path, mesh_unit, freestream_temperature)#
Constructs a single :class: BETDisk instance from a given V1 (legacy) Flow360 input.
- Parameters:
file_path (str) – Path to Flow360 JSON file that contains a single BETDisk setting.
mesh_unit (LengthType.NonNegative) – Length unit used for LengthType BETDisk parameters.
time_unit (TimeType.Positive) – Time unit used for non-dimensionalization.
freestream_temperature (Annotated[_AbsoluteTemperatureType, PlainSerializer(func=~flow360.component.simulation.unit_system._dimensioned_type_serializer, return_type=PydanticUndefined, when_used=always), AfterValidator(func=~flow360.component.simulation.unit_system._check_temperature_is_physical)])
- Returns:
An instance of
BETDisk
completed with given inputs.- Return type:
Examples
Create a BET disk with an XROTOR file.
>>> param = fl.BETDisk.from_flow360( ... file=fl.Flow360File(file_name="flow360.json")), ... mesh_unit=param.length_unit, ... time_unit=param.time_unit, ... )
- read_all_v1_BETDisks(file_path, mesh_unit, freestream_temperature)#
Read in Legacy V1 Flow360.json and convert its BETDisks settings to a list of :class: BETDisk instances
- Parameters:
file_path (str) – Path to the Flow360.json file.
mesh_unit (LengthType.NonNegative) – Length unit used for LengthType BETDisk parameters.
time_unit (TimeType.Positive) – Time unit used for non-dimensionalization.
freestream_temperature (Annotated[_AbsoluteTemperatureType, PlainSerializer(func=~flow360.component.simulation.unit_system._dimensioned_type_serializer, return_type=PydanticUndefined, when_used=always), AfterValidator(func=~flow360.component.simulation.unit_system._check_temperature_is_physical)])
- Return type:
Examples
Create a BET disk with an XROTOR file.
>>> param = fl.BETDisk.from_flow360( ... file=fl.Flow360File(file_name="flow360.json")), ... mesh_unit=param.length_unit, ... time_unit=param.time_unit, ... )
These functions:
Automatically assign units to legacy BETDisk parameters based on the mesh unit.
Convert legacy parameter names to the current API format.
Create the corresponding Cylinder entity required for each BET disk.
Calculate the non-dimensional rotation speed (omega) using freestream conditions.
Usage Examples#
Single BET Disk Migration#
import flow360 as fl
from flow360.component.simulation.migration import BETDisk
# Read and convert single BET disk configuration
my_BETDisk = BETDisk.read_single_v1_BETDisk(
file_path="./BET_tutorial_Flow360.json",
mesh_unit=fl.u.m,
freestream_temperature=300 * fl.u.K,
)
# Use the converted BET disk in simulation
with fl.SI_unit_system:
params = fl.SimulationParams(
models=[my_BETDisk],
# ... other parameters ...
)
# Modify BET disk properties if needed
params.models[0].omega = 500 * fl.u.rpm
Multiple BET Disks Migration#
import flow360 as fl
from flow360.component.simulation.migration import BETDisk
# Initialize simulation parameters
with fl.SI_unit_system:
params = fl.SimulationParams(
operating_condition=fl.AerospaceCondition(velocity_magnitude=10)
)
# Read and convert multiple BET disk configurations
bet_disks = BETDisk.read_all_v1_BETDisks(
file_path="./multi_BET_tutorial_Flow360.json",
mesh_unit=fl.u.m,
freestream_temperature=params.operating_condition.thermal_state.temperature,
)
# Use the converted BET disks in simulation
params = fl.SimulationParams(
models=bet_disks,
# ... other parameters ...
)
# Modify properties of specific BET disks if needed
params.models[0].omega = 500 * fl.u.rpm # First disk
params.models[1].omega = 750 * fl.u.rpm # Second disk
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 the BET disk:
Legacy Parameter |
Current Parameter |
---|---|
|
|
|
|
|
|
|
Note: The 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 requires specification of the mesh unit and freestream temperature for proper unit assignment.
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
Tip Gap Handling: The tool supports both finite and infinite tip gap configurations.
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": [...]
}
]
}