# Examples from pyvista.examples.downloads.download_openfoam_tubes
# ================================================================

# Plot the outline of the dataset along with a cross section of the flow velocity.
import pyvista as pv
from pyvista import examples
dataset = examples.download_openfoam_tubes()
air = dataset[0]
y_slice = air.slice('y')
pl = pv.Plotter()
_ = pl.add_mesh(
    y_slice,
    scalars='U',
    lighting=False,
    scalar_bar_args={'title': 'Flow Velocity'},
)
_ = pl.add_mesh(air, color='w', opacity=0.25)
pl.enable_anti_aliasing()
pl.show()

# SEE ALSO:
#     Openfoam Tubes Dataset https://docs.pyvista.org/api/examples/dataset_gallery.html#openfoam-tubes-dataset
#     See this dataset in the Dataset Gallery for more info.
#     Plot CFD Data https://docs.pyvista.org/examples/99-advanced/openfoam_tubes.html#openfoam-tubes-example
#     Full example using this dataset.

# ----------------------------------------------------------------------
# Generated by sphinx-examples-as-code https://github.com/pyvista/sphinx-examples-as-code

