##---
##title: Flow123d tutorial 6 -- ``Fractures and dual porosity''
##---
##
### Description
##
##This is a variant of ```04_frac_diffusion.yaml```. Instead of diffusion we consider advective transport with dual porosity.
##
### Input
##Dual porosity substitutes dead-end fractures in this task. The dual-porosity parameter ```diffusion_rate_immobile``` was calibrated to the value 5.64742e-06 for identical results with the model with the dead-end fractures. Other settings of transport are identical to the diffusion model.
##
##The dual porosity model is set by the following lines:
##
##    reaction_term: !DualPorosity
##      input_fields:
##        - region: rock
##          init_conc_immobile: 0
##        - region: flow_fractures
##          diffusion_rate_immobile: 5.64742e-06
##          porosity_immobile: 0.01
##          init_conc_immobile: 0
##        - region: deadend_fractures
##          init_conc_immobile: 0
##
### Results and comparison
##Results of calibration of the model with dual porosity and model with flow in dead-end fractures (file ```06_frac_nodualpor.yaml```) is depicted in Figure {@fig:calib}.
##
##
##![Results of calibration.](tutor_figures/06_mass_flux.pdf){#fig:calib}
##
flow123d_version: 3.1.0
problem: !Coupling_Sequential
  description: Example 6 - Fractures - dual-porosity
  mesh:
    mesh_file: 04_mesh.msh
    regions:
      - !Union
        name: flow_fractures
        regions:
          - flow_fracture1
          - flow_fracture2
      - !Union
        name: deadend_fractures
        regions:
          - deadend_fracture1
          - deadend_fracture2
      - !Union
        name: BC_right
        regions:
          - .right
          - .right_points
      - !Union
        name: BC_left
        regions:
          - .left
          - .left_points
  flow_equation: !Flow_Darcy_MH
    nonlinear_solver:
      linear_solver: !Petsc
        a_tol: 1.0e-15
        r_tol: 1.0e-15
    input_fields:
      - region: rock
        conductivity: 0.000315
        cross_section: 1
      - region: flow_fractures
        conductivity: 31.5
        cross_section: 0.01
      - region: deadend_fractures
        conductivity: 0.000315
        cross_section: 0.01
      - region: BC_left
        bc_type: dirichlet
        bc_piezo_head: 0.1
      - region: BC_right
        bc_type: dirichlet
        bc_piezo_head: 0
    balance: {}
    output:
      fields:
        - piezo_head_p0
        - pressure_p0
        - velocity_p0
    output_stream:
      file: flow
      format: !gmsh
  solute_equation: !Coupling_OperatorSplitting
    transport: !Solute_Advection_FV
      input_fields:
        - region: rock
          init_conc: 0
          porosity: 0.005
        - region: flow_fractures
          init_conc: 0
          porosity: 0.1
        - region: deadend_fractures
          init_conc: 0
          porosity: 0.005
        - region: BC_left
          bc_conc: 1.0e-05
    substances:
      - I
    time:
      end_time: 1000
    reaction_term: !DualPorosity
      input_fields:
        - region: rock
          init_conc_immobile: 0
        - region: flow_fractures
          diffusion_rate_immobile: 5.64742e-06
          porosity_immobile: 0.01
          init_conc_immobile: 0
        - region: deadend_fractures
          init_conc_immobile: 0
      scheme_tolerance: 0.0
      output:
        fields:
          - conc_immobile
    balance:
      cumulative: true
    output_stream:
      file: transport
      format: !gmsh
      times:
        - step: 20
