diff --git a/dumux/boxmodels/mpnc/mass/mpncvolumevariablesmass.hh b/dumux/boxmodels/mpnc/mass/mpncvolumevariablesmass.hh index 4c7f9adb422b57492e1619f37f2c28ecfb6a4aa5..625b89ae582bf696af1f15b0b2d7184711df7600 100644 --- a/dumux/boxmodels/mpnc/mass/mpncvolumevariablesmass.hh +++ b/dumux/boxmodels/mpnc/mass/mpncvolumevariablesmass.hh @@ -51,7 +51,7 @@ class MPNCVolumeVariablesMass typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, CompositionFromFugacitiesSolver) CompositionFromFugacitiesSolver; + typedef typename GET_PROP_TYPE(TypeTag, ConstraintSolver) ConstraintSolver; typedef typename GridView::template Codim<0>::Entity Element; enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) }; @@ -100,8 +100,8 @@ public: if (!hint) // if no hint was given, we ask the constraint solver // to make an initial guess - CompositionFromFugacitiesSolver::guessInitial(fs, paramCache, phaseIdx, fug); - CompositionFromFugacitiesSolver::solve(fs, paramCache, phaseIdx, fug); + ConstraintSolver::guessInitial(fs, paramCache, phaseIdx, fug); + ConstraintSolver::solve(fs, paramCache, phaseIdx, fug); /* std::cout << "final composition: " << FluidSystem::phaseName(phaseIdx) << "=" diff --git a/dumux/boxmodels/mpnc/mpncproperties.hh b/dumux/boxmodels/mpnc/mpncproperties.hh index 7fd0120a305c0f43df2a6ded6cda36a0b923fadd..a8833bb7cd2051e7e4556a5584f23847c6930d6e 100644 --- a/dumux/boxmodels/mpnc/mpncproperties.hh +++ b/dumux/boxmodels/mpnc/mpncproperties.hh @@ -92,9 +92,10 @@ NEW_PROP_TAG(MaterialLawParams); //!< The context material law (extracted from t //! The compositional twophase system of fluids which is considered NEW_PROP_TAG(FluidSystem); -//! The themodynamic constraint solver which calculates the +//! The thermodynamic constraint solver which calculates the //! composition of any phase given all component fugacities. NEW_PROP_TAG(CompositionFromFugacitiesSolver); +NEW_PROP_TAG(ConstraintSolver); //! Enable the energy equation? NEW_PROP_TAG(EnableEnergy); @@ -123,6 +124,9 @@ NEW_PROP_TAG(NewtonEnableChop); //! Which type of fluidstate should be used? NEW_PROP_TAG(FluidState); + +//! Property for the forchheimer coefficient +NEW_PROP_TAG(SpatialParamsForchCoeff); } } diff --git a/dumux/boxmodels/mpnc/mpncpropertydefaults.hh b/dumux/boxmodels/mpnc/mpncpropertydefaults.hh index 717d652e0d73b172d0adb8c754c0d40e1f2e97bc..10511e21bd7ffc8b2cb3d88c9acd410e21239d40 100644 --- a/dumux/boxmodels/mpnc/mpncpropertydefaults.hh +++ b/dumux/boxmodels/mpnc/mpncpropertydefaults.hh @@ -107,19 +107,37 @@ public: }; /*! - * \brief Set the themodynamic constraint solver which calculates the + * \brief Set the thermodynamic constraint solver which calculates the * composition of any phase given all component fugacities. + * + * DEPRECATED version see ConstraintSolver + * */ -SET_PROP(BoxMPNC, CompositionFromFugacitiesSolver) +SET_PROP(BoxMPNC, CompositionFromFugacitiesSolver) // DEPRECATED version see ConstraintSolver { private: typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; public: - typedef Dumux::CompositionFromFugacities<Scalar, FluidSystem> type; + typedef Dumux::CompositionFromFugacities<Scalar, FluidSystem> type; // DEPRECATED version see ConstraintSolver }; +/*! + * \brief Set the thermodynamic constraint solver which calculates the + * composition of any phase given all component fugacities. + */ +SET_PROP(BoxMPNC, ConstraintSolver) +{ +private: + typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; + +public: + typedef typename GET_PROP_TYPE(TypeTag, CompositionFromFugacitiesSolver) type; +}; + + //! Use the MpNc local jacobian operator for the MpNc model SET_TYPE_PROP(BoxMPNC, LocalResidual, @@ -217,6 +235,13 @@ SET_PROP(BoxMPNC, FluidState){ typedef Dumux::CompositionalFluidState<Scalar, FluidSystem> type; }; +//! default value for the forchheimer coefficient +// Source: Ward, J.C. 1964 Turbulent flow in porous media. ASCE J. Hydraul. Div 90. +// Actually the Forchheimer coefficient is also a function of the dimensions of the +// porous medium. Taking it as a constant is only a first approximation +// (Nield, Bejan, Convection in porous media, 2006, p. 10) +SET_SCALAR_PROP(BoxModel, SpatialParamsForchCoeff, 0.55); + //!< Should the averaging of velocities be done in the Model? (By default in the output) SET_BOOL_PROP(BoxMPNC, VelocityAveragingInModel, false);