diff --git a/dumux/material/fluidsystems/brineair.hh b/dumux/material/fluidsystems/brineair.hh index caf93661a4d759ab14e19af42c1a4761f47ca358..f97b0996ca713f828f2aba777d4a8ffc6ac9e89d 100644 --- a/dumux/material/fluidsystems/brineair.hh +++ b/dumux/material/fluidsystems/brineair.hh @@ -516,15 +516,15 @@ public: Scalar pressure = fluidState.pressure(phaseIdx); if (phaseIdx == lPhaseIdx) { - assert(compIIdx == H2OIdx); - assert(compJIdx == AirIdx || compJIdx == NaClIdx); Scalar result = 0.0; if(compJIdx == AirIdx) result = Brine_Air::liquidDiffCoeff(temperature, pressure); else if (compJIdx == NaClIdx) result = 0.12e-9; //http://webserver.dmt.upm.es/~isidoro/dat1/Mass%20diffusivity%20data.htm else - DUNE_THROW(Dune::NotImplemented, "Binary difussion coefficient : Incorrect compIdx"); + DUNE_THROW(Dune::NotImplemented, "Binary diffusion coefficient of components " + << compIIdx << " and " << compJIdx + << " in phase " << phaseIdx); Valgrind::CheckDefined(result); return result; } @@ -534,15 +534,15 @@ public: if (compIIdx != AirIdx) std::swap(compIIdx, compJIdx); - assert(compIIdx == AirIdx); - assert(compJIdx == H2OIdx || compJIdx == NaClIdx); Scalar result = 0.0; if(compJIdx == H2OIdx) result = Brine_Air::gasDiffCoeff(temperature, pressure); else if (compJIdx == NaClIdx) result = 0.12e-9; //Just added to avoid numerical problem. does not have any physical significance else - DUNE_THROW(Dune::NotImplemented, "Binary difussion coefficient : Incorrect compIdx"); + DUNE_THROW(Dune::NotImplemented, "Binary diffusion coefficient of components " + << compIIdx << " and " << compJIdx + << " in phase " << phaseIdx); Valgrind::CheckDefined(result); return result; } diff --git a/dumux/material/fluidsystems/spe5parametercache.hh b/dumux/material/fluidsystems/spe5parametercache.hh index 587ce454bcb235608f52ef05214b060051b05462..54f6d22ee4f7ed030cd6e56548372f7fc7ae09a5 100644 --- a/dumux/material/fluidsystems/spe5parametercache.hh +++ b/dumux/material/fluidsystems/spe5parametercache.hh @@ -308,6 +308,7 @@ protected: *this, phaseIdx, /*isGasPhase=*/true); + break; } case oPhaseIdx: { // calculate molar volumes for the given composition. although @@ -320,7 +321,7 @@ protected: *this, phaseIdx, /*isGasPhase=*/false); - + break; } case wPhaseIdx: { // Density of water in the stock tank (i.e. atmospheric @@ -335,7 +336,10 @@ protected: // convert water density [kg/m^3] to molar volume [m^3/mol] Vm_[wPhaseIdx] = fs.averageMolarMass(wPhaseIdx)/waterDensity; + break; } + default: + DUNE_THROW(Dune::InvalidStateException, "invalid phaseIdx " << phaseIdx); } } diff --git a/test/material/fluidsystems/checkfluidsystem.hh b/test/material/fluidsystems/checkfluidsystem.hh index 89816424008346fdd250a1c016e7e6d75d3d8f85..3f521a1f7e33d150cdea43bd4f107ab01d1cdeac 100644 --- a/test/material/fluidsystems/checkfluidsystem.hh +++ b/test/material/fluidsystems/checkfluidsystem.hh @@ -86,6 +86,7 @@ public: for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { BaseFluidState::setSaturation(phaseIdx, 1.0 / numPhases); + BaseFluidState::setPressure(phaseIdx, 1e5); BaseFluidState::setDensity(phaseIdx, 1.0); for (int compIdx = 0; compIdx < numComponents; ++compIdx) @@ -148,7 +149,7 @@ public: { if (!allowPressure_) { - std::cout << "Dune::InvalidStateException: pressure called but not allowed" << std::endl; + std::cout << "HairSplittingFluidState: pressure called but not allowed" << std::endl; } assert(restrictPhaseIdx_ < 0 || restrictPhaseIdx_ == phaseIdx); return BaseFluidState::pressure(phaseIdx); @@ -636,7 +637,7 @@ int checkFluidSystem() // std::cout << collectedWarnings; if (collectedErrors.empty()) // success { - std::cout << "... successfull" << std::endl; + std::cout << "... successful" << std::endl; std::cout << "----------------------------------" << std::endl; return 0; }