ansys-fluent-core 0.32.1__py3-none-any.whl → 0.33.0__py3-none-any.whl

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.

Potentially problematic release.


This version of ansys-fluent-core might be problematic. Click here for more details.

Files changed (77) hide show
  1. ansys/fluent/core/__init__.py +11 -4
  2. ansys/fluent/core/codegen/builtin_settingsgen.py +17 -9
  3. ansys/fluent/core/codegen/datamodelgen.py +2 -2
  4. ansys/fluent/core/codegen/print_fluent_version.py +4 -4
  5. ansys/fluent/core/codegen/settingsgen.py +1 -2
  6. ansys/fluent/core/exceptions.py +0 -1
  7. ansys/fluent/core/file_session.py +9 -9
  8. ansys/fluent/core/filereader/case_file.py +2 -2
  9. ansys/fluent/core/fluent_connection.py +5 -5
  10. ansys/fluent/core/generated/api_tree/api_objects.json +1 -1
  11. ansys/fluent/core/generated/datamodel_231/flicing.py +50 -50
  12. ansys/fluent/core/generated/datamodel_231/meshing.py +201 -201
  13. ansys/fluent/core/generated/datamodel_232/flicing.py +45 -45
  14. ansys/fluent/core/generated/datamodel_232/meshing.py +158 -158
  15. ansys/fluent/core/generated/datamodel_241/flicing.py +60 -60
  16. ansys/fluent/core/generated/datamodel_241/meshing.py +279 -279
  17. ansys/fluent/core/generated/datamodel_242/flicing.py +25 -25
  18. ansys/fluent/core/generated/datamodel_242/meshing.py +290 -290
  19. ansys/fluent/core/generated/datamodel_251/flicing.py +40 -40
  20. ansys/fluent/core/generated/datamodel_251/meshing.py +311 -311
  21. ansys/fluent/core/generated/datamodel_251/part_management.py +9 -9
  22. ansys/fluent/core/generated/datamodel_252/flicing.py +35 -35
  23. ansys/fluent/core/generated/datamodel_252/meshing.py +365 -365
  24. ansys/fluent/core/generated/datamodel_252/part_management.py +5 -5
  25. ansys/fluent/core/generated/datamodel_261/flicing.py +35 -35
  26. ansys/fluent/core/generated/datamodel_261/meshing.py +427 -421
  27. ansys/fluent/core/generated/datamodel_261/part_management.py +5 -5
  28. ansys/fluent/core/generated/datamodel_261/solver_workflow.py +7 -0
  29. ansys/fluent/core/generated/fluent_version_261.py +3 -3
  30. ansys/fluent/core/generated/solver/settings_252.py +55 -55
  31. ansys/fluent/core/generated/solver/settings_261.py +2464 -3937
  32. ansys/fluent/core/generated/solver/settings_261.pyi +3520 -6126
  33. ansys/fluent/core/generated/solver/settings_builtin.py +57 -1
  34. ansys/fluent/core/generated/solver/settings_builtin.pyi +79 -0
  35. ansys/fluent/core/generated/solver/tui_261.py +185 -345
  36. ansys/fluent/core/launcher/container_launcher.py +7 -9
  37. ansys/fluent/core/launcher/fluent_container.py +106 -75
  38. ansys/fluent/core/launcher/launch_options.py +22 -1
  39. ansys/fluent/core/launcher/launcher.py +5 -4
  40. ansys/fluent/core/pyfluent_warnings.py +13 -0
  41. ansys/fluent/core/search.py +170 -83
  42. ansys/fluent/core/services/app_utilities.py +52 -32
  43. ansys/fluent/core/services/datamodel_se.py +6 -3
  44. ansys/fluent/core/services/scheme_eval.py +2 -0
  45. ansys/fluent/core/services/solution_variables.py +64 -49
  46. ansys/fluent/core/session.py +36 -30
  47. ansys/fluent/core/session_base_meshing.py +2 -24
  48. ansys/fluent/core/session_shared.py +5 -2
  49. ansys/fluent/core/session_solver.py +15 -9
  50. ansys/fluent/core/solver/__init__.py +1 -1
  51. ansys/fluent/core/solver/flobject.py +62 -64
  52. ansys/fluent/core/solver/settings_builtin_bases.py +14 -7
  53. ansys/fluent/core/solver/settings_builtin_data.py +121 -540
  54. ansys/fluent/core/utils/context_managers.py +0 -17
  55. ansys/fluent/core/utils/fluent_version.py +173 -0
  56. {ansys_fluent_core-0.32.1.dist-info → ansys_fluent_core-0.33.0.dist-info}/METADATA +9 -9
  57. {ansys_fluent_core-0.32.1.dist-info → ansys_fluent_core-0.33.0.dist-info}/RECORD +59 -77
  58. {ansys_fluent_core-0.32.1.dist-info → ansys_fluent_core-0.33.0.dist-info}/WHEEL +1 -1
  59. ansys/fluent/core/generated/datamodel_222/meshing.py +0 -6332
  60. ansys/fluent/core/generated/datamodel_222/part_management.py +0 -2072
  61. ansys/fluent/core/generated/datamodel_222/pm_file_management.py +0 -290
  62. ansys/fluent/core/generated/datamodel_222/preferences.py +0 -2449
  63. ansys/fluent/core/generated/datamodel_222/workflow.py +0 -651
  64. ansys/fluent/core/generated/fluent_version_222.py +0 -5
  65. ansys/fluent/core/generated/meshing/tui_222.py +0 -9649
  66. ansys/fluent/core/generated/solver/settings_222.py +0 -29473
  67. ansys/fluent/core/generated/solver/settings_222.pyi +0 -19590
  68. ansys/fluent/core/generated/solver/tui_222.py +0 -43451
  69. ansys/fluent/core/post_objects/__init__.py +0 -21
  70. ansys/fluent/core/post_objects/check_in_notebook.py +0 -35
  71. ansys/fluent/core/post_objects/meta.py +0 -926
  72. ansys/fluent/core/post_objects/post_helper.py +0 -178
  73. ansys/fluent/core/post_objects/post_object_definitions.py +0 -693
  74. ansys/fluent/core/post_objects/post_objects_container.py +0 -248
  75. ansys/fluent/core/post_objects/singleton_meta.py +0 -42
  76. ansys/fluent/core/post_objects/timing_decorator.py +0 -38
  77. {ansys_fluent_core-0.32.1.dist-info → ansys_fluent_core-0.33.0.dist-info/licenses}/LICENSE +0 -0
@@ -1,248 +0,0 @@
1
- # Copyright (C) 2021 - 2025 ANSYS, Inc. and/or its affiliates.
2
- # SPDX-License-Identifier: MIT
3
- #
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
-
23
- """Module providing visualization objects to facilitate integration with libraries like
24
- Matplotlib and pyvista."""
25
-
26
- import inspect
27
-
28
- from ansys.fluent.core.post_objects.meta import PyLocalContainer
29
-
30
-
31
- class Container:
32
- """Base class for containers, for example, Plots, Graphics.
33
-
34
- Parameters
35
- ----------
36
- session : object
37
- Session object.
38
- container_type: object
39
- Container type (for example, Plots, Graphics)
40
- module: object
41
- Python module containing post definitions
42
- post_api_helper: object
43
- Provides helper APIs for post-processing
44
- local_surfaces_provider : object, optional
45
- Object providing local surfaces so that user can access surfaces
46
- created in other modules, such as PyVista. The default is ``None``.
47
- """
48
-
49
- def __init__(
50
- self,
51
- session,
52
- container_type,
53
- module,
54
- post_api_helper,
55
- local_surfaces_provider=None,
56
- ):
57
- """__init__ method of Container class."""
58
- session_state = container_type._sessions_state.get(session)
59
- self._path = container_type.__name__
60
- if not session_state:
61
- session_state = self.__dict__
62
- container_type._sessions_state[session] = session_state
63
- self.session = session
64
- self._init_module(self, module, post_api_helper)
65
- else:
66
- self.__dict__ = session_state
67
- self._local_surfaces_provider = lambda: local_surfaces_provider or getattr(
68
- self, "Surfaces", []
69
- )
70
-
71
- def get_path(self):
72
- """Get container path."""
73
- return self._path
74
-
75
- @property
76
- def type(self):
77
- """Type."""
78
- return "object"
79
-
80
- def update(self, value):
81
- """Update the value."""
82
- for name, val in value.items():
83
- o = getattr(self, name)
84
- o.update(val)
85
-
86
- def __call__(self, show_attributes=False):
87
- state = {}
88
- for name, cls in self.__dict__.items():
89
- o = getattr(self, name)
90
- if o is None or name.startswith("_") or name.startswith("__"):
91
- continue
92
-
93
- if cls.__class__.__name__ == "PyLocalContainer":
94
- container = o
95
- if getattr(container, "is_active", True):
96
- state[name] = {}
97
- for child_name in container:
98
- o = container[child_name]
99
- if getattr(o, "is_active", True):
100
- state[name][child_name] = o()
101
-
102
- return state
103
-
104
- def _init_module(self, obj, mod, post_api_helper):
105
- """
106
- Dynamically initializes and attaches containers for classes in a module.
107
-
108
- Args:
109
- obj: The parent object to which containers are attached.
110
- mod: The module containing class definitions to process.
111
- post_api_helper: Helper object for post-processing API interactions.
112
-
113
- This method identifies classes in the module that match certain criteria,
114
- creates a container for managing instances of these classes, and attaches
115
- the container to the parent object (`obj`). A `create()` method is also
116
- dynamically added to each container for creating and initializing new objects.
117
- """
118
- # Iterate through all attributes in the module's dictionary
119
- for name, cls in mod.__dict__.items():
120
- if cls.__class__.__name__ in (
121
- "PyLocalNamedObjectMetaAbstract",
122
- ) and not inspect.isabstract(cls):
123
- cont = PyLocalContainer(self, cls, post_api_helper, cls.PLURAL)
124
-
125
- # Define a method to add a "create" function to the container
126
- def _add_create(py_cont):
127
- def _create(**kwargs):
128
- new_object = py_cont.__getitem__(
129
- py_cont._get_unique_chid_name()
130
- )
131
- # Validate that all kwargs are valid attributes for the object
132
- unexpected_args = set(kwargs) - set(new_object())
133
- if unexpected_args:
134
- raise TypeError(
135
- f"create() got an unexpected keyword argument '{next(iter(unexpected_args))}'."
136
- )
137
- for key, value in kwargs.items():
138
- setattr(new_object, key, value)
139
- return new_object
140
-
141
- return _create
142
-
143
- # Attach the create method to the container
144
- setattr(cont, "create", _add_create(cont))
145
- # Attach the container to the parent object
146
- setattr(
147
- obj,
148
- cls.PLURAL,
149
- cont,
150
- )
151
-
152
-
153
- class Plots(Container):
154
- """Provides the Matplotlib ``Plots`` objects manager.
155
-
156
- This class provides access to ``Plots`` object containers for a given
157
- session so that plots can be created.
158
-
159
- Parameters
160
- ----------
161
- session : obj
162
- Session object.
163
- module: object
164
- Python module containing post definitions
165
- post_api_helper: object
166
- Provides helper APIs for post-processing
167
- local_surfaces_provider : object, optional
168
- Object providing local surfaces so that you can access surfaces
169
- created in other modules, such as pyvista. The default is ``None``.
170
-
171
- Attributes
172
- ----------
173
- XYPlots : dict
174
- Container for XY plot objects.
175
- MonitorPlots : dict
176
- Container for monitor plot objects.
177
- """
178
-
179
- _sessions_state = {}
180
-
181
- def __init__(self, session, module, post_api_helper, local_surfaces_provider=None):
182
- """__init__ method of Plots class."""
183
- super().__init__(
184
- session, self.__class__, module, post_api_helper, local_surfaces_provider
185
- )
186
-
187
-
188
- class Graphics(Container):
189
- """Provides the pyvista ``Graphics`` objects manager.
190
-
191
- This class provides access to ``Graphics`` object containers for a given
192
- session so that graphics objects can be created.
193
-
194
- Parameters
195
- ----------
196
- session : obj
197
- Session object.
198
- module: object
199
- Python module containing post definitions
200
- post_api_helper: object
201
- Provides helper APIs for post-processing
202
- local_surfaces_provider : object, optional
203
- Object providing local surfaces so that you can access surfaces
204
- created in other modules, such as pyvista. The default is ``None``.
205
-
206
- Attributes
207
- ----------
208
- Meshes : dict
209
- Container for mesh objects.
210
- Surfaces : dict
211
- Container for surface objects.
212
- Contours : dict
213
- Container for contour objects.
214
- Vectors : dict
215
- Container for vector objects.
216
- """
217
-
218
- _sessions_state = {}
219
-
220
- def __init__(self, session, module, post_api_helper, local_surfaces_provider=None):
221
- """__init__ method of Graphics class."""
222
- super().__init__(
223
- session, self.__class__, module, post_api_helper, local_surfaces_provider
224
- )
225
-
226
- def add_outline_mesh(self):
227
- """Add a mesh outline.
228
-
229
- Parameters
230
- ----------
231
- None
232
-
233
- Returns
234
- -------
235
- None
236
- """
237
- meshes = getattr(self, "Meshes", None)
238
- if meshes is not None:
239
- outline_mesh_id = "mesh-outline"
240
- outline_mesh = meshes[outline_mesh_id]
241
- outline_mesh.surfaces = [
242
- k
243
- for k, v in outline_mesh._api_helper.field_info()
244
- .get_surfaces_info()
245
- .items()
246
- if v["type"] == "zone-surf" and v["zone_type"] != "interior"
247
- ]
248
- return outline_mesh
@@ -1,42 +0,0 @@
1
- # Copyright (C) 2021 - 2025 ANSYS, Inc. and/or its affiliates.
2
- # SPDX-License-Identifier: MIT
3
- #
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
-
23
- """Provides a module for metaclasses."""
24
-
25
- from abc import ABCMeta
26
-
27
-
28
- class SingletonMeta(type):
29
- """Provides the metaclass for the singleton type."""
30
-
31
- _single_instance = None
32
-
33
- def __call__(cls, *args, **kwargs):
34
- if not cls._single_instance:
35
- cls._single_instance = super(SingletonMeta, cls).__call__(*args, **kwargs)
36
- return cls._single_instance
37
-
38
-
39
- class AbstractSingletonMeta(ABCMeta, SingletonMeta):
40
- """Provides the metaclass for the abstract singleton type."""
41
-
42
- pass
@@ -1,38 +0,0 @@
1
- # Copyright (C) 2021 - 2025 ANSYS, Inc. and/or its affiliates.
2
- # SPDX-License-Identifier: MIT
3
- #
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
-
23
- """Provides a module for the timing function decorator."""
24
-
25
- import time
26
-
27
-
28
- def timing(func):
29
- """Decorates timing function."""
30
-
31
- def wrapper(*args, **kwargs):
32
- t1 = time.time()
33
- res = func(*args, **kwargs)
34
- t2 = time.time()
35
- print(func.__name__, t2 - t1)
36
- return res
37
-
38
- return wrapper