From 0d0d058ccd5bbcea3a9055fb271c5c4d617ef1c7 Mon Sep 17 00:00:00 2001
From: Klaus Mosthaf <klmos@env.dtu.dk>
Date: Tue, 6 Mar 2012 15:03:00 +0000
Subject: [PATCH] removed calculation of unused velocityDivergence
 (commented)and massFractionGradient (moleFractionGradient is used for the
 diffusion)

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7961 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 dumux/freeflow/stokes/stokesfluxvariables.hh    | 17 +++++++++--------
 .../freeflow/stokes2c/stokes2cfluxvariables.hh  | 15 ++-------------
 2 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/dumux/freeflow/stokes/stokesfluxvariables.hh b/dumux/freeflow/stokes/stokesfluxvariables.hh
index d3551c21f2..9dc6ea5b4f 100644
--- a/dumux/freeflow/stokes/stokesfluxvariables.hh
+++ b/dumux/freeflow/stokes/stokesfluxvariables.hh
@@ -89,6 +89,7 @@ protected:
     {
         // calculate gradients and secondary variables at IPs
         FieldVector tmp(0.0);
+
         densityAtIP_ = Scalar(0);
         molarDensityAtIP_ = Scalar(0);
         viscosityAtIP_ = Scalar(0);
@@ -97,7 +98,7 @@ protected:
         velocityAtIP_ = Scalar(0);
         pressureGradAtIP_ = Scalar(0);
         velocityGradAtIP_ = Scalar(0);
-        velocityDivAtIP_ = Scalar(0);
+//        velocityDivAtIP_ = Scalar(0);
 
         for (int idx = 0;
              idx < fvGeom_.numVertices;
@@ -135,7 +136,7 @@ protected:
                 tmp *= elemVolVars[idx].velocity()[dimIdx];
                 velocityGradAtIP_[dimIdx] += tmp;
 
-                velocityDivAtIP_ += face().grad[idx][dimIdx]*elemVolVars[idx].velocity()[dimIdx];
+//                velocityDivAtIP_ += face().grad[idx][dimIdx]*elemVolVars[idx].velocity()[dimIdx];
             }
         }
 
@@ -147,7 +148,7 @@ protected:
         Valgrind::CheckDefined(velocityAtIP_);
         Valgrind::CheckDefined(pressureGradAtIP_);
         Valgrind::CheckDefined(velocityGradAtIP_);
-        Valgrind::CheckDefined(velocityDivAtIP_);
+//        Valgrind::CheckDefined(velocityDivAtIP_);
     };
 
     void determineUpwindDirection_(const ElementVolumeVariables &elemVolVars)
@@ -212,8 +213,8 @@ public:
     { return viscosityAtIP_; }
 
     /*!
-     * \brief Return the normal velocity \f$ \mathrm{[m/s]} \f$ at the integration
-     *        point.
+     * \brief Return the velocity \f$ \mathrm{[m/s]} \f$ at the integration
+     *        point multiplied by the normal and the area.
      */
     Scalar normalVelocityAtIP() const
     { return normalVelocityAtIP_; }
@@ -241,8 +242,8 @@ public:
      * \brief Return the divergence of the normal velocity at the
      *        integration point.
      */
-    Scalar velocityDivAtIP() const
-    { return velocityDivAtIP_; }
+//    Scalar velocityDivAtIP() const
+//    { return velocityDivAtIP_; }
 
     /*!
      * \brief Return the local index of the upstream sub-control volume.
@@ -273,8 +274,8 @@ protected:
     Scalar viscosityAtIP_;
     Scalar pressureAtIP_;
     Scalar normalVelocityAtIP_;
-    Scalar velocityDivAtIP_;
     VelocityVector velocityAtIP_;
+//    Scalar velocityDivAtIP_;
 
     // gradients at the IPs
     ScalarGradient pressureGradAtIP_;
diff --git a/dumux/freeflow/stokes2c/stokes2cfluxvariables.hh b/dumux/freeflow/stokes2c/stokes2cfluxvariables.hh
index 9d2350e56c..a457d1a351 100644
--- a/dumux/freeflow/stokes2c/stokes2cfluxvariables.hh
+++ b/dumux/freeflow/stokes2c/stokes2cfluxvariables.hh
@@ -92,17 +92,11 @@ public:
     { return massFractionAtIP_; }
 
     /*!
-     * \brief Return the diffusion coefficient at the integration point.
+     * \brief Return the molar diffusion coefficient at the integration point.
      */
     Scalar diffusionCoeffAtIP() const
     { return diffusionCoeffAtIP_; }
 
-    /*!
-     * \brief Return the gradient of the mass fraction at the integration point.
-     */
-    const ScalarGradient &massFractionGradAtIP() const
-    { return massFractionGradAtIP_; }
-
     /*!
      * \brief Return the gradient of the mole fraction at the integration point.
      */
@@ -117,7 +111,6 @@ protected:
     {
         massFractionAtIP_ = Scalar(0);
         diffusionCoeffAtIP_ = Scalar(0);
-        massFractionGradAtIP_ = Scalar(0);
         moleFractionGradAtIP_ = Scalar(0);
 
         // calculate gradients and secondary variables at IPs
@@ -133,9 +126,6 @@ protected:
             // the gradient of the mass fraction at the IP
             for (int dimIdx=0; dimIdx<dim; ++dimIdx)
             {
-                massFractionGradAtIP_ +=
-                    this->face().grad[idx][dimIdx]*
-                    elemVolVars[idx].fluidState().massFraction(phaseIdx, lCompIdx);
                 moleFractionGradAtIP_ +=
                     this->face().grad[idx][dimIdx] *
                     elemVolVars[idx].fluidState().moleFraction(phaseIdx, lCompIdx);
@@ -144,12 +134,11 @@ protected:
 
         Valgrind::CheckDefined(massFractionAtIP_);
         Valgrind::CheckDefined(diffusionCoeffAtIP_);
-        Valgrind::CheckDefined(massFractionGradAtIP_);
+        Valgrind::CheckDefined(moleFractionGradAtIP_);
     }
 
     Scalar massFractionAtIP_;
     Scalar diffusionCoeffAtIP_;
-    ScalarGradient massFractionGradAtIP_;
     ScalarGradient moleFractionGradAtIP_;
 };
 
-- 
GitLab