ansys-fluent-core 0.28.2__py3-none-any.whl → 0.29.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.
- ansys/fluent/core/__init__.py +26 -1
- ansys/fluent/core/_stand_alone_datamodel_client/_datamodel_client.py +22 -0
- ansys/fluent/core/_version.py +24 -2
- ansys/fluent/core/codegen/__init__.py +22 -0
- ansys/fluent/core/codegen/allapigen.py +38 -5
- ansys/fluent/core/codegen/builtin_settingsgen.py +22 -0
- ansys/fluent/core/codegen/data/__init__.py +21 -0
- ansys/fluent/core/codegen/data/fluent_gui_help_patch.py +22 -0
- ansys/fluent/core/codegen/data/meshing_utilities_examples.py +22 -0
- ansys/fluent/core/codegen/datamodelgen.py +40 -4
- ansys/fluent/core/codegen/print_fluent_version.py +22 -0
- ansys/fluent/core/codegen/settingsgen.py +67 -4
- ansys/fluent/core/codegen/tuigen.py +44 -6
- ansys/fluent/core/codegen/walk_api.py +67 -18
- ansys/fluent/core/codegen/write_settings_yaml.py +22 -0
- ansys/fluent/core/data_model_cache.py +22 -0
- ansys/fluent/core/examples/__init__.py +22 -0
- ansys/fluent/core/examples/downloads.py +22 -0
- ansys/fluent/core/exceptions.py +22 -0
- ansys/fluent/core/file_session.py +22 -0
- ansys/fluent/core/filereader/__init__.py +21 -0
- ansys/fluent/core/filereader/case_file.py +22 -0
- ansys/fluent/core/filereader/casereader.py +22 -0
- ansys/fluent/core/filereader/data_file.py +22 -0
- ansys/fluent/core/filereader/lispy.py +22 -0
- ansys/fluent/core/fluent_connection.py +23 -1
- ansys/fluent/core/generated/api_tree/api_objects.json +1 -1
- ansys/fluent/core/generated/datamodel_252/meshing.py +32 -0
- ansys/fluent/core/generated/fluent_version_252.py +3 -3
- ansys/fluent/core/generated/solver/settings_222.py +0 -72
- ansys/fluent/core/generated/solver/settings_222.pyi +0 -307
- ansys/fluent/core/generated/solver/settings_231.py +0 -574
- ansys/fluent/core/generated/solver/settings_231.pyi +0 -561
- ansys/fluent/core/generated/solver/settings_232.py +0 -527
- ansys/fluent/core/generated/solver/settings_232.pyi +0 -2803
- ansys/fluent/core/generated/solver/settings_241.py +0 -478
- ansys/fluent/core/generated/solver/settings_241.pyi +0 -522
- ansys/fluent/core/generated/solver/settings_242.py +0 -361
- ansys/fluent/core/generated/solver/settings_242.pyi +0 -591
- ansys/fluent/core/generated/solver/settings_251.py +0 -399
- ansys/fluent/core/generated/solver/settings_251.pyi +0 -629
- ansys/fluent/core/generated/solver/settings_252.py +7794 -4185
- ansys/fluent/core/generated/solver/settings_252.pyi +6986 -3213
- ansys/fluent/core/generated/solver/tui_252.py +537 -181
- ansys/fluent/core/get_build_details.py +22 -0
- ansys/fluent/core/journaling.py +38 -0
- ansys/fluent/core/launcher/__init__.py +22 -0
- ansys/fluent/core/launcher/container_launcher.py +65 -56
- ansys/fluent/core/launcher/error_handler.py +30 -0
- ansys/fluent/core/launcher/fluent_container.py +45 -20
- ansys/fluent/core/launcher/launcher.py +53 -5
- ansys/fluent/core/launcher/launcher_utils.py +22 -0
- ansys/fluent/core/launcher/pim_launcher.py +120 -86
- ansys/fluent/core/launcher/process_launch_string.py +22 -0
- ansys/fluent/core/launcher/pyfluent_enums.py +22 -0
- ansys/fluent/core/launcher/server_info.py +45 -3
- ansys/fluent/core/launcher/slurm_launcher.py +25 -3
- ansys/fluent/core/launcher/standalone_launcher.py +68 -63
- ansys/fluent/core/launcher/watchdog.py +22 -0
- ansys/fluent/core/logging.py +24 -0
- ansys/fluent/core/logging_config.yaml +3 -0
- ansys/fluent/core/meshing/meshing_workflow.py +22 -0
- ansys/fluent/core/parametric.py +22 -0
- ansys/fluent/core/post_objects/__init__.py +21 -0
- ansys/fluent/core/post_objects/check_in_notebook.py +22 -0
- ansys/fluent/core/post_objects/meta.py +22 -0
- ansys/fluent/core/post_objects/post_helper.py +22 -0
- ansys/fluent/core/post_objects/post_object_definitions.py +22 -0
- ansys/fluent/core/post_objects/post_objects_container.py +22 -0
- ansys/fluent/core/post_objects/singleton_meta.py +22 -0
- ansys/fluent/core/post_objects/timing_decorator.py +22 -0
- ansys/fluent/core/report.py +77 -0
- ansys/fluent/core/rpvars.py +22 -0
- ansys/fluent/core/scheduler/__init__.py +22 -0
- ansys/fluent/core/scheduler/load_machines.py +22 -0
- ansys/fluent/core/scheduler/machine_list.py +22 -0
- ansys/fluent/core/search.py +22 -0
- ansys/fluent/core/services/__init__.py +22 -0
- ansys/fluent/core/services/api_upgrade.py +22 -0
- ansys/fluent/core/services/app_utilities.py +38 -0
- ansys/fluent/core/services/batch_ops.py +22 -0
- ansys/fluent/core/services/datamodel_se.py +26 -1
- ansys/fluent/core/services/datamodel_tui.py +22 -0
- ansys/fluent/core/services/deprecated_field_data.py +23 -1
- ansys/fluent/core/services/events.py +22 -0
- ansys/fluent/core/services/field_data.py +285 -2
- ansys/fluent/core/services/health_check.py +22 -0
- ansys/fluent/core/services/interceptors.py +50 -2
- ansys/fluent/core/services/monitor.py +22 -0
- ansys/fluent/core/services/reduction.py +22 -0
- ansys/fluent/core/services/scheme_eval.py +22 -0
- ansys/fluent/core/services/settings.py +22 -0
- ansys/fluent/core/services/solution_variables.py +22 -0
- ansys/fluent/core/services/streaming.py +22 -0
- ansys/fluent/core/services/transcript.py +22 -0
- ansys/fluent/core/session.py +39 -2
- ansys/fluent/core/session_base_meshing.py +22 -0
- ansys/fluent/core/session_meshing.py +22 -0
- ansys/fluent/core/session_meshing.pyi +22 -0
- ansys/fluent/core/session_pure_meshing.py +22 -0
- ansys/fluent/core/session_pure_meshing.pyi +22 -0
- ansys/fluent/core/session_shared.py +22 -0
- ansys/fluent/core/session_solver.py +43 -0
- ansys/fluent/core/session_solver.pyi +22 -0
- ansys/fluent/core/session_solver_aero.py +22 -0
- ansys/fluent/core/session_solver_icing.py +22 -0
- ansys/fluent/core/session_solver_lite.py +22 -0
- ansys/fluent/core/solver/__init__.py +22 -0
- ansys/fluent/core/solver/error_message.py +22 -0
- ansys/fluent/core/solver/flobject.py +22 -0
- ansys/fluent/core/solver/flunits.py +22 -0
- ansys/fluent/core/solver/function/__init__.py +22 -0
- ansys/fluent/core/solver/function/reduction.py +22 -0
- ansys/fluent/core/solver/settings_builtin_bases.py +22 -0
- ansys/fluent/core/solver/settings_builtin_data.py +22 -0
- ansys/fluent/core/solver/settings_external.py +22 -0
- ansys/fluent/core/streaming_services/__init__.py +21 -0
- ansys/fluent/core/streaming_services/datamodel_event_streaming.py +22 -0
- ansys/fluent/core/streaming_services/datamodel_streaming.py +22 -0
- ansys/fluent/core/streaming_services/events_streaming.py +22 -0
- ansys/fluent/core/streaming_services/field_data_streaming.py +22 -0
- ansys/fluent/core/streaming_services/monitor_streaming.py +23 -1
- ansys/fluent/core/streaming_services/streaming.py +22 -0
- ansys/fluent/core/streaming_services/transcript_streaming.py +22 -0
- ansys/fluent/core/systemcoupling.py +22 -0
- ansys/fluent/core/utils/__init__.py +22 -0
- ansys/fluent/core/utils/data_transfer.py +22 -0
- ansys/fluent/core/utils/deprecate.py +24 -1
- ansys/fluent/core/utils/dictionary_operations.py +22 -0
- ansys/fluent/core/utils/dump_session_data.py +22 -0
- ansys/fluent/core/utils/event_loop.py +22 -0
- ansys/fluent/core/utils/execution.py +22 -0
- ansys/fluent/core/utils/file_transfer_service.py +22 -0
- ansys/fluent/core/utils/fix_doc.py +22 -0
- ansys/fluent/core/utils/fldoc.py +22 -0
- ansys/fluent/core/utils/fluent_version.py +22 -0
- ansys/fluent/core/utils/networking.py +22 -0
- ansys/fluent/core/utils/setup_for_fluent.py +22 -0
- ansys/fluent/core/warnings.py +22 -0
- ansys/fluent/core/workflow.py +22 -0
- {ansys_fluent_core-0.28.2.dist-info → ansys_fluent_core-0.29.0.dist-info}/LICENSE +8 -8
- {ansys_fluent_core-0.28.2.dist-info → ansys_fluent_core-0.29.0.dist-info}/METADATA +56 -33
- ansys_fluent_core-0.29.0.dist-info/RECORD +219 -0
- {ansys_fluent_core-0.28.2.dist-info → ansys_fluent_core-0.29.0.dist-info}/WHEEL +1 -1
- ansys/fluent/core/docs/README.rst +0 -155
- ansys/fluent/tests/conftest.py +0 -415
- ansys/fluent/tests/fluent_fixtures.py +0 -195
- ansys/fluent/tests/integration/test_optislang/test_optislang_integration.py +0 -263
- ansys/fluent/tests/parametric/test_local_parametric_run.py +0 -36
- ansys/fluent/tests/parametric/test_local_parametric_setup.py +0 -34
- ansys/fluent/tests/parametric/test_parametric_workflow.py +0 -279
- ansys/fluent/tests/test_aero_session.py +0 -88
- ansys/fluent/tests/test_batch_ops.py +0 -39
- ansys/fluent/tests/test_builtin_settings.py +0 -761
- ansys/fluent/tests/test_cad_to_post_ftm.py +0 -525
- ansys/fluent/tests/test_cad_to_post_wtm.py +0 -250
- ansys/fluent/tests/test_casereader.py +0 -324
- ansys/fluent/tests/test_codegen.py +0 -783
- ansys/fluent/tests/test_creatable.py +0 -31
- ansys/fluent/tests/test_data_model_cache.py +0 -434
- ansys/fluent/tests/test_datamodel_api.py +0 -429
- ansys/fluent/tests/test_datamodel_service.py +0 -814
- ansys/fluent/tests/test_datareader.py +0 -103
- ansys/fluent/tests/test_error_handling.py +0 -24
- ansys/fluent/tests/test_events_manager.py +0 -214
- ansys/fluent/tests/test_field_data.py +0 -466
- ansys/fluent/tests/test_file_session.py +0 -355
- ansys/fluent/tests/test_file_transfer_service.py +0 -165
- ansys/fluent/tests/test_fix_doc.py +0 -29
- ansys/fluent/tests/test_flobject.py +0 -1235
- ansys/fluent/tests/test_fluent_fixes.py +0 -106
- ansys/fluent/tests/test_fluent_session.py +0 -270
- ansys/fluent/tests/test_fluent_version.py +0 -66
- ansys/fluent/tests/test_fluent_version_marker.py +0 -65
- ansys/fluent/tests/test_icing_session.py +0 -9
- ansys/fluent/tests/test_launcher.py +0 -529
- ansys/fluent/tests/test_launcher_remote.py +0 -272
- ansys/fluent/tests/test_lispy.py +0 -40
- ansys/fluent/tests/test_logging.py +0 -16
- ansys/fluent/tests/test_mapped_api.py +0 -766
- ansys/fluent/tests/test_meshing_utilities.py +0 -2436
- ansys/fluent/tests/test_meshing_workflow.py +0 -421
- ansys/fluent/tests/test_meshingmode/test_meshing_launch.py +0 -168
- ansys/fluent/tests/test_new_meshing_workflow.py +0 -1801
- ansys/fluent/tests/test_preferences.py +0 -89
- ansys/fluent/tests/test_pure_mesh_vs_mesh_workflow.py +0 -101
- ansys/fluent/tests/test_reduction.py +0 -484
- ansys/fluent/tests/test_rp_vars.py +0 -77
- ansys/fluent/tests/test_scheduler.py +0 -471
- ansys/fluent/tests/test_scheme_eval_222.py +0 -338
- ansys/fluent/tests/test_scheme_eval_231.py +0 -243
- ansys/fluent/tests/test_search.py +0 -344
- ansys/fluent/tests/test_session.py +0 -594
- ansys/fluent/tests/test_settings_api.py +0 -606
- ansys/fluent/tests/test_settings_reader.py +0 -85
- ansys/fluent/tests/test_slurm_future.py +0 -67
- ansys/fluent/tests/test_solution_variables.py +0 -241
- ansys/fluent/tests/test_solver_monitors.py +0 -83
- ansys/fluent/tests/test_solvermode/boundaries_periodic_expDict +0 -1712
- ansys/fluent/tests/test_solvermode/test_boundaries.py +0 -127
- ansys/fluent/tests/test_solvermode/test_calculationactivities.py +0 -20
- ansys/fluent/tests/test_solvermode/test_controls.py +0 -131
- ansys/fluent/tests/test_solvermode/test_general.py +0 -109
- ansys/fluent/tests/test_solvermode/test_initialization.py +0 -83
- ansys/fluent/tests/test_solvermode/test_materials.py +0 -40
- ansys/fluent/tests/test_solvermode/test_methods.py +0 -65
- ansys/fluent/tests/test_solvermode/test_models.py +0 -99
- ansys/fluent/tests/test_solvermode/test_named_expressions.py +0 -35
- ansys/fluent/tests/test_solvermode/test_post_vector.py +0 -22
- ansys/fluent/tests/test_solvermode/test_species_model.py +0 -67
- ansys/fluent/tests/test_streaming_services.py +0 -52
- ansys/fluent/tests/test_systemcoupling.py +0 -44
- ansys/fluent/tests/test_topy.py +0 -179
- ansys/fluent/tests/test_tui_api.py +0 -70
- ansys/fluent/tests/test_type_stub.py +0 -37
- ansys/fluent/tests/test_utils.py +0 -82
- ansys/fluent/tests/util/__init__.py +0 -36
- ansys/fluent/tests/util/meshing_workflow.py +0 -33
- ansys/fluent/tests/util/solver.py +0 -72
- ansys_fluent_core-0.28.2.dist-info/AUTHORS +0 -12
- ansys_fluent_core-0.28.2.dist-info/RECORD +0 -294
|
@@ -1,3 +1,25 @@
|
|
|
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
|
+
|
|
1
23
|
"""Get the git build info."""
|
|
2
24
|
|
|
3
25
|
from collections import OrderedDict
|
ansys/fluent/core/journaling.py
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
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
|
+
|
|
1
23
|
"""A module for controlling the writing of Fluent Python journals."""
|
|
2
24
|
|
|
3
25
|
|
|
26
|
+
class PythonJournalNotSupported(RuntimeError):
|
|
27
|
+
"""Raised when Python journal is unsupported."""
|
|
28
|
+
|
|
29
|
+
def __init__(self):
|
|
30
|
+
"""Initialize PythonJournalNotSupported."""
|
|
31
|
+
super().__init__(
|
|
32
|
+
"Python journaling is available in Fluent version 2023 R1 or later."
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
|
|
4
36
|
class Journal:
|
|
5
37
|
"""Control the writing of Fluent Python journals."""
|
|
6
38
|
|
|
@@ -8,10 +40,16 @@ class Journal:
|
|
|
8
40
|
"""__init__ method of Journal class."""
|
|
9
41
|
self._app_utilities = app_utilities
|
|
10
42
|
|
|
43
|
+
def _check_python_journaling_support(self):
|
|
44
|
+
if self._app_utilities.get_product_version() == "22.2.0":
|
|
45
|
+
raise PythonJournalNotSupported()
|
|
46
|
+
|
|
11
47
|
def start(self, file_name: str):
|
|
12
48
|
"""Start writing a Fluent Python journal at the specified file_name."""
|
|
49
|
+
self._check_python_journaling_support()
|
|
13
50
|
self._app_utilities.start_python_journal(journal_name=file_name)
|
|
14
51
|
|
|
15
52
|
def stop(self):
|
|
16
53
|
"""Stop writing the Fluent Python journal."""
|
|
54
|
+
self._check_python_journaling_support()
|
|
17
55
|
self._app_utilities.stop_python_journal()
|
|
@@ -1,3 +1,25 @@
|
|
|
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
|
+
|
|
1
23
|
"""Public objects and functions under launcher."""
|
|
2
24
|
|
|
3
25
|
from ..utils.fluent_version import FluentVersion # noqa: F401
|
|
@@ -1,3 +1,25 @@
|
|
|
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
|
+
|
|
1
23
|
"""Provides a module for launching Fluent in container mode.
|
|
2
24
|
|
|
3
25
|
Examples
|
|
@@ -57,7 +79,7 @@ class DockerLauncher:
|
|
|
57
79
|
precision: Precision | str | None = None,
|
|
58
80
|
processor_count: int | None = None,
|
|
59
81
|
start_timeout: int = 60,
|
|
60
|
-
additional_arguments: str
|
|
82
|
+
additional_arguments: str = "",
|
|
61
83
|
container_dict: dict | None = None,
|
|
62
84
|
dry_run: bool = False,
|
|
63
85
|
cleanup_on_exit: bool = True,
|
|
@@ -67,76 +89,63 @@ class DockerLauncher:
|
|
|
67
89
|
start_watchdog: bool | None = None,
|
|
68
90
|
file_transfer_service: Any | None = None,
|
|
69
91
|
):
|
|
70
|
-
"""
|
|
92
|
+
"""
|
|
93
|
+
Launch a Fluent session in container mode.
|
|
71
94
|
|
|
72
95
|
Parameters
|
|
73
96
|
----------
|
|
74
97
|
mode : FluentMode
|
|
75
|
-
|
|
98
|
+
Specifies the launch mode of Fluent to target a specific session type.
|
|
76
99
|
ui_mode : UIMode
|
|
77
|
-
|
|
100
|
+
Defines the user interface mode for Fluent. Options correspond to values in the ``UIMode`` enum.
|
|
78
101
|
graphics_driver : FluentWindowsGraphicsDriver or FluentLinuxGraphicsDriver
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
The default is ``None``, in which case the newest installed version is used.
|
|
102
|
+
Specifies the graphics driver for Fluent. Options are from the ``FluentWindowsGraphicsDriver`` enum
|
|
103
|
+
(for Windows) or the ``FluentLinuxGraphicsDriver`` enum (for Linux).
|
|
104
|
+
product_version : FluentVersion or str or float or int, optional
|
|
105
|
+
Indicates the version of Ansys Fluent to launch. For example, to use version 2025 R1, pass
|
|
106
|
+
any of ``FluentVersion.v251``, ``"25.1.0"``, ``"25.1"``, ``25.1``, or ``251``. Defaults to ``None``,
|
|
107
|
+
which uses the newest installed version.
|
|
86
108
|
dimension : Dimension or int, optional
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
``Dimension
|
|
109
|
+
Specifies the geometric dimensionality of the Fluent simulation. Defaults to ``None``,
|
|
110
|
+
which corresponds to ``Dimension.THREE``. Acceptable values include ``Dimension.TWO``,
|
|
111
|
+
``Dimension.THREE``, or integers ``2`` and ``3``.
|
|
90
112
|
precision : Precision or str, optional
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
113
|
+
Defines the floating point precision. Defaults to ``None``, which corresponds to
|
|
114
|
+
``Precision.DOUBLE``. Acceptable values include ``Precision.SINGLE``,
|
|
115
|
+
``Precision.DOUBLE``, or strings ``"single"`` and ``"double"``.
|
|
94
116
|
processor_count : int, optional
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
allocated cores is clamped to value of ``processor_count``.
|
|
117
|
+
Specifies the number of processors to use. Defaults to ``None``, which uses 1 processor.
|
|
118
|
+
In job scheduler environments, this value limits the total number of allocated cores.
|
|
98
119
|
start_timeout : int, optional
|
|
99
|
-
Maximum allowable time in seconds for connecting to the Fluent
|
|
100
|
-
server. The default is ``60``.
|
|
120
|
+
Maximum allowable time in seconds for connecting to the Fluent server. Defaults to 60 seconds.
|
|
101
121
|
additional_arguments : str, optional
|
|
102
|
-
Additional arguments
|
|
103
|
-
format they are normally passed to Fluent on the command line.
|
|
122
|
+
Additional command-line arguments for Fluent, formatted as they would be on the command line.
|
|
104
123
|
container_dict : dict, optional
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
See also :mod:`~ansys.fluent.core.launcher.fluent_container`.
|
|
124
|
+
Configuration dictionary for launching Fluent inside a Docker container. See also
|
|
125
|
+
:mod:`~ansys.fluent.core.launcher.fluent_container`.
|
|
108
126
|
dry_run : bool, optional
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
Whether to start streaming the Fluent transcript in the client. The
|
|
118
|
-
default is ``True``. You can stop and start the streaming of the
|
|
119
|
-
Fluent transcript subsequently via the method calls, ``transcript.start()``
|
|
120
|
-
and ``transcript.stop()`` on the session object.
|
|
127
|
+
If True, does not launch Fluent but prints configuration information instead. If dry running a
|
|
128
|
+
container start, this method will return the configured ``container_dict``. Defaults to False.
|
|
129
|
+
cleanup_on_exit : bool
|
|
130
|
+
Determines whether to shut down the connected Fluent session upon exit or when calling
|
|
131
|
+
the session's `exit()` method. Defaults to True.
|
|
132
|
+
start_transcript : bool
|
|
133
|
+
Indicates whether to start streaming the Fluent transcript in the client. Defaults to True;
|
|
134
|
+
streaming can be controlled via `transcript.start()` and `transcript.stop()` methods on the session object.
|
|
121
135
|
py : bool, optional
|
|
122
|
-
If True, Fluent
|
|
136
|
+
If True, runs Fluent in Python mode. Defaults to None.
|
|
123
137
|
gpu : bool, optional
|
|
124
|
-
If True, Fluent
|
|
138
|
+
If True, starts Fluent with GPU Solver enabled.
|
|
125
139
|
start_watchdog : bool, optional
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
file_transfer_service : optional
|
|
131
|
-
File transfer service. Uploads/downloads files to/from the server.
|
|
140
|
+
If True and `cleanup_on_exit` is True, an independent watchdog process is run to ensure that any local
|
|
141
|
+
GUI-less Fluent sessions started by PyFluent are properly closed when the current Python process ends.
|
|
142
|
+
file_transfer_service : Any, optional
|
|
143
|
+
Service for uploading/downloading files to/from the server.
|
|
132
144
|
|
|
133
145
|
Returns
|
|
134
146
|
-------
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
:class:`~ansys.fluent.core.session_solver.Solver`, \
|
|
138
|
-
:class:`~ansys.fluent.core.session_solver_icing.SolverIcing`, dict]
|
|
139
|
-
Session object or configuration dictionary if ``dry_run = True``.
|
|
147
|
+
Meshing | PureMeshing | Solver | SolverIcing | dict
|
|
148
|
+
Session object or configuration dictionary if ``dry_run`` is True.
|
|
140
149
|
|
|
141
150
|
Raises
|
|
142
151
|
------
|
|
@@ -145,9 +154,8 @@ class DockerLauncher:
|
|
|
145
154
|
|
|
146
155
|
Notes
|
|
147
156
|
-----
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
passed to Fluent.
|
|
157
|
+
In job scheduler environments (e.g., SLURM, LSF, PBS), resources and compute nodes are allocated,
|
|
158
|
+
and core counts are queried from these environments before being passed to Fluent.
|
|
151
159
|
"""
|
|
152
160
|
self.argvals, self.new_session = _get_argvals_and_session(locals().copy())
|
|
153
161
|
if self.argvals["start_timeout"] is None:
|
|
@@ -184,7 +192,7 @@ class DockerLauncher:
|
|
|
184
192
|
del config_dict_h
|
|
185
193
|
return config_dict
|
|
186
194
|
|
|
187
|
-
port, password = start_fluent_container(
|
|
195
|
+
port, password, container = start_fluent_container(
|
|
188
196
|
self._args, self.argvals["container_dict"]
|
|
189
197
|
)
|
|
190
198
|
|
|
@@ -203,6 +211,7 @@ class DockerLauncher:
|
|
|
203
211
|
file_transfer_service=self.file_transfer_service,
|
|
204
212
|
start_transcript=self.argvals["start_transcript"],
|
|
205
213
|
)
|
|
214
|
+
session._container = container
|
|
206
215
|
|
|
207
216
|
if self.argvals["start_watchdog"] is None and self.argvals["cleanup_on_exit"]:
|
|
208
217
|
self.argvals["start_watchdog"] = True
|
|
@@ -1,3 +1,25 @@
|
|
|
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
|
+
|
|
1
23
|
"""Provides a module for customized error handling."""
|
|
2
24
|
|
|
3
25
|
from ansys.fluent.core.exceptions import InvalidArgument
|
|
@@ -29,6 +51,14 @@ class IpPortNotProvided(ValueError):
|
|
|
29
51
|
super().__init__("Provide either 'ip' and 'port' or 'server_info_file_name'.")
|
|
30
52
|
|
|
31
53
|
|
|
54
|
+
class InvalidIpPort(ValueError):
|
|
55
|
+
"""Raised when IP address and port are invalid."""
|
|
56
|
+
|
|
57
|
+
def __init__(self):
|
|
58
|
+
"""Initialize InvalidIpPort."""
|
|
59
|
+
super().__init__("Provide a valid 'ip' and 'port'.")
|
|
60
|
+
|
|
61
|
+
|
|
32
62
|
class UnexpectedKeywordArgument(TypeError):
|
|
33
63
|
"""Raised when a valid keyword argument is not specified."""
|
|
34
64
|
|
|
@@ -1,3 +1,25 @@
|
|
|
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
|
+
|
|
1
23
|
"""Provides a module for launching and configuring local Fluent Docker container runs.
|
|
2
24
|
|
|
3
25
|
Notes
|
|
@@ -239,16 +261,23 @@ def configure_container_dict(
|
|
|
239
261
|
logger.warning(
|
|
240
262
|
f"Starting Fluent container mounted to {mount_source}, with this path available as {mount_target} for the Fluent session running inside the container."
|
|
241
263
|
)
|
|
242
|
-
|
|
243
|
-
if not
|
|
264
|
+
port_mapping = {port: port} if port else {}
|
|
265
|
+
if not port_mapping and "ports" in container_dict:
|
|
244
266
|
# take the specified 'port', OR the first port value from the specified 'ports', for Fluent to use
|
|
245
|
-
|
|
246
|
-
if not
|
|
267
|
+
port_mapping = container_dict["ports"]
|
|
268
|
+
if not port_mapping and pyfluent.LAUNCH_FLUENT_PORT:
|
|
247
269
|
port = pyfluent.LAUNCH_FLUENT_PORT
|
|
248
|
-
|
|
270
|
+
port_mapping = {port: port}
|
|
271
|
+
if not port_mapping:
|
|
249
272
|
port = get_free_port()
|
|
273
|
+
port_mapping = {port: port}
|
|
250
274
|
|
|
251
|
-
container_dict.update(
|
|
275
|
+
container_dict.update(
|
|
276
|
+
ports={str(x): y for x, y in port_mapping.items()}
|
|
277
|
+
) # container port : host port
|
|
278
|
+
container_grpc_port = next(
|
|
279
|
+
iter(port_mapping.values())
|
|
280
|
+
) # the first port in the mapping is chosen as the gRPC port
|
|
252
281
|
|
|
253
282
|
if "environment" not in container_dict:
|
|
254
283
|
if not license_server:
|
|
@@ -259,7 +288,7 @@ def configure_container_dict(
|
|
|
259
288
|
container_dict.update(
|
|
260
289
|
environment={
|
|
261
290
|
"ANSYSLMD_LICENSE_FILE": license_server,
|
|
262
|
-
"REMOTING_PORTS": f"{
|
|
291
|
+
"REMOTING_PORTS": f"{container_grpc_port}/portspan=2",
|
|
263
292
|
}
|
|
264
293
|
)
|
|
265
294
|
|
|
@@ -319,16 +348,10 @@ def configure_container_dict(
|
|
|
319
348
|
container_dict["environment"] = {}
|
|
320
349
|
container_dict["environment"]["FLUENT_NO_AUTOMATIC_TRANSCRIPT"] = "1"
|
|
321
350
|
|
|
322
|
-
if (
|
|
323
|
-
os.getenv("REMOTING_NEW_DM_API") == "1"
|
|
324
|
-
or os.getenv("REMOTING_MAPPED_NEW_DM_API") == "1"
|
|
325
|
-
):
|
|
351
|
+
if os.getenv("REMOTING_NEW_DM_API") == "1":
|
|
326
352
|
if "environment" not in container_dict:
|
|
327
353
|
container_dict["environment"] = {}
|
|
328
|
-
|
|
329
|
-
container_dict["environment"]["REMOTING_NEW_DM_API"] = "1"
|
|
330
|
-
if os.getenv("REMOTING_MAPPED_NEW_DM_API") == "1":
|
|
331
|
-
container_dict["environment"]["REMOTING_MAPPED_NEW_DM_API"] = "1"
|
|
354
|
+
container_dict["environment"]["REMOTING_NEW_DM_API"] = "1"
|
|
332
355
|
|
|
333
356
|
if pyfluent.LAUNCH_FLUENT_IP or os.getenv("REMOTING_SERVER_ADDRESS"):
|
|
334
357
|
if "environment" not in container_dict:
|
|
@@ -342,7 +365,7 @@ def configure_container_dict(
|
|
|
342
365
|
container_dict["environment"] = {}
|
|
343
366
|
container_dict["environment"]["FLUENT_LAUNCHED_FROM_PYFLUENT"] = "1"
|
|
344
367
|
|
|
345
|
-
fluent_commands = [
|
|
368
|
+
fluent_commands = [f"-sifile={container_server_info_file}"] + args
|
|
346
369
|
|
|
347
370
|
container_dict_default = {}
|
|
348
371
|
container_dict_default.update(
|
|
@@ -360,7 +383,7 @@ def configure_container_dict(
|
|
|
360
383
|
return (
|
|
361
384
|
container_dict,
|
|
362
385
|
timeout,
|
|
363
|
-
|
|
386
|
+
container_grpc_port,
|
|
364
387
|
host_server_info_file,
|
|
365
388
|
remove_server_info_file,
|
|
366
389
|
)
|
|
@@ -368,7 +391,7 @@ def configure_container_dict(
|
|
|
368
391
|
|
|
369
392
|
def start_fluent_container(
|
|
370
393
|
args: List[str], container_dict: dict | None = None
|
|
371
|
-
) ->
|
|
394
|
+
) -> tuple[int, str, Any]:
|
|
372
395
|
"""Start a Fluent container.
|
|
373
396
|
|
|
374
397
|
Parameters
|
|
@@ -439,7 +462,9 @@ def start_fluent_container(
|
|
|
439
462
|
|
|
440
463
|
logger.debug("Starting Fluent docker container...")
|
|
441
464
|
|
|
442
|
-
docker_client.containers.run(
|
|
465
|
+
container = docker_client.containers.run(
|
|
466
|
+
config_dict.pop("fluent_image"), **config_dict
|
|
467
|
+
)
|
|
443
468
|
|
|
444
469
|
success = timeout_loop(
|
|
445
470
|
lambda: host_server_info_file.stat().st_mtime > last_mtime, timeout
|
|
@@ -452,7 +477,7 @@ def start_fluent_container(
|
|
|
452
477
|
else:
|
|
453
478
|
_, _, password = _parse_server_info_file(str(host_server_info_file))
|
|
454
479
|
|
|
455
|
-
return port, password
|
|
480
|
+
return port, password, container
|
|
456
481
|
finally:
|
|
457
482
|
if remove_server_info_file and host_server_info_file.exists():
|
|
458
483
|
host_server_info_file.unlink()
|
|
@@ -1,3 +1,25 @@
|
|
|
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
|
+
|
|
1
23
|
"""Provides a module for launching Fluent.
|
|
2
24
|
|
|
3
25
|
This module supports both starting Fluent locally and connecting to a remote instance
|
|
@@ -12,7 +34,10 @@ from typing import Any, Dict
|
|
|
12
34
|
import ansys.fluent.core as pyfluent
|
|
13
35
|
from ansys.fluent.core.fluent_connection import FluentConnection
|
|
14
36
|
from ansys.fluent.core.launcher.container_launcher import DockerLauncher
|
|
15
|
-
from ansys.fluent.core.launcher.launcher_utils import
|
|
37
|
+
from ansys.fluent.core.launcher.launcher_utils import (
|
|
38
|
+
_confirm_watchdog_start,
|
|
39
|
+
is_windows,
|
|
40
|
+
)
|
|
16
41
|
from ansys.fluent.core.launcher.pim_launcher import PIMLauncher
|
|
17
42
|
from ansys.fluent.core.launcher.pyfluent_enums import (
|
|
18
43
|
Dimension,
|
|
@@ -71,6 +96,27 @@ def create_launcher(fluent_launch_mode: LaunchMode = None, **kwargs):
|
|
|
71
96
|
return SlurmLauncher(**kwargs)
|
|
72
97
|
|
|
73
98
|
|
|
99
|
+
def _show_gui_to_ui_mode(old_arg_val, **kwds):
|
|
100
|
+
start_container = kwds.get("start_container")
|
|
101
|
+
container_dict = kwds.get("container_dict")
|
|
102
|
+
if old_arg_val is True:
|
|
103
|
+
if start_container is True:
|
|
104
|
+
return UIMode.NO_GUI
|
|
105
|
+
elif container_dict:
|
|
106
|
+
return UIMode.NO_GUI
|
|
107
|
+
elif os.getenv("PYFLUENT_LAUNCH_CONTAINER") == "1":
|
|
108
|
+
return UIMode.NO_GUI
|
|
109
|
+
else:
|
|
110
|
+
return UIMode.GUI
|
|
111
|
+
elif not old_arg_val:
|
|
112
|
+
if is_windows():
|
|
113
|
+
return UIMode.HIDDEN_GUI
|
|
114
|
+
elif not is_windows():
|
|
115
|
+
return UIMode.NO_GUI
|
|
116
|
+
else:
|
|
117
|
+
return None
|
|
118
|
+
|
|
119
|
+
|
|
74
120
|
def _version_to_dimension(old_arg_val):
|
|
75
121
|
if old_arg_val == "2d":
|
|
76
122
|
return Dimension.TWO
|
|
@@ -84,7 +130,7 @@ def _version_to_dimension(old_arg_val):
|
|
|
84
130
|
@deprecate_argument(
|
|
85
131
|
old_arg="show_gui",
|
|
86
132
|
new_arg="ui_mode",
|
|
87
|
-
converter=
|
|
133
|
+
converter=_show_gui_to_ui_mode,
|
|
88
134
|
warning_cls=PyFluentDeprecationWarning,
|
|
89
135
|
)
|
|
90
136
|
@deprecate_argument(
|
|
@@ -100,7 +146,7 @@ def launch_fluent(
|
|
|
100
146
|
processor_count: int | None = None,
|
|
101
147
|
journal_file_names: None | str | list[str] = None,
|
|
102
148
|
start_timeout: int = None,
|
|
103
|
-
additional_arguments: str
|
|
149
|
+
additional_arguments: str = "",
|
|
104
150
|
env: Dict[str, Any] | None = None,
|
|
105
151
|
start_container: bool | None = None,
|
|
106
152
|
container_dict: dict | None = None,
|
|
@@ -130,8 +176,8 @@ def launch_fluent(
|
|
|
130
176
|
Parameters
|
|
131
177
|
----------
|
|
132
178
|
product_version : FluentVersion or str or float or int, optional
|
|
133
|
-
Version of Ansys Fluent to launch. To use Fluent version
|
|
134
|
-
any of ``FluentVersion.
|
|
179
|
+
Version of Ansys Fluent to launch. To use Fluent version 2025 R1, pass
|
|
180
|
+
any of ``FluentVersion.v251``, ``"25.1.0"``, ``"25.1"``, ``25.1``or ``251``.
|
|
135
181
|
The default is ``None``, in which case the newest installed version is used.
|
|
136
182
|
dimension : Dimension or int, optional
|
|
137
183
|
Geometric dimensionality of the Fluent simulation. The default is ``None``,
|
|
@@ -264,6 +310,8 @@ def launch_fluent(
|
|
|
264
310
|
if env is None:
|
|
265
311
|
env = {}
|
|
266
312
|
|
|
313
|
+
pyfluent.FLUENT_PRECISION_MODE = precision
|
|
314
|
+
|
|
267
315
|
def _mode_to_launcher_type(fluent_launch_mode: LaunchMode):
|
|
268
316
|
launcher_mode_type = {
|
|
269
317
|
LaunchMode.CONTAINER: DockerLauncher,
|
|
@@ -1,3 +1,25 @@
|
|
|
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
|
+
|
|
1
23
|
"""Provides a module for launching utilities."""
|
|
2
24
|
|
|
3
25
|
import logging
|