diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh index a108c812da01f6cde5fa04e6eff7a77afb49fca3..017947077c96065c8921cb2cc8000dde6a2ef469 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh @@ -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]; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressurevelocity2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressurevelocity2p.hh index 45aa6303c9abe84d7c2cda35f40a517cc62dee87..81687cc11df8eea8f2c6ad9272020657005f1c15 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressurevelocity2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressurevelocity2p.hh @@ -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]; diff --git a/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh b/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh index 2fa19766d20e3c5702616c5565db128333968c22..4b7685fb705211401d9c38bf306cf98498751153 100644 --- a/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh +++ b/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh @@ -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; } diff --git a/dumux/implicit/2p2c/2p2cvolumevariables.hh b/dumux/implicit/2p2c/2p2cvolumevariables.hh index eb4e5d3a841ad1d85bf7bf56eb043fe8c0a4f952..02e609f3bfe51a3f5954c80068de9d78fcdee975 100644 --- a/dumux/implicit/2p2c/2p2cvolumevariables.hh +++ b/dumux/implicit/2p2c/2p2cvolumevariables.hh @@ -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 diff --git a/dumux/implicit/mpnc/mpncvolumevariablesiakinetic.hh b/dumux/implicit/mpnc/mpncvolumevariablesiakinetic.hh index 0d5a33909c186e32bb09953b9f9a5dded2874dec..fb1dca130f95579152885f24e1aa734345901606 100644 --- a/dumux/implicit/mpnc/mpncvolumevariablesiakinetic.hh +++ b/dumux/implicit/mpnc/mpncvolumevariablesiakinetic.hh @@ -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. ;//