OGS
KineticReactant2.prj
<OpenGeoSysProject>
  <meshes>
    <mesh>KineticReactant2.vtu</mesh>
    <mesh>KineticReactant2_upstream.vtu</mesh>
    <mesh>KineticReactant2_downstream.vtu</mesh>
    <mesh>KineticReactant2_ReactiveDomain.vtu</mesh>
  </meshes>
  <processes>
    <process>
      <name>hc</name>
      <type>ComponentTransport</type>
      <integration_order>2</integration_order>
      <coupling_scheme>staggered</coupling_scheme>
      <process_variables>
        <concentration>H</concentration>
        <concentration>Synthetica</concentration>
        <concentration>Syntheticb</concentration>
        <concentration>Productd</concentration>
        <pressure>pressure</pressure>
      </process_variables>
      <specific_body_force>0</specific_body_force>
      <secondary_variables>
        <secondary_variable internal_name="darcy_velocity" output_name="darcy_velocity" />
      </secondary_variables>
    </process>
  </processes>
  <media>
    <medium id="0">
      <phases>
        <phase>
          <type>AqueousLiquid</type>
          <components>
            <component>
              <name>H</name>
              <properties>
                <property>
                  <name>pore_diffusion</name>
                  <type>Constant</type>
                  <value>1e-7</value>
                </property>
                <property>
                  <name>retardation_factor</name>
                  <type>Constant</type>
                  <value>1</value>
                </property>
                <property>
                  <name>decay_rate</name>
                  <type>Parameter</type>
                  <parameter_name>decay</parameter_name>
                </property>
              </properties>
            </component>
            <component>
              <name>Synthetica</name>
              <properties>
                <property>
                  <name>pore_diffusion</name>
                  <type>Constant</type>
                  <value>1e-12</value>
                </property>
                <property>
                  <name>retardation_factor</name>
                  <type>Constant</type>
                  <value>1</value>
                </property>
                <property>
                  <name>decay_rate</name>
                  <type>Parameter</type>
                  <parameter_name>decay</parameter_name>
                </property>
              </properties>
            </component>
            <component>
              <name>Syntheticb</name>
              <properties>
                <property>
                  <name>pore_diffusion</name>
                  <type>Constant</type>
                  <value>1e-12</value>
                </property>
                <property>
                  <name>retardation_factor</name>
                  <type>Constant</type>
                  <value>1</value>
                </property>
                <property>
                  <name>decay_rate</name>
                  <type>Parameter</type>
                  <parameter_name>decay</parameter_name>
                </property>
              </properties>
            </component>
            <component>
              <name>Productd</name>
              <properties>
                <property>
                  <name>pore_diffusion</name>
                  <type>Constant</type>
                  <value>1e-12</value>
                </property>
                <property>
                  <name>retardation_factor</name>
                  <type>Constant</type>
                  <value>1</value>
                </property>
                <property>
                  <name>decay_rate</name>
                  <type>Parameter</type>
                  <parameter_name>decay</parameter_name>
                </property>
              </properties>
            </component>
          </components>
          <properties>
            <property>
              <name>density</name>
              <type>Constant</type>
              <value>1e3</value>
            </property>
            <property>
              <name>viscosity</name>
              <type>Constant</type>
              <value>1e-3</value>
            </property>
          </properties>
        </phase>
        <phase>
          <type>Solid</type>
          <components>
            <component>
              <name>Synthetics_to_Productd</name>
              <properties>
                <property>
                  <name>molality</name>
                  <type>Constant</type>
                  <value>1.0</value>
                </property>
              </properties>
            </component>
          </components>
        </phase>
      </phases>
      <properties>
        <property>
          <name>permeability</name>
          <type>Parameter</type>
          <parameter_name>kappa</parameter_name>
        </property>
        <property>
          <name>porosity</name>
          <type>Parameter</type>
          <parameter_name>porosity</parameter_name>
        </property>
        <property>
          <name>longitudinal_dispersivity</name>
          <type>Constant</type>
          <value>0</value>
        </property>
        <property>
          <name>transversal_dispersivity</name>
          <type>Constant</type>
          <value>0</value>
        </property>
      </properties>
    </medium>
  </media>
  <time_loop>
    <global_process_coupling>
      <max_iter>6</max_iter>
      <convergence_criteria>
        <convergence_criterion>
          <type>DeltaX</type>
          <norm_type>NORM2</norm_type>
          <reltol>1e-14</reltol>
        </convergence_criterion>
        <convergence_criterion>
          <type>DeltaX</type>
          <norm_type>NORM2</norm_type>
          <reltol>1e-14</reltol>
        </convergence_criterion>
        <convergence_criterion>
          <type>DeltaX</type>
          <norm_type>NORM2</norm_type>
          <reltol>1e-14</reltol>
        </convergence_criterion>
        <convergence_criterion>
          <type>DeltaX</type>
          <norm_type>NORM2</norm_type>
          <reltol>1e-14</reltol>
        </convergence_criterion>
        <convergence_criterion>
          <type>DeltaX</type>
          <norm_type>NORM2</norm_type>
          <reltol>1e-14</reltol>
        </convergence_criterion>
      </convergence_criteria>
    </global_process_coupling>
    <processes>
      <process ref="hc">
        <nonlinear_solver>basic_picard</nonlinear_solver>
        <convergence_criterion>
          <type>DeltaX</type>
          <norm_type>NORM2</norm_type>
          <reltol>1e-14</reltol>
        </convergence_criterion>
        <time_discretization>
          <type>BackwardEuler</type>
        </time_discretization>
        <time_stepping>
          <type>FixedTimeStepping</type>
          <t_initial>0.0</t_initial>
          <t_end>21000</t_end>
          <timesteps>
            <pair>
              <repeat>210</repeat>
              <delta_t>100</delta_t>
            </pair>
          </timesteps>
        </time_stepping>
      </process>
      <process ref="hc">
        <nonlinear_solver>basic_picard</nonlinear_solver>
        <convergence_criterion>
          <type>DeltaX</type>
          <norm_type>NORM2</norm_type>
          <reltol>1e-14</reltol>
        </convergence_criterion>
        <time_discretization>
          <type>BackwardEuler</type>
        </time_discretization>
        <time_stepping>
          <type>FixedTimeStepping</type>
          <t_initial>0.0</t_initial>
          <t_end>21000</t_end>
          <timesteps>
            <pair>
              <repeat>210</repeat>
              <delta_t>100</delta_t>
            </pair>
          </timesteps>
        </time_stepping>
      </process>
      <process ref="hc">
        <nonlinear_solver>basic_picard</nonlinear_solver>
        <convergence_criterion>
          <type>DeltaX</type>
          <norm_type>NORM2</norm_type>
          <reltol>1e-14</reltol>
        </convergence_criterion>
        <time_discretization>
          <type>BackwardEuler</type>
        </time_discretization>
        <time_stepping>
          <type>FixedTimeStepping</type>
          <t_initial>0.0</t_initial>
          <t_end>21000</t_end>
          <timesteps>
            <pair>
              <repeat>210</repeat>
              <delta_t>100</delta_t>
            </pair>
          </timesteps>
        </time_stepping>
      </process>
      <process ref="hc">
        <nonlinear_solver>basic_picard</nonlinear_solver>
        <convergence_criterion>
          <type>DeltaX</type>
          <norm_type>NORM2</norm_type>
          <reltol>1e-14</reltol>
        </convergence_criterion>
        <time_discretization>
          <type>BackwardEuler</type>
        </time_discretization>
        <time_stepping>
          <type>FixedTimeStepping</type>
          <t_initial>0.0</t_initial>
          <t_end>21000</t_end>
          <timesteps>
            <pair>
              <repeat>210</repeat>
              <delta_t>100</delta_t>
            </pair>
          </timesteps>
        </time_stepping>
      </process>
      <process ref="hc">
        <nonlinear_solver>basic_picard</nonlinear_solver>
        <convergence_criterion>
          <type>DeltaX</type>
          <norm_type>NORM2</norm_type>
          <reltol>1e-14</reltol>
        </convergence_criterion>
        <time_discretization>
          <type>BackwardEuler</type>
        </time_discretization>
        <time_stepping>
          <type>FixedTimeStepping</type>
          <t_initial>0.0</t_initial>
          <t_end>21000</t_end>
          <timesteps>
            <pair>
              <repeat>210</repeat>
              <delta_t>100</delta_t>
            </pair>
          </timesteps>
        </time_stepping>
      </process>
    </processes>
    <output>
      <type>VTK</type>
      <prefix>KineticReactant2</prefix>
      <suffix>ts{:timestep}_t_{:time}</suffix>
      <timesteps>
        <pair>
          <repeat>24</repeat>
          <each_steps>42</each_steps>
        </pair>
      </timesteps>
      <variables>
        <variable>H</variable>
        <variable>Synthetica</variable>
        <variable>Syntheticb</variable>
        <variable>Productd</variable>
        <variable>pressure</variable>
        <variable>darcy_velocity</variable>
      </variables>
    </output>
  </time_loop>
  <chemical_system chemical_solver="Phreeqc">
    <mesh>KineticReactant2_ReactiveDomain</mesh>
    <linear_solver>general_linear_solver</linear_solver>
    <database>test.dat</database>
    <solution>
      <temperature>25</temperature>
      <pressure>1</pressure>
      <pe>4</pe>
      <components>
        <component>Synthetica</component>
        <component>Syntheticb</component>
        <component>Productd</component>
      </components>
    </solution>
    <kinetic_reactants>
      <kinetic_reactant>
        <name>Synthetics_to_Productd</name>
        <chemical_formula>Productd 1 Synthetica -1 Syntheticb -0.5</chemical_formula>
      </kinetic_reactant>
    </kinetic_reactants>
    <rates>
      <rate>
        <kinetic_reactant>Synthetics_to_Productd</kinetic_reactant>
        <expression>
          <statement>Km = 10</statement>
          <statement>U = 1e-4</statement>
          <statement>rate = U * TOT("Synthetica") / (Km + TOT("Syntheticb"))</statement>
          <statement>moles = rate * TIME</statement>
          <statement>save moles</statement>
        </expression>
      </rate>
    </rates>
    <knobs>
      <max_iter>100</max_iter>
      <relative_convergence_tolerance>1e-12</relative_convergence_tolerance>
      <tolerance>1e-15</tolerance>
      <step_size>100</step_size>
      <scaling>0</scaling>
    </knobs>
  </chemical_system>
  <parameters>
    <parameter>
      <name>kappa</name>
      <type>Constant</type>
      <values>1.157e-12</values>
    </parameter>
    <parameter>
      <name>porosity</name>
      <type>Constant</type>
      <value>1</value>
    </parameter>
    <parameter>
      <name>retardation</name>
      <type>Constant</type>
      <value>1</value>
    </parameter>
    <parameter>
      <name>decay</name>
      <type>Constant</type>
      <value>0</value>
    </parameter>
    <parameter>
      <name>p0</name>
      <type>Constant</type>
      <value>1e5</value>
    </parameter>
    <parameter>
      <name>p_upstream</name>
      <type>Constant</type>
      <value>1e5</value>
    </parameter>
    <parameter>
      <name>p_downstream_Neumann</name>
      <type>Constant</type>
      <value>-1.685e-2</value>
    </parameter>
    <parameter>
      <name>c0_H</name>
      <type>Constant</type>
      <value>1e-7</value>
    </parameter>
    <parameter>
      <name>c0_Synthetica</name>
      <type>Constant</type>
      <value>0.5</value>
    </parameter>
    <parameter>
      <name>c0_Syntheticb</name>
      <type>Constant</type>
      <value>0.5</value>
    </parameter>
    <parameter>
      <name>c0_Productd</name>
      <type>Constant</type>
      <value>0.0</value>
    </parameter>
    <parameter>
      <name>c_H</name>
      <type>Constant</type>
      <value>1e-7</value>
    </parameter>
    <parameter>
      <name>c_Synthetica</name>
      <type>Constant</type>
      <value>0.5</value>
    </parameter>
    <parameter>
      <name>c_Syntheticb</name>
      <type>Constant</type>
      <value>0.5</value>
    </parameter>
    <parameter>
      <name>c_Productd</name>
      <type>Constant</type>
      <value>0.00</value>
    </parameter>
  </parameters>
  <process_variables>
    <process_variable>
      <name>pressure</name>
      <components>1</components>
      <order>1</order>
      <initial_condition>p0</initial_condition>
      <boundary_conditions>
        <boundary_condition>
          <mesh>KineticReactant2_upstream</mesh>
          <type>Dirichlet</type>
          <parameter>p_upstream</parameter>
        </boundary_condition>
        <boundary_condition>
          <mesh>KineticReactant2_downstream</mesh>
          <type>Neumann</type>
          <parameter>p_downstream_Neumann</parameter>
        </boundary_condition>
      </boundary_conditions>
    </process_variable>
    <process_variable>
      <name>H</name>
      <components>1</components>
      <order>1</order>
      <initial_condition>c0_H</initial_condition>
      <boundary_conditions>
        <boundary_condition>
          <mesh>KineticReactant2_upstream</mesh>
          <type>Dirichlet</type>
          <parameter>c_H</parameter>
        </boundary_condition>
      </boundary_conditions>
    </process_variable>
    <process_variable>
      <name>Synthetica</name>
      <components>1</components>
      <order>1</order>
      <initial_condition>c0_Synthetica</initial_condition>
      <boundary_conditions>
        <boundary_condition>
          <mesh>KineticReactant2_upstream</mesh>
          <type>Dirichlet</type>
          <parameter>c_Synthetica</parameter>
        </boundary_condition>
      </boundary_conditions>
    </process_variable>
    <process_variable>
      <name>Syntheticb</name>
      <components>1</components>
      <order>1</order>
      <initial_condition>c0_Syntheticb</initial_condition>
      <boundary_conditions>
        <boundary_condition>
          <mesh>KineticReactant2_upstream</mesh>
          <type>Dirichlet</type>
          <parameter>c_Syntheticb</parameter>
        </boundary_condition>
      </boundary_conditions>
    </process_variable>
    <process_variable>
      <name>Productd</name>
      <components>1</components>
      <order>1</order>
      <initial_condition>c0_Productd</initial_condition>
      <boundary_conditions>
        <boundary_condition>
          <mesh>KineticReactant2_upstream</mesh>
          <type>Dirichlet</type>
          <parameter>c_Productd</parameter>
        </boundary_condition>
      </boundary_conditions>
    </process_variable>
  </process_variables>
  <nonlinear_solvers>
    <nonlinear_solver>
      <name>basic_picard</name>
      <type>Picard</type>
      <max_iter>10</max_iter>
      <linear_solver>general_linear_solver</linear_solver>
    </nonlinear_solver>
  </nonlinear_solvers>
  <linear_solvers>
    <linear_solver>
      <name>general_linear_solver</name>
      <eigen>
        <solver_type>BiCGSTAB</solver_type>
        <precon_type>ILUT</precon_type>
        <max_iteration_step>10000</max_iteration_step>
        <error_tolerance>1e-14</error_tolerance>
      </eigen>
    </linear_solver>
  </linear_solvers>
  <test_definition>
    <vtkdiff>
      <regex>KineticReactant2_ts_[0-9]*_t_[0-9]*.000000.vtu</regex>
      <field>pressure</field>
      <absolute_tolerance>1e-6</absolute_tolerance>
      <relative_tolerance>1e-10</relative_tolerance>
    </vtkdiff>
    <vtkdiff>
      <regex>KineticReactant2_ts_[0-9]*_t_[0-9]*.000000.vtu</regex>
      <field>Synthetica</field>
      <absolute_tolerance>1e-10</absolute_tolerance>
      <relative_tolerance>1e-16</relative_tolerance>
    </vtkdiff>
    <vtkdiff>
      <regex>KineticReactant2_ts_[0-9]*_t_[0-9]*.000000.vtu</regex>
      <field>Syntheticb</field>
      <absolute_tolerance>1e-10</absolute_tolerance>
      <relative_tolerance>1e-16</relative_tolerance>
    </vtkdiff>
    <vtkdiff>
      <regex>KineticReactant2_ts_[0-9]*_t_[0-9]*.000000.vtu</regex>
      <field>Productd</field>
      <absolute_tolerance>1e-10</absolute_tolerance>
      <relative_tolerance>1e-16</relative_tolerance>
    </vtkdiff>
    <vtkdiff>
      <regex>KineticReactant2_ts_[0-9]*_t_[0-9]*.000000.vtu</regex>
      <field>H</field>
      <absolute_tolerance>1e-10</absolute_tolerance>
      <relative_tolerance>1e-16</relative_tolerance>
    </vtkdiff>
  </test_definition>
</OpenGeoSysProject>