Loading docs/source_docs/user_guide/inputs/advanced.rst +3 −3 Changes for docs/source_docs/user_guide/inputs/advanced.rst: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -18,6 +18,9 @@ The following inputs must be preceded by the prefix ``mfix``: | only_print_grid_report | Do not time-march the simulation. Simply generate the grid report | Bool | false | | | and exit. | | | +------------------------+-----------------------------------------------------------------------+-------------+--------------+ | stop_for_unused_inputs | Do not time-march the simulation if any keyword in the inputs file | Bool | false | | | has not been used. This is useful in catching input errors. | | | +------------------------+-----------------------------------------------------------------------+-------------+--------------+ To assist in verifying the breakdown of fluid grids created before running a full simulation, an input option ``mfix.only_print_grid_report`` is supported. By default, it is ``false``. When set to ``true``, the run uses Loading Loading @@ -93,9 +96,6 @@ The following inputs must be preceded by the prefix ``mfix`` and control load ba +----------------------------------+-----------------------------------------------------------------------+-------------+-------------------+ | knapsack_nmax | Maximum number of grids per MPI process if using knapsack algorithm | Int | 128 | +----------------------------------+-----------------------------------------------------------------------+-------------+-------------------+ | grid_pruning | Remove all covered grids from the base mesh; this may result in | Bool | false | | | disjoined grids | | | +----------------------------------+-----------------------------------------------------------------------+-------------+-------------------+ The following inputs are defined using the prefix ``particles``: Loading docs/source_docs/user_guide/inputs/domain.rst +61 −0 Changes for docs/source_docs/user_guide/inputs/domain.rst: 61 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -29,3 +29,64 @@ The following inputs are defined using the prefix ``geometry``: * There is **no support** for 1D or 2D simulation domains. * Cartesian is the **only supported** coordinate system. Mesh ---- The following inputs are defined using the prefix ``amr``: .. _InputsTable_mesh: +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | | Description | Type | Default | | | | | | +======================+=======================================================================+=============+===========+ | n_cell | Number of cells at level 0 in each coordinate direction. | Ints<3> | 0 0 0 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ The base mesh spacing is computed for each direction by dividing the :ref:`domain length<InputsTable_domain>` by the number of cells. The mesh spacing is required to be the same in all directions: .. math:: \frac{\text{prob_hi[0] - prob_lo[0]}}{\text{n_cell[0]}} = \frac{\text{prob_hi[1] - prob_lo[1]}}{\text{n_cell[1]}} = \frac{\text{prob_hi[2] - prob_lo[2]}}{\text{n_cell[2]}} The inputs for defining the mesh for a single-level simulation are demonstrated in the :ref:`following example<inputs_mesh_ex>` and illustrated in :numref:`fig_basic_mesh_ex`. In this example, the domain is a :math:`4 \times 1 \times 1` cuboid, and there are :math:`32 \times 8 \times 8` cells in the *X*, *Y*, and *Z* directions, respectively. The result is a uniform mesh spacing of :math:`0.125` *m* in all three directions. .. _inputs_mesh_ex: .. code-block:: bash :caption: Snippet of intpus for mesh example. This is not a complete input file. # Define periodicity and domain extents # ------------------------------------------------------------- geometry.coord_sys = 0 # Cartesian coordinates geometry.is_periodic = 0 0 0 # periodicity for each direction geometry.prob_lo = 0. 0. 0 # lo corner of physical domain. geometry.prob_hi = 4. 1. 1. # hi corner of physical domain # Define the maximum level of refinement and number of cells # ------------------------------------------------------------- amr.n_cell = 32 8 8 .. _fig_basic_mesh_ex: .. figure:: ./images/geometry/mesh_lev0_ex.png :width: 100% :align: center :alt: domain used with box embedded boundary Example of a single-level mesh. .. warning:: MFIX-Exa simulations with a non-uniform mesh will not run. docs/source_docs/user_guide/inputs/fluid_model.rst +197 −100 File changed.Preview size limit exceeded, changes collapsed. Show changes docs/source_docs/user_guide/inputs/geometry.rst +36 −6 Changes for docs/source_docs/user_guide/inputs/geometry.rst: 36 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -19,9 +19,6 @@ The following inputs are defined using the prefix ``mfix``: | | * ``None`` - no embedded boundary -- all domain faces must be specified | | | | | | | | +------------------------+-------------------------------------------------------------------------------+----------+---------------------+ | levelset_refinement | Refinement factor of levelset resolution relative to level 0 | Int | 1 | | | resolution | | | +------------------------+-------------------------------------------------------------------------------+----------+---------------------+ Most simulations require a user to specify some kind of geometry. For example, the geometry could be a basic cylinder used to model flow inside a pipe, or it may be an irregularly shaped solid to study external flow around a bluff body, or the geometry Loading Loading @@ -289,7 +286,7 @@ The ``generic`` geometry option is used to select the user-programed embedded bo .. _InputsGeometry_CSG: Constructive solid geometry (CSG) CSG (Constructive solid geometry) --------------------------------- * A constructive solid geometry can be created using OpenSCAD. Loading Loading @@ -317,8 +314,8 @@ The following inputs are defined using the prefix ``csg``: .. _InputsGeometry_STL: STL (Standard Triangle Language) -------------------------------- STL (Stereolithography file) ---------------------------- * An STL geometry can be created using numerous CAD programs. Loading @@ -339,3 +336,36 @@ The following inputs are defined using the prefix ``stl``: .. note:: A full description of this feature is beyond the scope of this section. A future update to the documentation may include a tutorial to better demonstrate this feature. Checkpoint geometry ------------------- Read EB geometry data from a checkpoint file. The following inputs are defined using the prefix ``mfix``. +----------------------+-----------------------------------------------------------------------+-------------+--------------+ | | Description | Type | Default | +======================+=======================================================================+=============+==============+ | geom_chk_read | Flag to read the EB geometry data from the ``geom_chk_file`` | Bool | false | | | :ref:`checkpoint file<Chap:InputsCheckpoint>`. If levelset refinement | | | | | is enabled, levelset data is read from ``geom_levelset_chk_file``. | | | +----------------------+-----------------------------------------------------------------------+-------------+--------------+ Levelset refinement ------------------- For particle-wall interactions, the geometry is represented using a levelset function, and the grid storing this levelset can be refined to capture geometric details more accurately. This refinement affects only particle-wall interactions and does not alter the geometry representation used for solving the fluid equations. The following inputs are defined using the prefix ``mfix``: +------------------------+-------------------------------------------------------------------------------+----------+---------------------+ | | Description | Type | Default | +========================+===============================================================================+==========+=====================+ | levelset_refinement | Refinement factor of levelset resolution relative to level 0 | Int | 1 | | | resolution | | | +------------------------+-------------------------------------------------------------------------------+----------+---------------------+ docs/source_docs/user_guide/inputs/mesh_and_gridding.rst→docs/source_docs/user_guide/inputs/gridding.rst +70 −123 Changes for docs/source_docs/user_guide/inputs/gridding.rst: 70 added lines, 123 removed lines. Original line number Diff line number Diff line .. sec:InputsMeshAndGridding: Mesh, grids, and tiles ====================== Grids and tiles =============== Mesh ---- .. rubric:: Level-0 mesh Grids ----- The following inputs are defined using the prefix ``amr``: .. _InputsTable_mesh: +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | | Description | Type | Default | | | | | | +======================+=======================================================================+=============+===========+ | max_level | Maximum level of refinement. The default value, 0, means that there | Int | 0 | | | is one cell size covering the entire domain (i.e., single-level). | | | | max_grid_size_x | Maximum number of cells at level 0 in each grid in *X* | Ints | 32 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | n_cell | Number of cells at level 0 in each coordinate direction. | Ints<3> | 0 0 0 | | max_grid_size_y | Maximum number of cells at level 0 in each grid in *Y* | Ints | 32 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | max_grid_size_z | Maximum number of cells at level 0 in each grid in *Z* | Ints | 32 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | blocking_factor_x | Each grid in *X* must be divisible by ``blocking_factor_x`` | Ints | 8 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | blocking_factor_y | Each grid in *Y* must be divisible by ``blocking_factor_y`` | Ints | 8 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | blocking_factor_z | Each grid in *Z* must be divisible by ``blocking_factor_z`` | Ints | 8 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | refine_grid_layout | If true, AMReX will attempt to chop new grids into smaller chunks | Bool | true | | | ensuring at least one grid per MPI process, provided this does not | | | | | violate the blocking factor constraint. | | | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ The level 0 mesh spacing is computed for each direction by dividing the :ref:`domain length<InputsTable_domain>` by the number of cells. The mesh spacing is required to be the same in all directions: .. math:: Note, the default for ``max_grid_size`` is 64 for GPU runs. \frac{\text{prob\_hi[0] - prob\_lo[0]}}{\text{n\_cell[0]}} = \frac{\text{prob\_hi[1] - prob\_lo[1]}}{\text{n\_cell[1]}} = \frac{\text{prob\_hi[2] - prob\_lo[2]}}{\text{n\_cell[2]}} The domain is decomposed into grids by dividing the number of cells by the max grid size for each direction (e.g., ``n_cells[0]/max_grid_size_x``). The blocking factor ensures that the grids will be sufficiently coarsenable for good multigrid performance; therefore, the ``max_grid_size`` must be divisible by the corresponding ``blocking_factor``. .. note:: The inputs for defining the mesh for a single-level simulation are demonstrated in the :ref:`following example<inputs_mesh_ex>` and illustrated in :numref:`fig_basic_mesh_ex`. In this example, the domain is a :math:`4 \times 1 \times 1` cuboid, and there are :math:`32 \times 8 \times 8` cells in the *X*, *Y*, and *Z* directions, respectively. The result is a uniform mesh spacing of :math:`0.125` *m* in all three directions. The `AMReX documentation <https://amrex-codes.github.io/amrex/docs_html/index.html>`_ contains a significant amount of information on grid creation and load balancing. Users are strongly encouraged to read the relevant sections. .. _inputs_mesh_ex: .. code-block:: bash :caption: Snippet of intpus for mesh example. This is not a complete input file. ----- # Define periodicity and domain extents # ------------------------------------------------------------- geometry.coord_sys = 0 # Cartesian coordinates geometry.is_periodic = 0 0 0 # periodicity for each direction geometry.prob_lo = 0. 0. 0 # lo corner of physical domain. geometry.prob_hi = 4. 1. 1. # hi corner of physical domain # Define the maximum level of refinement and number of cells # ------------------------------------------------------------- arm.max_level = 0 arm.n_cell = 32 8 8 Tiles ----- The following inputs are defined using the prefix ``fabarray``: .. _fig_basic_mesh_ex: +----------------------+-----------------------------------------------------------------------+----------+-------------+ | | Description | Type | Default | +======================+=======================================================================+==========+=============+ | mfiter_tile_size | Maximum number of cells in each direction for (logical) tiles. | Ints<3> | 1024000 8 8 | +----------------------+-----------------------------------------------------------------------+----------+-------------+ .. figure:: ./images/geometry/mesh_lev0_ex.png :width: 100% :align: center :alt: domain used with box embedded boundary The following inputs are defined using the prefix ``particles``: Example of a single-level mesh. +----------------------+-----------------------------------------------------------------------+-------------+--------------+ | | Description | Type | Default | +======================+=======================================================================+=============+==============+ | tile_size | Maximum number of cells in each direction for (logical) tiles | Ints<3> | 1024000 8 8 | | | in the ParticleBoxArray if ``load_balance`` is ``DualGrid`` | | | +----------------------+-----------------------------------------------------------------------+-------------+--------------+ .. warning:: When running on shared memory machines using an OpenMP enabled executable, *grids* are subdivided into *tiles* and iterated over to improve data locality by cache blocking. MFIX-Exa simulations with a non-uniform mesh will not run. .. note:: MFIX-Exa disables tiling when using GPU accelerators. ----- .. sec:InputsMeshRefinement: .. rubric:: Mesh refinement Mesh refinement =============== The following inputs are defined using the prefix ``amr``. These inputs control the automatic Loading @@ -82,13 +86,17 @@ mesh refinement algorithm and are only applicable when ``amr.max_level > 0``. +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | | Description | Type | Default | +======================+=======================================================================+=============+===========+ | max_level | Maximum level of refinement. The default value, 0, means that there | Int | 0 | | | is one cell size covering the entire domain (i.e., single-level). | | | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | grid_eff | Threshold value to ensure grids do not contain too large a fraction | Real | 0.7 | | | of untagged cells. | | | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | n_error_buf | Controls the number of tagged cells before grids are defined. Used | Int | 1 | | n_error_buf | Controls the number of tagged cells before grids are defined. Used | Ints | 0 | | | to ensure coarse/fine boundaries are not too close to tagged cells. | | | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ .. caution:: **Mesh refinement limitations:** Loading @@ -98,6 +106,21 @@ mesh refinement algorithm and are only applicable when ``amr.max_level > 0``. See the `AMReX documentation <https://amrex-codes.github.io/amrex/docs_html/index.html>`_ for details on the adaptive mesh refinement algorithms. The following inputs are defined using the prefix ``mfix``. These inputs control the automatic mesh refinement algorithm and are only applicable when ``amr.max_level > 0``. +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | | Description | Type | Default | +======================+=======================================================================+=============+===========+ | regrid_int | How often to regrid (in number of steps at level 0). | Int | 0 | | | If regrid_int <= 0 then no regridding will occur. | | | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ Tagging for refinement ---------------------- The following inputs are defined using the prefix ``mfix.tag``. They control how cells are tagged for the mesh refinement algorithm and are only applicable when ``amr.max_level > 0``. Loading Loading @@ -155,79 +178,3 @@ Cells intersected by the embedded boundary are always tagged for refinement, reg | regions | A list of predefined regions used to identify sections of the domain | Strings | None | | | for mesh refinement. | | | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ ----- Grids ----- The following inputs are defined using the prefix ``amr``: +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | | Description | Type | Default | +======================+=======================================================================+=============+===========+ | blocking_factor_x | Each grid in *X* must be divisible by ``blocking_factor_x`` | Ints | 8 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | blocking_factor_y | Each grid in *Y* must be divisible by ``blocking_factor_y`` | Ints | 8 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | blocking_factor_z | Each grid in *Z* must be divisible by ``blocking_factor_z`` | Ints | 8 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | max_grid_size_x | Maximum number of cells at level 0 in each grid in *X* | Int | 32 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | max_grid_size_y | Maximum number of cells at level 0 in each grid in *Y* | Int | 32 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | max_grid_size_z | Maximum number of cells at level 0 in each grid in *Z* | Int | 32 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | refine_grid_layout | If true, AMReX will attempt to chop new grids into smaller chunks | Bool | true | | | ensuring at least one grid per MPI process, provided this does not | | | | | violate the blocking factor constraint. | | | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | regrid_int | How often to regrid (in number of steps at level 0). | Int | 0 | | | If regrid_int <= 0 then no regridding will occur. | | | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ Note, the default for ``max_grid_size`` is 64 for GPU runs. The domain is decomposed into grids by dividing the number of cells by the max grid size for each direction (e.g., ``n_cells[0]/max_grid_size_x``). The blocking factor ensures that the grids will be sufficiently coarsenable for good multigrid performance; therefore, the ``max_grid_size`` must be divisible by the corresponding ``blocking_factor``. .. note:: The `AMReX documentation <https://amrex-codes.github.io/amrex/docs_html/index.html>`_ contains a significant amount of information on grid creation and load balancing. Users are strongly encouraged to read the relevant sections. ----- Tiles ----- The following inputs are defined using the prefix ``fabarray``: +----------------------+-----------------------------------------------------------------------+----------+-------------+ | | Description | Type | Default | +======================+=======================================================================+==========+=============+ | mfiter_tile_size | Maximum number of cells in each direction for (logical) tiles. | Ints<3> | 1024000 8 8 | +----------------------+-----------------------------------------------------------------------+----------+-------------+ The following inputs are defined using the prefix ``particles``: +----------------------+-----------------------------------------------------------------------+-------------+--------------+ | | Description | Type | Default | +======================+=======================================================================+=============+==============+ | tile_size | Maximum number of cells in each direction for (logical) tiles | Ints<3> | 1024000 8 8 | | | in the ParticleBoxArray if ``load_balance`` is ``DualGrid`` | | | +----------------------+-----------------------------------------------------------------------+-------------+--------------+ When running on shared memory machines using an OpenMP enabled executable, *grids* are subdivided into *tiles* and iterated over to improve data locality by cache blocking. .. note:: MFIX-Exa disables tiling when using GPU accelerators. Loading
docs/source_docs/user_guide/inputs/advanced.rst +3 −3 Changes for docs/source_docs/user_guide/inputs/advanced.rst: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -18,6 +18,9 @@ The following inputs must be preceded by the prefix ``mfix``: | only_print_grid_report | Do not time-march the simulation. Simply generate the grid report | Bool | false | | | and exit. | | | +------------------------+-----------------------------------------------------------------------+-------------+--------------+ | stop_for_unused_inputs | Do not time-march the simulation if any keyword in the inputs file | Bool | false | | | has not been used. This is useful in catching input errors. | | | +------------------------+-----------------------------------------------------------------------+-------------+--------------+ To assist in verifying the breakdown of fluid grids created before running a full simulation, an input option ``mfix.only_print_grid_report`` is supported. By default, it is ``false``. When set to ``true``, the run uses Loading Loading @@ -93,9 +96,6 @@ The following inputs must be preceded by the prefix ``mfix`` and control load ba +----------------------------------+-----------------------------------------------------------------------+-------------+-------------------+ | knapsack_nmax | Maximum number of grids per MPI process if using knapsack algorithm | Int | 128 | +----------------------------------+-----------------------------------------------------------------------+-------------+-------------------+ | grid_pruning | Remove all covered grids from the base mesh; this may result in | Bool | false | | | disjoined grids | | | +----------------------------------+-----------------------------------------------------------------------+-------------+-------------------+ The following inputs are defined using the prefix ``particles``: Loading
docs/source_docs/user_guide/inputs/domain.rst +61 −0 Changes for docs/source_docs/user_guide/inputs/domain.rst: 61 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -29,3 +29,64 @@ The following inputs are defined using the prefix ``geometry``: * There is **no support** for 1D or 2D simulation domains. * Cartesian is the **only supported** coordinate system. Mesh ---- The following inputs are defined using the prefix ``amr``: .. _InputsTable_mesh: +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | | Description | Type | Default | | | | | | +======================+=======================================================================+=============+===========+ | n_cell | Number of cells at level 0 in each coordinate direction. | Ints<3> | 0 0 0 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ The base mesh spacing is computed for each direction by dividing the :ref:`domain length<InputsTable_domain>` by the number of cells. The mesh spacing is required to be the same in all directions: .. math:: \frac{\text{prob_hi[0] - prob_lo[0]}}{\text{n_cell[0]}} = \frac{\text{prob_hi[1] - prob_lo[1]}}{\text{n_cell[1]}} = \frac{\text{prob_hi[2] - prob_lo[2]}}{\text{n_cell[2]}} The inputs for defining the mesh for a single-level simulation are demonstrated in the :ref:`following example<inputs_mesh_ex>` and illustrated in :numref:`fig_basic_mesh_ex`. In this example, the domain is a :math:`4 \times 1 \times 1` cuboid, and there are :math:`32 \times 8 \times 8` cells in the *X*, *Y*, and *Z* directions, respectively. The result is a uniform mesh spacing of :math:`0.125` *m* in all three directions. .. _inputs_mesh_ex: .. code-block:: bash :caption: Snippet of intpus for mesh example. This is not a complete input file. # Define periodicity and domain extents # ------------------------------------------------------------- geometry.coord_sys = 0 # Cartesian coordinates geometry.is_periodic = 0 0 0 # periodicity for each direction geometry.prob_lo = 0. 0. 0 # lo corner of physical domain. geometry.prob_hi = 4. 1. 1. # hi corner of physical domain # Define the maximum level of refinement and number of cells # ------------------------------------------------------------- amr.n_cell = 32 8 8 .. _fig_basic_mesh_ex: .. figure:: ./images/geometry/mesh_lev0_ex.png :width: 100% :align: center :alt: domain used with box embedded boundary Example of a single-level mesh. .. warning:: MFIX-Exa simulations with a non-uniform mesh will not run.
docs/source_docs/user_guide/inputs/fluid_model.rst +197 −100 File changed.Preview size limit exceeded, changes collapsed. Show changes
docs/source_docs/user_guide/inputs/geometry.rst +36 −6 Changes for docs/source_docs/user_guide/inputs/geometry.rst: 36 added lines, 6 removed lines. Original line number Diff line number Diff line Loading @@ -19,9 +19,6 @@ The following inputs are defined using the prefix ``mfix``: | | * ``None`` - no embedded boundary -- all domain faces must be specified | | | | | | | | +------------------------+-------------------------------------------------------------------------------+----------+---------------------+ | levelset_refinement | Refinement factor of levelset resolution relative to level 0 | Int | 1 | | | resolution | | | +------------------------+-------------------------------------------------------------------------------+----------+---------------------+ Most simulations require a user to specify some kind of geometry. For example, the geometry could be a basic cylinder used to model flow inside a pipe, or it may be an irregularly shaped solid to study external flow around a bluff body, or the geometry Loading Loading @@ -289,7 +286,7 @@ The ``generic`` geometry option is used to select the user-programed embedded bo .. _InputsGeometry_CSG: Constructive solid geometry (CSG) CSG (Constructive solid geometry) --------------------------------- * A constructive solid geometry can be created using OpenSCAD. Loading Loading @@ -317,8 +314,8 @@ The following inputs are defined using the prefix ``csg``: .. _InputsGeometry_STL: STL (Standard Triangle Language) -------------------------------- STL (Stereolithography file) ---------------------------- * An STL geometry can be created using numerous CAD programs. Loading @@ -339,3 +336,36 @@ The following inputs are defined using the prefix ``stl``: .. note:: A full description of this feature is beyond the scope of this section. A future update to the documentation may include a tutorial to better demonstrate this feature. Checkpoint geometry ------------------- Read EB geometry data from a checkpoint file. The following inputs are defined using the prefix ``mfix``. +----------------------+-----------------------------------------------------------------------+-------------+--------------+ | | Description | Type | Default | +======================+=======================================================================+=============+==============+ | geom_chk_read | Flag to read the EB geometry data from the ``geom_chk_file`` | Bool | false | | | :ref:`checkpoint file<Chap:InputsCheckpoint>`. If levelset refinement | | | | | is enabled, levelset data is read from ``geom_levelset_chk_file``. | | | +----------------------+-----------------------------------------------------------------------+-------------+--------------+ Levelset refinement ------------------- For particle-wall interactions, the geometry is represented using a levelset function, and the grid storing this levelset can be refined to capture geometric details more accurately. This refinement affects only particle-wall interactions and does not alter the geometry representation used for solving the fluid equations. The following inputs are defined using the prefix ``mfix``: +------------------------+-------------------------------------------------------------------------------+----------+---------------------+ | | Description | Type | Default | +========================+===============================================================================+==========+=====================+ | levelset_refinement | Refinement factor of levelset resolution relative to level 0 | Int | 1 | | | resolution | | | +------------------------+-------------------------------------------------------------------------------+----------+---------------------+
docs/source_docs/user_guide/inputs/mesh_and_gridding.rst→docs/source_docs/user_guide/inputs/gridding.rst +70 −123 Changes for docs/source_docs/user_guide/inputs/gridding.rst: 70 added lines, 123 removed lines. Original line number Diff line number Diff line .. sec:InputsMeshAndGridding: Mesh, grids, and tiles ====================== Grids and tiles =============== Mesh ---- .. rubric:: Level-0 mesh Grids ----- The following inputs are defined using the prefix ``amr``: .. _InputsTable_mesh: +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | | Description | Type | Default | | | | | | +======================+=======================================================================+=============+===========+ | max_level | Maximum level of refinement. The default value, 0, means that there | Int | 0 | | | is one cell size covering the entire domain (i.e., single-level). | | | | max_grid_size_x | Maximum number of cells at level 0 in each grid in *X* | Ints | 32 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | n_cell | Number of cells at level 0 in each coordinate direction. | Ints<3> | 0 0 0 | | max_grid_size_y | Maximum number of cells at level 0 in each grid in *Y* | Ints | 32 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | max_grid_size_z | Maximum number of cells at level 0 in each grid in *Z* | Ints | 32 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | blocking_factor_x | Each grid in *X* must be divisible by ``blocking_factor_x`` | Ints | 8 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | blocking_factor_y | Each grid in *Y* must be divisible by ``blocking_factor_y`` | Ints | 8 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | blocking_factor_z | Each grid in *Z* must be divisible by ``blocking_factor_z`` | Ints | 8 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | refine_grid_layout | If true, AMReX will attempt to chop new grids into smaller chunks | Bool | true | | | ensuring at least one grid per MPI process, provided this does not | | | | | violate the blocking factor constraint. | | | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ The level 0 mesh spacing is computed for each direction by dividing the :ref:`domain length<InputsTable_domain>` by the number of cells. The mesh spacing is required to be the same in all directions: .. math:: Note, the default for ``max_grid_size`` is 64 for GPU runs. \frac{\text{prob\_hi[0] - prob\_lo[0]}}{\text{n\_cell[0]}} = \frac{\text{prob\_hi[1] - prob\_lo[1]}}{\text{n\_cell[1]}} = \frac{\text{prob\_hi[2] - prob\_lo[2]}}{\text{n\_cell[2]}} The domain is decomposed into grids by dividing the number of cells by the max grid size for each direction (e.g., ``n_cells[0]/max_grid_size_x``). The blocking factor ensures that the grids will be sufficiently coarsenable for good multigrid performance; therefore, the ``max_grid_size`` must be divisible by the corresponding ``blocking_factor``. .. note:: The inputs for defining the mesh for a single-level simulation are demonstrated in the :ref:`following example<inputs_mesh_ex>` and illustrated in :numref:`fig_basic_mesh_ex`. In this example, the domain is a :math:`4 \times 1 \times 1` cuboid, and there are :math:`32 \times 8 \times 8` cells in the *X*, *Y*, and *Z* directions, respectively. The result is a uniform mesh spacing of :math:`0.125` *m* in all three directions. The `AMReX documentation <https://amrex-codes.github.io/amrex/docs_html/index.html>`_ contains a significant amount of information on grid creation and load balancing. Users are strongly encouraged to read the relevant sections. .. _inputs_mesh_ex: .. code-block:: bash :caption: Snippet of intpus for mesh example. This is not a complete input file. ----- # Define periodicity and domain extents # ------------------------------------------------------------- geometry.coord_sys = 0 # Cartesian coordinates geometry.is_periodic = 0 0 0 # periodicity for each direction geometry.prob_lo = 0. 0. 0 # lo corner of physical domain. geometry.prob_hi = 4. 1. 1. # hi corner of physical domain # Define the maximum level of refinement and number of cells # ------------------------------------------------------------- arm.max_level = 0 arm.n_cell = 32 8 8 Tiles ----- The following inputs are defined using the prefix ``fabarray``: .. _fig_basic_mesh_ex: +----------------------+-----------------------------------------------------------------------+----------+-------------+ | | Description | Type | Default | +======================+=======================================================================+==========+=============+ | mfiter_tile_size | Maximum number of cells in each direction for (logical) tiles. | Ints<3> | 1024000 8 8 | +----------------------+-----------------------------------------------------------------------+----------+-------------+ .. figure:: ./images/geometry/mesh_lev0_ex.png :width: 100% :align: center :alt: domain used with box embedded boundary The following inputs are defined using the prefix ``particles``: Example of a single-level mesh. +----------------------+-----------------------------------------------------------------------+-------------+--------------+ | | Description | Type | Default | +======================+=======================================================================+=============+==============+ | tile_size | Maximum number of cells in each direction for (logical) tiles | Ints<3> | 1024000 8 8 | | | in the ParticleBoxArray if ``load_balance`` is ``DualGrid`` | | | +----------------------+-----------------------------------------------------------------------+-------------+--------------+ .. warning:: When running on shared memory machines using an OpenMP enabled executable, *grids* are subdivided into *tiles* and iterated over to improve data locality by cache blocking. MFIX-Exa simulations with a non-uniform mesh will not run. .. note:: MFIX-Exa disables tiling when using GPU accelerators. ----- .. sec:InputsMeshRefinement: .. rubric:: Mesh refinement Mesh refinement =============== The following inputs are defined using the prefix ``amr``. These inputs control the automatic Loading @@ -82,13 +86,17 @@ mesh refinement algorithm and are only applicable when ``amr.max_level > 0``. +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | | Description | Type | Default | +======================+=======================================================================+=============+===========+ | max_level | Maximum level of refinement. The default value, 0, means that there | Int | 0 | | | is one cell size covering the entire domain (i.e., single-level). | | | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | grid_eff | Threshold value to ensure grids do not contain too large a fraction | Real | 0.7 | | | of untagged cells. | | | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | n_error_buf | Controls the number of tagged cells before grids are defined. Used | Int | 1 | | n_error_buf | Controls the number of tagged cells before grids are defined. Used | Ints | 0 | | | to ensure coarse/fine boundaries are not too close to tagged cells. | | | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ .. caution:: **Mesh refinement limitations:** Loading @@ -98,6 +106,21 @@ mesh refinement algorithm and are only applicable when ``amr.max_level > 0``. See the `AMReX documentation <https://amrex-codes.github.io/amrex/docs_html/index.html>`_ for details on the adaptive mesh refinement algorithms. The following inputs are defined using the prefix ``mfix``. These inputs control the automatic mesh refinement algorithm and are only applicable when ``amr.max_level > 0``. +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | | Description | Type | Default | +======================+=======================================================================+=============+===========+ | regrid_int | How often to regrid (in number of steps at level 0). | Int | 0 | | | If regrid_int <= 0 then no regridding will occur. | | | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ Tagging for refinement ---------------------- The following inputs are defined using the prefix ``mfix.tag``. They control how cells are tagged for the mesh refinement algorithm and are only applicable when ``amr.max_level > 0``. Loading Loading @@ -155,79 +178,3 @@ Cells intersected by the embedded boundary are always tagged for refinement, reg | regions | A list of predefined regions used to identify sections of the domain | Strings | None | | | for mesh refinement. | | | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ ----- Grids ----- The following inputs are defined using the prefix ``amr``: +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | | Description | Type | Default | +======================+=======================================================================+=============+===========+ | blocking_factor_x | Each grid in *X* must be divisible by ``blocking_factor_x`` | Ints | 8 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | blocking_factor_y | Each grid in *Y* must be divisible by ``blocking_factor_y`` | Ints | 8 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | blocking_factor_z | Each grid in *Z* must be divisible by ``blocking_factor_z`` | Ints | 8 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | max_grid_size_x | Maximum number of cells at level 0 in each grid in *X* | Int | 32 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | max_grid_size_y | Maximum number of cells at level 0 in each grid in *Y* | Int | 32 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | max_grid_size_z | Maximum number of cells at level 0 in each grid in *Z* | Int | 32 | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | refine_grid_layout | If true, AMReX will attempt to chop new grids into smaller chunks | Bool | true | | | ensuring at least one grid per MPI process, provided this does not | | | | | violate the blocking factor constraint. | | | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ | regrid_int | How often to regrid (in number of steps at level 0). | Int | 0 | | | If regrid_int <= 0 then no regridding will occur. | | | +----------------------+-----------------------------------------------------------------------+-------------+-----------+ Note, the default for ``max_grid_size`` is 64 for GPU runs. The domain is decomposed into grids by dividing the number of cells by the max grid size for each direction (e.g., ``n_cells[0]/max_grid_size_x``). The blocking factor ensures that the grids will be sufficiently coarsenable for good multigrid performance; therefore, the ``max_grid_size`` must be divisible by the corresponding ``blocking_factor``. .. note:: The `AMReX documentation <https://amrex-codes.github.io/amrex/docs_html/index.html>`_ contains a significant amount of information on grid creation and load balancing. Users are strongly encouraged to read the relevant sections. ----- Tiles ----- The following inputs are defined using the prefix ``fabarray``: +----------------------+-----------------------------------------------------------------------+----------+-------------+ | | Description | Type | Default | +======================+=======================================================================+==========+=============+ | mfiter_tile_size | Maximum number of cells in each direction for (logical) tiles. | Ints<3> | 1024000 8 8 | +----------------------+-----------------------------------------------------------------------+----------+-------------+ The following inputs are defined using the prefix ``particles``: +----------------------+-----------------------------------------------------------------------+-------------+--------------+ | | Description | Type | Default | +======================+=======================================================================+=============+==============+ | tile_size | Maximum number of cells in each direction for (logical) tiles | Ints<3> | 1024000 8 8 | | | in the ParticleBoxArray if ``load_balance`` is ``DualGrid`` | | | +----------------------+-----------------------------------------------------------------------+-------------+--------------+ When running on shared memory machines using an OpenMP enabled executable, *grids* are subdivided into *tiles* and iterated over to improve data locality by cache blocking. .. note:: MFIX-Exa disables tiling when using GPU accelerators.