Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • wfullmer/docs
  • exa/docs
2 results
Show changes
Commits on Source (5)
......@@ -3,14 +3,14 @@ Chemical Reactions
Enabling the Chemical Reactions solver and specifying model options.
+-------------------------+----------------------------------------------------------------------+----------+-----------+
| | Description | Type | Default |
+=========================+======================================================================+==========+===========+
| chemistry.solve | Specified name(s) of the chemical reactions types or None to disable | String | None |
| | the reactions solver. | | |
+-------------------------+----------------------------------------------------------------------+----------+-----------+
+----------------------------------+-------------------------------------------------------------+----------+-----------+
| | Description | Type | Default |
+==================================+=============================================================+==========+===========+
| chemistry.solve | Specified name(s) of the chemical reactions types or None | String | None |
| | to disable the reactions solver. | | |
+----------------------------------+-------------------------------------------------------------+----------+-----------+
The following inputs must be preceded by the "chemistry." prefix
The following inputs are defined using the ``chemistry`` prefix.
+------------------------+---------------------------------------------------------+----------+-----------+
| | Description | Type | Default |
......@@ -21,10 +21,99 @@ The following inputs must be preceded by the "chemistry." prefix
| | or '<--'. Chemical species phases must be defined as | | |
| | '(g)' for the fluid phase or '(s)' for the solid phase. | | |
+------------------------+---------------------------------------------------------+----------+-----------+
| mass_balance_tolerance | Tolerance used to test chemical formula conserves mass. | Real | 1e-12 |
| | | | |
| | abs( sum(products) - sum(reactants)) < tolerance | | |
| | | | |
+------------------------+---------------------------------------------------------+----------+-----------+
Choosing the integrator type for the chemistry ODE integration operation that is
performed to determine the fluid and solids phases transfer quantities due to
chemical reactions. The ``StiffSolver`` class of integrators is inspired to the
class of integrators in AMReX-Astro/Microphysics
(https://github.com/AMReX-Astro/Microphysics)
+-------------------------+----------------------------------------------------------------------+----------+---------------+
| | Description | Type | Default |
+=========================+======================================================================+==========+===============+
| chemistry.integrator | Specified name of the chemistry ODE integrator type. Available types | String | ForwardEuler |
| | are (case insensitive): | | |
| | | | |
| | * ``ForwardEuler`` | | |
| | * ``StiffSolver::ForwardEuler`` | | |
| | * ``StiffSolver::BackwardEuler`` | | |
| | * ``StiffSolver::VODE`` | | |
| | | | |
+-------------------------+----------------------------------------------------------------------+----------+---------------+
One can define the environment variable ``VODE_JACOBIAN_CACHING`` at compile
time to enable caching of the numerical approximation of the Jacobian matrix
(the derivative of the ODE right-hand side), applicable when the VODE integrator
is selected. The following inputs can be specified using the
``chemistry.integrator`` prefix:
+--------------------------------+---------------------------------------------------------------+----------+---------+
| | Description | Type | Default |
+================================+===============================================================+==========+=========+
| burner_verbose | Enables the printing on screen of some integration statistics | int | 0 |
+--------------------------------+---------------------------------------------------------------+----------+---------+
| ode_max_steps | The maximum number of substeps for the ODE integration | int | 150000 |
+--------------------------------+---------------------------------------------------------------+----------+---------+
| jacobian_type | Select how to compute the jacobian for the ODE iterative | int | 0 |
| | solver. Available choices are: | | |
| | | | |
| | * 0 for a first-order numerical approximation | | |
| | * 1 for the analytical jacobian (not available yet) | | |
+--------------------------------+---------------------------------------------------------------+----------+---------+
| atol | Absolute tolerance for the ODE integration error test between | Real | 1.e-6 |
| | the solution and the fine-step solution | | |
+--------------------------------+---------------------------------------------------------------+----------+---------+
| rtol | Relative tolerance for the ODE integration error test between | Real | 1.e-6 |
| | the solution and the fine-step solution | | |
+--------------------------------+---------------------------------------------------------------+----------+---------+
| retry_atol | Overwrites the absolute tolerance value atol in case the ODE | Real | -1 |
| | integration fails | | |
+--------------------------------+---------------------------------------------------------------+----------+---------+
| retry_rtol | Overwrites the relative tolerance value rtol in case the ODE | Real | -1 |
| | integration fails | | |
+--------------------------------+---------------------------------------------------------------+----------+---------+
| retry_swap_jacobian | Swaps the type of jacobian (from 1 to 0 or vice versa) in | int | 1 |
| | case the ODE integration fails | | |
+--------------------------------+---------------------------------------------------------------+----------+---------+
| ode_max_dt | Maximum timestep size for the ODE integration substeps | Real | 1.e30 |
+--------------------------------+---------------------------------------------------------------+----------+---------+
| maximum_timestep_change_factor | Only for StiffSolver::ForwardEuler, sets a maximum factor | Real | 1.001 |
| | for the change of the timestep for the internal substeps | | |
+--------------------------------+---------------------------------------------------------------+----------+---------+
| max_iter | Maximum number of iterations for the internal Newton solver | int | 100 |
+--------------------------------+---------------------------------------------------------------+----------+---------+
| linalg_do_pivoting | Only for StiffSolver::BackwardEuler and StiffSolver::VODE, | int | 1 |
| | switches on/off the pivoting when solving the linear algebra | | |
| | problem associated to the internal Newton solver | | |
+--------------------------------+---------------------------------------------------------------+----------+---------+
| rp_rtol | Relative tolerance for the convergence test of the internal | Real | 1.e-6 |
| | Newton solver. Valid only for StiffSolver::BackwardEuler | | |
+--------------------------------+---------------------------------------------------------------+----------+---------+
| use_jacobian_caching | Only for StiffSolver::VODE, enables caching the numerical | int | 1 |
| | jacobian | | |
+--------------------------------+---------------------------------------------------------------+----------+---------+
| X_reject_buffer | Only for StiffSolver::VODE, constrain species abundances | Real | 1.0 |
| | such that they don't change by more than a certain factor in | | |
| | a given step | | |
+--------------------------------+---------------------------------------------------------------+----------+---------+
Below is an example for specifying chemical reactions for MFIX-Exa.
.. code-block:: none
chemistry.solve = my_reaction0 my_reaction1
my_reaction0.reaction = Fe2O3(s)+CO(g)-->2.FeO(s)+CO2(g)
my_reaction1.reaction = FeO(s)+0.25O2(g)-->0.5Fe2O3(s)
chemistry.my_reaction0.reaction = Fe2O3(s)+CO(g)-->2.FeO(s)+CO2(g)
chemistry.my_reaction1.reaction = FeO(s)+0.25O2(g)-->0.5Fe2O3(s)
chemistry.mass_balance_tolerance = 1.e-5
chemistry.integrator = StiffSolver::BackwardEuler
chemistry.integrator.atol = 1.e-8
chemistry.integrator.rtol = 1.e-9
......@@ -28,6 +28,9 @@ format (for debugging).
| par_ascii_per_approx | Time period of the ascii particle output (approximate); | Real | -1 |
| | if -1 then particle ascii files will not be written at this frequency | | |
+----------------------+-----------------------------------------------------------------------+-------------+-----------+
| file_digits | Number of digits to use in plotfile (plt[0-9]+) and checkpoint | Int | 5 |
| | (chk[0-9]+) filenames. | | |
+----------------------+-----------------------------------------------------------------------+-------------+-----------+
| ascent_int | Frequency of ascent pipeline; | Int | -1 |
| | if -1 then ascent will not be called. | | |
+----------------------+-----------------------------------------------------------------------+-------------+-----------+
......@@ -51,7 +54,9 @@ The following inputs must be preceded by "mfix." and control what variables will
+---------------------+-----------------------------------------------------------------------+-------------+-----------+
| plt_ro_g | Save fluid density to plot file | Int | 0 |
+---------------------+-----------------------------------------------------------------------+-------------+-----------+
| plt_mu_g | Save fluid viscosity to plot file | Int | 0 |
| plt_mu_g | Save fluid molecular viscosity to plot file | Int | 0 |
+---------------------+-----------------------------------------------------------------------+-------------+-----------+
| plt_mu_g_eff | Save fluid effective viscosity to plot file | Int | 0 |
+---------------------+-----------------------------------------------------------------------+-------------+-----------+
| plt_diveu | Save div(ep_g . u) to plot file | Int | 0 |
+---------------------+-----------------------------------------------------------------------+-------------+-----------+
......
.. _InputsPorousMediaDefs:
Porous media
============
Homogeneous porous media are modeled by the addition of a momentum
source term, :math:`\boldsymbol{S}_{pm}`, to the fluid momentum equation.
.. math::
\boldsymbol{S}_{pm} =-\frac{\mu_f}{C_1} \boldsymbol{u}_f - C_2\frac{1}{2}\rho_f\lvert \boldsymbol{u}_f \rvert \boldsymbol{u}_f
:math:`\mu_f`, :math:`\rho_f`, and :math:`\boldsymbol{u}_f` are the fluid viscosity, density, and velocity and
:math:`C_1` and :math:`C_2` are user defined constants.
The following inputs are defined using the ``pm`` prefix.
+--------------------------+------------------------------------------------------------------------------+----------+-----------+
| | Description | Type | Default |
+==========================+==============================================================================+==========+===========+
| regions | Regions used to define porous media. | String | None |
+--------------------------+------------------------------------------------------------------------------+----------+-----------+
| [region].volfrac | Solids volume fraction of the porous media region. | Real | None |
+--------------------------+------------------------------------------------------------------------------+----------+-----------+
| [region].c1 | Porous media permeabilty constant for the source term in fluid | Real | None |
| | momentum equation. | | |
+--------------------------+------------------------------------------------------------------------------+----------+-----------+
| [region].c2 | Porous media inertial resistance factor for the source term in fluid | Real | None |
| | momentum equation. | | |
+--------------------------+------------------------------------------------------------------------------+----------+-----------+
| [region].allow_particles | Allow particles to flow through the porous media region. | Int | 0 |
+--------------------------+------------------------------------------------------------------------------+----------+-----------+
......@@ -50,6 +50,7 @@ keywords such as ``mfix``, ``amr``, ``geometry``, ``nodal_proj`` etc.
inputs/fluid_model
inputs/solids_model
inputs/species_defs
inputs/porous_media_defs
inputs/chemical_reactions
inputs/regions_defs
inputs/initial_conditions
......