Commit 0ada245d authored by Maziar Veyskarami's avatar Maziar Veyskarami Committed by Timo Koch
Browse files

[lec-mm][henryproblem] move properties to properties header file

parent 30b80902
......@@ -30,7 +30,7 @@
#include <dune/common/timer.hh>
#include <dune/grid/io/file/dgfparser/dgfexception.hh>
#include "henry1p2cproblem.hh"
#include "henry1p2cproperties.hh"
#include <dumux/discretization/method.hh>
#include <dumux/common/properties.hh>
......
......@@ -24,56 +24,13 @@
#ifndef DUMUX_HENRY1P2C_PROBLEM_HH
#define DUMUX_HENRY1P2C_PROBLEM_HH
#include <dumux/discretization/box.hh>
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
#include <dumux/porousmediumflow/1pnc/model.hh>
#include <dumux/porousmediumflow/problem.hh>
#include <dune/grid/yaspgrid.hh>
#include "watersaltfluidsystem.hh"
#include "henry1p2cspatialparameters.hh"
#include "boxfickslawdispersion.hh"
namespace Dumux {
template <class TypeTag>
class Henry1p2cProblem;
namespace Properties {
// Create new type tags
namespace TTag {
struct Henry1p2cProblemTypeTag { using InheritsFrom = std::tuple<BoxModel, OnePNC>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::Henry1p2cProblemTypeTag> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::Henry1p2cProblemTypeTag> { using type = Henry1p2cProblem<TypeTag>; };
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::Henry1p2cProblemTypeTag> { using type = WaterSaltFluidSystem<TypeTag>; };
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::Henry1p2cProblemTypeTag>
{
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = Henry1p2cSpatialParams<FVGridGeometry, Scalar>;
};
//Define whether mole(true) or mass (false) fractions are used
template<class TypeTag>
struct UseMoles<TypeTag, TTag::Henry1p2cProblemTypeTag> { static constexpr bool value = false; };
template<class TypeTag>
struct MolecularDiffusionType<TypeTag, TTag::Henry1p2cProblemTypeTag> { using type = FicksLawDispersionImplementation<TypeTag, DiscretizationMethod::box, ReferenceSystemFormulation::massAveraged>; };
} // end namespace Properties
template <class TypeTag>
class Henry1p2cProblem : 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/>. *
*****************************************************************************/
/**
* \file
* \brief properties file for Henry exercise
*
*/
#ifndef DUMUX_HENRY1P2C_PROPERTIES_HH
#define DUMUX_HENRY1P2C_PROPERTIES_HH
#include <dumux/discretization/box.hh>
#include <dumux/porousmediumflow/1pnc/model.hh>
#include <dune/grid/yaspgrid.hh>
#include "watersaltfluidsystem.hh"
#include "henry1p2cspatialparameters.hh"
#include "boxfickslawdispersion.hh"
#include "henry1p2cproblem.hh"
namespace Dumux::Properties {
// Create new type tags
namespace TTag {
struct Henry1p2cProblemTypeTag { using InheritsFrom = std::tuple<BoxModel, OnePNC>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::Henry1p2cProblemTypeTag> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::Henry1p2cProblemTypeTag> { using type = Henry1p2cProblem<TypeTag>; };
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::Henry1p2cProblemTypeTag> { using type = WaterSaltFluidSystem<TypeTag>; };
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::Henry1p2cProblemTypeTag>
{
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = Henry1p2cSpatialParams<FVGridGeometry, Scalar>;
};
//Define whether mole(true) or mass (false) fractions are used
template<class TypeTag>
struct UseMoles<TypeTag, TTag::Henry1p2cProblemTypeTag> { static constexpr bool value = false; };
template<class TypeTag>
struct MolecularDiffusionType<TypeTag, TTag::Henry1p2cProblemTypeTag> { using type = FicksLawDispersionImplementation<TypeTag, DiscretizationMethod::box, ReferenceSystemFormulation::massAveraged>; };
} // end namespace Dumux::Properties
#endif
......@@ -44,7 +44,7 @@
#include <dumux/io/vtkoutputmodule.hh>
#include <dumux/io/grid/gridmanager.hh>
#include "henry2pproblem.hh"
#include "henry2pproperties.hh"
/*!
* \brief Provides an interface for customizing error messages associated with
......
......@@ -26,66 +26,13 @@
#ifndef DUMUX_HENRY2PPROBLEM_HH
#define DUMUX_HENRY2PPROBLEM_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh>
#include <dumux/material/components/simpleh2o.hh>
#include "simplesaltwater.hh"
#include <dumux/discretization/box.hh>
#include <dumux/porousmediumflow/2p/model.hh>
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/fluidsystems/2pimmiscible.hh>
#include <dumux/material/fluidsystems/h2on2.hh>
#include "henry2pspatialparams.hh"
namespace Dumux {
template <class TypeTag>
class Henry2pProblem;
//////////
// Specify the properties for the Henry2p problem
//////////
namespace Properties {
// Create new type tags
namespace TTag {
struct Henry2pProblemTypeTag { using InheritsFrom = std::tuple<BoxModel, TwoP>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::Henry2pProblemTypeTag> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::Henry2pProblemTypeTag> { using type = Henry2pProblem<TypeTag>; };
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::Henry2pProblemTypeTag>
{
private:
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = Henry2pSpatialParams<FVGridGeometry, Scalar>;
};
// Set the fluid system
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::Henry2pProblemTypeTag>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using WettingPhase = FluidSystems::OnePLiquid<Scalar, Components::SimpleH2O<Scalar> >;
using NonwettingPhase = FluidSystems::OnePLiquid<Scalar, SimpleSaltwater<Scalar> >;
using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>;
};
} // end namespace Properties
template <class TypeTag >
class Henry2pProblem : 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/>. *
*****************************************************************************/
/*!
* \file
*
* \brief Properties file of soil contamination problem where DNAPL infiltrates a fully
* water saturated medium.
*/
#ifndef DUMUX_HENRY2PPROPERTIES_HH
#define DUMUX_HENRY2PPROPERTIES_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/material/components/simpleh2o.hh>
#include "simplesaltwater.hh"
#include <dumux/discretization/box.hh>
#include <dumux/porousmediumflow/2p/model.hh>
#include <dumux/material/fluidsystems/2pimmiscible.hh>
#include <dumux/material/fluidsystems/h2on2.hh>
#include "henry2pspatialparams.hh"
#include "henry2pproblem.hh"
//////////
// Specify the properties for the Henry2p problem
//////////
namespace Dumux::Properties {
// Create new type tags
namespace TTag {
struct Henry2pProblemTypeTag { using InheritsFrom = std::tuple<BoxModel, TwoP>; };
} // end namespace TTag
// Set the grid type
template<class TypeTag>
struct Grid<TypeTag, TTag::Henry2pProblemTypeTag> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::Henry2pProblemTypeTag> { using type = Henry2pProblem<TypeTag>; };
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::Henry2pProblemTypeTag>
{
private:
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = Henry2pSpatialParams<FVGridGeometry, Scalar>;
};
// Set the fluid system
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::Henry2pProblemTypeTag>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using WettingPhase = FluidSystems::OnePLiquid<Scalar, Components::SimpleH2O<Scalar> >;
using NonwettingPhase = FluidSystems::OnePLiquid<Scalar, SimpleSaltwater<Scalar> >;
using type = FluidSystems::TwoPImmiscible<Scalar, WettingPhase, NonwettingPhase>;
};
} // 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