Commit 9861ed46 authored by Maziar Veyskarami's avatar Maziar Veyskarami Committed by Timo Koch
Browse files

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

parent f68e001f
......@@ -14,5 +14,6 @@ dune_add_test(COMPILE_ONLY # the test produces different results due to the fing
install(FILES
convmixexercise.cc
convmixproblem.hh
convmixproperties.hh
convmixspatialparameters.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lecture/mm/convectivemixing)
......@@ -23,7 +23,7 @@
*/
#include <config.h>
#include "convmixproblem.hh"
#include "convmixproperties.hh"
#include <ctime>
#include <iostream>
......
......@@ -24,80 +24,16 @@
#ifndef DUMUX_CONVMIXING_PROBLEM_HH
#define DUMUX_CONVMIXING_PROBLEM_HH
#if HAVE_UG
#include <dune/grid/uggrid.hh>
#endif
#include <dune/grid/yaspgrid.hh>
#include <dumux/discretization/cctpfa.hh>
#include <dumux/discretization/ccmpfa.hh>
#include <dumux/discretization/box.hh>
#include <dumux/discretization/evalsolution.hh>
#include <dumux/discretization/evalgradients.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/brineco2.hh>
#include <dumux/material/binarycoefficients/brine_co2.hh>
#include <lecture/common/co2tablesbenchmark3.hh>
#include <dumux/material/fluidmatrixinteractions/diffusivityconstanttortuosity.hh>
#include <dumux/material/fluidsystems/1padapter.hh>
#include "convmixspatialparams.hh"
namespace Dumux {
template <class TypeTag>
class ConvmixProblem;
namespace Properties {
// Create new type tags
namespace TTag {
struct ConvmixTypeTag { using InheritsFrom = std::tuple<OnePNC>; };
struct ConvmixBoxTypeTag { using InheritsFrom = std::tuple<ConvmixTypeTag, BoxModel>; };
} // end namespace TTag
template<class TypeTag>
struct Grid<TypeTag, TTag::ConvmixTypeTag> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::ConvmixTypeTag> { using type = ConvmixProblem<TypeTag>; };
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::ConvmixTypeTag>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using BrineCO2 = FluidSystems::BrineCO2<Scalar, CO2TablesBenchmarkThree::CO2Tables,
Components::TabulatedComponent<Components::H2O<GetPropType<TypeTag, Properties::Scalar>>>,
FluidSystems::BrineCO2DefaultPolicy</*constantSalinity=*/true, /*simplified=*/true>>;
using type = FluidSystems::OnePAdapter<BrineCO2, BrineCO2::liquidPhaseIdx>;
};
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::ConvmixTypeTag>
{
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = ConvmixSpatialParams<FVGridGeometry, Scalar>;
};
template<class TypeTag>
struct EffectiveDiffusivityModel<TypeTag, TTag::ConvmixTypeTag>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = DiffusivityConstantTortuosity<Scalar>;
};
// Define whether mole(true) or mass (false) fractions are used
template<class TypeTag>
struct UseMoles<TypeTag, TTag::ConvmixTypeTag> { static constexpr bool value = true; };
}
/*!
* \brief Definition of a problem, for the 1pnc 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 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 component transport of nitrogen dissolved in the water phase.
*/
#ifndef DUMUX_CONVMIXING_PROPERTIES_HH
#define DUMUX_CONVMIXING_PROPERTIES_HH
#if HAVE_UG
#include <dune/grid/uggrid.hh>
#endif
#include <dune/grid/yaspgrid.hh>
#include <dumux/discretization/box.hh>
#include <dumux/porousmediumflow/1pnc/model.hh>
#include <dumux/material/fluidsystems/brineco2.hh>
#include <lecture/common/co2tablesbenchmark3.hh>
#include <dumux/material/fluidmatrixinteractions/diffusivityconstanttortuosity.hh>
#include <dumux/material/fluidsystems/1padapter.hh>
#include "convmixspatialparams.hh"
#include "convmixproblem.hh"
namespace Dumux::Properties {
// Create new type tags
namespace TTag {
struct ConvmixTypeTag { using InheritsFrom = std::tuple<OnePNC>; };
struct ConvmixBoxTypeTag { using InheritsFrom = std::tuple<ConvmixTypeTag, BoxModel>; };
} // end namespace TTag
template<class TypeTag>
struct Grid<TypeTag, TTag::ConvmixTypeTag> { using type = Dune::YaspGrid<2>; };
// Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::ConvmixTypeTag> { using type = ConvmixProblem<TypeTag>; };
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::ConvmixTypeTag>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using BrineCO2 = FluidSystems::BrineCO2<Scalar, CO2TablesBenchmarkThree::CO2Tables,
Components::TabulatedComponent<Components::H2O<GetPropType<TypeTag, Properties::Scalar>>>,
FluidSystems::BrineCO2DefaultPolicy</*constantSalinity=*/true, /*simplified=*/true>>;
using type = FluidSystems::OnePAdapter<BrineCO2, BrineCO2::liquidPhaseIdx>;
};
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::ConvmixTypeTag>
{
using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = ConvmixSpatialParams<FVGridGeometry, Scalar>;
};
template<class TypeTag>
struct EffectiveDiffusivityModel<TypeTag, TTag::ConvmixTypeTag>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = DiffusivityConstantTortuosity<Scalar>;
};
// Define whether mole(true) or mass (false) fractions are used
template<class TypeTag>
struct UseMoles<TypeTag, TTag::ConvmixTypeTag> { 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