Skip to content

fix: Prevent launching sero session in 2d Fluent mode. - #5692

Draft
prmukherj wants to merge 2 commits into
mainfrom
fix/2d_aero_session_launch
Draft

prmukherj wants to merge 2 commits into
mainfrom
fix/2d_aero_session_launch

Conversation

@prmukherj

Copy link
Copy Markdown
Collaborator

Context

Launching aero session from PyFluent using 2 dimensional argument is causing Fluent to hang and thus does not return the process. It is because the Fluent does not support 2d aero and the cortex process just hangs.

Can be verified using:

fluent.exe 2ddp -flaero_server -license=enterprise

Change Summary

Since this is the expected behavior, we can check from PyFluent and not allow users to pass that erroneous combination.

>>> import ansys.fluent.core as pyfluent
>>> solver_aero_2d = pyfluent.SolverAero.from_install(dimension=2)  # should not be allowed
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\PyFluent_Dev\pyfluent\src\ansys\fluent\core\execution\session\session.py", line 682, in from_install
    launcher = StandaloneLauncher(
               ^^^^^^^^^^^^^^^^^^^
  File "D:\PyFluent_Dev\pyfluent\src\ansys\fluent\core\execution\launcher\standalone_launcher.py", line 230, in __init__
    self.argvals, self.new_session = _get_argvals_and_session(kwargs)
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\PyFluent_Dev\pyfluent\src\ansys\fluent\core\execution\launcher\launch_options.py", line 414, in _get_argvals_and_session
    raise exceptions.AeroDimensionError(
ansys.fluent.core.execution.launcher.error_handler.AeroDimensionError: Fluent Aero supports only 3D simulations; 2D launches are not supported.
>>> solver_aero_3d = pyfluent.SolverAero.from_install(dimension=3)  # should launch successfully 
>>> solver_aero_3d
<ansys.fluent.core.solver.session.solver_aero.SolverAero object at 0x000002454987EBA0>

Impact

Users to get a clear error when the erroneous combination is passed by the users.

@github-actions github-actions Bot added documentation Documentation related (improving, adding, etc) bug Issue, problem or error in PyFluent labels Dec 1, 2026
@prmukherj prmukherj linked an issue Dec 1, 2026 that may be closed by this pull request
2 tasks done
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue, problem or error in PyFluent documentation Documentation related (improving, adding, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug located in SolverAero.from_install(dimension=2)

2 participants