Commits

Glenn Hammond  committed fcea47d Merge

merge

  • Participants
  • Parent commits ac27ff7, af8c1e1

Comments (0)

Files changed (9)

File docs/user_manual/inputfiles/ionex.in

 # == mode =====================================================================
 #MODE RICHARDS
 
-#UNIFORM_VELOCITY 0.317098d-7 0.d0 0.d0
+# m/s
 UNIFORM_VELOCITY 5.69333e-4 0.d0 0.d0
 
 #=========================== runtime ==========================================
 TYPE structured 
 NXYZ 250 1 1
 BOUNDS
-0.d0 0.481d0
-0.d0 1.d0
-0.d0 1.d0
+0.d0 0.d0 0.d0
+0.481d0 1.d0 1.d0
 /
 /
 
 Tracer        4.65d-3  T
 /
 MINERALS
-Halite        0.5 1.
-/
+Halite        0.5 1.
+/
 /
 
 CONSTRAINT Inlet1

File docs/user_manual/inputfiles/sx115/sx115.in

   #DTOL 1.e4
   ITOL_UPDATE 1.d0
   #NO_INFINITY_NORM
-  #:NO_PRINT_CONVERGENCE
+  #NO_PRINT_CONVERGENCE
   #PRINT_DETAILED_CONVERGENCE
 END
 
   /
   DATUM 0.d0 0.d0 6.d0
   PRESSURE 101325.d0 
-  #PRESSURE 1.4e5 ! 200 meter piezometric head (200*997.32*9.81)
+  #PRESSURE 1.4e5 ! 200 meter piezometric head (200*997.32*9.81)
 END
 
 FLOW_CONDITION source

File docs/user_manual/keywords.tex

 
 \setcounter{equation}{0}
 
-The PFLOTRAN input file construction is based on keywords. Lines beginning with a colon (:) are treated as comments. Each entry to the input file must begin in the first column. Keywords {\tt SKIP} and {\tt NOSKIP} are used to skip over sections of the input file. Blank lines may occur in input file. Alternate keyword spelling is indicated in round brackets (~). Input options are indicated in square brackets [~], as well as default values. Curly brackets \{~\} indicate the result of invoking the corresponding keyword. Always refer to source code when in doubt!
+The PFLOTRAN input file construction is based on keywords. Lines beginning with \# are treated as comments. Each entry to the input file must begin in the first column. Keywords {\tt SKIP} and {\tt NOSKIP} are used to skip over sections of the input file. Blank lines may occur in input file. Alternate keyword spelling is indicated in round brackets (~). Input options are indicated in square brackets [~], as well as default values. Curly brackets \{~\} indicate the result of invoking the corresponding keyword. Always refer to source code when in doubt!
 
 Initial and boundary conditions and material properties are assigned to spatial regions using a novel {\em coupler} approach. In this approach, initial and boundary conditions (keyword CONDITION) are assigned to regions (keyword REGION) using keywords INITIAL\_CONDITION and BOUNDARY\_CONDITION. Material properties (keyword MATERIAL) are assigned to regions using the keyword STRATIGRAPHY.
 
 \item[PERM\_Y] \ {\tt <float>} \ Diagonal permeability $k_{yy}$ [m$^2$]
 \item[PERM\_Z] \ {\tt <float>} \ Diagonal permeability $k_{zz}$ [m$^2$]
 \item[PERM\_ISO] \ {\tt <float>} \ Isotropic permeability values [m$^2$]
-\item[PERM\_XY] \ {\tt <float>} \ Off-diagonal permeability $k_{xy}$ for use with MFD (mimetic\_unstructured grid) [m$^2$]
+\item[PERM\_XY] \ {\tt <float>} \ Off-diagonal permeability $k_{xy}$ for use with MFD \\(mimetic\_unstructured grid) [m$^2$] (not currently supported)
 \item[PERM\_XZ] \ {\tt <float>} [m$^2$] \ Off-diagonal permeability $k_{xz}$
 \item[PERM\_YZ] \ {\tt <float>} [m$^2$] \ Off-diagonal permeability $k_{yz}$
 \end{deflist}
 \item[PERMEABILITY\_CRIT\_POR] \ {\tt <float>} \ (see Eqn.\eqref{permf})
 \item[PERMEABILITY\_MIN\_SCALE\_FAC] \ {\tt <float>} \ (see Eqn.\eqref{fmin})
 \item[TORTUOSITY\_POWER] \ {\tt <float>}
-\item[MINERAL\_SURFACE\_AREA\_POWER] ~ toggle to update mineral surface area (see {\tt MINERAL\_KINETICS} keyword for setting porosity or volume fraction power)
+\item[MINERAL\_SURFACE\_AREA\_POWER] ~ toggle to update mineral surface area \\(see {\tt MINERAL\_KINETICS} keyword for setting porosity or volume fraction power)
 %\begin{deflist}{000}
 %\item[VOLUME\_FRACTION] \ {\tt <float>} \ Volume fraction power in mineral surface area
 %\item[POROSITY] \ {\tt <float>} \ Porosity power in mineral surface area
 %\item[FORMAT \ HDF5]
 %\item[FORMAT \ MAD]
 %\item[FORMAT \ VTK]
-\item[VOLUME] output cell volume
-\item[PERMEABILITY]
-\item[POROSITY]
-\item[FLUXES]
-\item[VELOCITIES]
+\begin{deflist}{0000000000000000000000000}
+\item[VOLUME] -Output cell volume
+\item[PERMEABILITY] -Output cell permeability
+\item[POROSITY] -Output cell porosity
+\item[FLUXES] -Output interface fluxes
+\item[VELOCITIES] -Output interface velocities
+\end{deflist}
 \item[MASS\_BALANCE:] \ output the mass balance of the system if this card is activated. It includes global mass balance as well as fluxes at all boundaries for water and chemical species specified for output in the CHEMISTRY card. For the MPHASE mode only global mass balances are provided including supercritical CO$_2$. Output times are controlled by {\tt PERIODIC\_OBSERVATION TIMESTEP and TIME}, and printout times.
 \end{deflist}
 \item[\keyend]

File regression_tests/general/case5.regression.gold

       139:   2.5000000000000E+01
       185:   2.5000000000000E+01
 -- PRESSURE: Liquid Pressure --
-      Max:   1.0984764080757E+07
-      Min:   5.1947241048978E+06
-     Mean:   8.2130827143564E+06
-       89:   1.0417694728978E+07
-      111:   1.0984764080757E+07
-      113:   1.0276734207753E+07
-      133:   9.9952560765020E+06
-        1:   9.3449101342056E+06
-       47:   9.4458161889903E+06
-       93:   9.4106582990412E+06
-      139:   8.1221101689629E+06
-      185:   6.3315567301825E+06
+      Max:   8.2834599563646E+06
+      Min:   3.8783580377738E+06
+     Mean:   4.8889317618322E+06
+       89:   7.3540648032995E+06
+      111:   8.2834599563646E+06
+      113:   7.3955343543306E+06
+      133:   7.3053559529434E+06
+        1:   4.6042900217350E+06
+       47:   5.0882261724737E+06
+       93:   5.7642156838115E+06
+      139:   4.9073026895515E+06
+      185:   4.0754472752035E+06
 -- PRESSURE: Gas Pressure --
-      Max:   1.1078479476490E+07
+      Max:   8.3794788303518E+06
       Min:   0.0000000000000E+00
-     Mean:   3.1130128854592E+06
-       89:   1.0480130258517E+07
-      111:   1.1078479476490E+07
-      113:   1.0342989843082E+07
-      133:   1.0063479848691E+07
+     Mean:   2.6863658643009E+06
+       89:   7.4231659253545E+06
+      111:   8.3794788303518E+06
+      113:   7.4655158852455E+06
+      133:   7.3749688493018E+06
         1:   0.0000000000000E+00
        47:   0.0000000000000E+00
        93:   0.0000000000000E+00
       139:   0.0000000000000E+00
-      185:   6.3599603603551E+06
+      185:   4.1141473857027E+06
 -- SATURATION: Liquid Saturation --
       Max:   1.0000000000000E+00
-      Min:   7.3625298458136E-01
-     Mean:   9.8645939089530E-01
-       89:   9.0452688381432E-01
-      111:   7.3625298458136E-01
-      113:   8.8713955941268E-01
-      133:   8.7767369352688E-01
+      Min:   7.2289349954990E-01
+     Mean:   9.7902399746823E-01
+       89:   8.7335084716745E-01
+      111:   7.2289349954990E-01
+      113:   8.6895200244688E-01
+      133:   8.7080112086427E-01
         1:   1.0000000000000E+00
        47:   1.0000000000000E+00
        93:   1.0000000000000E+00
       139:   1.0000000000000E+00
-      185:   9.9202508530495E-01
+      185:   9.7811415681731E-01
 -- SATURATION: Gas Saturation --
-      Max:   2.6374701541864E-01
+      Max:   2.7710650045010E-01
       Min:   0.0000000000000E+00
-     Mean:   1.3540609104695E-02
-       89:   9.5473116185682E-02
-      111:   2.6374701541864E-01
-      113:   1.1286044058732E-01
-      133:   1.2232630647312E-01
+     Mean:   2.0976002531775E-02
+       89:   1.2664915283255E-01
+      111:   2.7710650045010E-01
+      113:   1.3104799755312E-01
+      133:   1.2919887913573E-01
         1:   0.0000000000000E+00
        47:   0.0000000000000E+00
        93:   0.0000000000000E+00
       139:   0.0000000000000E+00
-      185:   7.9749146950531E-03
+      185:   2.1885843182692E-02
 -- GENERIC: Liquid Density --
-      Max:   1.0015092769339E+03
-      Min:   9.9890965508839E+02
-     Mean:   1.0002404634225E+03
-       89:   1.0012426451627E+03
-      111:   1.0015092769339E+03
-      113:   1.0011815437068E+03
-      133:   1.0010570225408E+03
-        1:   1.0007369721936E+03
-       47:   1.0007819094893E+03
-       93:   1.0007662521175E+03
-      139:   1.0001925733182E+03
-      185:   9.9940857307543E+02
+      Max:   1.0003071309878E+03
+      Min:   9.9832684707516E+02
+     Mean:   9.9876469207467E+02
+       89:   9.9988153160790E+02
+      111:   1.0003071309878E+03
+      113:   9.9990037528499E+02
+      133:   9.9986008667991E+02
+        1:   9.9862806677488E+02
+       47:   9.9884314607197E+02
+       93:   9.9914365860223E+02
+      139:   9.9876273149864E+02
+      185:   9.9841027629135E+02
 -- GENERIC: Gas Density --
-      Max:   1.2941340124009E+02
+      Max:   9.7881592452883E+01
       Min:   0.0000000000000E+00
-     Mean:   3.6362702419070E+01
-       89:   1.2242302383647E+02
-      111:   1.2941340124009E+02
-      113:   1.2082084365076E+02
-      133:   1.1755539215490E+02
+     Mean:   3.1376833569861E+01
+       89:   8.6709206961141E+01
+      111:   9.7881592452883E+01
+      113:   8.7203971880646E+01
+      133:   8.6146131517506E+01
         1:   0.0000000000000E+00
        47:   0.0000000000000E+00
        93:   0.0000000000000E+00
       139:   0.0000000000000E+00
-      185:   7.4288018909546E+01
+      185:   4.8050698296120E+01
 -- GENERIC: X_g^l --
-      Max:   1.2954164541945E-03
-      Min:   4.6588686341017E-04
-     Mean:   6.5830594253789E-04
-       89:   1.2254309478489E-03
-      111:   1.2954164541945E-03
-      113:   1.2093904131138E-03
-      133:   1.1766977181146E-03
-        1:   4.7750146195134E-04
-       47:   4.7288712862011E-04
-       93:   4.7000224390749E-04
-      139:   5.3664561408609E-04
-      185:   7.4351809847674E-04
+      Max:   9.7972969272920E-04
+      Min:   4.5887365712488E-04
+     Mean:   5.4055901362901E-04
+       89:   8.6787520897497E-04
+      111:   9.7972969272920E-04
+      113:   8.7282864301928E-04
+      133:   8.6223787099473E-04
+        1:   4.7753326755518E-04
+       47:   4.7289948519504E-04
+       93:   6.0484069140938E-04
+      139:   5.4023133597878E-04
+      185:   4.8083812252368E-04
 -- GENERIC: X_l^l --
-      Max:   9.9953411313659E-01
-      Min:   9.9870458354581E-01
-     Mean:   9.9934169405746E-01
-       89:   9.9877456905215E-01
-      111:   9.9870458354581E-01
-      113:   9.9879060958689E-01
-      133:   9.9882330228189E-01
-        1:   9.9952249853805E-01
-       47:   9.9952711287138E-01
-       93:   9.9952999775609E-01
-      139:   9.9946335438591E-01
-      185:   9.9925648190152E-01
+      Max:   9.9954112634288E-01
+      Min:   9.9902027030727E-01
+     Mean:   9.9945944098637E-01
+       89:   9.9913212479102E-01
+      111:   9.9902027030727E-01
+      113:   9.9912717135698E-01
+      133:   9.9913776212901E-01
+        1:   9.9952246673244E-01
+       47:   9.9952710051480E-01
+       93:   9.9939515930859E-01
+      139:   9.9945976866402E-01
+      185:   9.9951916187748E-01
 -- GENERIC: X_g^g --
-      Max:   9.9971422164847E-01
+      Max:   9.9962217344701E-01
       Min:   0.0000000000000E+00
-     Mean:   4.2404951266625E-01
-       89:   9.9969790551031E-01
-      111:   9.9971422164847E-01
-      113:   9.9969389996023E-01
-      133:   9.9968539812770E-01
+     Mean:   5.2779265123441E-01
+       89:   9.9957349874243E-01
+      111:   9.9962217344701E-01
+      113:   9.9957591817485E-01
+      133:   9.9957071146103E-01
         1:   0.0000000000000E+00
        47:   0.0000000000000E+00
        93:   0.0000000000000E+00
       139:   0.0000000000000E+00
-      185:   9.9950219979011E-01
+      185:   9.9923046276531E-01
 -- GENERIC: X_l^g --
-      Max:   6.0444417766725E-04
+      Max:   8.0634223432963E-04
       Min:   0.0000000000000E+00
-     Mean:   1.9291157617448E-04
-       89:   3.0209448968666E-04
-      111:   2.8577835153409E-04
-      113:   3.0610003976883E-04
-      133:   3.1460187230437E-04
+     Mean:   3.4587690411633E-04
+       89:   4.2650125756738E-04
+      111:   3.7782655298646E-04
+      113:   4.2408182514908E-04
+      133:   4.2928853897395E-04
         1:   0.0000000000000E+00
        47:   0.0000000000000E+00
        93:   0.0000000000000E+00
       139:   0.0000000000000E+00
-      185:   4.9780020989287E-04
+      185:   7.6953723468853E-04
 -- GENERIC: Liquid Energy --
-      Max:   1.7945353026151E+00
-      Min:   1.6897181969767E+00
-     Mean:   1.7408002017843E+00
-       89:   1.7004312142380E+00
-      111:   1.6897181969767E+00
-      113:   1.7028874215062E+00
-      133:   1.7078944216213E+00
-        1:   1.7207722458398E+00
-       47:   1.7189633630378E+00
-       93:   1.7195935991323E+00
-      139:   1.7427055961875E+00
-      185:   1.7743553477876E+00
+      Max:   1.8181467478553E+00
+      Min:   1.7380871898489E+00
+     Mean:   1.8004153690141E+00
+       89:   1.7552532972215E+00
+      111:   1.7380871898489E+00
+      113:   1.7544927928097E+00
+      133:   1.7561188368457E+00
+        1:   1.8059381945492E+00
+       47:   1.7972277083699E+00
+       93:   1.7850666922288E+00
+      139:   1.8004837552033E+00
+      185:   1.8147642216596E+00
 -- GENERIC: Gas Energy --
-      Max:   3.7615464035697E+00
+      Max:   3.7695571254342E+00
       Min:   0.0000000000000E+00
-     Mean:   1.5932873064111E+00
-       89:   3.7495500560253E+00
-      111:   3.7489026795879E+00
-      113:   3.7497089844873E+00
-      133:   3.7500463122303E+00
+     Mean:   1.9876748417430E+00
+       89:   3.7544861511618E+00
+      111:   3.7525548818535E+00
+      113:   3.7543901551899E+00
+      133:   3.7545967423011E+00
         1:   0.0000000000000E+00
        47:   0.0000000000000E+00
        93:   0.0000000000000E+00
       139:   0.0000000000000E+00
-      185:   3.7573150841677E+00
+      185:   3.7680968111537E+00
 -- DISCRETE: Thermodynamic State --
       Max:         3
       Min:         1
-     Mean:   1.8484848484848E+00
+     Mean:   2.0562770562771E+00
        89:         3
       111:         3
       113:         3
       139:         1
       185:         1
 -- SOLUTION: Flow --
-   Time (seconds):   4.2536804676056E+00
-   Time Steps:          259
-   Newton Iterations:          496
-   Solver Iterations:          496
+   Time (seconds):   3.8741865158081E+00
+   Time Steps:          290
+   Newton Iterations:          437
+   Solver Iterations:          437
    Time Step Cuts:            0
-   Solution 2-Norm:   1.2702122508087E+08
-   Residual 2-Norm:   5.3565995249669E-10
+   Solution 2-Norm:   7.6052238111791E+07
+   Residual 2-Norm:   4.0406890672926E-09

File src/pflotran/general.F90

                               ghosted_id, &
                               option)
     call GeneralAccumulation(gen_auxvars(ZERO_INTEGER,ghosted_id), &
-                             global_auxvars(ghosted_id), &
                              material_auxvars(ghosted_id), &
-                            material_parameter%soil_heat_capacity(imat), &
+                             material_parameter%soil_heat_capacity(imat), &
                              option,accum_p(local_start:local_end)) 
   enddo
 
 
 ! ************************************************************************** !
 
-subroutine GeneralAccumulation(gen_auxvar,global_auxvar,material_auxvar, &
+subroutine GeneralAccumulation(gen_auxvar,material_auxvar, &
                                soil_heat_capacity,option,Res)
   ! 
   ! Computes the non-fixed portion of the accumulation
   implicit none
 
   type(general_auxvar_type) :: gen_auxvar
-  type(global_auxvar_type) :: global_auxvar
   class(material_auxvar_type) :: material_auxvar
   PetscReal :: soil_heat_capacity
   type(option_type) :: option
 
 ! ************************************************************************** !
 
-subroutine GeneralAccumDerivative(gen_auxvar,global_auxvar,material_auxvar, &
+subroutine GeneralAccumDerivative(gen_auxvar,material_auxvar, &
                                   soil_heat_capacity,option,J)
   ! 
   ! Computes derivatives of the accumulation
   implicit none
 
   type(general_auxvar_type) :: gen_auxvar(0:)
-  type(global_auxvar_type) :: global_auxvar
   class(material_auxvar_type) :: material_auxvar
   type(option_type) :: option
   PetscReal :: soil_heat_capacity
 
 !geh:print *, 'GeneralAccumDerivative'
 
-  call GeneralAccumulation(gen_auxvar(ZERO_INTEGER),global_auxvar, &
+  call GeneralAccumulation(gen_auxvar(ZERO_INTEGER), &
                            material_auxvar,soil_heat_capacity,option,res)
                            
   do idof = 1, option%nflowdof
-    call GeneralAccumulation(gen_auxvar(idof),global_auxvar, &
+    call GeneralAccumulation(gen_auxvar(idof), &
                              material_auxvar,soil_heat_capacity, &
                              option,res_pert)
     do irow = 1, option%nflowdof
     local_end = local_id * option%nflowdof
     local_start = local_end - option%nflowdof + 1
     call GeneralAccumulation(gen_auxvars(ZERO_INTEGER,ghosted_id), &
-                              global_auxvars(ghosted_id), &
                               material_auxvars(ghosted_id), &
                               material_parameter%soil_heat_capacity(imat), &
                               option,Res) 
     imat = patch%imat(ghosted_id)
     if (imat <= 0) cycle
     call GeneralAccumDerivative(gen_auxvars(:,ghosted_id), &
-                              global_auxvars(ghosted_id), &
                               material_auxvars(ghosted_id), &
                               material_parameter%soil_heat_capacity(imat), &
                               option, &

File src/pflotran/output_aux.F90

         call OutputVariableAddToList(output_variable_list,name, &
                                      OUTPUT_SATURATION,units, &
                                      LIQUID_SATURATION)
+      case ('LIQUID_HEAD')
+        name = 'Liquid Head'
+        units = 'm'
+        call OutputVariableAddToList(output_variable_list,name, &
+                                     OUTPUT_GENERIC,units, &
+                                     LIQUID_HEAD)
+        
       case ('LIQUID_DENSITY')
         name = 'Liquid Density'
         call InputReadWord(input,option,word,PETSC_TRUE)

File src/pflotran/patch.F90

          LIQUID_DENSITY,GAS_DENSITY,GAS_DENSITY_MOL,LIQUID_VISCOSITY, &
          GAS_VISCOSITY,CAPILLARY_PRESSURE,LIQUID_DENSITY_MOL, &
          LIQUID_MOBILITY,GAS_MOBILITY,SC_FUGA_COEFF,STATE,ICE_DENSITY, &
-         TRANSIENT_POROSITY)
+         TRANSIENT_POROSITY,LIQUID_HEAD)
 
       if (associated(patch%aux%TH)) then
         select case(ivar)
               vec_ptr(local_id) = &
                 patch%aux%Global%auxvars(grid%nL2G(local_id))%pres(1)
             enddo
+          case(LIQUID_HEAD)
+            do local_id=1,grid%nlmax
+              vec_ptr(local_id) = &
+                patch%aux%Global%auxvars(grid%nL2G(local_id))%pres(1)/9.81/ &
+                patch%aux%Global%auxvars(grid%nL2G(local_id))%den_kg(1)                
+            enddo
           case(LIQUID_SATURATION)
             do local_id=1,grid%nlmax
               vec_ptr(local_id) = &
          LIQUID_DENSITY,GAS_DENSITY,GAS_DENSITY_MOL,LIQUID_VISCOSITY, &
          GAS_VISCOSITY,AIR_PRESSURE,CAPILLARY_PRESSURE, &
          LIQUID_MOBILITY,GAS_MOBILITY,SC_FUGA_COEFF,STATE,ICE_DENSITY, &
-         SECONDARY_TEMPERATURE,LIQUID_DENSITY_MOL,TRANSIENT_POROSITY)
+         SECONDARY_TEMPERATURE,LIQUID_DENSITY_MOL,TRANSIENT_POROSITY, &
+         LIQUID_HEAD)
          
      if (associated(patch%aux%TH)) then
         select case(ivar)
             call printErrMsg(option,'TRANSIENT_POROSITY not supported by Richards')
           case(LIQUID_PRESSURE)
             value = patch%aux%Global%auxvars(ghosted_id)%pres(1)
+          case(LIQUID_HEAD)
+            value = patch%aux%Global%auxvars(ghosted_id)%pres(1)/9.81/ &
+                    patch%aux%Global%auxvars(ghosted_id)%den_kg(1)
           case(LIQUID_SATURATION)
             value = patch%aux%Global%auxvars(ghosted_id)%sat(1)
           case(LIQUID_DENSITY)

File src/pflotran/reactive_transport.F90

   !           history and the communicator can be passed down.
   do local_id = 1, grid%nlmax
     ghosted_id = grid%nL2G(local_id)
+
+    ! Ignore inactive cells with inactive materials
+    if (associated(patch%imat)) then
+      if (patch%imat(ghosted_id) <= 0) cycle
+    endif    
+    
     if (material_auxvars(ghosted_id)%volume < 0.d0 .and. flag(1) == 0) then
       flag(1) = 1
       option%io_buffer = 'Non-initialized cell volume.'
               !     for use_prev_soln_as_guess.  If the previous solution is zero,
               !     the code will crash.
               if (patch%aux%RT%auxvars_bc(sum_connection)%pri_molal(1) < 1.d-200) then
-                patch%aux%RT%auxvars_bc(sum_connection)%pri_molal = 1.d-9
+!               patch%aux%RT%auxvars_bc(sum_connection)%pri_molal = 1.d-9
+                patch%aux%RT%auxvars_bc(sum_connection)%pri_molal = &
+                    xx_loc_p(istartaq:iendaq)
               endif
             case(DIRICHLET_ZERO_GRADIENT_BC)
-                if (patch%boundary_velocities(iphase,sum_connection) >= 0.d0) then
+              if (patch%boundary_velocities(iphase,sum_connection) >= 0.d0) then
                   ! don't need to do anything as the constraint below provides all
                   ! the concentrations, etc.
                   
                 if (patch%aux%RT%auxvars_bc(sum_connection)%pri_molal(1) < 1.d-200) then
-                  patch%aux%RT%auxvars_bc(sum_connection)%pri_molal = 1.d-9
-                endif                  
-                else
-                  ! same as zero_gradient below
-                  skip_equilibrate_constraint = PETSC_TRUE
+!                 patch%aux%RT%auxvars_bc(sum_connection)%pri_molal = 1.d-9
                   patch%aux%RT%auxvars_bc(sum_connection)%pri_molal = &
                     xx_loc_p(istartaq:iendaq)
-                  if (reaction%ncoll > 0) then
-                    patch%aux%RT%auxvars_bc(sum_connection)%colloid%conc_mob = &
-                      xx_loc_p(istartcoll:iendcoll)* &
+                endif
+              else
+                ! same as zero_gradient below
+                skip_equilibrate_constraint = PETSC_TRUE
+                patch%aux%RT%auxvars_bc(sum_connection)%pri_molal = &
+                  xx_loc_p(istartaq:iendaq)
+                if (reaction%ncoll > 0) then
+                  patch%aux%RT%auxvars_bc(sum_connection)%colloid%conc_mob = &
+                    xx_loc_p(istartcoll:iendcoll)* &
                       patch%aux%Global%auxvars_bc(sum_connection)%den_kg(1)*1.d-3
-                  endif                  
                 endif
+              endif
             case(ZERO_GRADIENT_BC)
               skip_equilibrate_constraint = PETSC_TRUE
               patch%aux%RT%auxvars_bc(sum_connection)%pri_molal = &

File src/pflotran/variables.F90

   PetscInt, parameter, public :: CAPILLARY_PRESSURE      = 93
 
   PetscInt, parameter, public :: TRANSIENT_POROSITY      = 94
+  PetscInt, parameter, public :: LIQUID_HEAD             = 95
 
 !  PetscInt, parameter, public :: LIQUID_VELOCITY_CELL_CENT = 58
 !  PetscInt, parameter, public :: LIQUID_VELOCITY_CELL_FACE = 59