Apply general settings#

PyFluent supports using both Solver TUI commands and Solver settings objects to apply general settings.

The examples on this page show how you use Solver TUI commands to run solver meshing commands and set up units.

Check mesh#

This example shows a comparison between the TUI command and the Python code for performing mesh consistency checks and displaying a report in the console. The report lists domain extents, volume statistics, face area statistics, any warnings, and information about failures. The level of information shown depends on the setting specified for the verbosity (level 0 to 3).

TUI command

/mesh/check
/mesh/check-verbosity 1

Python code

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.mesh.check()

Report mesh quality#

This example shows a comparison between the TUI command and the Python code for displaying information about the quality of the mesh in the console, including the minimum orthogonal quality and maximum aspect ratio.

TUI command

/mesh/quality

Python code

solver.tui.mesh.quality()

Scale mesh#

This example shows a comparison between the TUI command and the Python code for scaling the mesh in each of the active Cartesian coordinate directions.

TUI command

/mesh/scale 1 1 1

Python code

solver.tui.mesh.scale(1,1,1)

Define units#

This example shows a comparison between the TUI command and the Python code for setting the unit conversion factors.

TUI command

/define/units length 'in'

Python code

solver.tui.define.units("length", "in")