Specify solver settings#
The examples on this page show how to use Solver TUI commands to specify solver settings.
Set steady or transient solution model#
This example shows a comparison between the TUI commands and the Python code for enabling and disabling the steady and unsteady (transient) solution model.
/define/models/steady yes /define/models/unsteady_1st_order yes
import ansys.fluent.core as pyfluent solver = pyfluent.launch_fluent(precision="double", processor_count=2, mode="solver") solver.tui.file.read_case("file.cas.h5") solver.tui.define.models.steady("yes") solver.tui.define.models.unsteady_1st_order("yes")
Set a pressure-based or density-based solver#
This example shows a comparison between the TUI commands and the Python code for enabling and disabling the pressure-based and density-based solver models.
/define/models/solver/density-based-explicit yes /define/models/solver/density-based-implicit yes /define/models/solver/pressure-based yes
solver.tui.define.models.solver.density_based_explicit("yes") solver.tui.define.models.solver.density_based_implicit("yes") solver.tui.define.models.solver.pressure_based("yes")
Set gravitational acceleration#
This example shows a comparison between the TUI command and the Python code for setting the gravitational acceleration.
/define/operating-conditions/gravity yes 0 -9.81 0