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
@@ -32,6 +32,13 @@ from ansys.fluent.core.logger import set_console_logging_level # noqa: F401
32
32
 
33
33
  # isort: on
34
34
 
35
+ from ansys.fluent.core.field_data_interfaces import ( # noqa: F401
36
+ PathlinesFieldDataRequest,
37
+ ScalarFieldDataRequest,
38
+ SurfaceDataType,
39
+ SurfaceFieldDataRequest,
40
+ VectorFieldDataRequest,
41
+ )
35
42
  from ansys.fluent.core.get_build_details import ( # noqa: F401
36
43
  get_build_version,
37
44
  get_build_version_string,
@@ -70,9 +77,9 @@ from ansys.fluent.core.utils import fldoc, get_examples_download_dir
70
77
  from ansys.fluent.core.utils.fluent_version import FluentVersion # noqa: F401
71
78
  from ansys.fluent.core.utils.setup_for_fluent import setup_for_fluent # noqa: F401
72
79
 
73
- __version__ = "0.32.1"
80
+ __version__ = "0.33.0"
74
81
 
75
- _VERSION_INFO = "Build date: May 30, 2025 09:28 UTC ShaID: f9d4ca8"
82
+ _VERSION_INFO = "Build date: June 24, 2025 03:08 UTC ShaID: 9d27ec6"
76
83
  """
77
84
  Global variable indicating the version info of the PyFluent package.
78
85
  Build timestamp and commit hash are added to this variable during packaging.
@@ -102,10 +109,10 @@ def version_info() -> str:
102
109
 
103
110
 
104
111
  # Latest released Fluent version
105
- FLUENT_RELEASE_VERSION = "25.1.0"
112
+ FLUENT_RELEASE_VERSION = "25.2.0"
106
113
 
107
114
  # Current dev Fluent version
108
- FLUENT_DEV_VERSION = "25.2.0"
115
+ FLUENT_DEV_VERSION = "26.1.0"
109
116
 
110
117
  # Path to the example input/data files are downloaded
111
118
  EXAMPLES_PATH = str(get_examples_download_dir())
@@ -25,6 +25,7 @@
25
25
  from ansys.fluent.core import CODEGEN_OUTDIR, FluentVersion
26
26
  from ansys.fluent.core.solver.flobject import CreatableNamedObjectMixin, NamedObject
27
27
  from ansys.fluent.core.solver.settings_builtin_data import DATA
28
+ from ansys.fluent.core.utils.fluent_version import all_versions
28
29
 
29
30
  _PY_FILE = CODEGEN_OUTDIR / "solver" / "settings_builtin.py"
30
31
  _PYI_FILE = CODEGEN_OUTDIR / "solver" / "settings_builtin.pyi"
@@ -67,7 +68,7 @@ def generate(version: str):
67
68
  with open(_PY_FILE, "w") as f:
68
69
  f.write('"""Solver settings."""\n\n')
69
70
  f.write(
70
- "from ansys.fluent.core.solver.settings_builtin_bases import _SingletonSetting, _CreatableNamedObjectSetting, _NonCreatableNamedObjectSetting, Solver\n"
71
+ "from ansys.fluent.core.solver.settings_builtin_bases import _SingletonSetting, _CreatableNamedObjectSetting, _NonCreatableNamedObjectSetting, _CommandSetting, Solver\n"
71
72
  "from ansys.fluent.core.solver.flobject import SettingsBase\n\n\n"
72
73
  )
73
74
  f.write("__all__ = [\n")
@@ -77,14 +78,16 @@ def generate(version: str):
77
78
  for name, v in DATA.items():
78
79
  kind, path = v
79
80
  if isinstance(path, dict):
80
- if version not in path:
81
- continue
82
- path = path[version]
81
+ for version_set, p in path.items():
82
+ if version in version_set:
83
+ path = p
84
+ break
83
85
  named_objects, final_type = _get_named_objects_in_path(root, path, kind)
84
86
  if kind == "NamedObject":
85
87
  kind = f"{final_type}NamedObject"
86
88
  f.write(f"class {name}(_{kind}Setting):\n")
87
- f.write(f' """{name} setting."""\n\n')
89
+ doc_kind = "command" if kind == "Command" else "setting"
90
+ f.write(f' """{name} {doc_kind}."""\n\n')
88
91
  f.write(" def __init__(self")
89
92
  for named_object in named_objects:
90
93
  f.write(f", {named_object}: str")
@@ -93,6 +96,8 @@ def generate(version: str):
93
96
  f.write(", name: str = None")
94
97
  elif kind == "CreatableNamedObject":
95
98
  f.write(", name: str = None, new_instance_name: str = None")
99
+ if kind == "Command":
100
+ f.write(", **kwargs")
96
101
  f.write("):\n")
97
102
  f.write(" super().__init__(settings_source=settings_source")
98
103
  if kind == "NonCreatableNamedObject":
@@ -101,6 +106,8 @@ def generate(version: str):
101
106
  f.write(", name=name, new_instance_name=new_instance_name")
102
107
  for named_object in named_objects:
103
108
  f.write(f", {named_object}={named_object}")
109
+ if kind == "Command":
110
+ f.write(", **kwargs")
104
111
  f.write(")\n\n")
105
112
 
106
113
  with open(_PYI_FILE, "w") as f:
@@ -113,14 +120,15 @@ def generate(version: str):
113
120
  kind, path = v
114
121
  f.write(f"class {name}(\n")
115
122
  if isinstance(path, str):
116
- path = {v: path for v in FluentVersion}
117
- for v, p in path.items():
123
+ path = {all_versions(): path}
124
+ for version_set, p in path.items():
118
125
  if kind == "NamedObject":
119
126
  p = f"{p}.child_object_type"
120
- f.write(f" type(settings_root_{v.number}.{p}),\n")
127
+ for v in reversed(list(version_set)):
128
+ f.write(f" type(settings_root_{v.number}.{p}),\n")
121
129
  f.write("): ...\n\n")
122
130
 
123
131
 
124
132
  if __name__ == "__main__":
125
- version = "251" # for development
133
+ version = "261" # for development
126
134
  generate(version)
@@ -179,7 +179,7 @@ def _build_command_query_docstring(
179
179
  return doc.getvalue()
180
180
 
181
181
 
182
- meshing_rule_file_names = {
182
+ datamodel_file_name_map = {
183
183
  "workflow": "workflow",
184
184
  "meshing": "meshing",
185
185
  "PartManagement": "part_management",
@@ -213,7 +213,7 @@ class DataModelStaticInfo:
213
213
  datamodel_dir = (pyfluent.CODEGEN_OUTDIR / f"datamodel_{version}").resolve()
214
214
  datamodel_dir.mkdir(exist_ok=True)
215
215
  self.file_name = (
216
- datamodel_dir / f"{meshing_rule_file_names[rules_save_name]}.py"
216
+ datamodel_dir / f"{datamodel_file_name_map[rules_save_name]}.py"
217
217
  ).resolve()
218
218
  if rules == "MeshingUtilities":
219
219
  self.stub_file = (datamodel_dir / "meshing_utilities.pyi").resolve()
@@ -32,10 +32,10 @@ def print_fluent_version(app_utilities):
32
32
  version_file = (CODEGEN_OUTDIR / f"fluent_version_{version}.py").resolve()
33
33
  with open(version_file, "w", encoding="utf8") as f:
34
34
  f.write(f'FLUENT_VERSION = "{version}"\n')
35
- f.write(f'FLUENT_BUILD_TIME = "{build_info["build_time"]}"\n')
36
- f.write(f'FLUENT_BUILD_ID = "{build_info["build_id"]}"\n')
37
- f.write(f'FLUENT_REVISION = "{build_info["vcs_revision"]}"\n')
38
- f.write(f'FLUENT_BRANCH = "{build_info["vcs_branch"]}"\n')
35
+ f.write(f'FLUENT_BUILD_TIME = "{build_info.build_time}"\n')
36
+ f.write(f'FLUENT_BUILD_ID = "{build_info.build_id}"\n')
37
+ f.write(f'FLUENT_REVISION = "{build_info.vcs_revision}"\n')
38
+ f.write(f'FLUENT_BRANCH = "{build_info.vcs_branch}"\n')
39
39
 
40
40
 
41
41
  if __name__ == "__main__":
@@ -230,8 +230,7 @@ def _write_data(cls_name: str, python_name: str, data: dict, f: IO, f_stub: IO |
230
230
  s.write(f" _version = {data['version']!r}\n")
231
231
  deprecated = data["deprecated_version"]
232
232
  if deprecated:
233
- release_version = "20" + data["deprecated_version"].replace(".", "R")
234
- s.write(f" _deprecated_version = {release_version!r}\n")
233
+ s.write(f" _deprecated_version = {deprecated!r}\n")
235
234
  s_stub.write(" _deprecated_version: str\n")
236
235
  s.write(f" fluent_name = {data['fluent_name']!r}\n")
237
236
  # _python_name preserves the original non-suffixed name of the class.
@@ -21,7 +21,6 @@
21
21
  # SOFTWARE.
22
22
 
23
23
  """Custom common higher level exceptions."""
24
-
25
24
  from typing import Any, Iterable
26
25
 
27
26
  from ansys.fluent.core.solver.error_message import allowed_name_error_message
@@ -1090,15 +1090,6 @@ class FileSession:
1090
1090
 
1091
1091
  self.monitors = None
1092
1092
  self.session_id = 1
1093
-
1094
- class Fields:
1095
- """Container for field and solution variables."""
1096
-
1097
- def __init__(self, _session):
1098
- """Initialize Fields."""
1099
- self.field_info = FileFieldInfo(_session)
1100
- self.field_data = FileFieldData(_session, self.field_info)
1101
-
1102
1093
  self.fields = Fields(self)
1103
1094
 
1104
1095
  def read_case(self, case_file_name):
@@ -1154,3 +1145,12 @@ def _get_surface_ids(
1154
1145
  else:
1155
1146
  surface_ids.append(surf)
1156
1147
  return surface_ids
1148
+
1149
+
1150
+ class Fields:
1151
+ """Container for field and solution variables."""
1152
+
1153
+ def __init__(self, _session: FileSession):
1154
+ """Initialize Fields."""
1155
+ self.field_info = FileFieldInfo(_session)
1156
+ self.field_data = FileFieldData(_session, self.field_info)
@@ -332,9 +332,9 @@ class Mesh:
332
332
  min_id, max_id = self.get_surface_locs(surface_id)
333
333
  nnodes = self._file_handle["meshes"]["1"]["faces"]["nodes"]["1"]["nnodes"]
334
334
  nodes = self._file_handle["meshes"]["1"]["faces"]["nodes"]["1"]["nodes"]
335
- previous = sum(nnodes[0:min_id])
335
+ previous = np.sum(nnodes[0:min_id])
336
336
  nnodes = nnodes[min_id : max_id + 1]
337
- nodes = nodes[previous : previous + sum(nnodes)]
337
+ nodes = nodes[previous : previous + np.sum(nnodes)]
338
338
  return [nodes, nnodes]
339
339
 
340
340
  def get_connectivity(self, surface_id) -> np.array:
@@ -294,7 +294,7 @@ class _ConnectionInterface:
294
294
  def product_build_info(self) -> str:
295
295
  """Get Fluent build information."""
296
296
  build_info = self._app_utilities.get_build_info()
297
- return f'Build Time: {build_info["build_time"]} Build Id: {build_info["build_id"]} Revision: {build_info["vcs_revision"]} Branch: {build_info["vcs_branch"]}'
297
+ return f"Build Time: {build_info.build_time} Build Id: {build_info.build_id} Revision: {build_info.vcs_revision} Branch: {build_info.vcs_branch}"
298
298
 
299
299
  def get_cortex_connection_properties(self):
300
300
  """Get connection properties of Fluent."""
@@ -305,10 +305,10 @@ class _ConnectionInterface:
305
305
  logger.debug("Obtaining Cortex connection properties...")
306
306
  cortex_info = self._app_utilities.get_controller_process_info()
307
307
  solver_info = self._app_utilities.get_solver_process_info()
308
- fluent_host_pid = solver_info["process_id"]
309
- cortex_host = cortex_info["hostname"]
310
- cortex_pid = cortex_info["process_id"]
311
- cortex_pwd = cortex_info["working_directory"]
308
+ fluent_host_pid = solver_info.process_id
309
+ cortex_host = cortex_info.hostname
310
+ cortex_pid = cortex_info.process_id
311
+ cortex_pwd = cortex_info.working_directory
312
312
  logger.debug("Cortex connection properties successfully obtained.")
313
313
  except _InactiveRpcError:
314
314
  logger.warning(