.. _python_API_internal_meshing:

.. currentmodule:: flow360

****************************
Auto Meshing - Internal Flow
****************************

This script details the procedure for generating a computational mesh for an internal flow configuration using the automated meshing capabilities of the Flow360 Python API.
It covers the steps from importing the geometry and grouping faces to specifying detailed meshing parameters,
including defaults, surface refinements, boundary layer settings, and passive spacing controls, finishing with the sequential generation of the surface and volume meshes.

.. literalinclude:: ../../../../../Flow360/examples/basic_simulations/meshing/auto_meshing_internal_flow.py
  :language: python
  :linenos:

Notes
=====

- This example focuses exclusively on the mesh generation process, utilizing ``generate_surface_mesh`` and ``generate_volume_mesh`` methods of the ``Project`` class.
- Detailed control over mesh characteristics is achieved through ``MeshingDefaults`` and specific refinements (``SurfaceRefinement``, ``BoundaryLayer``, ``PassiveSpacing``) applied to designated geometric faces identified by tags.
- ``fl.AutomatedFarfield`` is used to define the farfield volume zone required for meshing.
