# Test goal: 2D elastic model with a single fracture with different BC.
# Author: Pavel Exner
# Source for reference:
#   This is full model serving as reference for 23_square_fract_chopped.yaml.

flow123d_version: 4.0.0a01
problem: !Coupling_Sequential
  description: 2D elastic model with a single fracture with different BC. (Reference with full fine 2d fracture).
  mesh:
    mesh_file: ../00_mesh/square_1x1_chopped_fine.msh
  flow_equation: !Coupling_Iterative
    input_fields:
      - region: BULK
        biot_alpha: 0
        fluid_density: 1
        gravity: 0
    time:
      end_time: 3

    flow_equation: !Flow_Darcy_LMH
        input_fields:
          - region: BULK
            conductivity: 1
            init_pressure: 0
          - region: .BOUNDARY
            bc_type: dirichlet
            bc_pressure: 0
        output:
          fields: []

    mechanics_equation:
        output_stream:
          file: mechanics.pvd
          format: !vtk
            variant: ascii
        output:
          times:
            - step: 1
          fields:
            - displacement
            - stress
            - region_id
        solver: !Petsc
          options: -ksp_type preonly -pc_type lu
        input_fields:
          - region: bulk
            young_modulus: 1
            poisson_ratio: 0.25
          - region: fracture
            young_modulus: 1e-6
            poisson_ratio: 0.25

          - region: .left_x
            bc_type: displacement
            bc_displacement: 0
          - region: .right_x
            bc_type: traction
            bc_traction: [ 0.2, 0, 0 ]

          - region: [.left_x, .right_x]
            time: 1
            bc_type: traction
            bc_traction: 0
          - region: .bottom_y
            time: 1
            bc_type: displacement
            bc_displacement: 0
          - region: .top_y
            time: 1
            bc_traction: !FieldFormula
              value: "[ 0, ((-0.3) if (X[0]>0.5) else (0)), 0 ]"

          - region: .left_x
            time: 2
            bc_type: displacement
            bc_displacement: 0
          - region: .right_x
            time: 2
            bc_type: traction
            bc_traction: [ 0, -0.04, 0 ]
          - region: [ .bottom_y, .top_y ]
            time: 2
            bc_type: traction
            bc_traction: 0

          - region: .right_x
            time: 3
            bc_type: displacement
            bc_displacement: 0
          - region: .fracture_out
            time: 3
            bc_type: displacement
            bc_displacement: [ 0, -0.1, 0 ]
