Commits

Glenn Hammond  committed 85b5884 Merge

merge

  • Participants
  • Parent commits b00ea44, 25ca0bb

Comments (0)

Files changed (11)

 *.bin
 *.bin.info
 *.xmf
+*.stdout
+*.regression
+regression_tests/ascem/batch/general-reaction.h5
+regression_tests/default/anisothermal/thc_1d.h5

File docs/user_manual/quick_guide.tex

 \begin{comment}
 \subsection{MacOSX}
 
-The installation of PFLOTRAN on MacOSX requires compiler versions 4.4 or later for gfortran and gcc. 
+The installation of PFLOTRAN on MacOSX requires compiler versions 4.7.2 or later for gfortran and gcc and must be compatible with object oriented features in Fortran 2003. 
 %The compiler g++ is needed for installing SAMRAI.
 %Define environment variables: {\tt MPI\_HOME}, {\tt PKGS}, \linebreak {\tt HYPRE\_INSTALL\_DIR}
 
 where the product index $i$ generally runs over both primary and secondary species, the quantities $\a_{il}^m$ and $\b_{il}^m$ refer to prefactor coefficients, and $K_{ml}$ is an attenuation factor.
 The quantity $R$ denotes the gas constant ($8.317\times 10^{-3}$ kJ/mol/K). 
 
+\paragraph{Rate Limiter}
+
+A rate-limited form of the mineral kinetic rate law can be devised according to the expression
+\EQ\label{ratemintran}
+\widehat I_m \eq -a_m^{} \left(\sum_l \P_{ml}^{} k_{ml}^{}\right) \left[ \dfrac{1-\left(K_m Q_m\right)^{1/\sigma_m}}{1+\dfrac{k_{ml}^{}}{k_{ml}^{\rm lim}} \left(K_m Q_m\right)^{1/\sigma_m}} \right],
+\EN
+with rate-limiter $r_{\rm lim}$. In the limit $K_mQ_m\rightarrow\infty$, the rate becomes
+\EQ
+\lim_{K_m Q_m\rightarrow\infty}\widehat I_m \eq k_{ml}^{\rm lim} a_m^{}\sum_l \P_{ml}^{}.
+\EN
+Defining the affinity factor
+\EQ
+\Omega_m \eq 1-\left(K_m Q_m\right)^{1/\sigma_m},
+\EN
+or
+\EQ
+K_mQ_m \eq \Big(1-\Omega_m\Big)^{\sigma_m},
+\EN
+the rate may be expressed alternatively as
+\EQ
+\widehat I_m \eq -a_m^{} \sum_l \P_{ml}^{} k_{ml}^{} 
+\dfrac{\Omega_m}{1+\dfrac{k_{ml}^{}}{k_{ml}^{\rm lim}} \big(1-\Omega_m\big)}.
+\EN
+
 \paragraph{Changes in Material Properties}
 
 Porosity, permeability, tortuosity and mineral surface area may be updated optionally due to mineral precipitation and dissolution reactions according to the relations
 \item [SURFACE\_AREA\_POROSITY\_POWER] \ {\tt <Value>} [---] \ \ \ [see Eqn.\eqref{surface_area_vf}]
 \item [SURFACE\_AREA\_VOL\_FRAC\_POWER] \ {\tt <Value>} [---] \ \ \ [see Eqn.\eqref{surface_area_vf}]
 ~\\
-\item [RATE\_LIMITER] \ {\tt <Value>} [---]
+\item [RATE\_LIMITER] \ {\tt <Value>} [mol/m$^2$/s] \ [see Eqn.\eqref{ratemintran}]
 ~\\
 \item [IRREVERSIBLE] \ 
 ~\\

File regression_tests/default/multicontinuum/reaction_log10.regression.gold

 -- CONCENTRATION: Total A(aq) --
-      Max:   9.7184561220044E-03
-      Min:   3.5513695353284E-04
-     Mean:   7.3576496153151E-03
-        1:   3.5513695353284E-04
-       21:   5.3202142264731E-03
-       41:   7.7293437675279E-03
-       61:   8.8985457680075E-03
-       81:   9.4674952300804E-03
+      Max:   9.7140244216608E-03
+      Min:   3.5513695202265E-04
+     Mean:   7.3569384118316E-03
+        1:   3.5513695202265E-04
+       21:   5.3202135571667E-03
+       41:   7.7293266247035E-03
+       61:   8.8983409083246E-03
+       81:   9.4661244001877E-03
 -- VOLUME_FRACTION: A(s) VF --
-      Max:   1.0000000050113E+05
-      Min:   9.9999996525007E+04
-     Mean:   9.9999999597303E+04
-        1:   9.9999996525007E+04
-       21:   9.9999998810271E+04
-       41:   9.9999999811831E+04
-       61:   1.0000000024574E+05
-       81:   1.0000000043098E+05
+      Max:   9.9999999958425E+04
+      Min:   9.9999996505148E+04
+     Mean:   9.9999999186499E+04
+        1:   9.9999996505148E+04
+       21:   9.9999998513254E+04
+       41:   9.9999999380550E+04
+       61:   9.9999999748924E+04
+       81:   9.9999999902170E+04
 -- RATE: A(s) Rate --
-      Max:  -1.9708071465196E-05
-      Min:  -6.7514041325290E-04
-     Mean:  -1.8496452693211E-04
-        1:  -6.7514041325290E-04
-       21:  -3.2758500414989E-04
-       41:  -1.5894593627742E-04
-       61:  -7.7101796244513E-05
-       81:  -3.7275333899736E-05
+      Max:  -2.0018290489250E-05
+      Min:  -6.7514041335862E-04
+     Mean:  -1.8501431117596E-04
+        1:  -6.7514041335862E-04
+       21:  -3.2758505100135E-04
+       41:  -1.5894713627514E-04
+       61:  -7.7116136422319E-05
+       81:  -3.7371291992220E-05
 -- DISCRETE: Material ID --
       Max:         1
       Min:         1
        61:         1
        81:         1
 -- SOLUTION: Transport --
-   Time (seconds):   4.6819102764130E+00
+   Time (seconds):   1.2982058525085E+01
    Time Steps:          996
    Newton Iterations:          996
    Solver Iterations:          996
    Time Step Cuts:            0
-   Solution 2-Norm:   7.7766752575177E-02
-   Residual 2-Norm:   1.2047345584485E-14
+   Solution 2-Norm:   7.7758016335765E-02
+   Residual 2-Norm:   5.8347817974194E-13

File regression_tests/default/multicontinuum/tracer_1D.regression.gold

 -- CONCENTRATION: Total A(aq) --
-      Max:   1.0113230796602E-08
-      Min:   1.0000029306778E-08
-     Mean:   1.0028209000165E-08
-        1:   1.0000029306778E-08
-       21:   1.0001665075508E-08
-       41:   1.0007402667574E-08
-       61:   1.0022652363481E-08
-       81:   1.0057671268873E-08
+      Max:   1.0013869534984E-08
+      Min:   1.0000003035538E-08
+     Mean:   1.0003388231390E-08
+        1:   1.0000003035538E-08
+       21:   1.0000182445344E-08
+       41:   1.0000842730390E-08
+       61:   1.0002657610406E-08
+       81:   1.0006940039975E-08
 -- VOLUME_FRACTION: A(s) VF --
       Max:   1.0000000000000E+05
       Min:   1.0000000000000E+05
        61:         1
        81:         1
 -- SOLUTION: Transport --
-   Time (seconds):   8.5330269336700E+00
+   Time (seconds):   1.5667626142502E+01
    Time Steps:         1927
    Newton Iterations:         1927
    Solver Iterations:         1927
    Time Step Cuts:            0
-   Solution 2-Norm:   1.0028263105677E-07
-   Residual 2-Norm:   1.2018273943701E-19
+   Solution 2-Norm:   1.0003389040554E-07
+   Residual 2-Norm:   1.2792551498761E-18

File src/pflotran/condition.F90

 !    endif
   endif
   
-  if (associated(dataset%time_series)) then
+  if (associated(dataset%time_series).and.associated(default_dataset%time_series)) then
     call TimeSeriesVerify(option, default_time, dataset%time_series, &
                           default_dataset%time_series)
   endif

File src/pflotran/init.F90

       option%gas_phase = 2
       option%nflowdof = 2
       option%nflowspec = 1
+      option%use_isothermal = PETSC_FALSE
     case('THC')
       option%iflowmode = THC_MODE
       option%nphase = 1
       option%gas_phase = 2      
       option%nflowdof = 3
       option%nflowspec = 2
+      option%use_isothermal = PETSC_FALSE
    case('THMC')
       option%iflowmode = THMC_MODE
       option%nphase = 1
       option%nflowdof = 6
       option%nflowspec = 2
       option%nmechdof = 3
+      option%use_isothermal = PETSC_FALSE
     case('MIS','MISCIBLE')
       option%iflowmode = MIS_MODE
       option%nphase = 1

File src/pflotran/material.F90

File contents unchanged.

File src/pflotran/mineral.F90

       ! store volumetric rate to be used in updating mineral volume fractions
       ! at end of time step
       rt_auxvar%mnrl_rate(imnrl) = Im ! mol/sec/m^3 bulk
+
     else ! rate is already zero by default; move on to next mineral
       cycle
     endif
     if (update_mnrl .and. associated(mineral%mnrl_logKcoef)) then
       call ReactionInterpolateLogK(mineral%mnrl_logKcoef, &
                                    mineral%mnrl_logK, &
-                                    temp, &
+                                   temp, &
                                    mineral%nmnrl)
     endif  
   else

File src/pflotran/output_hdf5.F90

   use Field_module
   use Patch_module
   use Reaction_Aux_module
+  use String_module
   
 #if !defined(PETSC_HAVE_HDF5)
   implicit none
         call OutputGetVarFromArray(realization_base,global_vec,cur_variable%ivar, &
                                    cur_variable%isubvar)
         string = cur_variable%name
+        call StringSwapChar(string," ","_")
         if (len_trim(cur_variable%units) > 0) then
           word = cur_variable%units
           call HDF5MakeStringCompatible(word)
   use Patch_module
   use Reaction_Aux_module
   use Variables_module
+  use String_module
 
 #if  !defined(PETSC_HAVE_HDF5)
   implicit none
     call OutputGetVarFromArray(realization_base,global_vec,cur_variable%ivar, &
                                 cur_variable%isubvar)
     string = cur_variable%name
+    call StringSwapChar(string," ","_")
     if (len_trim(cur_variable%units) > 0) then
       word = cur_variable%units
       call HDF5MakeStringCompatible(word)

File src/pflotran/reaction.F90

   ! update mineral volume fractions
   if (reaction%mineral%nkinmnrl > 0) then
   
-!   call RKineticMineral(res,jac,PETSC_FALSE,rt_auxvar,global_auxvar,1.d0, &
-!                        reaction,option)  ! Updates the mineral rates, res is not needed
+    call RKineticMineral(res,jac,PETSC_FALSE,rt_auxvar,global_auxvar,1.d0, &
+                         reaction,option)  ! Updates the mineral rates, res is not needed
                     
     do imnrl = 1, reaction%mineral%nkinmnrl
       ! rate = mol/m^3/sec

File src/pflotran/reactive_transport.F90

     do local_id = 1, grid%nlmax
       ghosted_id = grid%nL2G(local_id)
       if (patch%imat(ghosted_id) <= 0) cycle
+
+      if (.not.option%use_isothermal) then
+        call RUpdateTempDependentCoefs(global_aux_vars(ghosted_id),reaction, &
+                                     PETSC_FALSE,option)
+      endif
+
       call RUpdateSolution(rt_aux_vars(ghosted_id), &
                            global_aux_vars(ghosted_id),reaction,option)
     enddo