Time-accurate DDES XV15

Contents

Time-accurate DDES XV15#

This example demonstrates the configuration and initiation of a time-accurate simulation for the XV-15 tiltrotor geometry utilizing the Flow360 Python API. It illustrates the process, commencing with the import of a volume mesh containing distinct rotating and stationary zones. It further details the configuration of the fluid model using a Spalart-Allmaras turbulence model with Delayed Detached-Eddy Simulation (DDES) and rotation correction, alongside the setup for the rotating volume and boundary conditions, before submitting the case using the Project interface.

 1import flow360 as fl
 2from flow360.examples import TutorialRANSXv15
 3
 4TutorialRANSXv15.get_files()
 5project = fl.Project.from_volume_mesh(
 6    TutorialRANSXv15.mesh_filename,
 7    name="Tutorial Time-accurate RANS CFD on XV-15 from Python",
 8)
 9volume_mesh = project.volume_mesh
10
11with fl.SI_unit_system:
12    rotation_zone = volume_mesh["innerRotating"]
13    rotation_zone.center = (0, 0, 0) * fl.u.m
14    rotation_zone.axis = (0, 0, -1)
15    params = fl.SimulationParams(
16        reference_geometry=fl.ReferenceGeometry(
17            moment_center=(0, 0, 0),
18            moment_length=(3.81, 3.81, 3.81),
19            area=45.604,
20        ),
21        operating_condition=fl.AerospaceCondition(
22            velocity_magnitude=5,
23            alpha=-90 * fl.u.deg,
24            reference_velocity_magnitude=238.14,
25        ),
26        time_stepping=fl.Unsteady(
27            max_pseudo_steps=35,
28            steps=600,
29            step_size=0.5 / 600 * fl.u.s,
30            CFL=fl.AdaptiveCFL(),
31        ),
32        outputs=[
33            fl.VolumeOutput(
34                output_fields=[
35                    "primitiveVars",
36                    "T",
37                    "Cp",
38                    "Mach",
39                    "qcriterion",
40                    "VelocityRelative",
41                ],
42            ),
43            fl.SurfaceOutput(
44                surfaces=volume_mesh["*"],
45                output_fields=[
46                    "primitiveVars",
47                    "Cp",
48                    "Cf",
49                    "CfVec",
50                    "yPlus",
51                    "nodeForcesPerUnitArea",
52                ],
53            ),
54        ],
55        models=[
56            fl.Fluid(
57                navier_stokes_solver=fl.NavierStokesSolver(
58                    absolute_tolerance=1e-9,
59                    linear_solver=fl.LinearSolver(max_iterations=35),
60                    limit_velocity=True,
61                    limit_pressure_density=True,
62                ),
63                turbulence_model_solver=fl.SpalartAllmaras(
64                    absolute_tolerance=1e-8,
65                    linear_solver=fl.LinearSolver(max_iterations=25),
66                    hybrid_model=fl.DetachedEddySimulation(shielding_function="DDES"),
67                    rotation_correction=True,
68                    equation_evaluation_frequency=1,
69                ),
70            ),
71            fl.Rotation(
72                volumes=rotation_zone,
73                spec=fl.AngularVelocity(600 * fl.u.rpm),
74            ),
75            fl.Freestream(surfaces=volume_mesh["farField/farField"]),
76            fl.Wall(surfaces=volume_mesh["innerRotating/blade"]),
77        ],
78    )
79
80project.run_case(
81    params=params,
82    name="Tutorial Time-accurate RANS CFD on XV-15 from Python",
83)

Notes#

  • A rotating reference frame is established by defining the center and axis for the rotation_zone volume mesh component and specifying its rotational speed using fl.Rotation and fl.AngularVelocity.

  • The Spalart-Allmaras turbulence model is utilized with the Delayed Detached-Eddy Simulation (DDES) modification, activated via hybrid_model=fl.DetachedEddySimulation(shielding_function="DDES"), to enhance the modeling of separated flows.