Vector#

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

Bases: GraphicsObject

Vector visualization object.

Parameters:
  • field (str | VariableDescriptor) – Name of the variable used for the vector direction/magnitude.

  • color_by (str | VariableDescriptor | None) – Name of the variable used to color the vectors.

  • surfaces (list[str]) – List of Fluent surfaces on which the vector plot is created.

  • scale (float) – Scaling factor applied to the vector lengths. Defaults to 1.0.

  • solver (FluentSession, optional) – Active Fluent session. If None, the parent container determines the session.

  • **kwargs (dict) – 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.