From 89e2a70c7a476c691fc12fadd1e42712d1243aa5 Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Fri, 20 Jul 2018 18:24:25 +0200
Subject: [PATCH] Remove property PhaseIdx

---
 dumux/common/properties.hh              | 1 -
 dumux/freeflow/navierstokes/model.hh    | 1 -
 dumux/freeflow/properties.hh            | 7 +++----
 test/freeflow/rans/pipelauferproblem.hh | 7 +++----
 4 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/dumux/common/properties.hh b/dumux/common/properties.hh
index 710a59064a..456e4c552f 100644
--- a/dumux/common/properties.hh
+++ b/dumux/common/properties.hh
@@ -103,7 +103,6 @@ NEW_PROP_TAG(SolutionDependentMolecularDiffusion); //!< specifies if the paramet
 NEW_PROP_TAG(HeatConductionType);                  //!< The type for the calculation of the heat conduction fluxes
 NEW_PROP_TAG(SolutionDependentHeatConduction);     //!< specifies if the parameters for the heat conduction fluxes depend on the solution
 
-NEW_PROP_TAG(PhaseIdx);                            //!< A phase index to allow using a two-phase fluidsystem for one-phase models
 NEW_PROP_TAG(SpatialParams);                       //!< The type of the spatial parameters object
 NEW_PROP_TAG(FluidSystem);                         //!< The type of the fluid system to use
 NEW_PROP_TAG(FluidState);                          //!< The type of the fluid state to use
diff --git a/dumux/freeflow/navierstokes/model.hh b/dumux/freeflow/navierstokes/model.hh
index fa0d6aef7a..a4f6c02a9e 100644
--- a/dumux/freeflow/navierstokes/model.hh
+++ b/dumux/freeflow/navierstokes/model.hh
@@ -145,7 +145,6 @@ NEW_TYPE_TAG(NavierStokesNI, INHERITS_FROM(NavierStokes));
 ///////////////////////////////////////////////////////////////////////////
 // default property values for the isothermal single phase model
 ///////////////////////////////////////////////////////////////////////////
-SET_INT_PROP(NavierStokes, PhaseIdx, 0); //!< The default phase index
 SET_BOOL_PROP(NavierStokes, EnableInertiaTerms, true); //!< Consider inertia terms by default
 SET_BOOL_PROP(NavierStokes, NormalizePressure, true); //!< Normalize the pressure term in the momentum balance by default
 
diff --git a/dumux/freeflow/properties.hh b/dumux/freeflow/properties.hh
index 772e450e04..eefb288961 100644
--- a/dumux/freeflow/properties.hh
+++ b/dumux/freeflow/properties.hh
@@ -30,10 +30,9 @@
 #include <dumux/common/properties/model.hh>
 #include <dumux/discretization/fourierslaw.hh>
 
-namespace Dumux
-{
-namespace Properties
-{
+namespace Dumux {
+namespace Properties {
+
 //! Type tag for free-flow models
 NEW_TYPE_TAG(FreeFlow, INHERITS_FROM(ModelProperties));
 
diff --git a/test/freeflow/rans/pipelauferproblem.hh b/test/freeflow/rans/pipelauferproblem.hh
index b3ea81f423..3441e79575 100644
--- a/test/freeflow/rans/pipelauferproblem.hh
+++ b/test/freeflow/rans/pipelauferproblem.hh
@@ -141,7 +141,6 @@ class PipeLauferProblem : public ZeroEqProblem<TypeTag>
 
     using TimeLoopPtr = std::shared_ptr<CheckPointTimeLoop<Scalar>>;
 
-    static const unsigned int phaseIdx = GET_PROP_VALUE(TypeTag, PhaseIdx);
     static constexpr auto dimWorld = FVGridGeometry::GridView::dimensionworld;
 
 public:
@@ -161,10 +160,10 @@ public:
         FluidSystem::init();
         Dumux::TurbulenceProperties<Scalar, dimWorld, true> turbulenceProperties;
         FluidState fluidState;
-        fluidState.setPressure(phaseIdx, 1e5);
+        fluidState.setPressure(0, 1e5);
         fluidState.setTemperature(inletTemperature_);
-        Scalar density = FluidSystem::density(fluidState, phaseIdx);
-        Scalar kinematicViscosity = FluidSystem::viscosity(fluidState, phaseIdx) / density;
+        Scalar density = FluidSystem::density(fluidState, 0);
+        Scalar kinematicViscosity = FluidSystem::viscosity(fluidState, 0) / density;
         Scalar diameter = this->fvGridGeometry().bBoxMax()[1] - this->fvGridGeometry().bBoxMin()[1];
         // ideally the viscosityTilde parameter as inflow for the Spalart-Allmaras model should be zero
         viscosityTilde_ = getParam<Scalar>("Problem.InletViscosityTilde",
-- 
GitLab