# Test goal: Simple sorption test - no flow, no transport, analytic values.
# Author: Pavel Exner
# Source for reference:
# mass balance sorption equation: por * rhol * cl + (1-por) * rhos * Ms * cs:total
# - none: compute total from init conc : 0.25*1*1 + 0:0.25
# - linear: derive cl with cs:f(cl):
#           cl:0.25/(0.25 + 0.75*0.6):0.357142857
# - langmuir: compute cl from quadratic eqn. with cs:f(cl):
#           cl:0.25*cl + 0.6*0.75*0.4*cl/(1+0.4*cl):0.25, cl:0.635278976
# - freundlich: compute cl with newton with cs:f(cl):
#           cl:0.25*cl + 0.6*0.75*cl^0.4:0.25, cl:0.152233290
flow123d_version: 3.1.0
problem: !Coupling_Sequential
  description: Simple sorption test - no flow, no transport, known values of sorbed substances.
  mesh:
    mesh_file: ../00_mesh/prism_11el.msh
    regions:
      - !Union
        name: .boundary
        regions: [.back, .front, .left, .up, .down]
  flow_equation: !Flow_Darcy_LMH
    nonlinear_solver:
      linear_solver: !Petsc
        a_tol: 1.0e-07
    input_fields:
      - region: volume
        conductivity: 1.0e-10
      - region: .boundary
        bc_type: dirichlet
        bc_piezo_head: 0
    output:
      fields:
        - pressure_p0
        - velocity_p0
    output_stream:
      file: test_20.pvd
      format: !vtk
        variant: ascii
  solute_equation: !Coupling_OperatorSplitting
    transport: !Solute_Advection_FV
      input_fields:
        - region: volume
          init_conc: 1
          porosity: 0.25
        - region: .boundary
          bc_conc: 1.0
    substances:
      - A
      - As-lin
      - As-lang
      - As-freund
    reaction_term: !Sorption
      solvent_density: 1.0
      substances:
        - A
        - As-lin
        - As-lang
        - As-freund
      solubility:
        - 1.0
        - 1.0
        - 1.0
        - 1.0
      input_fields:
        - region: volume
          init_conc_solid: 0.0
          rock_density: 1.0
          sorption_type:
            - none
            - linear
            - langmuir
            - freundlich
          distribution_coefficient: 0.6
          isotherm_other: 0.4
    time:
      end_time: 1.0
    balance:
      cumulative: true
    output_stream:
      file: transport_test_20.pvd
      format: !vtk
        variant: ascii
      times:
        - step: 0.2
