#################
# Test goal: Test conversion of time units defined by user in input YAML file.
# Author: David Flanderka
# Source for reference: qualitative

# problem
flow123d_version: 4.0.0a01
problem: !Coupling_Sequential
  description: Check correct time unit conversion of different time declaration in nested equations of input YAML file.
  mesh:
    mesh_file: ../00_mesh/square_1x1_frac_fork.msh
    regions:
      - !Union
        name: 1d_domain
        regions:
          - 1d_upper
          - 1d_lower
          - 1d_left_branch
  flow_equation: !Flow_Darcy_LMH
    input_fields:
      - region: 1d_domain
        conductivity: 4
        sigma: 0.05
      - region: 2d
        conductivity: 0.2
      - region: .BOUNDARY
        time: 0
        bc_type: dirichlet
        bc_pressure: !FieldFormula
          value: X[1]
      - region: .BOUNDARY
        time: 0.008333333333333    # 0.5s
        bc_type: dirichlet
        bc_pressure: !FieldFormula
          value: X[0]
    nonlinear_solver:
      linear_solver: !Petsc
        a_tol: 1.0e-12
        r_tol: 1.0e-12
    time:
      end_time: [1000, "ms"]
      common_time_unit: "min"
    output_stream:
      times:
        - step: [0.5, "s"]

  solute_equation: !Coupling_OperatorSplitting
    transport: !Solute_Advection_FV
      input_fields:
        - region: ALL
          init_conc: 0
          porosity: 0.25
        - region: .BOUNDARY
          time: 0.0
          bc_conc: 1.0
        - region: .BOUNDARY
          time: [100, "ms"]
          bc_conc: 1.5
        - region: .BOUNDARY
          time: [0.5, "s"]
          bc_conc: 2.0
      output:
        fields:
          - conc
          - porosity
    substances:
      - age
      - U235
    output_stream:
      times:
        - { step: [ 0.125, "s"] }
    time:
      end_time: 1000
      common_time_unit: "ms"
    balance:
      cumulative: true
  # solute_equation
# problem
