From 414cd0cb667620b72df6e178e43afbe81b51e60e Mon Sep 17 00:00:00 2001 From: Bernd Flemisch <bernd@iws.uni-stuttgart.de> Date: Mon, 15 Oct 2012 12:07:20 +0000 Subject: [PATCH] box 2p2c: remove everything deprecated during 2.2-svn. This includes removal of the model-specific flux variables and problem, as well as several property, parameter and member function names. Reviewed by Christoph git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@9305 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/boxmodels/2p2c/2p2cfluxvariables.hh | 82 +------------------- dumux/boxmodels/2p2c/2p2cindices.hh | 34 +------- dumux/boxmodels/2p2c/2p2cmodel.hh | 16 ---- dumux/boxmodels/2p2c/2p2cproblem.hh | 65 ---------------- dumux/boxmodels/2p2c/2p2cproperties.hh | 5 -- dumux/boxmodels/2p2c/2p2cpropertydefaults.hh | 17 ++-- 6 files changed, 9 insertions(+), 210 deletions(-) delete mode 100644 dumux/boxmodels/2p2c/2p2cproblem.hh diff --git a/dumux/boxmodels/2p2c/2p2cfluxvariables.hh b/dumux/boxmodels/2p2c/2p2cfluxvariables.hh index dde22f7fa2..f93b15a39b 100644 --- a/dumux/boxmodels/2p2c/2p2cfluxvariables.hh +++ b/dumux/boxmodels/2p2c/2p2cfluxvariables.hh @@ -95,7 +95,6 @@ public: for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { density_[phaseIdx] = Scalar(0); molarDensity_[phaseIdx] = Scalar(0); - massFractionGrad_[phaseIdx] = Scalar(0); moleFractionGrad_[phaseIdx] = Scalar(0); } @@ -145,22 +144,12 @@ protected: // index for the element volume variables int volVarsIdx = this->face().fapIndices[idx]; - // the concentration gradient of the non-wetting - // component in the wetting phase - tmp = feGrad; - tmp *= elemVolVars[volVarsIdx].fluidState().massFraction(wPhaseIdx, nCompIdx); - massFractionGrad_[wPhaseIdx] += tmp; - + // the mole fraction gradient of the wetting phase tmp = feGrad; tmp *= elemVolVars[volVarsIdx].fluidState().moleFraction(wPhaseIdx, nCompIdx); moleFractionGrad_[wPhaseIdx] += tmp; - // // the concentration gradient of the wetting component - // // in the non-wetting phase - tmp = feGrad; - tmp *= elemVolVars[volVarsIdx].fluidState().massFraction(nPhaseIdx, wCompIdx); - massFractionGrad_[nPhaseIdx] += tmp; - + // the mole fraction gradient of the non-wetting phase tmp = feGrad; tmp *= elemVolVars[volVarsIdx].fluidState().moleFraction(nPhaseIdx, wCompIdx); moleFractionGrad_[nPhaseIdx] += tmp; @@ -217,85 +206,24 @@ protected: } public: - /*! - * \brief Return the pressure potential multiplied with the - * intrinsic permeability which goes from vertex i to - * vertex j. - * - * Note that the length of the face's normal is the area of the - * phase, so this is not the actual velocity by the integral of - * the velocity over the face's area. Also note that the phase - * mobility is not yet included here since this would require a - * decision on the upwinding approach (which is done in the - * actual model). - */ - DUNE_DEPRECATED_MSG("use the methods of the base flux variables instead") - Scalar KmvpNormal(int phaseIdx) const - { return -this->kGradPNormal(phaseIdx); } - - /*! - * \brief Return the pressure potential multiplied with the - * intrinsic permeability as vector (for velocity output) - */ - DUNE_DEPRECATED_MSG("use the methods of the base flux variables instead") - DimVector Kmvp(int phaseIdx) const - { return this->kGradP_[phaseIdx]; } - /*! * \brief The binary diffusion coefficient for each fluid phase. */ Scalar porousDiffCoeff(int phaseIdx) const { return porousDiffCoeff_[phaseIdx]; }; - /*! - * \brief Return density \f$\mathrm{[kg/m^3]}\f$ of a phase at the integration - * point. - */ - DUNE_DEPRECATED_MSG("use density instead") - Scalar densityAtIP(int phaseIdx) const - { return density(phaseIdx); } - /*! * \brief Return density \f$\mathrm{[kg/m^3]}\f$ of a phase. */ Scalar density(int phaseIdx) const { return density_[phaseIdx]; } - /*! - * \brief Return molar density \f$\mathrm{[mol/m^3]}\f$ of a phase at the integration - * point. - */ - DUNE_DEPRECATED_MSG("use molarDensity instead") - Scalar molarDensityAtIP(int phaseIdx) const - { return molarDensity(phaseIdx); } - /*! * \brief Return molar density \f$\mathrm{[mol/m^3]}\f$ of a phase. */ Scalar molarDensity(int phaseIdx) const { return molarDensity_[phaseIdx]; } - /*! - * \brief The concentration gradient of a component in a phase. - */ - DUNE_DEPRECATED_MSG("use massFractionGrad instead") - const DimVector &concentrationGrad(int phaseIdx) const - { return massFractionGrad(phaseIdx); }; - - /*! - * \brief The mass fraction gradient of the dissolved component in a phase. - */ - DUNE_DEPRECATED_MSG("use moleFractionGrad instead") - const DimVector &massFractionGrad(int phaseIdx) const - { return massFractionGrad_[phaseIdx]; }; - - /*! - * \brief The molar concentration gradient of a component in a phase. - */ - DUNE_DEPRECATED_MSG("use moleFractionGrad instead") - const DimVector &molarConcGrad(int phaseIdx) const - { return moleFractionGrad(phaseIdx); }; - /*! * \brief The mole fraction gradient of the dissolved component in a phase. */ @@ -303,16 +231,12 @@ public: { return moleFractionGrad_[phaseIdx]; }; protected: - // gradients - DimVector massFractionGrad_[numPhases]; + // mole fraction gradients DimVector moleFractionGrad_[numPhases]; // density of each face at the integration point Scalar density_[numPhases], molarDensity_[numPhases]; - // intrinsic permeability times pressure potential gradient - DimVector Kmvp_[numPhases]; - // the diffusion coefficient for the porous medium Scalar porousDiffCoeff_[numPhases]; }; diff --git a/dumux/boxmodels/2p2c/2p2cindices.hh b/dumux/boxmodels/2p2c/2p2cindices.hh index f1ee039dc4..1f00b2540e 100644 --- a/dumux/boxmodels/2p2c/2p2cindices.hh +++ b/dumux/boxmodels/2p2c/2p2cindices.hh @@ -42,10 +42,6 @@ struct TwoPTwoCFormulation pwSn, pnSw }; - enum { // DEPRECATED - plSg = pwSn, - pgSl = pnSw - }; }; /*! @@ -66,24 +62,15 @@ public: static const int wPhaseIdx = FluidSystem::wPhaseIdx; //!< Index of the wetting phase static const int nPhaseIdx = FluidSystem::nPhaseIdx; //!< Index of the non-wetting phase - static const int DUNE_DEPRECATED_MSG("use wPhaseIdx instead") lPhaseIdx = wPhaseIdx; //!< Index of the liquid phase - static const int DUNE_DEPRECATED_MSG("use nPhaseIdx instead") gPhaseIdx = nPhaseIdx; //!< Index of the gas phase - // Component indices static const int wCompIdx = FluidSystem::wCompIdx; //!< Index of the primary component of the wetting phase static const int nCompIdx = FluidSystem::nCompIdx; //!< Index of the primary component of the non-wetting phase - static const int DUNE_DEPRECATED_MSG("use wCompIdx instead") lCompIdx = wCompIdx; //!< Index of the liquid's primary component - static const int DUNE_DEPRECATED_MSG("use nCompIdx instead") gCompIdx = nCompIdx; //!< Index of the gas' primary component - // present phases (-> 'pseudo' primary variable) static const int wPhaseOnly = 1; //!< Only the wetting phase is present static const int nPhaseOnly = 0; //!< Only the non-wetting phase is present static const int bothPhases = 2; //!< Both phases are present - static const int DUNE_DEPRECATED_MSG("use wPhaseOnly instead") lPhaseOnly = wPhaseOnly; //!< Only the wetting phase is present - static const int DUNE_DEPRECATED_MSG("use nPhaseOnly instead") gPhaseOnly = nPhaseOnly; //!< Only the non-wetting phase is present - // Primary variable indices static const int pressureIdx = PVOffset + 0; //!< Index for wetting/non-wetting phase pressure (depending on formulation) in a solution vector static const int switchIdx = PVOffset + 1; //!< Index of the either the saturation or the mass fraction of the non-wetting/wetting phase @@ -91,19 +78,14 @@ public: static const int pwIdx = pressureIdx; //!< Index for wetting phase pressure in a solution vector static const int SnOrXIdx = switchIdx; //!< Index of the either the saturation of the non-wetting phase or the mass fraction secondary component in the only phase - static const int DUNE_DEPRECATED_MSG("use pwIdx instead") plIdx = pwIdx; //!< Index for liquid phase pressure in a solution vector - static const int DUNE_DEPRECATED_MSG("use SnOrXIdx instead") SgOrXIdx = SnOrXIdx; //!< Index of the either the saturation of the gas phase or the mass fraction of the secondary component in the only phase - // equation indices static const int conti0EqIdx = PVOffset; //!< Index of the mass conservation equation for the first component static const int contiWEqIdx = conti0EqIdx + wCompIdx; //!< Index of the mass conservation equation for the liquid's primary component static const int contiNEqIdx = conti0EqIdx + nCompIdx; //!< Index of the mass conservation equation for the gas' primary component - static const int DUNE_DEPRECATED_MSG("use contiWEqIdx instead") contiLEqIdx = contiWEqIdx; //!< Index of the mass conservation equation for the liquid's primary component - static const int DUNE_DEPRECATED_MSG("use contiNEqIdx instead") contiGEqIdx = contiNEqIdx; //!< Index of the mass conservation equation for the gas' primary component }; /*! - * \brief The indices for the isothermal TwoPTwoC model in the pg-Sl + * \brief The indices for the isothermal TwoPTwoC model in the pn-Sw * formulation. * * \tparam PVOffset The first index in a primary variable vector. @@ -118,24 +100,15 @@ public: static const int wPhaseIdx = FluidSystem::wPhaseIdx; //!< Index of the wetting phase static const int nPhaseIdx = FluidSystem::nPhaseIdx; //!< Index of the non-wetting phase - static const int DUNE_DEPRECATED_MSG("use wPhaseIdx instead") lPhaseIdx = wPhaseIdx; //!< Index of the liquid phase - static const int DUNE_DEPRECATED_MSG("use nPhaseIdx instead") gPhaseIdx = nPhaseIdx; //!< Index of the gas phase - // Component indices static const int wCompIdx = FluidSystem::wCompIdx; //!< Index of the primary component of the wetting phase static const int nCompIdx = FluidSystem::nCompIdx; //!< Index of the primary component of the non-wetting phase - static const int DUNE_DEPRECATED_MSG("use wCompIdx instead") lCompIdx = wCompIdx; //!< Index of the liquid's primary component - static const int DUNE_DEPRECATED_MSG("use nCompIdx instead") gCompIdx = nCompIdx; //!< Index of the gas' primary component - // present phases (-> 'pseudo' primary variable) static const int wPhaseOnly = 1; //!< Only the wetting phase is present static const int nPhaseOnly = 2; //!< Only the non-wetting phase is present static const int bothPhases = 3; //!< Both phases are present - static const int DUNE_DEPRECATED_MSG("use wPhaseOnly instead") lPhaseOnly = wPhaseOnly; //!< Only the wetting phase is present - static const int DUNE_DEPRECATED_MSG("use nPhaseOnly instead") gPhaseOnly = nPhaseOnly; //!< Only the non-wetting phase is present - // Primary variable indices static const int pressureIdx = PVOffset + 0; //!< Index for wetting/non-wetting phase pressure (depending on formulation) in a solution vector static const int switchIdx = PVOffset + 1; //!< Index of the either the saturation or the mass fraction of the non-wetting/wetting phase @@ -143,15 +116,10 @@ public: static const int pnIdx = pressureIdx; //!< Index for non-wetting phase pressure in a solution vector static const int SwOrXIdx = switchIdx; //!< Index of the either the saturation of the liquid phase or the mass fraction of the secondary component in the only phase - static const int DUNE_DEPRECATED_MSG("use pnIdx instead") pgIdx = pnIdx; //!< Index for gas phase pressure in a solution vector - static const int DUNE_DEPRECATED_MSG("use SwOrXIdx instead") SlOrXIdx = SwOrXIdx; //!< Index of the either the saturation of the liquid phase or the mass fraction secondary component in the only phase - // Equation indices static const int conti0EqIdx = PVOffset; //!< Index of the mass conservation equation for the first component static const int contiWEqIdx = conti0EqIdx + wCompIdx; //!< Index of the mass conservation equation for the liquid's primary component static const int contiNEqIdx = conti0EqIdx + nCompIdx; //!< Index of the mass conservation equation for the gas' primary component - static const int DUNE_DEPRECATED_MSG("use contiWEqIdx instead") contiLEqIdx = contiWEqIdx; //!< Index of the mass conservation equation for the liquid's primary component - static const int DUNE_DEPRECATED_MSG("use contiNEqIdx instead") contiGEqIdx = contiNEqIdx; //!< Index of the mass conservation equation for the gas' primary component }; // \} diff --git a/dumux/boxmodels/2p2c/2p2cmodel.hh b/dumux/boxmodels/2p2c/2p2cmodel.hh index 84c47e8fa5..f12fb73143 100644 --- a/dumux/boxmodels/2p2c/2p2cmodel.hh +++ b/dumux/boxmodels/2p2c/2p2cmodel.hh @@ -26,7 +26,6 @@ #include "2p2cproperties.hh" #include "2p2clocalresidual.hh" -#include "2p2cproblem.hh" namespace Dumux { @@ -240,21 +239,6 @@ public: resetPhasePresence_(); }; - /*! - * \brief Returns the relative weight of a primary variable for - * calculating relative errors. - * - * \param globalIdx The global vertex index - * \param pvIdx The primary variable index - */ - DUNE_DEPRECATED - Scalar primaryVarWeight(const int globalIdx, const int pvIdx) const - { - if (Indices::pressureIdx == pvIdx) - return std::min(1.0/this->prevSol()[globalIdx][pvIdx], 1.0); - return 1; - } - /*! * \brief Called by the problem if a time integration was * successful, post processing of the solution is done and the diff --git a/dumux/boxmodels/2p2c/2p2cproblem.hh b/dumux/boxmodels/2p2c/2p2cproblem.hh deleted file mode 100644 index 10587b42ff..0000000000 --- a/dumux/boxmodels/2p2c/2p2cproblem.hh +++ /dev/null @@ -1,65 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -// vi: set et ts=4 sw=4 sts=4: -/***************************************************************************** - * See the file COPYING for full copying permissions. * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program. If not, see <http://www.gnu.org/licenses/>. * - *****************************************************************************/ -/*! - * \file - * - * \brief Base class for all problems which use the two-phase, - * two-component box model - */ -#ifndef DUMUX_2P2C_PROBLEM_HH -#define DUMUX_2P2C_PROBLEM_HH - -#include <dumux/boxmodels/common/porousmediaboxproblem.hh> - -#include "2p2cproperties.hh" - -namespace Dumux -{ -/*! - * \ingroup TwoPTwoCModel - * \ingroup BoxBaseProblems - * \brief Base class for all problems which use the two-phase, two-component box model - * - */ -template<class TypeTag> -class TwoPTwoCProblem : public PorousMediaBoxProblem<TypeTag> -{ - typedef PorousMediaBoxProblem<TypeTag> ParentType; - - typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - -public: - /*! - * \brief The constructor - * - * \param timeManager The time manager - * \param gridView The grid view - * \param verbose Turn verbosity on or off - */ - DUNE_DEPRECATED_MSG("use PorousMediaBoxProblem instead") - TwoPTwoCProblem(TimeManager &timeManager, - const GridView &gridView, - bool verbose = true) - : ParentType(timeManager, gridView) - {} -}; -} - -#endif diff --git a/dumux/boxmodels/2p2c/2p2cproperties.hh b/dumux/boxmodels/2p2c/2p2cproperties.hh index 622ecd7bba..74bcf7ac14 100644 --- a/dumux/boxmodels/2p2c/2p2cproperties.hh +++ b/dumux/boxmodels/2p2c/2p2cproperties.hh @@ -49,24 +49,19 @@ NEW_TYPE_TAG(BoxTwoPTwoC, INHERITS_FROM(BoxModel)); NEW_PROP_TAG(NumPhases); //!< Number of fluid phases in the system NEW_PROP_TAG(NumComponents); //!< Number of fluid components in the system -NEW_PROP_TAG(TwoPTwoCIndices); //!< DEPRECATED Enumerations for the 2p2c models NEW_PROP_TAG(Indices); //!< Enumerations for the model NEW_PROP_TAG(Formulation); //!< The formulation of the model NEW_PROP_TAG(SpatialParams); //!< The type of the spatial parameters -NEW_PROP_TAG(SpatialParameters); //!< DEPRECATED The type of the spatial parameters NEW_PROP_TAG(FluidSystem); //!< Type of the multi-component relations NEW_PROP_TAG(MaterialLaw); //!< The material law which ought to be used (extracted from the spatial parameters) NEW_PROP_TAG(MaterialLawParams); //!< The parameters of the material law (extracted from the spatial parameters) NEW_PROP_TAG(ProblemEnableGravity); //!< Returns whether gravity is considered in the problem -NEW_PROP_TAG(EnableGravity); //!< DEPRECATED Returns whether gravity is considered in the problem NEW_PROP_TAG(ImplicitMassUpwindWeight); //!< The value of the upwind weight for the mass conservation equations -NEW_PROP_TAG(MassUpwindWeight); //!< DEPRECATED The value of the upwind weight for the mass conservation equations NEW_PROP_TAG(ImplicitMobilityUpwindWeight); //!< Weight for the upwind mobility in the velocity calculation NEW_PROP_TAG(ReplaceCompEqIdx); //!< The index of the total mass balance equation, if one component balance is replaced (ReplaceCompEqIdx < NumComponents) NEW_PROP_TAG(VtkAddVelocity); //!< Returns whether velocity vectors are written into the vtk output -NEW_PROP_TAG(EnableVelocityOutput); //!< DEPRECATED Returns whether vertex velocity vectors are written into the vtk output NEW_PROP_TAG(BaseFluxVariables); //! The base flux variables } } diff --git a/dumux/boxmodels/2p2c/2p2cpropertydefaults.hh b/dumux/boxmodels/2p2c/2p2cpropertydefaults.hh index c6f8c790df..de6b948ecf 100644 --- a/dumux/boxmodels/2p2c/2p2cpropertydefaults.hh +++ b/dumux/boxmodels/2p2c/2p2cpropertydefaults.hh @@ -29,7 +29,6 @@ #define DUMUX_2P2C_PROPERTY_DEFAULTS_HH #include "2p2cmodel.hh" -#include "2p2cproblem.hh" #include "2p2cindices.hh" #include "2p2cfluxvariables.hh" #include "2p2cvolumevariables.hh" @@ -126,16 +125,13 @@ SET_TYPE_PROP(BoxTwoPTwoC, FluxVariables, TwoPTwoCFluxVariables<TypeTag>); SET_TYPE_PROP(BoxTwoPTwoC, BaseFluxVariables, BoxDarcyFluxVariables<TypeTag>); //! the upwind weight for the mass conservation equations. -SET_SCALAR_PROP(BoxTwoPTwoC, ImplicitMassUpwindWeight, GET_PROP_VALUE(TypeTag, MassUpwindWeight)); -SET_SCALAR_PROP(BoxTwoPTwoC, MassUpwindWeight, 1.0);//DEPRECATED +SET_SCALAR_PROP(BoxTwoPTwoC, ImplicitMassUpwindWeight, 1.0); //! set default mobility upwind weight to 1.0, i.e. fully upwind SET_SCALAR_PROP(BoxTwoPTwoC, ImplicitMobilityUpwindWeight, 1.0); //! The indices required by the isothermal 2p2c model -SET_TYPE_PROP(BoxTwoPTwoC, Indices, typename GET_PROP_TYPE(TypeTag, TwoPTwoCIndices)); -SET_PROP(BoxTwoPTwoC, - TwoPTwoCIndices) //DEPRECATED +SET_PROP(BoxTwoPTwoC, Indices) { private: enum { Formulation = GET_PROP_VALUE(TypeTag, Formulation) }; public: @@ -144,16 +140,13 @@ SET_PROP(BoxTwoPTwoC, //! The spatial parameters to be employed. //! Use BoxSpatialParams by default. -SET_TYPE_PROP(BoxTwoPTwoC, SpatialParams, typename GET_PROP_TYPE(TypeTag, SpatialParameters)); -SET_TYPE_PROP(BoxTwoPTwoC, SpatialParameters, BoxSpatialParams<TypeTag>);//DEPRECATED +SET_TYPE_PROP(BoxTwoPTwoC, SpatialParams, BoxSpatialParams<TypeTag>); // disable velocity output by default -SET_BOOL_PROP(BoxTwoPTwoC, VtkAddVelocity, GET_PROP_VALUE(TypeTag, EnableVelocityOutput)); -SET_BOOL_PROP(BoxTwoPTwoC, EnableVelocityOutput, false); +SET_BOOL_PROP(BoxTwoPTwoC, VtkAddVelocity, false); // enable gravity by default -SET_BOOL_PROP(BoxTwoPTwoC, ProblemEnableGravity, GET_PROP_VALUE(TypeTag, EnableGravity)); -SET_BOOL_PROP(BoxTwoPTwoC, EnableGravity, true);//DEPRECATED +SET_BOOL_PROP(BoxTwoPTwoC, ProblemEnableGravity, true); // } -- GitLab