diff --git a/test/porousmediumflow/1pncmin/nonisothermal/main.cc b/test/porousmediumflow/1pncmin/nonisothermal/main.cc index 59c51f3f2d4e2b03667c33bd0aaf217a7fe34dbd..4ebab6144b91f3eb4a6064d6bf5e087ec6318ff2 100644 --- a/test/porousmediumflow/1pncmin/nonisothermal/main.cc +++ b/test/porousmediumflow/1pncmin/nonisothermal/main.cc @@ -38,7 +38,7 @@ #include <dumux/io/vtkoutputmodule.hh> #include <dumux/io/grid/gridmanager.hh> -#include "problem.hh" +#include "properties.hh" /*! * \brief Provides an interface for customizing error messages associated with diff --git a/test/porousmediumflow/1pncmin/nonisothermal/problem.hh b/test/porousmediumflow/1pncmin/nonisothermal/problem.hh index 280a7ae6863039dadecf3c2dcafba3f61865d9b6..432ee17b61e0cd9be8544d13bcf2330aea604991 100644 --- a/test/porousmediumflow/1pncmin/nonisothermal/problem.hh +++ b/test/porousmediumflow/1pncmin/nonisothermal/problem.hh @@ -22,86 +22,20 @@ * \brief Definition of a problem for thermochemical heat storage using \f$ \textnormal{CaO}, * \textnormal{Ca} \left( \textnormal{OH} \right)_2\f$. */ - #ifndef DUMUX_THERMOCHEM_PROBLEM_HH #define DUMUX_THERMOCHEM_PROBLEM_HH -#include <dune/grid/yaspgrid.hh> - -#include <dumux/porousmediumflow/1pncmin/model.hh> +#include <dumux/common/properties.hh> +#include <dumux/common/parameters.hh> #include <dumux/common/boundarytypes.hh> #include <dumux/discretization/elementsolution.hh> -#include <dumux/discretization/box.hh> -#include <dumux/discretization/cctpfa.hh> -#include <dumux/discretization/ccmpfa.hh> #include <dumux/porousmediumflow/problem.hh> -#include <dumux/material/fluidsystems/1padapter.hh> -#include <dumux/material/fluidsystems/h2on2.hh> -#include <dumux/material/fluidmatrixinteractions/1p/thermalconductivityaverage.hh> -#include <dumux/material/components/cao2h2.hh> -#include <dumux/material/solidsystems/compositionalsolidphase.hh> -#include "spatialparams.hh" #include "reaction.hh" -#include "modifiedcao.hh" namespace Dumux { -template <class TypeTag> -class ThermoChemProblem; - -namespace Properties { -// Create new type tags -namespace TTag { -struct ThermoChem { using InheritsFrom = std::tuple<OnePNCMinNI>; }; -struct ThermoChemBox { using InheritsFrom = std::tuple<ThermoChem, BoxModel>; }; -} // end namespace TTag - -// Set the grid type -template<class TypeTag> -struct Grid<TypeTag, TTag::ThermoChem> { using type = Dune::YaspGrid<2>; }; -// Set the problem property -template<class TypeTag> -struct Problem<TypeTag, TTag::ThermoChem> { using type = ThermoChemProblem<TypeTag>; }; - -// The fluid system -template<class TypeTag> -struct FluidSystem<TypeTag, TTag::ThermoChem> -{ - using Scalar = GetPropType<TypeTag, Properties::Scalar>; - using H2ON2 = FluidSystems::H2ON2<Scalar>; - static constexpr auto phaseIdx = H2ON2::gasPhaseIdx; // simulate the air phase - using type = FluidSystems::OnePAdapter<H2ON2, phaseIdx>; -}; - -template<class TypeTag> -struct SolidSystem<TypeTag, TTag::ThermoChem> -{ - using Scalar = GetPropType<TypeTag, Properties::Scalar>; - using ComponentOne = Components::ModifiedCaO<Scalar>; - using ComponentTwo = Components::CaO2H2<Scalar>; - using type = SolidSystems::CompositionalSolidPhase<Scalar, ComponentOne, ComponentTwo>; -}; - -// // Enable velocity output -// template<class TypeTag> -// struct VtkAddVelocity<TypeTag, TTag::ThermoChem> { static constexpr bool value = false; }; - -// Set the spatial parameters -template<class TypeTag> -struct SpatialParams<TypeTag, TTag::ThermoChem> -{ - using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; - using Scalar = GetPropType<TypeTag, Properties::Scalar>; - using type = ThermoChemSpatialParams<GridGeometry, Scalar>; -}; - -// Define whether mole(true) or mass (false) fractions are used -template<class TypeTag> -struct UseMoles<TypeTag, TTag::ThermoChem> { static constexpr bool value = true; }; -} - /*! * \ingroup OnePNCMinTests * diff --git a/test/porousmediumflow/1pncmin/nonisothermal/properties.hh b/test/porousmediumflow/1pncmin/nonisothermal/properties.hh new file mode 100644 index 0000000000000000000000000000000000000000..50ca0816e4bd740c7cd5581d3a2be85ac620e7ef --- /dev/null +++ b/test/porousmediumflow/1pncmin/nonisothermal/properties.hh @@ -0,0 +1,97 @@ +// -*- 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 3 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 + * \ingroup OnePNCMinTests + * \brief Definition of the properties for thermochemical heat storage using \f$ \textnormal{CaO}, + * \textnormal{Ca} \left( \textnormal{OH} \right)_2\f$. + */ +#ifndef DUMUX_THERMOCHEM_PROBLEM_PROPERTIES_HH +#define DUMUX_THERMOCHEM_PROBLEM_PROPERTIES_HH + +#include <dune/grid/yaspgrid.hh> + +#include <dumux/discretization/box.hh> +#include <dumux/porousmediumflow/1pncmin/model.hh> + +#include <dumux/material/fluidsystems/1padapter.hh> +#include <dumux/material/fluidsystems/h2on2.hh> +#include <dumux/material/components/cao2h2.hh> +#include <dumux/material/solidsystems/compositionalsolidphase.hh> + +#include "problem.hh" +#include "spatialparams.hh" +#include "modifiedcao.hh" + +namespace Dumux::Properties { + +// Create new type tags +namespace TTag { +struct ThermoChem { using InheritsFrom = std::tuple<OnePNCMinNI>; }; +struct ThermoChemBox { using InheritsFrom = std::tuple<ThermoChem, BoxModel>; }; +} // end namespace TTag + +// Set the grid type +template<class TypeTag> +struct Grid<TypeTag, TTag::ThermoChem> { using type = Dune::YaspGrid<2>; }; + +// Set the problem property +template<class TypeTag> +struct Problem<TypeTag, TTag::ThermoChem> { using type = ThermoChemProblem<TypeTag>; }; + +// The fluid system +template<class TypeTag> +struct FluidSystem<TypeTag, TTag::ThermoChem> +{ + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using H2ON2 = FluidSystems::H2ON2<Scalar>; + static constexpr auto phaseIdx = H2ON2::gasPhaseIdx; // simulate the air phase + using type = FluidSystems::OnePAdapter<H2ON2, phaseIdx>; +}; + +// The solid system +template<class TypeTag> +struct SolidSystem<TypeTag, TTag::ThermoChem> +{ + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using ComponentOne = Components::ModifiedCaO<Scalar>; + using ComponentTwo = Components::CaO2H2<Scalar>; + using type = SolidSystems::CompositionalSolidPhase<Scalar, ComponentOne, ComponentTwo>; +}; + +// // Enable velocity output +// template<class TypeTag> +// struct VtkAddVelocity<TypeTag, TTag::ThermoChem> { static constexpr bool value = false; }; + +// Set the spatial parameters +template<class TypeTag> +struct SpatialParams<TypeTag, TTag::ThermoChem> +{ + using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using type = ThermoChemSpatialParams<GridGeometry, Scalar>; +}; + +// Define whether mole(true) or mass (false) fractions are used +template<class TypeTag> +struct UseMoles<TypeTag, TTag::ThermoChem> { static constexpr bool value = true; }; + +} // end namespace Properties + +#endif