Commit e53d29fb authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'feature/put-properties-in-separate-headers' into 'master'

Feature/put properties in separate headers

See merge request !132
parents 7f5f969e 9861ed46
......@@ -40,7 +40,7 @@
#include <dumux/io/grid/gridmanager.hh>
#include <dumux/io/vtkoutputmodule.hh>
#include "lens1p2cproblem.hh"
#include "lens1p2cproperties.hh"
/*!
* \brief Provides an interface for customizing error messages associated with
......
......@@ -25,66 +25,13 @@
#ifndef DUMUX_LENS_1P2C_PROBLEM_HH
#define DUMUX_LENS_1P2C_PROBLEM_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/common/properties.hh>
#include <dumux/discretization/box.hh>
#include <dumux/common/parameters.hh>
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/porousmediumflow/1pnc/model.hh>
#include <dumux/material/fluidsystems/h2on2.hh>
#include <dumux/material/fluidsystems/1padapter.hh>
#include "lens1p2cspatialparams.hh"
namespace Dumux {
template <class TypeTag>
class LensOnePTwoCProblem;
//////////
// Specify the properties for the lens problem
//////////
namespace Properties {
// Create new type tags
namespace TTag {
struct LensOnePTwoCProblem { using InheritsFrom = std::tuple<OnePNC, BoxModel>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::LensOnePTwoCProblem> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::LensOnePTwoCProblem> { using type = LensOnePTwoCProblem<TypeTag>; };
// Set fluid configuration
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::LensOnePTwoCProblem>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using H2ON2 = FluidSystems::H2ON2<Scalar, FluidSystems::H2ON2DefaultPolicy</*simplified=*/true>>;
using type = FluidSystems::OnePAdapter<H2ON2, H2ON2::liquidPhaseIdx>;
};
// Define whether mole(true) or mass(false) fractions are used
template<class TypeTag>
struct UseMoles<TypeTag, TTag::LensOnePTwoCProblem> { static constexpr bool value = true; };
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::LensOnePTwoCProblem>
{
private:
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = Lens1p2cSpatialParams<FVGridGeometry, Scalar>;
};
} // end namespace Properties
/*!
* \brief Exercise to show the diffusive spreading of contaminants.
*
......
// -*- 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 Exercise to show the diffusive spreading of contaminants.
*/
#ifndef DUMUX_LENS_1P2C_PROPERTIES_HH
#define DUMUX_LENS_1P2C_PROPERTIES_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/common/properties.hh>
#include <dumux/discretization/box.hh>
#include <dumux/porousmediumflow/1pnc/model.hh>
#include <dumux/material/fluidsystems/h2on2.hh>
#include <dumux/material/fluidsystems/1padapter.hh>
#include "lens1p2cspatialparams.hh"
#include "lens1p2cproblem.hh"
//////////
// Specify the properties for the lens problem
//////////
namespace Dumux::Properties {
// Create new type tags
namespace TTag {
struct LensOnePTwoCProblem { using InheritsFrom = std::tuple<OnePNC, BoxModel>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::LensOnePTwoCProblem> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::LensOnePTwoCProblem> { using type = LensOnePTwoCProblem<TypeTag>; };
// Set fluid configuration
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::LensOnePTwoCProblem>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using H2ON2 = FluidSystems::H2ON2<Scalar, FluidSystems::H2ON2DefaultPolicy</*simplified=*/true>>;
using type = FluidSystems::OnePAdapter<H2ON2, H2ON2::liquidPhaseIdx>;
};
// Define whether mole(true) or mass(false) fractions are used
template<class TypeTag>
struct UseMoles<TypeTag, TTag::LensOnePTwoCProblem> { static constexpr bool value = true; };
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::LensOnePTwoCProblem>
{
private:
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = Lens1p2cSpatialParams<FVGridGeometry, Scalar>;
};
} //end namespace Dumux::Properties
#endif // DUMUX_LENS_1P2C_PROPERTIES_HH
......@@ -46,7 +46,7 @@
#include <dumux/io/grid/gridmanager.hh>
#include <dumux/io/vtkoutputmodule.hh>
#include "lens2p2cproblem.hh"
#include "lens2p2cproperties.hh"
/*!
* \brief Provides an interface for customizing error messages associated with
* reading in parameters.
......
......@@ -25,63 +25,13 @@
#ifndef DUMUX_LENS_2P2C_PROBLEM_HH
#define DUMUX_LENS_2P2C_PROBLEM_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/common/properties.hh>
#include <dumux/discretization/box.hh>
#include <dumux/porousmediumflow/1pnc/model.hh>
#include <dumux/porousmediumflow/2p2c/model.hh>
#include <dumux/common/parameters.hh>
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/fluidsystems/h2on2.hh>
#include "lens2pspatialparams.hh"
namespace Dumux {
template<class TypeTag>
class LensTwoPTwoCProblem;
//////////
// Specify the properties for the lens problem
//////////
namespace Properties {
// Create new type tags
namespace TTag {
struct LensTwoPTwoCProblem { using InheritsFrom = std::tuple<TwoPTwoC, BoxModel>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::LensTwoPTwoCProblem> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::LensTwoPTwoCProblem> { using type = LensTwoPTwoCProblem<TypeTag>; };
// Set fluid configuration
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::LensTwoPTwoCProblem>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = FluidSystems::H2ON2<Scalar, FluidSystems::H2ON2DefaultPolicy</*simplified=*/true>>;
};
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::LensTwoPTwoCProblem>
{
private:
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = Lens2pSpatialParams<FVGridGeometry, Scalar>;
};
} // end namespace Properties
/*!
* \brief Exercise to show the diffusive spreading of contaminants.
......
// -*- 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 Exercise to show the diffusive spreading of contaminants.
*/
#ifndef DUMUX_LENS_2P2C_PROPERTIES_HH
#define DUMUX_LENS_2P2C_PROPERTIES_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/common/properties.hh>
#include <dumux/discretization/box.hh>
#include <dumux/porousmediumflow/2p2c/model.hh>
#include <dumux/material/fluidsystems/h2on2.hh>
#include "lens2pspatialparams.hh"
#include "lens2p2cproblem.hh"
//////////
// Specify the properties for the lens problem
//////////
namespace Dumux::Properties {
// Create new type tags
namespace TTag {
struct LensTwoPTwoCProblem { using InheritsFrom = std::tuple<TwoPTwoC, BoxModel>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::LensTwoPTwoCProblem> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::LensTwoPTwoCProblem> { using type = LensTwoPTwoCProblem<TypeTag>; };
// Set fluid configuration
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::LensTwoPTwoCProblem>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = FluidSystems::H2ON2<Scalar, FluidSystems::H2ON2DefaultPolicy</*simplified=*/true>>;
};
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::LensTwoPTwoCProblem>
{
private:
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = Lens2pSpatialParams<FVGridGeometry, Scalar>;
};
} // end namespace Dumux::Properties
#endif // DUMUX_LENS_2P2C_PROPERTIES_HH
......@@ -46,7 +46,8 @@
#include <dumux/io/grid/gridmanager.hh>
#include <dumux/io/vtkoutputmodule.hh>
#include "lens2pproblem.hh"
#include "lens2pproperties.hh"
/*!
* \brief Provides an interface for customizing error messages associated with
* reading in parameters.
......
......@@ -25,67 +25,12 @@
#ifndef DUMUX_LENS2P_PROBLEM_HH
#define DUMUX_LENS2P_PROBLEM_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/discretization/box.hh>
#include <dumux/porousmediumflow/2p/model.hh>
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/components/h2o.hh>
#include <dumux/material/components/n2.hh>
#include <dumux/material/fluidsystems/1pliquid.hh>
#include <dumux/material/fluidsystems/1pgas.hh>
#include <dumux/material/fluidsystems/2pimmiscible.hh>
#include <dumux/material/components/tabulatedcomponent.hh>
#include "lens2pspatialparams.hh"
namespace Dumux {
template <class TypeTag>
class LensTwoPProblem;
//////////
// Specify the properties for the lens problem
//////////
namespace Properties {
// Create new type tags
namespace TTag {
struct LensTwoPProblem { using InheritsFrom = std::tuple<TwoP, BoxModel>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::LensTwoPProblem> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::LensTwoPProblem> { using type = LensTwoPProblem<TypeTag>; };
// Set the fluid system
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::LensTwoPProblem>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using WettingPhase = FluidSystems::OnePLiquid<Scalar, Components::TabulatedComponent<Components::H2O<Scalar>> >;
using NonwettingPhase = FluidSystems::OnePGas<Scalar, Components::N2<Scalar> >;
using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>;
};
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::LensTwoPProblem>
{
private:
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = Lens2pSpatialParams<FVGridGeometry, Scalar>;
};
} // end namespace Properties
namespace Dumux{
/*!
* \brief Exercise to show the spreading of contaminants.
......@@ -109,6 +54,7 @@ public:
* exercise3.input
*
*/
template <typename TypeTag>
class LensTwoPProblem : public PorousMediumFlowProblem<TypeTag>
{
......
// -*- 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/>. *
*****************************************************************************/
#ifndef DUMUX_LENS2P_PROPERTIES_HH
#define DUMUX_LENS2P_PROPERTIES_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/discretization/box.hh>
#include <dumux/porousmediumflow/2p/model.hh>
#include <dumux/material/components/h2o.hh>
#include <dumux/material/components/n2.hh>
#include <dumux/material/fluidsystems/1pliquid.hh>
#include <dumux/material/fluidsystems/1pgas.hh>
#include <dumux/material/fluidsystems/2pimmiscible.hh>
#include <dumux/material/components/tabulatedcomponent.hh>
#include "lens2pspatialparams.hh"
#include "lens2pproblem.hh"
//////////
// Specify the properties for the lens problem
//////////
namespace Dumux::Properties {
// Create new type tags
namespace TTag {
struct LensTwoPProblem { using InheritsFrom = std::tuple<TwoP, BoxModel>; };
} // end namespace TTag
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::LensTwoPProblem> { using type = LensTwoPProblem<TypeTag>; };
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::LensTwoPProblem> { using type = Dune::YaspGrid<2>; };
// Set the fluid system
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::LensTwoPProblem>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using WettingPhase = FluidSystems::OnePLiquid<Scalar, Components::TabulatedComponent<Components::H2O<Scalar>> >;
using NonwettingPhase = FluidSystems::OnePGas<Scalar, Components::N2<Scalar> >;
using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>;
};
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::LensTwoPProblem>
{
private:
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = Lens2pSpatialParams<FVGridGeometry, Scalar>;
};
} // end namespace Dumux::Properties
#endif // DUMUX_LENS_2P_PROPERTIES_HH
......@@ -41,7 +41,7 @@
#include <dumux/io/vtkoutputmodule.hh>
#include <dumux/io/grid/gridmanager.hh>
#include "lens1p2cproblem.hh"
#include "lens1p2cproperties.hh"
/*!
* \brief Provides an interface for customizing error messages associated with
......
......@@ -26,61 +26,13 @@
#ifndef DUMUX_LENS_1P2C_PROBLEM_HH
#define DUMUX_LENS_1P2C_PROBLEM_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/porousmediumflow/1pnc/model.hh>
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/fluidsystems/h2on2.hh>
#include <dumux/material/fluidsystems/1padapter.hh>
#include <dumux/discretization/box.hh>
#include "../1p2c_2p_2p2c/lens1p2cspatialparams.hh"
#include <dumux/common/timeloop.hh>
namespace Dumux {
template <typename TypeTag>
class LensOnePTwoCProblem;
//////////
// Specify the properties for the lens problem
//////////
namespace Properties {
// Create new type tags
namespace TTag {
struct LensOnePTwoCProblem { using InheritsFrom = std::tuple<OnePNC, BoxModel>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::LensOnePTwoCProblem> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::LensOnePTwoCProblem> { using type = LensOnePTwoCProblem<TypeTag>; };
// set fluid system
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::LensOnePTwoCProblem>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using H2ON2 = FluidSystems::H2ON2<Scalar, FluidSystems::H2ON2DefaultPolicy</*simplified=*/false>>;
using type = FluidSystems::OnePAdapter<H2ON2, H2ON2::liquidPhaseIdx>;
};
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::LensOnePTwoCProblem>
{
private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
public:
using type = Lens1p2cSpatialParams<FVGridGeometry, Scalar>;
};
} // end namespace Properties
/*!
* \brief Soil decontamination problem where a contaminant infiltrates a fully
* water saturated medium.
......
// -*- 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 Soil decontamination problem where a contaminant infiltrates a fully
* water saturated medium.
*/
#ifndef DUMUX_LENS_1P2C_PROPERTIES_HH
#define DUMUX_LENS_1P2C_PROPERTIES_HH
#include <dune/grid/yaspgrid.hh>