Skip to content

feat: Support PRE_POST mode - #3853

Merged
hpohekar merged 21 commits into
mainfrom
feat/support_solver_pre_post
Mar 21, 2025
Merged

feat: Support PRE_POST mode#3853
hpohekar merged 21 commits into
mainfrom
feat/support_solver_pre_post

Conversation

@hpohekar

@hpohekar hpohekar commented Mar 19, 2025

Copy link
Copy Markdown
Collaborator

closes #3852

Support new PRE_POST launch mode.

>>> pre_post = pyfluent.launch_fluent(ui_mode="gui", mode=pyfluent.FluentMode.PRE_POST) 
>>> from ansys.fluent.core import examples
>>> file_name = examples.download_file("mixing_elbow.cas.h5", "pyfluent/mixing_elbow")
>>> pre_post.settings.file.read_case(file_name=file_name)
Fast-loading "D:\ANSYSDev\vNNN\fluent\fluent25.2\\addons\afd\lib\hdfio.bin"
Done.
Multicore SMT processors detected. Processor affinity set!
>>> pre_post.settings.solution.initialization.hybrid_initialize()     
Hybrid initialization is done.
>>> pre_post.settings.solution.run_calculation.iterate(iter_count=10)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Repos\pyfluent\src\ansys\fluent\core\solver\flobject.py", line 1797, in __call__
    return self.execute_command(**kwds)
  File "D:\Repos\pyfluent\src\ansys\fluent\core\solver\flobject.py", line 1726, in execute_command
    kwds = _get_new_keywords(self, *args, **kwds)
  File "D:\Repos\pyfluent\src\ansys\fluent\core\solver\flobject.py", line 1610, in _get_new_keywords
    argument_aliases_scm = obj.get_attr("arguments-aliases") or {}
  File "D:\Repos\pyfluent\src\ansys\fluent\core\solver\flobject.py", line 393, in get_attr
    raise InactiveObjectError(self.python_path)
ansys.fluent.core.solver.flobject.InactiveObjectError: '<session>.settings.solution.run_calculation.iterate' is currently inactive.
>>> pre_post.exit()

@github-actions github-actions Bot added the new-feature Request or proposal for a new feature label Mar 19, 2025
Comment thread src/ansys/fluent/core/launcher/pyfluent_enums.py Outdated
@github-actions github-actions Bot added the documentation Documentation related (improving, adding, etc) label Mar 19, 2025
@hpohekar hpohekar changed the title feat: Support SOLVER_PRE_POST mode feat: Support MESHING_PRE_POST and SOLVER_PRE_POST mode Mar 20, 2025
Comment thread doc/source/user_guide/session/launching_ansys_fluent.rst Outdated
Comment thread src/ansys/fluent/core/launcher/process_launch_string.py
@hpohekar hpohekar changed the title feat: Support MESHING_PRE_POST and SOLVER_PRE_POST mode feat: Support PRE_POST mode Mar 20, 2025
Comment thread tests/test_pre_post_session.py
Comment thread src/ansys/fluent/core/launcher/pyfluent_enums.py
@hpohekar
hpohekar enabled auto-merge (squash) March 21, 2025 12:05
@hpohekar
hpohekar merged commit 5e55f32 into main Mar 21, 2025
@hpohekar
hpohekar deleted the feat/support_solver_pre_post branch March 21, 2025 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Documentation related (improving, adding, etc) new-feature Request or proposal for a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New PrePost Launch mode

5 participants