diff --git a/lecture/mm/heatpipe/CMakeLists.txt b/lecture/mm/heatpipe/CMakeLists.txt index ac6d6521c3841af7c9d212e39e12060b04c01e30..83124fb0256c53eff701988a9e131a80a2ab4b82 100644 --- a/lecture/mm/heatpipe/CMakeLists.txt +++ b/lecture/mm/heatpipe/CMakeLists.txt @@ -12,6 +12,7 @@ dune_add_test(NAME heatpipe # headers for installation and headercheck install(FILES heatpipeproblem.hh + heatpipeproperties.hh heatpipespatialparams.hh krpcheatpipe.hh krpcheatpipeparams.hh diff --git a/lecture/mm/heatpipe/heatpipe.cc b/lecture/mm/heatpipe/heatpipe.cc index 8d49e63e4a99faeb7827152e28317d2ecddba9aa..bc47cb037250fb05ebf8a0811525d049144ea9eb 100644 --- a/lecture/mm/heatpipe/heatpipe.cc +++ b/lecture/mm/heatpipe/heatpipe.cc @@ -42,7 +42,7 @@ #include #include -#include "heatpipeproblem.hh" +#include "heatpipeproperties.hh" int main(int argc, char** argv) try { diff --git a/lecture/mm/heatpipe/heatpipeproblem.hh b/lecture/mm/heatpipe/heatpipeproblem.hh index e4e56041313fcac38fefd1057ab00d0167869099..edac966d3b8bf97a38a8236b6600e9d69e0888a9 100644 --- a/lecture/mm/heatpipe/heatpipeproblem.hh +++ b/lecture/mm/heatpipe/heatpipeproblem.hh @@ -19,57 +19,13 @@ #ifndef DUMUX_HEATPIPE_PROBLEM_HH #define DUMUX_HEATPIPE_PROBLEM_HH -#include +#include +#include -#include - -#include - -#include #include -#include "heatpipespatialparams.hh" - namespace Dumux { - -template -class HeatPipeProblem; - -namespace Properties -{ -// Create new type tags -namespace TTag { -struct HeatPipeTypeTag { using InheritsFrom = std::tuple; }; -} // end namespace TTag - -// Set the grid type -template -struct Grid { using type = Dune::YaspGrid<2>; }; - -// Set the problem property -template -struct Problem { using type = HeatPipeProblem; }; - -// Set the fluid system -template -struct FluidSystem { using type = FluidSystems::H2OAir>; }; - -// pn-sw formulation -template -struct Formulation { static constexpr auto value = TwoPFormulation::p1s0; }; - -// Set the spatial parameters -template -struct SpatialParams -{ - using Scalar = GetPropType; - using FVGridGeometry = GetPropType; - using type = HeatPipeSpatialParams; -}; - -} - template class HeatPipeProblem : public PorousMediumFlowProblem { diff --git a/lecture/mm/heatpipe/heatpipeproperties.hh b/lecture/mm/heatpipe/heatpipeproperties.hh new file mode 100644 index 0000000000000000000000000000000000000000..7342de635e2b73a12c1ff45ee3de6ee4308ffc01 --- /dev/null +++ b/lecture/mm/heatpipe/heatpipeproperties.hh @@ -0,0 +1,67 @@ +// -*- 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 . * + *****************************************************************************/ +#ifndef DUMUX_HEATPIPE_PROPERTIES_HH +#define DUMUX_HEATPIPE_PROPERTIES_HH + +#include + +#include + +#include + +#include + +#include "heatpipespatialparams.hh" +#include "heatpipeproblem.hh" + +namespace Dumux::Properties +{ +// Create new type tags +namespace TTag { +struct HeatPipeTypeTag { using InheritsFrom = std::tuple; }; +} // end namespace TTag + +// Set the grid type +template +struct Grid { using type = Dune::YaspGrid<2>; }; + +// Set the problem property +template +struct Problem { using type = HeatPipeProblem; }; + +// Set the fluid system +template +struct FluidSystem { using type = FluidSystems::H2OAir>; }; + +// pn-sw formulation +template +struct Formulation { static constexpr auto value = TwoPFormulation::p1s0; }; + +// Set the spatial parameters +template +struct SpatialParams +{ + using Scalar = GetPropType; + using FVGridGeometry = GetPropType; + using type = HeatPipeSpatialParams; +}; + +} // namespace Dumux::Properties + +#endif // DUMUX_HEATPIPE_PROPERTIES_HH