Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/4629.maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update launcher tests for better coverage
39 changes: 39 additions & 0 deletions doc/source/user_guide/session/launching_ansys_fluent.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,45 @@ Use this method when:
solver.exit()
solver_connected.exit()

.. note::

PyFluent provides both Meshing and PureMeshing session types.
When connecting to an existing Fluent process using
:meth:`from_connection() <ansys.fluent.core.session_utilities.SessionBase.from_connection>`,
the client API does not distinguish automatically between these session variants.
For this reason, it is helpful for users to connect using the interface that best matches the
capabilities of the session they launched.

Valid one-to-one connection patterns include:

.. code-block::

Meshing.from_install() → Meshing.from_connection()
PureMeshing.from_install() → PureMeshing.from_connection()


Cross-connections are also possible, with a few important considerations:

.. code-block::

Meshing.from_install() → PureMeshing.from_connection()


This is supported because a PureMeshing interface aligns with a subset of Meshing capabilities.

.. code-block::

PureMeshing.from_install() → Meshing.from_connection()


This pattern is not recommended. A PureMeshing session does not provide certain features
expected by the Meshing interface (such as solver mode switching), which may lead to
inconsistent behavior.

The PureMeshing interface remains available because it is valuable in modular and
containerized workflows where meshing and solving are intentionally isolated into separate
processes or lightweight environments. This separation supports clean, scalable, and
resource-efficient deployment patterns.

Launch in `PIM <https://pypim.docs.pyansys.com/version/stable/>`_ mode
----------------------------------------------------------------------
Expand Down
30 changes: 30 additions & 0 deletions tests/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,36 @@ def test_new_launch_fluent_api():
solver.exit()
solver_connected.exit()

solver_aero = pyfluent.SolverAero.from_install()
assert solver_aero.is_server_healthy()

ip = solver_aero.connection_properties.ip
port = solver_aero.connection_properties.port
password = solver_aero.connection_properties.password

solver_aero_connected = pyfluent.SolverAero.from_connection(
ip=ip, port=port, password=password
)
assert solver_aero_connected.is_server_healthy()

solver_aero.exit()
solver_aero_connected.exit()

meshing = pyfluent.Meshing.from_install()
assert meshing.is_server_healthy()

ip = meshing.connection_properties.ip
port = meshing.connection_properties.port
password = meshing.connection_properties.password

meshing_connected = pyfluent.Meshing.from_connection(
ip=ip, port=port, password=password
)
assert meshing_connected.is_server_healthy()

meshing.exit()
meshing_connected.exit()


def test_new_launch_fluent_api_from_container():
import ansys.fluent.core as pyfluent
Expand Down
Loading