Commit 585cc54c authored by Kilian Weishaupt's avatar Kilian Weishaupt Committed by Timo Koch
Browse files

[material][1padapter] Make usable for immiscible fluidsystems

* choose correct number of compoments based on whether MultiPhaseFluidSystem
  is immiscible or not
parent 3d426e5d
...@@ -36,7 +36,7 @@ namespace FluidSystems { ...@@ -36,7 +36,7 @@ namespace FluidSystems {
/*! /*!
* \ingroup Fluidsystems * \ingroup Fluidsystems
* \brief An adapter for multi-phase fluid systems to be used with compositional one-phase models * \brief An adapter for multi-phase fluid systems to be used with (compositional) one-phase models
* \tparam MPFluidSystem the multi-phase fluid system to be adapted * \tparam MPFluidSystem the multi-phase fluid system to be adapted
* \tparam phase the index of the phase we choose from the multi-phase fluid system * \tparam phase the index of the phase we choose from the multi-phase fluid system
*/ */
...@@ -87,8 +87,9 @@ public: ...@@ -87,8 +87,9 @@ public:
//! number of phases in the fluid system //! number of phases in the fluid system
static constexpr int numPhases = 1; static constexpr int numPhases = 1;
//! number of components has to be the same as in the multi-phase fluid system as the composition needs to be defined //! for compositional models, the number of components has to be the same as in the multi-phase fluid system as the composition needs to be defined,
static constexpr int numComponents = MultiPhaseFluidSystem::numComponents; //! while for non-compositional models, the number of components must equal the number of phases (1 in this case)
static constexpr int numComponents = MultiPhaseFluidSystem::isMiscible() ? MultiPhaseFluidSystem::numComponents : numPhases;
//! number of components has to be the same as in the multi-phase fluid system as the composition needs to be defined //! number of components has to be the same as in the multi-phase fluid system as the composition needs to be defined
static constexpr int phase0Idx = 0; //!< index of the only phase static constexpr int phase0Idx = 0; //!< index of the only phase
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment