.. _Amanzi XML Schema : ============================================================ Input File XML Schema ============================================================ Overview ++++++++ The present document describes how to specify the data required to execute Amanzi and perform a simulation. This specification should be regarded as a companion to the mathematical requirements document entitled *Mathematical Formulation Requirements and Specifications for the Process Models* (see :ref:`ASCEM Overview `), and parameterizations of the individual submodels are consistent between Amanzi, the mathematical requirements document and this document. The open-source, platform independent Akuna_ user environment can generate *Amanzi* models and generate corresponding valid, human-readable XML input files that can then be executed by *Amanzi*. Example input files are available in the Amanzi source repository. XML Schema 2.3.0 ++++++++++++++++ Amanzi solves a set of parameterized models for multiphase flow in porous media. An Amanzi simulation is specified by providing: * values for a parameterized PDE-based transport model, including boundary and initial conditions, constitutive laws, and parameterized/phenomenological models for fluid and chemical sources and characterizations of the porous medium, * parameters controlling the selection of key algorithmic options and output, * a description of the (discrete) state of the computational system, including a list of the independent variables and instructions for obtaining or generating the discrete mesh, and a characterization of the (parallel) computing environment. The primary input to *Amanzi* is through an XML file. The Amanzi input XML format is defined in terms of the XML schema that can be found in the Amanzi source code repository. Users can construct models and generate compliant XML input files using the Akuna_ tool suite. Users can also choose to generate compliant file using a text editor or other method. .. In practice, Amanzi is called by a "simulation coordinator" which .. manages the simulation instructions and orchestrates the flow of .. data. A basic simulation coordinator is provided with the Amanzi .. source code distribution. This simple stand-alone coordinator can be .. used to drive a simple sequence of Amanzi runs, or can serve as a .. template for user-generated extensions supporting more intricate .. workflows. The following is a description of each of the sections with the XML input schema. Each section includes a short description of what is defined within the section followed by the XML elements available for the section. Not all elements described are required to generated a valid input file. The limited set of required elements is noted in each section. Note that tags for all sections must be present for an input file to be valid even if no elements within that section are required. Please note, many attributes within the XML list a limited set of specified values. During validation of the input file or initialization of Amanzi the values in the user provided input file will be compared against the limited set provided in the XML Schema document. Errors will occur is the values do not match exactly. These values are CASE SENSITIVE. The Amanzi schema has been designed will all LOWER CASE values. Please note this when writing input file. In particular, `"Exodus II`" will be evaluated as `"exodus ii`". Amanzi Input ------------ The entire input file is encapsulated under the root tag ``amanzi_input``. At this level the version of the input schema and the type of simulation to be conducted are specified through required attributes. The version is specified with the attribute ``version``. The current schema can be found in the repository and install location amanzi.xsd. The simulation type is specified using the attribute ``type`` as either *structured* or *unstructured*. For an unstructured simulations the root tag would looks as the following. .. code-block:: xml Model Description ------------------- This section allows the user to provide information about the model being developed and how and when it was developed. Default units for the model are also stored in this section. This entire section is optional but encouraged for documentation purposes. The opening tag ``model_description`` accepts an attribute ``name`` in which the user may give the current model a name. The available elements within ``model_description`` include: ``comments``, ``author``, ``created``, ``modified``, ``model_name``, ``description``, ``purpose``, and ``units``. Under the ``units`` element, the user may define the default units to used throughout the rest of the input file. The options available for the units element are as follows: +----------------------------+---------------+ | Model_Description Elements | Value Type | +============================+===============+ | comments | string | +----------------------------+---------------+ | author | string | +----------------------------+---------------+ | created | string | +----------------------------+---------------+ | modified | string | +----------------------------+---------------+ | model_id | string | +----------------------------+---------------+ | description | string | +----------------------------+---------------+ | purpose | string | +----------------------------+---------------+ | units | element block | +----------------------------+---------------+ The units block specifies the default units to be used through out the input file unless otherwise specified. +----------------+------------+--------------------+ | Units Elements | Value Type | Value Options | +================+============+====================+ | length_unit | string | ``m, cm`` | +----------------+------------+--------------------+ | time_unit | string | ``y, d, h, s`` | +----------------+------------+--------------------+ | mass_unit | string | ``kg`` | +----------------+------------+--------------------+ | conc_unit | string | ``molar, mol/m^3`` | +----------------+------------+--------------------+ Here is an overall example for the model description element. .. code-block:: xml Some comment here DVZ-212a-3217 David Moulton m s kg molar Definitions ----------- This section allows the user to provide useful definitions to be used throughout the other sections. Definitions are grouped as element blocks: `constants`_ and `macros`_. Constants _________ The user may specify as many constants as desired. The available constants fall into the following types and descriptions: +-------------------------+------------------------------------------------------------------+ | Constants Elements | Description | +=========================+==================================================================+ | constant | general constant definition, can be of any of the following types| +-------------------------+------------------------------------------------------------------+ | time_constant | define a constant with a time value | +-------------------------+------------------------------------------------------------------+ | numerical_constant | define a constant with a numerical value (no units specified) | +-------------------------+------------------------------------------------------------------+ | area_mass_flux_constant | define a constant with an area mass flux value | +-------------------------+------------------------------------------------------------------+ Each element has the following format: +-------------------------+-----------------+----------------+----------------------------------+ | Constants Elements | Attribute Names | Attribute Type | Attribute Values | +=========================+=================+================+==================================+ | constant | name | string | (user specified name) | | | value | string | (value of constant) | | | type | string | ``none, time, area_mass_flux`` | +-------------------------+-----------------+----------------+----------------------------------+ | time_constant | name | string | (user specified name) | | | value | time(,char) | (time value with optional units) | +-------------------------+-----------------+----------------+----------------------------------+ | numerical_constant | name | string | (user specified name) | | | value | exponential | (numerical constant value) | +-------------------------+-----------------+----------------+----------------------------------+ | area_mass_flux_constant | name | string | (user specified name) | | | value | exponential | (flux value) | +-------------------------+-----------------+----------------+----------------------------------+ Here is an overall structure for the constants element. .. code-block:: xml Macros ______ The ``macros`` section defines time and cycle macros. These specify a series of times or cycles for writing out visualization, checkpoint, walkabout, or observation files. Each macro type is described in the following table. The macro can contain a list of specific time values at which to perform an action or a time/cycle interval at which to perform an action. +--------------------------+-----------------+----------------+-------------------+------------------------------------------------+ | Macros Elements | Attribute Names | Attribute Type | Sub-Elements | Sub-Element Type/Value | +==========================+=================+================+===================+================================================+ | time_macro (time series) | name | string | time | time(,unit) / value of time with optional unit | +--------------------------+-----------------+----------------+-------------------+------------------------------------------------+ | time_macro (interval) | name | string | start | time(,unit) / value of start time | | | | | timestep_interval | time(,unit) / time interval between actions | | | | | stop | time(,unit) / final time value | | | | | | ( -1 specifies final time ) | +--------------------------+-----------------+----------------+-------------------+------------------------------------------------+ | cycle_macro (interval) | name | string | start | integer / cycle number to start action | | | | | timestep_interval | integer / number of cycles between actions | | | | | stop | integer / cycle number to stop action | | | | | | ( -1 specifies final step ) | +--------------------------+-----------------+----------------+-------------------+------------------------------------------------+ Here are examples of the macros: .. code-block:: xml .. code-block:: xml Value Value Value|-1 Here is an overall example for the ``definition`` element. .. code-block:: xml 0 1000 -1 Execution Control ----------------- The ``execution_controls`` section defines the general execution of the Amanzi simulation. Amanzi can execute in four modes: steady state, transient, transient with static flow, or initialize to a steady state and then continue to transient. The transient with static flow mode does not compute the flow solution at each time step. During initialization the flow field is set in one of two ways: (1) A constant Darcy velocity is specified in the initial condition; (2) Boundary conditions for the flow (e.g., pressure), along with the initial condition for the pressure field are used to solve for the Darcy velocity. At present this mode only supports the "Single Phase" flow model. Default values for execution are defined in the ``execution_control_defaults`` element. These values are used for any time period during the simulation for which the controls were not specified. Individual time periods of the simulation are defined using ``execution_control`` elements. For a steady state simulation, only one ``execution_control`` element will be defined. However, for a transient simulation a series of controls may be defined during which different control values will be used. For a valid ``execution_controls`` section the ``execution_control_defaults`` element and at least one ``execution_control`` element must appear. The ``execution_controls`` element has the following subelements: +-----------------------------+--------------+--------------------------------------------------------------------------+ | Execution_controls Elements | Element Type | Description | +=============================+==============+==========================================================================+ | comments | string | user specified comments | +-----------------------------+--------------+--------------------------------------------------------------------------+ | verbosity | string | verbosity level ``extreme, high, medium, low, none`` | +-----------------------------+--------------+--------------------------------------------------------------------------+ | restart | string | name of Amanzi checkpoint file to be used for restart | +-----------------------------+--------------+--------------------------------------------------------------------------+ | execution_control_defaults | see below | default values to be used if not specified in execution_control elements | +-----------------------------+--------------+--------------------------------------------------------------------------+ | execution_control | see below | execution control values for a given time period | +-----------------------------+--------------+--------------------------------------------------------------------------+ Execution_control_defaults __________________________ The ``execution_control_defaults`` element has the following attributes. +------------------+----------------+----------------------------------+ | Attribute Names | Attribute Type | Attribute Values | +==================+================+==================================+ | init_dt | time | time value(,unit) | +------------------+----------------+----------------------------------+ | max_dt | time | time value(,unit) | +------------------+----------------+----------------------------------+ | reduction_factor | exponential | factor for reducing time step | +------------------+----------------+----------------------------------+ | increase_factor | exponential | factor for increasing time step | +------------------+----------------+----------------------------------+ | mode | string | ``steady, transient`` | +------------------+----------------+----------------------------------+ | method | string | ``bdf1, picard`` | +------------------+----------------+----------------------------------+ Execution_control _________________ The ``execution_control`` element has the following attributes. +------------------+----------------+-----------------------------------------------------+ | Attribute Names | Attribute Type | Attribute Values | +==================+================+=====================================================+ | start | time | time value(,unit) (start time for this time period) | +------------------+----------------+-----------------------------------------------------+ | end | time | time value(,unit) (stop time for this time period) | +------------------+----------------+-----------------------------------------------------+ | max_cycles | integer | max cycles to use for structured | +------------------+----------------+-----------------------------------------------------+ | init_dt | time | time value(,unit) | +------------------+----------------+-----------------------------------------------------+ | max_dt | time | time value(,unit) | +------------------+----------------+-----------------------------------------------------+ | reduction_factor | exponential | factor for reducing time step | +------------------+----------------+-----------------------------------------------------+ | increase_factor | exponential | factor for increasing time step | +------------------+----------------+-----------------------------------------------------+ | mode | string | ``steady, transient`` | +------------------+----------------+-----------------------------------------------------+ | method | string | ``bdf1, picard`` | +------------------+----------------+-----------------------------------------------------+ Each ``execution_control`` is required to define a ``start`` time. The final control period must define an ``end`` time. It is assumed that the start time of the next control period is the end time of the previous period. Therefore, it is not required that each ``execution_control`` element have an ``end`` time defined. The attribute ``max_cycles`` is only valid for transient and transient with static flow execution modes. The ``execution_control`` section also provides the elements ``comments`` and ``verbosity``. Users may provide any text within the ``comment`` element to annotate this section. ``verbosity`` takes the attribute level=`` extreme | high | medium | low | none``. This triggers increasing levels of reporting from inside Amanzi. For debugging purposes use the level extreme. Restarting a simulation is available using the ``restart`` element. The text given for the ``restart`` element is the name of the Amanzi checkpoint file to be read in and initialized from. Here is an overall example for the ``execution_control`` element. .. code-block:: xml Numerical Controls ------------------ This section allows the user to define control parameters associated with the underlying numerical implementation. The list of available options is lengthy. However, none are required for a valid input file. The ``numerical_controls`` section is divided up into the subsections: `common_controls`_, `unstructured_controls`_, and `structured_controls`_. Common_controls _______________ The section is currently empty. However, in future versions controls that are common between the unstructured and structured executions will be moved to this section and given common terminology. Unstructured_controls _____________________ The ``unstructured_controls`` sections is divided in the subsections: ``unstr_steady-state_controls``, ``unstr_transient_controls``, ``unstr_linear_solver``, ``unstr_nonlinear_solver``, ``unstr_flow_controls``, ``unstr_transport_controls``, and ``unstr_chemistry_controls``. The list of available options is as follows: .. code-block:: xml fv-default | fv-monotone | fv-multi_point_flux_approximation | fv-extended_to_boundary_edges | mfd-default | mfd-optimized_for_sparsity | mfd-support_operator | mfd-optimized_for_monotonicity | mfd-two_point_flux_approximation upwind-darcy_velocity (default) | upwind-gravity | upwind-amanzi | other-arithmetic_average | other-harmonic_average diffusion_operator | linearized_operator (default) exp explicit first-order (default) | explicit second-order | implicit upwind on (defulat) | off exp implicit operator split | none unit (default) | debye-huckel exp int pH timestep (default) | off exp exp on (default) | off int int int exp pressure (default) | residual exp int int exp exp exp hypre_amg (default) | trilinos_ml | block_ilu int exp exp picard (default) | darcy_solver hypre_amg (default) | trilinos_ml | block_ilu aztec00 | aztecoo | AztecOO pressure (default) | residual exp int int int int exp exp int int exp exp exp pressure,residual (default) hypre_amg (default) | trilinos_ml | block_ilu true | false (default) int gmres (default) | pcg int exp hypre_amg (default) | trilinos_ml | block_ilu true | false (default) every_timestep (default) | every_nonlinear_iteration int int exp exp int int exp jacobi (default) | gauss_seidel | ilu int exp exp exp int Here is an overall example for the ``unstructured_controls`` element. .. code-block:: xml Numerical controls comments here Note that this section contained data on timesteps, which was moved into the execution control section. 10 15 30 1.0e-5 Proposed comments section. Proposed comment section. gmres 20 1.0e-18 trilinos_ml | hypre_amg | block_ilu Structured_controls ___________________ The ``structured_controls`` sections is divided in the subsections: ``str_steady-state_controls``, ``str_transient_controls``, ``str_amr_controls``, ````, and ``max_n_subcycle_transport``. The list of available options is as follows: .. code-block:: xml Numerical controls comments here String Exponential Integer Integer Integer Exponential Exponential Integer Exponential Integer Exponential Exponential Integer Exponential true | false Integer true | false Exponential Integer Exponential Exponential Exponential Integer Integer Exponential true | false true | false Integer true | false true | false Exponential Integer Integer Integer true | false Integer Integer Integer Integer Integer Integer Integer Integer String String Integer Exponential Exponential Exponential true | false Exponential Exponential true | false Integer Mesh ---- A mesh must be defined for the simulation to be conducted on. The mesh can be structured or unstructured. Structured meshes are always internally generated while unstructured meshes may be generated internally or imported from an existing `Exodus II `_ file. Generated meshes in both frameworks are always regular uniformly spaced meshes. Mesh - Generate (Structured) ____________________________ The ``mesh`` section takes a ``dimension`` element which indicates if the mesh is 2D or 3D. A 2D mesh can be given in 3D space with a third coordinate of 0. If a 2D mesh is specified this impacts other aspects of the input file. It is up to the user to ensure consistency within the input file. Other effected parts of the input file include region definitions and initial conditions which use coordinates, the material property permeability which must be specified using the correct subset of x, y, and z coordinates, and the initial condition velocity which also requires the correct subset of x, y, and z coordinates. This section also takes an element indicating how the mesh is to be internally generated. The ``generate`` element specifies the details about the number of cells in each direction and the low and high coordinates of the bounding box. It should be noted that in order to accommodate mesh refinement, the number of cells in each direction must be even. Finally, as in other sections, a ``comments`` element is provide to include any comments or documentation the user wishes. Here is an example specification for internally generated ``mesh`` element for structured. .. code-block:: xml 3D block 3 Mesh - Generate (Unstructured) ______________________________ The unstructured portion of Amanzi can utilize different mesh frameworks. Therefore the framework is specified as an attribute to the ``mesh`` element. The available options are: ``mstk``, ``moab``, and ``simple``. If no framework is specified, the default ``mstk`` is used. The ``mesh`` section takes a ``dimension`` element which indicates if the mesh is 2D or 3D. A 2D mesh can be given in 3D space with a third coordinate of 0. If a 2D mesh is specified this impacts other aspects of the input file. It is up to the user to ensure consistency within the input file. Other effected parts of the input file include region definitions and initial conditions which use coordinates, the material property permeability which must be specified using the correct subset of x, y, and z coordinates, and the initial condition velocity which also requires the correct subset of x, y, and z coordinates. This section also takes an element indicating how the mesh is to be internally generated. The ``generate`` element specifies the details about the number of cells in each direction and the low and high coordinates of the bounding box. Finally, as in other sections, a ``comments`` element is provide to include any comments or documentation the user wishes. The following is an example specification for a generated unstructured mesh. .. code-block:: xml Pseudo 2D 3 Mesh - Read (Unstructured) __________________________ The unstructured mode of Amanzi can utilize different mesh frameworks. Therefore the framework is specified as an attribute to the ``mesh`` element. The available options are: ``mstk``, ``moab``, and ``simple``. If no framework is specified, the default ``mstk`` is used. The ``mesh`` section takes a ``dimension`` element which indicates if the mesh is 2D or 3D. A 2D mesh can be given in 3D space with a third coordinate of 0. If a 2D mesh is specified this impacts other aspects of the input file. It is up to the user to ensure consistency within the input file. Other effected parts of the input file include region definitions and initial conditions which use coordinates, the material property permeability which must be specified using the correct subset of x, y, and z coordinates, and the initial condition velocity which also requires the correct subset of x, y, and z coordinates. The unstructured mode of Amanzi can read meshes in the Exodus II format. The ``read`` element contains the subelements ``file``, ``format``, and ``verify`` for specifying the mesh file format (currently only Exodus II) and the mesh file name (relative path allowed). Any regions or attributes specified in the mesh file will also be read. These names of the regions and attributes can be utilized in appropriate sections of the input file. The subelement ``verify`` turns on or off checks performed on the mesh when it is read it. The mesh verification takes time and is only recommended for debugging meshes on first use. Finally, as in other sections, a ``comments`` element is provide to include any comments or documentation the user wishes. Finally, an example of reading an unstructured mesh from a file is given below. .. code-block:: xml Read from Exodus II 3 dvz.exo exodus ii true Regions ------- Regions are geometrical constructs used in Amanzi to define subsets of the computational domain in order to specify the problem to be solved, and the output desired. Regions are commonly used to specify material properties, boundary conditions and observation domains. Regions may represent zero-, one-, two- or three-dimensional subsets of physical space. For a three-dimensional problem, the simulation domain will be a three-dimensional region bounded by a set of two-dimensional regions. If the simulation domain is N-dimensional, the boundary conditions must be specified over a set of regions are (N-1)-dimensional. Amanzi automatically defines the special region labeled "All", which is the entire simulation domain. Under the "Structured" option, Amanzi also automatically defines regions for the coordinate-aligned planes that bound the domain, using the following labels: "XLOBC", "XHIBC", "YLOBC", "YHIBC", "ZLOBC", "ZHIBC" The ``regions`` block is required. Within the region block no regions are required to be defined. The optional elements valid for both structured and unstructured include ``region``, ``box``, ``point``, ``plane``, and ``logical``. As in other sections there is also an options ``comments`` element. The elements ``box``, ``point``, and ``plane`` allow for in-line description of regions. The ``region`` element uses a subelement to either define a ``box`` or ``plane`` region or specify a region file. Below are further descriptions of these elements. Additional regions valid only for unstructured are ``polygonal_surface``. Additional regions valid only for structured include ``polygon`` and ``ellipse`` in 2D and ``rotated_polygon`` and ``swept_polygon`` in 3D. Each region definition requires a ``name`` attribute. These names must be unique to avoid confusion when other sections refer to the regions. Box ___ A box region region is defined by a low corner coordinates and high corner coordinates. Box regions can be degenerate in one or more directions. .. code-block:: xml Point _____ A point region is defined by a point coordinates. .. code-block:: xml Plane _____ A plane region is defined by a point on the plane and the normal direction of the plane. .. code-block:: xml The attribute ``tolerance`` is optional. This value prescribes an absolute tolerance for determining the cell face centroids that lie on the defined plane. Labeled Set ___________ A labeled set region is a predefined set of mesh entities defined in the Exodus II mesh file. This type of region is useful when applying boundary conditions on an irregular surface that has been tagged in the external mesh generator. Please note that both the format and entity attribute values are case sensitive. Also not that the attribute ``label`` refers to the name of the region used in the mesh file. Currently the label/name needs to be an integer value. Also the region names in the mesh file should be unique to avoid errors and confusion as to which region is being referred to. .. code-block:: xml Color function ______________ A color function region defines a region based on a specified integer color in a structured color function file. The color values may be specified at the nodes or cells of the color function grid. A computational cell is assigned the color of the data grid cell containing its cell centroid or the data grid nearest its cell-centroid. Computational cell sets are then build from all cells with the specified color value. In order to avoid gaps and overlaps in specifying materials, it is strongly recommended that regions be defined using a single color function file. At this time, Exodus II is the only file format available. Please note that both the format and entity attribute values are case sensitive. .. code-block:: xml Logical _______ Logical regions are compound regions formed from other primitive type regions using boolean operations. Supported operators are union, intersection, subtraction and complement. This region type is only valid for the unstructured algorithm. .. code-block:: xml union|intersection|subtraction|complement region1, region2, region3 Polygonal_Surface (unstructured only) _____________________________________ A polygonal_surface region is used to define a bounded planar region and is specified by the number of points and a list of points. The points must be listed in order and this ordering is maintained during input translation. This region type is only valid for the unstructured algorithm. .. code-block:: xml X1, Y1, Z1 X2, Y2, Z2 X3, Y3, Z3 X4, Y4, Z4 The attribute ``tolerance`` is optional. This value prescribes an absolute tolerance for determining the cell face centroids that lie on the defined plane. Polygon (structured 2D only) ____________________________ A polygon region is used to define a bounded planar region and is specified by the number of points and a list of points. The points must be listed in order and this ordering is maintained during input translation. This region type is only valid for the structured algorithm in 2D. .. code-block:: xml (X1, Y1) (X2, Y2) (X3, Y3) Ellipse (structured 2D only) ____________________________ An ellipse region is used to define a bounded planar region and is specified by a center and X and Y radii. This region type is only valid for the structured algorithm in 2D. .. code-block:: xml
(X, Y)
(radiusX, radiusY)
Rotated Polygon (structured 3D only) ____________________________________ A rotated_polygon region is defined by a list of points defining the polygon, the plane in which the points exist, the axis about which to rotate the polygon, and a reference point for the rotation axis. The points listed for the polygon must be in order and the ordering will be maintained during input translation. This region type is only valid for the structured algorithm in 3D. .. code-block:: xml (X, Y, Z) (X, Y, Z) (X, Y, Z) (XY | YZ | XZ) (X | Y | Z) (X, Y) Swept Polygon (structured 3D only) __________________________________ A swept_polygon region is defined by a list of points defining the polygon, the plane in which the points exist, the extents (min,max) to sweep the polygon normal to the plane. The points listed for the polygon must be in order and the ordering will be maintained during input translation. This region type is only valid for the structured algorithm in 3D. .. code-block:: xml (X, Y, Z) (X, Y, Z) (X, Y, Z) (XY | YZ | XZ) exponential exponential Geochemistry ------------ The ``geochemistry`` section allows for geochemical constraints to be named and defined. These named constraints are referred to in the ``initial_conditions``, ``boundary_conditions``, and ``sources`` sections. Note, at this time the geochemistry constraints must be named and defined in the external chemistry engine input file. This chemistry input file must be provided by the user. The capability to create the chemistry input file based on information provided within the XML input file is currently under development. The ``geochemistry`` section has the subelements ``comments``, ``verbosity``, and an unbounded number of ``constraint`` elements. The ``verbosity`` element specifies the verbosity level to be used by the chemistry engine. The current options are: silent, terse, verbose, warnings, and errors. Currently, each named constraint must correspond to a constraint with matching name in the external chemistry engine input file. With the XML input file, the ``constraint`` element takes an attribute ``name``. This name must match the name of a constraint within the chemistry input file. In addition, the use may include the constraint information as subelements to the ``constraint`` element for information purposes. The ``constraint`` element accepts three version of a ``primary`` subelement. The ``primary`` element describes the constraint on a primary specie, mineral, or gas. For each type of primary, the ``primary`` element takes the attributes ``name``, ``type``, and ``value``. The ``name`` should match a primary listed in the ``phases`` section. The ``type`` can be: free_ion, pH, total, mineral, gas, total+sorbed, or charge. Note, for a non-reacting primary (i.e. tracer or solute), only the type total is valid. If the type selected is mineral, an additional attribute ``mineral`` giving the mineral name is expected. If the type selected is gas, an additional attribute ``gas`` giving the gas name is expected. Again, the names given should match names specified in the ``phases`` section. .. code-block:: xml silent | terse | verbose | warnings | errors Materials --------- The ``materials`` section allows for 1 or more material to be defined. Each material element requires an attribute ``name`` to distinguish the material definitions. The ``material`` in this context is meant to represent the media through which fluid phases are transported. In the literature, this is also referred to as the "soil", "rock", "matrix", etc. Properties of the material must be specified over the entire simulation domain, and is carried out using the Region constructs defined above. For example, a single material may be defined over the "All" region (see above), or a set of materials can be defined over subsets of the domain via user-defined regions. If multiple regions are used for this purpose, they should be disjoint, but should collectively tile the entire domain. Each material requires a label and the following set of physical properties using the supported models described below. While many material properties are available for the user to define, the minimum requirements for a valid material definition are specifying the ``assigned_regions``, either ``permeability`` or ``hydraulic_conductivity``, and the ``porosity``. However, if a capillary pressure model or relative permeability model is chosen (other than ``none``), the associated parameters must also be provided. Likewise, all model specific parameters must be provided for the chosen dispersion tensor model. Assigned_regions ________________ The ``assigned_regions`` element list the regions to which the following material properties are to be assigned. If only 1 material exists, the ``All`` region should be used. If the material properties are to be assigned to multiple regions, provide a comma separated list of the region names. Leading and trailing white space will be trimmed. Also, spaces within the region names will be preserved. .. code-block:: xml Comma seperated list of Regions Mechanical_properties _____________________ This element collects a series of mechanical properties as subelements. As mentioned above, the only required subelement is ``porosity``. For ``dispersion_tensor`` several models are available. The model is specified using the ``type`` attribute and additional attributes are used to specify the properties of the given model. The available dispersion models are described in the following table. +--------------------------+-----------------+-------------------+ | Dispersion Model | Attribute Names | Attribute Values | +==========================+=================+===================+ | uniform_isotropic | alpha_l | Exponential value | | | alpha_t | Exponential value | +--------------------------+-----------------+-------------------+ | burnett_frind | alpha_l | Exponential value | | | alpha_th | Exponential value | | | alpha_tv | Exponential value | +--------------------------+-----------------+-------------------+ | lichtner_kelkar_robinson | alpha_lh | Exponential value | | | alpha_tv | Exponential value | | | alpha_th | Exponential value | | | alpha_tv | Exponential value | +--------------------------+-----------------+-------------------+ .. code-block:: xml Permeability ____________ For each material either the ``permeability`` or the ``hydraulic_conductivity`` must be specified, but not both. If specifying the ``permeability`` either a single value for each direction can be given for the entire material or the ``permeability`` values can be read from a file by specifying the attribute ``type`` as "file". The attribute ``attribute`` gives the name of the attribute with an Exodus II mesh file to be read. Finally the file name is specified using the attribute ``filename``. .. code-block:: xml Hydraulic_conductivity ______________________ As noted above, either the ``permeability`` or ``hydraulic_conductivity`` must be specified for each material, but not both. The values for each direction are listed as attributes. Currently file read has not yet been implemented. .. code-block:: xml Cap_pressure ____________ Capillary pressure can be specified using the element ``cap_pressure``. The attribute ``model`` specifies whether the van Genuchten or Brooks-Corey model is to be used. The subelement ``parameters`` lists the model specific parameters. Note, for both models a smoothing interval can be specified but is optional. Also, if not specifying capillary pressure this element can be skipped or the value of ``model`` set to "none". .. code-block:: xml Rel_perm ________ Relative permeability can be specified using the element ``rel_perm``. The attribute ``model`` specifies whether the Mualam or Burdine model is to be used. The subelement ``exp`` lists the model specific parameters for Burdine. Also, if not specifying capillary pressure this element can be skipped or the value of ``model`` set to "none". .. code-block:: xml Sorption_isotherms __________________ Kd models can be specified for 1 or more primaries using the ``sorption_isotherms`` element. Note for the Kd model to be active the chemistry state under ``process_kernels`` must be "on" and an engine must be specified. Also, all primaries must be listed for each material. Three Kd models are available. All model parameters for the given model must be present. .. code-block:: xml Minerals ________ Mineral concentrations are specified using the volume fraction and specific surface area attributes ``volume_fraction`` and ``specific_surface_area`` respectively in the ``minerals`` block .. code-block:: xml Ion_exchange ____________ Ion exchange reactions are specified in the ``ion_exchange`` block. Cations active in the reaction are grouped under the subelement ``cations``. The attribute ``cec`` specifies the cation exchange capacity for the reaction. Each cation is listed in a ``cation`` subelement with the attributes ``name`` and ``value`` to specify the cation name and the associated selectivity coefficient. .. code-block:: xml Surface_complexation ____________________ Surface complexation reactions are specified in the ``surface_complexation`` block. Individual reactions are specified using the ``site`` block. It has the attributes ``density`` and ``name`` to specify the site density and the name of the site. Note, the site name must match a surface complexation site in the database file without any leading characters, such as `>`. The subelement ``complexes`` provides a comma separated list of complexes. Again, the names of the complexes must match names within the datafile without any leading characters. .. code-block:: xml FeOHZn+_s, FeOH2+_s, FeO-_s FeOHZn+_w, FeO-_w, FeOH2+_w An example materials element would look like .. code-block:: xml Material corresponds to region facies1 Between_Planes_1_and_2 Process Kernels --------------- Amanzi current employees three process kernels that need to be defined in the input file (1) flow, (2) transport, and (3) chemistry. The ``process_kernels`` section allows the user to define which kernels are to be used during the section and select high level features of those kernels. Flow ____ Currently three scenarios are available for calculated the flow field. `"richards`" is a single phase, variably saturated flow assuming constant gas pressure. `"saturated`" is a single phase, fully saturated flow. `"constant`" is equivalent to the flow model of single phase (saturated) with the time integration mode of transient with static flow in the version 1.2.1 input specification. This flow model indicates that the flow field is static so no flow solver is called during time stepping. During initialization the flow field is set in one of two ways: (1) A constant Darcy velocity is specified in the initial condition; (2) Boundary conditions for the flow (e.g., pressure), along with the initial condition for the pressure field are used to solve for the Darcy velocity. .. code-block:: xml Transport _________ For `"transport`" a `"state`" must be specified. .. code-block:: xml Chemistry _________ For `"chemistry`" a combination of `"state`", `"engine`", `"input_filename`", and `"database`" must be specified. If `"state`" is `"off`" then `"engine`" is set to `"none`". Otherwise the `"engine`" model must be specified. If PFloTran is specified as the chemistry engine, the user must specify a PFloTran database filename in the `"database`" attribute. Also, if PFloTran is the chemistry engine, the user may provide a PFloTran input file using the attribute ``input_filename`` or omit the attribute. If the attribute is omitted, Amanzi will automatically generate the PFloTran input file using information in the XML input file. It should be noted the automatically generated file is written to a file using the same name as the XML input file, but with the extension .in. If such a file exists in the run directory, Amanzi will not overwrite the file and just use the existing file. .. code-block:: xml An example ``process_kernels`` is as follows: .. code-block:: xml This is a proposed comment field for process_kernels Phases ------ The ``phases`` section is used to specify components of each of the phases that are mobile, and species that are contained within them. For each phase, the list identifies the set of all independent variables that are to be stored on each discrete mesh cell. The terminology for flow in porous media can be somewhat ambiguous between the multiphase and groundwater communities, particularly in regards to "components", "solutes", "primaries/secondaries", and "chemicals". Since Amanzi is designed to handle a wide variety of problems, we must settle on a nomenclature for our use here. In the general problem, multiple "phases" may coexist in the domain (e.g. gaseous, aqueous/liquid, etc), and each is comprised of a number of "components" (section 2.2). In turn, each component may carry a number of "primaries" and "secondaries" and some of these may participate in chemical reactions. As a result of reactions, a chemical source or sink term may appear for the primaries involved in the reaction, including primaries in other mobile phases or in the material matrix. Additionally, certain reactions such as precipitation may affect the flow properties of the material itself during the simulation, and some might affect the properties of the fluid (e.g. brines affect the liquid density). While Amanzi does not currently support chemical reactions and thermal processes, the specification here allows for the existence of the necessary data structures and input data framework. Note that if primary concentrations are significant, the system may be better modeled with that primary treated as a separate component. Clearly, these definitions are highly problem-dependent, so Amanzi provide a generalized interface to accommodate a variety of scenarios. Currently in Amanzi, primaries are transported in the various phase components, and are treated in "complexes". Each complex is typically in chemical equilibrium with itself and does not undergo phase change. Under these conditions, knowledge of the local concentration of the "basis" or "primary" species (the terms are used here interchangeably) in a chemical complex is sufficient to determine the concentrations of all related secondary species in the phase. Each basis species has a total component concentration and a free ion concentration. The total component concentration for each basis species is a sum of the free ion concentrations in the phase components and its stoichiometric contribution to all secondary species. Amanzi splits the total component concentration into a set of totals for each of the transported phase components, and a total sorbed concentration. Given the free ion concentration of each basis species (and if there is more than one phase, a specification of the thermodynamic relationships that determine the partitioning between phase components (if mass transfer is allowed - not in current Amanzi), we can reconstruct the concentration of the primary and secondary species in each phase. As a result only the basis species are maintained in the state data structures for each phases component. In addition to primaries in the transported phases, there may be various immobile chemical constituents within the porous media (material) matrix, such as "minerals" and "surface complexes". Bookkeeping for these constituents is managed in Amanzi data structures by generalizing the "primary" concept - a slot in the state is allocated for each of these immobile species, but their concentrations are not included in the transport/flow components of the numerical integration. To allow selective transport of the various primaries, Amanzi uses the concept of primary groups. The aqueous primary concentrations are typically treated together as a group, for example, and often represent the only chemical constituents that are mobile. Thus, the current Amanzi will assume that any other groups specified in an Aqueous phase are immobile. This section specifies the phases present and specific properties about those phases. The first grouping is by `liquid_phase`_, `solid_phase`_, and `gas_phase`_. Liquid_phase ____________ The ``liquid_phase`` element is required to produce a valid input file. If primaries are being transported properties of the primaries in the current phase can be specified. If primaries are being reacted a list of secondary chemical is also specified. .. code-block:: xml Exponential Exponential PrimaryName SecondaryName Solid_phase ___________ The ``solid_phase`` element allows the user to define a ``minerals`` element under which a series of ``mineral`` elements can be listed to specify any minerals present in the solid phase. The ``mineral`` elements contain the name of the mineral. .. code-block:: xml MineralName Gas_phase _________ The ``gas_phase`` element allows the user to define a ``gases`` element under which a series of ``gas`` elements can be listed to specify any gases present in the gas phase. The ``gas`` elements contain the name of the gas. .. code-block:: xml GasName An example ``phases`` element looks like the following. .. code-block:: xml 1.002E-03 998.2 Tc-99 Initial Conditions ------------------ The `"initial_conditions`" section contains at least 1 and up to an unbounded number of `"initial_condition`" elements. Each `"initial_condition`" element defines a single initial condition that is applied to one or more region specified in the ``assigned_regions`` element. The initial condition can be applied to a liquid phase or solid phase using the appropriate subelement. To specify a liquid phase the ``liquid_phase`` element is used. At least one ``liquid_component`` must be specified. In addition a ``geochemistry_component`` element can be specified. Under the ``liquid_component`` element an initial condition can be defined. Under the ``geochemistry_component`` element a geochemistry constraint is listed. The initial conditions are defined using a specific elements. The element name indicates the type of condition and the attributes define the necessary information. Below is a table of the conditions available for the liquid phase and the attributes required to define them. +-----------------------+------------------+-------------------------------+ | Initial Condition Type| Attributes | Value Type | +=======================+==================+===============================+ | uniform_pressure | name | string | | | value | double/time_constant/constant | +-----------------------+------------------+-------------------------------+ | linear_pressure | name | string | | | value | double/time_constant/constant | | | reference_coord | coordinate | | | gradient | coordinate | +-----------------------+------------------+-------------------------------+ | velocity | name | string | | | x | double/constant | | | y | double/constant | | | (z) | double/constant | +-----------------------+------------------+-------------------------------+ | uniform_saturation | name | string | | | value | double/time_constant/constant | +-----------------------+------------------+-------------------------------+ | linear_saturation | name | string | | | value | double/time_constant/constant | | | reference_coord | coordinate | | | gradient | coordinate | +-----------------------+------------------+-------------------------------+ For the geochemistry_component, an unbounded number of ``constraint`` elements can be listed. Each ``constraint`` element has the attribute *name*. The *name* attribute refers to a geochemical constraint defined in the `"geochemisty`" section. If in the ``process_kernels`` section the flow model is set to *constant* then the flow field is set in one of the following ways: (1) A constant Darcy velocity is specified in the initial condition (as above); (2) Boundary conditions for the flow (e.g., pressure), along with the initial condition for the pressure field are used to solve for the Darcy velocity. An example ``initial_conditions`` element looks like the following. .. code-block:: xml Initial Conditions Comments All Boundary Conditions ------------------- Boundary conditions are defined in a similar manor to the initial conditions. Under the tag ``boundary_conditions`` and series of individual ``boundary_condition`` elements can be defined. Within each ``boundary_condition`` element the ``assigned_regions`` and ``liquid_phase`` elements must appear. The boundary condition can be applied to one or more region using a comma separated list of region names. Under the ``liquid_phase`` element the ``liquid_component`` element must be define. A ``geochemistry_component`` element may optionally be defined. Under the ``liquid_component`` and ``geochemistry_component`` elements a time series of boundary conditions is defined using the boundary condition elements available in the table below. Each component element can only contain one type of boundary condition. Both elements also accept a *name* attribute to indicate the phase associated with the boundary condition. +---------------------------+--------------------------------+----------------------------------------+ |Boundary Condition Type | Attributes | Value Type | +===========================+================================+========================================+ | | inward_mass_flux | | name | | string | | | inward_volumetric_flux | | start | | double/time_constant/constant | | | outward_mass_flux | | value | | double | | | outward_volumetric_flux | | function | | ``linear | uniform | constant`` | +---------------------------+--------------------------------+----------------------------------------+ |uniform_pressure | | name | | string | | | | start | | double/time_constant/constant | | | | value | | double | | | | function | | ``uniform | constant`` | +---------------------------+--------------------------------+----------------------------------------+ |linear_pressure | | name | | string | | | | gradient_value | | coordinate | | | | reference_point | | coordinate | | | | reference_value | | double | +---------------------------+--------------------------------+----------------------------------------+ |hydrostatic | | name | | string | | | | start | | double/time_constant/constant | | | | value | | double | | | | function | | ``uniform | constant`` | | | | coordinate_system | | ``absolute | relative to mesh top`` | | | | submodel | | ``no_flow_above_water_table | none`` | +---------------------------+--------------------------------+----------------------------------------+ |linear_hydrostatic | | name | | string | | | | gradient_value | | coordinate | | | | reference_point | | coordinate | | | | reference_water_table_height | | double | | | | submodel | | ``no_flow_above_water_table | none`` | +---------------------------+--------------------------------+----------------------------------------+ |seepage_face | | name | | string | |(unstructured only) | | start | | double/time_constant/constant | | | | inward_mass_flux | | double/time_constant/constant | | | | function | | ``linear | uniform | constant`` | +---------------------------+--------------------------------+----------------------------------------+ |no_flow | | name | | string | | | | start | | double/time_constant/constant | | | | function | | ``linear | uniform | constant`` | +---------------------------+--------------------------------+----------------------------------------+ For the geochemistry_component, an unbounded number of ``constraint`` elements may be listed. Each constraint has the attributes *name*, *function*, and *start*. The function option available is *constant*. The name should match a constraint defined in the `"phases`" section An example ``boundary_conditions`` element looks like the following. .. code-block:: xml Recharge_Boundary_WestofCribs,Recharge_Boundary_btwnCribs,Recharge_Boundary_EastofCribs Sources ------- Sources are defined in a similar manner to the boundary conditions. Under the tag ``sources`` and series of individual ``source`` elements can be defined. Within each ``source`` element the ``assigned_regions`` and ``liquid_phase`` elements must appear. Sources can be applied to one or more region using a comma separated list of region names. Under the ``liquid_phase`` element the ``liquid_component`` element must be define. An unbounded number of ``solute_component`` elements and one ``geochemistry_component`` element may optionally be defined. Under the ``liquid_component`` and ``solute_component`` elements a time series of boundary conditions is defined using the boundary condition elements available in the table below. Each component element can only contain one type of source. Both elements also accept a *name* attribute to indicate the phase associated with the source. +-------------------------+--------------------+-----------------------------------+ |Liquid Phase Source Type | Attributes | Value Type | +=========================+====================+===================================+ |volume_weighted | | start | | double/time_constant/constant | |perm_weighted | | value | | double | | | | function | | ``linear | uniform | constant`` | +-------------------------+--------------------+-----------------------------------+ For the solute component, the source available is ``aqueous_conc`` which has the attributes *name*, *value*, *function*, and *start*. The function options available are *uniform*, *linear*, and *constant*. An example ``sources`` element looks like the following. .. code-block:: xml Well Outputs ------- Output data from Amanzi is currently organized into four specific elements: `"Vis`", `"Checkpoint`", `"Observations`", and `"Walkabout Data`". Each of these is controlled in different ways, reflecting their intended use. * `"Visualization`" is intended to represent snapshots of the solution at defined instances during the simulation to be visualized. The ``vis`` element defines the naming and frequency of saving the visualization files. The visualization files may include only a fraction of the state data, and may contain auxiliary "derived" information. * `"Checkpoint`" is intended to represent all that is necessary to repeat or continue an Amanzi run. The specific data contained in a checkpoint dump is specific to the algorithm options and mesh framework selected. Checkpoint is special in that no interpolation is performed prior to writing the data files; the raw binary state is necessary. As a result, the user is allowed to only write checkpoint at the discrete intervals of the simulation. The ``checkpoint`` element defines the naming and frequency of saving the checkpoint files. * `"Observations`" is intended to represent diagnostic values to be returned to the calling routine from Amanzi's simulation driver. Observations are typically generated at arbitrary times, and frequently involve various point samplings and volumetric reductions that are interpolated in time to the desired instant. Observations may involve derived quantities or state fields. The ``observations`` element may define one or more specific observation. * `"Walkabout Data`" is intended to be used as input to the particle tracking software Walkabout. NOTE: Each output type allows the user to specify the base_filename or filename for the output to be written to. The string format of the element allows the user to specify the relative path of the file. It should be noted that the Amanzi I/O library does not create any new directories. Therefore, if a relative path to a location other than the current directory is specified Amanzi assumes the user (or the Agni controller) has already created any new directories. If the relative path does not exist the user will see error meesages from the HDF5 library indicating failure to create and open the output file. Vis ___ The ``vis`` element defines the visualization file naming scheme and how often to write out the files. The ``base_filename`` element contain the text component of the how the visualization files will be named. The ``base_filename`` is appended with an index number to indicate the sequential order of the visualization files. The ``num_digits`` elements indicates how many digits to use for the index. See the about NOTE about specifying a file location other than the current working directory. Finally, the ``time_macros`` or ``cycle_macros`` element indicates previously defined time_macros or cycle_macros to be used to determine the frequency at which to write the visualization files. One or more macro can be listed in a comma separated list. Amanzi will converted the list of macros to a single list of times or cycles contained by all of the macros listed and output accordingly. The ``vis`` element also includes an optional subelement ``write_regions``. This was primarily implemented for debugging purposes but is also useful for visualizing fields only on specific regions. The subelement accepts an arbitrary number of subelements named ``field``, with attibutes ``name`` (a string) and ``regions`` (a comma separated list of region names). For each such subelement, a field will be created in the vis files using the name as a label. The field will be initialized to 0, and then, for region list R1, R2, R3..., cells in R1 will be set to 1, cells in R2 will be set to 2, etc. When regions in the list overlap, later ones in the list will take precedence. An example ``vis`` element looks like the following. .. code-block:: xml plot 5 Macro 1 Checkpoint __________ The ``checkpoint`` element defines the file naming scheme and frequency for writing out the checkpoint files. The ``base_filename`` element contains the text component of the how the checkpoint files will be named. The ``base_filename`` is appended with an index number to indicate the sequential order of the checkpoint files. The ``num_digits`` elements indicates how many digits to use for the index. See the about NOTE about specifying a file location other than the current working directory. Finally, the ``cycle_macro`` element indicates the previously defined cycle_macro to be used to determine the frequency at which to write the checkpoint files. An example ``checkpoint`` element looks like the following. .. code-block:: xml chk 5 Every_1000_steps Observations ____________ The ``observations`` element defines the file for writing observations to and specifies individual observations to be made. At this time, all observations are written to a single file defined in the ``filename`` element. See the about NOTE about specifying a file location other than the current working directory. Also, observations are only available for the liquid phases. Therefore individual observations are defined in subelements under the ``liquid_phase`` tag. The ``liquid_phase`` tag takes an attribute ``name`` to identify which phase the observations are associated with. The element name of individual observations indicate the quantity being observed. Below is a list of currently available observations. Individual observations require the subelements ``assigned_regions``, ``functional``, and ``time_macros``. ``aqueous_conc`` and ``primary_volumetric_flow_rate`` observations also require the name of the primary. This is specified with an extra subelement ``primary``. Available Observations: - integrated_mass - volumetric_water_content - gravimetric_water_content - aqueous_pressure - x_aqueous_volumetric_flux - y_aqueous_volumetric_flux - z_aqueous_volumetric_flux - material_id - hydraulic_head - aqueous_mass_flow_rate - aqueous_volumetric_flow_rate - aqueous_conc - drawdown - primary_volumetric_flow_rate An example ``observations`` element looks like the following. .. code-block:: xml observation.out Obs_r1 point Observation Times Obs_r2 point Observation Times Obs_r2 point Observation Times .. _Akuna : http://esd.lbl.gov/research/projects/ascem/thrusts/platform/ .. _Mathematical Formulation Requirements and Specifications for the Process Models: http://software.lanl.gov/ascem/trac/attachment/wiki/Documents/ASCEM-HPC-ProcessModels_2011-01-0a.pdf Walkabout _________ The ''walkabout'' element defines the file naming scheme and frequency for writing out the walkabout files. As mentioned above, the user does not influence what is written to the walkabout files only the writing frequency and naming scheme. Thus, the ''walkabout'' element requires the subelements ``base_filename``, ``num_digits``, and ``cycle_macro``. The *base_filename* element contain the text component of the how the walkabout files will be named. The *base_filename* is appended with an index number to indicate the seqential order of the walkabout files. The *num_digits* elements indicates how many digits to use for the index. Final the *cycle_macro* element indicates the previously defined cycle_macro to be used to determine the frequency at which to write the walkabout files. Example: .. code-block:: xml chk 5 Every_100_steps