.. _python_API_rans_xv15:

.. currentmodule:: flow360

**************************
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.

.. literalinclude:: ../../../../../Flow360/examples/advanced_simulations/rotorcraft/RANS_xv15.py
  :language: python
  :linenos:

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.
