Graphics#

class ansys.fluent.visualization.pyvista.pyvista_objects.Graphics(session, local_surfaces_provider=None)#

PyVista Graphics objects manager.

It provides access to graphics object containers for a given session, from which grpahics objects can be created. It takes session object as argument. Additionally local surface provider can also be passed to access surfaces created in other modules.

Attributes
Meshesdict

Container for mesh objects.

Surfacesdict

Container for surface objects.

Contoursdict

Container for contour objects.

Vectorsdict

Container for vector objects.

Commands

Command

Summary

add_outline_mesh

Add mesh outline.

In the following example, a Graphics object is instantiated with a Fluent session as its context. The Graphics object is used to create mesh, contour, vector and surface objects.

from ansys.fluent.visualization.pyvista import  Graphics
graphics_session = Graphics(session)

#Create object
mesh1 = graphics_session.Meshes["mesh-1"]
contour1 = graphics_session.Contours["contour-1"]
vector1 = graphics_session.Vectors["vector-1"]
surface1 = graphics_session.Surfaces["surface-1"]

#Delete object
del graphics_session.Contours["contour-1"]