Skip to content
Snippets Groups Projects
Commit 717c37cc authored by Thomas Fetzer's avatar Thomas Fetzer
Browse files

[material] fix use of wrong componentIdx and unused variables

parent e8215ca5
No related branches found
No related tags found
2 merge requests!31Feature/colebrookwhiteboundarylayer,!11[material,decoupled] add partial and vapor pressure functions
...@@ -145,7 +145,7 @@ public: ...@@ -145,7 +145,7 @@ public:
Scalar partialPressure(int phaseIdx, int componentIdx) const Scalar partialPressure(int phaseIdx, int componentIdx) const
{ {
if(phaseIdx==nPhaseIdx) if(phaseIdx==nPhaseIdx)
return partialPressure(nCompIdx); return partialPressure(componentIdx);
else else
DUNE_THROW(Dune::NotImplemented, "Not implemented for non-gaseous phases!"); DUNE_THROW(Dune::NotImplemented, "Not implemented for non-gaseous phases!");
} }
......
...@@ -107,7 +107,7 @@ public: ...@@ -107,7 +107,7 @@ public:
Scalar partialPressure(int phaseIdx, int componentIdx) const Scalar partialPressure(int phaseIdx, int componentIdx) const
{ {
if(phaseIdx==nPhaseIdx) if(phaseIdx==nPhaseIdx)
return partialPressure(nCompIdx); return partialPressure(componentIdx);
else else
DUNE_THROW(Dune::NotImplemented, "Not implemented for non-gaseous phases!"); DUNE_THROW(Dune::NotImplemented, "Not implemented for non-gaseous phases!");
} }
......
...@@ -414,14 +414,6 @@ public: ...@@ -414,14 +414,6 @@ public:
* fluidState.averageMolarMass(nPhaseIdx) * fluidState.averageMolarMass(nPhaseIdx)
/ std::max(1e-5, sumMoleFrac); / 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 return
H2O::gasDensity(T, fluidState.partialPressure(nPhaseIdx, H2OIdx)) + H2O::gasDensity(T, fluidState.partialPressure(nPhaseIdx, H2OIdx)) +
Air::gasDensity(T, fluidState.partialPressure(nPhaseIdx, AirIdx)); Air::gasDensity(T, fluidState.partialPressure(nPhaseIdx, AirIdx));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment