Plot Probe Monitor Time History

Contents

Plot Probe Monitor Time History#

This example demonstrates how to plot a time history of pressure from a probe monitor.

import flow360 as fl

# Get case from cloud
case = fl.Case.from_cloud(case_id="case-8f163865-b907-4e16-a082-e046bb4a5f99")

# List available monitors
print(case.results.monitors.monitor_names)

# Names from output configuration
probe_output_name = "probe_output_1"
probe_name = "probe_1"
variable_name = "pressure_in_SI"

# Get a specific probe monitor by name (use the name of the probe output)
probe = case.results.monitors["probe_output_1"]

# Include time column (for unsteady simulations)
probe.reload_data(include_time=True, filter_physical_steps_only=True)

# Get as pandas DataFrame
df = probe.as_dataframe()

# Plot pressure vs time
df.plot(x="time", y=f"{probe_output_name}_{probe_name}_{variable_name}", title="Pressure Time History", xlabel="Time [s]", ylabel="Pressure")

Notes#

  • Use case.results.monitors.monitor_names to list all available monitors.

  • Access monitors by name using case.results.monitors["name"].

  • Call reload_data(include_time=True) to add a time column for unsteady simulations.

  • The as_dataframe() method returns a pandas DataFrame for easy plotting and analysis.

  • Use the names from the output configuration to construct the column name for the plot.