Wiki

Clone wiki

pflotran / Depreciated / Documentation / CodeDevelopment / InputFileRefactor

Input File Refactor

Proposed Changes

  • Added optional DESCRIPTION block
  • Add required SIMULATION_MODE block at top of file.
  • Change GRID keyword to DISCRETIZATION

Example Input File

DESCRIPTION
  TITLE 1D Calcite dissolution problem
  AUTHOR Glenn Hammond
END

SIMULATION_MODE
  SUBSURFACE laboratory_column
    FLOW RICHARDS
    TRANSPORT GLOBAL_IMPLICIT
  END

  COUPLING
    laboratory_column FLOW
      MASTER
      BELOW laboratory_column TRANSPORT
    /
  END
END

SUBSURFACE

:=========================== chemistry ========================================
CHEMISTRY
  PRIMARY_SPECIES
    H+
    HCO3-
    Ca++
  /
  SECONDARY_SPECIES
    OH-
    CO3--
    CO2(aq)
    CaCO3(aq)
    CaHCO3+
    CaOH+
  /
  GAS_SPECIES
    CO2(g)
  /
  MINERALS
    Calcite
  /
  MINERAL_KINETICS
    Calcite
      RATE_CONSTANT 1.d-6 mol/m^2-sec
    /
  /
  DATABASE ../../../database/hanford.dat
  LOG_FORMULATION
  ACTIVITY_COEFFICIENTS TIMESTEP
  OUTPUT
    PH
    all
  /
END

:=========================== solver options ===================================
LINEAR_SOLVER FLOW
  SOLVER DIRECT
END

LINEAR_SOLVER TRANSPORT
  SOLVER DIRECT
END

:=========================== discretization ===================================
DISCRETIZATION
  TYPE structured
  NXYZ 100 1 1
  BOUNDS
    0.d0 0.d0 0.d0
    100.d0 1.d0 1.d0
  /
END

:=========================== fluid properties =================================
FLUID_PROPERTY
  DIFFUSION_COEFFICIENT 1.d-9
END

:=========================== material properties ==============================
MATERIAL_PROPERTY soil1
  ID 1
  POROSITY 0.25d0
  TORTUOSITY 1.d0
  PERMEABILITY
    PERM_ISO 1.d-12
  /
  SATURATION_FUNCTION default
END

:=========================== saturation functions =============================
SATURATION_FUNCTION default
END

:=========================== output options ===================================
OUTPUT
  TIMES y 5. 10. 15. 20.
  FORMAT TECPLOT POINT
  VELOCITIES
END

:=========================== times ============================================
TIME
  FINAL_TIME 25.d0 y
  INITIAL_TIMESTEP_SIZE 1.d0 h
  MAXIMUM_TIMESTEP_SIZE 2.5d-1 y
END

:=========================== regions ==========================================
REGION all
  COORDINATES
    0.d0 0.d0 0.d0
    100.d0 1.d0 1.d0
  /
END

REGION west
  FACE west
  COORDINATES
    0.d0 0.d0 0.d0
    0.d0 1.d0 1.d0
  /
END

REGION east
  FACE east
  COORDINATES
    100.d0 0.d0 0.d0
    100.d0 1.d0 1.d0
  /
END

:=========================== flow conditions ==================================
FLOW_CONDITION initial_pressure
  TYPE
    PRESSURE dirichlet
  /
  PRESSURE 201325.d0
END

FLOW_CONDITION recharge
  TYPE
    FLUX neumann
  /
  FLUX 1.d0 m/y
END

:=========================== transport conditions =============================
TRANSPORT_CONDITION background_conc
  TYPE zero_gradient
  CONSTRAINT_LIST
    0.d0 initial_constraint
  /
END

TRANSPORT_CONDITION inlet_conc
  TYPE dirichlet_zero_gradient
  CONSTRAINT_LIST
    0.d0 inlet_constraint
  /
END

:=========================== constraints ======================================
CONSTRAINT initial_constraint
  CONCENTRATIONS
    H+     1.d-8      F
    HCO3-  1.d-3      G  CO2(g)
    Ca++   5.d-4      M  Calcite
  /
  MINERALS
    Calcite 1.d-5 1.d0 m^2/m^3
  /
END

CONSTRAINT inlet_constraint
  CONCENTRATIONS
    H+     5.         P
    HCO3-  1.d-3      T
    Ca++   1.d-6      Z
  /
END

:=========================== condition couplers ===============================
: initial condition
INITIAL_CONDITION
  FLOW_CONDITION initial_pressure
  TRANSPORT_CONDITION background_conc
  REGION all
END

BOUNDARY_CONDITION outlet
  FLOW_CONDITION initial_pressure
  TRANSPORT_CONDITION background_conc
  REGION east
END

BOUNDARY_CONDITION inlet
  FLOW_CONDITION recharge
  TRANSPORT_CONDITION inlet_conc
  REGION west
END

:=========================== stratigraphy couplers ============================
STRATA
  REGION all
  MATERIAL soil1
END

END_SUBSURFACE

Example Camel_Cased Input File

:Description: 3D test problem for testing chemical reactions
:             based on chemistry from Hammond and Lichtner, WRR, 2010

:=========================== regression =======================================
Regression
  Cells_Per_Process 2
  Cells
    29
  /
End

:=========================== flow mode ========================================
Mode Richards

:=========================== chemistry ========================================
Chemistry
  Primary_Species
  H+
  Ca++
  Cu++
  Mg++
  UO2++
  K+
  Na+
  HCO3-
  Cl-
  F-
  HPO4--
  NO3-
  SO4--
  Tracer
  Tracer2
  /
  Redox_Species
    NO3-
  /
  Secondary_Species
    OH-
    CO3--
    CO2(aq)
    CaCO3(aq)
    CaHCO3+
    CaSO4(aq)
    CaCl+
    CaCl2(aq)
    CaF+
    CaH2PO4+
    CaHPO4(aq)
    CaNO3+
    CaPO4-
    MgCO3(aq)
    MgHCO3+
    MgSO4(aq)
    MgCl+
    MgF+
    MgH2PO4+
    MgHPO4(aq)
    MgP2O7--
    MgPO4-
    NaCl(aq)
    NaOH(aq)
    NaSO4-
    NaHCO3(aq)
    NaNO3(aq)
    NaF(aq)
    NaHP2O7--
    NaHPO4-
    KCl(aq)
    KHPO4-
    KHSO4(aq)
    KOH(aq)
    KP2O7---
    KSO4-
    HSO4-
    H2SO4(aq)
    HCl(aq)
    H2PO4-
    PO4---
    H3PO4(aq)
    H2F2(aq)
    H2PO3F(aq)
    Cu(CO3)2--
    CuCO3(OH)2--
    CuCO3(aq)
    CuCl+
    CuCl2(aq)
    CuCl4--
    CuF+
    CuH2PO4+
    CuHPO4(aq)
    CuO2--
    CuOH+
    CuPO4-
    CuSO4(aq)
    UO2OH+
    UO2(OH)2(aq)
    UO2(OH)3-
    UO2(OH)4--
    (UO2)2OH+++
    (UO2)2(OH)2++
    (UO2)3(OH)4++
    (UO2)3(OH)5+
    (UO2)3(OH)7-
    (UO2)4(OH)7+
    UO2CO3(aq)
    UO2(CO3)2--
    UO2(CO3)3----
    (UO2)2CO3(OH)3-
    Ca2UO2(CO3)3(aq)
    CaUO2(CO3)3--
    UO2NO3+
    UO2Cl+
    UO2Cl2(aq)
    UO2SO4(aq)
    UO2(SO4)2--
    UO2F+
    UO2F2(aq)
    UO2F3-
    UO2F4--
    UO2(H2PO4)(H3PO4)+
    UO2(H2PO4)2(aq)
    UO2HPO4(aq)
    UO2H2PO4+
    UO2H3PO4++
    UO2PO4-
  /
  Gas_Species
    CO2(g)
  /
  Minerals
    Calcite
    Magnesite
    Dolomite
    Dolomite-dis
    Dolomite-ord
    Brucite
    Nesquehonite
    Gypsum
    Schoepite
    UO2CO3
    UO2(PO3)2
    (UO2)3(PO4)2
    (UO2)3(PO4)2.4H2O
    CaUO4
    UO2SO4
    UOF4
    UO3.2H2O
    UO3.0.9H2O(alpha)
    Saleeite
    Sylvite
    Metatorbernite
    Whitlockite
    Chalcanthite
    Brochantite
    Tenorite
    Malachite
    Fluorapatite
    Fluorite
    Hydroxylapatite
    Torbernite
  /
  Mineral_Kinetics
    Calcite
      Rate_Constant 1.e-12 mol/cm^2-sec
    /
    Metatorbernite
      Rate_Constant 2.e-17 mol/cm^2-sec
    /
  /
  Sorption
    Surface_Complexation_Rxn
skip
      Site_Fraction 0.02 0.02 0.02 0.02 0.02 \
        0.02 0.02 0.02 0.02 0.02 \
        0.02 0.02 0.02 0.02 0.02 \
        0.02 0.02 0.02 0.02 0.02 \
        0.02 0.02 0.02 0.02 0.02 \
        0.02 0.02 0.02 0.02 0.02 \
        0.02 0.02 0.02 0.02 0.02 \
        0.02 0.02 0.02 0.02 0.02 \
        0.02 0.02 0.02 0.02 0.02 \
        0.02 0.02 0.02 0.02 0.02
      Rates 2.5722E-11  8.5000E-11  1.5972E-10  2.5139E-10  3.6111E-10 \
        4.9167E-10  6.4167E-10  8.1667E-10  1.0167E-09  1.2472E-09 \
        1.5111E-09  1.8111E-09  2.1528E-09  2.5389E-09  2.9722E-09 \
        3.4722E-09  4.0278E-09  4.6667E-09  5.3889E-09  6.2222E-09 \
        7.1389E-09  8.1944E-09  9.3611E-09  1.0722E-08  1.2278E-08 \
        1.4028E-08  1.6056E-08  1.8389E-08  2.1056E-08  2.4139E-08 \
        2.7750E-08  3.1944E-08  3.6944E-08  4.2778E-08  4.9444E-08 \
        5.7778E-08  6.7778E-08  8.0000E-08  9.5000E-08  1.1389E-07 \
        1.3806E-07  1.6944E-07  2.1111E-07  2.6861E-07  3.5000E-07 \
        4.7778E-07  6.8611E-07  1.0778E-06  2.0278E-06  6.6944E-06
  :MULTIRATE_SCALE_FACTOR 1000.d0
noskip
      Mineral Calcite
! recall that this is being scaled by the Calcite vol frac
      Site >SOH 152.64d0 ! 20 m^2/g, por = 0.25
:      SITE >SOH 15.264d0 ! 2.0 m^2/g, por = 0.25
      Complexes
        >SOUO2OH
        >SOHUO2CO3
      /
    /
  /
  Database ../../../database/hanford.dat
  Log_Formulation
  Activity_Coefficients Newton_Iteration
  Molal
  Output
    All
    pH
    Total_Sorbed
    Kd
  /
End

:=========================== solver options ===================================
Timestepper
  TS_Acceleration 8
End

Newton_Solver Flow
End

Linear_Solver Flow
  KSP_Type Preonly
  PC_Type LU
End

Newton_Solver Transport
End

Linear_Solver Transport
  KSP_Type Preonly
  PC_Type LU
End

:=========================== discretization ===================================
Grid
  Type structured
  Origin 0.d0 0.d0 0.d0
  NXYZ 5 4 3
  DXYZ
    10. 11. 12. 13. 14.
    13. 12. 11. 10.
    15. 20. 25.
  /
End

:=========================== fluid properties =================================
Fluid_Property
  Diffusion_Coefficient 1.d-9
End

:=========================== datasets =========================================
skip
Dataset U
  HDF5_Dataset_Name U
  Filename datasets.h5
End

Dataset Calcite
  HDF5_Dataset_Name Calcite
  Filename datasets.h5
End
noskip

:=========================== material properties ==============================
Material_Property soil1
  ID 1
  Porosity 0.25d0
  Tortuosity 1.d0
  Saturation_Function sf1
  Permeability
    PERM_X 1.d-12
    PERM_Y 1.d-12
    PERM_Z 1.d-13
  /
End

Material_Property soil2
  ID 2
  Porosity 0.25d0
  Tortuosity 1.d0
  Saturation_Function sf2
  Permeability
    PERM_X 1.d-11
    PERM_Y 1.d-11
    PERM_Z 1.d-12
  /
End

Material_Property soil3
  ID 3
  Porosity 0.2d0
  Tortuosity 1.d0
  Saturation_Function sf3
  Permeability
    PERM_X 1.d-10
    PERM_Y 1.d-10
    PERM_Z 1.d-11
  /
End

Material_Property soil4
  ID 4
  Porosity 0.25d0
  Tortuosity 1.d0
  Saturation_Function sf4
  Permeability
    PERM_X 1.d-9
    PERM_Y 1.d-9
    PERM_Z 1.d-10
  /
End

:=========================== saturation functions =============================
Saturation_function sf1
  Saturation_Function_Type Van_Genuchten
  Residual_Saturation 0.115
  Lambda 0.286
  Alpha 1.9401d-4
End

Saturation_Function sf2
  Saturation_Function_Type Van_Genuchten
  Residual_Saturation 0.110
  Lambda 0.486
  Alpha 3.8801d-4
End

Saturation_Function sf3
  Saturation_Function_Type Van_Genuchten
  Residual_Saturation 0.118
  Lambda 0.541
  Alpha 1.0211d-4
End

Saturation_Function sf4
  Saturation_Function_Type Van_Genuchten
  Residual_Saturation 0.143
  Lambda 0.527
  Alpha 5.1054d-5
End

:=========================== output options ===================================
Output
:  Times d 0.001 0.01 0.1 1. 10.
:  Periodic Time 1 d
  Format Tecplot Block
  Velocities
End

:=========================== times ============================================
Time
  Final_Time 100.d0 d
  Initial_Timestep_Size 1.d-6 d
  Maximum_Timestep_Size 10.d0 d
End

:=========================== regions ==========================================
Region all
  Coordinates
    0.d0 0.d0 0.d0
    60.d0 46.d0 60.d0
  /
End

Region top
  Face Top
  Coordinates
    0.d0 0.d0 60.d0
    60.d0 46.d0 60.d0
  /
End

Region bottom
  Face BOTTOM
  Coordinates
    0.d0 0.d0 0.d0
    60.d0 46.d0 0.d0
  /
End

Region west
  Face WEST
  Coordinates
    0.d0 0.d0 0.d0
    0.d0 46.d0 60.d0
  /
End

Region east
  Face EAST
  Coordinates
    60.d0 0.d0 0.d0
    60.d0 46.d0 60.d0
  /
End

Region north
  Face NORTH
  Coordinates
    0.d0 46.d0 0.d0
    60.d0 46.d0 60.d0
  /
End

Region south
  Face SOUTH
  Coordinates
    0.d0 0.d0 0.d0
    60.d0 0.d0 60.d0
  /
End

Region plume
  Block 2 3 2 3 2 3
End

Region well
  Block 4 4 2 3 3 3
End

:=========================== flow conditions ==================================
Flow_Condition initial
  Type
    Pressure hydrostatic
  /
  Datum 0.d0 0.d0 35.d0
  Gradient
    Pressure -1.6666667d-2 0.d0 0.d0
  /
  Pressure 101325 ! Pa
End

Flow_Condition east
  Type
    Pressure hydrostatic
  /
  Interpolation Linear
  Datum List
    Time_Units d
    0.d0 0.d0 0.d0 34.d0
    10.d0 0.d0 0.d0 39.d0
    50.d0 0.d0 0.d0 33.d0
    100.d0 0.d0 0.d0 34.d0
  /
  Pressure 101325 ! Pa
End

Flow_Condition recharge
  Type
    Flux neumann
  /
  Flux 5.d0 cm/yr
End

Flow_Condition injection_well
  Type
    Rate scaled_volumetric_rate
  /
  Rate 1 m^3/hr
End

:=========================== transport conditions =============================
Transport_Condition columbia_river
  Type dirichlet_zero_gradient
  Constraint_List
    0.d0 river_water
  /
End

Transport_Condition groundwater
  Type dirichlet_zero_gradient
  Constraint_List
    0.d0 groundwater
  /
End

Transport_Condition tracer_pulse
  Type dirichlet
  Time_Units d
  Constraint_List
    0.d0 well_tracer
    10.d0 groundwater
  /
End

Transport_Condition rainwater
  Type dirichlet
  Constraint_List
    0.d0 groundwater
  /
End

Transport_Condition source_zone
  Type dirichlet
  Constraint_List
    0.d0 U_source
  /
End

:=========================== transport constraints ============================
Constraint groundwater
  Concentrations
    H+       1.d-7            M Calcite
    Ca++     1.20644e-3       T
    Cu++     1.e-8            T
    Mg++     5.09772e-4       T Dolomite
    UO2++    2.4830E-11       T
    K+       1.54789e-4       T
    Na+      1.03498e-3       Z
    HCO3-    2.57305e-3       T
    Cl-      6.97741e-4       T
    F-       2.09491e-5       T
    HPO4--   1.e-8            M Fluorapatite
    NO3-     4.69979e-4       T
    SO4--    6.37961e-4       T
    Tracer   1.e-7            F
    Tracer2  1.e-7            F
  /
  Minerals
    Calcite        0.1   1. cm^2/cm^3
    Metatorbernite 0.    1. cm^2/cm^3
  /
End

Constraint U_source
  Concentrations
    H+       1.d-7            M Calcite
    Ca++     1.20644e-3       T
    Cu++     1.e-6            T
    Mg++     5.09772e-4       T Dolomite
    UO2++    2.34845e-7       T
    K+       1.54789e-4       T
    Na+      1.03498e-3       Z
    HCO3-    2.57305e-3       T
    Cl-      6.97741e-4       T
    F-       2.09491e-5       T
    HPO4--   1.e-6            M Fluorapatite
    NO3-     4.69979e-4       T
    SO4--    6.37961e-4       T
    Tracer   1.e-7            F
    Tracer2  1.e-7            F
  /
  Minerals
    Calcite        0.1   1. cm^2/cm^3
    Metatorbernite 1.e-4  1. cm^2/cm^3
  /
End

Constraint river_water
  Concentrations
    H+       7.8             pH
    Ca++     4.49496e-4       T
    Cu++     1.e-8            T
    Mg++     1.82316e-4       T
    UO2++    2.4830E-11       T
    K+       1.905371e-5      T
    Na+      1.00551e-4       Z
    HCO3-    1.127881e-3      T
    Cl-      3.3895e-5        T
    F-       6.23269e-6       T
    HPO4--   1.e-9            T
    NO3-     1.e-5            T
    SO4--    9.23943e-5       T
    Tracer   1.e-3            F
    Tracer2  1.e-7            F
  /
End

Constraint well_tracer
  Concentrations
    H+       1.d-7            M Calcite
    Ca++     1.20644e-3       T
    Cu++     1.e-8            T
    Mg++     5.09772e-4       T Dolomite
    UO2++    2.4830E-11       T
    K+       1.54789e-4       T
    Na+      1.03498e-3       Z
    HCO3-    2.57305e-3       T
    Cl-      6.97741e-4       T
    F-       2.09491e-5       T
    HPO4--   1.e-8            M Fluorapatite
    NO3-     4.69979e-4       T
    SO4--    6.37961e-4       T
    Tracer   1.e-7            F
    Tracer2  1.e-3            F
  /
End

:=========================== condition couplers ===============================
: initial condition
Initial_Condition
  Flow_Condition initial
  Transport_Condition groundwater
  Region all
End

Initial_Condition
  Flow_Condition initial
  Transport_Condition source_zone
  Region plume
End

: west boundary condition
BOUNDARY_Condition west
  Flow_Condition initial
  Transport_Condition groundwater
  Region west
End

: east boundary condition
BOUNDARY_Condition east
  Flow_Condition east
  Transport_Condition columbia_river
  Region east
End

: top boundary condition
Boundary_Condition top
  Flow_Condition recharge
  Transport_Condition rainwater
  Region top
End

: well source/sink
Source_Sink well
  Flow_Condition injection_well
  Transport_Condition tracer_pulse
  Region well
End

:=========================== stratigraphy couplers ============================
Strata
  Material ./543.h5
End

:=========================== checkpoint / restart =============================
Checkpoint 10

Updated