Commit dbda0207 authored by Yue Wang's avatar Yue Wang Committed by Timo Koch
Browse files

[test][2p1c] Separate properties into their own header

parent b1139610
......@@ -24,7 +24,7 @@
#include <config.h>
#include "problem.hh"
#include "properties.hh"
#include <ctime>
#include <iostream>
......
......@@ -25,66 +25,13 @@
#ifndef DUMUX_STEAM_INJECTIONPROBLEM_HH
#define DUMUX_STEAM_INJECTIONPROBLEM_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/discretization/box.hh>
#include <dumux/porousmediumflow/2p1c/model.hh>
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/fluidsystems/2p1c.hh>
#include <dumux/material/components/tabulatedcomponent.hh>
#include <dumux/material/components/h2o.hh>
#include "spatialparams.hh"
namespace Dumux {
template <class TypeTag>
class InjectionProblem;
namespace Properties {
// Create new type tags
namespace TTag {
struct InjectionProblem { using InheritsFrom = std::tuple<TwoPOneCNI>; };
struct TwoPOneCNIBox { using InheritsFrom = std::tuple<InjectionProblem, BoxModel>; };
struct TwoPOneCNICCTpfa { using InheritsFrom = std::tuple<InjectionProblem, CCTpfaModel>; };
} // end namespace TTag
template<class TypeTag>
struct Grid<TypeTag, TTag::InjectionProblem> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::InjectionProblem> { using type = InjectionProblem<TypeTag>; };
// Set fluid configuration
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::InjectionProblem>
{
private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using H2OType = Dumux::Components::TabulatedComponent<Dumux::Components::H2O<Scalar> >;
public:
using type = Dumux::FluidSystems::TwoPOneC<Scalar, H2OType >;
};
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::InjectionProblem>
{
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = InjectionProblemSpatialParams<GridGeometry, Scalar>;
};
//Define whether spurious cold-water flow into the steam is blocked
template<class TypeTag>
struct UseBlockingOfSpuriousFlow<TypeTag, TTag::InjectionProblem> { static constexpr bool value = true; };
} // end namespace Properties
/*!
* \ingroup TwoPOneCTests
* \brief Non-isothermal 2D problem where steam is injected on the lower left side of the domain.
......
// -*- 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 vesion. *
* *
* 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 TwoPOneCTests
* \brief Non-isothermal steam injection test problem for the 2p1cni model.
*/
#ifndef DUMUX_STEAM_INJECTIONPROBLEM_PROPERTIES_HH
#define DUMUX_STEAM_INJECTIONPROBLEM_PROPERTIES_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/discretization/cctpfa.hh>
#include <dumux/discretization/box.hh>
#include <dumux/porousmediumflow/2p1c/model.hh>
#include <dumux/material/fluidsystems/2p1c.hh>
#include <dumux/material/components/tabulatedcomponent.hh>
#include <dumux/material/components/h2o.hh>
#include "problem.hh"
#include "spatialparams.hh"
namespace Dumux::Properties {
// Create new type tags
namespace TTag {
struct InjectionProblem { using InheritsFrom = std::tuple<TwoPOneCNI>; };
struct TwoPOneCNIBox { using InheritsFrom = std::tuple<InjectionProblem, BoxModel>; };
struct TwoPOneCNICCTpfa { using InheritsFrom = std::tuple<InjectionProblem, CCTpfaModel>; };
} // end namespace TTag
template<class TypeTag>
struct Grid<TypeTag, TTag::InjectionProblem> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::InjectionProblem> { using type = InjectionProblem<TypeTag>; };
// Set fluid configuration
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::InjectionProblem>
{
private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using H2OType = Dumux::Components::TabulatedComponent<Dumux::Components::H2O<Scalar> >;
public:
using type = Dumux::FluidSystems::TwoPOneC<Scalar, H2OType >;
};
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::InjectionProblem>
{
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = InjectionProblemSpatialParams<GridGeometry, Scalar>;
};
//Define whether spurious cold-water flow into the steam is blocked
template<class TypeTag>
struct UseBlockingOfSpuriousFlow<TypeTag, TTag::InjectionProblem> { static constexpr bool value = true; };
} // 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