OGS
only_grad_c.prj
<OpenGeoSysProject>
  <meshes>
    <mesh>mesh_2D.vtu</mesh>
    <mesh>geometry_right.vtu</mesh>
    <mesh>geometry_left.vtu</mesh>
  </meshes>
  <processes>
    <process>
      <name>HC</name>
      <type>ComponentTransport</type>
      <integration_order>4</integration_order>
      <process_variables>
        <concentration>C</concentration>
        <pressure>pressure</pressure>
      </process_variables>
      <secondary_variables>
        <secondary_variable internal_name="darcy_velocity" output_name="darcy_velocity" />
        <secondary_variable internal_name="CFlux" output_name="CFlux" />
      </secondary_variables>
      <specific_body_force>0 0</specific_body_force>
    </process>
  </processes>
  <media>
    <medium id="0">
      <phases>
        <phase>
          <type>AqueousLiquid</type>
          <components>
            <component>
              <name>C</name>
              <properties>
                <property>
                  <name>pore_diffusion</name>
                  <type>Constant</type>
                  <value>1.e-9</value>
                </property>
                <property>
                  <name>retardation_factor</name>
                  <type>Constant</type>
                  <value>1.0</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>1</value>
            </property>
            <property>
              <name>viscosity</name>
              <type>Constant</type>
              <value>1.0</value>
            </property>
          </properties>
        </phase>
      </phases>
      <properties>
        <property>
          <name>permeability</name>
          <type>Constant</type>
          <value>1.e-9</value>
        </property>
        <property>
          <name>porosity</name>
          <type>Constant</type>
          <value>0.15</value>
        </property>
        <property>
          <name>longitudinal_dispersivity</name>
          <type>Constant</type>
          <value>0</value>
        </property>
        <property>
          <name>transversal_dispersivity</name>
          <type>Constant</type>
          <value>0.0</value>
        </property>
      </properties>
    </medium>
    <medium id="1">
      <phases>
        <phase>
          <type>AqueousLiquid</type>
          <components>
            <component>
              <name>C</name>
              <properties>
                <property>
                  <name>pore_diffusion</name>
                  <type>Constant</type>
                  <value>1.e-9</value>
                </property>
                <property>
                  <name>retardation_factor</name>
                  <type>Constant</type>
                  <value>1.0</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>1</value>
            </property>
            <property>
              <name>viscosity</name>
              <type>Constant</type>
              <value>1.0</value>
            </property>
          </properties>
        </phase>
      </phases>
      <properties>
        <property>
          <name>permeability</name>
          <type>Constant</type>
          <value>1.e-9</value>
        </property>
        <property>
          <name>porosity</name>
          <type>Constant</type>
          <value>0.65</value>
        </property>
        <property>
          <name>longitudinal_dispersivity</name>
          <type>Constant</type>
          <value>0</value>
        </property>
        <property>
          <name>transversal_dispersivity</name>
          <type>Constant</type>
          <value>0.0</value>
        </property>
      </properties>
    </medium>
  </media>
  <parameters>
    <parameter>
      <name>decay</name>
      <type>Constant</type>
      <value>0</value>
    </parameter>
    <parameter>
      <name>C_right</name>
      <type>Constant</type>
      <value>1</value>
    </parameter>
    <parameter>
      <name>C_left</name>
      <type>Constant</type>
      <value>0</value>
    </parameter>
    <parameter>
      <name>C_ini</name>
      <type>Function</type>
      <expression>var c1 := 1; var c0 := 0; var phi1 := 0.65; var phi0 := 0.15; var L := 0.8; var a0 := (c1 - c0) / (1 + phi0/phi1) * 2 / L; var a1 := (c1 - c0) / (1 + phi1/phi0) * 2 / L; var b0 := c0; var b1 := (2*c0 + c1 * (phi1/phi0 - 1)) / (1 + phi1/phi0); x < L/2 ? a0 * x + b0 : a1 * x + b1;</expression>
    </parameter>
    <parameter>
      <name>p0</name>
      <type>Constant</type>
      <value>0</value>
    </parameter>
    <parameter>
      <name>p1</name>
      <type>Constant</type>
      <value>0</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>geometry_left</mesh>
          <type>Dirichlet</type>
          <parameter>p1</parameter>
        </boundary_condition>
        <boundary_condition>
          <mesh>geometry_right</mesh>
          <type>Dirichlet</type>
          <parameter>p0</parameter>
        </boundary_condition>
      </boundary_conditions>
    </process_variable>
    <process_variable>
      <name>C</name>
      <components>1</components>
      <order>1</order>
      <initial_condition>C_ini</initial_condition>
      <boundary_conditions>
        <boundary_condition>
          <mesh>geometry_right</mesh>
          <type>Dirichlet</type>
          <parameter>C_right</parameter>
        </boundary_condition>
        <boundary_condition>
          <mesh>geometry_left</mesh>
          <type>Dirichlet</type>
          <parameter>C_left</parameter>
        </boundary_condition>
      </boundary_conditions>
    </process_variable>
  </process_variables>
  <time_loop>
    <processes>
      <process ref="HC">
        <nonlinear_solver>basic_picard</nonlinear_solver>
        <convergence_criterion>
          <type>PerComponentDeltaX</type>
          <norm_type>INFINITY_N</norm_type>
          <abstols>1e-15 1e-15</abstols>
        </convergence_criterion>
        <time_discretization>
          <type>BackwardEuler</type>
        </time_discretization>
        <time_stepping>
          <type>FixedTimeStepping</type>
          <t_initial>0.0</t_initial>
          <t_end>4e8</t_end>
          <timesteps>
            <pair>
              <repeat>4</repeat>
              <delta_t>1e8</delta_t>
            </pair>
          </timesteps>
        </time_stepping>
      </process>
    </processes>
    <output>
      <type>VTK</type>
      <prefix>only_grad_c</prefix>
      <timesteps>
        <pair>
          <repeat>1000</repeat>
          <each_steps>1</each_steps>
        </pair>
      </timesteps>
      <variables />
      <output_extrapolation_residuals>true</output_extrapolation_residuals>
    </output>
  </time_loop>
  <nonlinear_solvers>
    <nonlinear_solver>
      <name>basic_picard</name>
      <type>Picard</type>
      <max_iter>50</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>SparseLU</solver_type>
        <scaling>true</scaling>
      </eigen>
      <petsc>
        <prefix>hc</prefix>
        <parameters>-hc_ksp_type bcgs -hc_pc_type bjacobi -hc_ksp_rtol 1e-8 -hc_ksp_max_it 20000</parameters>
      </petsc>
    </linear_solver>
  </linear_solvers>
  <test_definition>
    <vtkdiff>
      <file>only_grad_c_ts_4_t_400000000.000000.vtu</file>
      <field>pressure</field>
      <absolute_tolerance>1e-15</absolute_tolerance>
      <relative_tolerance>0</relative_tolerance>
    </vtkdiff>
    <vtkdiff>
      <file>only_grad_c_ts_4_t_400000000.000000.vtu</file>
      <field>C</field>
      <absolute_tolerance>1.4e-12</absolute_tolerance>
      <relative_tolerance>0</relative_tolerance>
    </vtkdiff>
    <vtkdiff>
      <file>only_grad_c_ts_4_t_400000000.000000.vtu</file>
      <field>CFlux</field>
      <absolute_tolerance>4.1e-20</absolute_tolerance>
      <relative_tolerance>0</relative_tolerance>
    </vtkdiff>
    <vtkdiff>
      <file>only_grad_c_ts_4_t_400000000.000000.vtu</file>
      <field>CFlux_residual</field>
      <absolute_tolerance>4.0e-20</absolute_tolerance>
      <relative_tolerance>0</relative_tolerance>
    </vtkdiff>
    <vtkdiff>
      <file>only_grad_c_ts_4_t_400000000.000000.vtu</file>
      <field>darcy_velocity</field>
      <absolute_tolerance>1e-25</absolute_tolerance>
      <relative_tolerance>0</relative_tolerance>
    </vtkdiff>
    <vtkdiff>
      <file>only_grad_c_ts_4_t_400000000.000000.vtu</file>
      <field>darcy_velocity_residual</field>
      <absolute_tolerance>1e-25</absolute_tolerance>
      <relative_tolerance>0</relative_tolerance>
    </vtkdiff>
  </test_definition>
</OpenGeoSysProject>