ansys-fluent-core 0.34.1__py3-none-any.whl → 0.35.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 +48 -84
- ansys/fluent/core/codegen/allapigen.py +2 -2
- ansys/fluent/core/codegen/builtin_settingsgen.py +54 -28
- ansys/fluent/core/codegen/datamodelgen.py +3 -1
- ansys/fluent/core/codegen/print_fluent_version.py +2 -2
- ansys/fluent/core/codegen/settingsgen.py +8 -1
- ansys/fluent/core/codegen/tuigen.py +4 -4
- ansys/fluent/core/data_model_cache.py +2 -2
- ansys/fluent/core/docker/docker_compose.py +8 -9
- ansys/fluent/core/docker/utils.py +1 -1
- ansys/fluent/core/examples/downloads.py +9 -12
- ansys/fluent/core/fluent_connection.py +23 -15
- ansys/fluent/core/generated/api_tree/api_objects.json +1 -1
- ansys/fluent/core/generated/datamodel_231/flicing.py +45 -45
- ansys/fluent/core/generated/datamodel_231/meshing.py +183 -183
- ansys/fluent/core/generated/datamodel_232/flicing.py +25 -25
- ansys/fluent/core/generated/datamodel_232/meshing.py +173 -173
- ansys/fluent/core/generated/datamodel_241/flicing.py +30 -30
- ansys/fluent/core/generated/datamodel_241/meshing.py +246 -246
- ansys/fluent/core/generated/datamodel_242/flicing.py +25 -25
- ansys/fluent/core/generated/datamodel_242/meshing.py +273 -273
- ansys/fluent/core/generated/datamodel_242/part_management.py +3 -3
- ansys/fluent/core/generated/datamodel_251/flicing.py +50 -50
- ansys/fluent/core/generated/datamodel_251/meshing.py +361 -361
- ansys/fluent/core/generated/datamodel_251/part_management.py +6 -6
- ansys/fluent/core/generated/datamodel_252/flicing.py +30 -30
- ansys/fluent/core/generated/datamodel_252/meshing.py +375 -375
- ansys/fluent/core/generated/datamodel_252/part_management.py +10 -10
- ansys/fluent/core/generated/datamodel_261/flicing.py +35 -35
- ansys/fluent/core/generated/datamodel_261/meshing.py +463 -407
- ansys/fluent/core/generated/datamodel_261/part_management.py +5 -5
- ansys/fluent/core/generated/datamodel_261/preferences.py +28 -0
- ansys/fluent/core/generated/fluent_version_252.py +1 -1
- ansys/fluent/core/generated/fluent_version_261.py +3 -3
- ansys/fluent/core/generated/meshing/tui_261.py +1198 -1133
- ansys/fluent/core/generated/solver/settings_261.py +7514 -2195
- ansys/fluent/core/generated/solver/settings_261.pyi +4800 -1015
- ansys/fluent/core/generated/solver/settings_builtin.py +515 -27
- ansys/fluent/core/generated/solver/settings_builtin.pyi +2 -18
- ansys/fluent/core/generated/solver/tui_261.py +2396 -2171
- ansys/fluent/core/launcher/container_launcher.py +19 -4
- ansys/fluent/core/launcher/fluent_container.py +52 -39
- ansys/fluent/core/launcher/launch_options.py +4 -3
- ansys/fluent/core/launcher/launcher.py +16 -3
- ansys/fluent/core/launcher/launcher_utils.py +63 -15
- ansys/fluent/core/launcher/pim_launcher.py +17 -3
- ansys/fluent/core/launcher/process_launch_string.py +1 -1
- ansys/fluent/core/launcher/server_info.py +7 -3
- ansys/fluent/core/launcher/slurm_launcher.py +4 -2
- ansys/fluent/core/launcher/standalone_launcher.py +6 -3
- ansys/fluent/core/launcher/watchdog.py +3 -3
- ansys/fluent/core/launcher/watchdog_exec +1 -1
- ansys/fluent/core/logger.py +3 -1
- ansys/fluent/core/module_config.py +358 -0
- ansys/fluent/core/pyfluent_warnings.py +2 -2
- ansys/fluent/core/report.py +1 -3
- ansys/fluent/core/search.py +43 -18
- ansys/fluent/core/services/__init__.py +2 -0
- ansys/fluent/core/services/api_upgrade.py +3 -2
- ansys/fluent/core/services/datamodel_se.py +4 -2
- ansys/fluent/core/services/field_data.py +24 -0
- ansys/fluent/core/services/health_check.py +3 -1
- ansys/fluent/core/services/interceptors.py +8 -6
- ansys/fluent/core/services/settings.py +1 -1
- ansys/fluent/core/session.py +32 -5
- ansys/fluent/core/session_pure_meshing.py +1 -1
- ansys/fluent/core/session_shared.py +4 -4
- ansys/fluent/core/session_solver.py +13 -6
- ansys/fluent/core/session_utilities.py +7 -0
- ansys/fluent/core/solver/flobject.py +10 -4
- ansys/fluent/core/solver/flunits.py +2 -0
- ansys/fluent/core/solver/settings_builtin_bases.py +3 -3
- ansys/fluent/core/solver/settings_builtin_data.py +2 -14
- ansys/fluent/core/streaming_services/datamodel_event_streaming.py +3 -2
- ansys/fluent/core/streaming_services/datamodel_streaming.py +3 -1
- ansys/fluent/core/streaming_services/events_streaming.py +2 -18
- ansys/fluent/core/system_coupling.py +3 -1
- ansys/fluent/core/utils/__init__.py +0 -7
- ansys/fluent/core/utils/data_transfer.py +3 -3
- ansys/fluent/core/utils/file_transfer_service.py +24 -15
- ansys/fluent/core/utils/fluent_version.py +3 -3
- ansys/fluent/core/utils/networking.py +13 -4
- {ansys_fluent_core-0.34.1.dist-info → ansys_fluent_core-0.35.0.dist-info}/METADATA +8 -7
- {ansys_fluent_core-0.34.1.dist-info → ansys_fluent_core-0.35.0.dist-info}/RECORD +86 -85
- {ansys_fluent_core-0.34.1.dist-info → ansys_fluent_core-0.35.0.dist-info}/WHEEL +1 -1
- {ansys_fluent_core-0.34.1.dist-info → ansys_fluent_core-0.35.0.dist-info/licenses}/LICENSE +0 -0
|
@@ -42,7 +42,7 @@ from deprecated.sphinx import deprecated
|
|
|
42
42
|
import grpc
|
|
43
43
|
|
|
44
44
|
import ansys.fluent.core as pyfluent
|
|
45
|
-
from ansys.fluent.core.launcher.launcher_utils import
|
|
45
|
+
from ansys.fluent.core.launcher.launcher_utils import ComposeConfig
|
|
46
46
|
from ansys.fluent.core.services import service_creator
|
|
47
47
|
from ansys.fluent.core.services.app_utilities import (
|
|
48
48
|
AppUtilitiesOld,
|
|
@@ -252,9 +252,9 @@ class FluentConnectionProperties:
|
|
|
252
252
|
|
|
253
253
|
def _get_ip_and_port(ip: str | None = None, port: int | None = None) -> (str, int):
|
|
254
254
|
if not ip:
|
|
255
|
-
ip =
|
|
255
|
+
ip = pyfluent.config.launch_fluent_ip or "127.0.0.1"
|
|
256
256
|
if not port:
|
|
257
|
-
port =
|
|
257
|
+
port = pyfluent.config.launch_fluent_port
|
|
258
258
|
if not port:
|
|
259
259
|
raise PortNotProvided()
|
|
260
260
|
return ip, port
|
|
@@ -381,6 +381,7 @@ class FluentConnection:
|
|
|
381
381
|
slurm_job_id: str | None = None,
|
|
382
382
|
inside_container: bool | None = None,
|
|
383
383
|
container: ContainerT | None = None,
|
|
384
|
+
compose_config: ComposeConfig | None = None,
|
|
384
385
|
):
|
|
385
386
|
"""Initialize a Session.
|
|
386
387
|
|
|
@@ -420,12 +421,15 @@ class FluentConnection:
|
|
|
420
421
|
container: ContainerT, optional
|
|
421
422
|
The container instance if the Fluent session is running inside
|
|
422
423
|
a container.
|
|
424
|
+
compose_config: ComposeConfig, optional
|
|
425
|
+
Configuration for Docker Compose or Podman Compose.
|
|
423
426
|
|
|
424
427
|
Raises
|
|
425
428
|
------
|
|
426
429
|
PortNotProvided
|
|
427
430
|
If port is not provided.
|
|
428
431
|
"""
|
|
432
|
+
self._compose_config = compose_config if compose_config else ComposeConfig()
|
|
429
433
|
self._error_state = ErrorState()
|
|
430
434
|
self._data_valid = False
|
|
431
435
|
self._channel_str = None
|
|
@@ -447,7 +451,7 @@ class FluentConnection:
|
|
|
447
451
|
# At this point, the server must be running. If the following check_health()
|
|
448
452
|
# throws, we should not proceed.
|
|
449
453
|
# TODO: Show user-friendly error message.
|
|
450
|
-
if pyfluent.
|
|
454
|
+
if pyfluent.config.check_health:
|
|
451
455
|
self._health_check.check_health()
|
|
452
456
|
|
|
453
457
|
self._slurm_job_id = slurm_job_id
|
|
@@ -472,7 +476,7 @@ class FluentConnection:
|
|
|
472
476
|
and cortex_host is not None
|
|
473
477
|
):
|
|
474
478
|
logger.info("Checking if Fluent is running inside a container.")
|
|
475
|
-
if not is_compose
|
|
479
|
+
if not self._compose_config.is_compose:
|
|
476
480
|
inside_container = get_container(cortex_host)
|
|
477
481
|
logger.debug(f"get_container({cortex_host}): {inside_container}")
|
|
478
482
|
if inside_container is False:
|
|
@@ -549,7 +553,10 @@ class FluentConnection:
|
|
|
549
553
|
>>> session = pyfluent.launch_fluent()
|
|
550
554
|
>>> session.force_exit()
|
|
551
555
|
"""
|
|
552
|
-
if
|
|
556
|
+
if (
|
|
557
|
+
self.connection_properties.inside_container
|
|
558
|
+
or self._compose_config.is_compose
|
|
559
|
+
):
|
|
553
560
|
self._force_exit_container()
|
|
554
561
|
elif self._remote_instance is not None:
|
|
555
562
|
logger.error("Cannot execute cleanup script, Fluent running remotely.")
|
|
@@ -601,7 +608,7 @@ class FluentConnection:
|
|
|
601
608
|
def _force_exit_container(self):
|
|
602
609
|
"""Immediately terminates the Fluent client running inside a container, losing
|
|
603
610
|
unsaved progress and data."""
|
|
604
|
-
if is_compose
|
|
611
|
+
if self._compose_config.is_compose and self._container:
|
|
605
612
|
self._container.stop()
|
|
606
613
|
else:
|
|
607
614
|
container = self.connection_properties.inside_container
|
|
@@ -679,7 +686,10 @@ class FluentConnection:
|
|
|
679
686
|
else:
|
|
680
687
|
raise WaitTypeError()
|
|
681
688
|
|
|
682
|
-
if
|
|
689
|
+
if (
|
|
690
|
+
self.connection_properties.inside_container
|
|
691
|
+
and not self._compose_config.is_compose
|
|
692
|
+
):
|
|
683
693
|
_response = timeout_loop(
|
|
684
694
|
get_container,
|
|
685
695
|
wait,
|
|
@@ -748,17 +758,15 @@ class FluentConnection:
|
|
|
748
758
|
)
|
|
749
759
|
|
|
750
760
|
if timeout is None:
|
|
751
|
-
|
|
752
|
-
if
|
|
753
|
-
logger.debug(
|
|
754
|
-
f"Found PYFLUENT_TIMEOUT_FORCE_EXIT env var: '{env_timeout}'"
|
|
755
|
-
)
|
|
761
|
+
config_timeout = pyfluent.config.force_exit_timeout
|
|
762
|
+
if config_timeout is not None:
|
|
763
|
+
logger.debug(f"Found force_exit_timeout config: '{config_timeout}'")
|
|
756
764
|
try:
|
|
757
|
-
timeout = float(
|
|
765
|
+
timeout = float(config_timeout)
|
|
758
766
|
logger.debug(f"Setting TIMEOUT_FORCE_EXIT to {timeout}")
|
|
759
767
|
except ValueError:
|
|
760
768
|
logger.debug(
|
|
761
|
-
"Invalid
|
|
769
|
+
"Invalid force_exit_timeout config. Must be a float or int. "
|
|
762
770
|
"Timeout forced exit is disabled."
|
|
763
771
|
)
|
|
764
772
|
|