ansys-fluent-visualization 0.22.1__tar.gz → 0.23.dev0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/PKG-INFO +3 -3
  2. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/README.rst +1 -1
  3. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/pyproject.toml +24 -2
  4. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/interface/post_objects/post_object_definitions.py +2 -2
  5. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/__init__.py +1 -1
  6. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/containers.py +300 -42
  7. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/renderer.py +1 -1
  8. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/AUTHORS +0 -0
  9. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/LICENSE +0 -0
  10. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/interface/__init__.py +0 -0
  11. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/interface/post_objects/__init__.py +0 -0
  12. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/interface/post_objects/check_in_notebook.py +0 -0
  13. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/interface/post_objects/meta.py +0 -0
  14. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/interface/post_objects/post_helper.py +0 -0
  15. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/interface/post_objects/post_objects_container.py +0 -0
  16. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/interface/post_objects/singleton_meta.py +0 -0
  17. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/base/__init__.py +0 -0
  18. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/base/renderer.py +0 -0
  19. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/config.py +0 -0
  20. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/contour.py +0 -0
  21. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/graphics/__init__.py +0 -0
  22. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/graphics/graphics_objects.py +0 -0
  23. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/graphics/graphics_windows.py +0 -0
  24. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/graphics/graphics_windows_manager.py +0 -0
  25. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/graphics/pyvista/__init__.py +0 -0
  26. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/graphics/pyvista/renderer.py +0 -0
  27. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/graphics/single_qt_windows.py +0 -0
  28. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/matplotlib/__init__.py +0 -0
  29. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/plotter/__init__.py +0 -0
  30. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/plotter/matplotlib/__init__.py +0 -0
  31. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/plotter/matplotlib/renderer.py +0 -0
  32. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/plotter/plotter_objects.py +0 -0
  33. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/plotter/plotter_windows.py +0 -0
  34. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/plotter/plotter_windows_manager.py +0 -0
  35. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/plotter/pyvista/__init__.py +0 -0
  36. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/plotter/pyvista/renderer.py +0 -0
  37. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/post_data_extractor.py +0 -0
  38. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/pyvista/__init__.py +0 -0
  39. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/registrar.py +0 -0
  40. {ansys_fluent_visualization-0.22.1 → ansys_fluent_visualization-0.23.dev0}/src/ansys/fluent/visualization/visualization_windows_manager.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ansys-fluent-visualization
3
- Version: 0.22.1
3
+ Version: 0.23.dev0
4
4
  Summary: A python wrapper for ansys Fluent visualization
5
5
  License: MIT
6
6
  License-File: AUTHORS
@@ -20,7 +20,7 @@ Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Programming Language :: Python :: 3.13
21
21
  Provides-Extra: interactive
22
22
  Provides-Extra: single-window
23
- Requires-Dist: ansys-fluent-core (>=0.35.0,<0.36.0)
23
+ Requires-Dist: ansys-fluent-core (>=0.36.dev1,<1.0)
24
24
  Requires-Dist: importlib-metadata (>=4.0,<5.0) ; python_version < "3.9"
25
25
  Requires-Dist: matplotlib (>=3.6.0)
26
26
  Requires-Dist: pyside6 (>=6.8.1,<6.9.0) ; extra == "single-window"
@@ -69,7 +69,7 @@ PyFluent-Visualization
69
69
 
70
70
  Overview
71
71
  --------
72
- PyFluent-Visualization provides postprocessing and visualization
72
+ PyFluent-Visualization provides post-processing and visualization
73
73
  capabilities for `PyFluent <https://github.com/ansys/pyfluent>`_
74
74
  using `PyVista <https://docs.pyvista.org/>`_ and
75
75
  `Matplotlib <https://matplotlib.org/>`_.
@@ -35,7 +35,7 @@ PyFluent-Visualization
35
35
 
36
36
  Overview
37
37
  --------
38
- PyFluent-Visualization provides postprocessing and visualization
38
+ PyFluent-Visualization provides post-processing and visualization
39
39
  capabilities for `PyFluent <https://github.com/ansys/pyfluent>`_
40
40
  using `PyVista <https://docs.pyvista.org/>`_ and
41
41
  `Matplotlib <https://matplotlib.org/>`_.
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
5
5
  [tool.poetry]
6
6
  # Check https://python-poetry.org/docs/pyproject/ for all available sections
7
7
  name = "ansys-fluent-visualization"
8
- version = "0.22.1"
8
+ version = "0.23.dev0"
9
9
  description = "A python wrapper for ansys Fluent visualization"
10
10
  license = "MIT"
11
11
  authors = ["ANSYS, Inc. <ansys.support@ansys.com>"]
@@ -25,7 +25,7 @@ packages = [
25
25
  [tool.poetry.dependencies]
26
26
  python = ">=3.10,<3.14"
27
27
  importlib-metadata = {version = "^4.0", python = "<3.9"}
28
- ansys-fluent-core = "~=0.35.0"
28
+ ansys-fluent-core = "~=0.36.dev1"
29
29
  pyvista = ">=0.44.0"
30
30
  matplotlib = ">=3.6.0"
31
31
  pyvistaqt = { version = "~=0.11.1", optional = true }
@@ -55,3 +55,25 @@ source = ["ansys/fluent"]
55
55
 
56
56
  [tool.coverage.report]
57
57
  show_missing = true
58
+
59
+ [tool.bandit]
60
+ exclude_dirs = ["tests"]
61
+ skips = [
62
+ "B101",
63
+ "B105",
64
+ "B106",
65
+ "B110",
66
+ "B112",
67
+ "B301",
68
+ "B307",
69
+ "B310",
70
+ "B311",
71
+ "B314",
72
+ "B403",
73
+ "B404",
74
+ "B405",
75
+ "B602",
76
+ "B603",
77
+ "B604",
78
+ "B607",
79
+ ]
@@ -644,12 +644,12 @@ class VectorDefn(GraphicsDefn):
644
644
  class vectors_of(metaclass=PyLocalPropertyMeta):
645
645
  """Vector type."""
646
646
 
647
- value: str = "velocity"
647
+ value: str = None
648
648
 
649
649
  @Attribute
650
650
  def allowed_values(self):
651
651
  """Vectors of allowed values."""
652
- return list(self.field_data.vectors())
652
+ return list(self.field_data.vector_fields())
653
653
 
654
654
  class field(metaclass=PyLocalPropertyMeta):
655
655
  """Vector color field."""
@@ -27,7 +27,7 @@ try:
27
27
  except ModuleNotFoundError:
28
28
  import importlib_metadata
29
29
 
30
- _VERSION_INFO = "Build date: September 19, 2025 10:14 UTC ShaID: f20236b"
30
+ _VERSION_INFO = "Build date: November 25, 2025 12:21 UTC ShaID: 1923822"
31
31
  __version__ = importlib_metadata.version(__name__.replace(".", "-"))
32
32
 
33
33
 
@@ -21,6 +21,8 @@
21
21
  # SOFTWARE.
22
22
 
23
23
  """Containers for graphics."""
24
+ import warnings
25
+
24
26
  from ansys.fluent.core.field_data_interfaces import _to_field_name_str
25
27
  from ansys.fluent.core.utils.context_managers import _get_active_session
26
28
  from ansys.units import VariableDescriptor
@@ -39,6 +41,8 @@ class _GraphicsContainer:
39
41
  raise RuntimeError("No solver session provided and none found in context.")
40
42
  if "field" in self.kwargs:
41
43
  self.kwargs["field"] = _to_field_name_str(self.kwargs["field"])
44
+ if "vectors_of" in self.kwargs:
45
+ self.kwargs["vectors_of"] = _to_field_name_str(self.kwargs["vectors_of"])
42
46
 
43
47
  def __getattr__(self, attr):
44
48
  return getattr(self._obj, attr)
@@ -53,22 +57,46 @@ class _GraphicsContainer:
53
57
 
54
58
 
55
59
  class Mesh(_GraphicsContainer):
56
- """Mesh.
60
+ """Mesh visualization object.
61
+
62
+ Creates a Fluent mesh graphic object on the specified surfaces.
63
+ It is typically used to display the computational mesh with optional
64
+ edge highlighting.
65
+
66
+ Parameters
67
+ ----------
68
+ surfaces : list[str]
69
+ List of Fluent surfaces on which the mesh should be displayed.
70
+ show_edges : ``bool``, optional
71
+ If ``True``, mesh edges are drawn. If ``False`` (default), the mesh
72
+ is shown without explicit edge highlighting.
73
+ solver : FluentSession, optional
74
+ Active Fluent session. If ``None``, the parent container determines
75
+ the session.
76
+ **kwargs : dict
77
+ Additional keyword arguments forwarded to
78
+ ``Graphics(session).Mesh.create()`` or handled by the base class.
57
79
 
58
80
  Examples
59
81
  --------
60
82
  >>> from ansys.fluent.visualization import Mesh
61
-
62
83
  >>> # `solver_session` is a live Fluent session with a case
63
84
  >>> # and data which contains the following surfaces
64
-
65
85
  >>> mesh = Mesh(
66
86
  >>> solver=solver_session, show_edges=True, surfaces=["in1", "in2", "in3"]
67
87
  >>> )
68
88
  """
69
89
 
70
- def __init__(self, solver=None, **kwargs):
90
+ def __init__(
91
+ self, surfaces: list[str], show_edges: bool = False, solver=None, **kwargs
92
+ ):
71
93
  """__init__ method of Mesh class."""
94
+ kwargs.update(
95
+ {
96
+ "show_edges": show_edges,
97
+ "surfaces": surfaces,
98
+ }
99
+ )
72
100
  super().__init__(solver, **kwargs)
73
101
  self.__dict__["_obj"] = Graphics(session=self.solver).Meshes.create(
74
102
  **self.kwargs
@@ -76,14 +104,41 @@ class Mesh(_GraphicsContainer):
76
104
 
77
105
 
78
106
  class Surface(_GraphicsContainer):
79
- """Surface.
107
+ """Surface definition for Fluent post-processing.
108
+
109
+ The ``Surface`` class represents any Fluent surface generated for
110
+ post-processing, including plane surfaces and iso-surfaces. After creation,
111
+ additional attributes (such as ``field``, ``iso_value``, ``creation_method``,
112
+ etc.) may be set on the object to fully define the surface.
113
+
114
+ Parameters
115
+ ----------
116
+ type : str
117
+ The type of surface to create. Examples include
118
+ ``"plane-surface"`` and ``"iso-surface"``.
119
+ solver : FluentSession, optional
120
+ Active Fluent session. If ``None``, the parent container or base
121
+ class determines the session.
122
+ **kwargs : dict
123
+ Additional keyword arguments used to define the surface and passed to
124
+ ``Graphics(session).Surfaces.create()``. These vary depending on
125
+ the chosen surface type.
126
+
127
+ Notes
128
+ -----
129
+ A Surface object may be defined either:
130
+
131
+ * Directly at construction time using keyword arguments
132
+ (e.g., specifying ``creation_method``, ``origin``/``normal``,
133
+ ``z`` for plane surfaces, etc.)
134
+
135
+ * Or incrementally after creation by setting attributes on the
136
+ surface object before it is first evaluated or drawn.
80
137
 
81
138
  Examples
82
139
  --------
83
140
  >>> from ansys.fluent.visualization import Surface
84
-
85
141
  >>> # `solver_session` is a live Fluent session with a case file loaded
86
-
87
142
  >>> # For plane-surface
88
143
  >>> surf_xy_plane = Surface(
89
144
  >>> solver=solver_session,
@@ -91,16 +146,19 @@ class Surface(_GraphicsContainer):
91
146
  >>> creation_method="xy-plane",
92
147
  >>> z=-0.0441921
93
148
  >>> )
94
-
95
149
  >>> # For iso-surface
96
- >>> surf_outlet_plane = Surface(solver=solver_session)
97
- >>> surf_outlet_plane.type = "iso-surface"
150
+ >>> surf_outlet_plane = Surface(solver=solver_session, type="iso-surface")
98
151
  >>> surf_outlet_plane.field = "y-coordinate"
99
152
  >>> surf_outlet_plane.iso_value = -0.125017
100
153
  """
101
154
 
102
- def __init__(self, solver=None, **kwargs):
155
+ def __init__(self, type: str, solver=None, **kwargs):
103
156
  """__init__ method of Surface class."""
157
+ kwargs.update(
158
+ {
159
+ "type": type,
160
+ }
161
+ )
104
162
  super().__init__(solver, **kwargs)
105
163
  self.__dict__.update(
106
164
  dict(
@@ -183,16 +241,14 @@ class PlaneSurface(Surface):
183
241
  Examples
184
242
  --------
185
243
  >>> from ansys.fluent.visualization import PlaneSurface
186
-
187
244
  >>> # `solver_session` is a live Fluent session with a case file loaded
188
-
245
+ >>>
189
246
  >>> # Creating using point and normal
190
247
  >>> surf_xy_plane = PlaneSurface.create_from_point_and_normal(
191
248
  >>> solver=solver_session,
192
249
  >>> point=[0.0, 0.0, -0.0441921],
193
250
  >>> normal=[0.0, 0.0, 1.0],
194
251
  >>> )
195
-
196
252
  >>> # Create same plane using 'create_xy_plane' method
197
253
  >>> surf_xy_plane = PlaneSurface.create_xy_plane(
198
254
  >>> solver=solver_session,
@@ -253,15 +309,33 @@ class PlaneSurface(Surface):
253
309
 
254
310
 
255
311
  class IsoSurface(Surface):
256
- """IsoSurface derived from Surface.
257
- Provides factory method for creating iso-surfaces.
312
+ """Iso-surface derived from :class:`Surface`.
313
+
314
+ The ``IsoSurface`` class simplifies creation of iso-surfaces by providing
315
+ a higher-level interface on top of the generic :class:`Surface` class.
316
+ It supports specifying the scalar field and iso-value directly, and
317
+ internally configures the corresponding Fluent surface object.
318
+
319
+ Parameters
320
+ ----------
321
+ solver : FluentSession, optional
322
+ Active Fluent session. If ``None``, the parent container or base class
323
+ determines the session.
324
+ field : str or VariableDescriptor, optional
325
+ The scalar field over which the iso-surface is computed.
326
+ rendering : str, optional
327
+ Rendering method for the iso-surface depending on Fluent capabilities.
328
+ iso_value : float, optional
329
+ The value of the scalar field at which the iso-surface is extracted.
330
+ **kwargs : dict
331
+ Additional keyword arguments forwarded to
332
+ ``Graphics(session).Surfaces.create()`` or handled by the base class.
258
333
 
259
334
  Examples
260
335
  --------
261
336
  >>> from ansys.fluent.visualization import IsoSurface
262
-
263
337
  >>> # `solver_session` is a live Fluent session with a case file loaded
264
-
338
+ >>>
265
339
  >>> # Creating iso-surface
266
340
  >>> surf_outlet_plane = IsoSurface.create(
267
341
  >>> solver=solver_session,
@@ -290,22 +364,54 @@ class IsoSurface(Surface):
290
364
 
291
365
 
292
366
  class Contour(_GraphicsContainer):
293
- """Contour.
367
+ """
368
+ Contour visualization object.
369
+
370
+ The ``Contour`` class represents a Fluent contour plot of a scalar field
371
+ drawn over one or more surfaces. Contours are commonly used to visualize
372
+ variations in temperature, pressure, velocity magnitude, turbulence
373
+ quantities, or any other field available in the solver.
374
+
375
+ Parameters
376
+ ----------
377
+ field : str or VariableDescriptor
378
+ Name of the scalar field to be contoured. This defines the quantity
379
+ used for color interpolation across the specified surfaces.
380
+ surfaces : list of str
381
+ List of Fluent surfaces on which the contour is displayed.
382
+ Surfaces may be boundary zones, interior surfaces, or custom
383
+ surfaces such as iso-surfaces or plane surfaces.
384
+ solver : FluentSession, optional
385
+ Active Fluent session. If ``None``, the parent class or container
386
+ determines the session.
387
+ **kwargs : dict
388
+ Additional keyword arguments forwarded to
389
+ ``Graphics(session).Contours.create()`` or handled by the base class.
294
390
 
295
391
  Examples
296
392
  --------
297
393
  >>> from ansys.fluent.visualization import Contour
298
-
299
394
  >>> # `solver_session` is a live Fluent session with a case
300
395
  >>> # and data which contains the following surfaces
301
-
302
396
  >>> temperature_contour_object = Contour(
303
397
  >>> solver=solver_session, field="temperature", surfaces=["in1", "in2", "in3",]
304
398
  >>> )
305
399
  """
306
400
 
307
- def __init__(self, solver=None, **kwargs):
401
+ def __init__(
402
+ self,
403
+ field: str | VariableDescriptor,
404
+ surfaces: list[str],
405
+ solver=None,
406
+ **kwargs
407
+ ):
308
408
  """__init__ method of Contour class."""
409
+ kwargs.update(
410
+ {
411
+ "field": field,
412
+ "surfaces": surfaces,
413
+ }
414
+ )
309
415
  super().__init__(solver, **kwargs)
310
416
  self.__dict__["_obj"] = Graphics(session=self.solver).Contours.create(
311
417
  **self.kwargs
@@ -313,48 +419,142 @@ class Contour(_GraphicsContainer):
313
419
 
314
420
 
315
421
  class Vector(_GraphicsContainer):
316
- """Vector.
422
+ """Vector visualization object.
423
+
424
+ Parameters
425
+ ----------
426
+ field : str|VariableDescriptor
427
+ Name of the variable used for the **vector direction/magnitude**.
428
+ color_by : str|VariableDescriptor
429
+ Name of the variable used to **color** the vectors.
430
+ surfaces : list[str]
431
+ List of Fluent surfaces on which the vector plot is created.
432
+ scale : float, optional
433
+ Scaling factor applied to the vector lengths. Defaults to 1.0.
434
+ solver : FluentSession, optional
435
+ Active Fluent session. If ``None``, the parent container determines
436
+ the session.
437
+ **kwargs : dict
438
+ Additional keyword arguments forwarded to
439
+ ``Graphics(session).Vectors.create()``.
317
440
 
318
441
  Examples
319
442
  --------
320
443
  >>> from ansys.fluent.visualization import Vector
321
-
322
444
  >>> # `solver_session` is a live Fluent session with a case
323
445
  >>> # and data which contains the following surfaces
324
-
325
446
  >>> velocity_vector_object = Vector(
326
447
  >>> solver=solver_session,
327
- >>> field="x-velocity",
448
+ >>> field="velocity",
449
+ >>> color_by="pressure",
328
450
  >>> surfaces=["solid_up:1:830"],
329
451
  >>> scale=2,
330
452
  >>> )
331
453
  """
332
454
 
333
- def __init__(self, solver=None, **kwargs):
455
+ def __init__(
456
+ self,
457
+ field: str | VariableDescriptor,
458
+ surfaces: list[str],
459
+ color_by: str | VariableDescriptor | None = None,
460
+ scale: float = 1.0,
461
+ solver=None,
462
+ **kwargs
463
+ ):
334
464
  """__init__ method of Vector class."""
465
+ if color_by is None:
466
+ color_by = field
467
+ kwargs.update(
468
+ {
469
+ "vectors_of": field,
470
+ "field": color_by,
471
+ "surfaces": surfaces,
472
+ "scale": scale,
473
+ }
474
+ )
335
475
  super().__init__(solver, **kwargs)
336
476
  self.__dict__["_obj"] = Graphics(session=self.solver).Vectors.create(
337
477
  **self.kwargs
338
478
  )
479
+ if field not in self._obj.vectors_of.allowed_values:
480
+ warnings.warn(
481
+ "API update: `field` now represents the vector variable, and `color_by`"
482
+ " controls the scalar coloring field.\n"
483
+ "Your input seems to use `field` as a scalar (old behavior). "
484
+ "It is being interpreted as `color_by`, and the vector field has been "
485
+ "defaulted to 'velocity' for compatibility.\n"
486
+ "Please update your code to: field=<vector>, color_by=<scalar>."
487
+ )
488
+
489
+ @staticmethod
490
+ def _get_mapped_attrs(attr):
491
+ _attr_map = {
492
+ "field": "vectors_of",
493
+ "color_by": "field",
494
+ }
495
+ return _attr_map.get(attr)
496
+
497
+ def __getattr__(self, attr):
498
+ attr = self._get_mapped_attrs(attr) or attr
499
+ return getattr(self._obj, attr)
500
+
501
+ def __setattr__(self, attr, value):
502
+ attr = self._get_mapped_attrs(attr) or attr
503
+ if attr == "surfaces":
504
+ value = list(value)
505
+ setattr(self._obj, attr, value)
339
506
 
340
507
 
341
508
  class Pathline(_GraphicsContainer):
342
- """Pathline.
509
+ """Pathline visualization object.
510
+
511
+ The ``Pathline`` class generates pathlines, which represent the trajectories
512
+ of massless particles as they travel through the flow field based on the
513
+ underlying velocity data. Pathlines are commonly used to visualize flow
514
+ patterns, mixing, recirculation, and streamline-like behavior in transient
515
+ or steady-state solutions.
516
+
517
+ Parameters
518
+ ----------
519
+ field : str or VariableDescriptor
520
+ The field used to determine particle motion, typically a velocity-based
521
+ variable (e.g., ``"velocity-magnitude"``, ``"x-velocity"``, etc.).
522
+ surfaces : list of str
523
+ List of seed surfaces where pathlines originate. These may include
524
+ boundary zones, inlets, interior surfaces, or user-defined surfaces.
525
+ solver : FluentSession, optional
526
+ Active Fluent session. If ``None``, the parent class or container
527
+ determines the session.
528
+ **kwargs : dict
529
+ Additional keyword arguments forwarded to
530
+ ``Graphics(session).Pathlines.create()`` or handled by the base class.
343
531
 
344
532
  Examples
345
533
  --------
346
534
  >>> from ansys.fluent.visualization import Pathline
347
-
348
535
  >>> # `solver_session` is a live Fluent session with a case
349
536
  >>> # and data which contains the following surfaces
350
-
351
- >>> pathlines = Pathline(solver=solver_session)
352
- >>> pathlines.field = "velocity-magnitude"
353
- >>> pathlines.surfaces = ["inlet", "inlet1", "inlet2"]
537
+ >>> pathlines = Pathline(
538
+ >>> solver=solver_session,
539
+ >>> field="velocity-magnitude",
540
+ >>> surfaces = ["inlet", "inlet1", "inlet2"],
541
+ >>> )
354
542
  """
355
543
 
356
- def __init__(self, solver=None, **kwargs):
544
+ def __init__(
545
+ self,
546
+ field: str | VariableDescriptor,
547
+ surfaces: list[str],
548
+ solver=None,
549
+ **kwargs
550
+ ):
357
551
  """__init__ method of Pathline class."""
552
+ kwargs.update(
553
+ {
554
+ "field": field,
555
+ "surfaces": surfaces,
556
+ }
557
+ )
358
558
  super().__init__(solver, **kwargs)
359
559
  self.__dict__["_obj"] = Graphics(session=self.solver).Pathlines.create(
360
560
  **self.kwargs
@@ -362,12 +562,33 @@ class Pathline(_GraphicsContainer):
362
562
 
363
563
 
364
564
  class XYPlot(_GraphicsContainer):
365
- """XYPlot.
565
+ """XY plot visualization object.
566
+
567
+ The ``XYPlot`` class creates a Fluent XY plot of a scalar field evaluated
568
+ along one or more surfaces. XY plots are typically used to visualize
569
+ variations of a quantity along a line, surface intersection, or custom
570
+ geometric curve.
571
+
572
+ Parameters
573
+ ----------
574
+ surfaces : list of str
575
+ List of Fluent surfaces on which the XY plot is evaluated. These may be
576
+ boundary zones, interior surfaces, or user-defined surfaces such as line
577
+ surfaces, intersections, or extracted curves.
578
+ y_axis_function : str or VariableDescriptor
579
+ The scalar field whose values are plotted on the Y-axis of the plot.
580
+ Examples include ``"temperature"``, ``"pressure"``,
581
+ ``"velocity-magnitude"``, or any available field in the solver.
582
+ solver : FluentSession, optional
583
+ Active Fluent session. If ``None``, the parent container or base class
584
+ determines the session.
585
+ **kwargs : dict
586
+ Additional keyword arguments forwarded to
587
+ ``Graphics(session).XYPlots.create()`` or handled by the base class.
366
588
 
367
589
  Examples
368
590
  --------
369
591
  >>> from ansys.fluent.visualization import XYPlot
370
-
371
592
  >>> xy_plot = XYPlot(
372
593
  >>> solver=solver_session,
373
594
  >>> surfaces=["outlet"],
@@ -375,8 +596,21 @@ class XYPlot(_GraphicsContainer):
375
596
  >>> )
376
597
  """
377
598
 
378
- def __init__(self, solver=None, local_surfaces_provider=None, **kwargs):
599
+ def __init__(
600
+ self,
601
+ surfaces: list[str],
602
+ y_axis_function: str | VariableDescriptor,
603
+ solver=None,
604
+ local_surfaces_provider=None,
605
+ **kwargs
606
+ ):
379
607
  """__init__ method of XYPlot class."""
608
+ kwargs.update(
609
+ {
610
+ "y_axis_function": y_axis_function,
611
+ "surfaces": surfaces,
612
+ }
613
+ )
380
614
  super().__init__(solver, **kwargs)
381
615
  if "y_axis_function" in self.kwargs:
382
616
  self.kwargs["y_axis_function"] = _to_field_name_str(
@@ -388,18 +622,42 @@ class XYPlot(_GraphicsContainer):
388
622
 
389
623
 
390
624
  class Monitor(_GraphicsContainer):
391
- """Monitor.
625
+ """Monitor visualization object.
626
+
627
+ The ``Monitor`` class provides access to Fluent monitor data for plotting,
628
+ visualization, or post-processing. Monitors typically track quantities
629
+ such as residuals, mass flow rates, forces, moments, lift/drag coefficients,
630
+ or any user-defined monitored variables over iterative or time-dependent
631
+ calculations.
632
+
633
+ Parameters
634
+ ----------
635
+ monitor_set_name : str
636
+ Name of the Fluent monitor set to load. Examples include
637
+ ``"residual"``, ``"mass-flow"`` or any user-created monitor defined
638
+ in the Fluent session.
639
+ solver : FluentSession, optional
640
+ Active Fluent session. If ``None``, the parent class or container
641
+ determines the session.
642
+ **kwargs : dict
643
+ Additional arguments forwarded to
644
+ ``Graphics(session).Monitors.create()`` or handled by the base class.
392
645
 
393
646
  Examples
394
647
  --------
395
648
  >>> from ansys.fluent.visualization import Monitor
396
-
397
- >>> residual = Monitor(solver=solver_session)
398
- >>> residual.monitor_set_name = "residual"
649
+ >>> residual = Monitor(solver=solver_session, monitor_set_name="residual")
399
650
  """
400
651
 
401
- def __init__(self, solver=None, local_surfaces_provider=None, **kwargs):
652
+ def __init__(
653
+ self, monitor_set_name: str, solver=None, local_surfaces_provider=None, **kwargs
654
+ ):
402
655
  """__init__ method of Monitor class."""
656
+ kwargs.update(
657
+ {
658
+ "monitor_set_name": monitor_set_name,
659
+ }
660
+ )
403
661
  super().__init__(solver, **kwargs)
404
662
  self.__dict__["_obj"] = Plots(
405
663
  session=self.solver, local_surfaces_provider=Graphics(solver).Surfaces
@@ -251,7 +251,7 @@ class GraphicsWindow:
251
251
  Session ID for refreshing the windows that belong only to this
252
252
  session. The default is ``""``, in which case the windows in all
253
253
  sessions are refreshed.
254
- overlay : bool, Optional
254
+ overlay : ``bool``, optional
255
255
  Overlay graphics over existing graphics.
256
256
  """
257
257
  if self.window_id: