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.
- ansys/fluent/core/__init__.py +6 -6
- ansys/fluent/core/_version.py +1 -1
- ansys/fluent/core/filereader/case_file.py +28 -6
- ansys/fluent/core/filereader/casereader.py +1 -1
- ansys/fluent/core/fluent_connection.py +1 -1
- ansys/fluent/core/generated/api_tree/api_objects.json +1 -1
- ansys/fluent/core/generated/datamodel_252/MeshingUtilities.py +16 -0
- ansys/fluent/core/generated/datamodel_252/meshing.py +10 -0
- ansys/fluent/core/generated/fluent_version_252.py +3 -3
- ansys/fluent/core/generated/meshing/tui_252.py +33 -5
- ansys/fluent/core/generated/solver/settings_252.py +1842 -593
- ansys/fluent/core/generated/solver/settings_252.pyi +1052 -453
- ansys/fluent/core/generated/solver/tui_252.py +60 -22
- ansys/fluent/core/launcher/launcher.py +1 -1
- ansys/fluent/core/launcher/launcher_utils.py +2 -2
- ansys/fluent/core/post_objects/meta.py +6 -6
- ansys/fluent/core/services/deprecated_field_data.py +1 -1
- ansys/fluent/core/services/solution_variables.py +1 -1
- ansys/fluent/core/session.py +4 -1
- ansys/fluent/core/session_solver.py +1 -1
- ansys/fluent/core/solver/flobject.py +4 -1
- ansys/fluent/core/streaming_services/events_streaming.py +1 -1
- ansys/fluent/core/utils/deprecate.py +1 -1
- ansys/fluent/core/utils/file_transfer_service.py +4 -4
- ansys/fluent/core/workflow.py +4 -1
- {ansys_fluent_core-0.30.dev0.dist-info → ansys_fluent_core-0.30.dev2.dist-info}/METADATA +2 -2
- {ansys_fluent_core-0.30.dev0.dist-info → ansys_fluent_core-0.30.dev2.dist-info}/RECORD +30 -30
- /ansys/fluent/core/{warnings.py → pyfluent_warnings.py} +0 -0
- {ansys_fluent_core-0.30.dev0.dist-info → ansys_fluent_core-0.30.dev2.dist-info}/LICENSE +0 -0
- {ansys_fluent_core-0.30.dev0.dist-info → ansys_fluent_core-0.30.dev2.dist-info}/WHEEL +0 -0
ansys/fluent/core/__init__.py
CHANGED
|
@@ -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
|
|
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__)
|
ansys/fluent/core/_version.py
CHANGED
|
@@ -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("*.
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
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."""
|
|
@@ -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")
|