Newer
Older
// -*- 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 The two-phase porousmediumflow properties file for exercise biomin
*/
#ifndef DUMUX_EXERCISE_FOUR_PROPERTIES_HH
#define DUMUX_EXERCISE_FOUR_PROPERTIES_HH
#include <dune/grid/yaspgrid.hh>
#include <dumux/discretization/cctpfa.hh>
#include <dumux/porousmediumflow/2pncmin/model.hh>
#include <dumux/porousmediumflow/problem.hh>
#include "solidsystems/biominsolidphase.hh" // The biomineralization solid system
#include "fluidsystems/biomin.hh" // The biomineralization fluid system
#include "components/co2tables.hh" //!< Provides the precalculated tabulated values of CO2 density and enthalpy.
#include "biominspatialparams.hh" // Spatially dependent parameters
#include "biominproblem.hh"
namespace Dumux {
namespace Properties {
//! Create new type tag for the problem
// Create new type tags
namespace TTag {
struct ExerciseFourBioMin { using InheritsFrom = std::tuple<TwoPNCMin>; };
struct ExerciseFourBioMinCCTpfa { using InheritsFrom = std::tuple<ExerciseFourBioMin, CCTpfaModel>; };
} // end namespace TTag
//! Set the problem property
template<class TypeTag>
struct Problem<TypeTag, TTag::ExerciseFourBioMin> { using type = BioMinProblem<TypeTag>; };
//! Set grid and the grid creator to be used
template<class TypeTag>
struct Grid<TypeTag, TTag::ExerciseFourBioMin> { using type = Dune::YaspGrid<2>; };
//! Set the fluid system type
template<class TypeTag>
struct FluidSystem<TypeTag, TTag::ExerciseFourBioMin>
{
private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using CO2Tables = Dumux::BioMinCO2Tables::CO2Tables;
using H2OType = Components::TabulatedComponent<Components::H2O<Scalar>>;
public:
using type = FluidSystems::BioMin<Scalar, CO2Tables, H2OType>;
};
template<class TypeTag>
struct SolidSystem<TypeTag, TTag::ExerciseFourBioMin>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using type = SolidSystems::BiominSolidPhase<Scalar>;
};
// Set the spatial parameters
template<class TypeTag>
struct SpatialParams<TypeTag, TTag::ExerciseFourBioMin> {
using MT = GetPropType<TypeTag, ModelTraits>;
static constexpr int numFluidComps = MT::numFluidComponents();
static constexpr int numActiveSolidComps = MT::numSolidComps() - MT::numInertSolidComps();
using type = BioMinSpatialparams<GetPropType<TypeTag, GridGeometry>, GetPropType<TypeTag, Scalar>, numFluidComps, numActiveSolidComps>;
};
template<class TypeTag>
struct EnableGridGeometryCache<TypeTag, TTag::ExerciseFourBioMin> { static constexpr bool value = true; };
template<class TypeTag>
struct EnableGridVolumeVariablesCache<TypeTag, TTag::ExerciseFourBioMin> { static constexpr bool value = true; };
template<class TypeTag>
struct EnableGridFluxVariablesCache<TypeTag, TTag::ExerciseFourBioMin> { static constexpr bool value = true; };
} // end namespace properties
} // end namespace Dumux
#endif