ansys-fluent-visualization 0.12.dev0__tar.gz → 0.13.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.
- {ansys_fluent_visualization-0.12.dev0 → ansys_fluent_visualization-0.13.0}/PKG-INFO +9 -10
- {ansys_fluent_visualization-0.12.dev0 → ansys_fluent_visualization-0.13.0}/README.rst +2 -2
- {ansys_fluent_visualization-0.12.dev0 → ansys_fluent_visualization-0.13.0}/pyproject.toml +7 -7
- {ansys_fluent_visualization-0.12.dev0 → ansys_fluent_visualization-0.13.0}/src/ansys/fluent/visualization/__init__.py +1 -1
- {ansys_fluent_visualization-0.12.dev0 → ansys_fluent_visualization-0.13.0}/src/ansys/fluent/visualization/matplotlib/matplot_windows_manager.py +4 -4
- {ansys_fluent_visualization-0.12.dev0 → ansys_fluent_visualization-0.13.0}/src/ansys/fluent/visualization/matplotlib/plotter_defns.py +24 -18
- {ansys_fluent_visualization-0.12.dev0 → ansys_fluent_visualization-0.13.0}/LICENSE +0 -0
- {ansys_fluent_visualization-0.12.dev0 → ansys_fluent_visualization-0.13.0}/src/ansys/fluent/visualization/_config.py +0 -0
- {ansys_fluent_visualization-0.12.dev0 → ansys_fluent_visualization-0.13.0}/src/ansys/fluent/visualization/contour.py +0 -0
- {ansys_fluent_visualization-0.12.dev0 → ansys_fluent_visualization-0.13.0}/src/ansys/fluent/visualization/matplotlib/__init__.py +0 -0
- {ansys_fluent_visualization-0.12.dev0 → ansys_fluent_visualization-0.13.0}/src/ansys/fluent/visualization/matplotlib/matplot_objects.py +0 -0
- {ansys_fluent_visualization-0.12.dev0 → ansys_fluent_visualization-0.13.0}/src/ansys/fluent/visualization/post_data_extractor.py +0 -0
- {ansys_fluent_visualization-0.12.dev0 → ansys_fluent_visualization-0.13.0}/src/ansys/fluent/visualization/post_windows_manager.py +0 -0
- {ansys_fluent_visualization-0.12.dev0 → ansys_fluent_visualization-0.13.0}/src/ansys/fluent/visualization/pyvista/__init__.py +0 -0
- {ansys_fluent_visualization-0.12.dev0 → ansys_fluent_visualization-0.13.0}/src/ansys/fluent/visualization/pyvista/pyvista_objects.py +0 -0
- {ansys_fluent_visualization-0.12.dev0 → ansys_fluent_visualization-0.13.0}/src/ansys/fluent/visualization/pyvista/pyvista_windows_manager.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ansys-fluent-visualization
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.13.0
|
|
4
4
|
Summary: A python wrapper for ansys Fluent visualization
|
|
5
5
|
Home-page: https://github.com/ansys/pyfluent-visualization
|
|
6
6
|
License: MIT
|
|
@@ -8,21 +8,20 @@ Author: ANSYS, Inc.
|
|
|
8
8
|
Author-email: ansys.support@ansys.com
|
|
9
9
|
Maintainer: PyAnsys developers
|
|
10
10
|
Maintainer-email: pyansys.maintainers@ansys.com
|
|
11
|
-
Requires-Python: >=3.
|
|
11
|
+
Requires-Python: >=3.10,<4.0
|
|
12
12
|
Classifier: Development Status :: 4 - Beta
|
|
13
13
|
Classifier: License :: OSI Approved :: MIT License
|
|
14
14
|
Classifier: Operating System :: OS Independent
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
-
Requires-Dist: ansys-fluent-core (>=0.
|
|
19
|
+
Requires-Dist: ansys-fluent-core (>=0.25.0,<0.26.0)
|
|
21
20
|
Requires-Dist: importlib-metadata (>=4.0,<5.0) ; python_version < "3.9"
|
|
22
|
-
Requires-Dist: matplotlib (>=3.
|
|
23
|
-
Requires-Dist:
|
|
24
|
-
Requires-Dist:
|
|
25
|
-
Requires-Dist:
|
|
21
|
+
Requires-Dist: matplotlib (>=3.9.0)
|
|
22
|
+
Requires-Dist: pyside6 (>=6.7.2,<6.8.0)
|
|
23
|
+
Requires-Dist: pyvista (>=0.44.1,<0.45.0)
|
|
24
|
+
Requires-Dist: pyvistaqt (>=0.11.1,<0.12.0)
|
|
26
25
|
Project-URL: Documentation, https://visualization.fluent.docs.pyansys.com/
|
|
27
26
|
Project-URL: Repository, https://github.com/ansys/pyfluent-visualization
|
|
28
27
|
Project-URL: Source, https://github.com/ansys/pyfluent-visualization
|
|
@@ -81,8 +80,8 @@ the project support team, email `pyansys.core@ansys.com <pyansys.core@ansys.com>
|
|
|
81
80
|
|
|
82
81
|
Installation
|
|
83
82
|
------------
|
|
84
|
-
The ``ansys-fluent-visualization`` package supports Python 3.
|
|
85
|
-
3.
|
|
83
|
+
The ``ansys-fluent-visualization`` package supports Python 3.10 through Python
|
|
84
|
+
3.12 on Windows and Linux.
|
|
86
85
|
|
|
87
86
|
If you are using Python 3.10, download and install the wheel file for the ``vtk`` package from
|
|
88
87
|
`here for Windows <https://github.com/pyvista/pyvista-wheels/raw/main/vtk-9.1.0.dev0-cp310-cp310-win_amd64.whl>`_
|
|
@@ -50,8 +50,8 @@ the project support team, email `pyansys.core@ansys.com <pyansys.core@ansys.com>
|
|
|
50
50
|
|
|
51
51
|
Installation
|
|
52
52
|
------------
|
|
53
|
-
The ``ansys-fluent-visualization`` package supports Python 3.
|
|
54
|
-
3.
|
|
53
|
+
The ``ansys-fluent-visualization`` package supports Python 3.10 through Python
|
|
54
|
+
3.12 on Windows and Linux.
|
|
55
55
|
|
|
56
56
|
If you are using Python 3.10, download and install the wheel file for the ``vtk`` package from
|
|
57
57
|
`here for Windows <https://github.com/pyvista/pyvista-wheels/raw/main/vtk-9.1.0.dev0-cp310-cp310-win_amd64.whl>`_
|
|
@@ -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.
|
|
8
|
+
version = "0.13.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,13 +23,13 @@ packages = [
|
|
|
23
23
|
]
|
|
24
24
|
|
|
25
25
|
[tool.poetry.dependencies]
|
|
26
|
-
python = ">=3.
|
|
26
|
+
python = ">=3.10,<4.0"
|
|
27
27
|
importlib-metadata = {version = "^4.0", python = "<3.9"}
|
|
28
|
-
ansys-fluent-core = "~=0.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
matplotlib = ">=3.
|
|
28
|
+
ansys-fluent-core = "~=0.25.0"
|
|
29
|
+
pyvista = "~=0.44.1"
|
|
30
|
+
pyvistaqt = "~=0.11.1"
|
|
31
|
+
pyside6 = "~=6.7.2"
|
|
32
|
+
matplotlib = ">=3.9.0"
|
|
33
33
|
|
|
34
34
|
[tool.poetry.urls]
|
|
35
35
|
"Documentation" = "https://visualization.fluent.docs.pyansys.com/"
|
|
@@ -5,7 +5,7 @@ try:
|
|
|
5
5
|
except ModuleNotFoundError:
|
|
6
6
|
import importlib_metadata
|
|
7
7
|
|
|
8
|
-
_VERSION_INFO = "Build date:
|
|
8
|
+
_VERSION_INFO = "Build date: September 05, 2024 07:04 UTC ShaID: 8d4cc7c"
|
|
9
9
|
__version__ = importlib_metadata.version(__name__.replace(".", "-"))
|
|
10
10
|
|
|
11
11
|
|
|
@@ -172,8 +172,8 @@ class _MonitorPlot:
|
|
|
172
172
|
"""Draw a monitor plot."""
|
|
173
173
|
if not self.post_object:
|
|
174
174
|
return
|
|
175
|
-
|
|
176
|
-
indices, columns_data =
|
|
175
|
+
monitors = self.post_object._api_helper.monitors
|
|
176
|
+
indices, columns_data = monitors.get_monitor_set_data(
|
|
177
177
|
self.post_object.monitor_set_name()
|
|
178
178
|
)
|
|
179
179
|
xy_data = {}
|
|
@@ -183,8 +183,8 @@ class _MonitorPlot:
|
|
|
183
183
|
properties = {
|
|
184
184
|
"curves": list(xy_data.keys()),
|
|
185
185
|
"title": monitor_set_name,
|
|
186
|
-
"xlabel":
|
|
187
|
-
"ylabel":
|
|
186
|
+
"xlabel": monitors.get_monitor_set_prop(monitor_set_name, "xlabel"),
|
|
187
|
+
"ylabel": monitors.get_monitor_set_prop(monitor_set_name, "ylabel"),
|
|
188
188
|
"yscale": "log" if monitor_set_name == "residual" else "linear",
|
|
189
189
|
}
|
|
190
190
|
|
|
@@ -52,9 +52,8 @@ class Plotter:
|
|
|
52
52
|
self._data = {}
|
|
53
53
|
self._closed = False
|
|
54
54
|
self._visible = False
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
self.ax = self.fig.add_subplot(111)
|
|
55
|
+
self._remote_process = remote_process
|
|
56
|
+
self.fig = None
|
|
58
57
|
|
|
59
58
|
def plot(self, data: dict) -> None:
|
|
60
59
|
"""Draw plot in window.
|
|
@@ -79,11 +78,19 @@ class Plotter:
|
|
|
79
78
|
self._min_x = min(self._min_x, min_x_value) if self._min_x else min_x_value
|
|
80
79
|
self._max_x = max(self._max_x, max_x_value) if self._max_x else max_x_value
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
)
|
|
81
|
+
if not self._remote_process:
|
|
82
|
+
self.fig = plt.figure(num=self._window_id)
|
|
83
|
+
self.ax = self.fig.add_subplot(111)
|
|
84
|
+
if self._yscale:
|
|
85
|
+
self.ax.set_yscale(self._yscale)
|
|
86
|
+
self.fig.canvas.manager.set_window_title("PyFluent [" + self._window_id + "]")
|
|
87
|
+
plt.title(self._title)
|
|
88
|
+
plt.xlabel(self._xlabel)
|
|
89
|
+
plt.ylabel(self._ylabel)
|
|
90
|
+
for curve in self._curves:
|
|
91
|
+
self.ax.plot(self._data[curve]["xvalues"], self._data[curve]["yvalues"])
|
|
92
|
+
plt.legend(labels=self._curves, loc="upper right")
|
|
93
|
+
|
|
87
94
|
if self._max_x > self._min_x:
|
|
88
95
|
self.ax.set_xlim(self._min_x, self._max_x)
|
|
89
96
|
y_range = self._max_y - self._min_y
|
|
@@ -112,7 +119,10 @@ class Plotter:
|
|
|
112
119
|
file_name : str
|
|
113
120
|
File name to save graphic.
|
|
114
121
|
"""
|
|
115
|
-
|
|
122
|
+
if self.fig:
|
|
123
|
+
self.fig.savefig(file_name)
|
|
124
|
+
else:
|
|
125
|
+
plt.savefig(file_name)
|
|
116
126
|
|
|
117
127
|
def set_properties(self, properties: dict):
|
|
118
128
|
"""Set plot properties.
|
|
@@ -142,20 +152,16 @@ class Plotter:
|
|
|
142
152
|
|
|
143
153
|
# private methods
|
|
144
154
|
def _reset(self):
|
|
145
|
-
plt.figure(self.fig.number)
|
|
146
|
-
self.ax.cla()
|
|
147
|
-
if self._yscale:
|
|
148
|
-
self.ax.set_yscale(self._yscale)
|
|
149
155
|
for curve_name in self._curves:
|
|
150
156
|
self._data[curve_name] = {}
|
|
151
157
|
self._data[curve_name]["xvalues"] = []
|
|
152
158
|
self._data[curve_name]["yvalues"] = []
|
|
159
|
+
if not self.fig:
|
|
160
|
+
return
|
|
161
|
+
plt.figure(self.fig.number)
|
|
162
|
+
self.ax.cla()
|
|
163
|
+
for curve_name in self._curves:
|
|
153
164
|
self.ax.plot([], [], label=curve_name)
|
|
154
|
-
self.fig.canvas.manager.set_window_title("PyFluent [" + self._window_id + "]")
|
|
155
|
-
plt.title(self._title)
|
|
156
|
-
plt.xlabel(self._xlabel)
|
|
157
|
-
plt.ylabel(self._ylabel)
|
|
158
|
-
plt.legend(labels=self._curves, loc="upper right")
|
|
159
165
|
|
|
160
166
|
|
|
161
167
|
class ProcessPlotter(Plotter):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|