Commit 40c8f8d3 authored by Mathis Kelm's avatar Mathis Kelm Committed by Timo Koch
Browse files

[test][co2] Separate properties into their own header

parent 478994fa
......@@ -22,13 +22,11 @@
* \brief Test for the two-phase two-component CC model.
*/
#include <config.h>
#include <ctime>
#include <iostream>
#include <dune/common/parallel/mpihelper.hh>
#include <dune/common/timer.hh>
#include <dune/grid/io/file/vtk.hh>
#include <dune/istl/io.hh>
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
......@@ -39,15 +37,11 @@
#include <dumux/nonlinear/newtonsolver.hh>
#include <dumux/assembly/fvassembler.hh>
#include <dumux/assembly/diffmethod.hh>
#include <dumux/discretization/method.hh>
#include <dumux/io/vtkoutputmodule.hh>
#include <dumux/io/grid/gridmanager.hh>
#include <dumux/io/grid/gridmanager_alu.hh>
// the problem definitions
#include "problem.hh"
#include "properties.hh"
int main(int argc, char** argv)
{
......@@ -170,4 +164,4 @@ int main(int argc, char** argv)
}
return 0;
} // end main
}
......@@ -25,115 +25,22 @@
#ifndef DUMUX_HETEROGENEOUS_PROBLEM_HH
#define DUMUX_HETEROGENEOUS_PROBLEM_HH
#if HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
#endif
#include <dune/grid/common/partitionset.hh>
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
#include <dumux/common/boundarytypes.hh>
#include <dumux/discretization/cctpfa.hh>
#include <dumux/discretization/box.hh>
#include <dumux/parallel/vectorcommdatahandle.hh>
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/porousmediumflow/co2/model.hh>
#include <dumux/material/components/tabulatedcomponent.hh>
#include <dumux/material/components/h2o.hh>
#include <dumux/material/fluidsystems/brineco2.hh>
#include <dumux/discretization/box/scvftoscvboundarytypes.hh>
#include <dumux/material/components/co2.hh>
#include "spatialparams.hh"
#include "co2tables.hh"
// per default use isothermal model
#ifndef ISOTHERMAL
#define ISOTHERMAL 1
#endif
namespace Dumux {
template <class TypeTag>
class HeterogeneousProblem;
namespace Properties {
// Create new type tags
namespace TTag {
struct Heterogeneous { using InheritsFrom = std::tuple<TwoPTwoCCO2>; };
struct HeterogeneousBox { using InheritsFrom = std::tuple<Heterogeneous, BoxModel>; };
struct HeterogeneousCCTpfa { using InheritsFrom = std::tuple<Heterogeneous, CCTpfaModel>; };
} // end namespace TTag
//Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::Heterogeneous> { using type = Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::Heterogeneous> { using type = HeterogeneousProblem<TypeTag>; };
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::Heterogeneous>
{
using type = HeterogeneousSpatialParams<GetPropType<TypeTag, Properties::GridGeometry>,
GetPropType<TypeTag, Properties::Scalar>>;
};
// Set fluid configuration
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::Heterogeneous>
{
using type = FluidSystems::BrineCO2<GetPropType<TypeTag, Properties::Scalar>,
HeterogeneousCO2Tables::CO2Tables,
Components::TabulatedComponent<Components::H2O<GetPropType<TypeTag, Properties::Scalar>>>,
FluidSystems::BrineCO2DefaultPolicy</*constantSalinity=*/true, /*simpleButFast=*/true>>;
};
// Use Moles
template<class TypeTag>
struct UseMoles<TypeTag, TTag::Heterogeneous> { static constexpr bool value = false; };
#if !ISOTHERMAL
// Create new type tags
namespace TTag {
struct HeterogeneousNI { using InheritsFrom = std::tuple<TwoPTwoCCO2NI>; };
struct HeterogeneousNIBox { using InheritsFrom = std::tuple<HeterogeneousNI, BoxModel>; };
struct HeterogeneousNICCTpfa { using InheritsFrom = std::tuple<HeterogeneousNI, CCTpfaModel>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::HeterogeneousNI> { using type = Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::HeterogeneousNI> { using type = HeterogeneousProblem<TypeTag>; };
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::HeterogeneousNI>
{
using type = HeterogeneousSpatialParams<GetPropType<TypeTag, Properties::GridGeometry>,
GetPropType<TypeTag, Properties::Scalar>>;
};
// Set fluid configuration
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::HeterogeneousNI>
{
using type = FluidSystems::BrineCO2<GetPropType<TypeTag, Properties::Scalar>,
HeterogeneousCO2Tables::CO2Tables,
Components::TabulatedComponent<Components::H2O<GetPropType<TypeTag, Properties::Scalar>>>,
FluidSystems::BrineCO2DefaultPolicy</*constantSalinity=*/true, /*simpleButFast=*/true>>;
};
// Use Moles
template<class TypeTag>
struct UseMoles<TypeTag, TTag::HeterogeneousNI> { static constexpr bool value = false; };
#endif
} // end namespace Properties
/*!
* \ingroup CO2Tests
* \brief Definition of a problem, where CO2 is injected in a reservoir.
......
// -*- 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 CO2Tests
* \brief The properties of a problem, where CO2 is injected in a reservoir.
*/
#ifndef DUMUX_HETEROGENEOUS_PROPERTIES_HH
#define DUMUX_HETEROGENEOUS_PROPERTIES_HH
#include <dune/alugrid/grid.hh>
#include <dumux/discretization/cctpfa.hh>
#include <dumux/discretization/box.hh>
#include <dumux/porousmediumflow/co2/model.hh>
#include <dumux/material/components/tabulatedcomponent.hh>
#include <dumux/material/components/h2o.hh>
#include <dumux/material/fluidsystems/brineco2.hh>
// per default use isothermal model
#ifndef ISOTHERMAL
#define ISOTHERMAL 1
#endif
#include "problem.hh"
#include "spatialparams.hh"
#include "co2tables.hh"
namespace Dumux::Properties {
// Create new type tags
namespace TTag {
struct Heterogeneous { using InheritsFrom = std::tuple<TwoPTwoCCO2>; };
struct HeterogeneousBox { using InheritsFrom = std::tuple<Heterogeneous, BoxModel>; };
struct HeterogeneousCCTpfa { using InheritsFrom = std::tuple<Heterogeneous, CCTpfaModel>; };
} // end namespace TTag
//Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::Heterogeneous> { using type = Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::Heterogeneous> { using type = HeterogeneousProblem<TypeTag>; };
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::Heterogeneous>
{
using type = HeterogeneousSpatialParams<GetPropType<TypeTag, Properties::GridGeometry>,
GetPropType<TypeTag, Properties::Scalar>>;
};
// Set fluid configuration
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::Heterogeneous>
{
using type = FluidSystems::BrineCO2<GetPropType<TypeTag, Properties::Scalar>,
HeterogeneousCO2Tables::CO2Tables,
Components::TabulatedComponent<Components::H2O<GetPropType<TypeTag, Properties::Scalar>>>,
FluidSystems::BrineCO2DefaultPolicy</*constantSalinity=*/true, /*simpleButFast=*/true>>;
};
// Use Moles
template<class TypeTag>
struct UseMoles<TypeTag, TTag::Heterogeneous> { static constexpr bool value = false; };
#if !ISOTHERMAL
// Create new type tags
namespace TTag {
struct HeterogeneousNI { using InheritsFrom = std::tuple<TwoPTwoCCO2NI>; };
struct HeterogeneousNIBox { using InheritsFrom = std::tuple<HeterogeneousNI, BoxModel>; };
struct HeterogeneousNICCTpfa { using InheritsFrom = std::tuple<HeterogeneousNI, CCTpfaModel>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::HeterogeneousNI> { using type = Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::HeterogeneousNI> { using type = HeterogeneousProblem<TypeTag>; };
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::HeterogeneousNI>
{
using type = HeterogeneousSpatialParams<GetPropType<TypeTag, Properties::GridGeometry>,
GetPropType<TypeTag, Properties::Scalar>>;
};
// Set fluid configuration
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::HeterogeneousNI>
{
using type = FluidSystems::BrineCO2<GetPropType<TypeTag, Properties::Scalar>,
HeterogeneousCO2Tables::CO2Tables,
Components::TabulatedComponent<Components::H2O<GetPropType<TypeTag, Properties::Scalar>>>,
FluidSystems::BrineCO2DefaultPolicy</*constantSalinity=*/true, /*simpleButFast=*/true>>;
};
// Use Moles
template<class TypeTag>
struct UseMoles<TypeTag, TTag::HeterogeneousNI> { static constexpr bool value = false; };
#endif
} // end namespace Dumux::Properties
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment