diff --git a/dumux/porousmediumflow/1p2c/CMakeLists.txt b/dumux/porousmediumflow/1p2c/CMakeLists.txt deleted file mode 100644 index ba8341c614f1a2c797c95f5402f602025f1087b1..0000000000000000000000000000000000000000 --- a/dumux/porousmediumflow/1p2c/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory("implicit") diff --git a/dumux/porousmediumflow/1p2c/implicit/CMakeLists.txt b/dumux/porousmediumflow/1p2c/implicit/CMakeLists.txt deleted file mode 100644 index 44e4720c35a7d4c3be4590c21dd2eec4daa2b3d0..0000000000000000000000000000000000000000 --- a/dumux/porousmediumflow/1p2c/implicit/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ - -#install headers -install(FILES -indices.hh -model.hh -properties.hh -propertydefaults.hh -volumevariables.hh -DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/porousmediumflow/1p2c/implicit) diff --git a/dumux/porousmediumflow/1p2c/implicit/indices.hh b/dumux/porousmediumflow/1p2c/implicit/indices.hh deleted file mode 100644 index 274b58b30f49a009e4ee9a33c2e7fff95691153c..0000000000000000000000000000000000000000 --- a/dumux/porousmediumflow/1p2c/implicit/indices.hh +++ /dev/null @@ -1,63 +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 Defines the primary variable and equation indices used by - * the 1p2c model - */ - -#ifndef DUMUX_1P2C_INDICES_HH -#define DUMUX_1P2C_INDICES_HH - -#include "properties.hh" - -namespace Dumux -{ -// \{ - -/*! - * \ingroup OnePTwoCModel - * \ingroup ImplicitIndices - * \brief The indices for the isothermal single-phase, two-component model. - */ -template <class TypeTag, int PVOffset = 0> -struct OnePTwoCIndices -{ - - //! Set the default phase used by the fluid system to the first one - static const int phaseIdx = GET_PROP_VALUE(TypeTag, PhaseIdx); - - //! Component indices - static const int phaseCompIdx = phaseIdx;//!< The index of the main component of the considered phase - //! The index of the transported (minor) component; ASSUMES phase indices of 0 and 1 - static const int transportCompIdx = (unsigned int)(1-phaseIdx); - - // Equation indices - static const int conti0EqIdx = PVOffset + 0; //!< continuity equation index - static const int transportEqIdx = PVOffset + 1; //!< transport equation index - - // primary variable indices - static const int pressureIdx = PVOffset + 0; //!< pressure - static const int massOrMoleFracIdx = PVOffset + 1; //!< mole fraction of the second component -}; - -// \} -} - -#endif diff --git a/dumux/porousmediumflow/1p2c/implicit/model.hh b/dumux/porousmediumflow/1p2c/implicit/model.hh deleted file mode 100644 index bb18c28c3a17467e01242ac638e9d8196fed9e26..0000000000000000000000000000000000000000 --- a/dumux/porousmediumflow/1p2c/implicit/model.hh +++ /dev/null @@ -1,121 +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 models which use the single-phase, - * two-component fully implicit model. - * Adaption of the fully implicit scheme to the one-phase two-component flow model. - */ - -#ifndef DUMUX_ONEP_TWOC_MODEL_HH -#define DUMUX_ONEP_TWOC_MODEL_HH - -#include <dumux/porousmediumflow/nonisothermal/implicit/model.hh> - -#include "properties.hh" - -namespace Dumux -{ - -/*! - * \ingroup OnePTwoCModel - * \brief Adaption of the fully implicit scheme to the one-phase two-component flow model. - * - * This model implements a one-phase flow of a compressible fluid, that consists of two components, - * using a standard Darcy - * approach as the equation for the conservation of momentum: - \f[ - v = - \frac{\textbf K}{\mu} - \left(\textbf{grad}\, p - \varrho {\textbf g} \right) - \f] - * - * Gravity can be enabled or disabled via the property system. - * By inserting this into the continuity equation, one gets - \f[ - \phi\frac{\partial \varrho}{\partial t} - \text{div} \left\{ - \varrho \frac{\textbf K}{\mu} \left(\textbf{grad}\, p - \varrho {\textbf g} \right) - \right\} = q \;, - \f] - * - * The transport of the components \f$\kappa \in \{ w, a \}\f$ is described by the following equation: - \f[ - \phi \frac{ \partial \varrho X^\kappa}{\partial t} - - \text{div} \left\lbrace \varrho X^\kappa \frac{{\textbf K}}{\mu} \left( \textbf{grad}\, p - - \varrho {\textbf g} \right) - + \varrho D^\kappa_\text{pm} \frac{M^\kappa}{M_\alpha} \textbf{grad} x^\kappa \right\rbrace = q. - \f] - * - * All equations are discretized using a vertex-centered finite volume (box) - * or cell-centered finite volume scheme as spatial - * and the implicit Euler method as time discretization. - * The model is able to use either mole or mass fractions. The property useMoles can be set to either true or false in the - * problem file. Make sure that the according units are used in the problem setup. useMoles is set to true by default. - * - * The primary variables are the pressure \f$p\f$ and the mole or mass fraction of dissolved component \f$x\f$. - */ - -template<class TypeTag > -class OnePTwoCModel : public GET_PROP_TYPE(TypeTag, BaseModel) -{ - using ParentType = typename GET_PROP_TYPE(TypeTag, BaseModel); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using Indices = typename GET_PROP_TYPE(TypeTag, Indices); - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables); - using NonIsothermalModel = Dumux::NonIsothermalModel<TypeTag>; - - static const int phaseIdx = Indices::phaseIdx; - -public: - - /*! - * \brief Apply the initial conditions to the model. - * - * \param problem The object representing the problem which needs to - * be simulated. - */ - void init(Problem& problem) - { - ParentType::init(problem); - - // register standardized vtk output fields - auto& vtkOutputModule = problem.vtkOutputModule(); - vtkOutputModule.addSecondaryVariable("P", [](const VolumeVariables& v){ return v.pressure(phaseIdx); }); - vtkOutputModule.addSecondaryVariable("delp", [](const VolumeVariables& v){ return v.pressure(phaseIdx) - 1.0e5; }); - vtkOutputModule.addSecondaryVariable("rho", [](const VolumeVariables& v){ return v.density(phaseIdx); }); - vtkOutputModule.addSecondaryVariable("mu", [](const VolumeVariables& v){ return v.viscosity(phaseIdx); }); - vtkOutputModule.addSecondaryVariable("x_" + std::string(FluidSystem::componentName(0)), - [](const VolumeVariables& v){ return v.moleFraction(phaseIdx, 0); }); - vtkOutputModule.addSecondaryVariable("x_" + std::string(FluidSystem::componentName(1)), - [](const VolumeVariables& v){ return v.moleFraction(phaseIdx, 1); }); - vtkOutputModule.addSecondaryVariable("X_" + std::string(FluidSystem::componentName(0)), - [](const VolumeVariables& v){ return v.massFraction(phaseIdx, 0); }); - vtkOutputModule.addSecondaryVariable("X_" + std::string(FluidSystem::componentName(1)), - [](const VolumeVariables& v){ return v.massFraction(phaseIdx, 1); }); - - NonIsothermalModel::maybeAddTemperature(vtkOutputModule); - } -}; - -} // end namespace Dumux - -#include "propertydefaults.hh" - -#endif diff --git a/dumux/porousmediumflow/1p2c/implicit/properties.hh b/dumux/porousmediumflow/1p2c/implicit/properties.hh deleted file mode 100644 index d07d5cde3f3992087b0d179968dd3e47515328b3..0000000000000000000000000000000000000000 --- a/dumux/porousmediumflow/1p2c/implicit/properties.hh +++ /dev/null @@ -1,78 +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/>. * - *****************************************************************************/ -/*! - * \ingroup Properties - * \ingroup ImplicitProperties - * \ingroup OnePTwoCModel - * \file - * - * \brief Defines the properties required for the single-phase, - * two-component fully implicit model. - */ - -#ifndef DUMUX_1P2C_PROPERTIES_HH -#define DUMUX_1P2C_PROPERTIES_HH - - -#include <dumux/implicit/box/properties.hh> -#include <dumux/implicit/cellcentered/properties.hh> -#include <dumux/porousmediumflow/nonisothermal/implicit/properties.hh> - -namespace Dumux -{ -// \{ -namespace Properties -{ - -////////////////////////////////////////////////////////////////// -// Type tags -////////////////////////////////////////////////////////////////// - -//! The type tags for the implicit isothermal one-phase two-component problems -NEW_TYPE_TAG(OnePTwoC); -NEW_TYPE_TAG(BoxOnePTwoC, INHERITS_FROM(BoxModel, OnePTwoC)); -NEW_TYPE_TAG(CCOnePTwoC, INHERITS_FROM(CCModel, OnePTwoC)); - -//! The type tags for the corresponding non-isothermal problems -NEW_TYPE_TAG(OnePTwoCNI, INHERITS_FROM(OnePTwoC, NonIsothermal)); -NEW_TYPE_TAG(BoxOnePTwoCNI, INHERITS_FROM(BoxModel, OnePTwoCNI)); -NEW_TYPE_TAG(CCOnePTwoCNI, INHERITS_FROM(CCModel, OnePTwoCNI)); - -////////////////////////////////////////////////////////////////// -// Property tags -////////////////////////////////////////////////////////////////// - -NEW_PROP_TAG(NumPhases); //!< Number of fluid phases in the system -NEW_PROP_TAG(PhaseIdx); //!< A phase index in to allow that a two-phase fluidsystem is used -NEW_PROP_TAG(NumComponents); //!< Number of fluid components in the system -NEW_PROP_TAG(Indices); //!< Enumerations for the model -NEW_PROP_TAG(SpatialParams); //!< The type of the spatial parameters -NEW_PROP_TAG(EffectiveDiffusivityModel); //!< The employed model for the computation of the effective diffusivity -NEW_PROP_TAG(FluidSystem); //!< Type of the multi-component relations -NEW_PROP_TAG(FluidState); //!< Type of the fluid state to be used -NEW_PROP_TAG(ProblemEnableGravity); //!< Returns whether gravity is considered in the problem -NEW_PROP_TAG(UseMoles); //!< Defines whether mole (true) or mass (false) fractions are used -NEW_PROP_TAG(SpatialParamsForchCoeff); //!< Property for the forchheimer coefficient -NEW_PROP_TAG(TauTortuosity); //!< Tortuosity value (tau) used in macroscopic diffusion - -} -// \} -} - -#endif diff --git a/dumux/porousmediumflow/1p2c/implicit/propertydefaults.hh b/dumux/porousmediumflow/1p2c/implicit/propertydefaults.hh deleted file mode 100644 index 72a9528388b727f517db567160305e797b974190..0000000000000000000000000000000000000000 --- a/dumux/porousmediumflow/1p2c/implicit/propertydefaults.hh +++ /dev/null @@ -1,165 +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/>. * - *****************************************************************************/ -/*! - * \ingroup Properties - * \ingroup ImplicitProperties - * \ingroup OnePTwoCModel - * \file - * - * \brief Defines some default values for the properties of the the - * single-phase, two-component fully implicit model. - */ - -#ifndef DUMUX_1P2C_PROPERTY_DEFAULTS_HH -#define DUMUX_1P2C_PROPERTY_DEFAULTS_HH - -#include "properties.hh" -#include "model.hh" -#include "volumevariables.hh" -#include "indices.hh" - -#include <dumux/porousmediumflow/compositional/localresidual.hh> -#include <dumux/porousmediumflow/nonisothermal/implicit/propertydefaults.hh> -#include <dumux/material/spatialparams/implicit1p.hh> -#include <dumux/material/fluidmatrixinteractions/diffusivitymillingtonquirk.hh> -#include <dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh> -#include <dumux/material/fluidstates/compositional.hh> - -namespace Dumux -{ -// \{ -namespace Properties -{ -////////////////////////////////////////////////////////////////// -// Property values -////////////////////////////////////////////////////////////////// - - -SET_INT_PROP(OnePTwoC, NumEq, 2); //!< set the number of equations to 2 -SET_INT_PROP(OnePTwoC, NumPhases, 1); //!< The number of phases in the 1p2c model is 1 -SET_INT_PROP(OnePTwoC, NumComponents, 2); //!< The number of components in the 1p2c model is 2 -SET_BOOL_PROP(OnePTwoC, UseMoles, true); //!< Define that mole fractions are used in the balance equations - -//! Use the 1p2c local residual function for the 1p2c model -SET_TYPE_PROP(OnePTwoC, LocalResidual, CompositionalLocalResidual<TypeTag>); - -//! We set the replaceCompIdx to 0, i.e. the first equation is substituted with -//! the total mass balance, i.e. the phase balance -SET_INT_PROP(OnePTwoC, ReplaceCompEqIdx, 0); - -//! define the model -SET_TYPE_PROP(OnePTwoC, Model, OnePTwoCModel<TypeTag>); - -//! define the VolumeVariables -SET_TYPE_PROP(OnePTwoC, VolumeVariables, OnePTwoCVolumeVariables<TypeTag>); - -/*! - * \brief The fluid state which is used by the volume variables to - * store the thermodynamic state. This should be chosen - * appropriately for the model ((non-)isothermal, equilibrium, ...). - * This can be done in the problem. - */ -SET_PROP(OnePTwoC, FluidState){ - private: - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; - public: - typedef CompositionalFluidState<Scalar, FluidSystem> type; -}; - -//! Set the indices used by the 1p2c model -SET_TYPE_PROP(OnePTwoC, Indices, OnePTwoCIndices<TypeTag>); -//! The spatial parameters to be employed. -//! Use ImplicitSpatialParamsOneP by default. -SET_TYPE_PROP(OnePTwoC, SpatialParams, ImplicitSpatialParamsOneP<TypeTag>); - -//! The model after Millington (1961) is used for the effective diffusivity -SET_PROP(OnePTwoC, EffectiveDiffusivityModel) -{ private : - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - public: - typedef DiffusivityMillingtonQuirk<Scalar> type; -}; - -//! Set the phaseIndex per default to zero (important for two-phase fluidsystems). -SET_INT_PROP(OnePTwoC, PhaseIdx, 0); - -// disable velocity output by default - -// enable gravity by default -SET_BOOL_PROP(OnePTwoC, ProblemEnableGravity, true); - -//physical processes to be considered by the isothermal model -SET_BOOL_PROP(OnePTwoC, EnableAdvection, true); -SET_BOOL_PROP(OnePTwoC, EnableMolecularDiffusion, true); -SET_BOOL_PROP(OnePTwoC, EnableEnergyBalance, false); - -//! 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(OnePTwoC, SpatialParamsForchCoeff, 0.55); - -/*! - * \brief default value for tortuosity value (tau) used in macroscopic diffusion - * - * Value is 0.5 according to Carman 1937: <i>Fluid flow through granular beds</i> - * \cite carman1937 - */ -SET_SCALAR_PROP(OnePTwoC, TauTortuosity, 0.5); - -//! average is used as default model to compute the effective thermal heat conductivity -SET_PROP(OnePTwoCNI, ThermalConductivityModel) -{ private : - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - public: - typedef ThermalConductivityAverage<Scalar> type; -}; - -////////////////////////////////////////////////////////////////// -// Property values for isothermal model required for the general non-isothermal model -////////////////////////////////////////////////////////////////// - -// set isothermal Model -SET_TYPE_PROP(OnePTwoCNI, IsothermalModel, OnePTwoCModel<TypeTag>); - -//set isothermal VolumeVariables -SET_TYPE_PROP(OnePTwoCNI, IsothermalVolumeVariables, OnePTwoCVolumeVariables<TypeTag>); - -//set isothermal LocalResidual -SET_TYPE_PROP(OnePTwoCNI, IsothermalLocalResidual, CompositionalLocalResidual<TypeTag>); - -//set isothermal Indices -SET_TYPE_PROP(OnePTwoCNI, IsothermalIndices, OnePTwoCIndices<TypeTag>); - -//physical processes to be considered by the non-isothermal model -SET_BOOL_PROP(OnePTwoCNI, EnableAdvection, true); -SET_BOOL_PROP(OnePTwoCNI, EnableMolecularDiffusion, true); -SET_BOOL_PROP(OnePTwoCNI, EnableEnergyBalance, true); - -//set isothermal NumEq -SET_INT_PROP(OnePTwoCNI, IsothermalNumEq, 2); - - -} -// \} -} - -#endif diff --git a/dumux/porousmediumflow/1p2c/implicit/volumevariables.hh b/dumux/porousmediumflow/1p2c/implicit/volumevariables.hh deleted file mode 100644 index 73146441467160729a3deaa45559cbdfac11b1a3..0000000000000000000000000000000000000000 --- a/dumux/porousmediumflow/1p2c/implicit/volumevariables.hh +++ /dev/null @@ -1,299 +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 Quantities required by the single-phase, two-component box - * model defined on a vertex. - */ -#ifndef DUMUX_1P2C_VOLUME_VARIABLES_HH -#define DUMUX_1P2C_VOLUME_VARIABLES_HH - -#include <dumux/discretization/volumevariables.hh> - -#include "properties.hh" - -namespace Dumux -{ - -/*! - * \ingroup OnePTwoCModel - * \ingroup ImplicitVolumeVariables - * \brief Contains the quantities which are constant within a - * finite volume in the single-phase, two-component model. - * - * \note The return functions for the fluid state variables always forward to the actual - * fluid state using the phaseIdx from the DuMuX property system. Furthermore, the - * default value is not used, but is only here to enable calling these functions - * without handing in a phase index (as in a single-phasic context there is only one phase). - * This way one can use two-phase fluid systems for this one-phasic flow and transport - * model by specifying which phase is present through the DuMuX property system. - */ -template <class TypeTag> -class OnePTwoCVolumeVariables : public ImplicitVolumeVariables<TypeTag> -{ - using ParentType = ImplicitVolumeVariables<TypeTag>; - - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Implementation = typename GET_PROP_TYPE(TypeTag, VolumeVariables); - using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume); - using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); - using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector); - using SpatialParams = typename GET_PROP_TYPE(TypeTag, SpatialParams); - using PermeabilityType = typename SpatialParams::PermeabilityType; - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using Indices = typename GET_PROP_TYPE(TypeTag, Indices); - - enum - { - phaseIdx = Indices::phaseIdx, - phaseCompIdx = Indices::phaseCompIdx, - transportCompIdx = Indices::transportCompIdx, - - pressureIdx = Indices::pressureIdx, - massOrMoleFracIdx = Indices::massOrMoleFracIdx - }; - - static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles); - static const int dim = GridView::dimension; - static const int dimWorld = GridView::dimensionworld; - - using DimVector = Dune::FieldVector<Scalar,dim>; - using GlobalPosition = Dune::FieldVector<Scalar,dimWorld>; - using Element = typename GridView::template Codim<0>::Entity; - -public: - - using FluidState = typename GET_PROP_TYPE(TypeTag, FluidState); - - /*! - * \copydoc ImplicitVolumeVariables::update - */ - void update(const ElementSolutionVector &elemSol, - const Problem &problem, - const Element &element, - const SubControlVolume &scv) - { - ParentType::update(elemSol, problem, element, scv); - - //calculate all secondary variables from the primary variables and store results in fluidstate - completeFluidState(elemSol, problem, element, scv, fluidState_); - - porosity_ = problem.spatialParams().porosity(element, scv, elemSol); - dispersivity_ = problem.spatialParams().dispersivity(element, scv, elemSol); - permeability_ = problem.spatialParams().permeability(element, scv, elemSol); - - // Second instance of a parameter cache. - // Could be avoided if diffusion coefficients also - // became part of the fluid state. - typename FluidSystem::ParameterCache paramCache; - paramCache.updatePhase(fluidState_, phaseIdx); - - diffCoeff_ = FluidSystem::binaryDiffusionCoefficient(fluidState_, - paramCache, - phaseIdx, - phaseCompIdx, - transportCompIdx); - } - - /*! - * \copydoc ImplicitModel::completeFluidState - */ - static void completeFluidState(const ElementSolutionVector &elemSol, - const Problem& problem, - const Element& element, - const SubControlVolume &scv, - FluidState& fluidState) - { - Scalar t = ParentType::temperature(elemSol, problem, element, scv); - fluidState.setTemperature(t); - fluidState.setSaturation(phaseIdx, 1.); - - const auto& priVars = ParentType::extractDofPriVars(elemSol, scv); - fluidState.setPressure(phaseIdx, priVars[pressureIdx]); - - if(useMoles) - { - fluidState.setMoleFraction(phaseIdx, phaseCompIdx, 1 - priVars[massOrMoleFracIdx]); - fluidState.setMoleFraction(phaseIdx, transportCompIdx, priVars[massOrMoleFracIdx]); - } - else - { - // setMassFraction() has only to be called 1-numComponents times - fluidState.setMassFraction(phaseIdx, transportCompIdx, priVars[massOrMoleFracIdx]); - } - - typename FluidSystem::ParameterCache paramCache; - paramCache.updatePhase(fluidState, phaseIdx); - - Scalar value; - value = FluidSystem::density(fluidState, paramCache, phaseIdx); - fluidState.setDensity(phaseIdx, value); - value = FluidSystem::viscosity(fluidState, paramCache, phaseIdx); - fluidState.setViscosity(phaseIdx, value); - - // compute and set the enthalpy - Scalar h = Implementation::enthalpy(fluidState, paramCache, phaseIdx); - fluidState.setEnthalpy(phaseIdx, h); - } - - /*! - * \brief Return the fluid configuration at the given primary - * variables - */ - const FluidState &fluidState() const - { return fluidState_; } - - /*! - * \brief Return density \f$\mathrm{[kg/m^3]}\f$ the of the fluid phase. - * - * We always forward to the fluid state with the phaseIdx property (see class description). - */ - Scalar density(int pIdx = 0) const - { return fluidState_.density(phaseIdx); } - - /*! - * \brief Return the saturation - * - * This method is here for compatibility reasons with other models. The saturation - * is always 1.0 in a one-phasic context. - */ - Scalar saturation(int pIdx = 0) const - { return 1.0; } - - /*! - * \brief Return molar density \f$\mathrm{[mol/m^3]}\f$ the of the fluid phase. - * - * We always forward to the fluid state with the phaseIdx property (see class description). - */ - Scalar molarDensity(int pIdx = 0) const - { return fluidState_.molarDensity(phaseIdx); } - - /*! - * \brief Return mole fraction \f$\mathrm{[mol/mol]}\f$ of a component in the phase. - * - * \param compIdx The index of the component - * - * We always forward to the fluid state with the phaseIdx property (see class description). - */ - Scalar moleFraction(int pIdx, int compIdx) const - { return fluidState_.moleFraction(phaseIdx, (compIdx==0)?phaseCompIdx:transportCompIdx); } - - /*! - * \brief Return mass fraction \f$\mathrm{[kg/kg]}\f$ of a component in the phase. - * - * \param compIdx The index of the component - * - * We always forward to the fluid state with the phaseIdx property (see class description). - */ - Scalar massFraction(int pIdx, int compIdx) const - { return fluidState_.massFraction(phaseIdx, (compIdx==0)?phaseCompIdx:transportCompIdx); } - - /*! - * \brief Return concentration \f$\mathrm{[mol/m^3]}\f$ of a component in the phase. - * - * \param compIdx The index of the component - * - * We always forward to the fluid state with the phaseIdx property (see class description). - */ - Scalar molarity(int pIdx, int compIdx) const - { return fluidState_.molarity(phaseIdx, (compIdx==0)?phaseCompIdx:transportCompIdx); } - - /*! - * \brief Return the effective pressure \f$\mathrm{[Pa]}\f$ of a given phase within - * the control volume. - * - * We always forward to the fluid state with the phaseIdx property (see class description). - */ - Scalar pressure(int pIdx = 0) const - { return fluidState_.pressure(phaseIdx); } - - /*! - * \brief Return the binary diffusion coefficient \f$\mathrm{[m^2/s]}\f$ in the fluid. - */ - Scalar diffusionCoefficient(int pIdx, int compIdx) const - { return diffCoeff_; } - - /*! - * \brief Returns the dispersivity of the fluid's streamlines. - */ - const GlobalPosition &dispersivity() const - { return dispersivity_; } - - /*! - * \brief Return temperature \f$\mathrm{[K]}\f$ inside the sub-control volume. - * - * Note that we assume thermodynamic equilibrium, i.e. the - * temperature of the rock matrix and of all fluid phases are - * identical. - */ - Scalar temperature() const - { return fluidState_.temperature(); } - - /*! - * \brief Returns the mobility \f$\mathrm{[1/(Pa s)]}\f$. - * - * The term mobility is usually not employed in the one phase context. - * The method is here for compatibility reasons with other models. - * - * We always forward to the fluid state with the phaseIdx property (see class description). - */ - Scalar mobility(int pIdx = 0) const - { return 1.0/fluidState_.viscosity(phaseIdx); } - - /*! - * \brief Return the dynamic viscosity \f$\mathrm{[Pa*s]}\f$ of a given phase - * within the control volume. - * - * We always forward to the fluid state with the phaseIdx property (see class description). - */ - Scalar viscosity(int pIdx = 0) const - { return fluidState_.viscosity(phaseIdx); } - - /*! - * \brief Return the average porosity \f$\mathrm{[-]}\f$ within the control volume. - */ - Scalar porosity() const - { return porosity_; } - - /*! - * \brief Returns the permeability within the control volume in \f$[m^2]\f$. - */ - const PermeabilityType& permeability() const - { return permeability_; } - -protected: - Scalar porosity_; //!< Effective porosity within the control volume - GlobalPosition dispersivity_; - PermeabilityType permeability_; - Scalar diffCoeff_; - FluidState fluidState_; - -private: - Implementation &asImp_() - { return *static_cast<Implementation*>(this); } - - const Implementation &asImp_() const - { return *static_cast<const Implementation*>(this); } -}; - -}// end namespace - -#endif diff --git a/dumux/porousmediumflow/CMakeLists.txt b/dumux/porousmediumflow/CMakeLists.txt index 437df282326e34ffc3d6b36235f1a07be6a2eace..33c612c76acfa27cc9f2afaba16c086cf75abfaf 100644 --- a/dumux/porousmediumflow/CMakeLists.txt +++ b/dumux/porousmediumflow/CMakeLists.txt @@ -1,5 +1,4 @@ add_subdirectory("1p") -add_subdirectory("1p2c") add_subdirectory("1pnc") add_subdirectory("1pncmin") add_subdirectory("2p") diff --git a/test/porousmediumflow/1p2c/CMakeLists.txt b/test/porousmediumflow/1p2c/CMakeLists.txt deleted file mode 100644 index ba8341c614f1a2c797c95f5402f602025f1087b1..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory("implicit") diff --git a/test/porousmediumflow/1p2c/implicit/1p2cniconductionproblem.hh b/test/porousmediumflow/1p2c/implicit/1p2cniconductionproblem.hh deleted file mode 100644 index 75b8f67a3ab5ce3e0a214c1511c59493475b86da..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/1p2cniconductionproblem.hh +++ /dev/null @@ -1,336 +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 Test for the OnePTwoCModel in combination with the NI model for a conduction problem: - * The simulation domain is a tube where with an elevated temperature on the left hand side. - * - */ -#ifndef DUMUX_1P2CNI_CONDUCTION_PROBLEM_HH -#define DUMUX_1P2CNI_CONDUCTION_PROBLEM_HH - -#include <dumux/implicit/box/properties.hh> -#include <dumux/implicit/cellcentered/tpfa/properties.hh> -#include <dumux/implicit/cellcentered/mpfa/properties.hh> - -#include <dumux/porousmediumflow/1p2c/implicit/model.hh> -#include <dumux/porousmediumflow/implicit/problem.hh> - -#include <dumux/material/fluidsystems/h2on2.hh> -#include <dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh> -#include "1p2cnispatialparams.hh" - -namespace Dumux -{ - -template <class TypeTag> -class OnePTwoCNIConductionProblem; - -namespace Properties -{ -NEW_TYPE_TAG(OnePTwoCNIConductionProblem, INHERITS_FROM(OnePTwoCNI)); -NEW_TYPE_TAG(OnePTwoCNIConductionBoxProblem, INHERITS_FROM(BoxModel, OnePTwoCNIConductionProblem)); -NEW_TYPE_TAG(OnePTwoCNIConductionCCProblem, INHERITS_FROM(CCTpfaModel, OnePTwoCNIConductionProblem)); -NEW_TYPE_TAG(OnePTwoCNIConductionCCMpfaProblem, INHERITS_FROM(CCMpfaModel, OnePTwoCNIConductionProblem)); - -// Set the grid type -SET_TYPE_PROP(OnePTwoCNIConductionProblem, Grid, Dune::YaspGrid<2>); - -// Set the problem property -SET_TYPE_PROP(OnePTwoCNIConductionProblem, Problem, - OnePTwoCNIConductionProblem<TypeTag>); - -// Set fluid configuration -SET_TYPE_PROP(OnePTwoCNIConductionProblem, - FluidSystem, - FluidSystems::H2ON2<typename GET_PROP_TYPE(TypeTag, Scalar), true>); - -// Set the spatial parameters -SET_TYPE_PROP(OnePTwoCNIConductionProblem, - SpatialParams, - OnePTwoCNISpatialParams<TypeTag>); - -// Define whether mole(true) or mass (false) fractions are used -SET_BOOL_PROP(OnePTwoCNIConductionProblem, UseMoles, true); - -// Enable velocity output -SET_BOOL_PROP(OnePTwoCNIConductionProblem, VtkAddVelocity, true); - -// Disable gravity -SET_BOOL_PROP(OnePTwoCNIConductionProblem, ProblemEnableGravity, false); -} - - -/*! - * \ingroup OnePTwoCModel - * \ingroup ImplicitTestProblems - * - * \brief Test for the OnePTwoCModel in combination with the NI model for a conduction problem: - * The simulation domain is a tube where with an elevated temperature on the left hand side. - * - * Initially the domain is fully saturated with water at a constant temperature. - * On the left hand side there is a Dirichlet boundary condition with an increased temperature and on the right hand side - * a Dirichlet boundary with constant pressure, saturation and temperature is applied. - * - * The results are compared to an analytical solution for a diffusion process: - \f[ - T =T_{high} + (T_{init} - T_{high})erf \left(0.5\sqrt{\frac{x^2 S_{total}}{t \lambda_{eff}}}\right) - \f] - * - * This problem uses the \ref OnePTwoCModel and \ref NIModel model. - * - * To run the simulation execute the following line in shell: <br> - * <tt>./test_box1p2cniconduction -ParameterFile ./test_box1p2cniconduction.input</tt> or <br> - * <tt>./test_cc1p2cniconduction -ParameterFile ./test_cc1p2cniconduction.input</tt> - */ -template <class TypeTag> -class OnePTwoCNIConductionProblem : public ImplicitPorousMediaProblem<TypeTag> -{ - using ParentType = ImplicitPorousMediaProblem<TypeTag>; - - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Indices = typename GET_PROP_TYPE(TypeTag, Indices); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables); - using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); - using ThermalConductivityModel = typename GET_PROP_TYPE(TypeTag, ThermalConductivityModel); - using VtkOutputModule = typename GET_PROP_TYPE(TypeTag, VtkOutputModule); - - enum - { - // indices of the primary variables - pressureIdx = Indices::pressureIdx, - massOrMoleFracIdx = Indices::massOrMoleFracIdx, - temperatureIdx = Indices::temperatureIdx, - - // index of the equations - conti0EqIdx = Indices::conti0EqIdx, - transportEqIdx = Indices::transportEqIdx, - energyEqIdx = Indices::energyEqIdx - }; - - static const int dim = GridView::dimension; - static const int dimWorld = GridView::dimensionworld; - using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; - - //! property that defines whether mole or mass fractions are used - static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles); - - static const bool isBox = GET_PROP_VALUE(TypeTag, ImplicitIsBox); - static const int dofCodim = isBox ? dimWorld : 0; - -public: - OnePTwoCNIConductionProblem(TimeManager &timeManager, const GridView &gridView) - : ParentType(timeManager, gridView) - { - //initialize fluid system - FluidSystem::init(); - - name_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, - std::string, - Problem, - Name); - outputInterval_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, - int, Problem, OutputInterval); - - temperatureHigh_ = 300.; - } - - - bool shouldWriteOutput() const - { - return - this->timeManager().timeStepIndex() == 0 || - this->timeManager().timeStepIndex() % outputInterval_ == 0 || - this->timeManager().episodeWillBeFinished() || - this->timeManager().willBeFinished(); - } - - /*! - * \brief Adds additional VTK output data to the VTKWriter. Function is called by the output module on every write. - */ - void addVtkOutputFields(VtkOutputModule& outputModule) const - { - auto& temperatureExact = outputModule.createScalarField("temperatureExact", dofCodim); - - const auto someElement = *(elements(this->gridView()).begin()); - const auto someElemSol = this->model().elementSolution(someElement, this->model().curSol()); - const auto someInitSol = initial_(someElement.geometry().center()); - - auto someFvGeometry = localView(this->model().fvGridGeometry()); - someFvGeometry.bindElement(someElement); - const auto someScv = *(scvs(someFvGeometry).begin()); - - VolumeVariables volVars; - volVars.update(someElemSol, *this, someElement, someScv); - - const auto porosity = this->spatialParams().porosity(someElement, someScv, someElemSol); - const auto densityW = volVars.density(); - const auto heatCapacityW = FluidSystem::heatCapacity(volVars.fluidState(), 0); - const auto densityS = this->spatialParams().solidDensity(someElement, someScv, someElemSol); - const auto heatCapacityS = this->spatialParams().solidHeatCapacity(someElement, someScv, someElemSol); - const auto storage = densityW*heatCapacityW*porosity + densityS*heatCapacityS*(1 - porosity); - const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars, this->spatialParams(), - someElement, someFvGeometry, someScv); - using std::max; - Scalar time = max(this->timeManager().time() + this->timeManager().timeStepSize(), 1e-10); - - for (const auto& element : elements(this->gridView())) - { - auto fvGeometry = localView(this->model().fvGridGeometry()); - fvGeometry.bindElement(element); - - for (auto&& scv : scvs(fvGeometry)) - { - auto globalIdx = scv.dofIndex(); - const auto& globalPos = scv.dofPosition(); - - using std::erf; using std::sqrt; - temperatureExact[globalIdx] = temperatureHigh_ + (someInitSol[temperatureIdx] - temperatureHigh_) - *std::erf(0.5*std::sqrt(globalPos[0]*globalPos[0]*storage/time/effectiveThermalConductivity)); - } - } - } - - /*! - * \name Problem parameters - */ - // \{ - - /*! - * \brief The problem name. - * - * This is used as a prefix for files generated by the simulation. - */ - const std::string& name() const - { - return name_; - } - // \} - - /*! - * \name Boundary conditions - */ - // \{ - - /*! - * \brief Specifies which kind of boundary condition should be - * used for which equation on a given boundary segment. - * - * \param globalPos The position for which the bc type should be evaluated - */ - BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const - { - BoundaryTypes values; - if(globalPos[0] < eps_ || globalPos[0] > this->bBoxMax()[0] - eps_) - values.setAllDirichlet(); - else - values.setAllNeumann(); - return values; - } - - /*! - * \brief Evaluate the boundary conditions for a dirichlet - * boundary segment. - * - * \param globalPos The position for which the bc type should be evaluated - * - * For this method, the \a values parameter stores primary variables. - */ - PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const - { - PrimaryVariables values = initial_(globalPos); - - // condition for the N2 molefraction at left boundary - if (globalPos[0] < eps_) - values[temperatureIdx] = temperatureHigh_; - - return values; - } - - /*! - * \brief Evaluate the boundary conditions for a Neumann - * boundary segment. - * - * For this method, the \a priVars parameter stores the mass flux - * in normal direction of each component. Negative values mean - * influx. - * - * The units must be according to either using mole or mass fractions. (mole/(m^2*s) or kg/(m^2*s)) - */ - PrimaryVariables neumannAtPos(const GlobalPosition& globalPos) const - { return PrimaryVariables(0.0); } - - // \} - - /*! - * \name Volume terms - */ - // \{ - - /*! - * \brief Evaluate the source term for all phases within a given - * sub-control-volume. - * - * For this method, the \a priVars parameter stores the rate mass - * of a component is generated or annihilate per volume - * unit. Positive values mean that mass is created, negative ones - * mean that it vanishes. - * - * The units must be according to either using mole or mass fractions. (mole/(m^3*s) or kg/(m^3*s)) - */ - PrimaryVariables sourceAtPos(const GlobalPosition &globalPos) const - { return PrimaryVariables(0.0); } - - /*! - * \brief Evaluate the initial value for a control volume. - * - * \param values The initial values for the primary variables - * \param globalPos The position for which the initial condition should be evaluated - * - * For this method, the \a values parameter stores primary - * variables. - */ - PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const - { return initial_(globalPos); } - - // \} - -private: - // the internal method for the initial condition - PrimaryVariables initial_(const GlobalPosition &globalPos) const - { - PrimaryVariables priVars; - priVars[pressureIdx] = 1e5; // initial condition for the pressure - priVars[massOrMoleFracIdx] = 1e-5; // initial condition for the N2 molefraction - priVars[temperatureIdx] = 290.; - return priVars; - } - - Scalar temperatureHigh_; - static constexpr Scalar eps_ = 1e-6; - std::string name_; - int outputInterval_; -}; - -} //end namespace -#endif // DUMUX_1P2CNI_CONDUCTION_PROBLEM_HH diff --git a/test/porousmediumflow/1p2c/implicit/1p2cniconvectionproblem.hh b/test/porousmediumflow/1p2c/implicit/1p2cniconvectionproblem.hh deleted file mode 100644 index 929e80f89d7535c301b4900047e874816f82b338..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/1p2cniconvectionproblem.hh +++ /dev/null @@ -1,343 +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 Test for the OnePTwoCModel in combination with the NI model for a convection problem: - * The simulation domain is a tube where water with an elevated temperature is injected - * at a constant rate on the left hand side. - * - */ -#ifndef DUMUX_1P2CNI_CONVECTION_PROBLEM_HH -#define DUMUX_1P2CNI_CONVECTION_PROBLEM_HH - -#include <dumux/implicit/box/properties.hh> -#include <dumux/implicit/cellcentered/tpfa/properties.hh> -#include <dumux/implicit/cellcentered/mpfa/properties.hh> - -#include <dumux/porousmediumflow/1p2c/implicit/model.hh> -#include <dumux/porousmediumflow/implicit/problem.hh> -#include <dumux/material/components/h2o.hh> -#include <dumux/material/fluidsystems/h2on2.hh> -#include <dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh> -#include "1p2cnispatialparams.hh" - -namespace Dumux -{ - -template <class TypeTag> -class OnePTwoCNIConvectionProblem; - -namespace Properties -{ -NEW_TYPE_TAG(OnePTwoCNIConvectionProblem, INHERITS_FROM(OnePTwoCNI)); -NEW_TYPE_TAG(OnePTwoCNIConvectionBoxProblem, INHERITS_FROM(BoxModel, OnePTwoCNIConvectionProblem)); -NEW_TYPE_TAG(OnePTwoCNIConvectionCCProblem, INHERITS_FROM(CCTpfaModel, OnePTwoCNIConvectionProblem)); -NEW_TYPE_TAG(OnePTwoCNIConvectionCCMpfaProblem, INHERITS_FROM(CCMpfaModel, OnePTwoCNIConvectionProblem)); - -// Set the grid type -SET_TYPE_PROP(OnePTwoCNIConvectionProblem, Grid, Dune::YaspGrid<2>); - -// Set the problem property -SET_TYPE_PROP(OnePTwoCNIConvectionProblem, Problem, - OnePTwoCNIConvectionProblem<TypeTag>); - -// Set fluid configuration -SET_TYPE_PROP(OnePTwoCNIConvectionProblem, - FluidSystem, - FluidSystems::H2ON2<typename GET_PROP_TYPE(TypeTag, Scalar), true>); - -// Set the spatial parameters -SET_TYPE_PROP(OnePTwoCNIConvectionProblem, SpatialParams, OnePTwoCNISpatialParams<TypeTag>); - -// Define whether mole(true) or mass (false) fractions are used -SET_BOOL_PROP(OnePTwoCNIConvectionProblem, UseMoles, true); - -} - - -/*! - * \ingroup OnePTwoCModel - * \ingroup ImplicitTestProblems - * - * \brief Test for the OnePTwoCModel in combination with the NI model for a convection problem: - * The simulation domain is a tube where water with an elevated temperature is injected - * at a constant rate on the left hand side. - * - * Initially the domain is fully saturated with water at a constant temperature. - * On the left hand side water is injected at a constant rate and on the right hand side - * a Dirichlet boundary with constant pressure, saturation and temperature is applied. - * - * The results are compared to an analytical solution where a retarded front velocity is calculated as follows: - \f[ - v_{Front}=\frac{q S_{water}}{\phi S_{total}} - \f] - * - * The result of the analytical solution is written into the vtu files. - * - * This problem uses the \ref OnePModel and \ref NIModel model. - * - * To run the simulation execute the following line in shell: <br> - * <tt>./test_box1p2cniconvection -ParameterFile ./test_box1p2cniconvection.input</tt> or <br> - * <tt>./test_cc1p2cniconvection -ParameterFile ./test_cc1p2cniconvection.input</tt> - */ -template <class TypeTag> -class OnePTwoCNIConvectionProblem : public ImplicitPorousMediaProblem<TypeTag> -{ - using ParentType = ImplicitPorousMediaProblem<TypeTag>; - - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Indices = typename GET_PROP_TYPE(TypeTag, Indices); - using FVElementGeometry = typename GET_PROP_TYPE(TypeTag, FVElementGeometry); - using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); - using SubControlVolumeFace = typename GET_PROP_TYPE(TypeTag, SubControlVolumeFace); - using ThermalConductivityModel = typename GET_PROP_TYPE(TypeTag, ThermalConductivityModel); - using ElementVolumeVariables = typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables); - using VolumeVariables = typename GET_PROP_TYPE(TypeTag, VolumeVariables); - using VtkOutputModule = typename GET_PROP_TYPE(TypeTag, VtkOutputModule); - - using IapwsH2O = H2O<Scalar>; - - // copy some indices for convenience - enum - { - // indices of the primary variables - pressureIdx = Indices::pressureIdx, - massOrMoleFracIdx = Indices::massOrMoleFracIdx, - temperatureIdx = Indices::temperatureIdx - }; - enum - { - phaseIdx = Indices::phaseIdx, - // index of the transport equation - conti0EqIdx = Indices::conti0EqIdx, - transportEqIdx = Indices::transportEqIdx, - energyEqIdx = Indices::energyEqIdx - }; - - - using Element = typename GridView::template Codim<0>::Entity; - using Intersection = typename GridView::Intersection; - - static const int dimWorld = GridView::dimensionworld; - using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; - - //! property that defines whether mole or mass fractions are used - static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles); - - static const bool isBox = GET_PROP_VALUE(TypeTag, ImplicitIsBox); - static const int dofCodim = isBox ? dimWorld : 0; - -public: - OnePTwoCNIConvectionProblem(TimeManager &timeManager, const GridView &gridView) - : ParentType(timeManager, gridView) - { - //initialize fluid system - FluidSystem::init(); - - name_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Problem, Name); - outputInterval_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, int, Problem, OutputInterval); - darcyVelocity_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, Problem, DarcyVelocity); - - temperatureHigh_ = 291.0; - temperatureLow_ = 290.0; - pressureHigh_ = 2e5; - pressureLow_ = 1e5; - } - - - bool shouldWriteOutput() const - { - return - this->timeManager().timeStepIndex() == 0 || - this->timeManager().timeStepIndex() % outputInterval_ == 0 || - this->timeManager().episodeWillBeFinished() || - this->timeManager().willBeFinished(); - } - - /*! - * \brief Adds additional VTK output data to the VTKWriter. Function is called by the output module on every write. - */ - void addVtkOutputFields(VtkOutputModule& outputModule) const - { - auto& temperatureExact = outputModule.createScalarField("temperatureExact", dofCodim); - - const auto someElement = *(elements(this->gridView()).begin()); - const auto someElemSol = this->model().elementSolution(someElement, this->model().curSol()); - - auto someFvGeometry = localView(this->model().fvGridGeometry()); - someFvGeometry.bindElement(someElement); - const auto someScv = *(scvs(someFvGeometry).begin()); - - VolumeVariables volVars; - volVars.update(someElemSol, *this, someElement, someScv); - - const auto porosity = this->spatialParams().porosity(someElement, someScv, someElemSol); - const auto densityW = volVars.density(); - const auto heatCapacityW = FluidSystem::heatCapacity(volVars.fluidState(), 0); - const auto storageW = densityW*heatCapacityW*porosity; - const auto densityS = this->spatialParams().solidDensity(someElement, someScv, someElemSol); - const auto heatCapacityS = this->spatialParams().solidHeatCapacity(someElement, someScv, someElemSol); - const auto storageTotal = storageW + densityS*heatCapacityS*(1 - porosity); - std::cout << "storage: " << storageTotal << '\n'; - - using std::max; - const Scalar time = max(this->timeManager().time() + this->timeManager().timeStepSize(), 1e-10); - const Scalar retardedFrontVelocity = darcyVelocity_*storageW/storageTotal/porosity; - std::cout << "retarded velocity: " << retardedFrontVelocity << '\n'; - - for (const auto& element : elements(this->gridView())) - { - auto fvGeometry = localView(this->model().fvGridGeometry()); - fvGeometry.bindElement(element); - for (auto&& scv : scvs(fvGeometry)) - { - auto dofIdxGlobal = scv.dofIndex(); - auto dofPosition = scv.dofPosition(); - temperatureExact[dofIdxGlobal] = (dofPosition[0] < retardedFrontVelocity*time) ? temperatureHigh_ : temperatureLow_; - } - } - } - - /*! - * \name Problem parameters - */ - // \{ - - /*! - * \brief The problem name. - * - * This is used as a prefix for files generated by the simulation. - */ - const std::string& name() const - { - return name_; - } - - // \} - - /*! - * \name Boundary conditions - */ - // \{ - - /*! - * \brief Specifies which kind of boundary condition should be - * used for which equation on a given boundary segment. - * - * \param globalPos The position for which the bc type should be evaluated - */ - BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const - { - BoundaryTypes values; - - if(globalPos[0] > this->bBoxMax()[0] - eps_) - values.setAllDirichlet(); - else - values.setAllNeumann(); - - return values; - } - - /*! - * \brief Evaluate the boundary conditions for a dirichlet - * boundary segment. - * - * \param globalPos The position for which the bc type should be evaluated - * - * For this method, the \a values parameter stores primary variables. - */ - PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const - { - return initial_(globalPos); - } - - PrimaryVariables neumann(const Element& element, - const FVElementGeometry& fvGeometry, - const ElementVolumeVariables& elemVolVars, - const SubControlVolumeFace& scvf) const - { - PrimaryVariables values(0.0); - - if(scvf.ipGlobal()[0] < eps_) - { - const auto& volVars = elemVolVars[scvf.insideScvIdx()]; - values[pressureIdx] = -darcyVelocity_ - *volVars.molarDensity(phaseIdx); - values[massOrMoleFracIdx] = -darcyVelocity_ - *volVars.molarDensity(phaseIdx) - *volVars.moleFraction(phaseIdx, massOrMoleFracIdx); - values[temperatureIdx] = -darcyVelocity_ - *volVars.density(phaseIdx) - *IapwsH2O::liquidEnthalpy(temperatureHigh_, volVars.pressure(phaseIdx)); - } - - return values; - } - - // \} - - /*! - * \name Volume terms - */ - // \{ - - /*! - * \brief Evaluate the initial value for a control volume. - * - * \param values The initial values for the primary variables - * \param globalPos The position for which the initial condition should be evaluated - * - * For this method, the \a values parameter stores primary - * variables. - */ - PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const - { - return initial_(globalPos); - } - - // \} - -private: - // the internal method for the initial condition - PrimaryVariables initial_(const GlobalPosition &globalPos) const - { - PrimaryVariables priVars; - priVars[pressureIdx] = pressureLow_; // initial condition for the pressure - priVars[massOrMoleFracIdx] = 1e-10; // initial condition for the N2 molefraction - priVars[temperatureIdx] = temperatureLow_; - return priVars; - } - - Scalar temperatureHigh_; - Scalar temperatureLow_; - Scalar pressureHigh_; - Scalar pressureLow_; - Scalar darcyVelocity_; - static constexpr Scalar eps_ = 1e-6; - std::string name_; - int outputInterval_; -}; - -} //end namespace Dumux - -#endif // DUMUX_1P2CNI_CONVECTION_PROBLEM_HH diff --git a/test/porousmediumflow/1p2c/implicit/1p2cnispatialparams.hh b/test/porousmediumflow/1p2c/implicit/1p2cnispatialparams.hh deleted file mode 100644 index 3bfb82f77366f1501c327ccf374766aa7e733fcf..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/1p2cnispatialparams.hh +++ /dev/null @@ -1,144 +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 Definition of the spatial parameters for the 1p2cni problems. - */ -#ifndef DUMUX_1P2CNI_OUTFLOW_SPATIAL_PARAMS_HH -#define DUMUX_1P2CNI_OUTFLOW_SPATIAL_PARAMS_HH - -#include <dumux/material/spatialparams/implicit1p.hh> - -namespace Dumux -{ - -/*! - * \ingroup OnePTwoCNIModel - * \ingroup ImplicitTestProblems - * - * \brief Definition of the spatial parameters for the 1p2cni problems. - */ -template<class TypeTag> -class OnePTwoCNISpatialParams : public ImplicitSpatialParamsOneP<TypeTag> -{ - using ParentType = ImplicitSpatialParamsOneP<TypeTag>; - - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Element = typename GridView::template Codim<0>::Entity; - using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume); - using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector); - - static const int dimWorld = GridView::dimensionworld; - using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; - -public: - // export permeability type - using PermeabilityType = Scalar; - - OnePTwoCNISpatialParams(const Problem& problem, const GridView &gridView) - : ParentType(problem, gridView) - { - permeability_ = 1e-10; - porosity_ = 0.4; - - // heat conductivity of granite - lambdaSolid_ = 2.8; - } - - /*! - * \brief Define the intrinsic permeability \f$\mathrm{[m^2]}\f$. - * - * \param globalPos The global Position - */ - Scalar permeabilityAtPos(const GlobalPosition& globalPos) const - { return permeability_; } - - /*! - * \brief Define the porosity \f$\mathrm{[-]}\f$. - * - * \param globalPos The global Position - */ - Scalar porosityAtPos(const GlobalPosition& globalPos) const - { return porosity_; } - - /*! - * \brief Define the dispersivity. - * - * \param element The element - * \param scv The sub control volume - * \param elemSol The element solution vector - */ - Scalar dispersivity(const Element &element, - const SubControlVolume& scv, - const ElementSolutionVector& elemSol) const - { return 0; } - - /*! - * \brief Returns the heat capacity \f$[J / (kg K)]\f$ of the rock matrix. - * - * This is only required for non-isothermal models. - * - * \param element The element - * \param scv The sub control volume - * \param elemSol The element solution vector - */ - Scalar solidHeatCapacity(const Element &element, - const SubControlVolume& scv, - const ElementSolutionVector& elemSol) const - { return 790; /*specific heat capacity of granite [J / (kg K)]*/ } - - /*! - * \brief Returns the mass density \f$[kg / m^3]\f$ of the rock matrix. - * - * This is only required for non-isothermal models. - * - * \param element The element - * \param scv The sub control volume - * \param elemSol The element solution vector - */ - Scalar solidDensity(const Element &element, - const SubControlVolume& scv, - const ElementSolutionVector& elemSol) const - { return 2700; /*density of granite [kg/m^3]*/ } - - /*! - * \brief Returns the thermal conductivity \f$\mathrm{[W/(m K)]}\f$ of the porous material. - * - * \param element The element - * \param scv The sub control volume - * \param elemSol The element solution vector - */ - Scalar solidThermalConductivity(const Element &element, - const SubControlVolume& scv, - const ElementSolutionVector& elemSol) const - { return lambdaSolid_; } - - -private: - Scalar permeability_; - Scalar porosity_; - Scalar lambdaSolid_; -}; - -} // end namespace Dumux - -#endif // DUMUX_1P2CNI_OUTFLOW_SPATIAL_PARAMS_HH diff --git a/test/porousmediumflow/1p2c/implicit/1p2ctestproblem.hh b/test/porousmediumflow/1p2c/implicit/1p2ctestproblem.hh deleted file mode 100644 index 9d09f486a59627ea789d83ec0a6966587ac17e06..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/1p2ctestproblem.hh +++ /dev/null @@ -1,315 +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 Definition of a problem, for the 1p2c problem: - * Component transport of nitrogen dissolved in the water phase. - */ -#ifndef DUMUX_1P2C_TEST_PROBLEM_HH -#define DUMUX_1P2C_TEST_PROBLEM_HH - -#include <dumux/implicit/box/properties.hh> -#include <dumux/implicit/cellcentered/tpfa/properties.hh> -#include <dumux/implicit/cellcentered/mpfa/properties.hh> -#include <dumux/porousmediumflow/1p2c/implicit/model.hh> -#include <dumux/porousmediumflow/implicit/problem.hh> - -#include <dumux/material/fluidsystems/h2on2.hh> -#include "1p2ctestspatialparams.hh" - -#define NONISOTHERMAL 0 - -namespace Dumux -{ - -template <class TypeTag> -class OnePTwoCTestProblem; - -namespace Properties -{ -#if NONISOTHERMAL -NEW_TYPE_TAG(OnePTwoCOutflowProblem, INHERITS_FROM(OnePTwoCNI)); -NEW_TYPE_TAG(OnePTwoCOutflowBoxProblem, INHERITS_FROM(BoxModel, OnePTwoCOutflowProblem)); -NEW_TYPE_TAG(OnePTwoCOutflowCCProblem, INHERITS_FROM(CCTpfaModel, OnePTwoCOutflowProblem)); -#else -NEW_TYPE_TAG(OnePTwoCTestProblem, INHERITS_FROM(OnePTwoC)); -NEW_TYPE_TAG(OnePTwoCTestBoxProblem, INHERITS_FROM(BoxModel, OnePTwoCTestProblem)); -NEW_TYPE_TAG(OnePTwoCTestCCProblem, INHERITS_FROM(CCTpfaModel, OnePTwoCTestProblem)); -NEW_TYPE_TAG(OnePTwoCTestCCMpfaProblem, INHERITS_FROM(CCMpfaModel, OnePTwoCTestProblem)); -#endif - -// Set the grid type -#if HAVE_UG -SET_TYPE_PROP(OnePTwoCTestProblem, Grid, Dune::UGGrid<2>); -#else -SET_TYPE_PROP(OnePTwoCTestProblem, Grid, Dune::YaspGrid<2>); -#endif - -// Set the problem property -SET_TYPE_PROP(OnePTwoCTestProblem, Problem, OnePTwoCTestProblem<TypeTag>); - -// Set fluid configuration -SET_TYPE_PROP(OnePTwoCTestProblem, - FluidSystem, - FluidSystems::H2ON2<typename GET_PROP_TYPE(TypeTag, Scalar), false>); - -// Set the spatial parameters -SET_TYPE_PROP(OnePTwoCTestProblem, SpatialParams, OnePTwoCTestSpatialParams<TypeTag>); - -// Define whether mole(true) or mass (false) fractions are used -SET_BOOL_PROP(OnePTwoCTestProblem, UseMoles, true); - -// Enable velocity output -SET_BOOL_PROP(OnePTwoCTestProblem, VtkAddVelocity, true); - -// Disable gravity -SET_BOOL_PROP(OnePTwoCTestProblem, ProblemEnableGravity, false); -} - - -/*! - * \ingroup OnePTwoCModel - * \ingroup ImplicitTestProblems - * - * \brief Definition of a problem, for the 1p2c problem: - * Nitrogen is dissolved in the water phase and - * is transported with the water flow from the left side to the right. - * - * The model domain is 1 m times 1 m with a discretization length of 0.05 m - * and homogeneous soil properties (\f$ \mathrm{K=10e-10, \Phi=0.4, \tau=0.28}\f$). - * Initially the domain is filled with pure water. - * - * At the left side, a Dirichlet condition defines a nitrogen mole fraction - * of 0.3 mol/mol. - * The water phase flows from the left side to the right due to the applied pressure - * gradient of 1e5 Pa/m. The nitrogen is transported with the water flow - * and leaves the domain at the right boundary - * where again Dirichlet boundary conditions are applied. Here, the nitrogen mole - * fraction is set to 0.0 mol/mol. - * - * The model is able to use either mole or mass fractions. The property useMoles can be set to either true or false in the - * problem file. Make sure that the according units are used in the problem setup. The default setting for useMoles is true. - * - * This problem uses the \ref OnePTwoCModel model. - * - * To run the simulation execute the following line in shell: - * <tt>./test_box1p2c -parameterFile ./test_box1p2c.input</tt> or - * <tt>./test_cc1p2c -parameterFile ./test_cc1p2c.input</tt> - */ -template <class TypeTag> -class OnePTwoCTestProblem : public ImplicitPorousMediaProblem<TypeTag> -{ - using ParentType = ImplicitPorousMediaProblem<TypeTag>; - - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Indices = typename GET_PROP_TYPE(TypeTag, Indices); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem); - using TimeManager = typename GET_PROP_TYPE(TypeTag, TimeManager); - using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes); - using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables); - - - // copy some indices for convenience - enum - { - // indices of the primary variables - pressureIdx = Indices::pressureIdx, - massOrMoleFracIdx = Indices::massOrMoleFracIdx, - - // indices for the non-isothermal case -#if NONISOTHERMAL - temperatureIdx = Indices::temperatureIdx, - energyEqIdx = Indices::energyEqIdx, -#endif - - // indices of the equations - conti0EqIdx = Indices::conti0EqIdx, - transportEqIdx = Indices::transportEqIdx, - - phaseCompIdx = Indices::phaseCompIdx, - transportCompIdx = Indices::transportCompIdx - }; - - //! property that defines whether mole or mass fractions are used - static const bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles); - - static const int dimWorld = GridView::dimensionworld; - using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>; - -public: - OnePTwoCTestProblem(TimeManager &timeManager, const GridView &gridView) - : ParentType(timeManager, gridView) - { - //initialize fluid system - FluidSystem::init(); - - name_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, std::string, Problem, Name); - - // stating in the console whether mole or mass fractions are used - if(useMoles) - std::cout<<"problem uses mole fractions"<<std::endl; - else - std::cout<<"problem uses mass fractions"<<std::endl; - } - - /*! - * \name Problem parameters - */ - // \{ - - /*! - * \brief The problem name. - * - * This is used as a prefix for files generated by the simulation. - */ - const std::string& name() const - { - return name_; - } - -#if !NONISOTHERMAL - /*! - * \brief Returns the temperature within the domain [K]. - * - * This problem assumes a temperature of 20 degrees Celsius. - */ - Scalar temperature() const - { return 273.15 + 20; } // in [K] - -#endif - - // \} - - /*! - * \name Boundary conditions - */ - // \{ - - /*! - * \brief Specifies which kind of boundary condition should be - * used for which equation on a given boundary segment. - * - * \param globalPos The position for which the bc type should be evaluated - */ - BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const - { - BoundaryTypes values; - - if(globalPos[0] < eps_ || globalPos[0] > this->bBoxMax()[0] - eps_) - values.setAllDirichlet(); - else - values.setAllNeumann(); - - return values; - } - - /*! - * \brief Evaluate the boundary conditions for a dirichlet - * boundary segment. - * - * \param globalPos The position for which the bc type should be evaluated - */ - PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const - { - PrimaryVariables values = initial_(globalPos); - - - // condition for the N2 molefraction at left boundary - if (globalPos[0] < eps_) - { - if (useMoles) - values[massOrMoleFracIdx] = 2.0e-5 ; - else - values[massOrMoleFracIdx] = 2.0e-5*FluidSystem::molarMass(transportCompIdx)/(2.0e-5*FluidSystem::molarMass(transportCompIdx)+ (1-2.0e-5)*FluidSystem::molarMass(phaseCompIdx)); -#if NONISOTHERMAL - values[temperatureIdx] = 300.; -#endif - } - - return values; - } - - /*! - * \brief Evaluate the boundary conditions for a Neumann - * boundary segment. - * - * For this method, the \a priVars parameter stores the mass flux - * in normal direction of each component. Negative values mean - * influx. - * - * The units must be according to either using mole or mass fractions. (mole/(m^2*s) or kg/(m^2*s)) - */ - PrimaryVariables neumannAtPos(const GlobalPosition& globalPos) const - { return PrimaryVariables(0.0); } - - // \} - - /*! - * \name Volume terms - */ - // \{ - - /*! - * \brief Evaluate the source term for all phases within a given - * sub-control-volume. - * - * For this method, the \a priVars parameter stores the rate mass - * of a component is generated or annihilate per volume - * unit. Positive values mean that mass is created, negative ones - * mean that it vanishes. - * - * The units must be according to either using mole or mass fractions. (mole/(m^3*s) or kg/(m^3*s)) - */ - PrimaryVariables sourceAtPos(const GlobalPosition &globalPos) const - { return PrimaryVariables(0.0); } - - /*! - * \brief Evaluate the initial value for a control volume. - * - * \param globalPos The position for which the initial condition should be evaluated - * - * For this method, the \a values parameter stores primary - * variables. - */ - PrimaryVariables initialAtPos(const GlobalPosition &globalPos) const - { return initial_(globalPos); } - - // \} - -private: - // the internal method for the initial condition - PrimaryVariables initial_(const GlobalPosition &globalPos) const - { - PrimaryVariables priVars; - priVars[pressureIdx] = 2e5 - 1e5*globalPos[0]; // initial condition for the pressure - priVars[massOrMoleFracIdx] = 0.0; // initial condition for the N2 molefraction -#if NONISOTHERMAL - priVars[temperatureIdx] = 290.; -#endif - return priVars; - } - - static constexpr Scalar eps_ = 1e-6; - std::string name_; -}; - -} //end namespace Dumux - -#endif diff --git a/test/porousmediumflow/1p2c/implicit/1p2ctestspatialparams.hh b/test/porousmediumflow/1p2c/implicit/1p2ctestspatialparams.hh deleted file mode 100644 index a99c8f314401ad79bd4377653f2752e40b0c70e7..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/1p2ctestspatialparams.hh +++ /dev/null @@ -1,146 +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 Definition of the spatial parameters for the 1p2c - * outlfow problem. - */ -#ifndef DUMUX_1P2C_TEST_SPATIAL_PARAMS_HH -#define DUMUX_1P2C_TEST_SPATIAL_PARAMS_HH - -#include <dumux/material/spatialparams/implicit1p.hh> - -namespace Dumux -{ - -/*! - * \ingroup OnePTwoCModel - * \ingroup ImplicitTestProblems - * - * \brief Definition of the spatial parameters for the 1p2c - * outflow problem. - */ -template<class TypeTag> -class OnePTwoCTestSpatialParams : public ImplicitSpatialParamsOneP<TypeTag> -{ - using ParentType = ImplicitSpatialParamsOneP<TypeTag>; - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); - using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using Element = typename GridView::template Codim<0>::Entity; - using SubControlVolume = typename GET_PROP_TYPE(TypeTag, SubControlVolume); - using ElementSolutionVector = typename GET_PROP_TYPE(TypeTag, ElementSolutionVector); - - static const int dimWorld = GridView::dimensionworld; - using GlobalPosition = typename Dune::FieldVector<Scalar, dimWorld>; - -public: - // export permeability type - using PermeabilityType = Scalar; - - OnePTwoCTestSpatialParams(const Problem& problem, const GridView &gridView) - : ParentType(problem, gridView) - { - permeability_ = 1e-10; - porosity_ = 0.4; - - // heat conductivity of granite - lambdaSolid_ = 2.8; - } - - /*! - * \brief Define the intrinsic permeability \f$\mathrm{[m^2]}\f$. - * - * \param globalPos The global position - */ - PermeabilityType permeabilityAtPos(const GlobalPosition& globalPos) const - { return permeability_; } - - /*! - * \brief Define the porosity \f$\mathrm{[-]}\f$. - * - * \param globalPos The global position - */ - Scalar porosityAtPos(const GlobalPosition& globalPos) const - { return porosity_; } - - /*! - * \brief Define the dispersivity. - * - * \param element The finite element - * \param scv The sub-control volume - * \param elemSol The solution for all dofs of the element - */ - Scalar dispersivity(const Element &element, - const SubControlVolume& scv, - const ElementSolutionVector& elemSol) const - { return 0; } - - /*! - * \brief Returns the heat capacity \f$[J / (kg K)]\f$ of the rock matrix. - * - * This is only required for non-isothermal models. - * - * \param element The element - * \param scv The sub control volume - * \param elemSol The element solution vector - */ - Scalar solidHeatCapacity(const Element &element, - const SubControlVolume& scv, - const ElementSolutionVector& elemSol) const - { return 790; /*specific heat capacity of granite [J / (kg K)]*/ } - - /*! - * \brief Returns the mass density \f$[kg / m^3]\f$ of the rock matrix. - * - * This is only required for non-isothermal models. - * - * \param element The element - * \param scv The sub control volume - * \param elemSol The element solution vector - */ - Scalar solidDensity(const Element &element, - const SubControlVolume& scv, - const ElementSolutionVector& elemSol) const - { return 2700; /*density of granite [kg/m^3]*/ } - - /*! - * \brief Returns the thermal conductivity \f$\mathrm{[W/(m K)]}\f$ of the porous material. - * - * \param element The element - * \param scv The sub control volume - * \param elemSol The element solution vector - */ - Scalar solidThermalConductivity(const Element &element, - const SubControlVolume& scv, - const ElementSolutionVector& elemSol) const - { return lambdaSolid_; } - - - -private: - Scalar permeability_; - Scalar porosity_; - Scalar lambdaSolid_; -}; - -} // end namespace Dumux - -#endif diff --git a/test/porousmediumflow/1p2c/implicit/CMakeLists.txt b/test/porousmediumflow/1p2c/implicit/CMakeLists.txt deleted file mode 100644 index febf1b18883788428abb2bb1f84e445b12022445..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/CMakeLists.txt +++ /dev/null @@ -1,87 +0,0 @@ -add_input_file_links() - -# isothermal tests -add_dumux_test(test_box1p2c test_box1p2c test_box1p2c.cc - python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/outflowbox-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/outflowbox-00009.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_box1p2c" - --zeroThreshold {"velocity":5e-16}) - -add_dumux_test(test_cc1p2c test_cc1p2c test_cc1p2c.cc - python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1p2ctestcc-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1p2ctestcc-00009.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_cc1p2c" - --zeroThreshold {"velocity":5e-16}) - -add_dumux_test(test_ccmpfa1p2c test_ccmpfa1p2c test_ccmpfa1p2c.cc - python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1p2ctestccmpfa-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/1p2ctestccmpfa-00009.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_ccmpfa1p2c" - --zeroThreshold {"velocity":5e-16}) - -# non-isothermal tests -add_dumux_test(test_box1p2cniconduction test_box1p2cniconduction test_box1p2cniconduction.cc - python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1p2cniboxconduction-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/box1p2cniconduction-00006.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_box1p2cniconduction" - --zeroThreshold {"velocity":1e-8}) - -add_dumux_test(test_box1p2cniconvection test_box1p2cniconvection test_box1p2cniconvection.cc - python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1p2cniboxconvection-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/box1p2cniconvection-00010.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_box1p2cniconvection" - --zeroThreshold {"velocity":1e-16}) - -add_dumux_test(test_cc1p2cniconduction test_cc1p2cniconduction test_cc1p2cniconduction.cc - python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1p2cniccconduction-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/cc1p2cniconduction-00006.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_cc1p2cniconduction" - --zeroThreshold {"velocity":1e-8}) - -add_dumux_test(test_cc1p2cniconvection test_cc1p2cniconvection test_cc1p2cniconvection.cc - python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1p2cniccconvection-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/cc1p2cniconvection-00010.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_cc1p2cniconvection") - -add_dumux_test(test_ccmpfa1p2cniconduction test_ccmpfa1p2cniconduction test_ccmpfa1p2cniconduction.cc - python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1p2cniccmpfaconduction-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/ccmpfa1p2cniconduction-00006.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_ccmpfa1p2cniconduction") - -add_dumux_test(test_ccmpfa1p2cniconvection test_ccmpfa1p2cniconvection test_ccmpfa1p2cniconvection.cc - python ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py - --script fuzzy - --files ${CMAKE_SOURCE_DIR}/test/references/1p2cniccmpfaconvection-reference.vtu - ${CMAKE_CURRENT_BINARY_DIR}/ccmpfa1p2cniconvection-00010.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_ccmpfa1p2cniconvection") - -#install sources -install(FILES -1p2cniconductionproblem.hh -1p2cniconvectionproblem.hh -1p2cnispatialparams.hh -1p2coutflowproblem.hh -1p2coutflowspatialparams.hh -test_box1p2c.cc -test_box1p2cniconduction.cc -test_box1p2cniconvection.cc -test_cc1p2c.cc -test_cc1p2cniconduction.cc -test_cc1p2cniconvection.cc -DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/implicit/1p2c) diff --git a/test/porousmediumflow/1p2c/implicit/test_box1p2c.cc b/test/porousmediumflow/1p2c/implicit/test_box1p2c.cc deleted file mode 100644 index 18497653cfa917adeb2e25c40e158a84593b65fb..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_box1p2c.cc +++ /dev/null @@ -1,57 +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 test for the 1p2c box model - */ -#include <config.h> -#include "1p2ctestproblem.hh" -#include <dumux/common/start.hh> - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory options for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n"; - std::cout << errorMessageOut - << "\n"; - } -} - -int main(int argc, char** argv) -{ - typedef TTAG(OnePTwoCTestBoxProblem) ProblemTypeTag; - return Dumux::start<ProblemTypeTag>(argc, argv, usage); -} diff --git a/test/porousmediumflow/1p2c/implicit/test_box1p2c.input b/test/porousmediumflow/1p2c/implicit/test_box1p2c.input deleted file mode 100644 index 85a6863ffc9d55dd83165058342f7f38da8dc4a7..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_box1p2c.input +++ /dev/null @@ -1,15 +0,0 @@ -[TimeManager] -DtInitial = 1 # [s] -TEnd = 100 # [s] - -[Grid] -LowerLeft = 0 0 -UpperRight = 1 1 -Cells = 20 2 - -[Problem] -Name = outflowbox # name passed to the output routines -EnableGravity = 0 # disable gravity - -[Vtk] -AddVelocity = 1 # enable velocity output diff --git a/test/porousmediumflow/1p2c/implicit/test_box1p2cniconduction.cc b/test/porousmediumflow/1p2c/implicit/test_box1p2cniconduction.cc deleted file mode 100644 index 23faf684b07059baed518a8344149efa2d72866a..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_box1p2cniconduction.cc +++ /dev/null @@ -1,57 +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 test for the 1p2cni box model - */ -#include <config.h> -#include "1p2cniconductionproblem.hh" -#include <dumux/common/start.hh> - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory options for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n"; - std::cout << errorMessageOut - << "\n"; - } -} - -int main(int argc, char** argv) -{ - typedef TTAG(OnePTwoCNIConductionBoxProblem) ProblemTypeTag; - return Dumux::start<ProblemTypeTag>(argc, argv, usage); -} diff --git a/test/porousmediumflow/1p2c/implicit/test_box1p2cniconduction.input b/test/porousmediumflow/1p2c/implicit/test_box1p2cniconduction.input deleted file mode 100644 index 043d32f050a1146e5cc74f67848be2ab4ef58316..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_box1p2cniconduction.input +++ /dev/null @@ -1,17 +0,0 @@ -[TimeManager] -DtInitial = 1 # [s] -TEnd = 1e5 # [s] -MaxTimeStepSize = 1e10 - -[Grid] -LowerLeft = 0 0 -UpperRight = 5 1 -Cells = 200 1 - -[Problem] -Name = box1p2cniconduction # name passed to the output routines -OutputInterval = 5 # every 5th timestep an output file is written -EnableGravity = 0 # disable gravity - -[Vtk] -AddVelocity = 1 # Enable velocity output diff --git a/test/porousmediumflow/1p2c/implicit/test_box1p2cniconvection.cc b/test/porousmediumflow/1p2c/implicit/test_box1p2cniconvection.cc deleted file mode 100644 index bd43d25a1e7c6b9c9beda0eb6d24d7b4d9a16cce..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_box1p2cniconvection.cc +++ /dev/null @@ -1,57 +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 test for the 1p2cni box model - */ -#include <config.h> -#include "1p2cniconvectionproblem.hh" -#include <dumux/common/start.hh> - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory options for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n"; - std::cout << errorMessageOut - << "\n"; - } -} - -int main(int argc, char** argv) -{ - typedef TTAG(OnePTwoCNIConvectionBoxProblem) ProblemTypeTag; - return Dumux::start<ProblemTypeTag>(argc, argv, usage); -} diff --git a/test/porousmediumflow/1p2c/implicit/test_box1p2cniconvection.input b/test/porousmediumflow/1p2c/implicit/test_box1p2cniconvection.input deleted file mode 100644 index e51f197be164b74692e93d9b50c57a7e84f12d04..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_box1p2cniconvection.input +++ /dev/null @@ -1,18 +0,0 @@ -[TimeManager] -DtInitial = 1 # [s] -TEnd = 3e4 # [s] -MaxTimeStepSize = 1e3 - -[Grid] -LowerLeft = 0 0 -UpperRight = 20 1 -Cells = 80 1 - -[Problem] -Name = box1p2cniconvection # name passed to the output routines -OutputInterval = 5 # every 5th timestep an output file is written -DarcyVelocity = 1e-4 # [m/s] inflow at the left boundary -EnableGravity = 0 # disable gravity - -[Vtk] -AddVelocity = 1 # enable velocity output diff --git a/test/porousmediumflow/1p2c/implicit/test_cc1p2c.cc b/test/porousmediumflow/1p2c/implicit/test_cc1p2c.cc deleted file mode 100644 index b3e52acc55ce1742de93ba54b0931b0f24f737e6..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_cc1p2c.cc +++ /dev/null @@ -1,57 +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 test for the 1p2c CC model - */ -#include <config.h> -#include "1p2ctestproblem.hh" -#include <dumux/common/start.hh> - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory options for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n"; - std::cout << errorMessageOut - << "\n"; - } -} - -int main(int argc, char** argv) -{ - typedef TTAG(OnePTwoCTestCCProblem) ProblemTypeTag; - return Dumux::start<ProblemTypeTag>(argc, argv, usage); -} diff --git a/test/porousmediumflow/1p2c/implicit/test_cc1p2c.input b/test/porousmediumflow/1p2c/implicit/test_cc1p2c.input deleted file mode 100644 index 82d23eb3b74936c944ebd4c75a548772e51a0adc..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_cc1p2c.input +++ /dev/null @@ -1,15 +0,0 @@ -[TimeManager] -DtInitial = 1 # [s] -TEnd = 100 # [s] - -[Grid] -LowerLeft = 0 0 -UpperRight = 1 1 -Cells = 20 2 - -[Problem] -Name = 1p2ctestcc # name passed to the output routines -EnableGravity = 0 # disable gravity - -[Vtk] -AddVelocity = 1 # enable velocity output diff --git a/test/porousmediumflow/1p2c/implicit/test_cc1p2cniconduction.cc b/test/porousmediumflow/1p2c/implicit/test_cc1p2cniconduction.cc deleted file mode 100644 index 4690547a5adb5edc15c47688d15c7e614ecafd1e..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_cc1p2cniconduction.cc +++ /dev/null @@ -1,57 +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 test for the 1p2cni CC model - */ -#include <config.h> -#include "1p2cniconductionproblem.hh" -#include <dumux/common/start.hh> - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory options for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n"; - std::cout << errorMessageOut - << "\n"; - } -} - -int main(int argc, char** argv) -{ - typedef TTAG(OnePTwoCNIConductionCCProblem) ProblemTypeTag; - return Dumux::start<ProblemTypeTag>(argc, argv, usage); -} diff --git a/test/porousmediumflow/1p2c/implicit/test_cc1p2cniconduction.input b/test/porousmediumflow/1p2c/implicit/test_cc1p2cniconduction.input deleted file mode 100644 index 87eb774f485e6d278fa8a3074099c08ec4824f20..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_cc1p2cniconduction.input +++ /dev/null @@ -1,18 +0,0 @@ -[TimeManager] -DtInitial = 1 # [s] -TEnd = 1e5 # [s] -MaxTimeStepSize = 1e10 - -[Grid] -LowerLeft = 0 0 -UpperRight = 5 1 -Cells = 200 1 - - -[Problem] -Name = cc1p2cniconduction # name passed to the output routines -OutputInterval = 5 # every 5th timestep an output file is written -EnableGravity = 0 # disable gravity - -[Vtk] -AddVelocity = 1 # enable velocity output diff --git a/test/porousmediumflow/1p2c/implicit/test_cc1p2cniconvection.cc b/test/porousmediumflow/1p2c/implicit/test_cc1p2cniconvection.cc deleted file mode 100644 index f7e2f5034659142600671d112aceb0236233da38..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_cc1p2cniconvection.cc +++ /dev/null @@ -1,57 +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 test for the 1p2cni CC model - */ -#include <config.h> -#include "1p2cniconvectionproblem.hh" -#include <dumux/common/start.hh> - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory options for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n"; - std::cout << errorMessageOut - << "\n"; - } -} - -int main(int argc, char** argv) -{ - typedef TTAG(OnePTwoCNIConvectionCCProblem) ProblemTypeTag; - return Dumux::start<ProblemTypeTag>(argc, argv, usage); -} diff --git a/test/porousmediumflow/1p2c/implicit/test_cc1p2cniconvection.input b/test/porousmediumflow/1p2c/implicit/test_cc1p2cniconvection.input deleted file mode 100644 index 1814da96df949992d53a617b5d78b3693928d47e..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_cc1p2cniconvection.input +++ /dev/null @@ -1,18 +0,0 @@ -[TimeManager] -DtInitial = 1 # [s] -TEnd = 3e4 # [s] -MaxTimeStepSize = 1e3 - -[Grid] -LowerLeft = 0 0 -UpperRight = 20 1 -Cells = 80 1 - -[Problem] -Name = cc1p2cniconvection # name passed to the output routines -OutputInterval = 5 # every 5th timestep an output file is written -DarcyVelocity = 1e-4 # [m/s] inflow at the left boundary -EnableGravity = 0 # disable gravity - -[Vtk] -AddVelocity = 1 # enable velocity output diff --git a/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2c.cc b/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2c.cc deleted file mode 100644 index 271424fb1048d6c87a4f61b41749e8bd70491164..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2c.cc +++ /dev/null @@ -1,57 +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 test for the 1p2c CC model - */ -#include <config.h> -#include "1p2ctestproblem.hh" -#include <dumux/common/start.hh> - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory options for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n"; - std::cout << errorMessageOut - << "\n"; - } -} - -int main(int argc, char** argv) -{ - typedef TTAG(OnePTwoCTestCCMpfaProblem) ProblemTypeTag; - return Dumux::start<ProblemTypeTag>(argc, argv, usage); -} diff --git a/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2c.input b/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2c.input deleted file mode 100644 index 328095c41d3f8497b0e92912af7d76da38c10394..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2c.input +++ /dev/null @@ -1,15 +0,0 @@ -[TimeManager] -DtInitial = 1 # [s] -TEnd = 100 # [s] - -[Grid] -LowerLeft = 0 0 -UpperRight = 1 1 -Cells = 20 20 - -[Problem] -Name = 1p2ctestccmpfa # name passed to the output routines -EnableGravity = 0 # disable gravity - -[Vtk] -AddVelocity = 0 # enable velocity output \ No newline at end of file diff --git a/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2cniconduction.cc b/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2cniconduction.cc deleted file mode 100644 index 48605d7bf2488305886234a4c9b54f43e19028d2..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2cniconduction.cc +++ /dev/null @@ -1,57 +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 test for the 1p2cni CC model - */ -#include <config.h> -#include "1p2cniconductionproblem.hh" -#include <dumux/common/start.hh> - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory options for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n"; - std::cout << errorMessageOut - << "\n"; - } -} - -int main(int argc, char** argv) -{ - typedef TTAG(OnePTwoCNIConductionCCMpfaProblem) ProblemTypeTag; - return Dumux::start<ProblemTypeTag>(argc, argv, usage); -} diff --git a/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2cniconduction.input b/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2cniconduction.input deleted file mode 100644 index fad21ef22b4e8f5879e343eb8e4878322af09610..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2cniconduction.input +++ /dev/null @@ -1,18 +0,0 @@ -[TimeManager] -DtInitial = 1 # [s] -TEnd = 1e5 # [s] -MaxTimeStepSize = 1e10 - -[Grid] -LowerLeft = 0 0 -UpperRight = 5 1 -Cells = 200 1 - - -[Problem] -Name = ccmpfa1p2cniconduction # name passed to the output routines -OutputInterval = 5 # every 5th timestep an output file is written -EnableGravity = 0 # disable gravity - -[Vtk] -AddVelocity = 0 # enable velocity output diff --git a/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2cniconvection.cc b/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2cniconvection.cc deleted file mode 100644 index 66adc8e4246527d2404fe393aed92e774929517b..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2cniconvection.cc +++ /dev/null @@ -1,57 +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 test for the 1p2cni CC model - */ -#include <config.h> -#include "1p2cniconvectionproblem.hh" -#include <dumux/common/start.hh> - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory options for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n"; - std::cout << errorMessageOut - << "\n"; - } -} - -int main(int argc, char** argv) -{ - typedef TTAG(OnePTwoCNIConvectionCCMpfaProblem) ProblemTypeTag; - return Dumux::start<ProblemTypeTag>(argc, argv, usage); -} diff --git a/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2cniconvection.input b/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2cniconvection.input deleted file mode 100644 index cc096acd05ca7f7d8adea95dc62a6c8dffbb3f66..0000000000000000000000000000000000000000 --- a/test/porousmediumflow/1p2c/implicit/test_ccmpfa1p2cniconvection.input +++ /dev/null @@ -1,18 +0,0 @@ -[TimeManager] -DtInitial = 1 # [s] -TEnd = 3e4 # [s] -MaxTimeStepSize = 1e3 - -[Grid] -LowerLeft = 0 0 -UpperRight = 20 1 -Cells = 80 1 - -[Problem] -Name = ccmpfa1p2cniconvection # name passed to the output routines -OutputInterval = 5 # every 5th timestep an output file is written -DarcyVelocity = 1e-4 # [m/s] inflow at the left boundary -EnableGravity = 0 # disable gravity - -[Vtk] -AddVelocity = 0 # enable velocity output diff --git a/test/porousmediumflow/CMakeLists.txt b/test/porousmediumflow/CMakeLists.txt index 050d034971da6d72fc64e4efac89e8c36a3eb40b..01e037dd075bce308f99d4b3647304f9031991e7 100644 --- a/test/porousmediumflow/CMakeLists.txt +++ b/test/porousmediumflow/CMakeLists.txt @@ -1,5 +1,4 @@ add_subdirectory("1p") -add_subdirectory("1p2c") add_subdirectory("1pnc") add_subdirectory("1pncmin") add_subdirectory("2p")