# Test goal: Unsteady Darcy flow in 2D, Lumped Mixed Hybrid method.
# Author: Jan Brezina
# Source for reference: analytical solution

# Time dependent problem, with analytical solution:
# p(t,x,y) = p(t,x) = exp(-(C/S)*Pi^2*t)*sin(Pi*x)
# v(t,x,y) = v(t,x) = -C*Pi*exp(-(C/S)*Pi^2*t)*cos(Pi*x)
# C .. conductivity
# S .. storativity

# theoretical values for C=0.5, S=1.0:  Numerical values:
# t:        p(Pi/2):     v(1):          LMH p       MH   p 
# 0.1      0.6105        0.9590         0.6176      0.6180
# 0.2      0.3727        0.5854         0.3816      0.3818
# 0.3      0.2275        0.3574         0.2358      0.2358
# 0.6      0.0518        0.0813
# 1        0.0072        0.0113
flow123d_version: 4.0.0a01
problem: !Coupling_Sequential
  description: Unsteady flow in 2D, Lumped Mixed Hybrid, analytical solution.
  mesh:
    mesh_file: ../00_mesh/square_1x1_xy.msh
  flow_equation: !Flow_Darcy_LMH
    time:
      end_time: 1
      max_dt: 0.01
      min_dt: 0.01

    input_fields:
      - region: bulk
        conductivity: 0.5
        cross_section: 1.0
        init_pressure: !FieldFormula
          value: sin(pi*X[0])
        storativity: 1
      - region: .right_x
        bc_type: dirichlet
        bc_pressure: 0
      - region: .left_x
        bc_type: dirichlet
        bc_pressure: 0
    nonlinear_solver:
      linear_solver: !Petsc
        a_tol: 1.0e-07
        r_tol: 1.0e-7
    output:
      fields:
        - pressure_p0
        - velocity_p0
    balance:
      cumulative: true
    output_stream:
      file: ./flow.pvd
      format: !vtk
        variant: ascii
      times:
        - step: 0.1
      precision: 15
