***********
Model guide
***********

.. toctree::
   :maxdepth: 1

    Model setup <setup>
    Geometry <geometry>
    Mesh <mesh>
    Regions <regions>
    Fluid <fluid>
    Solids <solids>
    Scalars <scalars>
    Initial conditions <ic>
    Boundary conditions <bc>
    Point sources <point_sources>
    Monitors <monitor>
    Internal surfaces <internal_surfaces>
    Keyframes <keyframes>
    Chemistry <reactions/index>

There are two workflows available to setup and run simulations:

1) The standard workflow lets users set up the entire simulation parameters
   (including the mesh parameters) before running the simulation. The mesh
   is generated at run time and therefore cannot be inspected before the simulation
   starts. This is the default workflow (available since the first GUI release in MFiX 17.1).
   This can sometimes lead to the utilization of a poor mesh and loss of productivity.

   The entire standard workflow is performed in the Modeler tab, which contains the following panes
   (panes are ordered in a logical progression):

- Modeler Tab

   -  :doc:`/model_setup/setup` defines the overall solver type (Single-phase, TFM, DEM).

   -  :doc:`/model_setup/geometry` defines the overall physical space for the model.

   -  :doc:`/model_setup/regions` defines geometrical surfaces and volumes within the
      overall domain that are used in specifying boundary conditions, initial conditions,
      point sources, internal surfaces, outputs and monitors.

   -  :doc:`/model_setup/mesh` defines the spatial discretization.

   -  :doc:`/model_setup/fluid` defines fluid model options and physical properties.

   -  :doc:`/model_setup/solids` defines solids model options and physical properties.

   -  :doc:`/model_setup/scalars` defines scalar arrays different phases in the model.

   -  :doc:`/model_setup/ic` defines the model initial conditions.

   -  :doc:`/model_setup/bc` defines the model boundary conditions.

   -  :doc:`/model_setup/point_sources` defines point sources for the model.

   -  :doc:`/model_setup/internal_surfaces` defines internal surfaces for the model.

   -  :doc:`/model_setup/keyframes` defines keyframe data for the model.

   -  :doc:`/model_setup/reactions/index`  defines chemical reactions for the model.


2) The SMS (Segregated Mesh/Solver) workflow allows to generate and inspect the mesh before
   other model settings are specified. This can help identify poor meshes before run time.
   The mesh is saved into a .msh file and it will be read at run time by the solver. Other
   output files ([RUN_NAME]_boundary.vtk, [RUN_NAME]_MESH.vtu, MESH_STATS.txt) are generated
   to visualize the mesh and gather mesh statistics.
   The SMS workflow is currently (20.1 release) available as a beta feature and can be
   activated in the Settings menu.

   Please see :doc:`/tutorials/tutorial_cyclone_sms` for
   a tutorial showing how to use the SMS workflow.


- Mesher Tab

   The mesh generation is performed in the Mesher tab, which contains the following panes
   (panes are ordered in a logical progression):


   -  :doc:`/model_setup/geometry` defines the overall physical space for the model.

   -  :doc:`/model_setup/regions` defines regions that are used in boundary conditions.

   -  :doc:`/model_setup/mesh` defines the spatial discretization. The mesh is generated by
      clicking the ``Generate`` button. After inspection, a valid mesh must be accepted
      by clicking on the ``Accept`` button. This will unlock the Modeler tab.


- Modeler Tab


   -  :doc:`/model_setup/setup` defines the overall solver type (Single-phase, TFM, DEM).

   -  :doc:`/model_setup/regions` defines geometrical surfaces and volumes within the
      overall domain that are used in specifying initial conditions,
      point sources, internal surfaces, outputs and monitors.

   -  :doc:`/model_setup/fluid` defines fluid model options and physical properties.

   -  :doc:`/model_setup/solids` defines solids model options and physical properties.

   -  :doc:`/model_setup/scalars` defines scalar arrays different phases in the model.

   -  :doc:`/model_setup/ic` defines the model initial conditions.

   -  :doc:`/model_setup/bc` defines the model boundary conditions.

   -  :doc:`/model_setup/point_sources` defines point sources for the model.

   -  :doc:`/model_setup/internal_surfaces` defines internal surfaces for the model.

   -  :doc:`/model_setup/keyframes` defines keyframe data for the model.

   -  :doc:`/model_setup/reactions/index`  defines chemical reactions for the model.



.. note::
    Selections on panes may enable or disable widgets based on what input
    parameters are required or available.