pyvista.examples.downloads.download_openfoam_tubes#

download_openfoam_tubes(load=True)[source]#

Download tubes OpenFOAM example.

Data generated from public SimScale examples at SimScale Project Library - Turbo.

Licensing for this dataset is granted to freely and without restriction reproduce, distribute, publish according to the SimScale Terms and Conditions.

Parameters:
loadbool, default: True

Load the dataset after downloading it when True. Set this to False and only the filename will be returned.

Returns:
pyvista.MultiBlock | str

DataSet or filename depending on load.

Examples

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()
../../../_images/pyvista-examples-downloads-download_openfoam_tubes-1_00_00.png

See Plot CFD Data for a full example using this dataset.