Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 666: Improve User Guide for TUI Commands and Python Equivalents #668

Merged
merged 6 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
48 changes: 41 additions & 7 deletions doc/source/user_guide/boundary_conditions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ and modify cell zone conditions using :ref:`ref_solver_tui_commands`.

Defining boundary conditions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``define.boundary_counditions.set.velocity_inlet`` TUI command defines velocity
boundary conditions at inlets.
The following example shows a comparison between the TUI command and the
python code for defining velocity boundary conditions at inlets.
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: scheme

/define/boundary-counditions/set/velocity-inlet

Python code
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

Expand Down Expand Up @@ -61,25 +69,51 @@ boundary conditions at inlets.

Copying boundary conditions
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``define.boundary_conditions.copy_bc`` TUI command copies boundary conditions
to other zones.
The following example shows a comparison between the TUI command and the
python code for copying boundary conditions to other zones.
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: scheme

/define/boundary-conditions/copy-bc

Python command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

session.solver.tui.define.boundary_conditions.copy_bc('cold-inlet','hot-inlet','()')

Listing zones
~~~~~~~~~~~~~
The ``define.boundary_conditions.list_zones`` TUI command prints in the Fluent console
the types and IDs of all zones.
The following example shows a comparison between the TUI command and the
python code for printing the types and IDs of all zones in the Fluent
console.
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: scheme

/define/boundary-conditions/list-zones

Python command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

session.solver.tui.define.boundary_conditions.list_zones()

Modifying cell zone conditions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``define.boundary_conditions.fluid`` TUI command modifies cell zone conditions.
The following example shows a comparison between the TUI command and the
python code for modifying cell zone conditions.
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: scheme

/define/boundary-conditions/fluid
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

Python command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

Expand Down
49 changes: 41 additions & 8 deletions doc/source/user_guide/general_settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,19 @@ and set up units using :ref:`ref_solver_tui_commands`.

Checking the mesh
-----------------
The ``mesh.check`` TUI performs various mesh consistency checks and displays a
The following example shows a comparison between the TUI command and the
python code for performing various mesh consistency checks and displays a
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved
report in the console that lists domain extents, volume statistics,
face area statistics, any warnings, and information about various check and mesh
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved
failures. THe level of information shown depends on the setting specified for
``mesh.check-verbosity``.
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved
failures.

TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: scheme

/mesh/check

Python command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

Expand All @@ -23,27 +31,52 @@ failures. THe level of information shown depends on the setting specified for

Reporting mesh quality
----------------------
The ``mesh.quality`` TUI displays information about the quality of the mesh in the
The following example shows a comparison between the TUI command and the
python code for displaying information about the quality of the mesh in the
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved
console, including the minimum orthogonal quality and maximum aspect ratio.
The level of information that is shown depends on the setting specified for
``mesh.check-verbosity``.

TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: scheme

/mesh/quality

Python command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

session.solver.tui.mesh.quality()

Scaling mesh
------------
The ``mesh.scale`` TUI prompts for the scaling factors in each of the active Cartesian
The following example shows a comparison between the TUI command and the
python code for the scaling factors in each of the active Cartesian
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved
coordinate directions.

TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: scheme

/mesh/scale 1 1 1

Python command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

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

Defining units
--------------
The ``define.units`` TUI sets unit conversion factors.
The following example shows a comparison between the TUI command and the
python code for the setting unit conversion factors.
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: scheme

/define/units length 'in'

Python command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

Expand Down
12 changes: 9 additions & 3 deletions doc/source/user_guide/materials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ PyFluent supports defining materials using :ref:`ref_solver_tui_commands` and

Using solver TUI commands
-------------------------
This example shows how you define materials using
:ref:`ref_solver_tui_commands`.
The following example shows a comparison between the TUI command and the
python code for defining materials.
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: scheme

/define/materials

The ``define.materials`` TUI enters the materials menu.
Python command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

Expand Down
51 changes: 44 additions & 7 deletions doc/source/user_guide/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@ The following examples show how you define models using :ref:`ref_solver_tui_com

Enabling the energy model
~~~~~~~~~~~~~~~~~~~~~~~~~
The ``define.models.energy`` TUI enables and disables the energy model.
The following example shows a comparison between the TUI command and the
python code for enabling and disabling the energy model.
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: scheme

/define/models/energy yes no no no yes

Python command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

Expand All @@ -19,12 +28,18 @@ The ``define.models.energy`` TUI enables and disables the energy model.

Enabling the viscous model
~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``define.models.viscous.laminar`` TUI enables and disables the laminar flow model.
The following example shows a comparison between the TUI command and the
python code for enabling and disabling the various viscous models.
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

The ``define.models.viscous.kw_sst`` TUI enables and disables the SST-kw turbulence model.
TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

The ``define.models.viscous.ke_standard`` TUI enables and disables the standard-ke
turbulence model.
.. code:: scheme

/define/models/viscous/laminar yes
/define/models/viscous/kw-sst yes
/define/models/viscous/ke-standard yes

Python command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

Expand All @@ -34,7 +49,17 @@ turbulence model.

Enabling the radiation model
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``define.models.radiation`` TUI provides options for selecting different radiation models.
The following example shows a comparison between the TUI command and the
python code for selecting different radiation models.
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: scheme

/define/models/radiation/s2s yes
/define/models/radiation/p1 yes

Python command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

Expand All @@ -43,7 +68,19 @@ The ``define.models.radiation`` TUI provides options for selecting different rad

Enabling the multiphase model
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``define.models.multiphase`` TUI provides options for selecting different multiphase models.
The following example shows a comparison between the TUI command and the
python code for selecting different multiphase models.
PipKat marked this conversation as resolved.
Show resolved Hide resolved

TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: scheme

/define/models/multiphase/model vof
/define/models/multiphase/model eulerian
/define/models/multiphase/model mixture
/define/models/multiphase/model wetsteam

Python command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

Expand Down
52 changes: 42 additions & 10 deletions doc/source/user_guide/solution.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,20 @@ using :ref:`ref_solver_tui_commands`.

Selecting solution methods
~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``solve.set.p_v_coupling`` TUI command selects which pressure-velocity coupling scheme to use.
Five schemes (Index-Model) are available: 20-SIMPLE, 21-SIMPLEC, 22-PISO, 24-Coupled,
and 25-Fractional Step.
The following example shows a comparison between the TUI command and the
python code for selecting the pressure velocity coupling scheme and setting
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved
the gradient options. Five schemes (Index-Model) are available:
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved
20-SIMPLE, 21-SIMPLEC, 22-PISO, 24-Coupled, and 25-Fractional Step.

The ``solve.set/gradient_scheme`` TUI sets the gradient options.
TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: scheme

/solve/set/p-v-coupling 24
/solve/set/gradient-scheme yes
/solve/set/gradient-scheme no yes

Python command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

Expand All @@ -28,15 +37,33 @@ The ``solve.set/gradient_scheme`` TUI sets the gradient options.

Selecting solution controls
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``solve.set.p_v_controls`` TUI sets pressure-velocity controls.
The following example shows a comparison between the TUI command and the
python code for selecting the pressure velocity controls.
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: scheme

/solve/set/p-v-controls 0.3 0.4
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

Python command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

session.solver.tui.solve.set.p_v_controls(0.3,0.4) # Momentum and Pressure

Creating report definitions
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ``solve.report_definitions`` TUI enters the report definitions menu.
The following example shows a comparison between the TUI command and the
python code for report definitions.
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: scheme

/solve/report-definitions

Python command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

Expand All @@ -53,12 +80,17 @@ The ``solve.report_definitions`` TUI enters the report definitions menu.

Initializing and solving
~~~~~~~~~~~~~~~~~~~~~~~~
The ``solve.initialize`` TUI enters the flow initialization menu.
The following example shows a comparison between the TUI command and the
python code for initialization and performing a specified number of iterations.
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

TUI command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: scheme

The ``solve.initialize.hyb_initialization`` TUI initializes using the hybrid
initialization method.
/solve/initialize/hyb-initialization
/solve/iterate 100

The ``solve.iterate`` TUI performs a specified number of iterations.
Python command
ypatel-qa marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

Expand Down
Loading