Commit 521239be authored by Timo Koch's avatar Timo Koch
Browse files

[test][md][poromechanics] Separate properties into header

parent 9cd17b21
......@@ -27,50 +27,19 @@
#include <dune/common/parallel/mpihelper.hh>
#include "problem_1p.hh"
#include "problem_poroelastic.hh"
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
#include <dumux/common/dumuxmessage.hh>
#include <dumux/assembly/diffmethod.hh>
#include <dumux/linear/seqsolverbackend.hh>
#include <dumux/multidomain/newtonsolver.hh>
#include <dumux/multidomain/fvassembler.hh>
#include <dumux/multidomain/traits.hh>
#include <dumux/geomechanics/poroelastic/couplingmanager.hh>
#include <dumux/io/vtkoutputmodule.hh>
#include <dumux/io/grid/gridmanager.hh>
#include <dumux/io/grid/gridmanager_yasp.hh>
// set the coupling manager property in the sub-problems
namespace Dumux {
namespace Properties {
template<class TypeTag>
struct CouplingManager<TypeTag, TTag::OnePSub>
{
private:
// define traits etc. as below in main
using Traits = MultiDomainTraits<TTag::OnePSub, TTag::PoroElasticSub>;
public:
using type = PoroMechanicsCouplingManager< Traits >;
};
template<class TypeTag>
struct CouplingManager<TypeTag, TTag::PoroElasticSub>
{
private:
// define traits etc. as below in main
using Traits = MultiDomainTraits<TTag::OnePSub, TTag::PoroElasticSub>;
public:
using type = PoroMechanicsCouplingManager< Traits >;
};
} // end namespace Properties
} // end namespace Dumux
#include "properties.hh"
int main(int argc, char** argv)
{
......
......@@ -25,56 +25,14 @@
#ifndef DUMUX_1P_SUB_PROBLEM_HH
#define DUMUX_1P_SUB_PROBLEM_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
#include <dumux/common/boundarytypes.hh>
#include <dumux/discretization/cctpfa.hh>
#include <dumux/porousmediumflow/1p/model.hh>
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/fluidsystems/1pliquid.hh>
#include <dumux/material/components/constant.hh>
#include "spatialparams_1p.hh"
#include <dumux/porousmediumflow/problem.hh>
namespace Dumux {
// forward declaration of the problem class
template <class TypeTag>
class OnePSubProblem;
namespace Properties {
// Create new type tags
namespace TTag {
struct OnePSub { using InheritsFrom = std::tuple<OneP, CCTpfaModel>; };
} // end namespace TTag
// The fluid phase consists of one constant component
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::OnePSub>
{
using type = Dumux::FluidSystems::OnePLiquid< GetPropType<TypeTag, Properties::Scalar>,
Dumux::Components::Constant<0, GetPropType<TypeTag, Properties::Scalar>> >;
};
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::OnePSub> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::OnePSub> { using type = OnePSubProblem<TypeTag> ; };
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::OnePSub>
{
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using CouplingManager = GetPropType<TypeTag, Properties::CouplingManager>;
using type = OnePSpatialParams<GridGeometry, Scalar, CouplingManager>;
};
} // end namespace Properties
/*!
* \ingroup PoromechanicsTests
* \brief The single-phase sub problem in the el1p coupled problem.
......
......@@ -25,53 +25,16 @@
#ifndef DUMUX_POROELASTIC_SUBPROBLEM_HH
#define DUMUX_POROELASTIC_SUBPROBLEM_HH
#include <dune/grid/yaspgrid.hh>
#include <dune/common/fmatrix.hh>
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
#include <dumux/common/boundarytypes.hh>
#include <dumux/discretization/box.hh>
#include <dumux/geomechanics/poroelastic/model.hh>
#include <dumux/geomechanics/fvproblem.hh>
#include <dumux/material/fluidsystems/1pliquid.hh>
#include <dumux/material/components/constant.hh>
#include "spatialparams_poroelastic.hh"
#include <dumux/geomechanics/fvproblem.hh>
namespace Dumux {
// forward declaration of the problem class
template <class TypeTag>
class PoroElasticSubProblem;
namespace Properties {
// Create new type tags
namespace TTag {
struct PoroElasticSub { using InheritsFrom = std::tuple<PoroElastic, BoxModel>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::PoroElasticSub> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::PoroElasticSub> { using type = Dumux::PoroElasticSubProblem<TypeTag>; };
// The fluid phase consists of one constant component
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::PoroElasticSub>
{
using type = Dumux::FluidSystems::OnePLiquid< GetPropType<TypeTag, Properties::Scalar>,
Dumux::Components::Constant<0, GetPropType<TypeTag, Properties::Scalar>> >;
};
// The spatial parameters property
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::PoroElasticSub>
{
using type = PoroElasticSpatialParams< GetPropType<TypeTag, Properties::Scalar>,
GetPropType<TypeTag, Properties::GridGeometry> >;
};
} // end namespace Properties
/*!
* \ingroup PoromechanicsTests
* \brief The poro-elastic sub-problem in the el1p coupled problem.
......
// -*- 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 PoromechanicsTests
* \brief Definition of the spatial parameters for the single-phase flow
* sub-problem in the coupled poro-mechanical el1p problem.
*/
#ifndef DUMUX_GEOMECHANICS_ELONEP_PROPERTIES_HH
#define DUMUX_GEOMECHANICS_ELONEP_PROPERTIES_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/discretization/cctpfa.hh>
#include <dumux/discretization/box.hh>
#include <dumux/geomechanics/poroelastic/model.hh>
#include <dumux/porousmediumflow/1p/model.hh>
#include <dumux/material/fluidsystems/1pliquid.hh>
#include <dumux/material/components/constant.hh>
#include <dumux/multidomain/traits.hh>
#include <dumux/geomechanics/poroelastic/couplingmanager.hh>
#include "spatialparams_1p.hh"
#include "spatialparams_poroelastic.hh"
#include "problem_1p.hh"
#include "problem_poroelastic.hh"
namespace Dumux::Properties {
// Create new type tags
namespace TTag {
struct OnePSub { using InheritsFrom = std::tuple<OneP, CCTpfaModel>; };
} // end namespace TTag
// The fluid phase consists of one constant component
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::OnePSub>
{
using type = Dumux::FluidSystems::OnePLiquid< GetPropType<TypeTag, Properties::Scalar>,
Dumux::Components::Constant<0, GetPropType<TypeTag, Properties::Scalar>> >;
};
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::OnePSub> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::OnePSub> { using type = OnePSubProblem<TypeTag> ; };
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::OnePSub>
{
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using CouplingManager = GetPropType<TypeTag, Properties::CouplingManager>;
using type = OnePSpatialParams<GridGeometry, Scalar, CouplingManager>;
};
// Create new type tags
namespace TTag {
struct PoroElasticSub { using InheritsFrom = std::tuple<PoroElastic, BoxModel>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::PoroElasticSub> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::PoroElasticSub> { using type = Dumux::PoroElasticSubProblem<TypeTag>; };
// The fluid phase consists of one constant component
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::PoroElasticSub>
{
using type = Dumux::FluidSystems::OnePLiquid< GetPropType<TypeTag, Properties::Scalar>,
Dumux::Components::Constant<0, GetPropType<TypeTag, Properties::Scalar>> >;
};
// The spatial parameters property
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::PoroElasticSub>
{
using type = PoroElasticSpatialParams< GetPropType<TypeTag, Properties::Scalar>,
GetPropType<TypeTag, Properties::GridGeometry> >;
};
template<class TypeTag>
struct CouplingManager<TypeTag, TTag::OnePSub>
{
private:
// define traits etc. as below in main
using Traits = MultiDomainTraits<TTag::OnePSub, TTag::PoroElasticSub>;
public:
using type = PoroMechanicsCouplingManager< Traits >;
};
template<class TypeTag>
struct CouplingManager<TypeTag, TTag::PoroElasticSub>
{
private:
// define traits etc. as below in main
using Traits = MultiDomainTraits<TTag::OnePSub, TTag::PoroElasticSub>;
public:
using type = PoroMechanicsCouplingManager< Traits >;
};
} // end namespace Dumux::Properties
#endif
......@@ -23,56 +23,24 @@
*/
#include <config.h>
#include <ctime>
#include <iostream>
#include <dune/common/parallel/mpihelper.hh>
#include <dune/common/timer.hh>
#include "problem_2p.hh"
#include "problem_poroelastic.hh"
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
#include <dumux/common/dumuxmessage.hh>
#include <dumux/assembly/diffmethod.hh>
#include <dumux/linear/seqsolverbackend.hh>
#include <dumux/multidomain/newtonsolver.hh>
#include <dumux/multidomain/fvassembler.hh>
#include <dumux/multidomain/traits.hh>
#include <dumux/geomechanics/poroelastic/couplingmanager.hh>
#include <dumux/io/vtkoutputmodule.hh>
#include <dumux/io/grid/gridmanager.hh>
#include <dumux/io/grid/gridmanager_yasp.hh>
// set the coupling manager property in the sub-problems
namespace Dumux {
namespace Properties {
template<class TypeTag>
struct CouplingManager<TypeTag, TTag::TwoPSub>
{
private:
// define traits etc. as below in main
using Traits = MultiDomainTraits<Properties::TTag::TwoPSub, Properties::TTag::PoroElasticSub>;
public:
using type = PoroMechanicsCouplingManager< Traits >;
};
template<class TypeTag>
struct CouplingManager<TypeTag, TTag::PoroElasticSub>
{
private:
// define traits etc. as below in main
using Traits = MultiDomainTraits<Properties::TTag::TwoPSub, Properties::TTag::PoroElasticSub>;
public:
using type = PoroMechanicsCouplingManager< Traits >;
};
} // end namespace Properties
} // end namespace Dumux
#include "properties.hh"
int main(int argc, char** argv)
{
......
......@@ -26,56 +26,14 @@
#ifndef DUMUX_2P_SUB_PROBLEM_HH
#define DUMUX_2P_SUB_PROBLEM_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/common/boundarytypes.hh>
#include <dumux/discretization/cctpfa.hh>
#include <dumux/porousmediumflow/2p/model.hh>
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/fluidsystems/brineco2.hh>
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
#include "spatialparams_2p.hh"
#include "co2tables_el2p.hh"
#include <dumux/porousmediumflow/problem.hh>
namespace Dumux {
// forward declaration of the problem class
template <class TypeTag>
class TwoPSubProblem;
namespace Properties {
// Create new type tags
namespace TTag {
struct TwoPSub { using InheritsFrom = std::tuple<TwoP, CCTpfaModel>; };
} // end namespace TTag
// Set the fluid system for TwoPSubProblem
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::TwoPSub>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = FluidSystems::BrineCO2<Scalar, El2P::CO2Tables>;
};
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::TwoPSub> { using type = Dune::YaspGrid<3>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::TwoPSub> { using type = TwoPSubProblem<TypeTag> ; };
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::TwoPSub>
{
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using CouplingManager = GetPropType<TypeTag, Properties::CouplingManager>;
using type = TwoPSpatialParams<GridGeometry, Scalar, CouplingManager>;
};
} // end namespace Properties
/*!
* \ingroup PoromechanicsTests
* \brief The two-phase sub problem in the el2p coupled problem.
......
......@@ -24,55 +24,16 @@
#ifndef DUMUX_POROELASTIC_SUBPROBLEM_HH
#define DUMUX_POROELASTIC_SUBPROBLEM_HH
#include <dune/grid/yaspgrid.hh>
#include <dune/common/fmatrix.hh>
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
#include <dumux/common/boundarytypes.hh>
#include <dumux/discretization/box.hh>
#include <dumux/geomechanics/poroelastic/model.hh>
#include <dumux/geomechanics/fvproblem.hh>
#include <dumux/material/fluidsystems/brineco2.hh>
#include "spatialparams_poroelastic.hh"
#include "co2tables_el2p.hh"
#include <dumux/geomechanics/fvproblem.hh>
namespace Dumux {
// forward declaration of the problem class
template <class TypeTag>
class PoroElasticSubProblem;
namespace Properties {
// Create new type tags
namespace TTag {
struct PoroElasticSub { using InheritsFrom = std::tuple<PoroElastic, BoxModel>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::PoroElasticSub> { using type = Dune::YaspGrid<3>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::PoroElasticSub> { using type = Dumux::PoroElasticSubProblem<TypeTag>; };
// Set the fluid system for TwoPSubProblem
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::PoroElasticSub>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = FluidSystems::BrineCO2<Scalar, El2P::CO2Tables>;
};
// The spatial parameters property
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::PoroElasticSub>
{
using type = PoroElasticSpatialParams< GetPropType<TypeTag, Properties::Scalar>,
GetPropType<TypeTag, Properties::GridGeometry> >;
};
} // end namespace Properties
/*!
* \ingroup PoromechanicsTests
* \brief The poro-elastic sub-problem in the el2p coupled problem.
......
// -*- 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 PoromechanicsTests
* \brief Definition of the spatial parameters for the two-phase flow
* sub-problem in the coupled poro-mechanical elp problem.
*/
#ifndef DUMUX_GEOMECHANICS_ELTWOP_PROPERTIES_HH
#define DUMUX_GEOMECHANICS_ELTWOP_PROPERTIES_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/discretization/cctpfa.hh>
#include <dumux/discretization/box.hh>
#include <dumux/porousmediumflow/2p/model.hh>
#include <dumux/geomechanics/poroelastic/model.hh>
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/fluidsystems/brineco2.hh>
#include <dumux/multidomain/traits.hh>
#include <dumux/geomechanics/poroelastic/couplingmanager.hh>
#include "spatialparams_2p.hh"
#include "spatialparams_poroelastic.hh"
#include "problem_2p.hh"
#include "problem_poroelastic.hh"
#include "co2tables_el2p.hh"
namespace Dumux::Properties {
// Create new type tags
namespace TTag {
struct TwoPSub { using InheritsFrom = std::tuple<TwoP, CCTpfaModel>; };
} // end namespace TTag
// Set the fluid system for TwoPSubProblem
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::TwoPSub>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = FluidSystems::BrineCO2<Scalar, El2P::CO2Tables>;
};
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::TwoPSub> { using type = Dune::YaspGrid<3>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::TwoPSub> { using type = TwoPSubProblem<TypeTag> ; };
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::TwoPSub>
{
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using CouplingManager = GetPropType<TypeTag, Properties::CouplingManager>;
using type = TwoPSpatialParams<GridGeometry, Scalar, CouplingManager>;
};
// Create new type tags
namespace TTag {
struct PoroElasticSub { using InheritsFrom = std::tuple<PoroElastic, BoxModel>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::PoroElasticSub> { using type = Dune::YaspGrid<3>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::PoroElasticSub> { using type = Dumux::PoroElasticSubProblem<TypeTag>; };
// Set the fluid system for TwoPSubProblem
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::PoroElasticSub>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = FluidSystems::BrineCO2<Scalar, El2P::CO2Tables>;
};
// The spatial parameters property
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::PoroElasticSub>
{
using type = PoroElasticSpatialParams< GetPropType<TypeTag, Properties::Scalar>,
GetPropType<TypeTag, Properties::GridGeometry> >;
};
template<class TypeTag>
struct CouplingManager<TypeTag, TTag::TwoPSub>
{
private:
// define traits etc. as below in main
using Traits = MultiDomainTraits<Properties::TTag::TwoPSub, Properties::TTag::PoroElasticSub>;
public:
using type = PoroMechanicsCouplingManager< Traits >;
};
template<class TypeTag>