Isolated Propeller

Isolated Propeller#

This example demonstrates the simulation of an isolated propeller with Flow360 Python API. We show how to set up the geometry, define a rotating mesh zone, specify operating conditions, and configure unsteady simulation parameters.

 1import flow360 as fl
 2from flow360.examples import IsolatedPropeller
 3
 4IsolatedPropeller.get_files()
 5
 6project = fl.Project.from_geometry(IsolatedPropeller.geometry, name="Isolated Propeller")
 7
 8geometry = project.geometry
 9geometry.group_edges_by_tag("edgeId")
10geometry.group_faces_by_tag("faceName")
11
12
13with fl.SI_unit_system:
14    rotating_cylinder = fl.Cylinder(
15        name="Rotating zone",
16        center=[0, 0, 0],
17        axis=[1, 0, 0],
18        outer_radius=2,
19        height=0.8,
20    )
21    refinement_cylinder = fl.Cylinder(
22        name="Refinement zone",
23        center=[1.9, 0, 0],
24        axis=[1, 0, 0],
25        outer_radius=2,
26        height=4,
27    )
28    slice = fl.Slice(name="Slice", normal=[1, 0, 0], origin=[0.6, 0, 0])
29    volume_zone_rotating_cylinder = fl.RotationVolume(
30        name="Rotation cylinder",
31        spacing_axial=0.05,
32        spacing_radial=0.05,
33        spacing_circumferential=0.05,
34        entities=[rotating_cylinder],
35        enclosed_entities=[geometry["*"]],
36    )
37    farfield = fl.AutomatedFarfield(name="Farfield")
38    params = fl.SimulationParams(
39        meshing=fl.MeshingParams(
40            defaults=fl.MeshingDefaults(
41                surface_max_edge_length=1,
42                boundary_layer_first_layer_thickness=0.1 * fl.u.mm,
43            ),
44            refinements=[
45                fl.UniformRefinement(
46                    name="Uniform refinement",
47                    spacing=0.025,
48                    entities=[refinement_cylinder],
49                )
50            ],
51            volume_zones=[farfield, volume_zone_rotating_cylinder],
52        ),
53        reference_geometry=fl.ReferenceGeometry(
54            area=1, moment_center=[0, 0, 0], moment_length=[1, 1, 1]
55        ),
56        operating_condition=fl.AerospaceCondition(velocity_magnitude=20),
57        models=[
58            fl.Wall(name="Wall", surfaces=[geometry["*"]]),
59            fl.Freestream(name="Freestream", surfaces=[farfield.farfield]),
60            fl.Fluid(
61                navier_stokes_solver=fl.NavierStokesSolver(relative_tolerance=0.01),
62                turbulence_model_solver=fl.SpalartAllmaras(
63                    relative_tolerance=0.01, hybrid_model=fl.DetachedEddySimulation()
64                ),
65            ),
66            fl.Rotation(
67                name="Rotation",
68                volumes=[rotating_cylinder],
69                spec=fl.AngularVelocity(value=200 * fl.u.rpm),
70            ),
71        ],
72        time_stepping=fl.Unsteady(
73            steps=600,
74            step_size=0.0025,
75            max_pseudo_steps=35,
76            CFL=fl.AdaptiveCFL(
77                min=0.1,
78                max=10000,
79                max_relative_change=1,
80                convergence_limiting_factor=0.5,
81            ),
82        ),
83        outputs=[
84            fl.SurfaceOutput(
85                name="Surface output",
86                output_fields=["Cp", "yPlus", "Cf", "CfVec"],
87                surfaces=[geometry["*"]],
88            ),
89            fl.SliceOutput(
90                name="Slice output",
91                output_fields=["qcriterion", "vorticity", "Mach"],
92                slices=[slice],
93            ),
94        ],
95    )
96
97
98project.run_case(params, name="Isolated propeller case")

Technical Details#

  • The propeller is modeled using a rotating cylindrical mesh zone with a rotational speed of 200 RPM.

  • A second cylinder is used as a refinement region to increase mesh density around the propeller.

  • Outputs include volumetric data (q-criterion, vorticity) on a slice plane and surface data (Cp, yPlus) .