# Test goal: 2D poroelasticity model - Mandel's problem.
# Author: Pavel Exner, Jan Stebel
# Description and analytical solution: see 03_pv_filter.py
# Limitations and issues:
# - Slight deviation from original Mandel's problem - while originally
#   the force is applied in integral form (piston) here we prescribe
#   pointwise traction.
# - When prescribing only normal displacements in 2D domain, displacement
#   is nonunique in the 3rd direction. Works only with iterative linear solvers.
#

flow123d_version: 4.0.0a01
problem: !Coupling_Sequential
  description: Mandel's rectangular problem (upper right subdomain).
  mesh:
    mesh_file: ../00_mesh/square_1x1_xy_28el.msh
  flow_equation: !Coupling_Iterative
    input_fields:
      - region: BULK
        biot_alpha: 1
        fluid_density: 1000
    time:
      end_time: 1e5
    iteration_parameter: 1 # affects convergence of HM coupling (defaults to 1, lower value sometimes helps)
    a_tol: 0
    r_tol: 1e-12
    flow_equation: !Flow_Darcy_LMH
        nonlinear_solver:
          linear_solver: !Petsc
            a_tol: 0
            r_tol: 1e-12
        input_fields:
          - region: BULK
            conductivity: 1e-5
            storativity: 1.61865
            init_pressure: 3.860949897148156e-05

          - region: .right_x
            bc_type: dirichlet
            bc_pressure: 0

        output:
          times: &output_times [1e2, 1e3, 1e4, 1e5]
          fields:
            - piezo_head_p0
            - pressure_p0
            - velocity_p0
        output_stream:
          file: flow.pvd
          format: !vtk
    mechanics_equation:
        output_stream:
          file: mechanics.pvd
          format: !vtk
        output:
          times: *output_times
          fields:
            - displacement
            - stress
            - displacement_divergence
        solver: !Petsc
          a_tol: 0
          r_tol: 1e-12
        input_fields:
          - region: BULK
            young_modulus: 1e8
            poisson_ratio: 0.25

          - region: .top_y
            bc_type: traction
            bc_traction: [0, -1e4, 0]

          - region: [ .left_x, .bottom_y ]
            bc_type: displacement_n
            bc_displacement: 0
