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

# Load the datasets and plot the air velocity through the electronics.
import pyvista as pv
from pyvista import examples
structure, air = examples.download_electronics_cooling()

# Show the type and bounds of the datasets.
structure, air

z_slice = air.clip('z', value=-0.005)
pl = pv.Plotter()
pl.enable_ssao(radius=0.01)
_ = pl.add_mesh(
    z_slice,
    scalars='U',
    lighting=False,
    scalar_bar_args={'title': 'Velocity'},
)
_ = pl.add_mesh(
    structure,
    color='w',
    smooth_shading=True,
    split_sharp_edges=True,
)
pl.camera_position = 'xy'
pl.camera.roll = 90
pl.enable_anti_aliasing('fxaa')
pl.show()

# SEE ALSO:
#     Electronics Cooling Dataset https://docs.pyvista.org/api/examples/dataset_gallery.html#electronics-cooling-dataset
#     See this dataset in the Dataset Gallery for more info.
#     Electronics Cooling CFD https://docs.pyvista.org/examples/99-advanced/openfoam_cooling.html#openfoam-cooling-example
#     Full example using this dataset.

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

