ansys-fluent-visualization 0.28.dev0__tar.gz → 0.29.0__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.28.dev0 → ansys_fluent_visualization-0.29.0}/PKG-INFO +5 -7
  2. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/README.rst +2 -2
  3. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/pyproject.toml +3 -3
  4. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/interface/post_objects/meta.py +3 -1
  5. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/interface/post_objects/post_helper.py +1 -1
  6. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/interface/post_objects/post_objects_container.py +2 -2
  7. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/containers.py +7 -2
  8. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/contour.py +2 -6
  9. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/graphics/graphics_objects.py +5 -5
  10. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/graphics/graphics_windows.py +1 -1
  11. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/graphics/graphics_windows_manager.py +3 -3
  12. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/graphics/pyvista/renderer.py +1 -1
  13. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/plotter/matplotlib/renderer.py +2 -2
  14. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/plotter/pyvista/renderer.py +4 -4
  15. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/post_data_extractor.py +1 -3
  16. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/visualization_windows_manager.py +1 -1
  17. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/AUTHORS +0 -0
  18. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/LICENSE +0 -0
  19. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/interface/__init__.py +0 -0
  20. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/interface/post_objects/__init__.py +0 -0
  21. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/interface/post_objects/check_in_notebook.py +0 -0
  22. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/interface/post_objects/post_object_definitions.py +0 -0
  23. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/interface/post_objects/singleton_meta.py +0 -0
  24. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/__init__.py +0 -0
  25. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/base/__init__.py +0 -0
  26. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/base/renderer.py +0 -0
  27. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/config.py +0 -0
  28. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/graphics/__init__.py +0 -0
  29. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/graphics/pyvista/__init__.py +0 -0
  30. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/graphics/single_qt_windows.py +0 -0
  31. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/matplotlib/__init__.py +0 -0
  32. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/plotter/__init__.py +0 -0
  33. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/plotter/matplotlib/__init__.py +0 -0
  34. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/plotter/plotter_objects.py +0 -0
  35. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/plotter/plotter_windows.py +0 -0
  36. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/plotter/plotter_windows_manager.py +0 -0
  37. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/plotter/pyvista/__init__.py +0 -0
  38. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/pyvista/__init__.py +0 -0
  39. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/registrar.py +0 -0
  40. {ansys_fluent_visualization-0.28.dev0 → ansys_fluent_visualization-0.29.0}/src/ansys/fluent/visualization/renderer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ansys-fluent-visualization
3
- Version: 0.28.dev0
3
+ Version: 0.29.0
4
4
  Summary: A python wrapper for ansys Fluent visualization
5
5
  License: MIT
6
6
  License-File: AUTHORS
@@ -9,19 +9,17 @@ Author: ANSYS, Inc.
9
9
  Author-email: ansys.support@ansys.com
10
10
  Maintainer: PyAnsys developers
11
11
  Maintainer-email: pyansys.maintainers@ansys.com
12
- Requires-Python: >=3.10,<3.15
12
+ Requires-Python: >=3.12,<3.15
13
13
  Classifier: Development Status :: 4 - Beta
14
14
  Classifier: License :: OSI Approved :: MIT License
15
15
  Classifier: Operating System :: OS Independent
16
16
  Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.10
18
- Classifier: Programming Language :: Python :: 3.11
19
17
  Classifier: Programming Language :: Python :: 3.12
20
18
  Classifier: Programming Language :: Python :: 3.13
21
19
  Classifier: Programming Language :: Python :: 3.14
22
20
  Provides-Extra: interactive
23
21
  Provides-Extra: single-window
24
- Requires-Dist: ansys-fluent-core (>=0.35.0)
22
+ Requires-Dist: ansys-fluent-core (>=0.44.0)
25
23
  Requires-Dist: importlib-metadata (>=4.0,<5.0) ; python_version < "3.9"
26
24
  Requires-Dist: matplotlib (>=3.6.0)
27
25
  Requires-Dist: pyside6 (>=6.8.1,<7.0.0) ; extra == "single-window"
@@ -92,10 +90,10 @@ the project support team, email `pyansys.core@ansys.com <pyansys.core@ansys.com>
92
90
 
93
91
  Installation
94
92
  ------------
95
- The ``ansys-fluent-visualization`` package supports Python 3.10 through Python
93
+ The ``ansys-fluent-visualization`` package supports Python 3.12 through Python
96
94
  3.14 on Windows and Linux.
97
95
 
98
- If you are using Python 3.10, download and install the wheel file for the ``vtk`` package from
96
+ If you are using Python 3.12, download and install the wheel file for the ``vtk`` package from
99
97
  `here for Windows <https://github.com/pyvista/pyvista-wheels/raw/main/vtk-9.1.0.dev0-cp310-cp310-win_amd64.whl>`_
100
98
  or from `here for Linux <https://github.com/pyvista/pyvista-wheels/raw/main/vtk-9.1.0.dev0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl>`_.
101
99
 
@@ -57,10 +57,10 @@ the project support team, email `pyansys.core@ansys.com <pyansys.core@ansys.com>
57
57
 
58
58
  Installation
59
59
  ------------
60
- The ``ansys-fluent-visualization`` package supports Python 3.10 through Python
60
+ The ``ansys-fluent-visualization`` package supports Python 3.12 through Python
61
61
  3.14 on Windows and Linux.
62
62
 
63
- If you are using Python 3.10, download and install the wheel file for the ``vtk`` package from
63
+ If you are using Python 3.12, download and install the wheel file for the ``vtk`` package from
64
64
  `here for Windows <https://github.com/pyvista/pyvista-wheels/raw/main/vtk-9.1.0.dev0-cp310-cp310-win_amd64.whl>`_
65
65
  or from `here for Linux <https://github.com/pyvista/pyvista-wheels/raw/main/vtk-9.1.0.dev0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl>`_.
66
66
 
@@ -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.28.dev0"
8
+ version = "0.29.0"
9
9
  description = "A python wrapper for ansys Fluent visualization"
10
10
  license = "MIT"
11
11
  authors = ["ANSYS, Inc. <ansys.support@ansys.com>"]
@@ -23,9 +23,9 @@ packages = [
23
23
  ]
24
24
 
25
25
  [tool.poetry.dependencies]
26
- python = ">=3.10,<3.15"
26
+ python = ">=3.12,<3.15"
27
27
  importlib-metadata = {version = "^4.0", python = "<3.9"}
28
- ansys-fluent-core = ">=0.35.0"
28
+ ansys-fluent-core = ">=0.44.0"
29
29
  pyvista = ">=0.44.0"
30
30
  matplotlib = ">=3.6.0"
31
31
  pyvistaqt = { version = "~=0.11.1", optional = true }
@@ -254,7 +254,9 @@ class PyLocalBaseMeta(type):
254
254
  attrs["root"] = property(lambda self: self.get_root())
255
255
  attrs["path"] = property(lambda self: self.get_path())
256
256
  attrs["session"] = property(lambda self: self.get_session())
257
- attrs["field_data"] = property(lambda self: self.get_session().field_data)
257
+ attrs["field_data"] = property(
258
+ lambda self: self.get_session().fields.field_data
259
+ )
258
260
  attrs["monitors"] = property(lambda self: self.get_session().monitors)
259
261
  attrs["session_handle"] = property(lambda self: self.get_session_handle())
260
262
  return super(PyLocalBaseMeta, cls).__new__(cls, name, bases, attrs)
@@ -60,7 +60,7 @@ class PostAPIHelper:
60
60
  return local_surface_name.lower()
61
61
 
62
62
  def _get_api_handle(self):
63
- return self.obj.get_root().session.results.surfaces
63
+ return self.obj.get_root().session.settings.results.surfaces
64
64
 
65
65
  def _delete_if_exists_on_server(self):
66
66
  field_data = self.obj._api_helper.field_data()
@@ -242,8 +242,8 @@ class Graphics(Container):
242
242
  outline_mesh = meshes[outline_mesh_id]
243
243
  outline_mesh.surfaces = [
244
244
  k
245
- for k, v in outline_mesh._api_helper.field_info()
246
- .get_surfaces_info()
245
+ for k, v in outline_mesh._api_helper._field_info()
246
+ ._get_surfaces_info()
247
247
  .items()
248
248
  if v["type"] == "zone-surf" and v["zone_type"] != "interior"
249
249
  ]
@@ -24,8 +24,10 @@
24
24
 
25
25
  import warnings
26
26
 
27
- from ansys.fluent.core.field_data_interfaces import _to_field_name_str
28
- from ansys.fluent.core.utils.context_managers import _get_active_session
27
+ from ansys.fluent.core._variable_strategies import (
28
+ FluentFieldDataNamingStrategy as naming_strategy,
29
+ )
30
+ from ansys.fluent.core.execution.session.session import _get_active_session
29
31
  from ansys.units import VariableDescriptor
30
32
 
31
33
  from ansys.fluent.visualization.graphics import Graphics
@@ -35,6 +37,9 @@ from ansys.fluent.visualization.post_data_extractor import (
35
37
  XYPlotDataExtractor,
36
38
  )
37
39
 
40
+ _naming_strategy_instance = naming_strategy()
41
+ _to_field_name_str = _naming_strategy_instance.to_string
42
+
38
43
 
39
44
  class GraphicsObject:
40
45
  """Base class for graphics containers."""
@@ -41,12 +41,8 @@ class Contour:
41
41
  """
42
42
  Check field and surface names.
43
43
  """
44
- allowed_fields = (
45
- solver.field_data.get_scalar_field_data.field_name.allowed_values()
46
- )
47
- allowed_surfaces = (
48
- solver.field_data.get_scalar_field_data.surface_name.allowed_values()
49
- )
44
+ allowed_fields = solver.fields.field_data.scalar_fields.allowed_values()
45
+ allowed_surfaces = solver.fields.field_data.surfaces.allowed_values()
50
46
  if self.field not in allowed_fields:
51
47
  raise ValueError(
52
48
  f"{self.field} is not valid field. Valid fields are {allowed_fields}"
@@ -70,7 +70,7 @@ class Mesh(MeshDefn):
70
70
 
71
71
  .. code-block:: python
72
72
 
73
- from ansys.fluent.visualization import Graphics
73
+ from ansys.fluent.visualization import Graphics
74
74
 
75
75
  graphics_session = Graphics(session)
76
76
  mesh1 = graphics_session.Meshes["mesh-1"]
@@ -102,7 +102,7 @@ class Pathlines(PathlinesDefn):
102
102
 
103
103
  .. code-block:: python
104
104
 
105
- from ansys.fluent.visualization import Graphics
105
+ from ansys.fluent.visualization import Graphics
106
106
 
107
107
  graphics_session = Graphics(session)
108
108
  pathlines1 = graphics_session.Pathlines["pathlines-1"]
@@ -113,7 +113,7 @@ class Pathlines(PathlinesDefn):
113
113
 
114
114
  @Command
115
115
  def display(self, window_id: Optional[str] = None, overlay: Optional[bool] = False):
116
- """Display mesh graphics.
116
+ """Display pathlines graphics.
117
117
 
118
118
  Parameters
119
119
  ----------
@@ -186,7 +186,7 @@ class Contour(ContourDefn):
186
186
 
187
187
  .. code-block:: python
188
188
 
189
- from ansys.fluent.visualization import Graphics
189
+ from ansys.fluent.visualization import Graphics
190
190
 
191
191
  graphics_session = Graphics(session)
192
192
  contour1 = graphics_session.Contours["contour-1"]
@@ -227,7 +227,7 @@ class Vector(VectorDefn):
227
227
 
228
228
  .. code-block:: python
229
229
 
230
- from ansys.fluent.visualization import Graphics
230
+ from ansys.fluent.visualization import Graphics
231
231
 
232
232
  graphics_session = Graphics(session)
233
233
  vector1 = graphics_session.Vectors["vector-1"]
@@ -134,7 +134,7 @@ class _GraphicsWindow:
134
134
  Session ID for refreshing the windows that belong only to this
135
135
  session. The default is ``""``, in which case the windows in all
136
136
  sessions are refreshed.
137
- overlay : bool, Optional
137
+ overlay : bool, optional
138
138
  Overlay graphics over existing graphics.
139
139
  """
140
140
  if self.window_id:
@@ -291,7 +291,7 @@ class GraphicsWindow(VisualizationWindow):
291
291
  )
292
292
 
293
293
  def _display_vector(self, obj, obj_dict):
294
- field_data = obj.session.field_data
294
+ field_data = obj.session.fields.field_data
295
295
  vectors_of = obj.vectors_of()
296
296
  # scalar bar properties
297
297
  try:
@@ -571,7 +571,7 @@ class GraphicsWindow(VisualizationWindow):
571
571
  auto_range_on = obj.range.auto_range_on
572
572
  if auto_range_on.global_range():
573
573
  if filled:
574
- field_data = obj.session.field_data
574
+ field_data = obj.session.fields.field_data
575
575
  _mesh_dict = {
576
576
  "data": mesh,
577
577
  "clim": field_data.scalar_fields.range(obj.field(), False),
@@ -846,7 +846,7 @@ class GraphicsWindowsManager(metaclass=AbstractSingletonMeta):
846
846
  windows_id : List[str], optional
847
847
  IDs of the windows to refresh. The default is ``[]``, in which case
848
848
  all windows are refreshed.
849
- overlay : bool, Optional
849
+ overlay : bool, optional
850
850
  Overlay graphics over existing graphics.
851
851
  """
852
852
  if windows_id is None:
@@ -121,7 +121,7 @@ class Renderer(AbstractRenderer):
121
121
  Parameters
122
122
  ----------
123
123
  meshes : list[list[dict]]
124
- Data to plot. Data consists the list of x and y
124
+ Data to plot. Data consists of the list of x and y
125
125
  values for each curve.
126
126
  """
127
127
  self.plotter.clear()
@@ -58,7 +58,7 @@ class Plotter(AbstractRenderer):
58
58
  ylabel : str, optional
59
59
  Y axis label.
60
60
  figure : str, optional
61
- Matplot lib figure.
61
+ Matplotlib figure.
62
62
  axis : str, optional
63
63
  Subplot indices.
64
64
  remote_process: bool, optional
@@ -99,7 +99,7 @@ class Plotter(AbstractRenderer):
99
99
  Parameters
100
100
  ----------
101
101
  meshes : list[list[dict]]
102
- Data to plot. Data consists the list of x and y
102
+ Data to plot. Data consists of the list of x and y
103
103
  values for each curve.
104
104
  """
105
105
  for data_sub_item in meshes:
@@ -29,7 +29,7 @@ from ansys.fluent.visualization.base.renderer import AbstractRenderer
29
29
 
30
30
 
31
31
  class Plotter(AbstractRenderer):
32
- """Class for pyvista chart 2D plotter."""
32
+ """Class for PyVista chart 2D plotter."""
33
33
 
34
34
  def __init__(
35
35
  self,
@@ -41,7 +41,7 @@ class Plotter(AbstractRenderer):
41
41
  remote_process: Optional[bool] = False,
42
42
  grid: tuple | None = (1, 1),
43
43
  ):
44
- """Instantiate a pyvista chart 2D plotter.
44
+ """Instantiate a PyVista chart 2D plotter.
45
45
 
46
46
  Parameters
47
47
  ----------
@@ -56,7 +56,7 @@ class Plotter(AbstractRenderer):
56
56
  ylabel : str, optional
57
57
  Y axis label.
58
58
  figure : str, optional
59
- Matplot lib figure.
59
+ Matplotlib figure.
60
60
  axis : str, optional
61
61
  Subplot indices.
62
62
  remote_process: bool, optional
@@ -86,7 +86,7 @@ class Plotter(AbstractRenderer):
86
86
  Parameters
87
87
  ----------
88
88
  meshes : list[list[dict]]
89
- Data to plot. Data consists the list of x and y
89
+ Data to plot. Data consists of the list of x and y
90
90
  values for each curve.
91
91
  """
92
92
  if not self._remote_process:
@@ -25,7 +25,7 @@
25
25
  import itertools
26
26
  from typing import Dict
27
27
 
28
- from ansys.fluent.core.field_data_interfaces import (
28
+ from ansys.fluent.core.fields.field_data import (
29
29
  PathlinesFieldDataRequest,
30
30
  ScalarFieldDataRequest,
31
31
  SurfaceDataType,
@@ -150,8 +150,6 @@ class FieldDataExtractor:
150
150
  surfaces=obj.surfaces(),
151
151
  data_types=[SurfaceDataType.Vertices, SurfaceDataType.FacesConnectivity],
152
152
  flatten_connectivity=True,
153
- *args,
154
- **kwargs,
155
153
  )
156
154
  scalar_request = ScalarFieldDataRequest(
157
155
  field_name=field,
@@ -148,7 +148,7 @@ class VisualizationWindowsManager(metaclass=ABCMeta):
148
148
  Windows id to refresh. If not specified, all windows will be
149
149
  refreshed.
150
150
 
151
- overlay : bool, Optional
151
+ overlay : bool, optional
152
152
  Overlay graphics over existing graphics.
153
153
  """
154
154
  pass