Commits

Peter Lichtner committed f5df562

Added age-conc units to output and removed bug in update_min_surf_area.

  • Participants
  • Parent commits 3d8308b

Comments (0)

Files changed (2)

File src/pflotran/reactive_transport.F90

   do i=1,reaction%mineral%nkinmnrl
     if (reaction%mineral%kinmnrl_print(i)) then
       name = trim(reaction%mineral%kinmnrl_names(i)) // ' Rate'
-      units = 'mol/sec/m^3'
+      units = 'mol/m^3/sec'
       call OutputVariableAddToList(list,name,OUTPUT_RATE,units, &
                                    MINERAL_RATE,i)      
     endif
   if (reaction%print_age) then
     if (reaction%species_idx%tracer_age_id > 0) then
       name = 'Tracer Age'
-      units = ''
+      units = 'sec-molar'
       call OutputVariableAddToList(list,name,OUTPUT_GENERIC,units, &
                                    AGE,reaction%species_idx%tracer_age_id, &
                                    reaction%species_idx%tracer_aq_id)       

File src/pflotran/realization.F90

   endif      
 
   if (reaction%update_mineral_surface_area) then
-    porosity_scale = 1.d0
+
     if (reaction%update_mnrl_surf_with_porosity) then
       ! placing the get/restore array calls within the condition will
       ! avoid improper access.
       call GridVecGetArrayF90(grid,field%work,vec_p,ierr)
     endif
+
     do local_id = 1, grid%nlmax
       ghosted_id = grid%nL2G(local_id)
-      if (reaction%update_mnrl_surf_with_porosity) then
-        porosity_scale = vec_p(local_id)** &
+      do imnrl = 1, reaction%mineral%nkinmnrl
+
+        porosity_scale = 1.d0
+        if (reaction%update_mnrl_surf_with_porosity) then
+          porosity_scale = vec_p(local_id)** &
              reaction%mineral%kinmnrl_surf_area_porosity_pwr(imnrl)
-!geh: srf_area_vol_frac_pwr must be defined on a per mineral basis, not
-!     solely material type.
-!          material_property_array(patch%imat(ghosted_id))%ptr%mnrl_surf_area_porosity_pwr
-      endif
-      do imnrl = 1, reaction%mineral%nkinmnrl
+!       geh: srf_area_vol_frac_pwr must be defined on a per mineral basis, not
+!       solely material type.
+!       material_property_array(patch%imat(ghosted_id))%ptr%mnrl_surf_area_porosity_pwr
+        endif
+
+        volfrac_scale = 1.d0
         if (rt_auxvars(ghosted_id)%mnrl_volfrac0(imnrl) > 0.d0) then
           volfrac_scale = (rt_auxvars(ghosted_id)%mnrl_volfrac(imnrl)/ &
                          rt_auxvars(ghosted_id)%mnrl_volfrac0(imnrl))** &
              reaction%mineral%kinmnrl_surf_area_vol_frac_pwr(imnrl)
-!geh: srf_area_vol_frac_pwr must be defined on a per mineral basis, not
-!     solely material type.
-!            material_property_array(patch%imat(ghosted_id))%ptr%mnrl_surf_area_volfrac_pwr
-          rt_auxvars(ghosted_id)%mnrl_area(imnrl) = &
+!       geh: srf_area_vol_frac_pwr must be defined on a per mineral basis, not
+!       solely material type.
+!       material_property_array(patch%imat(ghosted_id))%ptr%mnrl_surf_area_volfrac_pwr
+!         rt_auxvars(ghosted_id)%mnrl_area(imnrl) = &
+!           rt_auxvars(ghosted_id)%mnrl_area0(imnrl)*porosity_scale*volfrac_scale
+!       else
+!         rt_auxvars(ghosted_id)%mnrl_area(imnrl) = &
+!           rt_auxvars(ghosted_id)%mnrl_area0(imnrl)
+        endif
+
+        rt_auxvars(ghosted_id)%mnrl_area(imnrl) = &
             rt_auxvars(ghosted_id)%mnrl_area0(imnrl)*porosity_scale*volfrac_scale
-        else
-          rt_auxvars(ghosted_id)%mnrl_area(imnrl) = &
-            rt_auxvars(ghosted_id)%mnrl_area0(imnrl)
-        endif
 
         if (reaction%update_armor_mineral_surface .and. &
             reaction%mineral%kinmnrl_armor_crit_vol_frac(imnrl) > 0.d0) then
             endif
           enddo
 
-!         print *,'update-armor: ',imnrl,imnrl_armor,reaction%mineral%kinmnrl_armor_min_names(imnrl_armor)
+!         print *,'update-armor: ',imnrl,imnrl_armor, &
+!         reaction%mineral%kinmnrl_armor_min_names(imnrl_armor)
 
-!            check for negative surface area armoring correction
+!       check for negative surface area armoring correction
           if (reaction%mineral%kinmnrl_armor_crit_vol_frac(imnrl) > &
               rt_auxvars(ghosted_id)%mnrl_volfrac(imnrl_armor)) then