Surface#
- class ansys.fluent.visualization.Surface(type, solver=None, **kwargs)#
Bases:
_GraphicsContainerSurface definition for Fluent post-processing.
The
Surfaceclass represents any Fluent surface generated for post-processing, including plane surfaces and iso-surfaces. After creation, additional attributes (such asfield,iso_value,creation_method, etc.) may be set on the object to fully define the surface.- Parameters:
- type
str The type of surface to create. Examples include
"plane-surface"and"iso-surface".- solver
FluentSession,optional Active Fluent session. If
None, the parent container or base class determines the session.- **kwargs
dict Additional keyword arguments used to define the surface and passed to
Graphics(session).Surfaces.create(). These vary depending on the chosen surface type.
- type
Notes
A Surface object may be defined either:
Directly at construction time using keyword arguments (e.g., specifying
creation_method,origin/normal,zfor plane surfaces, etc.)Or incrementally after creation by setting attributes on the surface object before it is first evaluated or drawn.
Examples
>>> from ansys.fluent.visualization import Surface >>> # `solver_session` is a live Fluent session with a case file loaded >>> # For plane-surface >>> surf_xy_plane = Surface( >>> solver=solver_session, >>> type="plane-surface", >>> creation_method="xy-plane", >>> z=-0.0441921 >>> ) >>> # For iso-surface >>> surf_outlet_plane = Surface(solver=solver_session, type="iso-surface") >>> surf_outlet_plane.field = "y-coordinate" >>> surf_outlet_plane.iso_value = -0.125017
- __init__(type, solver=None, **kwargs)#
__init__ method of Surface class.