From 60309955c096deff2425675d6f0574d518a36e4a Mon Sep 17 00:00:00 2001 From: Katherina Baber <katherina.baber@gmail.com> Date: Thu, 10 May 2012 14:00:13 +0000 Subject: [PATCH] naming convetions that had been forgotten delete deprecated spatialparameters Reviewed by Christoph and Bernd git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@8297 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/boxmodels/1p/1plocalresidual.hh | 9 ++-- dumux/boxmodels/1p2c/1p2clocalresidual.hh | 23 ++++---- test/boxmodels/1p/1ptestproblem.hh | 3 +- test/boxmodels/1p/1ptestspatialparameters.hh | 53 ------------------- .../1p2c/1p2coutflowspatialparameters.hh | 50 ----------------- 5 files changed, 20 insertions(+), 118 deletions(-) delete mode 100644 test/boxmodels/1p/1ptestspatialparameters.hh delete mode 100644 test/boxmodels/1p2c/1p2coutflowspatialparameters.hh diff --git a/dumux/boxmodels/1p/1plocalresidual.hh b/dumux/boxmodels/1p/1plocalresidual.hh index 3f61b3b7a4..a29a479c28 100644 --- a/dumux/boxmodels/1p/1plocalresidual.hh +++ b/dumux/boxmodels/1p/1plocalresidual.hh @@ -59,7 +59,10 @@ class OnePLocalResidual : public GET_PROP_TYPE(TypeTag, BaseLocalResidual) typedef Dune::FieldVector<Scalar, dim> DimVector; typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; - enum { pressureIdx = Indices::pressureIdx }; + enum { + conti0EqIdx = Indices::conti0EqIdx, //index for the mass balance + pressureIdx = Indices::pressureIdx //index for the primary variable + }; public: @@ -96,7 +99,7 @@ public: const VolumeVariables &volVars = elemVolVars[scvIdx]; // partial time derivative of the wetting phase mass - storage[pressureIdx] = volVars.density() * volVars.porosity(); + storage[conti0EqIdx] = volVars.density() * volVars.porosity(); } @@ -123,7 +126,7 @@ public: const VolumeVariables &up = this->curVolVars_(fluxVars.upstreamIdx(normalFlux)); const VolumeVariables &dn = this->curVolVars_(fluxVars.downstreamIdx(normalFlux)); - flux[pressureIdx] = + flux[conti0EqIdx] = (( upwindWeight_)*(up.density()/up.viscosity()) + (1 - upwindWeight_)*(dn.density()/dn.viscosity())) diff --git a/dumux/boxmodels/1p2c/1p2clocalresidual.hh b/dumux/boxmodels/1p2c/1p2clocalresidual.hh index 7ae0633039..41fb6e0df2 100644 --- a/dumux/boxmodels/1p2c/1p2clocalresidual.hh +++ b/dumux/boxmodels/1p2c/1p2clocalresidual.hh @@ -78,10 +78,11 @@ protected: //phase index phaseIdx = Indices::phaseIdx, + comp1Idx = Indices::comp1Idx, // indices of the primary variables pressuerIdx = Indices::pressureIdx, - comp1Idx = Indices::comp1Idx, + transportCompIdx = Indices::transportCompIdx, // indices of the equations conti0EqIdx = Indices::conti0EqIdx, @@ -129,19 +130,19 @@ public: if(!useMoles) { // storage term of continuity equation - massfractions - storage[contiEqIdx] += + storage[conti0EqIdx] += volVars.fluidState().density(phaseIdx)*volVars.porosity(); //storage term of the transport equation - massfractions - storage[transEqIdx] += + storage[transportEqIdx] += volVars.fluidState().density(phaseIdx) * volVars.fluidState().massFraction(phaseIdx, comp1Idx) * volVars.porosity(); } else { // storage term of continuity equation- molefractions //careful: molarDensity changes with moleFrac! - storage[contiEqIdx] += volVars.molarDensity()*volVars.porosity(); + storage[conti0EqIdx] += volVars.molarDensity()*volVars.porosity(); // storage term of the transport equation - molefractions - storage[transEqIdx] += + storage[transportEqIdx] += volVars.fluidState().molarDensity(phaseIdx)*volVars.fluidState().moleFraction(phaseIdx, comp1Idx) * volVars.porosity(); } @@ -195,14 +196,14 @@ public: { // total mass flux - massfraction //KmvpNormal is the Darcy velocity multiplied with the normal vector, calculated in 1p2cfluxvariables.hh - flux[contiEqIdx] += + flux[conti0EqIdx] += fluxVars.KmvpNormal() * (( upwindWeight_)*up.density()/up.viscosity() + ((1 - upwindWeight_)*dn.density()/dn.viscosity())); // advective flux of the second component - massfraction - flux[transEqIdx] += + flux[transportEqIdx] += fluxVars.KmvpNormal() * (( upwindWeight_)*up.fluidState().density(phaseIdx) * up.fluidState().massFraction(phaseIdx, comp1Idx)/up.viscosity() + @@ -212,14 +213,14 @@ public: { // total mass flux - molefraction //KmvpNormal is the Darcy velocity multiplied with the normal vector, calculated in 1p2cfluxvariables.hh - flux[contiEqIdx] += + flux[conti0EqIdx] += fluxVars.KmvpNormal() * (( upwindWeight_)*up.molarDensity()/up.viscosity() + ((1 - upwindWeight_)*dn.molarDensity()/dn.viscosity())); // advective flux of the second component -molefraction - flux[transEqIdx] += + flux[transportEqIdx] += fluxVars.KmvpNormal() * (( upwindWeight_)*up.molarDensity() * up.fluidState().moleFraction(phaseIdx, comp1Idx)/up.viscosity() + @@ -246,7 +247,7 @@ public: tmp = -(fluxVars.moleFractionGrad(comp1Idx)*fluxVars.face().normal); tmp *= fluxVars.porousDiffCoeff() * fluxVars.molarDensity(); // convert it to a mass flux and add it - flux[transEqIdx] += tmp * FluidSystem::molarMass(comp1Idx); + flux[transportEqIdx] += tmp * FluidSystem::molarMass(comp1Idx); } else { @@ -260,7 +261,7 @@ public: // tmp -= fluxVars.molarDensity()* // (normalDisp * fluxVars.moleFractionGrad(comp1Idx)); - flux[transEqIdx] += tmp; + flux[transportEqIdx] += tmp; } } diff --git a/test/boxmodels/1p/1ptestproblem.hh b/test/boxmodels/1p/1ptestproblem.hh index 2052c204db..82781ed376 100644 --- a/test/boxmodels/1p/1ptestproblem.hh +++ b/test/boxmodels/1p/1ptestproblem.hh @@ -127,6 +127,7 @@ class OnePTestProblem : public PorousMediaBoxProblem<TypeTag> dimWorld = GridView::dimensionworld, // indices of the primary variables + conti0EqIdx = Indices::conti0EqIdx, pressureIdx = Indices::pressureIdx }; @@ -234,7 +235,7 @@ public: { // const GlobalPosition &globalPos = fvGeometry.boundaryFace[boundaryFaceIdx].ipGlobal; - priVars[pressureIdx] = 0; + priVars[conti0EqIdx] = 0; } // \} diff --git a/test/boxmodels/1p/1ptestspatialparameters.hh b/test/boxmodels/1p/1ptestspatialparameters.hh deleted file mode 100644 index 8a37a750ac..0000000000 --- a/test/boxmodels/1p/1ptestspatialparameters.hh +++ /dev/null @@ -1,53 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -// vi: set et ts=4 sw=4 sts=4: -/***************************************************************************** - * Copyright (C) 2010 by Bernd Flemisch * - * Institute for Modelling Hydraulic and Environmental Systems * - * University of Stuttgart, Germany * - * email: <givenname>.<name>@iws.uni-stuttgart.de * - * * - * 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 The spatial parameters class for the test problem using the - * 1p box model - * DEPRECATED use OnePTestSpatialParams - */ -#ifndef DUMUX_1P_TEST_SPATIALPARAMETERS_HH -#define DUMUX_1P_TEST_SPATIALPARAMETERS_HH - -#include "1ptestspatialparams.hh" - -#warning include 1ptestspatialparams.hh instead - -namespace Dumux -{ - -template<class TypeTag> -class OnePTestSpatialParameters : public OnePTestSpatialParams<TypeTag> -{ - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - -public: - DUMUX_DEPRECATED_MSG("use OnePTestSpatialParams instead") - OnePTestSpatialParameters(const GridView &gridView) - : OnePTestSpatialParams<TypeTag>(gridView) - { } -}; - -} // end namespace -#endif - diff --git a/test/boxmodels/1p2c/1p2coutflowspatialparameters.hh b/test/boxmodels/1p2c/1p2coutflowspatialparameters.hh deleted file mode 100644 index 24f203e636..0000000000 --- a/test/boxmodels/1p2c/1p2coutflowspatialparameters.hh +++ /dev/null @@ -1,50 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -// vi: set et ts=4 sw=4 sts=4: -/***************************************************************************** - * Copyright (C) 2008-2009 by Klaus Mosthaf * - * Copyright (C) 2008-2009 by Andreas Lauser * - * Institute for Modelling Hydraulic and Environmental Systems * - * University of Stuttgart, Germany * - * email: <givenname>.<name>@iws.uni-stuttgart.de * - * * - * 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 Definition of the spatial parameters for the 1p2c - * outlfow problem. - * DEPRECATED use OnePTwoCOutflowSpatialParams - */ -#ifndef DUMUX_1P2C_OUTFLOW_SPATIAL_PARAMETERS_HH -#define DUMUX_1P2C_OUTFLOW_SPATIAL_PARAMETERS_HH - -#include "1p2coutflowspatialparams.hh" -#warning include 1p2coutflowspatialparams.hh instead - -namespace Dumux -{ - -template<class TypeTag> -class OnePTwoCOutflowSpatialParameters : public OnePTwoCOutflowSpatialParams<TypeTag> -{ - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; -public: - DUMUX_DEPRECATED_MSG("use OnePTwoCOutflowSpatialParams instead") - OnePTwoCOutflowSpatialParameters(const GridView &gridView) - : OnePTwoCOutflowSpatialParams<TypeTag>(gridView) -}; - -} -#endif -- GitLab