.. _python_API_2d_gaw2:

.. currentmodule:: flow360

**************************
2D GA(W)-2
**************************

This document details the setup and execution of a steady-state simulation for flow over a 2D General Aviation (Whitcomb)-2 airfoil using the Flow360 Python API.
The process begins with importing the geometry, followed by automated mesh generation incorporating several refinement strategies.
Simulation parameters, including the operating conditions and reference geometry, are defined using the SI unit system.
The Spalart-Allmaras turbulence model is employed, and specific output fields are requested before the case is submitted for execution.

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

Notes
=====

- ``fl.AutomatedFarfield`` with ``method="quasi-3d"`` is used to establish the farfield boundary conditions appropriate for a 2D simulation setup.
- Multiple mesh refinement strategies are employed, including ``fl.UniformRefinement`` around cylindrical regions, and ``fl.SurfaceRefinement`` and ``fl.SurfaceEdgeRefinement`` on specific airfoil surfaces and edges to enhance mesh resolution in critical areas.
- The Spalart-Allmaras turbulence model (``fl.SpalartAllmaras``) is utilized for modeling turbulent flow characteristics.
