<?xml version="1.0" encoding="ISO-8859-1"?>
<OpenGeoSysProject>
    <meshes>
        <mesh>mesh_basin_domain.vtu</mesh>
        <mesh>mesh_basin_physical_group_Left.vtu</mesh>
        <mesh>mesh_basin_physical_group_Right.vtu</mesh>
        <mesh>mesh_basin_physical_group_Bottom.vtu</mesh>
        <mesh>mesh_basin_physical_group_Top.vtu</mesh>
    </meshes>
    <python_script>timeBCs_glacier.py</python_script>
    <processes>
        <process>
            <name>SD</name>
            <type>SMALL_DEFORMATION</type>
            <!--define the numerical integration order -->
            <!--(polynomial degree to which exact integration is possible) -->
            <integration_order>2</integration_order>
            <!--define the constitutive behavior with regard to the MaterialID -->
            <constitutive_relation id="0">
                <!-- soft sediment layer -->
                <type>LinearElasticIsotropic</type>
                <youngs_modulus>YoungModulus</youngs_modulus>
                <poissons_ratio>PoissonRatio</poissons_ratio>
            </constitutive_relation>
            <constitutive_relation id="1">
                <!-- stiff sediment layer -->
                <type>LinearElasticIsotropic</type>
                <youngs_modulus>YoungModulus</youngs_modulus>
                <poissons_ratio>PoissonRatio</poissons_ratio>
            </constitutive_relation>
            <constitutive_relation id="2">
                <!-- soft sediment layer -->
                <type>LinearElasticIsotropic</type>
                <youngs_modulus>YoungModulus</youngs_modulus>
                <poissons_ratio>PoissonRatio</poissons_ratio>
            </constitutive_relation>
            <constitutive_relation id="3">
                <!-- very stiff rock bed -->
                <type>LinearElasticIsotropic</type>
                <youngs_modulus>YoungModulus</youngs_modulus>
                <poissons_ratio>PoissonRatio</poissons_ratio>
            </constitutive_relation>
            <specific_body_force>0 -9.81</specific_body_force>
            <process_variables>
                <process_variable>displacement</process_variable>
            </process_variables>
            <!--define the output quantities derived from the primary variables-->
            <secondary_variables>
                <secondary_variable name="sigma"/>
                <secondary_variable name="epsilon"/>
            </secondary_variables>
        </process>
    </processes>
    <time_loop>
        <processes>
            <process ref="SD">
                <nonlinear_solver>basic_newton</nonlinear_solver>
                <convergence_criterion>
                    <type>DeltaX</type>
                    <norm_type>INFINITY_N</norm_type>
                    <abstol>1e-14</abstol>
                </convergence_criterion>
                <time_discretization>
                    <type>BackwardEuler</type>
                </time_discretization>
                <time_stepping>
                    <type>FixedTimeStepping</type>
                    <t_initial>0</t_initial>
                    <t_end>1</t_end>
                    <!-- purely elastic problem: time scale irrelevant -->
                    <timesteps>
                        <pair>
                            <repeat>100</repeat>
                            <delta_t>0.01</delta_t>
                            <!-- i.e.: repeat a hundred times a time step with size of delta_t -->
                        </pair>
                    </timesteps>
                </time_stepping>
            </process>
        </processes>
        <output>
            <type>VTK</type>
            <prefix>OGSoutput_basin</prefix>
            <timesteps>
                <pair>
                    <repeat>100</repeat>
                    <each_steps>1</each_steps>
                    <!-- i.e.: do a hundred times the output at each step -->
                </pair>
            </timesteps>
            <variables>
                <variable>displacement</variable>
                <variable>sigma</variable>
            </variables>
            <suffix>_ts_{:timestep}_t_{:time}</suffix>
        </output>
    </time_loop>
    <media>
        <medium id="0,1,2,3">
            <phases>
                <phase>
                    <type>Solid</type>
                    <properties>
                        <property>
                            <name>density</name>
                            <type>Constant</type>
                            <value>1</value>
                        </property>
                    </properties>
                </phase>
            </phases>
        </medium>
    </media>
    <parameters>
        <!-- Material parameters -->
        <parameter>
            <name>YoungModulus</name>
            <type>Group</type>
            <group_id_property>MaterialIDs</group_id_property>
            <index_values>
                <index>0</index>
                <value>60e6</value>                <!--Pa-->
            </index_values>
            <index_values>
                <index>1</index>
                <value>60e7</value>                <!--Pa-->
            </index_values>
            <index_values>
                <index>2</index>
                <value>60e6</value>                <!--Pa-->
            </index_values>
            <index_values>
                <index>3</index>
                <value>60e9</value>                <!--Pa-->
            </index_values>
        </parameter>
        <parameter>
            <name>PoissonRatio</name>
            <type>Group</type>
            <group_id_property>MaterialIDs</group_id_property>
            <index_values>
                <index>0</index>
                <value>0.25</value>
            </index_values>
            <index_values>
                <index>1</index>
                <value>0.25</value>
            </index_values>
            <index_values>
                <index>2</index>
                <value>0.25</value>
            </index_values>
            <index_values>
                <index>3</index>
                <value>0.45</value>
            </index_values>
        </parameter>
        <!-- Initial and boundary values -->
        <parameter>
            <name>displacement0</name>
            <type>Constant</type>
            <values>0 0</values>
        </parameter>
        <parameter>
            <name>dirichlet0</name>
            <type>Constant</type>
            <value>0</value>
        </parameter>
    </parameters>
    <process_variables>
        <process_variable>
            <name>displacement</name>
            <components>2</components>
            <order>1</order>
            <initial_condition>displacement0</initial_condition>
            <boundary_conditions>
                <boundary_condition>
                    <mesh>mesh_basin_physical_group_Left</mesh>
                    <type>Dirichlet</type>
                    <component>0</component>
                    <parameter>dirichlet0</parameter>
                </boundary_condition>
                <boundary_condition>
                    <mesh>mesh_basin_physical_group_Right</mesh>
                    <type>Dirichlet</type>
                    <component>0</component>
                    <parameter>dirichlet0</parameter>
                </boundary_condition>
                <boundary_condition>
                    <mesh>mesh_basin_physical_group_Top</mesh>
                    <type>Python</type>
                    <component>1</component>
                    <bc_object>bc_y</bc_object>                    <!--the python object is created using timeBCs_glacier.py (see L. 10)-->
                    <flush_stdout>true</flush_stdout>                    <!-- for debugging: false -->
                </boundary_condition>
                <boundary_condition>
                    <mesh>mesh_basin_physical_group_Bottom</mesh>
                    <type>Dirichlet</type>
                    <component>1</component>
                    <parameter>dirichlet0</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>
            <eigen>
                <solver_type>SparseLU</solver_type>
                <scaling>true</scaling>
            </eigen>
        </linear_solver>
    </linear_solvers>
</OpenGeoSysProject>
