diff --git a/dumux/freeflow/staggered/indices.hh b/dumux/freeflow/staggered/indices.hh index 59bff376183fe4ca87d76bfad4b0043405db78d6..11ce35e9b8e8fcbed744e01b89d33a61d2cbbbad 100644 --- a/dumux/freeflow/staggered/indices.hh +++ b/dumux/freeflow/staggered/indices.hh @@ -26,16 +26,39 @@ namespace Dumux { // \{ - /*! - * \ingroup OnePModel + * \ingroup NavierStokesModel * \ingroup ImplicitIndices - * \brief Indices for the one-phase model. + * \brief The common indices for the isothermal stokes model. + * + * \tparam PVOffset The first index in a primary variable vector. */ -struct OnePIndices +template <class TypeTag, int PVOffset = 0> +struct NavierStokesCommonIndices { - static const int conti0EqIdx = 0; //index for the mass balance - static const int pressureIdx = 0; //index of the primary variable + // number of dimensions + typedef typename GET_PROP_TYPE(TypeTag, Grid) Grid; + static const int dim = Grid::dimension; + + // Primary variable indices + static const int momentumXIdx = PVOffset + 0; //!< Index of the x-component of the momentum equation + static const int momentumYIdx = PVOffset + 1; //!< Index of the y-component of the momentum equation + static const int momentumZIdx = PVOffset + 2; //!< Index of the z-component of the momentum equation + static const int lastMomentumIdx = momentumXIdx+dim-1; //!< Index of the last component of the momentum equation + + static const int dimXIdx = 0; //!< Index of the x-component of a vector of size dim + static const int dimYIdx = 1; //!< Index of the y-component of a vector of size dim + static const int dimZIdx = 2; //!< Index of the z-component of a vector of size dim + + static const int massBalanceIdx = dim; //!< Index of the mass balance equation + static const int conti0EqIdx = massBalanceIdx; //!< Index of first (for C-guys: 0th) mass conservation equation + + static const int pressureIdx = massBalanceIdx; //!< Index of the pressure in a solution vector + static const int velocityXIdx = momentumXIdx; //!< Index of the x-component of the velocity + static const int velocityYIdx = momentumYIdx; //!< Index of the y-component of the velocity + static const int velocityZIdx = momentumZIdx; //!< Index of the z-component of the velocity + + static const int phaseIdx = 0; //!< Index of the fluid phase (required to use the same fluid system in coupled models) }; // \} diff --git a/dumux/freeflow/staggered/model.hh b/dumux/freeflow/staggered/model.hh index 8ac092872474dd11ab0d9d7ea27be0b149df06f0..179c17bab9cf254bfe0ef4b10bfb08c6e0ffbcd3 100644 --- a/dumux/freeflow/staggered/model.hh +++ b/dumux/freeflow/staggered/model.hh @@ -27,13 +27,13 @@ #ifndef DUMUX_1P_MODEL_HH #define DUMUX_1P_MODEL_HH -#include <dumux/porousmediumflow/implicit/velocityoutput.hh> +// #include <dumux/porousmediumflow/implicit/velocityoutput.hh> #include "properties.hh" namespace Dumux { /*! - * \ingroup OnePModel + * \ingroup NavierStokesModel * \brief A single-phase, isothermal flow model using the fully implicit scheme. * * Single-phase, isothermal flow model, which uses a standard Darcy approach as the @@ -54,10 +54,10 @@ namespace Dumux * The model supports compressible as well as incompressible fluids. */ template<class TypeTag > -class OnePModel : public GET_PROP_TYPE(TypeTag, BaseModel) +class NavierStokesModel : public GET_PROP_TYPE(TypeTag, BaseModel) { typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, SpatialParams) SpatialParams; +// typedef typename GET_PROP_TYPE(TypeTag, SpatialParams) SpatialParams; typedef typename GET_PROP_TYPE(TypeTag, SolutionVector) SolutionVector; typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; @@ -73,7 +73,7 @@ public: /*! * \brief \copybrief Dumux::ImplicitModel::addOutputVtkFields * - * Specialization for the OnePModel, adding the pressure and + * Specialization for the NavierStokesModel, adding the pressure and * the process rank to the VTK writer. */ template<class MultiWriter> @@ -85,7 +85,6 @@ public: // create the required scalar fields unsigned numDofs = this->numDofs(); auto *p = writer.allocateManagedBuffer(numDofs); - auto *K = writer.allocateManagedBuffer(numDofs); // VectorField *velocity = writer.template allocateManagedBuffer<double, dimWorld>(numDofs); // ImplicitVelocityOutput<TypeTag> velocityOutput(this->problem_()); @@ -116,11 +115,9 @@ public: for (auto&& scv : scvs(fvGeometry)) { const auto& volVars = elemVolVars[scv]; - const auto& spatialParams = this->problem_().spatialParams(); auto dofIdxGlobal = scv.dofIndex(); (*p)[dofIdxGlobal] = volVars.pressure(); - (*K)[dofIdxGlobal] = spatialParams.intrinsicPermeability(scv, volVars); } // velocity output @@ -128,7 +125,6 @@ public: } writer.attachDofData(*p, "p", isBox); - writer.attachDofData(*K, "K", isBox); // if (velocityOutput.enableOutput()) // { // writer.attachDofData(*velocity, "velocity", isBox, dim); diff --git a/dumux/freeflow/staggered/problem.hh b/dumux/freeflow/staggered/problem.hh new file mode 100644 index 0000000000000000000000000000000000000000..cdd81818ef5b74dba3b66539aaf5790ac4898a04 --- /dev/null +++ b/dumux/freeflow/staggered/problem.hh @@ -0,0 +1,135 @@ +// -*- 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 stokes problems which use the box scheme. + */ +#ifndef DUMUX_NAVIERSTOKES_PROBLEM_HH +#define DUMUX_NAVIERSTOKES_PROBLEM_HH + +#include <dumux/implicit/problem.hh> + +#include "properties.hh" + +namespace Dumux +{ +/*! + * \ingroup ImplicitBaseProblems + * \ingroup BoxStokesModel + * \brief Base class for all problems which use the Stokes box model. + * + * This implements gravity (if desired) and a function returning the temperature. + */ +template<class TypeTag> +class NavierStokesProblem : public ImplicitProblem<TypeTag> +{ + typedef ImplicitProblem<TypeTag> ParentType; + typedef typename GET_PROP_TYPE(TypeTag, Problem) Implementation; + + typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; + typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; + typedef typename GridView::Grid Grid; + typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; + + typedef typename GridView::template Codim<0>::Entity Element; + typedef typename GridView::Intersection Intersection; + + typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; + + enum { + dim = Grid::dimension, + dimWorld = Grid::dimensionworld + }; + + typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; + +public: + NavierStokesProblem(TimeManager &timeManager, const GridView &gridView) + : ParentType(timeManager, gridView), + gravity_(0) + { + if (GET_PARAM_FROM_GROUP(TypeTag, bool, Problem, EnableGravity)) + gravity_[dim-1] = -9.81; + } + + /*! + * \name Problem parameters + */ + // \{ + + + /*! + * \brief Returns the temperature \f$\mathrm{[K]}\f$ at a given global position. + * + * This is not specific to the discretization. By default it just + * calls temperature(). + * + * \param globalPos The position in global coordinates where the temperature should be specified. + */ + Scalar temperatureAtPos(const GlobalPosition &globalPos) const + { return asImp_().temperature(); } + + /*! + * \brief Returns the temperature within the domain. + * + * This method MUST be overwritten by the actual problem. + */ + Scalar temperature() const + { DUNE_THROW(Dune::NotImplemented, "temperature() method not implemented by the actual problem"); } + + /*! + * \brief Returns the acceleration due to gravity. + * + * If the <tt>EnableGravity</tt> property is true, this means + * \f$\boldsymbol{g} = ( 0,\dots,\ -9.81)^T \f$, else \f$\boldsymbol{g} = ( 0,\dots, 0)^T \f$ + */ + const GlobalPosition &gravity() const + { return gravity_; } + + /*! + * \brief Evaluate the intrinsic permeability + * at the corner of a given element + * + * \return (Scalar) permeability + */ + DUNE_DEPRECATED_MSG("permeability() is deprecated.") + Scalar permeability(const Element &element, + const FVElementGeometry &fvGeometry, + const Intersection &intersection, + const int scvIdx, + const int boundaryFaceIdx) const + { DUNE_THROW(Dune::NotImplemented, "permeability()"); } + + // \} + +private: + //! Returns the implementation of the problem (i.e. static polymorphism) + Implementation &asImp_() + { return *static_cast<Implementation *>(this); } + + //! \copydoc asImp_() + const Implementation &asImp_() const + { return *static_cast<const Implementation *>(this); } + + GlobalPosition gravity_; +}; + +} + +#endif diff --git a/dumux/freeflow/staggered/properties.hh b/dumux/freeflow/staggered/properties.hh index 0d648ba01379b78dab4218234aec2d8b2135d96b..d3dd958bf46073dbd8ef703f0dd777116a175334 100644 --- a/dumux/freeflow/staggered/properties.hh +++ b/dumux/freeflow/staggered/properties.hh @@ -19,23 +19,23 @@ /*! * \ingroup Properties * \ingroup ImplicitProperties - * \ingroup OnePModel + * \ingroup NavierStokesModel * \file * * \brief Defines the properties required for the one-phase fully implicit model. */ -#ifndef DUMUX_1P_PROPERTIES_HH -#define DUMUX_1P_PROPERTIES_HH +#ifndef DUMUX_NAVIERSTOKES_PROPERTIES_HH +#define DUMUX_NAVIERSTOKES_PROPERTIES_HH #include <dumux/implicit/box/properties.hh> #include <dumux/implicit/cellcentered/properties.hh> -#include <dumux/porousmediumflow/nonisothermal/implicit/properties.hh> +// #include <dumux/porousmediumflow/nonisothermal/implicit/properties.hh> namespace Dumux { // \{ /////////////////////////////////////////////////////////////////////////// -// properties for the isothermal single phase model +// properties for the isothermal Navier-Stokes model /////////////////////////////////////////////////////////////////////////// namespace Properties { @@ -44,14 +44,10 @@ namespace Properties { ////////////////////////////////////////////////////////////////// //! The type tags for the implicit single-phase problems -NEW_TYPE_TAG(OneP); -NEW_TYPE_TAG(BoxOneP, INHERITS_FROM(BoxModel, OneP)); -NEW_TYPE_TAG(CCOneP, INHERITS_FROM(CCModel, OneP)); +NEW_TYPE_TAG(NavierStokes); //! The type tags for the corresponding non-isothermal problems -NEW_TYPE_TAG(OnePNI, INHERITS_FROM(OneP, NonIsothermal)); -NEW_TYPE_TAG(BoxOnePNI, INHERITS_FROM(BoxModel, OnePNI)); -NEW_TYPE_TAG(CCOnePNI, INHERITS_FROM(CCModel, OnePNI)); +// NEW_TYPE_TAG(NavierStokesNI, INHERITS_FROM(NavierStokes, NonIsothermal)); ////////////////////////////////////////////////////////////////// // Property tags @@ -59,14 +55,12 @@ NEW_TYPE_TAG(CCOnePNI, INHERITS_FROM(CCModel, OnePNI)); NEW_PROP_TAG(NumPhases); //!< Number of fluid phases in the system NEW_PROP_TAG(Indices); //!< Enumerations for the model -NEW_PROP_TAG(SpatialParams); //!< The type of the spatial parameters object NEW_PROP_TAG(FluidSystem); //!< The type of the fluid system to use NEW_PROP_TAG(Fluid); //!< The fluid used for the default fluid system NEW_PROP_TAG(FluidState); //!< The type of the fluid state to use NEW_PROP_TAG(ProblemEnableGravity); //!< Returns whether gravity is considered in the problem NEW_PROP_TAG(ImplicitMassUpwindWeight); //!< Returns weight of the upwind cell when calculating fluxes NEW_PROP_TAG(ImplicitMobilityUpwindWeight); //!< Weight for the upwind mobility in the velocity calculation -NEW_PROP_TAG(SpatialParamsForchCoeff); //!< Property for the forchheimer coefficient NEW_PROP_TAG(VtkAddVelocity); //!< Returns whether velocity vectors are written into the vtk output // \} } diff --git a/dumux/freeflow/staggered/propertydefaults.hh b/dumux/freeflow/staggered/propertydefaults.hh index babb8601204e6596a6c8bf00c9798b36f23c1f8d..b51a8c2fa0f852a0a7051ea557d3f068a4303b68 100644 --- a/dumux/freeflow/staggered/propertydefaults.hh +++ b/dumux/freeflow/staggered/propertydefaults.hh @@ -32,15 +32,13 @@ #include "model.hh" #include "volumevariables.hh" #include "indices.hh" +#include "problem.hh" #include <dumux/porousmediumflow/immiscible/localresidual.hh> -#include <dumux/porousmediumflow/nonisothermal/implicit/propertydefaults.hh> #include <dumux/material/fluidsystems/gasphase.hh> #include <dumux/material/fluidsystems/liquidphase.hh> #include <dumux/material/components/nullcomponent.hh> #include <dumux/material/fluidsystems/1p.hh> -#include <dumux/material/spatialparams/implicit1p.hh> -#include <dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh> namespace Dumux { @@ -50,46 +48,42 @@ namespace Dumux // default property values for the isothermal single phase model /////////////////////////////////////////////////////////////////////////// namespace Properties { -SET_INT_PROP(OneP, NumEq, 1); //!< set the number of equations to 1 -SET_INT_PROP(OneP, NumPhases, 1); //!< The number of phases in the 1p model is 1 +SET_INT_PROP(NavierStokes, NumEq, 1); //!< set the number of equations to 1 +SET_INT_PROP(NavierStokes, NumPhases, 1); //!< The number of phases in the 1p model is 1 //! The local residual function -SET_TYPE_PROP(OneP, LocalResidual, ImmiscibleLocalResidual<TypeTag>); +SET_TYPE_PROP(NavierStokes, LocalResidual, ImmiscibleLocalResidual<TypeTag>); //! the Model property -SET_TYPE_PROP(OneP, Model, OnePModel<TypeTag>); +SET_TYPE_PROP(NavierStokes, Model, NavierStokesModel<TypeTag>); //! the VolumeVariables property -SET_TYPE_PROP(OneP, VolumeVariables, OnePVolumeVariables<TypeTag>); +SET_TYPE_PROP(NavierStokes, VolumeVariables, NavierStokesVolumeVariables<TypeTag>); //! Enable advection -SET_BOOL_PROP(OneP, EnableAdvection, true); +SET_BOOL_PROP(NavierStokes, EnableAdvection, true); //! The one-phase model has no molecular diffusion -SET_BOOL_PROP(OneP, EnableMolecularDiffusion, false); +SET_BOOL_PROP(NavierStokes, EnableMolecularDiffusion, false); //! Isothermal model by default -SET_BOOL_PROP(OneP, EnableEnergyBalance, false); +SET_BOOL_PROP(NavierStokes, EnableEnergyBalance, false); //! The indices required by the isothermal single-phase model -SET_TYPE_PROP(OneP, Indices, OnePIndices); - -//! The spatial parameters to be employed. -//! Use ImplicitSpatialParamsOneP by default. -SET_TYPE_PROP(OneP, SpatialParams, ImplicitSpatialParamsOneP<TypeTag>); +SET_TYPE_PROP(NavierStokes, Indices, NavierStokesCommonIndices<TypeTag>); //! The weight of the upwind control volume when calculating //! fluxes. Use central differences by default. -SET_SCALAR_PROP(OneP, ImplicitMassUpwindWeight, 0.5); +SET_SCALAR_PROP(NavierStokes, ImplicitMassUpwindWeight, 0.5); //! weight for the upwind mobility in the velocity calculation //! fluxes. Use central differences by default. -SET_SCALAR_PROP(OneP, ImplicitMobilityUpwindWeight, 0.5); +SET_SCALAR_PROP(NavierStokes, ImplicitMobilityUpwindWeight, 0.5); //! The fluid system to use by default -SET_TYPE_PROP(OneP, FluidSystem, Dumux::FluidSystems::OneP<typename GET_PROP_TYPE(TypeTag, Scalar), typename GET_PROP_TYPE(TypeTag, Fluid)>); +SET_TYPE_PROP(NavierStokes, FluidSystem, Dumux::FluidSystems::OneP<typename GET_PROP_TYPE(TypeTag, Scalar), typename GET_PROP_TYPE(TypeTag, Fluid)>); -SET_PROP(OneP, Fluid) +SET_PROP(NavierStokes, Fluid) { private: typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; public: @@ -102,7 +96,7 @@ public: * appropriately for the model ((non-)isothermal, equilibrium, ...). * This can be done in the problem. */ -SET_PROP(OneP, FluidState){ +SET_PROP(NavierStokes, FluidState){ private: typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem; @@ -111,44 +105,44 @@ SET_PROP(OneP, FluidState){ }; // disable velocity output by default -SET_BOOL_PROP(OneP, VtkAddVelocity, false); +SET_BOOL_PROP(NavierStokes, VtkAddVelocity, false); // enable gravity by default -SET_BOOL_PROP(OneP, ProblemEnableGravity, true); +SET_BOOL_PROP(NavierStokes, ProblemEnableGravity, true); //! 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(OneP, SpatialParamsForchCoeff, 0.55); +// SET_SCALAR_PROP(NavierStokes, SpatialParamsForchCoeff, 0.55); //! average is used as default model to compute the effective thermal heat conductivity -SET_PROP(OnePNI, ThermalConductivityModel) -{ private : - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - public: - typedef ThermalConductivityAverage<Scalar> type; -}; +// SET_PROP(NavierStokesNI, 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(OnePNI, IsothermalModel, OnePModel<TypeTag>); +// SET_TYPE_PROP(NavierStokesNI, IsothermalModel, NavierStokesModel<TypeTag>); //set isothermal VolumeVariables -SET_TYPE_PROP(OnePNI, IsothermalVolumeVariables, OnePVolumeVariables<TypeTag>); +// SET_TYPE_PROP(NavierStokesNI, IsothermalVolumeVariables, NavierStokesVolumeVariables<TypeTag>); //set isothermal LocalResidual -SET_TYPE_PROP(OnePNI, IsothermalLocalResidual, ImmiscibleLocalResidual<TypeTag>); +// SET_TYPE_PROP(NavierStokesNI, IsothermalLocalResidual, ImmiscibleLocalResidual<TypeTag>); //set isothermal Indices -SET_TYPE_PROP(OnePNI, IsothermalIndices, OnePIndices); +// SET_TYPE_PROP(NavierStokesNI, IsothermalIndices, NavierStokesCommonIndices<TypeTag>); //set isothermal NumEq -SET_INT_PROP(OnePNI, IsothermalNumEq, 1); +// SET_INT_PROP(NavierStokesNI, IsothermalNumEq, 1); // \} } // end namespace Properties diff --git a/dumux/freeflow/staggered/volumevariables.hh b/dumux/freeflow/staggered/volumevariables.hh index 81c65cb882e661755754353fd8ef1ab0447c38f4..10273615e4c06fd069fe3162043388bf58d2180a 100644 --- a/dumux/freeflow/staggered/volumevariables.hh +++ b/dumux/freeflow/staggered/volumevariables.hh @@ -33,13 +33,13 @@ namespace Dumux { /*! - * \ingroup OnePModel + * \ingroup NavierStokesModel * \ingroup ImplicitVolumeVariables * \brief Contains the quantities which are constant within a * finite volume in the one-phase model. */ template <class TypeTag> -class OnePVolumeVariables : public ImplicitVolumeVariables<TypeTag> +class NavierStokesVolumeVariables : public ImplicitVolumeVariables<TypeTag> { using ParentType = ImplicitVolumeVariables<TypeTag>; using Implementation = typename GET_PROP_TYPE(TypeTag, VolumeVariables); @@ -68,8 +68,6 @@ public: ParentType::update(priVars, problem, element, scv); completeFluidState(priVars, problem, element, scv, fluidState_); - // porosity - porosity_ = problem.spatialParams().porosity(scv); }; /*! @@ -155,12 +153,6 @@ public: Scalar mobility(int phaseIdx = 0) const { return 1.0/fluidState_.viscosity(phaseIdx); } - /*! - * \brief Return the average porosity \f$\mathrm{[-]}\f$ within the control volume. - */ - Scalar porosity() const - { return porosity_; } - /*! * \brief Return the fluid state of the control volume. */ @@ -169,7 +161,6 @@ public: protected: FluidState fluidState_; - Scalar porosity_; Implementation &asImp_() { return *static_cast<Implementation*>(this); } diff --git a/test/freeflow/staggered/CMakeLists.txt b/test/freeflow/staggered/CMakeLists.txt index 1e03deceef3031e501611e7d85df4e3b4fbdfa4d..071f3c8a5c0e2a936f86ae283bd43d278b824f35 100644 --- a/test/freeflow/staggered/CMakeLists.txt +++ b/test/freeflow/staggered/CMakeLists.txt @@ -1,16 +1,15 @@ add_input_file_links() -add_dumux_test(test_cc1p test_cc1p test_cc1p.cc +add_dumux_test(test_freeflowstaggered test_freeflowstaggered test_freeflowstaggered.cc python ${CMAKE_SOURCE_DIR}/bin/runtest.py --script fuzzy --files ${CMAKE_SOURCE_DIR}/test/references/1ptestcc-reference.vtu ${CMAKE_CURRENT_BINARY_DIR}/1ptestcc-00002.vtu - --command "${CMAKE_CURRENT_BINARY_DIR}/test_cc1p") + --command "${CMAKE_CURRENT_BINARY_DIR}/test_staggered") #install sources install(FILES -1ptestproblem.hh -1ptestspatialparams.hh -test_cc1p.cc +staggeredproblem.hh +test_freeflowstaggered.cc DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/implicit/1p) diff --git a/test/freeflow/staggered/1ptestproblem.hh b/test/freeflow/staggered/staggeredtestproblem.hh similarity index 88% rename from test/freeflow/staggered/1ptestproblem.hh rename to test/freeflow/staggered/staggeredtestproblem.hh index 13dd4faea441334f0d1e2914ed362252c3b98334..10082c27791c28934b19a5f4335f71b6d0742939 100644 --- a/test/freeflow/staggered/1ptestproblem.hh +++ b/test/freeflow/staggered/staggeredtestproblem.hh @@ -25,36 +25,32 @@ #ifndef DUMUX_1PTEST_PROBLEM_HH #define DUMUX_1PTEST_PROBLEM_HH -// #include <dumux/implicit/cellcentered/tpfa/properties.hh> #include <dumux/implicit/staggered/properties.hh> #include <dumux/freeflow/staggered/model.hh> -#include <dumux/porousmediumflow/implicit/problem.hh> +#include <dumux/implicit/problem.hh> #include <dumux/material/components/simpleh2o.hh> #include <dumux/material/fluidsystems/liquidphase.hh> #include <dumux/linear/amgbackend.hh> -#include "1ptestspatialparams.hh" namespace Dumux { template <class TypeTag> -class OnePTestProblem; +class StaggeredTestProblem; namespace Capabilities { template<class TypeTag> - struct isStationary<OnePTestProblem<TypeTag>> + struct isStationary<StaggeredTestProblem<TypeTag>> { static const bool value = true; }; } namespace Properties { -NEW_TYPE_TAG(OnePTestProblem, INHERITS_FROM(OneP)); -// NEW_TYPE_TAG(OnePTestBoxProblem, INHERITS_FROM(BoxModel, OnePTestProblem)); -NEW_TYPE_TAG(OnePTestCCProblem, INHERITS_FROM(StaggeredModel, OnePTestProblem)); +NEW_TYPE_TAG(StaggeredTestProblem, INHERITS_FROM(StaggeredModel, NavierStokes)); -SET_PROP(OnePTestProblem, Fluid) +SET_PROP(StaggeredTestProblem, Fluid) { private: typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; @@ -63,19 +59,19 @@ public: }; // Set the grid type -SET_TYPE_PROP(OnePTestProblem, Grid, Dune::YaspGrid<2>); +SET_TYPE_PROP(StaggeredTestProblem, Grid, Dune::YaspGrid<2>); // Set the problem property -SET_TYPE_PROP(OnePTestProblem, Problem, Dumux::OnePTestProblem<TypeTag> ); +SET_TYPE_PROP(StaggeredTestProblem, Problem, Dumux::StaggeredTestProblem<TypeTag> ); // Set the spatial parameters -SET_TYPE_PROP(OnePTestProblem, SpatialParams, Dumux::OnePTestSpatialParams<TypeTag> ); +// SET_TYPE_PROP(StaggeredTestProblem, SpatialParams, Dumux::OnePTestSpatialParams<TypeTag> ); -SET_BOOL_PROP(OnePTestProblem, EnableGlobalFVGeometryCache, true); +SET_BOOL_PROP(StaggeredTestProblem, EnableGlobalFVGeometryCache, true); // Enable gravity -SET_BOOL_PROP(OnePTestProblem, ProblemEnableGravity, true); +SET_BOOL_PROP(StaggeredTestProblem, ProblemEnableGravity, true); } /*! @@ -101,9 +97,9 @@ SET_BOOL_PROP(OnePTestProblem, ProblemEnableGravity, true); * and use <tt>test_1p_3d.dgf</tt> in the parameter file. */ template <class TypeTag> -class OnePTestProblem : public ImplicitPorousMediaProblem<TypeTag> +class StaggeredTestProblem : public NavierStokesProblem<TypeTag> { - typedef ImplicitPorousMediaProblem<TypeTag> ParentType; + typedef NavierStokesProblem<TypeTag> ParentType; typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; @@ -134,7 +130,7 @@ class OnePTestProblem : public ImplicitPorousMediaProblem<TypeTag> typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; public: - OnePTestProblem(TimeManager &timeManager, const GridView &gridView) + StaggeredTestProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) { name_ = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, diff --git a/test/freeflow/staggered/test_cc1p.cc b/test/freeflow/staggered/test_freeflowstaggered.cc similarity index 97% rename from test/freeflow/staggered/test_cc1p.cc rename to test/freeflow/staggered/test_freeflowstaggered.cc index 83b357c6dc9c0a86b9d9efe1d98c8b10d86c11ca..aa9e280802947f1ae9f829e92a2c6ce11fa9b7b3 100644 --- a/test/freeflow/staggered/test_cc1p.cc +++ b/test/freeflow/staggered/test_freeflowstaggered.cc @@ -22,7 +22,7 @@ * \brief test for the one-phase CC model */ #include <config.h> -#include "1ptestproblem.hh" +#include "staggeredtestproblem.hh" #include <dumux/common/start.hh> /*! @@ -59,6 +59,6 @@ void usage(const char *progName, const std::string &errorMsg) int main(int argc, char** argv) { - typedef TTAG(OnePTestCCProblem) ProblemTypeTag; + typedef TTAG(StaggeredTestProblem) ProblemTypeTag; return Dumux::start<ProblemTypeTag>(argc, argv, usage); } diff --git a/test/freeflow/staggered/test_cc1p.input b/test/freeflow/staggered/test_freeflowstaggered.input similarity index 100% rename from test/freeflow/staggered/test_cc1p.input rename to test/freeflow/staggered/test_freeflowstaggered.input