# Time-averaging Streamline Output

*Time-averaging Streamline Output in Flow360 allows you to visualize time-averaged streamlines during unsteady simulations. Streamtraces are computed upwind and downwind, and may originate from a single point, from a line, or from points evenly distributed across a parallelogram.*

> **Note**: Time-averaging outputs are only available when using unsteady time stepping methods.

---

## Available Options

| *Option* | *Description* |
|----------|---------------|
| **Output fields** | Flow variables to include along streamlines |
| **Start step** | Physical time step to start calculating averaging |
| **Assigned points** | Points indicating the locations of streamlines |

---

## Detailed Descriptions

### Output fields

*The flow variables that will be included along the time-averaged streamlines.*

- **Default:** None
- **Example:** `pressure`, `velocity`, `Mach`
>**Notes:** 
>  - Time-averaging streamline outputs only support **custom variables** (UserVariable), not predefined output fields. Create custom variables using the [Variable Settings](../../../05.tools/02.variable-settings.md) tool or Python API.
>  - Vector-valued fields will be colored by their magnitude.

### Start step

*The physical time step at which time-averaging begins.*

- **Required:** Yes
- **Default:** None
- **Example:** `100` (begin averaging from the 100th physical time step)
>**Notes:** 
> - Use positive integers to start averaging from a specific time step.
> - Set this to a time step after initial transients have settled for more meaningful statistics.
> - Important for child cases - this parameter refers to the **global** time step, which gets transferred from the parent case. See [Global Time Stepping in Child Cases](06.time-averaging-slice-output.md#global-time-stepping-in-child-cases) for more details.

### Assigned points

*Points that define the placement of streamlines. Streamtraces are computed upwind and downwind, and may originate from a single point, from a line, or from points evenly distributed across a parallelogram.*

- **Point Definition:** The creation of points is described in detail [here](../../../04.entities-browser/05.points.md)
  
>**Notes:** 
> - You can specify individual points or arrays of points to seed streamlines at multiple locations. 
> - Points can be defined in the GUI or via the Python API.

---

<details>
<summary><h3 style="display:inline-block"> 🐍 Python Example Usage</h3></summary>

```python
# Example of setting up time-averaged streamline output in Python
time_avg_streamline_output = fl.TimeAverageStreamlineOutput(
    entities=[
        fl.Point(
            name="Point_1",
            location=(0.0, 1.5, 0.0) * fl.u.m,
        ),
        fl.Point(
            name="Point_2",
            location=(0.0, -1.5, 0.0) * fl.u.m,
        ),
        fl.PointArray(
            name="Line_streamline",
            start=(1.0, 0.0, 0.0) * fl.u.m,
            end=(1.0, 0.0, -10.0) * fl.u.m,
            number_of_points=11,
        ),
        fl.PointArray2D(
            name="Parallelogram_streamline",
            origin=(1.0, 0.0, 0.0) * fl.u.m,
            u_axis_vector=(0, 2.0, 2.0) * fl.u.m,
            v_axis_vector=(0, 1.0, 0) * fl.u.m,
            u_number_of_points=11,
            v_number_of_points=20
        )
    ],
    output_fields=[fl.solution.pressure, fl.solution.velocity],
    start_step=400,
)
```

</details>
