diff --git a/codegen/tuigen.py b/codegen/tuigen.py index 800ab031fb4a..30cddecb42ca 100644 --- a/codegen/tuigen.py +++ b/codegen/tuigen.py @@ -310,7 +310,7 @@ def generate(self) -> None: self._populate_menu(self._main_menu, info) self.session.exit() self._write_code_to_tui_file( - f'"""Fluent {self._mode.title()} TUI Commands"""\n' + f'"""Fluent {self._mode.title().lower()} TUI commands"""\n' ) self._main_menu.doc = f"Fluent {self._mode} main menu." self._write_code_to_tui_file( diff --git a/doc/source/api/general/index.rst b/doc/source/api/general/index.rst index 85b04a6f7a07..24b629bd82d5 100644 --- a/doc/source/api/general/index.rst +++ b/doc/source/api/general/index.rst @@ -6,73 +6,72 @@ General Launcher ######## -:ref:`ref_launcher` provides access to starting Fluent locally in server mode or connecting to a running Fluent -server instance. - -Asynchronous execution -###################### - -:ref:`ref_utils` consists solely of a function to allow for asynchronous execution. +:ref:`ref_launcher` includes instructions on how to launch and connect to Fluent. Sessions ######## -:ref:`ref_sessions` consists of available Fluent sessions. +:ref:`ref_sessions` describes the various types of PyFluent session objects, which connect to Fluent sessions. Services ######## -:ref:`ref_services` consists of gRPC services for Fluent sessions. +:ref:`ref_services` outlines fundamental gRPC services, upon which PyFluent depends (and are directly usable). Streaming services ################## -:ref:`ref_streaming_services` consists of streaming services for management of gRPC services. - -Post objects -############ - -:ref:`ref_post_objects` consists of visualization objects for Matplotlib. +:ref:`ref_streaming_services` outlines fundamental gRPC streaming services, upon which PyFluent depends (and are directly usable). Scheduler ######### -:ref:`ref_scheduler` consists of abstract machine objects and their use for queue system interface. +:ref:`ref_scheduler` describes a module for facilitating use of external job scheduling systems. -Case reader -########### +Case +#### -:ref:`ref_case_reader` demonstrates reading of Fluent's case files. +:ref:`ref_case_reader` documents a class for parsing Fluent case files in pure Python code. Data transfer ############# -:ref:`ref_data_transfer` demonstrates transfer of Fluent's case files. +:ref:`ref_data_transfer` describes how to transfer mesh data between PyFluent sessions. Journaling ########## -:ref:`ref_journaling` consists of read-write of journal. - -Meta -#### +:ref:`ref_journaling` explains how to read and write Python journals that are reusable between PyFluent and Fluent. -:ref:`ref_meta` consists of used meta classes. - -Quantity +Workflow ######## -:ref:`ref_quantity` is a module for creation and manipulation of physical quantities. +:ref:`ref_workflow` documents high-level interfaces to the task-based workflows, including meshing workflow. rpvars ###### -:ref:`ref_rpvars` shows access and modification of rpvars. +:ref:`ref_rpvars` shows how you can access and modify live Fluent rpvars via PyFluent. -Workflow +Quantity ######## -:ref:`ref_workflow` used for creation of TaskObject instance. +:ref:`ref_quantity` reveals a powerful quantity class that exposes real values and units of API (and other) objects. + +Post objects +############ + +:ref:`ref_post_objects` documents visualization objects for interfacing to Matplotlib and pyvista. + +Asynchronous execution +###################### + +:ref:`ref_utils` documents tools for asynchronous function execution. + +Meta +#### + +:ref:`ref_meta` consists of some metaclasses used in the PyFluent codebase. .. currentmodule:: ansys.fluent.core diff --git a/doc/source/api/index.rst b/doc/source/api/index.rst index 916be92593cc..8695a3cf8914 100644 --- a/doc/source/api/index.rst +++ b/doc/source/api/index.rst @@ -8,25 +8,27 @@ solver components of Fluent. General ####### -The :ref:`ref_general` component describes starting of Fluent and it's asynchronous execution, types of various -Fluent sessions, use of gRPC and streaming services, creation of visualization objects for Matplotlib and abstract -machine object for queue system interface, contains examples to read and transfer Fluent's case files in addition -to this it contains information about used meta classes, rpvars, workflow objects, recording journals and module for -creation of physical quantities using real values and units. +Features of PyFluent not specifically belonging to either the Meshing or Solver modes are collected together in the +:ref:`ref_general` section. That includes instructions on how to launch and connect to Fluent, and the various types of +PyFluent session objects, which connect to Fluent sessions, are documented. Fundamental gRPC services, including +streaming services, upon which PyFluent depends (and are directly usable) are outlined. Other features include a +Scheduler module for facilitating use of external job scheduling systems, a purely Python-based reader for Fluent +project and case files, Python-based journaling, task-based workflow objects, full Pythonic access to Fluent rp-vars, +powerful quantity objects that expose real values and units of API (and other) objects, visualization objects for +interfacing to Matplotlib and pyvista, and tools for asynchronous and batched command execution. Meshing ####### -The :ref:`ref_meshing` mode is dedicated to capturing the capabilities of the Fluent Meshing guided workflows and -associated tools. This component consists of an interface that is derived from the Fluent (meshing) TUI, as well as -a meshing workflow interface that manages workflow tasks, meshing functions, and part management. +The :ref:`ref_meshing` mode provides Pythonic interfaces to the Fluent meshing TUI, Fluent meshing guided workflows, +and part management. Solver ###### The :ref:`ref_solver` mode is dedicated to capturing the power of the Fluent solver. This component consists of a -:ref:`ref_settings`-based interface or a :ref:`ref_solver_tui`-based interface that is derived from the Fluent -(solver) TUI, as well as access to Fluent surface, scalar and vector field data. +:ref:`ref_settings`-based interface and a :ref:`ref_solver_tui`-based interface that is derived from the Fluent +Solver TUI, as well as access to surface data and scalar and vector field data. .. toctree:: diff --git a/doc/styles/Vocab/ANSYS/accept.txt b/doc/styles/Vocab/ANSYS/accept.txt index 9943d906bef6..ffcc35df5912 100644 --- a/doc/styles/Vocab/ANSYS/accept.txt +++ b/doc/styles/Vocab/ANSYS/accept.txt @@ -17,6 +17,8 @@ Matplotlib matplotlib mesher meshing's +metaclass +metaclasses MonitorsManager numpy pathlines diff --git a/src/ansys/fluent/core/__init__.py b/src/ansys/fluent/core/__init__.py index 8ebba607732f..5abc18417c08 100644 --- a/src/ansys/fluent/core/__init__.py +++ b/src/ansys/fluent/core/__init__.py @@ -9,7 +9,7 @@ from ansys.fluent.core._version import __version__ # noqa: F401 from ansys.fluent.core.launcher.launcher import ( # noqa: F401 FluentVersion, - LaunchModes, + LaunchMode, launch_fluent, ) from ansys.fluent.core.services.batch_ops import BatchOps # noqa: F401 diff --git a/src/ansys/fluent/core/journaling.py b/src/ansys/fluent/core/journaling.py index e0a6fc80d265..c507c3154879 100644 --- a/src/ansys/fluent/core/journaling.py +++ b/src/ansys/fluent/core/journaling.py @@ -1,16 +1,16 @@ -"""A module for maintaining journals.""" +"""A module for controlling the writing of Fluent Python journals.""" class Journal: - """Manages journal streaming.""" + """Control the writig of Fluent Python journals.""" def __init__(self, scheme_eval): self.scheme_eval = scheme_eval def start(self, file_path: str): - """Starts writing a journal to the file_path.""" + """Start writing a Fluent Python journal at the specified file_path.""" self.scheme_eval.exec([f'(api-start-python-journal "{file_path}")']) def stop(self): - """Stops writing the journal.""" + """Stop writing the Fluent Python journal.""" self.scheme_eval.exec([f"(api-stop-python-journal)"]) diff --git a/src/ansys/fluent/core/launcher/launcher.py b/src/ansys/fluent/core/launcher/launcher.py index cf82e7bd33b2..9bc64298889d 100644 --- a/src/ansys/fluent/core/launcher/launcher.py +++ b/src/ansys/fluent/core/launcher/launcher.py @@ -36,7 +36,7 @@ def _is_windows(): class FluentVersion(Enum): - """Contains the standard Ansys Fluent release.""" + """An enumeration over supported Fluent versions.""" version_23R2 = "23.2.0" version_23R1 = "23.1.0" @@ -61,7 +61,10 @@ def __str__(self): def get_ansys_version() -> str: - """Get the latest ANSYS version from AWP_ROOT environment variables.""" + """Return the version string corresponding to the most recent, available ANSYS + installation. The returned value is the string component of one of the members + of the FluentVersion class. + """ for v in FluentVersion: if "AWP_ROOT" + "".join(str(v).split("."))[:-1] in os.environ: return str(v) @@ -108,19 +111,19 @@ def get_exe_path(fluent_root: Path) -> Path: return get_exe_path(get_fluent_root(FluentVersion(ansys_version))) -class LaunchModes(Enum): - """Provides the standard Fluent launch modes.""" +class LaunchMode(Enum): + """An enumeration over supported launch modes.""" - # Tuple: Name, Solver object type, Meshing flag, Launcher options + # Tuple: Name, Solver object type, Meshing flag, Launcher options MESHING_MODE = ("meshing", Meshing, True, []) PURE_MESHING_MODE = ("pure-meshing", PureMeshing, True, []) SOLVER = ("solver", Solver, False, []) SOLVER_ICING = ("solver-icing", SolverIcing, False, [("fluent_icing", True)]) @staticmethod - def get_mode(mode: str) -> "LaunchModes": - """Returns the LaunchMode based on the mode in string format.""" - for m in LaunchModes: + def get_mode(mode: str): + """Returns the LaunchMode based on the provided mode string.""" + for m in LaunchMode: if mode == m.value[0]: return m else: @@ -220,8 +223,8 @@ def launch_remote_fluent( meshing_mode: bool = False, dimensionality: str = None, launcher_args: Dict[str, Any] = None, -): - """Launch Fluent remotely using the PIM (Product Instance Management) API. +) -> Union[Meshing, PureMeshing, Solver, SolverIcing]: + """Launch Fluent remotely using `PyPIM `. When calling this method, you must ensure that you are in an environment where PyPIM is configured. You can use the :func: @@ -230,8 +233,8 @@ def launch_remote_fluent( Parameters ---------- - session_cls: _BaseSession - Instance of the Session class + session_cls: Union[type(Meshing), type(PureMeshing), type(Solver), type(SolverIcing)] + Session type. start_transcript: bool Whether to start streaming the Fluent transcript in the client. The default is ``True``. You can stop and start the streaming of the @@ -240,9 +243,10 @@ def launch_remote_fluent( Maximum allowable time in seconds for connecting to the Fluent server. The default is ``100``. product_version : str, optional - Version of Fluent to use in the three-digit format (such as ``"212"`` - for 2021 R2). The default is ``None``, in which case the active version - or latest installed version is used. + Select an installed version of ANSYS. The string must be in a format like + ``"23.1.0"`` (for 2023 R1) matching the documented version format in the + FluentVersion class. The default is ``None``, in which case the newest installed + version is used. cleanup_on_exit : bool, optional Whether to clean up and exit Fluent when Python exits or when garbage is collected for the Fluent Python instance. The default is ``True``. @@ -250,13 +254,13 @@ def launch_remote_fluent( Whether to launch Fluent remotely in meshing mode. The default is ``False``. dimensionality : str, optional - Number of dimensions for modeling. The default is ``None``, in which - case ``"3s"`` is used. Options are ``"3d"`` and ``"2d"``. + Geometric dimensionality of the Fluent simulation. The default is ``None``, + in which case ``"3d"`` is used. Options are ``"3d"`` and ``"2d"``. Returns ------- - ansys.fluent.core.session.Session - Instance of the session. + Union[Meshing, PureMeshing, Solver, SolverIcing] + Session object. """ pim = pypim.connect() instance = pim.create_instance( @@ -282,13 +286,13 @@ def launch_remote_fluent( ) -def _get_session_info(argvals, mode: Union[LaunchModes, str, None] = None): +def _get_session_info(argvals, mode: Union[LaunchMode, str, None] = None): """Updates the session information.""" if mode is None: - mode = LaunchModes.SOLVER + mode = LaunchMode.SOLVER if isinstance(mode, str): - mode = LaunchModes.get_mode(mode) + mode = LaunchMode.get_mode(mode) new_session = mode.value[1] meshing_mode = mode.value[2] for k, v in mode.value[3]: @@ -361,7 +365,7 @@ def _connect_to_running_server(argvals, server_info_filepath: str): def _get_running_session_mode( - fluent_connection: _FluentConnection, mode: LaunchModes = None + fluent_connection: _FluentConnection, mode: LaunchMode = None ): """Get the mode of the running session if the mode has not been mentioned explicitly.""" @@ -369,7 +373,7 @@ def _get_running_session_mode( session_mode = mode else: try: - session_mode = LaunchModes.get_mode( + session_mode = LaunchMode.get_mode( fluent_connection.get_current_fluent_mode() ) except BaseException: @@ -450,26 +454,27 @@ def launch_fluent( case_filepath: str = None, case_data_filepath: str = None, lightweight_mode: bool = False, - mode: Union[LaunchModes, str, None] = None, + mode: Union[LaunchMode, str, None] = None, server_info_filepath: str = None, password: str = None, py: bool = None, cwd: str = None, topy: Union[str, list] = None, **kwargs, -) -> Union[Meshing, PureMeshing, Solver]: +) -> Union[Meshing, PureMeshing, Solver, SolverIcing]: """Launch Fluent locally in server mode or connect to a running Fluent server instance. Parameters ---------- product_version : str, optional - Version of Fluent to use in the numeric format (such as ``"23.1.0"`` - for 2023 R1). The default is ``None``, in which case the active version - or latest installed version is used. + Select an installed version of ANSYS. The string must be in a format like + ``"23.1.0"`` (for 2023 R1) matching the documented version format in the + FluentVersion class. The default is ``None``, in which case the newest installed + version is used. version : str, optional - Dimensions for modeling. The default is ``None``, in which case ``"3d"`` - is used. Options are ``"3d"`` and ``"2d"``. + Geometric dimensionality of the Fluent simulation. The default is ``None``, + in which case ``"3d"`` is used. Options are ``"3d"`` and ``"2d"``. precision : str, optional Floating point precision. The default is ``None``, in which case ``"double"`` is used. Options are ``"double"`` and ``"single"``. @@ -483,17 +488,18 @@ def launch_fluent( Maximum allowable time in seconds for connecting to the Fluent server. The default is ``100``. additional_arguments : str, optional - Additional arguments to send to Fluent. The default is ``""``. + Additional arguments to send to Fluent as a string in the same + format they are normally passed to Fluent on the command line. + The default is``""``. env : dict[str, str], optional Mapping to modify environment variables in Fluent. The default is ``None``. start_instance : bool, optional - Whether to connect to an existing Fluent instance at a specified IP - address on a specified port. The default is ``None``, in which - case a local instance of Fluent is started. When ``False``, use - the next two parameters to specify the IP address and port. You - can also use the environment variable ``PYFLUENT_START_INSTANCE=<0 or 1>`` - to set this parameter. + Whether to start a local Fluent instance. The default is None, which + indicates True. Otherwise, connect to an existing Fluent instance at a + specified IP address on a specified port, using the arguments ``ip`` and + ``port``. You can also use the environment variable ``PYFLUENT_START_INSTANCE=<0 or 1>`` + to set ``start_instance`` if you do not pass it as an argument. ip : str, optional IP address for connecting to an existing Fluent instance. This parameter is used only when ``start_instance`` is ``False``. Otherwise, the @@ -506,52 +512,54 @@ def launch_fluent( value. cleanup_on_exit : bool, optional Whether to shut down the connected Fluent session when PyFluent is - exited or the ``exit()`` method is called on the session instance. - The default is ``True``. + exited, or the ``exit()`` method is called on the session instance, + or if the session instance becomes unreferenced. The default is ``True``. start_transcript : bool, optional Whether to start streaming the Fluent transcript in the client. The default is ``True``. You can stop and start the streaming of the - Fluent transcript subsequently via method calls on the session object. + Fluent transcript subsequently via the method calls, ``start_transcript()`` + and ``stop_transcript()`` on the session object. show_gui : bool, optional - Whether to display the Fluent GUI when ``start_instance`` - is set to ''True``. The default is ``None`` so that explicit - ``False`` settings can be detected. This is because you can use - also use the environment variable ``PYFLUENT_SHOW_SERVER_GUI=<0 or 1>`` - to set this parameter. The ``show-gui`` parameter overrides the - PYFLUENT_SHOW_SERVER_GUI environment variable. For example, if - PYFLUENT_SHOW_SERVER_GUI is set to ``1`` and the ``show-gui`` - parameter is set to ``False``, the GUI is hidden. + Whether to display the Fluent GUI, only when ``start_instance`` + is set to ``True``. The default is ``None``, which does not + cause the GUI to be shown. If a value of ``False`` is + not explicitly provided, the GUI will also be shown if + the environment variable ``PYFLUENT_SHOW_SERVER_GUI`` is set to 1. case_filepath : str, optional - If provided, reads a fluent case file and sets the required settings - in the fluent session + If provided, the case file at ``case_filepath`` is read into the Fluent session. case_data_filepath : str, optional - If provided, reads a fluent case and data file and sets the required settings - in the fluent session + If provided, the case and data files at ``case_data_filepath`` are read into the Fluent session. lightweight_mode: bool, optional - Whether to use light io mode for reading case via ``case_filepath`` parameter. - This parameter is used only when ``case_filepath`` is provided. The default is - ``False``. + Whether to run in lightweight mode. In lightweight mode, the lightweight settings are read into the + current Fluent solver session. The mesh is read into a background Fluent solver session which will + replace the current Fluent solver session once the mesh read is complete and the lightweight settings + made by the user in the current Fluent solver session have been applied in the background Fluent + solver session. This is all orchestrated by PyFluent and requires no special usage. + This parameter is used only when ``case_filepath`` is provided. The default is ``False``. mode : str, optional Launch mode of Fluent to point to a specific session type. The default value is ``None``. Options are ``"meshing"``, ``"pure-meshing"`` and ``"solver"``. server_info_filepath: str - Path to server-info file written out by Fluent server. The default is ``None``. + Path to server-info file written out by Fluent server. The default is + ``None``. ``server_info_filepath`` can be specified if ``start_instance`` + is ``False``, where PyFluent will use the connection information in the file to + connect to a running Fluent session. password : str, optional - Password to connect to existing Fluent instance. + Password to connect to existing Fluent instance. py : bool, optional - Passes ``"-py"`` as an additional_argument to launch fluent in python mode. - The default is ``None``. + If True, Fluent will run in Python mode. Default is None. cwd: str, Optional Path to specify current working directory to launch fluent from the defined directory as current working directory. topy: str or list, optional - Automates scheme to python journal creation. + The string path to a Fluent journal file, or a list of such paths. Fluent will execute the + journal(s) and write the equivalent Python journal(s). Returns ------- - ansys.fluent.session.Session - Fluent session. + Union[Meshing, PureMeshing, Solver, SolverIcing] + Session object. Notes ----- @@ -586,7 +594,7 @@ def launch_fluent( sifile_last_mtime = Path(server_info_filepath).stat().st_mtime if env is None: env = {} - if mode != LaunchModes.SOLVER_ICING: + if mode != LaunchMode.SOLVER_ICING: env["APP_LAUNCHED_FROM_CLIENT"] = "1" # disables flserver datamodel kwargs = _get_subprocess_kwargs_for_fluent(env) if cwd: diff --git a/src/ansys/fluent/core/post_objects/post_objects_container.py b/src/ansys/fluent/core/post_objects/post_objects_container.py index ff216e7d5b71..a732a587eba8 100644 --- a/src/ansys/fluent/core/post_objects/post_objects_container.py +++ b/src/ansys/fluent/core/post_objects/post_objects_container.py @@ -1,4 +1,5 @@ -"""Module providing visualization objects for Matplotlib.""" +"""Module providing visualization objects to facilitate + integration with libraries like Matplotlib and pyvista.""" import inspect from ansys.fluent.core.meta import PyLocalContainer @@ -57,7 +58,7 @@ class Plots(Container): Session object. local_surfaces_provider : object, optional Object providing local surfaces so that you can access surfaces - created in other modules, such as PyVista. The default is ``None``. + created in other modules, such as pyvista. The default is ``None``. Attributes ---------- @@ -76,7 +77,7 @@ def __init__(self, session, module, post_api_helper, local_surfaces_provider=Non class Graphics(Container): - """Provides the PyVista ``Graphics`` objects manager. + """Provides the pyvista ``Graphics`` objects manager. This class provides access to ``Graphics`` object containers for a given session so that graphics objects can be created. @@ -87,7 +88,7 @@ class Graphics(Container): Session object. local_surfaces_provider : object, optional Object providing local surfaces so that you can access surfaces - created in other modules, such as PyVista. The default is ``None``. + created in other modules, such as pyvista. The default is ``None``. Attributes ---------- diff --git a/src/ansys/fluent/core/rpvars.py b/src/ansys/fluent/core/rpvars.py index 682d4cc089d2..c645a42026b8 100644 --- a/src/ansys/fluent/core/rpvars.py +++ b/src/ansys/fluent/core/rpvars.py @@ -15,9 +15,7 @@ class RPVars: Methods ------- - __call__( - var, val - ) + __call__(var, val) Set or get a specific rpvar or get the full rpvar state. """ diff --git a/src/ansys/fluent/core/scheduler/machine_list.py b/src/ansys/fluent/core/scheduler/machine_list.py index 4cca8987420f..07074e7b524f 100644 --- a/src/ansys/fluent/core/scheduler/machine_list.py +++ b/src/ansys/fluent/core/scheduler/machine_list.py @@ -1,17 +1,18 @@ """A module used to provide abstract machine objects for queue system interfaces. -This module provides two objects that help with interfacing python -scripts with -the job scheduler environments: +This module provides two objects that help with interfacing Python +scripts with job scheduler environments: Machine +------- This is used to represent a single machine allocated by the queue system and query details about it. MachineList -This is used to load and query a queue system machine file. Instances -of this object hold a collection of Machine objects that are initialized +----------- +This is used to load and query a queue system machine file. Instances +of this object hold a collection of ``Machine`` objects that are initialized when the machine file is loaded. """ diff --git a/src/ansys/fluent/core/services/datamodel_se.py b/src/ansys/fluent/core/services/datamodel_se.py index b4ec8cbae69b..0a405c5d5937 100644 --- a/src/ansys/fluent/core/services/datamodel_se.py +++ b/src/ansys/fluent/core/services/datamodel_se.py @@ -1,7 +1,7 @@ """Wrappers over StateEngine based datamodel gRPC service of Fluent.""" from enum import Enum import itertools -from typing import Any, Callable, Dict, Iterator, List, Tuple +from typing import Any, Callable, Dict, Iterator, List, Tuple, Type import warnings import grpc @@ -1119,7 +1119,7 @@ def __del__(self): def __getattr__(self, attr): for arg in self.static_info.commands[self.command].commandinfo.args: if arg.name == attr: - mode = AccessorModes.get_mode(arg.type) + mode = DataModelType.get_mode(arg.type) py_class = mode.value[1] return py_class(self, attr, self.service, self.rules, self.path, arg) @@ -1220,13 +1220,13 @@ def __init__( def __getattr__(self, attr): arg = self.parent_arg.info.parameters[attr] - mode = AccessorModes.get_mode(arg.type) + mode = DataModelType.get_mode(arg.type) py_class = mode.value[1] return py_class(self, attr, self.service, self.rules, self.path, arg) -class AccessorModes(Enum): - """Provides the standard Fluent launch modes.""" +class DataModelType(Enum): + """An enumeration over datamodel types.""" # Tuple: Name, Solver object type, Meshing flag, Launcher options TEXT = (["String", "ListString", "String List"], PyTextualCommandArgumentsSubItem) @@ -1242,9 +1242,9 @@ class AccessorModes(Enum): MODELOBJECT = (["ModelObject"], PySingletonCommandArgumentsSubItem) @staticmethod - def get_mode(mode: str) -> "AccessorModes": - """Returns the LaunchMode based on the mode in string format.""" - for m in AccessorModes: + def get_mode(mode: str) -> Type[PyCommandArgumentsSubItem]: + """Returns the datamodel type.""" + for m in DataModelType: if mode in m.value[0]: return m else: diff --git a/src/ansys/fluent/core/session_meshing.py b/src/ansys/fluent/core/session_meshing.py index b7e915200399..2a1709a489b8 100644 --- a/src/ansys/fluent/core/session_meshing.py +++ b/src/ansys/fluent/core/session_meshing.py @@ -8,11 +8,11 @@ class Meshing(PureMeshing): - """Encapsulates a Fluent - Meshing session connection. - Meshing(PureMeshing) holds the top-level objects - for meshing TUI and various meshing datamodel API calls. - In this general meshing mode, switch to solver is available, - after which""" + """Encapsulates a Fluent meshing session. A ``tui`` object + for meshing TUI commanding, and ``meshing`` and ``workflow`` + objects for access to task-based meshing workflows are all + exposed here. A ``switch_to_solver`` method is available + in this mode.""" def __init__( self, diff --git a/src/ansys/fluent/core/session_pure_meshing.py b/src/ansys/fluent/core/session_pure_meshing.py index b6b8b7bbee70..f3972ba70a61 100644 --- a/src/ansys/fluent/core/session_pure_meshing.py +++ b/src/ansys/fluent/core/session_pure_meshing.py @@ -11,12 +11,11 @@ class PureMeshing(_BaseSession): - """Encapsulates a Fluent - Pure Meshing session connection. - PureMeshing(_BaseSession) holds the top-level objects - for meshing TUI and various meshing datamodel API calls. - In pure-meshing mode, switch to solver is not available. - Public attributes of this class or extracted from the _BaseMeshing - class""" + """Encapsulates a Fluent meshing session. A ``tui`` object + for meshing TUI commanding, and ``meshing`` and ``workflow`` + objects for access to task-based meshing workflows are all + exposed here. No ``switch_to_solver`` method is available + in this mode.""" def __init__(self, fluent_connection: _FluentConnection): super(PureMeshing, self).__init__(fluent_connection=fluent_connection) diff --git a/src/ansys/fluent/core/session_solver.py b/src/ansys/fluent/core/session_solver.py index 9e9ecb193620..9095a245a79c 100644 --- a/src/ansys/fluent/core/session_solver.py +++ b/src/ansys/fluent/core/session_solver.py @@ -22,9 +22,8 @@ class Solver(_BaseSession): - """Encapsulates a Fluent - Solver session connection. - Solver(Session) holds the top-level objects - for solver TUI and settings objects calls.""" + """Encapsulates a Fluent solver session. A ``tui`` object for solver TUI + commanding, and solver settings objects are all exposed here.""" def __init__( self, diff --git a/tests/test_icing_session.py b/tests/test_icing_session.py index d17a3e74f605..1540e00249b7 100644 --- a/tests/test_icing_session.py +++ b/tests/test_icing_session.py @@ -6,5 +6,5 @@ @pytest.mark.dev @pytest.mark.fluent_231 def test_icing_session(with_launching_container): - icing_session = pyfluent.launch_fluent(mode=pyfluent.LaunchModes.SOLVER_ICING) + icing_session = pyfluent.launch_fluent(mode=pyfluent.LaunchMode.SOLVER_ICING) assert "icing" in dir(icing_session)