From 3dc912774461887e809e491bf4c66ecdef607c34 Mon Sep 17 00:00:00 2001
From: Katharina Heck <katharina.heck@iws.uni-stuttgart.de>
Date: Thu, 15 Mar 2018 08:52:15 +0100
Subject: [PATCH] [tests][mpnc] add molardensity in fluidstate for equilibrium
 fluidstate calculation

---
 .../porousmediumflow/mpnc/implicit/combustionproblem1c.hh | 4 ++++
 .../mpnc/implicit/evaporationatmosphereproblem.hh         | 8 ++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/test/porousmediumflow/mpnc/implicit/combustionproblem1c.hh b/test/porousmediumflow/mpnc/implicit/combustionproblem1c.hh
index 9776ca5b2d..f716e4de72 100644
--- a/test/porousmediumflow/mpnc/implicit/combustionproblem1c.hh
+++ b/test/porousmediumflow/mpnc/implicit/combustionproblem1c.hh
@@ -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,
diff --git a/test/porousmediumflow/mpnc/implicit/evaporationatmosphereproblem.hh b/test/porousmediumflow/mpnc/implicit/evaporationatmosphereproblem.hh
index 43f7dcec1e..84df600d6d 100644
--- a/test/porousmediumflow/mpnc/implicit/evaporationatmosphereproblem.hh
+++ b/test/porousmediumflow/mpnc/implicit/evaporationatmosphereproblem.hh
@@ -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++)
         {
-- 
GitLab