ansys-fluent-core 0.30.dev0__py3-none-any.whl → 0.30.dev2__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 (30) hide show
  1. ansys/fluent/core/__init__.py +6 -6
  2. ansys/fluent/core/_version.py +1 -1
  3. ansys/fluent/core/filereader/case_file.py +28 -6
  4. ansys/fluent/core/filereader/casereader.py +1 -1
  5. ansys/fluent/core/fluent_connection.py +1 -1
  6. ansys/fluent/core/generated/api_tree/api_objects.json +1 -1
  7. ansys/fluent/core/generated/datamodel_252/MeshingUtilities.py +16 -0
  8. ansys/fluent/core/generated/datamodel_252/meshing.py +10 -0
  9. ansys/fluent/core/generated/fluent_version_252.py +3 -3
  10. ansys/fluent/core/generated/meshing/tui_252.py +33 -5
  11. ansys/fluent/core/generated/solver/settings_252.py +1842 -593
  12. ansys/fluent/core/generated/solver/settings_252.pyi +1052 -453
  13. ansys/fluent/core/generated/solver/tui_252.py +60 -22
  14. ansys/fluent/core/launcher/launcher.py +1 -1
  15. ansys/fluent/core/launcher/launcher_utils.py +2 -2
  16. ansys/fluent/core/post_objects/meta.py +6 -6
  17. ansys/fluent/core/services/deprecated_field_data.py +1 -1
  18. ansys/fluent/core/services/solution_variables.py +1 -1
  19. ansys/fluent/core/session.py +4 -1
  20. ansys/fluent/core/session_solver.py +1 -1
  21. ansys/fluent/core/solver/flobject.py +4 -1
  22. ansys/fluent/core/streaming_services/events_streaming.py +1 -1
  23. ansys/fluent/core/utils/deprecate.py +1 -1
  24. ansys/fluent/core/utils/file_transfer_service.py +4 -4
  25. ansys/fluent/core/workflow.py +4 -1
  26. {ansys_fluent_core-0.30.dev0.dist-info → ansys_fluent_core-0.30.dev2.dist-info}/METADATA +2 -2
  27. {ansys_fluent_core-0.30.dev0.dist-info → ansys_fluent_core-0.30.dev2.dist-info}/RECORD +30 -30
  28. /ansys/fluent/core/{warnings.py → pyfluent_warnings.py} +0 -0
  29. {ansys_fluent_core-0.30.dev0.dist-info → ansys_fluent_core-0.30.dev2.dist-info}/LICENSE +0 -0
  30. {ansys_fluent_core-0.30.dev0.dist-info → ansys_fluent_core-0.30.dev2.dist-info}/WHEEL +0 -0
@@ -50,6 +50,11 @@ from ansys.fluent.core.launcher.pyfluent_enums import ( # noqa: F401
50
50
  UIMode,
51
51
  )
52
52
  from ansys.fluent.core.parametric import LocalParametricStudy # noqa: F401
53
+ from ansys.fluent.core.pyfluent_warnings import ( # noqa: F401
54
+ PyFluentDeprecationWarning,
55
+ PyFluentUserWarning,
56
+ warning,
57
+ )
53
58
  from ansys.fluent.core.search import search # noqa: F401
54
59
  from ansys.fluent.core.services.batch_ops import BatchOps # noqa: F401
55
60
  from ansys.fluent.core.session import BaseSession as Fluent # noqa: F401
@@ -57,13 +62,8 @@ from ansys.fluent.core.streaming_services.events_streaming import * # noqa: F40
57
62
  from ansys.fluent.core.utils import fldoc, get_examples_download_dir
58
63
  from ansys.fluent.core.utils.fluent_version import FluentVersion # noqa: F401
59
64
  from ansys.fluent.core.utils.setup_for_fluent import setup_for_fluent # noqa: F401
60
- from ansys.fluent.core.warnings import ( # noqa: F401
61
- PyFluentDeprecationWarning,
62
- PyFluentUserWarning,
63
- warning,
64
- )
65
65
 
66
- _VERSION_INFO = "Build date: February 07, 2025 15:50 UTC ShaID: 9ee1aa4"
66
+ _VERSION_INFO = "Build date: February 20, 2025 11:49 UTC ShaID: 1b0f023"
67
67
  """Global variable indicating the version of the PyFluent package - Empty by default"""
68
68
 
69
69
  _THIS_DIRNAME = os.path.dirname(__file__)
@@ -28,7 +28,7 @@ version_info = 0, 1, 'dev0'
28
28
  """
29
29
 
30
30
  # major, minor, patch
31
- version_info = 0, 30, "dev0"
31
+ version_info = 0, 30, "dev2"
32
32
 
33
33
  # Nice string for the version
34
34
  __version__ = ".".join(map(str, version_info))
@@ -246,10 +246,30 @@ class MeshType(Enum):
246
246
  UNKNOWN = "unknown"
247
247
 
248
248
 
249
+ def _check_h5_extension(file_path):
250
+ """
251
+ Checks if a given file path ends with the '.h5' extension.
252
+
253
+ Parameters
254
+ ----------
255
+ file_path: str
256
+ The path to the file.
257
+
258
+ Raises
259
+ ------
260
+ ValueError
261
+ If the file path does not end with '.h5'.
262
+ """
263
+ if not Path(file_path).match("*.h5"):
264
+ raise ValueError("Supports `.h5` extension file format only.")
265
+
266
+
249
267
  class Mesh:
250
268
  """Class to provide data from and information about Fluent mesh files.
251
269
 
252
270
  This class is applicable only to HDF5, Fluent's default format for mesh files.
271
+ Fluent writes HDF5 files with an extension,`.h5` and thus files without that extension
272
+ are not supported.
253
273
  HDF5 (Hierarchical Data Format version 5) is commonly used for storing large amounts
254
274
  of scientific data, including Fluent mesh data.
255
275
 
@@ -270,6 +290,7 @@ class Mesh:
270
290
 
271
291
  def __init__(self, file_handle):
272
292
  """Initialize the object."""
293
+ _check_h5_extension(file_handle.filename)
273
294
  self._file_handle = file_handle
274
295
 
275
296
  def get_mesh_type(self) -> MeshType:
@@ -633,11 +654,13 @@ class CaseFile(RPVarProcessor):
633
654
  "*.msh.h5"
634
655
  ):
635
656
  _file = h5py.File(case_file_name)
636
- if Path(case_file_name).match("*.cas.h5"):
637
- self._is_case_file = True
638
- settings = _file["settings"]
639
- rpvars = settings["Rampant Variables"][0]
640
- rp_vars_str = rpvars.decode()
657
+ if Path(case_file_name).match("*.h5"):
658
+ if Path(case_file_name).match("*.cas.h5"):
659
+ self._is_case_file = True
660
+ settings = _file["settings"]
661
+ rpvars = settings["Rampant Variables"][0]
662
+ rp_vars_str = rpvars.decode()
663
+ self._mesh = Mesh(_file)
641
664
  elif Path(case_file_name).match("*.cas") or Path(case_file_name).match(
642
665
  "*.msh"
643
666
  ):
@@ -674,7 +697,6 @@ class CaseFile(RPVarProcessor):
674
697
 
675
698
  if self._is_case_file:
676
699
  super().__init__(rp_vars_str=rp_vars_str)
677
- self._mesh = Mesh(_file)
678
700
 
679
701
  def get_mesh(self):
680
702
  """Get the mesh data."""
@@ -24,7 +24,7 @@
24
24
 
25
25
  import warnings
26
26
 
27
- from ansys.fluent.core.warnings import PyFluentDeprecationWarning
27
+ from ansys.fluent.core.pyfluent_warnings import PyFluentDeprecationWarning
28
28
 
29
29
  from .case_file import CaseFile as CaseReader # noqa: F401
30
30
 
@@ -42,6 +42,7 @@ import weakref
42
42
  import grpc
43
43
 
44
44
  import ansys.fluent.core as pyfluent
45
+ from ansys.fluent.core.pyfluent_warnings import PyFluentDeprecationWarning
45
46
  from ansys.fluent.core.services import service_creator
46
47
  from ansys.fluent.core.services.app_utilities import (
47
48
  AppUtilitiesOld,
@@ -50,7 +51,6 @@ from ansys.fluent.core.services.app_utilities import (
50
51
  from ansys.fluent.core.services.scheme_eval import SchemeEvalService
51
52
  from ansys.fluent.core.utils.execution import timeout_exec, timeout_loop
52
53
  from ansys.fluent.core.utils.file_transfer_service import RemoteFileTransferStrategy
53
- from ansys.fluent.core.warnings import PyFluentDeprecationWarning
54
54
  from ansys.platform.instancemanagement import Instance
55
55
 
56
56
  logger = logging.getLogger("pyfluent.general")