Surface Slice Output [Python only]#
Visualize flow field variables along the intersection lines between slice planes and selected surfaces. This is particularly useful for examining boundary layer profiles, wake structures, or flow features at specific surface locations.
Available Options#
Option |
Description |
|---|---|
Slices |
Define one or more slice planes by specifying their origin and normal vector |
Target surfaces |
Select the surfaces that the slices will intersect with |
Output fields |
Select the flow variables to include in the output |
Output format |
Format for the output files (currently only “paraview” is supported) |
Frequency |
How often to save outputs, in number of physical time steps |
Frequency offset |
The time step at which to start the output animation |
Global Time Stepping in Child Cases#
When working with child cases (cases forked from a parent simulation), it’s important to understand that the Frequency and Frequency offset parameters refer to the global time step, which is transferred from the parent case.
Example: If the parent case finished at time_step=174, the child case will start from time_step=175. If Frequency=100 is set in the child case, the output will be saved at global time steps 200 (25 time steps into the child simulation), 300 (125 time steps into the child simulation), etc. Frequency offset also refers to the global time step, meaning that if in the previously mentioned child case, Frequency offset=50 was set (with Frequency=100), the output would be saved at global time steps 250 (75 time steps into the child simulation), 350 (175 time steps into the child simulation), etc.
Detailed Descriptions#
Slices#
A list of slice definitions, each containing name, origin, and normal.
Default: None (must be specified)
Definition parameters:
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)
Note: Each slice requires a name, origin point (3D coordinates), and normal vector (does not need to be normalized).
Target surfaces#
The surfaces that the slices will intersect with.
Default: None (must be specified)
Example:
volume_mesh["wing"]
Note: Must reference boundary names from your mesh.
Output fields#
The flow variables to include in the output.
Default:
["Cp", "Mach"]Example:
["Cp", "velocity_m_per_s", "pressure_pa"]
Note: See the Available Output Fields section below for a complete list.
Output format#
The format used for the output files.
Default:
"paraview"
Note: Currently only “paraview” format is supported.
Frequency#
How often to save outputs during an unsteady simulation.
Default:
-1(only at the end of simulation)Example:
100— saves output every 100 physical time steps.Standalone case: If you start a simulation from
time_step=0withfrequency=100, outputs are saved at time steps 100, 200, 300, etc.Parent-child case: If the parent finished at
time_step=174, the child starts fromtime_step=175. Withfrequency=100in the child, outputs are saved at global time steps 200 (25 steps into child), 300 (125 steps into child), 400 (225 steps into child), etc.
Notes:
Only applicable for unsteady simulations.
Important for child cases - this parameter refers to the global time step (see Global Time Stepping).
Frequency offset#
The time step at which to start the output animation.
Default:
0(beginning of simulation)Example:
1000(start at time step 1000)
Notes:
Useful when you want to skip initial transient behavior.
Important for child cases - this parameter refers to the global time step (see Global Time Stepping).
Example: if an output has a frequency of 100 and a frequency_offset of 10, the output will be saved at global time steps 10, 110, 210, etc.
Only applicable for unsteady simulations.
Available Output Fields#
Variables from Available Output Fields and the following specific variables
Surface-Specific Variables#
CfVec- Skin friction coefficient vector (non-dimensional)Cf- Magnitude of skin friction coefficient (non-dimensional)heatFlux- Non-dimensional heat flux (non-dimensional)nodeNormals- Wall normals (non-dimensional)nodeForcesPerUnitArea- Forces per unit area (non-dimensional)yPlus- Non-dimensional wall distance (non-dimensional)wallFunctionMetric- Wall function metrics (non-dimensional)heatTransferCoefficientStaticTemperature- Surface heat transfer coefficient (static temperature as reference) (non-dimensional)heatTransferCoefficientTotalTemperature- Surface heat transfer coefficient (total temperature as reference) (non-dimensional)wall_shear_stress_magnitude- Wall shear stress magnitude (non-dimensional)wall_shear_stress_magnitude_pa- Wall shear stress magnitude (in Pa)
💡 Tips
Key Applications
Surface Slice Output is particularly useful for:
Airfoil Analysis: Extract pressure and skin friction distributions at specific spanwise locations
Wing-Body Junctions: Examine flow structures at the intersection of components
Heat Transfer Analysis: Examine temperature and heat flux along specific cross-sections
Visualization Techniques
Combine Surface Slice Output with standard Slice Output to see both surface and volume data along the same slice plane
Use multiple slices to capture 3D effects (e.g., spanwise variations along a wing)
For rotating machinery, consider using slices aligned with the rotation axis or perpendicular to it at different radial positions
❓ Frequently Asked Questions
How does Surface Slice Output differ from regular Slice Output?
Regular Slice Output creates a planar cut through the entire volume domain, while Surface Slice Output only creates lines where the slice plane intersects with specified surface boundaries. Surface Slice Output is much more lightweight and is ideal for examining surface properties along specific paths.
Is there a limit to how many surface slices I can define?
There is no hard limit, but each additional slice increases the output file size. For best performance, focus on key areas of interest rather than creating a large number of slices.
Can I generate time-averaged Surface Slice Output?
Yes, for unsteady simulations you can create time-averaged data by using the TimeAverageSurfaceSliceOutput instead of the standard SurfaceSliceOutput. This allows you to analyze statistical properties of unsteady flows along surface intersections.
What happens if my slice plane doesn’t intersect with any of the target surfaces?
If no intersection is found, no data will be generated for that particular slice. The simulation will continue to run normally, but the output file will not contain data for that slice.
Can I use Surface Slice Output to extract boundary layer profiles?
Surface Slice Output only provides data directly on the surface where the slice plane intersects. To capture full boundary layer profiles extending into the volume, you should use regular Slice Output with slices positioned near and perpendicular to the surface.
🐍 Python Example Usage
import flow360 as fl
from flow360 import u
# Define surface slice output
params = fl.SimulationParams(
# ...other simulation parameters...
outputs=[
fl.SurfaceSliceOutput(
name="wing_sections",
entities=[
fl.Slice(
name="root",
origin=(0, 0, 0),
normal=(0, 1, 0)
),
fl.Slice(
name="mid_span",
origin=(0, 5, 0) * u.m,
normal=(0, 1, 0)
),
fl.Slice(
name="tip",
origin=(0, 10, 0) * u.m,
normal=(0, 1, 0)
)
],
target_surfaces=[
volume_mesh["wing_upper"],
volume_mesh["wing_lower"]
],
output_fields=["Cp", "Mach", "velocity_m_per_s"],
frequency=100, # Save every 100 time steps
)
]
)