OGS
Twophase_TCE_diffusion_1D_small.prj
<OpenGeoSysProject>
  <meshes>
    <mesh>domain.vtu</mesh>
    <mesh>top.vtu</mesh>
    <mesh>bottom.vtu</mesh>
    <mesh>sat_zone.vtu</mesh>
  </meshes>
  <processes>
    <process>
      <name>GW23</name>
      <type>THERMAL_TWOPHASE_WITH_PP</type>
      <integration_order>2</integration_order>
      <process_variables>
        <gas_pressure>gas_pressure</gas_pressure>
        <capillary_pressure>capillary_pressure</capillary_pressure>
        <total_molar_fraction_contaminant>Xc</total_molar_fraction_contaminant>
        <temperature>temperature</temperature>
      </process_variables>
      <jacobian_assembler>
        <type>CentralDifferences</type>
        <component_magnitudes>1e5 5e3 1e-9 300</component_magnitudes>
        <relative_epsilons>1e-6 1e-6 1e-6 1e-6</relative_epsilons>
      </jacobian_assembler>
      <secondary_variables>
        <secondary_variable internal_name="saturation" output_name="saturation" />
        <secondary_variable internal_name="pressure_wetting" output_name="pressure_wetting" />
        <secondary_variable internal_name="gas_molar_fraction_water" output_name="xwG" />
        <secondary_variable internal_name="liquid_molar_fraction_contaminant" output_name="xcL" />
        <secondary_variable internal_name="gas_molar_fraction_contaminant" output_name="xcG" />
      </secondary_variables>
      <specific_body_force>-9.81</specific_body_force>
      <mass_lumping>true</mass_lumping>
    </process>
  </processes>
  <media>
    <medium id="0">
      <phases>
        <phase>
          <type>AqueousLiquid</type>
          <components>
            <component>
              <name>c</name>
              <properties>
                <property>
                  <name>pore_diffusion</name>
                  <type>Function</type>
                  <value>
                    <expression>9.1e-10 * 0.38^(1/3) * liquid_saturation^(7/3)</expression>
                  </value>
                </property>
              </properties>
            </component>
          </components>
          <properties>
            <property>
              <name>viscosity</name>
              <type>Constant</type>
              <value>1.0e-3</value>
            </property>
            <property>
              <name>specific_heat_capacity</name>
              <type>Constant</type>
              <value>4187</value>
            </property>
            <property>
              <name>density</name>
              <type>Constant</type>
              <value>1.e3</value>
            </property>
          </properties>
        </phase>
        <phase>
          <type>Gas</type>
          <components>
            <component>
              <name>a</name>
              <properties>
                <property>
                  <name>molar_mass</name>
                  <type>Constant</type>
                  <value>0.028964397787206768</value>
                </property>
                <property>
                  <name>specific_heat_capacity</name>
                  <type>Constant</type>
                  <value>733</value>
                </property>
              </properties>
            </component>
            <component>
              <name>w</name>
              <properties>
                <property>
                  <name>molar_mass</name>
                  <type>Constant</type>
                  <value>0.018016</value>
                </property>
                <property>
                  <name>pore_diffusion</name>
                  <type>Function</type>
                  <value>
                    <expression>2.6e-6 * 0.38^(1/3) * (1.-liquid_saturation)^(7/3)</expression>
                  </value>
                </property>
                <property>
                  <name>specific_heat_capacity</name>
                  <type>Constant</type>
                  <value>4187</value>
                </property>
                <property>
                  <name>specific_latent_heat</name>
                  <type>Constant</type>
                  <value>2258000</value>
                </property>
                <property>
                  <name>vapour_pressure</name>
                  <type>Constant</type>
                  <value>1</value>
                </property>
              </properties>
            </component>
            <component>
              <name>c</name>
              <properties>
                <property>
                  <name>molar_mass</name>
                  <type>Constant</type>
                  <value>0.1314</value>
                </property>
                <property>
                  <name>henry_coefficient</name>
                  <type>Constant</type>
                  <value>1.062e-3</value>
                </property>
                <property>
                  <name>pore_diffusion</name>
                  <type>Function</type>
                  <value>
                    <expression>8.3e-6 * 0.38^(1/3) * (1.-liquid_saturation)^(7/3)</expression>
                  </value>
                </property>
                <property>
                  <name>specific_heat_capacity</name>
                  <type>Constant</type>
                  <value>1</value>
                </property>
              </properties>
            </component>
          </components>
          <properties>
            <property>
              <name>density</name>
              <type>IdealGasLaw</type>
            </property>
            <property>
              <name>viscosity</name>
              <type>Constant</type>
              <value>1.851e-5</value>
            </property>
          </properties>
        </phase>
        <phase>
          <type>Solid</type>
          <properties>
            <property>
              <name>density</name>
              <type>Constant</type>
              <value>2650</value>
            </property>
            <property>
              <name>specific_heat_capacity</name>
              <type>Constant</type>
              <value>750</value>
            </property>
          </properties>
        </phase>
      </phases>
      <properties>
        <property>
          <name>porosity</name>
          <type>Constant</type>
          <value>0.38</value>
        </property>
        <property>
          <name>permeability</name>
          <type>Constant</type>
          <value>1.18e-11</value>
        </property>
        <property>
          <name>saturation</name>
          <type>SaturationVanGenuchten</type>
          <residual_liquid_saturation>0.0</residual_liquid_saturation>
          <residual_gas_saturation>0.0</residual_gas_saturation>
          <exponent>0.8</exponent>
          <p_b>1635</p_b>
        </property>
        <property>
          <name>relative_permeability</name>
          <type>RelativePermeabilityVanGenuchten</type>
          <residual_liquid_saturation>0.0</residual_liquid_saturation>
          <residual_gas_saturation>0.0</residual_gas_saturation>
          <exponent>0.8</exponent>
          <minimum_relative_permeability_liquid>0</minimum_relative_permeability_liquid>
        </property>
        <property>
          <name>relative_permeability_nonwetting_phase</name>
          <type>RelativePermeabilityNonWettingPhaseVanGenuchtenMualem</type>
          <residual_liquid_saturation>0.0</residual_liquid_saturation>
          <residual_gas_saturation>0.0</residual_gas_saturation>
          <exponent>0.8</exponent>
          <min_relative_permeability>1e-8</min_relative_permeability>
        </property>
        <property>
          <name>thermal_conductivity</name>
          <type>Constant</type>
          <value>1</value>
        </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>
  <parameters>
    <parameter>
      <name>pc_Dirichlet_bottom</name>
      <type>Constant</type>
      <value>0</value>
    </parameter>
    <parameter>
      <name>pg_Dirichlet_bottom</name>
      <type>Constant</type>
      <value>105319</value>
    </parameter>
    <parameter>
      <name>pg_Dirichlet_top</name>
      <type>Constant</type>
      <value>101325.0</value>
    </parameter>
    <parameter>
      <name>pc_0</name>
      <type>MeshNode</type>
      <field_name>Pc_0</field_name>
    </parameter>
    <parameter>
      <name>pg_0</name>
      <type>MeshNode</type>
      <field_name>Pg_0</field_name>
    </parameter>
    <parameter>
      <name>T_0</name>
      <type>Constant</type>
      <value>298.15</value>
    </parameter>
    <parameter>
      <name>Xc_0</name>
      <type>Constant</type>
      <value>0</value>
    </parameter>
    <parameter>
      <name>Xc_Dirichlet_sat_zone</name>
      <type>Constant</type>
      <value>1e-6</value>
    </parameter>
  </parameters>
  <time_loop>
    <processes>
      <process ref="GW23">
        <nonlinear_solver>basic_newton</nonlinear_solver>
        <convergence_criterion>
          <type>PerComponentDeltaX</type>
          <norm_type>NORM2</norm_type>
          <reltols>1.e-6 1.e-6 1e-6 1e-6</reltols>
        </convergence_criterion>
        <time_discretization>
          <type>BackwardEuler</type>
        </time_discretization>
        <time_stepping>
          <type>FixedTimeStepping</type>
          <t_initial>0</t_initial>
          <t_end>1e6</t_end>
          <timesteps>
            <pair>
              <repeat>100</repeat>
              <delta_t>10000</delta_t>
            </pair>
          </timesteps>
        </time_stepping>
      </process>
    </processes>
    <output>
      <type>VTK</type>
      <prefix>Twophase_TCE_diffusion_1D</prefix>
      <timesteps>
        <pair>
          <repeat>1</repeat>
          <each_steps>100</each_steps>
        </pair>
      </timesteps>
      <output_iteration_results>false</output_iteration_results>
      <variables>
        <variable>capillary_pressure</variable>
        <variable>gas_pressure</variable>
        <variable>Xc</variable>
        <variable>saturation</variable>
        <variable>pressure_wetting</variable>
        <variable>temperature</variable>
        <variable>xwG</variable>
        <variable>xcG</variable>
        <variable>xcL</variable>
      </variables>
      <suffix>ts{:timestep}_t_{:time}</suffix>
    </output>
  </time_loop>
  <process_variables>
    <process_variable>
      <name>capillary_pressure</name>
      <components>1</components>
      <order>1</order>
      <initial_condition>pc_0</initial_condition>
      <boundary_conditions>
        <boundary_condition>
          <mesh>bottom</mesh>
          <type>Dirichlet</type>
          <parameter>pc_Dirichlet_bottom</parameter>
        </boundary_condition>
      </boundary_conditions>
    </process_variable>
    <process_variable>
      <name>gas_pressure</name>
      <components>1</components>
      <order>1</order>
      <initial_condition>pg_0</initial_condition>
      <boundary_conditions>
        <boundary_condition>
          <mesh>top</mesh>
          <type>Dirichlet</type>
          <parameter>pg_Dirichlet_top</parameter>
        </boundary_condition>
        <boundary_condition>
          <mesh>bottom</mesh>
          <type>Dirichlet</type>
          <parameter>pg_Dirichlet_bottom</parameter>
        </boundary_condition>
      </boundary_conditions>
    </process_variable>
    <process_variable>
      <name>Xc</name>
      <components>1</components>
      <order>1</order>
      <initial_condition>Xc_0</initial_condition>
      <boundary_conditions>
        <boundary_condition>
          <mesh>top</mesh>
          <type>Dirichlet</type>
          <parameter>Xc_0</parameter>
        </boundary_condition>
        <boundary_condition>
          <mesh>sat_zone</mesh>
          <type>Dirichlet</type>
          <parameter>Xc_Dirichlet_sat_zone</parameter>
        </boundary_condition>
      </boundary_conditions>
    </process_variable>
    <process_variable>
      <name>temperature</name>
      <components>1</components>
      <order>1</order>
      <initial_condition>T_0</initial_condition>
      <boundary_conditions>
        <boundary_condition>
          <mesh>domain</mesh>
          <type>Dirichlet</type>
          <parameter>T_0</parameter>
        </boundary_condition>
      </boundary_conditions>
    </process_variable>
  </process_variables>
  <nonlinear_solvers>
    <nonlinear_solver>
      <name>basic_newton</name>
      <type>Newton</type>
      <max_iter>20</max_iter>
      <linear_solver>general_linear_solver</linear_solver>
    </nonlinear_solver>
  </nonlinear_solvers>
  <linear_solvers>
    <linear_solver>
      <name>general_linear_solver</name>
      <lis>-i bicgstab -p ilu -tol 1e-18 -maxiter 10000</lis>
      <eigen>
        <solver_type>BiCGSTAB</solver_type>
        <scaling>true</scaling>
        <precon_type>ILUT</precon_type>
        <max_iteration_step>10000</max_iteration_step>
        <error_tolerance>1e-18</error_tolerance>
      </eigen>
      <petsc>
        <prefix>multiphase</prefix>
        <parameters>-gw_ksp_type cg -gw_pc_type bjacobi -gw_ksp_rtol 1e-16 -gw_ksp_max_it 10000</parameters>
      </petsc>
    </linear_solver>
  </linear_solvers>
</OpenGeoSysProject>