ansys-fluent-core 0.35.dev0__py3-none-any.whl → 0.36.dev0__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 (73) hide show
  1. ansys/fluent/core/__init__.py +2 -2
  2. ansys/fluent/core/codegen/__init__.py +1 -0
  3. ansys/fluent/core/codegen/builtin_settingsgen.py +4 -0
  4. ansys/fluent/core/codegen/datamodelgen.py +13 -2
  5. ansys/fluent/core/codegen/settingsgen.py +7 -0
  6. ansys/fluent/core/docker/docker_compose.py +30 -1
  7. ansys/fluent/core/examples/downloads.py +3 -4
  8. ansys/fluent/core/fluent_connection.py +2 -3
  9. ansys/fluent/core/generated/api_tree/api_objects.json +1 -1
  10. ansys/fluent/core/generated/datamodel_231/flicing.py +20 -20
  11. ansys/fluent/core/generated/datamodel_231/meshing.py +236 -236
  12. ansys/fluent/core/generated/datamodel_232/flicing.py +50 -50
  13. ansys/fluent/core/generated/datamodel_232/meshing.py +187 -187
  14. ansys/fluent/core/generated/datamodel_241/flicing.py +45 -45
  15. ansys/fluent/core/generated/datamodel_241/meshing.py +229 -229
  16. ansys/fluent/core/generated/datamodel_242/flicing.py +50 -50
  17. ansys/fluent/core/generated/datamodel_242/meshing.py +275 -275
  18. ansys/fluent/core/generated/datamodel_242/part_management.py +3 -3
  19. ansys/fluent/core/generated/datamodel_251/flicing.py +45 -45
  20. ansys/fluent/core/generated/datamodel_251/meshing.py +417 -417
  21. ansys/fluent/core/generated/datamodel_251/part_management.py +9 -9
  22. ansys/fluent/core/generated/datamodel_252/flicing.py +30 -30
  23. ansys/fluent/core/generated/datamodel_252/meshing.py +418 -418
  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 +481 -425
  27. ansys/fluent/core/generated/datamodel_261/meshing_utilities.py +296 -616
  28. ansys/fluent/core/generated/datamodel_261/meshing_workflow.py +61694 -0
  29. ansys/fluent/core/generated/datamodel_261/part_management.py +10 -10
  30. ansys/fluent/core/generated/datamodel_261/preferences.py +56 -0
  31. ansys/fluent/core/generated/datamodel_261/solver_workflow.py +14 -0
  32. ansys/fluent/core/generated/fluent_version_261.py +3 -3
  33. ansys/fluent/core/generated/meshing/tui_261.py +408 -10
  34. ansys/fluent/core/generated/solver/settings_261.py +15135 -5725
  35. ansys/fluent/core/generated/solver/settings_261.pyi +10252 -3619
  36. ansys/fluent/core/generated/solver/tui_261.py +2632 -834
  37. ansys/fluent/core/launcher/container_launcher.py +12 -3
  38. ansys/fluent/core/launcher/fluent_container.py +7 -1
  39. ansys/fluent/core/launcher/launch_options.py +2 -2
  40. ansys/fluent/core/launcher/launcher.py +2 -6
  41. ansys/fluent/core/launcher/pim_launcher.py +76 -3
  42. ansys/fluent/core/launcher/process_launch_string.py +1 -2
  43. ansys/fluent/core/launcher/slurm_launcher.py +4 -3
  44. ansys/fluent/core/launcher/standalone_launcher.py +3 -2
  45. ansys/fluent/core/module_config.py +10 -10
  46. ansys/fluent/core/report.py +1 -1
  47. ansys/fluent/core/search.py +12 -0
  48. ansys/fluent/core/services/__init__.py +2 -0
  49. ansys/fluent/core/services/datamodel_se.py +4 -1
  50. ansys/fluent/core/services/field_data.py +24 -0
  51. ansys/fluent/core/services/reduction.py +2 -0
  52. ansys/fluent/core/services/settings.py +1 -1
  53. ansys/fluent/core/services/solution_variables.py +92 -0
  54. ansys/fluent/core/session.py +1 -2
  55. ansys/fluent/core/session_base_meshing.py +8 -0
  56. ansys/fluent/core/session_meshing.py +5 -0
  57. ansys/fluent/core/session_pure_meshing.py +6 -0
  58. ansys/fluent/core/session_pure_meshing.pyi +5 -0
  59. ansys/fluent/core/session_solver.py +5 -4
  60. ansys/fluent/core/session_utilities.py +8 -5
  61. ansys/fluent/core/solver/flobject.py +19 -0
  62. ansys/fluent/core/solver/flunits.py +2 -0
  63. ansys/fluent/core/solver/function/reduction.py +2 -0
  64. ansys/fluent/core/ui/__init__.py +64 -0
  65. ansys/fluent/core/ui/jupyter_ui.py +203 -0
  66. ansys/fluent/core/ui/standalone_web_ui.py +296 -0
  67. ansys/fluent/core/ui/utils.py +173 -0
  68. ansys/fluent/core/utils/deprecate.py +1 -0
  69. ansys/fluent/core/utils/networking.py +11 -2
  70. {ansys_fluent_core-0.35.dev0.dist-info → ansys_fluent_core-0.36.dev0.dist-info}/METADATA +29 -22
  71. {ansys_fluent_core-0.35.dev0.dist-info → ansys_fluent_core-0.36.dev0.dist-info}/RECORD +73 -68
  72. {ansys_fluent_core-0.35.dev0.dist-info → ansys_fluent_core-0.36.dev0.dist-info}/WHEEL +1 -1
  73. {ansys_fluent_core-0.35.dev0.dist-info → ansys_fluent_core-0.36.dev0.dist-info/licenses}/LICENSE +0 -0
@@ -81,9 +81,9 @@ from ansys.fluent.core.utils import fldoc
81
81
  from ansys.fluent.core.utils.fluent_version import FluentVersion # noqa: F401
82
82
  from ansys.fluent.core.utils.setup_for_fluent import setup_for_fluent # noqa: F401
83
83
 
84
- __version__ = "0.35.dev0"
84
+ __version__ = "0.36.dev0"
85
85
 
86
- _VERSION_INFO = "Build date: August 12, 2025 05:58 UTC ShaID: c65664b"
86
+ _VERSION_INFO = "Build date: October 10, 2025 07:05 UTC ShaID: f5793f5"
87
87
  """
88
88
  Global variable indicating the version info of the PyFluent package.
89
89
  Build timestamp and commit hash are added to this variable during packaging.
@@ -32,6 +32,7 @@ class StaticInfoType(Enum):
32
32
  TUI_SOLVER = auto()
33
33
  TUI_MESHING = auto()
34
34
  DATAMODEL_WORKFLOW = auto()
35
+ DATAMODEL_MESHING_WORKFLOW = auto()
35
36
  DATAMODEL_MESHING = auto()
36
37
  DATAMODEL_PART_MANAGEMENT = auto()
37
38
  DATAMODEL_PM_FILE_MANAGEMENT = auto()
@@ -96,10 +96,14 @@ def generate(version: str):
96
96
  for name, v in DATA.items():
97
97
  kind, path = v
98
98
  if isinstance(path, dict):
99
+ version_supported = False
99
100
  for version_set, p in path.items():
100
101
  if version in version_set:
101
102
  path = p
103
+ version_supported = True
102
104
  break
105
+ if not version_supported:
106
+ continue
103
107
  named_objects, final_type = _get_named_objects_in_path(root, path, kind)
104
108
  if kind == "NamedObject":
105
109
  kind = f"{final_type}NamedObject"
@@ -62,11 +62,10 @@ _PY_TYPE_BY_DM_TYPE = {
62
62
  "ListReal",
63
63
  "Real Triplet",
64
64
  "RealTriplet",
65
- "Real Triplet List",
66
- "ListRealTriplet",
67
65
  ],
68
66
  "list[float]",
69
67
  ),
68
+ **dict.fromkeys(["Real Triplet List", "ListRealTriplet"], "list[list[float]]"),
70
69
  **dict.fromkeys(["Dict", "ModelObject"], "dict[str, Any]"),
71
70
  "None": "None",
72
71
  }
@@ -188,6 +187,7 @@ datamodel_file_name_map = {
188
187
  "MeshingUtilities": "meshing_utilities",
189
188
  "flicing": "flicing",
190
189
  "solverworkflow": "solver_workflow",
190
+ "meshing_workflow": "meshing_workflow",
191
191
  }
192
192
 
193
193
 
@@ -242,6 +242,13 @@ class DataModelGenerator:
242
242
  ),
243
243
  self.version,
244
244
  )
245
+ if StaticInfoType.DATAMODEL_MESHING_WORKFLOW in static_infos:
246
+ self._static_info["meshing_workflow"] = DataModelStaticInfo(
247
+ StaticInfoType.DATAMODEL_MESHING_WORKFLOW,
248
+ "meshing_workflow",
249
+ ("meshing",),
250
+ self.version,
251
+ )
245
252
  if StaticInfoType.DATAMODEL_MESHING in static_infos:
246
253
  self._static_info["meshing"] = DataModelStaticInfo(
247
254
  StaticInfoType.DATAMODEL_MESHING, "meshing", ("meshing",), self.version
@@ -623,6 +630,10 @@ if __name__ == "__main__":
623
630
  static_infos[StaticInfoType.DATAMODEL_MESHING_UTILITIES] = (
624
631
  meshing._datamodel_service_se.get_static_info("MeshingUtilities")
625
632
  )
633
+ if FluentVersion(version) >= FluentVersion.v261:
634
+ static_infos[StaticInfoType.DATAMODEL_MESHING_WORKFLOW] = (
635
+ meshing._datamodel_service_se.get_static_info("meshing_workflow")
636
+ )
626
637
  parser = argparse.ArgumentParser(
627
638
  description="A script to write Fluent API files with an optional verbose output."
628
639
  )
@@ -153,6 +153,7 @@ def _populate_data(cls, api_tree: dict, version: str) -> dict:
153
153
  else:
154
154
  data["child_object_type"] = None
155
155
  data["allowed_values"] = getattr(cls, "_allowed_values", [])
156
+ data["has_migration_adapter"] = getattr(cls, "_has_migration_adapter", False)
156
157
  return data
157
158
 
158
159
 
@@ -316,6 +317,12 @@ def _write_data(cls_name: str, python_name: str, data: dict, f: IO, f_stub: IO |
316
317
  s_stub.write(
317
318
  f" {to_constant_name(allowed_value)}: Final[str] = {allowed_value!r}\n"
318
319
  )
320
+ if data["allowed_values"]:
321
+ s.write(f" _allowed_values = {data['allowed_values']!r}\n")
322
+ s_stub.write(" _allowed_values: list[str]\n")
323
+ if data["has_migration_adapter"]:
324
+ s.write(" _has_migration_adapter = True\n")
325
+ s_stub.write(" _has_migration_adapter: bool\n")
319
326
  s.write("\n")
320
327
  s_stub.write("\n")
321
328
  for name, (python_name, data, hash_, should_write_stub) in classes_to_write.items():
@@ -22,6 +22,7 @@
22
22
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
23
  # SOFTWARE.
24
24
 
25
+ import os
25
26
  import subprocess
26
27
  import uuid
27
28
 
@@ -31,7 +32,7 @@ from .utils import get_ghcr_fluent_image_name
31
32
  class ComposeBasedLauncher:
32
33
  """Launch Fluent through docker or Podman compose."""
33
34
 
34
- def __init__(self, compose_config, container_dict):
35
+ def __init__(self, compose_config, container_dict, container_server_info_file):
35
36
  from ansys.fluent.core import config
36
37
 
37
38
  self._compose_config = compose_config
@@ -45,6 +46,8 @@ class ComposeBasedLauncher:
45
46
  self._container_source = self._set_compose_cmds()
46
47
  self._container_source.remove("compose")
47
48
 
49
+ self._container_server_info_file = container_server_info_file
50
+
48
51
  self._compose_file = self._get_compose_file(container_dict)
49
52
 
50
53
  def _get_compose_file(self, container_dict):
@@ -243,3 +246,29 @@ class ComposeBasedLauncher:
243
246
  self._container_source + ["port", f"{self._compose_name}-fluent-1"],
244
247
  )
245
248
  return self._extract_ports(output.decode("utf-8").strip())
249
+
250
+ def chown_server_info_file(self) -> None:
251
+ """Change ownership of the server info file inside the container.
252
+
253
+ Raises
254
+ ------
255
+ RuntimeError
256
+ If the command fails.
257
+ """
258
+ result = subprocess.run(
259
+ self._container_source
260
+ + [
261
+ "exec",
262
+ f"{self._compose_name}-fluent-1",
263
+ "chown",
264
+ f"{os.getuid()}:{os.getgid()}",
265
+ self._container_server_info_file,
266
+ ],
267
+ capture_output=True,
268
+ text=True,
269
+ )
270
+ if result.returncode != 0:
271
+ raise RuntimeError(
272
+ f"Failed to change ownership of the server info file. "
273
+ f"Error: {result.stderr.strip()}"
274
+ )
@@ -66,10 +66,9 @@ def _get_file_url(file_name: str, directory: str | None = None) -> str:
66
66
  """Get file URL."""
67
67
  if directory:
68
68
  return (
69
- "https://github.com/ansys/example-data/raw/master/"
70
- f"{directory}/{file_name}"
69
+ "https://github.com/ansys/example-data/raw/main/" f"{directory}/{file_name}"
71
70
  )
72
- return f"https://github.com/ansys/example-data/raw/master/{file_name}"
71
+ return f"https://github.com/ansys/example-data/raw/main/{file_name}"
73
72
 
74
73
 
75
74
  def _retrieve_file(
@@ -137,7 +136,7 @@ def download_file(
137
136
  save_path : str, optional
138
137
  Path to download the specified file to.
139
138
  return_without_path : bool, optional
140
- When unspecified, defaults to False, unless the PYFLUENT_LAUNCH_CONTAINER=1 environment variable is specified,
139
+ When unspecified, defaults to False, unless the launch_fluent_container config is set to True,
141
140
  in which case defaults to True.
142
141
  Relevant when using Fluent Docker container images, as the full path for the imported file from
143
142
  the host side is not necessarily going to be the same as the one for Fluent inside the container.
@@ -104,7 +104,7 @@ class MonitorThread(threading.Thread):
104
104
  """A class used for monitoring a Fluent session.
105
105
 
106
106
  Daemon thread which will ensure cleanup of session objects, shutdown of
107
- non-deamon threads etc.
107
+ non-daemon threads etc.
108
108
 
109
109
  Attributes
110
110
  ----------
@@ -303,7 +303,6 @@ class _ConnectionInterface:
303
303
 
304
304
  def get_cortex_connection_properties(self):
305
305
  """Get connection properties of Fluent."""
306
- from grpc._channel import _InactiveRpcError
307
306
 
308
307
  try:
309
308
  logger.info(self.product_build_info)
@@ -315,7 +314,7 @@ class _ConnectionInterface:
315
314
  cortex_pid = cortex_info.process_id
316
315
  cortex_pwd = cortex_info.working_directory
317
316
  logger.debug("Cortex connection properties successfully obtained.")
318
- except _InactiveRpcError:
317
+ except RuntimeError: # GrpcErrorInterceptor raises RuntimeError on failure
319
318
  logger.warning(
320
319
  "Fluent Cortex properties unobtainable. 'force exit()' and other "
321
320
  "methods are not going to work properly. Proceeding..."