diff --git a/dumux/material/fluidstates/2p2cfluidstate.hh b/dumux/material/fluidstates/2p2cfluidstate.hh index 2b24661e0462488ed55ef6b08d74cccaa6e94826..33f72a88d27247ed1f7926278a9df206f5e1cb0c 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 275cfbe7ec2a0af008e6e2719dd49ed2b1ff8e56..9647ea52dfbfd01df20b643817457e8d37232243 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 dfe5e71e62a00fa56949caa2da68f48547bb9397..3d3004830c25b523a351867b170c5be3a2f18b9c 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));