.. _outputConfiguration:

********************
Output Configuration
********************

Outputs control what data Flow360 writes during and after a simulation. You can export flow field data on volumes, surfaces, slices, isosurfaces, and at probe points—each with configurable fields and save frequency. Additionally, you can configure force and moment outputs, including total forces on specific models and custom force distributions along arbitrary directions. Results are saved in ParaView (``.vtu``/``.vtp``), Tecplot (``.szplt``), or CSV formats.

.. important::
   Outputs must be configured **before** running the simulation. Data that was not requested in the output configuration cannot be retrieved after the simulation completes. You would need to re-run the case with the desired outputs enabled.

.. _availableOutputs_userGuide:

Available Outputs 
=================
The table below lists all available output types. It also contains links to the documentation of each type for both the GUI and the Python API interfaces. 
The `File` column shows the path to the file that contains the data produced by each output for custom post-processing. All of the files can be found in the :doc:`assets menu </gui_guide/01.introduction/03.workbench-layout/04.top-bar>` in the WebUI.
The `API Access` column shows the property on the :class:`~flow360.component.case.Case` object used to access each result programmatically (see :ref:`python_api_download_results` for how to retrieve a case from cloud).


.. csv-table:: Available Output Types
   :header: "Output Type", "Data", "Availability", "File", "API Access"
   :widths: 18, 30, 10, 22, 20
   :file: ./Tables/output_list.csv


.. _outputFields_userGuide:

Output Fields
=============

.. note::
   The fields listed below are the **default output fields** provided by Flow360. All values are **non-dimensional** unless otherwise noted. See :ref:`Non-Dimensional Outputs <non_dim_output_userGuide>` for dimensionalization formulas.

.. important::
   **Custom and Dimensional Outputs**: Use :ref:`User Variables <UserVariable>` to define custom output expressions or to output existing fields in dimensional units (e.g., ``velocity_m_per_s``, ``pressure_pa``, ``wall_shear_stress_magnitude_pa``). See :ref:`Units & Expressions <unitsAndExpressions>` for details.


Universal Fields
----------------

Available for all output types (Volume, Surface, Slice, Isosurface, Probe):

.. csv-table::
   :header-rows: 1
   :widths: 30, 70
   :file: ./Tables/universal_fields.csv


Surface-Specific Fields
-----------------------

Available only for Surface Output and Surface Probe Output:

.. csv-table::
   :header-rows: 1
   :widths: 30, 70
   :file: ./Tables/surface_fields.csv


Volume and Slice-Specific Fields
--------------------------------

Available only for Volume Output and Slice Output:

.. csv-table::
   :header-rows: 1
   :widths: 30, 70
   :file: ./Tables/volume_fields.csv

.. _bet_metrics_output_variables:

BET Metrics Output Variables
-----------------------------

The ``betMetrics`` and ``betMetricsPerDisk`` output fields provide Blade Element Theory (BET) metrics for analyzing rotor and propeller performance. These fields are available when using BET models in volume zones. The ``betMetrics`` field includes data from all BET disks with possible overlapping, while ``betMetricsPerDisk`` provides separate outputs for each disk to avoid overlap.

The following variables are included in the betMetrics output:

1. **VelocityRelative**: Relative velocity with respect to the rotating reference frame (non-dimensional).

2. **AlphaRadians**: Local angle of attack in radians.

3. **CfAxial**: Axial aerodynamic force coefficient.

4. **CfCircumferential**: Circumferential aerodynamic force coefficient.

5. **TipLossFactor**: Factor to model the effect of blade tip.

6. **LocalSolidityIntegralWeight**: Local solidity multiplied by the integral weight.

.. note::
   Detailed explanations of these variables, including their mathematical formulations, are available in the BET disk section of the Formulations documentation.


Hybrid RANS-LES Model Outputs
------------------------------

The ``SpalartAllmaras_hybridModel`` and ``kOmegaSST_hybridModel`` output fields provide diagnostic variables for hybrid RANS-LES simulations (DDES and ZDES). These fields are available for **Volume Output** and **Slice Output** only.

.. important::
   **Requirements**: 
   
   - ``SpalartAllmaras_hybridModel`` can only be specified when using the **Spalart-Allmaras** turbulence model with hybrid RANS-LES enabled (DDES or ZDES).
   - ``kOmegaSST_hybridModel`` can only be specified when using the **kOmegaSST** turbulence model with hybrid RANS-LES enabled (DDES or ZDES).
   - Hybrid models require unsteady simulations—they are not available for steady-state cases.

The specific variables included in each hybrid model output depend on the shielding function used:

DDES Variables
^^^^^^^^^^^^^^

When ``shielding_function="DDES"``, the hybrid model output includes five variables:

1. **f_d**: The shielding function that delineates RANS and LES regions. When ``f_d`` = 0, RANS is fully applied; when ``f_d`` = 1, LES is used. Intermediate values represent a smooth transition between regimes.

2. **r_d**: A modified ratio of the modeled length scale to the wall distance, from which ``f_d`` is derived.

3. **DDES_lengthRANS**: The wall distance from the computational cell to the nearest solid boundary.

4. **DDES_lengthScale**: The characteristic DES length scale: :math:`\tilde{d} \equiv d - f_d \max(0, d - C_{DES}*\Delta)`

5. **DDES_lengthLES**: The characteristic LES length scale: :math:`C_{DES}*\Delta`

Among these variables, ``f_d`` is the most significant for identifying and visualizing regions dominated by RANS vs. LES behavior.

ZDES Variables
^^^^^^^^^^^^^^

When ``shielding_function="ZDES"``, the hybrid model output includes four variables:

1. **ZDES_fp**: The enhanced shielding function that determines whether RANS or LES is used. When ``ZDES_fp`` = 0, RANS is active; when ``ZDES_fp`` = 1, LES is active. This function is computed from ``ZDES_fd``, ``ZDES_fR``, and ``ZDES_fp2``.

2. **ZDES_fd**: Original DDES shielding function used in computing ``ZDES_fp``.

3. **ZDES_fR**: Component that disables or inhibits the secondary shielding function in regions where vorticity magnitude increases away from walls (designed to disable the secondary shielding where a shear layer is detected above a wall). Used in computing ``ZDES_fp``.

4. **ZDES_fp2**: Causes the model to revert to RANS mode in the outer portion of boundary layers. Used in computing ``ZDES_fp``.

.. seealso::
   
   - :ref:`Outputs API Reference <outputs>` — Python API classes for all output types
   - :ref:`Non-Dimensional Outputs <non_dim_output_userGuide>` — formulas to convert non-dimensional values to physical units
   - :ref:`User Variables <UserVariable>` — define custom expressions and dimensional outputs
   - :ref:`Units & Expressions <unitsAndExpressions>` — unit-aware variable system
   - :ref:`Results Processing <resultsProcessing_userGuide_workflowsInterfaces>` — processing the results after the simulation

