# Slice Output

Slice Output in Flow360 allows you to visualize flow field variables on 2D cutting planes through the computational domain. The data is interpolated from the three-dimensional flow solution field onto the two-dimensional slice plane. This provides detailed insight into flow features at specific locations, while generating much smaller files than full volume outputs.


# πŸ“‹ Available Options

Option Description Unit
Name A descriptive name for the output
Output Format Format of the output files (paraview, tecplot, or both)
Slices Define one or more slice planes by specifying their origin and normal vector
Output Fields Flow variables to include in the output
Frequency How often to save outputs, in number of physical time steps
Frequency Offset The time step at which to start the output animation

# πŸ” Detailed Descriptions

# Name

A descriptive identifier for the slice output in the simulation results.

  • Default: Slice output
  • Example: Wing Root Slice
  • Notes: Choose a descriptive name that helps identify the location or purpose of the slice.

# Output Format

The file format for saving the slice data.

  • Default: paraview
  • Example: both
  • Notes: Select "paraview" for .vtu format, "tecplot" for .plt format, or "both" to save in both formats.

# Slices

Define one or more slice planes through the computational domain.

Each slice is defined by:

  • Name: A unique identifier for the slice

  • Origin: The 3D coordinates of a point on the slice plane

  • Normal: The normal vector to the slice plane (does not need to be normalized)

  • Example:

    Name: "Midspan"
    Origin: (0, 5, 0)
    Normal: (0, 1, 0)
    
  • Notes: Multiple slices can be defined, each with unique name, origin, and normal.

# Output Fields

Select the flow variables to include in the output files.

  • Default: None (must select at least one)
  • Example: Cp, Mach, velocity
  • Notes: See complete list of available fields below.

# Frequency

How often to save outputs, measured in number of physical time steps.

  • Default: -1 (only at the end of simulation)
  • Example: 100 (save every 100 time steps)
  • Notes: For steady simulations, use -1 to save only at convergence. For unsteady simulations, set a positive value to create an animation.

# Frequency Offset

The time step at which to start the output animation.

  • Default: 0 (beginning of simulation)
  • Example: 1000 (start saving at time step 1000)
  • Notes: Useful for skipping initial transient phases in unsteady simulations.

# πŸ“Š Available Output Fields

# Universal Variables (Non-dimensional)

  • Cp - Coefficient of pressure
  • Cpt - Coefficient of total pressure
  • gradW - Gradient of primitive solution
  • kOmega - k and omega
  • Mach - Mach number
  • mut - Turbulent viscosity
  • mutRatio - Turbulent viscosity and freestream dynamic viscosity ratio
  • nuHat - Spalart-Almaras variable
  • primitiveVars - Density, velocities (u,v,w), and pressure
  • qcriterion - Q criterion
  • residualNavierStokes - N-S residual
  • residualTransition - Transition residual
  • residualTurbulence - Turbulence residual
  • s - Entropy
  • solutionNavierStokes - N-S solution
  • solutionTransition - Transition solution
  • solutionTurbulence - Turbulence solution
  • T - Temperature
  • velocity - Velocity vector
  • velocity_x - X-component of velocity
  • velocity_y - Y-component of velocity
  • velocity_z - Z-component of velocity
  • velocity_magnitude - Magnitude of velocity vector
  • pressure - Pressure
  • vorticity - Vorticity
  • vorticityMagnitude - Vorticity Magnitude
  • wallDistance - Wall distance
  • numericalDissipationFactor - NumericalDissipationFactor sensor
  • residualHeatSolver - Heat equation residual
  • VelocityRelative - Velocity with respect to non-inertial frame
  • lowMachPreconditionerSensor - Low-Mach preconditioner factor

# Dimensioned Variables

  • velocity_m_per_s - Velocity vector (in m/s)
  • velocity_x_m_per_s - X-component of velocity (in m/s)
  • velocity_y_m_per_s - Y-component of velocity (in m/s)
  • velocity_z_m_per_s - Z-component of velocity (in m/s)
  • velocity_magnitude_m_per_s - Magnitude of velocity vector (in m/s)
  • pressure_pa - Pressure (in Pa)

# Volume-Specific Variables

  • betMetrics - BET Metrics
  • betMetricsPerDisk - BET Metrics per Disk
  • linearResidualNavierStokes - Linear residual of Navier-Stokes solver
  • linearResidualTurbulence - Linear residual of turbulence solver
  • linearResidualTransition - Linear residual of transition solver
  • SpalartAllmaras_hybridModel - Hybrid RANS-LES output for Spalart-Allmaras solver
  • kOmegaSST_hybridModel - Hybrid RANS-LES output for kOmegaSST solver
  • localCFL - Local CFL number

πŸ’‘ Tips

# Key Output Fields for Slice Analysis

  • Total Pressure Coefficient (Cpt)

    • Effectively shows boundary layer development and growth
    • Clearly reveals flow separation regions
    • Highlights wakes behind objects
    • Indicates regions of energy loss in the flow
    • Can be used to identify vortices and other flow structures

    To calculate the dimensional total pressure from Cpt:

    p_t (N/mΒ²) = Cpt Γ— (1/2)ρ∞ Γ— U_refΒ² + p_t∞
    
  • Mach Number and Velocity Fields

    • Excellent for visualizing shock waves
    • Shows expansion regions
    • Reveals flow acceleration and deceleration zones
    • Indicates boundary layer thickness

# Common Slice Orientations

  • XY Plane: Normal = (0, 0, 1)
  • YZ Plane: Normal = (1, 0, 0)
  • XZ Plane: Normal = (0, 1, 0)

# Strategic Slice Placement

Place slices at these key locations for maximum insight:

  • Leading and trailing edges of aerodynamic surfaces
  • Maximum thickness locations on wings or bodies
  • Wing-body junctions to visualize corner flow
  • Wake regions behind objects (at various downstream distances)
  • Boundary layer regions (parallel to surface)
  • Shock wave locations (approximately perpendicular to flow)

# Visualization Recommendations

  • For boundary layer analysis: Use Cpt with a color scale that highlights low values
  • For shock detection: Use Mach or pressure with carefully adjusted color scales
  • For vortex visualization: Use vorticityMagnitude or velocity vector plots
  • For separation detection: Look for reversal in velocity vectors or negative streamwise velocity
  • For BET analysis: Position slices at specific radial positions of the rotor disk

❓ Frequently Asked Questions

  • How many slices can I create in a single simulation?

    There is no hard limit on the number of slices, but each additional slice increases the output file size and computational overhead. For best performance, limit slices to key areas of interest.

  • Can I create slices at angles that aren't aligned with the coordinate axes?

    Yes, by setting the appropriate normal vector. For example, a 45Β° plane between X and Y axes would use normal = (1, 1, 0).

  • What's the difference between paraview and tecplot formats?

    Paraview format (.vtu) is for the open-source ParaView visualization tool, while Tecplot format (.plt) is for the commercial Tecplot software. Choose based on your preferred visualization tool.


🐍 Python Example Usage

The following example demonstrates how to configure slice outputs in your simulation using the Flow360 Python API.

import flow360 as fl
from flow360 import u

# Create a simulation setup
simulation = fl.SimulationParams(
    # Other simulation parameters...
)

# Define slice outputs
simulation.outputs.append(
    fl.SliceOutput(
        name="Wing Slices",
        entities=[
            fl.Slice(
                name="Wing Root",
                origin=(0, 0, 0) * u.m,
                normal=(0, 1, 0)
            ),
            fl.Slice(
                name="Midspan", 
                origin=(0, 5, 0) * u.m,
                normal=(0, 1, 0)
            ),
            fl.Slice(
                name="Wingtip",
                origin=(0, 10, 0) * u.m,
                normal=(0, 1, 0)
            )
        ],
        output_format="paraview",
        output_fields=["Mach", "pressure", "vorticity"],
        frequency=100,  # Save every 100 time steps
        frequency_offset=0  # Start saving from beginning of simulation
    )
)

# Create time-averaged slice output
simulation.outputs.append(
    fl.TimeAverageSliceOutput(
        name="Time Averaged Wake",
        entities=[
            fl.Slice(
                name="Wake Slice",
                origin=(2, 0, 0) * u.m,
                normal=(1, 0, 0)  # Normal to flow direction
            )
        ],
        output_fields=["velocity", "Cp", "turbulence"],
        start_step=1000,  # Start averaging from time step 1000
        frequency=500,    # Save every 500 time steps
        frequency_offset=1500  # Start saving from time step 1500
    )
)


Note: For information on time-averaging slice output for unsteady simulations, see Time-Averaged Slice Output.