From 717c37ccd7737eb09eb23f28c38105e07d1ea7ce Mon Sep 17 00:00:00 2001 From: Thomas Fetzer <thomas.fetzer@iws.uni-stuttgart.de> Date: Thu, 22 Oct 2015 11:59:17 +0200 Subject: [PATCH] [material] fix use of wrong componentIdx and unused variables --- dumux/material/fluidstates/2p2cfluidstate.hh | 2 +- dumux/material/fluidstates/pseudo1p2cfluidstate.hh | 2 +- dumux/material/fluidsystems/h2oairfluidsystem.hh | 8 -------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/dumux/material/fluidstates/2p2cfluidstate.hh b/dumux/material/fluidstates/2p2cfluidstate.hh index 2b24661e04..33f72a88d2 100644 --- a/dumux/material/fluidstates/2p2cfluidstate.hh +++ b/dumux/material/fluidstates/2p2cfluidstate.hh @@ -145,7 +145,7 @@ public: Scalar partialPressure(int phaseIdx, int componentIdx) const { if(phaseIdx==nPhaseIdx) - return partialPressure(nCompIdx); + return partialPressure(componentIdx); else DUNE_THROW(Dune::NotImplemented, "Not implemented for non-gaseous phases!"); } diff --git a/dumux/material/fluidstates/pseudo1p2cfluidstate.hh b/dumux/material/fluidstates/pseudo1p2cfluidstate.hh index 275cfbe7ec..9647ea52df 100644 --- a/dumux/material/fluidstates/pseudo1p2cfluidstate.hh +++ b/dumux/material/fluidstates/pseudo1p2cfluidstate.hh @@ -107,7 +107,7 @@ public: Scalar partialPressure(int phaseIdx, int componentIdx) const { if(phaseIdx==nPhaseIdx) - return partialPressure(nCompIdx); + return partialPressure(componentIdx); else DUNE_THROW(Dune::NotImplemented, "Not implemented for non-gaseous phases!"); } diff --git a/dumux/material/fluidsystems/h2oairfluidsystem.hh b/dumux/material/fluidsystems/h2oairfluidsystem.hh index dfe5e71e62..3d3004830c 100644 --- a/dumux/material/fluidsystems/h2oairfluidsystem.hh +++ b/dumux/material/fluidsystems/h2oairfluidsystem.hh @@ -414,14 +414,6 @@ public: * fluidState.averageMolarMass(nPhaseIdx) / std::max(1e-5, sumMoleFrac); - const Scalar partialPressureH2O = - fluidState.moleFraction(nPhaseIdx, H2OIdx) * - fluidState.pressure(nPhaseIdx); - - const Scalar partialPressureAir = - fluidState.moleFraction(nPhaseIdx, AirIdx) * - fluidState.pressure(nPhaseIdx); - return H2O::gasDensity(T, fluidState.partialPressure(nPhaseIdx, H2OIdx)) + Air::gasDensity(T, fluidState.partialPressure(nPhaseIdx, AirIdx)); -- GitLab