Commit fd9e9f33 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[md][facet] add explicit tracer transport test

parent 0bc2d4ae
add_subdirectory(1p_1p)
add_subdirectory(tracer_tracer)
dune_symlink_to_source_files(FILES "grid.msh" "grid2.msh" "test_gridmanager.input" "test_vertexmapper.input" "test_couplingmapper_boundary.input" "2d_grid.msh" "3d_grid.msh")
......
dune_symlink_to_source_files(FILES "grids" "params.input")
dune_add_test(NAME test_md_facet_tracertracer_tpfa
LABELS multidomain
SOURCES main.cc
COMPILE_DEFINITIONS ONEPBULKTYPETAG=OnePBulkTpfa
COMPILE_DEFINITIONS ONEPLOWDIMTYPETAG=OnePLowDimTpfa
COMPILE_DEFINITIONS TRACERBULKTYPETAG=TracerBulkTpfa
COMPILE_DEFINITIONS TRACERLOWDIMTYPETAG=TracerLowDimTpfa
CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_md_facet_tracertracer_tpfa_onep_bulk-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_tracertracer_tpfa_onep_bulk-00000.vtu
${CMAKE_SOURCE_DIR}/test/references/test_md_facet_tracertracer_tpfa_onep_lowdim-reference.vtp
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_tracertracer_tpfa_onep_lowdim-00000.vtp
${CMAKE_SOURCE_DIR}/test/references/test_md_facet_tracertracer_tpfa_tracer_bulk-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_tracertracer_tpfa_tracer_bulk-00010.vtu
${CMAKE_SOURCE_DIR}/test/references/test_md_facet_tracertracer_tpfa_tracer_lowdim-reference.vtp
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_tracertracer_tpfa_tracer_lowdim-00010.vtp
--command "${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_tracertracer_tpfa params.input \
-Vtk.OutputName test_md_facet_tracertracer_tpfa")
dune_add_test(NAME test_md_facet_tracertracer_box
LABELS multidomain
SOURCES main.cc
COMPILE_DEFINITIONS ONEPBULKTYPETAG=OnePBulkBox
COMPILE_DEFINITIONS ONEPLOWDIMTYPETAG=OnePLowDimBox
COMPILE_DEFINITIONS TRACERBULKTYPETAG=TracerBulkBox
COMPILE_DEFINITIONS TRACERLOWDIMTYPETAG=TracerLowDimBox
CMAKE_GUARD "( dune-foamgrid_FOUND AND dune-alugrid_FOUND )"
COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py
CMD_ARGS --script fuzzy
--files ${CMAKE_SOURCE_DIR}/test/references/test_md_facet_tracertracer_box_onep_bulk-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_tracertracer_box_onep_bulk-00000.vtu
${CMAKE_SOURCE_DIR}/test/references/test_md_facet_tracertracer_box_onep_lowdim-reference.vtp
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_tracertracer_box_onep_lowdim-00000.vtp
${CMAKE_SOURCE_DIR}/test/references/test_md_facet_tracertracer_box_tracer_bulk-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_tracertracer_box_tracer_bulk-00010.vtu
${CMAKE_SOURCE_DIR}/test/references/test_md_facet_tracertracer_box_tracer_lowdim-reference.vtp
${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_tracertracer_box_tracer_lowdim-00010.vtp
--command "${CMAKE_CURRENT_BINARY_DIR}/test_md_facet_tracertracer_box params.input \
-Vtk.OutputName test_md_facet_tracertracer_box")
set(CMAKE_BUILD_TYPE Release)
#install sources
install(FILES
main.cc
problem_1p_bulk.hh
problem_1p_lowdim.hh
problem_tracer_bulk.hh
problem_tracer_lowdim.hh
spatialparams_1p.hh
spatialparams_tracer.hh
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/dumux/test/multidomain/facet/tracer_tracer)
This diff is collapsed.
This diff is collapsed.
[TimeLoop]
TEnd = 5e4
Dt = 100
[Problem]
EnableGravity = false
FractureAperture = 0.1
BoundaryOverpressure = 1e4
ContaminationMassFraction = 1e-2
[Grid]
File = ./grids/durlofsky.msh
[Bulk]
OneP.Problem.Name = onep_bulk
Tracer.Problem.Name = tracer_bulk
SpatialParams.Permeability = 1e-12
SpatialParams.Porosity = 0.2
[LowDim]
OneP.Problem.Name = onep_lowdim
Tracer.Problem.Name = tracer_lowdim
SpatialParams.Permeability = 1e-9
SpatialParams.Porosity = 0.9
[Vtk]
OutputName = test_md_facet_tracertracer
[Assembly]
NumericDifference.BaseEpsilon = 1e10
// -*- 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
* \ingroup MultiDomain
* \ingroup FacetCoupling
* \brief The problem for the bulk domain of the single-phase problem
* within the tracer facet coupling test
*/
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_TRACER_ONEP_BULKPROBLEM_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_TRACER_ONEP_BULKPROBLEM_HH
#include <dune/alugrid/grid.hh>
#include <dumux/material/components/simpleh2o.hh>
#include <dumux/material/fluidsystems/1pliquid.hh>
#include <dumux/multidomain/facet/box/properties.hh>
#include <dumux/multidomain/facet/cellcentered/tpfa/properties.hh>
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/porousmediumflow/1p/model.hh>
#include "spatialparams_1p.hh"
namespace Dumux {
// forward declarations
template<class TypeTag> class OnePBulkProblem;
namespace Properties {
// create the type tag nodes
NEW_TYPE_TAG(OnePBulk, INHERITS_FROM(OneP));
NEW_TYPE_TAG(OnePBulkTpfa, INHERITS_FROM(OnePBulk, CCTpfaFacetCouplingModel));
NEW_TYPE_TAG(OnePBulkBox, INHERITS_FROM(OnePBulk, BoxFacetCouplingModel));
// Set the grid type
SET_TYPE_PROP(OnePBulk, Grid, Dune::ALUGrid<2, 2, Dune::simplex, Dune::conforming>);
// Set the problem type
SET_TYPE_PROP(OnePBulk, Problem, OnePBulkProblem<TypeTag>);
// set the spatial params
SET_TYPE_PROP(OnePBulk, SpatialParams, OnePSpatialParams< typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar) >);
// the fluid system
SET_PROP(OnePBulk, FluidSystem)
{
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
public:
using type = FluidSystems::OnePLiquid< Scalar, Components::SimpleH2O<Scalar> >;
};
} // end namespace Properties
/*!
* \ingroup MultiDomain
* \ingroup OnePTests
* \brief The problem for the bulk domain of the single-phase problem
* within the tracer facet coupling test
*/
template<class TypeTag>
class OnePBulkProblem : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridVariables = typename GET_PROP_TYPE(TypeTag, GridVariables);
using PrimaryVariables = typename GridVariables::PrimaryVariables;
using Scalar = typename GridVariables::Scalar;
using FVGridGeometry = typename GridVariables::GridGeometry;
using FVElementGeometry = typename FVGridGeometry::LocalView;
using SubControlVolume = typename FVGridGeometry::SubControlVolume;
using SubControlVolumeFace = typename FVGridGeometry::SubControlVolumeFace;
using GridView = typename FVGridGeometry::GridView;
using Element = typename GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
using CouplingManager = typename GET_PROP_TYPE(TypeTag, CouplingManager);
using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices;
public:
OnePBulkProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
std::shared_ptr<typename ParentType::SpatialParams> spatialParams,
std::shared_ptr<CouplingManager> couplingManager,
const std::string& paramGroup = "")
: ParentType(fvGridGeometry, spatialParams, paramGroup)
, couplingManagerPtr_(couplingManager)
, overPressure_(getParamFromGroup<Scalar>(paramGroup, "Problem.BoundaryOverpressure"))
{
problemName_ = getParamFromGroup<std::string>(this->paramGroup(), "Vtk.OutputName") + "_" +
getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name");
}
//! The problem name.
const std::string& name() const
{ return problemName_; }
//! Specifies the type of boundary condition at a given position
BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
{
BoundaryTypes values;
values.setAllNeumann();
if (globalPos[0] < 1e-6 || globalPos[0] > this->fvGridGeometry().bBoxMax()[0] - 1e-6)
values.setAllDirichlet();
return values;
}
//! Specifies the type of interior boundary condition at a given position
BoundaryTypes interiorBoundaryTypes(const Element& element, const SubControlVolumeFace& scvf) const
{
BoundaryTypes values;
values.setAllNeumann();
return values;
}
//! Evaluate the source term at a given position
NumEqVector sourceAtPos(const GlobalPosition& globalPos) const
{ return NumEqVector(0.0); }
//! evaluates the Dirichlet boundary condition for a given position
PrimaryVariables dirichletAtPos(const GlobalPosition& globalPos) const
{
auto values = initialAtPos(globalPos);
if (globalPos[0] < 1e-6)
values[Indices::pressureIdx] += overPressure_;
return values;
}
//! evaluates the Neumann boundary condition for a boundary segment
template<class ElementVolumeVariables>
NumEqVector neumann(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const SubControlVolumeFace& scvf) const
{ return NumEqVector(0.0); }
//! evaluate the initial conditions
PrimaryVariables initialAtPos(const GlobalPosition& globalPos) const
{ return PrimaryVariables(1.0e5); }
//! returns the temperature in \f$\mathrm{[K]}\f$ in the domain
Scalar temperature() const
{ return 283.15; /*10°*/ }
//! returns reference to the coupling manager.
const CouplingManager& couplingManager() const
{ return *couplingManagerPtr_; }
private:
std::shared_ptr<CouplingManager> couplingManagerPtr_;
Scalar overPressure_;
std::string problemName_;
};
} // end namespace Dumux
#endif
// -*- 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
* \ingroup MultiDomain
* \ingroup FacetCoupling
* \brief The problem for the facet domain of the single-phase problem
* within the tracer facet coupling test
*/
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_TRACER_ONEP_LOWDIMPROBLEM_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_TRACER_ONEP_LOWDIMPROBLEM_HH
#include <dune/foamgrid/foamgrid.hh>
#include <dumux/material/components/simpleh2o.hh>
#include <dumux/material/fluidsystems/1pliquid.hh>
#include <dumux/discretization/box/properties.hh>
#include <dumux/discretization/cellcentered/tpfa/properties.hh>
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/porousmediumflow/1p/model.hh>
#include "spatialparams_1p.hh"
namespace Dumux {
// forward declarations
template<class TypeTag> class OnePLowDimProblem;
namespace Properties {
// create the type tag nodes
NEW_TYPE_TAG(OnePLowDim, INHERITS_FROM(OneP));
NEW_TYPE_TAG(OnePLowDimTpfa, INHERITS_FROM(CCTpfaModel, OnePLowDim));
NEW_TYPE_TAG(OnePLowDimBox, INHERITS_FROM(BoxModel, OnePLowDim));
// Set the grid type
SET_TYPE_PROP(OnePLowDim, Grid, Dune::FoamGrid<1, 2>);
// Set the problem type
SET_TYPE_PROP(OnePLowDim, Problem, OnePLowDimProblem<TypeTag>);
// set the spatial params
SET_TYPE_PROP(OnePLowDim, SpatialParams, OnePSpatialParams< typename GET_PROP_TYPE(TypeTag, FVGridGeometry),
typename GET_PROP_TYPE(TypeTag, Scalar) >);
// the fluid system
SET_PROP(OnePLowDim, FluidSystem)
{
private:
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
public:
using type = FluidSystems::OnePLiquid< Scalar, Components::SimpleH2O<Scalar> >;
};
} // end namespace Properties
/*!
* \ingroup OnePTests
* \brief The problem for the facet domain of the single-phase problem
* within the tracer facet coupling test
*/
template<class TypeTag>
class OnePLowDimProblem : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridVariables = typename GET_PROP_TYPE(TypeTag, GridVariables);
using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView;
using PrimaryVariables = typename GridVariables::PrimaryVariables;
using Scalar = typename GridVariables::Scalar;
using FVGridGeometry = typename GridVariables::GridGeometry;
using FVElementGeometry = typename FVGridGeometry::LocalView;
using SubControlVolume = typename FVGridGeometry::SubControlVolume;
using GridView = typename FVGridGeometry::GridView;
using Element = typename GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
using CouplingManager = typename GET_PROP_TYPE(TypeTag, CouplingManager);
using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices;
public:
OnePLowDimProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry,
std::shared_ptr<typename ParentType::SpatialParams> spatialParams,
std::shared_ptr<CouplingManager> couplingManager,
const std::string& paramGroup = "")
: ParentType(fvGridGeometry, spatialParams, paramGroup)
, couplingManagerPtr_(couplingManager)
, aperture_(getParamFromGroup<Scalar>(paramGroup, "Problem.FractureAperture"))
{
problemName_ = getParamFromGroup<std::string>(this->paramGroup(), "Vtk.OutputName") + "_" +
getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name");
}
//! The problem name.
const std::string& name() const
{ return problemName_; }
//! Specifies the type of boundary condition at a given position
BoundaryTypes boundaryTypesAtPos(const GlobalPosition& globalPos) const
{
BoundaryTypes values;
values.setAllNeumann();
return values;
}
//! Evaluate the source term at a given position
NumEqVector source(const Element& element,
const FVElementGeometry& fvGeometry,
const ElementVolumeVariables& elemVolVars,
const SubControlVolume& scv) const
{
// evaluate sources from bulk domain
auto source = couplingManagerPtr_->evalSourcesFromBulk(element, fvGeometry, elemVolVars, scv);
source /= scv.volume()*elemVolVars[scv].extrusionFactor();
return source;
}
//! evaluates the Dirichlet boundary condition for a given position
PrimaryVariables dirichletAtPos(const GlobalPosition& globalPos) const
{ return initialAtPos(globalPos); }
//! Set the aperture as extrusion factor.
Scalar extrusionFactorAtPos(const GlobalPosition& globalPos) const
{ return aperture_; }
//! evaluate the initial conditions
PrimaryVariables initialAtPos(const GlobalPosition& globalPos) const
{ return PrimaryVariables(1.0e5); }
//! returns the temperature in \f$\mathrm{[K]}\f$ in the domain
Scalar temperature() const
{ return 283.15; /*10°*/ }
//! returns reference to the coupling manager.
const CouplingManager& couplingManager() const
{ return *couplingManagerPtr_; }
private:
std::shared_ptr<CouplingManager> couplingManagerPtr_;
Scalar aperture_;
std::string problemName_;
};
} // end namespace Dumux
#endif
// -*- 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
* \ingroup TracerTests
* \brief The problem for the bulk domain of the tracer facet coupling test
*/
#ifndef DUMUX_TEST_TPFAFACETCOUPLING_TRACER_BULK_PROBLEM_HH
#define DUMUX_TEST_TPFAFACETCOUPLING_TRACER_BULK_PROBLEM_HH
#include <dune/alugrid/grid.hh>
#include <dumux/multidomain/facet/box/properties.hh>
#include <dumux/multidomain/facet/cellcentered/tpfa/properties.hh>
#include <dumux/porousmediumflow/tracer/model.hh>
#include <dumux/porousmediumflow/problem.hh>
#include <dumux/material/fluidsystems/base.hh>
#include "spatialparams_tracer.hh"
#include "tracerfluidsystem.hh"
#include "tracermodeltraits.hh"
namespace Dumux {
template <class TypeTag>
class TracerBulkProblem;
namespace Properties {
NEW_TYPE_TAG(TracerTestBulk, INHERITS_FROM(Tracer));
// define the type tags
NEW_TYPE_TAG(TracerBulkTpfa, INHERITS_FROM(TracerTestBulk, CCTpfaFacetCouplingModel));
NEW_TYPE_TAG(TracerBulkBox, INHERITS_FROM(TracerTestBulk, BoxFacetCouplingModel));
// Set the grid type
SET_TYPE_PROP(TracerTestBulk, Grid, Dune::ALUGrid<2, 2, Dune::simplex, Dune::conforming>);
//! Overwrite the advection type property
SET_TYPE_PROP(TracerBulkTpfa, AdvectionType, StationaryVelocityField<typename GET_PROP_TYPE(TypeTag, Scalar)>);
SET_TYPE_PROP(TracerBulkBox, AdvectionType, StationaryVelocityField<typename GET_PROP_TYPE(TypeTag, Scalar)>);
// Set the problem property
SET_TYPE_PROP(TracerTestBulk, Problem, TracerBulkProblem<TypeTag>);
// Set the spatial parameters
SET_PROP(TracerTestBulk, SpatialParams)
{
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using type = TracerSpatialParams<FVGridGeometry, Scalar>;
};
// Define whether mole(true) or mass (false) fractions are used
SET_BOOL_PROP(TracerTestBulk, UseMoles, false);
//! set the model traits (with disabled diffusion)
SET_PROP(TracerTestBulk, ModelTraits)
{
private:
using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
public:
using type = TracerTestModelTraits<FluidSystem::numComponents, GET_PROP_VALUE(TypeTag, UseMoles)>;
};
// use the test-specific fluid system
SET_TYPE_PROP(TracerTestBulk, FluidSystem, TracerFluidSystem<TypeTag>);
} // end namespace Properties
/*!
* \ingroup MultiDomain
* \ingroup TracerModel
* \brief The problem for the bulk domain of the tracer facet coupling test
*/
template <class TypeTag>
class TracerBulkProblem : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar);
using Indices = typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices;
using GridView = typename GET_PROP_TYPE(TypeTag, GridView);
using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry);
using FVElementGeometry = typename FVGridGeometry::LocalView;
using BoundaryTypes = typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
using PrimaryVariables = typename GET_PROP_TYPE(TypeTag, PrimaryVariables);
using NumEqVector = typename GET_PROP_TYPE(TypeTag, NumEqVector);
using FluidSystem = typename GET_PROP_TYPE(TypeTag, FluidSystem);
using CouplingManager = typename GET_PROP_TYPE(TypeTag, CouplingManager);
//! property that defines whether mole or mass fractions are used
static constexpr bool useMoles = GET_PROP_VALUE(TypeTag, UseMoles);
using Element = typename FVGridGeometry::GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
public:
using typename ParentType::SpatialParams;
TracerBulkProblem(std::shared_ptr<const FVGridGeometry> fvGridGeom,
std::shared_ptr<SpatialParams> spatialParams,
std::shared_ptr<CouplingManager> couplingManager,
const std::string& paramGroup = "")
: ParentType(fvGridGeom, spatialParams, paramGroup)
, couplingManagerPtr_(couplingManager)
, initialMassFraction_(getParamFromGroup<Scalar>(paramGroup, "Problem.ContaminationMassFraction"))
{
// stating in the console whether mole or mass fractions are used
const auto problemName = getParamFromGroup<std::string>(this->paramGroup(), "Problem.Name");
std::cout<< "problem " << problemName << " uses " << (useMoles ? "mole" : "mass") << " fractions" << '\n';
problemName_ = getParamFromGroup<std::string>(this->paramGroup(), "Vtk.OutputName") + "_" + problemName;
}
//! The problem name.
const std::string& name() const
{ return problemName_; }
/*!
* \brief Specifies which kind of boundary condition should be
* used for which equation on a given boundary segment.
* \param globalPos The position for which the bc type should be evaluated
*/
BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const
{
BoundaryTypes values;
values.setAllNeumann();
return values;
}
/*!
* \brief Evaluate the initial value for a control volume.