diff --git a/dumux/boxmodels/1p/1pfluxvariables.hh b/dumux/boxmodels/1p/1pfluxvariables.hh deleted file mode 100644 index 35a2bc0e966e422dd81adf60b61994df2ed51363..0000000000000000000000000000000000000000 --- a/dumux/boxmodels/1p/1pfluxvariables.hh +++ /dev/null @@ -1,222 +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 This file contains the data which is required to calculate -* the flux of the fluid over a face of a finite volume for the one-phase model. -* -* This means pressure and temperature gradients, phase densities at -* the integration point, etc. -*/ -#ifndef DUMUX_1P_FLUX_VARIABLES_HH -#define DUMUX_1P_FLUX_VARIABLES_HH - -#warning This file is deprecated. Use boxfluxvariables instead. - -#include "1pproperties.hh" - -#include <dumux/boxmodels/common/boxdarcyfluxvariables.hh> -#include <dumux/common/math.hh> - -namespace Dumux -{ - -/*! -* \ingroup OnePBoxModel -* \ingroup BoxFluxVariables -* \brief This template class contains the data which is required to -* calculate the flux of the fluid over a face of a -* finite volume for the one-phase model. -*/ -template <class TypeTag> -class OnePFluxVariables : public BoxDarcyFluxVariables<TypeTag> -{ -typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; -typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem; -typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; -typedef typename GET_PROP_TYPE(TypeTag, SpatialParams) SpatialParams; - -typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; -typedef typename GridView::template Codim<0>::Entity Element; -enum { dim = GridView::dimension }; -typedef Dune::FieldVector<Scalar, dim> DimVector; -typedef Dune::FieldMatrix<Scalar, dim, dim> DimMatrix; - -typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; -typedef typename FVElementGeometry::SubControlVolumeFace SCVFace; - -public: -/* -* \brief The constructor. -* -* \param problem The problem -* \param element The finite element -* \param fvGeometry The finite-volume geometry in the box scheme -* \param faceIdx The local index of the SCV (sub-control-volume) face -* \param elemVolVars The volume variables of the current element -* \param onBoundary A boolean variable to specify whether the flux variables -* are calculated for interior SCV faces or boundary faces, default=false -*/ -OnePFluxVariables(const Problem &problem, - const Element &element, - const FVElementGeometry &fvGeometry, - const int faceIdx, - const ElementVolumeVariables &elemVolVars, - const bool onBoundary = false) - : BoxDarcyFluxVariables<TypeTag>(problem, element, fvGeometry, faceIdx, elemVolVars, onBoundary), - fvGeometry_(fvGeometry), onBoundary_(onBoundary) - { - faceIdx_ = faceIdx; - - calculateK_(problem, element); - calculateGradients_(problem, element, elemVolVars); - }; - - /*! - * \brief The face of the current sub-control volume. - */ - const SCVFace &face() const - { - if (onBoundary_) - return fvGeometry_.boundaryFace[faceIdx_]; - else - return fvGeometry_.subContVolFace[faceIdx_]; - } - - /*! - * \brief Return the intrinsic permeability \f$\mathrm{[m^2]}\f$. - */ - const DimMatrix &intrinsicPermeability() const - { return K_; } - - /*! - * \brief Return the pressure potential gradient \f$\mathrm{[Pa/m]}\f$. - */ - const DimVector &potentialGrad() const - { return potentialGrad_; } - - /*! - * \brief Given the intrinisc permeability times the pressure - * potential gradient and SCV-face normal for a phase, - * return the local index of the upstream control volume - * for a given phase. - * - * \param normalFlux The normal flux i.e. the given intrinsic permeability - * times the pressure potential gradient and SCV face normal. - * - */ - int upstreamIdx(Scalar normalFlux) const - { return (normalFlux >= 0)?face().i:face().j; } - - /*! - * \brief Given the intrinisc permeability times the pressure - * potential gradient and SCV face normal for a phase, - * return the local index of the downstream control volume - * for a given phase. - * - * \param normalFlux The normal flux i.e. the given intrinsic permeability - * times the pressure potential gradient and SCV face normal. - * - */ - int downstreamIdx(Scalar normalFlux) const - { return (normalFlux >= 0)?face().j:face().i; } - -private: - void calculateGradients_(const Problem &problem, - const Element &element, - const ElementVolumeVariables &elemVolVars) - { - potentialGrad_ = 0.0; - - // calculate potential gradient - for (int idx = 0; - idx < fvGeometry_.numFAP; - idx++) // loop over adjacent vertices - { - // FE gradient at vertex idx - const DimVector &feGrad = face().grad[idx]; - - // index for the element volume variables - int volVarsIdx = face().fapIndices[idx]; - - // the pressure gradient - DimVector tmp(feGrad); - tmp *= elemVolVars[volVarsIdx].pressure(); - potentialGrad_ += tmp; - } - - /////////////// - // correct the pressure gradients by the gravitational acceleration - /////////////// - if (GET_PARAM_FROM_GROUP(TypeTag, bool, Problem, EnableGravity)) { - // estimate the gravitational acceleration at a given SCV face - // using the arithmetic mean - DimVector g(problem.boxGravity(element, fvGeometry_, face().i)); - g += problem.boxGravity(element, fvGeometry_, face().j); - g /= 2; - - // calculate the phase density at the integration point. we - // only do this if the wetting phase is present in both cells - Scalar rhoI = elemVolVars[face().i].density(); - Scalar rhoJ = elemVolVars[face().j].density(); - Scalar density = (rhoI + rhoJ)/2; - - // make it a force - DimVector f(g); - f *= density; - - // calculate the final potential gradient - potentialGrad_ -= f; - } - } - - void calculateK_(const Problem &problem, - const Element &element) - { - const SpatialParams &spatialParams = problem.spatialParams(); - spatialParams.meanK(K_, - spatialParams.intrinsicPermeability(element, - fvGeometry_, - face().i), - spatialParams.intrinsicPermeability(element, - fvGeometry_, - face().j)); - } - -protected: - const FVElementGeometry &fvGeometry_; - int faceIdx_; - const bool onBoundary_; - - // gradients - DimVector potentialGrad_; - - // intrinsic permeability - DimMatrix K_; - - // local index of the upwind vertex - int upstreamIdx_; - // local index of the downwind vertex - int downstreamIdx_; -}; - -} // end namepace - -#endif diff --git a/dumux/boxmodels/1p/1pmodel.hh b/dumux/boxmodels/1p/1pmodel.hh index d479a4557967a5e26a3ffb3936af879487fdd77c..40afc0384823a7d9f9d6f9d678f8e83df9fc301c 100644 --- a/dumux/boxmodels/1p/1pmodel.hh +++ b/dumux/boxmodels/1p/1pmodel.hh @@ -30,7 +30,6 @@ #include <dumux/boxmodels/common/boxmodel.hh> #include "1plocalresidual.hh" -#include "1pproblem.hh" namespace Dumux { diff --git a/dumux/boxmodels/1p/1pproblem.hh b/dumux/boxmodels/1p/1pproblem.hh deleted file mode 100644 index f8797226a6264df9770ab45412bdd9d26c156d8c..0000000000000000000000000000000000000000 --- a/dumux/boxmodels/1p/1pproblem.hh +++ /dev/null @@ -1,84 +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 one-phase box - * model. - */ -#ifndef DUMUX_1P_PROBLEM_HH -#define DUMUX_1P_PROBLEM_HH - -#include <dumux/boxmodels/common/porousmediaboxproblem.hh> -#include "1pproperties.hh" - -namespace Dumux -{ -/*! - * \ingroup OnePBoxModel - * \ingroup BoxBaseProblems - * \brief Base class for all problems which use the single-phase box model. - * - */ -template<class TypeTag> -class OnePBoxProblem : public PorousMediaBoxProblem<TypeTag> -{ - typedef PorousMediaBoxProblem<TypeTag> ParentType; - - typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GET_PROP_TYPE(TypeTag, SpatialParams) SpatialParams; - -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") - OnePBoxProblem(TimeManager &timeManager, - const GridView &gridView, - bool verbose = true) - : ParentType(timeManager, gridView) - {} - - /*! - * \brief The constructor - * - * \param timeManager The time manager - * \param gridView The grid view - * \param spatialParams The spatial parameters object - * \param verbose Turn verbosity on or off - */ - DUNE_DEPRECATED_MSG("use PorousMediaBoxProblem instead") - OnePBoxProblem(TimeManager &timeManager, - const GridView &gridView, - SpatialParams &spatialParams, - bool verbose = true) - : ParentType(timeManager, gridView) - {} - - ~OnePBoxProblem() - {} -}; -} - -#endif diff --git a/dumux/boxmodels/1p/1pproperties.hh b/dumux/boxmodels/1p/1pproperties.hh index 1d0b2c4711cc323fa5f77461aff2ce738bd3a746..7448c828fe2684cec1298ec330a2b789a33d0e7c 100644 --- a/dumux/boxmodels/1p/1pproperties.hh +++ b/dumux/boxmodels/1p/1pproperties.hh @@ -49,18 +49,13 @@ NEW_TYPE_TAG(BoxOneP, INHERITS_FROM(BoxModel)); ////////////////////////////////////////////////////////////////// NEW_PROP_TAG(NumPhases); //!< Number of fluid phases in the system -NEW_PROP_TAG(OnePIndices); //!< DEPRECATED Enumerations for the 1p models NEW_PROP_TAG(Indices); //!< Enumerations for the model NEW_PROP_TAG(SpatialParams); //!< The type of the spatial parameters object -NEW_PROP_TAG(SpatialParameters); //!< DEPRECATED The type of the spatial parameters object NEW_PROP_TAG(FluidSystem); //!< The type of the fluid system to use NEW_PROP_TAG(Fluid); //!< The fluid used for the default fluid system 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(MassUpwindWeight); //!< DEPRECATED Returns weight of the upwind cell when calculating fluxes NEW_PROP_TAG(ImplicitMassUpwindWeight); //!< Returns weight of the upwind cell when calculating fluxes NEW_PROP_TAG(ImplicitMobilityUpwindWeight); //!< Weight for the upwind mobility in the velocity calculation -NEW_PROP_TAG(MobilityUpwindWeight); //!< DEPRECATED Weight for the upwind mobility in the velocity calculation // \} } diff --git a/dumux/boxmodels/1p/1ppropertydefaults.hh b/dumux/boxmodels/1p/1ppropertydefaults.hh index 54343674369378716e67af0cce2cca42d2a66fb1..59b81f2cfe7b9caf452e1e92b35723c34996eea0 100644 --- a/dumux/boxmodels/1p/1ppropertydefaults.hh +++ b/dumux/boxmodels/1p/1ppropertydefaults.hh @@ -67,23 +67,19 @@ SET_TYPE_PROP(BoxOneP, VolumeVariables, OnePVolumeVariables<TypeTag>); SET_TYPE_PROP(BoxOneP, FluxVariables, BoxDarcyFluxVariables<TypeTag>); //! The indices required by the isothermal single-phase model -SET_TYPE_PROP(BoxOneP, Indices, typename GET_PROP_TYPE(TypeTag, OnePIndices)); -SET_TYPE_PROP(BoxOneP, OnePIndices, OnePIndices);//DEPRECATED +SET_TYPE_PROP(BoxOneP, Indices, OnePIndices); //! The spatial parameters to be employed. //! Use BoxSpatialParamsOneP by default. -SET_TYPE_PROP(BoxOneP, SpatialParams, typename GET_PROP_TYPE(TypeTag, SpatialParameters)); -SET_TYPE_PROP(BoxOneP, SpatialParameters, BoxSpatialParamsOneP<TypeTag>);//DEPRECATED +SET_TYPE_PROP(BoxOneP, SpatialParams, BoxSpatialParamsOneP<TypeTag>); //! The weight of the upwind control volume when calculating //! fluxes. Use central differences by default. -SET_SCALAR_PROP(BoxOneP, ImplicitMassUpwindWeight, GET_PROP_VALUE(TypeTag, MassUpwindWeight)); -SET_SCALAR_PROP(BoxOneP, MassUpwindWeight, 0.5);//DEPRECATED +SET_SCALAR_PROP(BoxOneP, ImplicitMassUpwindWeight, 0.5); //! weight for the upwind mobility in the velocity calculation //! fluxes. Use central differences by default. -SET_SCALAR_PROP(BoxOneP, ImplicitMobilityUpwindWeight, GET_PROP_VALUE(TypeTag, MobilityUpwindWeight)); -SET_SCALAR_PROP(BoxOneP, MobilityUpwindWeight, 0.5);//DEPRECATED +SET_SCALAR_PROP(BoxOneP, ImplicitMobilityUpwindWeight, 0.5); //! The fluid system to use by default SET_TYPE_PROP(BoxOneP, FluidSystem, Dumux::FluidSystems::OneP<typename GET_PROP_TYPE(TypeTag, Scalar), typename GET_PROP_TYPE(TypeTag, Fluid)>); @@ -96,8 +92,7 @@ public: }; // enable gravity by default -SET_BOOL_PROP(BoxOneP, ProblemEnableGravity, GET_PROP_VALUE(TypeTag, EnableGravity)); -SET_BOOL_PROP(BoxOneP, EnableGravity, true);//DEPRECATED +SET_BOOL_PROP(BoxOneP, ProblemEnableGravity, true); // \} } // end namepace Properties