Vector#

class ansys.fluent.visualization.Vector(field, surfaces, color_by=None, scale=1.0, solver=None, **kwargs)#

Bases: _GraphicsContainer

Vector visualization object.

Parameters:
fieldstr|VariableDescriptor

Name of the variable used for the vector direction/magnitude.

color_bystr|VariableDescriptor

Name of the variable used to color the vectors.

surfaceslist[str]

List of Fluent surfaces on which the vector plot is created.

scalefloat, optional

Scaling factor applied to the vector lengths. Defaults to 1.0.

solverFluentSession, optional

Active Fluent session. If None, the parent container determines the session.

**kwargsdict

Additional keyword arguments forwarded to Graphics(session).Vectors.create().

Examples

>>> from ansys.fluent.visualization import Vector
>>> # `solver_session` is a live Fluent session with a case
>>> # and data which contains the following surfaces
>>> velocity_vector_object = Vector(
>>>     solver=solver_session,
>>>     field="velocity",
>>>     color_by="pressure",
>>>     surfaces=["solid_up:1:830"],
>>>     scale=2,
>>> )
__init__(field, surfaces, color_by=None, scale=1.0, solver=None, **kwargs)#

__init__ method of Vector class.