Skip to content
Snippets Groups Projects
Commit 3dc91277 authored by Katharina Heck's avatar Katharina Heck Committed by Timo Koch
Browse files

[tests][mpnc] add molardensity in fluidstate for equilibrium fluidstate calculation

parent 5ce2e11b
No related branches found
No related tags found
1 merge request!498Correct computation of molar densities (fixes small mass balances errors)
......@@ -333,6 +333,10 @@ public:
dummyCache,
wPhaseIdx);
fluidState.setDensity(wPhaseIdx, density);
const Scalar molarDensity = FluidSystem::molarDensity(fluidState,
dummyCache,
wPhaseIdx);
fluidState.setMolarDensity(wPhaseIdx, molarDensity);
for(int phaseIdx=0; phaseIdx<numPhases; phaseIdx++) {
const Scalar h = FluidSystem::enthalpy(fluidState,
......
......@@ -333,9 +333,13 @@ public:
// compute density of injection phase
const Scalar density = FluidSystem::density(fluidState,
dummyCache,
gasPhaseIdx);
dummyCache,
gasPhaseIdx);
fluidState.setDensity(gasPhaseIdx, density);
const Scalar molarDensity = FluidSystem::molarDensity(fluidState,
dummyCache,
gasPhaseIdx);
fluidState.setMolarDensity(gasPhaseIdx, molarDensity);
for(int phaseIdx=0; phaseIdx<numPhases; phaseIdx++)
{
......
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