From 386d877216b670e3c7a2a34bae2c1cf6520160ea Mon Sep 17 00:00:00 2001
From: Benjamin Faigle <benjamin.faigle@posteo.de>
Date: Wed, 29 Dec 2010 14:19:32 +0000
Subject: [PATCH] removed unnecessary //todo: comments for the release

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@4918 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 dumux/decoupled/2p2c/2p2cproperties.hh        |  2 +-
 dumux/decoupled/2p2c/dec2p2cfluidstate.hh     | 11 ++---
 dumux/decoupled/2p2c/fvpressure2p2c.hh        | 26 ++--------
 .../2p2c/fvpressure2p2cmultiphysics.hh        | 49 +------------------
 dumux/decoupled/2p2c/fvtransport2p2c.hh       |  8 ++-
 .../2p2c/fvtransport2p2cmultiphysics.hh       |  9 ++--
 6 files changed, 17 insertions(+), 88 deletions(-)

diff --git a/dumux/decoupled/2p2c/2p2cproperties.hh b/dumux/decoupled/2p2c/2p2cproperties.hh
index 3e6282354d..8a79fcc530 100644
--- a/dumux/decoupled/2p2c/2p2cproperties.hh
+++ b/dumux/decoupled/2p2c/2p2cproperties.hh
@@ -135,7 +135,7 @@ SET_INT_PROP(DecoupledTwoPTwoC,
 
 SET_INT_PROP(DecoupledTwoPTwoC,
         VelocityFormulation,
-        TwoPCommonIndices<TypeTag>::velocityTotal);
+        TwoPCommonIndices<TypeTag>::velocityW);
 
 SET_PROP(DecoupledTwoPTwoC, TransportSolutionType)
 {
diff --git a/dumux/decoupled/2p2c/dec2p2cfluidstate.hh b/dumux/decoupled/2p2c/dec2p2cfluidstate.hh
index b8b3a2bfe4..08e1632114 100644
--- a/dumux/decoupled/2p2c/dec2p2cfluidstate.hh
+++ b/dumux/decoupled/2p2c/dec2p2cfluidstate.hh
@@ -179,9 +179,9 @@ public:
         {
             DUNE_THROW(Dune::NotImplemented, "Pressure type not supported in fluidState!");
         }
-//        else  if (sat <= 0 || sat >= 1)
-//            DUNE_THROW(Dune::RangeError,
-//                       "Decoupled2p2c :: saturation initial and boundary conditions may not equal zero or one!");
+//        else  if (sat <= 0. || sat >= 1.)
+//            Dune::dinfo << "saturation initial and boundary conditions set to zero or one!"
+//                << " assuming fully saturated compositional conditions" << std::endl;
 
         // assign values
         Sw_ = sat;
@@ -197,11 +197,6 @@ public:
         double k2 = FluidSystem::activityCoeff(wPhaseIdx, nCompIdx, temperature_, phasePressure_[nPhaseIdx], *this)
 					/ phasePressure_[nPhaseIdx];
 
-        if (Sw_==1.)    //only wPhase present
-            k1 = 1.;
-        if (Sw_==0.)    //only nPhase present
-            k2 = 0.;
-
         // get mole fraction from equilibrium konstants
         Scalar xw1 = (1. - k2) / (k1 -k2);
 		Scalar xn1 = xw1 * k1;
diff --git a/dumux/decoupled/2p2c/fvpressure2p2c.hh b/dumux/decoupled/2p2c/fvpressure2p2c.hh
index beb25afbff..cc45ef8bbb 100644
--- a/dumux/decoupled/2p2c/fvpressure2p2c.hh
+++ b/dumux/decoupled/2p2c/fvpressure2p2c.hh
@@ -156,7 +156,6 @@ public:
 
     void calculateVelocity()
     {
-    	// TODO: do this if we use a total velocity description. else, its just a vaste of time.
         return;
     }
 
@@ -257,7 +256,7 @@ public:
                 * problem.variables().gridSize(), Matrix::random), f_(problem.variables().gridSize()),
                 debugWriter_("debugOutput2p2c"), gravity(problem.gravity())
     {
-        if (pressureType != pw && pressureType != pn && pressureType != pglobal)
+        if (pressureType != pw && pressureType != pn)
         {
             DUNE_THROW(Dune::NotImplemented, "Pressure type not supported!");
         }
@@ -691,7 +690,7 @@ void FVPressure2P2C<TypeTag>::assemble(bool first)
 	                //calculate current matrix entry
                     entry = faceArea * (lambdaW * dV_w + lambdaN * dV_n)
                             - volume / numberOfFaces * (lambdaW * gV_w + lambdaN * gV_n); 	// randintegral - gebietsintegral
-                    entry *= fabs((permeability*unitOuterNormal)/(dist)); // TODO: markus nimmt hier statt fabs() ein  unitDistVec * unitDistVec
+                    entry *= fabs((permeability*unitOuterNormal)/(dist));
 
                     //calculate right hand side
                     rightEntry = faceArea  * (unitOuterNormal * unitDistVec) * (densityW * lambdaW * dV_w + densityNW * lambdaN * dV_n);
@@ -1221,25 +1220,8 @@ void FVPressure2P2C<TypeTag>::updateMaterialLaws()
 
         //determine phase pressures from primary pressure variable
         Scalar pressW(0.), pressNW(0.);
-        switch (pressureType)
-        {
-        case pw:
-        {
-            pressW = problem_.variables().pressure()[globalIdx];
-
-            pressNW = problem_.variables().pressure()[globalIdx];
-            break;
-        }
-        case pn:
-        {
-            //todo: check this case for consistency throughout the model!
-            pressNW = problem_.variables().pressure()[globalIdx];
-
-            pressW = problem_.variables().pressure()[globalIdx];
+        pressW = pressNW = problem_.variables().pressure()[globalIdx];
 
-            break;
-        }
-        }
 
         //complete fluid state
         fluidState.update(Z1, pressW, problem_.spatialParameters().porosity(globalPos, *eIt), temperature_);
@@ -1250,7 +1232,7 @@ void FVPressure2P2C<TypeTag>::updateMaterialLaws()
         // initialize saturation
         problem_.variables().saturation(globalIdx) = fluidState.saturation(wPhaseIdx);
 
-        // initialize pC		todo: remove this dummy implementation
+        // initialize pC: As pC is currently neglected, it is set to zero.
         problem_.variables().capillaryPressure(globalIdx) = 0.0;
 
 
diff --git a/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh b/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh
index 1d07e0a7f0..c4fe6c309c 100644
--- a/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh
+++ b/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh
@@ -162,7 +162,6 @@ public:
 
     void calculateVelocity()
     {
-    	// TODO: do this if we use a total velocity description. else, its just a vaste of time.
         return;
     }
 
@@ -733,33 +732,8 @@ void FVPressure2P2CMultiPhysics<TypeTag>::assemble(bool first)
                         entry -= volume / numberOfFaces * (lambdaW * gV_w + lambdaN * gV_n);
                         rightEntry -= volume / numberOfFaces * (densityW * lambdaW * gV_w + densityNW * lambdaN * gV_n);
                     }
-                    entry *= fabs((permeability*unitOuterNormal)/(dist)); // TODO: markus nimmt hier statt fabs() ein  unitDistVec * unitDistVec
+                    entry *= fabs((permeability*unitOuterNormal)/(dist));
                     rightEntry *= (permeability * gravity);
-
-                    // TODO: implement a proper capillary pressure
-//	                switch (pressureType)
-//	                {
-//	                case pw:
-//						{
-//							// calculate capillary pressure gradient
-//							Dune::FieldVector<Scalar, dim> pCGradient = unitDistVec;
-//							pCGradient *= (pcI - pcJ) / dist;
-//
-//							//add capillary pressure term to right hand side
-//							rightEntry += 0.5 * (lambdaNWI + lambdaNWJ) * (permeability * pCGradient) * faceArea;
-//							break;
-//						}
-//	                case pn:
-//						{
-//							// calculate capillary pressure gradient
-//							Dune::FieldVector<Scalar, dim> pCGradient = unitDistVec;
-//							pCGradient *= (pcI - pcJ) / dist;
-//
-//							//add capillary pressure term to right hand side
-//							rightEntry -= 0.5 * (lambdaWI + lambdaWJ) * (permeability * pCGradient) * faceArea;
-//							break;
-//						}
-//	                }
                 }   // end !first
 
                 //set right hand side
@@ -814,8 +788,6 @@ void FVPressure2P2CMultiPhysics<TypeTag>::assemble(bool first)
                     }
                     else if(pressureType==pn)
                     {
-                    	//TODO: take pC from variables or from MaterialLaw?
-                    	// if the latter, one needs Sw
                         pcBound = problem_.variables().capillaryPressure(globalIdxI);
                         pressBC = pressBound - pcBound;
                     }
@@ -1354,25 +1326,8 @@ void FVPressure2P2CMultiPhysics<TypeTag>::updateMaterialLaws()
         {
         //determine phase pressures from primary pressure variable
         Scalar pressW(0.), pressNW(0.);
-        switch (pressureType)
-        {
-        case pw:
-        {
-            pressW = problem_.variables().pressure()[globalIdx];
+        pressW =pressNW= problem_.variables().pressure()[globalIdx];
 
-            pressNW = problem_.variables().pressure()[globalIdx];
-            break;
-        }
-        case pn:
-        {
-            //todo: check this case for consistency throughout the model!
-            pressNW = problem_.variables().pressure()[globalIdx];
-
-            pressW = problem_.variables().pressure()[globalIdx];
-
-            break;
-        }
-        }
             //complete fluid state
             fluidState.update(Z1, pressW, problem_.spatialParameters().porosity(globalPos, *eIt), temperature_);
 
diff --git a/dumux/decoupled/2p2c/fvtransport2p2c.hh b/dumux/decoupled/2p2c/fvtransport2p2c.hh
index 083fb51881..b093f893de 100644
--- a/dumux/decoupled/2p2c/fvtransport2p2c.hh
+++ b/dumux/decoupled/2p2c/fvtransport2p2c.hh
@@ -234,7 +234,6 @@ void FVTransport2P2C<TypeTag>::update(const Scalar t, Scalar& dt, TransportSolut
         double Xw1_I = problem_.variables().wet_X1(globalIdxI);
         double Xn1_I = problem_.variables().nonwet_X1(globalIdxI);
 
-        //TODO: decide which to use!!
         Scalar densityWI (0.), densityNWI(0.);
         if (GET_PROP_VALUE(TypeTag, PTAG(NumDensityTransport)))
         {
@@ -408,8 +407,6 @@ void FVTransport2P2C<TypeTag>::update(const Scalar t, Scalar& dt, TransportSolut
                 {
                     //get dirichlet pressure boundary condition
                     Scalar pressBound = 0.;
-                	//TODO: take pC from variables or from MaterialLaw?
-                	// if the latter, one needs Sw
                     Scalar pcBound = problem_.variables().capillaryPressure(globalIdxI);
                     switch (pressureType)
                     {
@@ -526,9 +523,10 @@ void FVTransport2P2C<TypeTag>::update(const Scalar t, Scalar& dt, TransportSolut
 
                 if (bcTypeTransport_ == BoundaryConditions::neumann)
                 {
+                    // Convention: outflow => positive sign : has to be subtracted from update vec
                     Dune::FieldVector<Scalar,2> J = problem_.neumann(globalPosFace, *isIt);
-                    updFactor[wCompIdx] = J[0] * faceArea / volume;
-                    updFactor[nCompIdx] = J[1] * faceArea / volume;
+                    updFactor[wCompIdx] = - J[0] * faceArea / volume;
+                    updFactor[nCompIdx] = - J[1] * faceArea / volume;
 
                     // for timestep control
 					#define cflIgnoresNeumann
diff --git a/dumux/decoupled/2p2c/fvtransport2p2cmultiphysics.hh b/dumux/decoupled/2p2c/fvtransport2p2cmultiphysics.hh
index 462aba458f..826e939e3e 100644
--- a/dumux/decoupled/2p2c/fvtransport2p2cmultiphysics.hh
+++ b/dumux/decoupled/2p2c/fvtransport2p2cmultiphysics.hh
@@ -242,7 +242,7 @@ void FVTransport2P2CMultiPhysics<TypeTag>::update(const Scalar t, Scalar& dt, Tr
                 const LocalPosition localPosFace(0);
 
                 Dune::FieldVector<Scalar, dimWorld> unitOuterNormal = isIt->unitOuterNormal(faceLocal);
-                if (switchNormals)		// TODO: whats this??
+                if (switchNormals)
                     unitOuterNormal *= -1.0;
 
                 Scalar faceArea = isIt->geometry().volume();
@@ -374,8 +374,6 @@ void FVTransport2P2CMultiPhysics<TypeTag>::update(const Scalar t, Scalar& dt, Tr
                     {
                         //get dirichlet pressure boundary condition
                         Scalar pressBound = 0.;
-                        //TODO: take pC from variables or from MaterialLaw?
-                        // if the latter, one needs Sw
                         Scalar pcBound = problem_.variables().capillaryPressure(globalIdxI);
                         switch (pressureType)
                         {
@@ -496,9 +494,10 @@ void FVTransport2P2CMultiPhysics<TypeTag>::update(const Scalar t, Scalar& dt, Tr
 
                     if (bcTypeTransport_ == BoundaryConditions::neumann)
                     {
+                        // Convention: outflow => positive sign : has to be subtracted from update vec
                         Dune::FieldVector<Scalar,2> J = problem_.neumann(globalPosFace, *isIt);
-                        updFactor[wCompIdx] = J[0] * faceArea / volume;
-                        updFactor[nCompIdx] = J[1] * faceArea / volume;
+                        updFactor[wCompIdx] = - J[0] * faceArea / volume;
+                        updFactor[nCompIdx] = - J[1] * faceArea / volume;
 
                         // for timestep control
                         #define cflIgnoresNeumann
-- 
GitLab