Commit c5da4577 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

remove unused local variables

Reviewed by gruenich.



git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@14163 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 97575a22
......@@ -574,7 +574,6 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocityOnBoundary(c
//determine saturation at the boundary -> if no saturation is known directly at the boundary use the cell saturation
Scalar satW = 0;
Scalar satNw = 0;
if (bcType.isDirichlet(satEqIdx))
{
switch (saturationType_)
......@@ -582,13 +581,11 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocityOnBoundary(c
case sw:
{
satW = boundValues[saturationIdx];
satNw = 1 - boundValues[saturationIdx];
break;
}
case sn:
{
satW = 1 - boundValues[saturationIdx];
satNw = boundValues[saturationIdx];
break;
}
}
......@@ -596,7 +593,6 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocityOnBoundary(c
else
{
satW = cellData.saturation(wPhaseIdx);
satNw = cellData.saturation(nPhaseIdx);
}
Scalar pressBound = boundValues[pressureIdx];
......
......@@ -437,7 +437,6 @@ void FvMpfaO2dPressureVelocity2p<TypeTag>::calculateVelocityOnBoundary(const Int
//determine saturation at the boundary -> if no saturation is known directly at the boundary use the cell saturation
Scalar satW = 0;
Scalar satNw = 0;
if (bcType.isDirichlet(satEqIdx))
{
switch (saturationType_)
......@@ -445,13 +444,11 @@ void FvMpfaO2dPressureVelocity2p<TypeTag>::calculateVelocityOnBoundary(const Int
case sw:
{
satW = boundValues[saturationIdx];
satNw = 1 - boundValues[saturationIdx];
break;
}
case sn:
{
satW = 1 - boundValues[saturationIdx];
satNw = boundValues[saturationIdx];
break;
}
}
......@@ -459,7 +456,6 @@ void FvMpfaO2dPressureVelocity2p<TypeTag>::calculateVelocityOnBoundary(const Int
else
{
satW = cellData.saturation(wPhaseIdx);
satNw = cellData.saturation(nPhaseIdx);
}
Scalar pressBound = boundValues[pressureIdx];
......
......@@ -565,7 +565,6 @@ void FVPressure2P2CMultiPhysics<TypeTag>::get1pFlux(Dune::FieldVector<Scalar, 2>
int phaseIdx = std::min(cellDataI.subdomain(), cellDataJ.subdomain());
Scalar rhoMean = 0.5 * (cellDataI.density(phaseIdx) + cellDataJ.density(phaseIdx));
//Scalar density = 0;
// 1p => no pc => only 1 pressure, potential
Scalar potential = (cellDataI.pressure(phaseIdx) - cellDataJ.pressure(phaseIdx)) / dist;
......@@ -579,21 +578,18 @@ void FVPressure2P2CMultiPhysics<TypeTag>::get1pFlux(Dune::FieldVector<Scalar, 2>
lambda = cellDataI.mobility(phaseIdx);
cellDataJ.setUpwindCell(intersection.indexInOutside(), contiWEqIdx, false); // store in cellJ since cellI is const
cellDataJ.setUpwindCell(intersection.indexInOutside(), contiNEqIdx, false); // store in cellJ since cellI is const
//density = cellDataI.density(phaseIdx);
}
else if (potential < 0.)
{
lambda = cellDataJ.mobility(phaseIdx);
cellDataJ.setUpwindCell(intersection.indexInOutside(), contiWEqIdx, true);
cellDataJ.setUpwindCell(intersection.indexInOutside(), contiNEqIdx, true);
//density = cellDataJ.density(phaseIdx);
}
else
{
lambda = harmonicMean(cellDataI.mobility(phaseIdx) , cellDataJ.mobility(phaseIdx));
cellDataJ.setUpwindCell(intersection.indexInOutside(), contiWEqIdx, false);
cellDataJ.setUpwindCell(intersection.indexInOutside(), contiNEqIdx, false);
//density = cellDataJ.density(phaseIdx);
}
entries[0] = lambda * faceArea * fabs(permeability * unitOuterNormal) / (dist);
......@@ -721,17 +717,18 @@ void FVPressure2P2CMultiPhysics<TypeTag>::get1pFluxOnBoundary(Dune::FieldVector<
potential += rhoMean * (unitDistVec * gravity_);
Scalar density = 0;
Scalar lambda(0.);
if (potential >= 0.)
if (Dune::FloatCmp::eq<Scalar, Dune::FloatCmp::absolute>(potential, 0.0, 1.0e-30))
{
density = (Dune::FloatCmp::eq<Scalar, Dune::FloatCmp::absolute>(potential, 0.0, 1.0e-30)) ? rhoMean : cellDataI.density(phaseIdx);
lambda = (Dune::FloatCmp::eq<Scalar, Dune::FloatCmp::absolute>(potential, 0.0, 1.0e-30)) ? 0.5 * (lambdaI + lambdaBound) : lambdaI;
lambda = 0.5*(lambdaI + lambdaBound);
}
else if (potential > 0.)
{
lambda = lambdaI;
}
else
{
density = densityBound;
lambda = lambdaBound;
}
......
......@@ -436,7 +436,6 @@ public:
// note that the gas phase is actually not existing!
// thus, this is used as phase switch criterion
Scalar xwn = priVars[switchIdx];
Scalar xww = 1 - xwn;
//first, xnw:
//psteam = xnw * pn = partial pressure of water in gas phase
......
......@@ -137,13 +137,6 @@ public:
}
else
#endif
if (AwnSurface::interfacialArea(aWettingNonWettingSurfaceParams, materialParams, Sw, pc ) < 0)
{
Scalar dummy = 0 ;
}
awn = AwnSurface::interfacialArea(aWettingNonWettingSurfaceParams, materialParams, Sw, pc ); // 10.; //
interfacialArea_[wPhaseIdx][nPhaseIdx] = awn ; //10. ;//
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment