.. _python_API_2d_crm:

.. currentmodule:: flow360

**************************
2D CRM
**************************

This script details the setup and execution of a steady-state Reynolds-Averaged Navier-Stokes (RANS) simulation for the NASA CRM-HL 2D multi-element airfoil configuration using the Flow360 Python API. It covers geometry import and preparation, automated mesh generation with multiple refinement zones, definition of simulation parameters using the SI unit system, configuration of the Spalart-Allmaras turbulence model, and submission of the simulation case.

.. literalinclude:: ../../../../../../Flow360/examples/advanced_simulations/aerodynamics/airfoils/2D_crm.py
  :language: python
  :linenos:

Notes
=====

- ``fl.AutomatedFarfield`` with ``method="quasi-3d"`` is employed to generate farfield and symmetry boundary conditions suitable for this 2D configuration.
- Multiple mesh refinement strategies (``fl.UniformRefinement``, ``fl.SurfaceRefinement``, ``fl.SurfaceEdgeRefinement``) are used to control grid resolution near the airfoil surfaces and in the wake.
- The simulation utilizes the Spalart-Allmaras turbulence model (``fl.SpalartAllmaras``).
