ansys-fluent-core 0.34.2__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.

Files changed (85) hide show
  1. ansys/fluent/core/__init__.py +48 -84
  2. ansys/fluent/core/codegen/allapigen.py +2 -2
  3. ansys/fluent/core/codegen/builtin_settingsgen.py +54 -28
  4. ansys/fluent/core/codegen/datamodelgen.py +3 -1
  5. ansys/fluent/core/codegen/print_fluent_version.py +2 -2
  6. ansys/fluent/core/codegen/settingsgen.py +8 -1
  7. ansys/fluent/core/codegen/tuigen.py +4 -4
  8. ansys/fluent/core/data_model_cache.py +2 -2
  9. ansys/fluent/core/docker/docker_compose.py +8 -9
  10. ansys/fluent/core/docker/utils.py +2 -2
  11. ansys/fluent/core/examples/downloads.py +9 -12
  12. ansys/fluent/core/fluent_connection.py +23 -15
  13. ansys/fluent/core/generated/api_tree/api_objects.json +1 -1
  14. ansys/fluent/core/generated/datamodel_231/flicing.py +55 -55
  15. ansys/fluent/core/generated/datamodel_231/meshing.py +191 -191
  16. ansys/fluent/core/generated/datamodel_232/flicing.py +40 -40
  17. ansys/fluent/core/generated/datamodel_232/meshing.py +177 -177
  18. ansys/fluent/core/generated/datamodel_241/flicing.py +30 -30
  19. ansys/fluent/core/generated/datamodel_241/meshing.py +298 -298
  20. ansys/fluent/core/generated/datamodel_242/flicing.py +45 -45
  21. ansys/fluent/core/generated/datamodel_242/meshing.py +352 -352
  22. ansys/fluent/core/generated/datamodel_242/part_management.py +9 -9
  23. ansys/fluent/core/generated/datamodel_251/flicing.py +40 -40
  24. ansys/fluent/core/generated/datamodel_251/meshing.py +304 -304
  25. ansys/fluent/core/generated/datamodel_251/part_management.py +6 -6
  26. ansys/fluent/core/generated/datamodel_252/flicing.py +50 -50
  27. ansys/fluent/core/generated/datamodel_252/meshing.py +435 -435
  28. ansys/fluent/core/generated/datamodel_252/part_management.py +5 -5
  29. ansys/fluent/core/generated/datamodel_261/flicing.py +45 -45
  30. ansys/fluent/core/generated/datamodel_261/meshing.py +462 -399
  31. ansys/fluent/core/generated/datamodel_261/part_management.py +5 -5
  32. ansys/fluent/core/generated/datamodel_261/preferences.py +28 -0
  33. ansys/fluent/core/generated/fluent_version_261.py +3 -3
  34. ansys/fluent/core/generated/meshing/tui_261.py +1247 -1136
  35. ansys/fluent/core/generated/solver/settings_261.py +11990 -4900
  36. ansys/fluent/core/generated/solver/settings_261.pyi +7277 -3115
  37. ansys/fluent/core/generated/solver/settings_builtin.py +515 -27
  38. ansys/fluent/core/generated/solver/settings_builtin.pyi +2 -18
  39. ansys/fluent/core/generated/solver/tui_261.py +3888 -2676
  40. ansys/fluent/core/launcher/container_launcher.py +19 -4
  41. ansys/fluent/core/launcher/fluent_container.py +51 -39
  42. ansys/fluent/core/launcher/launch_options.py +4 -3
  43. ansys/fluent/core/launcher/launcher.py +16 -3
  44. ansys/fluent/core/launcher/launcher_utils.py +63 -15
  45. ansys/fluent/core/launcher/pim_launcher.py +17 -3
  46. ansys/fluent/core/launcher/process_launch_string.py +1 -1
  47. ansys/fluent/core/launcher/server_info.py +7 -3
  48. ansys/fluent/core/launcher/slurm_launcher.py +3 -2
  49. ansys/fluent/core/launcher/standalone_launcher.py +6 -3
  50. ansys/fluent/core/launcher/watchdog.py +3 -3
  51. ansys/fluent/core/launcher/watchdog_exec +1 -1
  52. ansys/fluent/core/logger.py +3 -1
  53. ansys/fluent/core/module_config.py +358 -0
  54. ansys/fluent/core/pyfluent_warnings.py +2 -2
  55. ansys/fluent/core/report.py +1 -3
  56. ansys/fluent/core/search.py +43 -18
  57. ansys/fluent/core/services/__init__.py +2 -0
  58. ansys/fluent/core/services/api_upgrade.py +3 -2
  59. ansys/fluent/core/services/datamodel_se.py +4 -2
  60. ansys/fluent/core/services/field_data.py +24 -0
  61. ansys/fluent/core/services/health_check.py +3 -1
  62. ansys/fluent/core/services/interceptors.py +8 -6
  63. ansys/fluent/core/services/settings.py +1 -1
  64. ansys/fluent/core/session.py +32 -5
  65. ansys/fluent/core/session_pure_meshing.py +1 -1
  66. ansys/fluent/core/session_shared.py +4 -4
  67. ansys/fluent/core/session_solver.py +13 -6
  68. ansys/fluent/core/session_utilities.py +7 -0
  69. ansys/fluent/core/solver/flobject.py +10 -4
  70. ansys/fluent/core/solver/flunits.py +2 -0
  71. ansys/fluent/core/solver/settings_builtin_bases.py +3 -3
  72. ansys/fluent/core/solver/settings_builtin_data.py +2 -14
  73. ansys/fluent/core/streaming_services/datamodel_event_streaming.py +3 -2
  74. ansys/fluent/core/streaming_services/datamodel_streaming.py +3 -1
  75. ansys/fluent/core/streaming_services/events_streaming.py +2 -18
  76. ansys/fluent/core/system_coupling.py +3 -1
  77. ansys/fluent/core/utils/__init__.py +0 -7
  78. ansys/fluent/core/utils/data_transfer.py +3 -3
  79. ansys/fluent/core/utils/file_transfer_service.py +24 -15
  80. ansys/fluent/core/utils/fluent_version.py +3 -3
  81. ansys/fluent/core/utils/networking.py +13 -4
  82. {ansys_fluent_core-0.34.2.dist-info → ansys_fluent_core-0.35.0.dist-info}/METADATA +8 -7
  83. {ansys_fluent_core-0.34.2.dist-info → ansys_fluent_core-0.35.0.dist-info}/RECORD +85 -84
  84. {ansys_fluent_core-0.34.2.dist-info → ansys_fluent_core-0.35.0.dist-info}/WHEEL +1 -1
  85. {ansys_fluent_core-0.34.2.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 is_compose
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 = os.getenv("PYFLUENT_FLUENT_IP", "127.0.0.1")
255
+ ip = pyfluent.config.launch_fluent_ip or "127.0.0.1"
256
256
  if not port:
257
- port = os.getenv("PYFLUENT_FLUENT_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.CHECK_HEALTH:
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 self.connection_properties.inside_container or is_compose():
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() and self._container:
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 self.connection_properties.inside_container and not is_compose():
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
- env_timeout = os.getenv("PYFLUENT_TIMEOUT_FORCE_EXIT")
752
- if env_timeout is not None:
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(env_timeout)
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 PYFLUENT_TIMEOUT_FORCE_EXIT. Must be a float or int. "
769
+ "Invalid force_exit_timeout config. Must be a float or int. "
762
770
  "Timeout forced exit is disabled."
763
771
  )
764
772