Commit 60dbc6c5 authored by Martin Schneider's avatar Martin Schneider
Browse files

Merge branch 'feature/limit-tests-to-one-minute' into 'master'

Feature/limit tests to one minute

Limit the tests in lecture to a maximum of 60 seconds to reduce computational effort for testing.

* [x] Fix fuelcell
* [x] Fix co2plume
* [x] Fix sagd
* [x] Fix convective mixing
* [ ] Fix naplinfiltrationexercise
* [x] Fix remediationscenariosexercise

See merge request !8
parents 0fb20382 7bbda88d
......@@ -25,12 +25,11 @@
#ifndef DUMUX_HETEROGENEOUS_CO2TABLES_HH
#define DUMUX_HETEROGENEOUS_CO2TABLES_HH
#include <cassert>
#include <dumux/material/components/co2tablereader.hh>
namespace Dumux
{
namespace ConvMixCO2Tables
namespace CO2TablesBenchmarkThree
{
// the real work is done by some external program which provides
// ready-to-use tables.
......
......@@ -45,11 +45,7 @@ namespace Properties
NEW_TYPE_TAG(LensOnePTwoCProblem, INHERITS_FROM(BoxOnePTwoC));
// Set the grid type
#if HAVE_UG
SET_TYPE_PROP(LensOnePTwoCProblem, Grid, Dune::UGGrid<2>);
#else
SET_TYPE_PROP(LensOnePTwoCProblem, Grid, Dune::YaspGrid<2>);
#endif
// Set the problem property
SET_TYPE_PROP(LensOnePTwoCProblem, Problem, Dumux::LensOnePTwoCProblem<TypeTag>);
......
......@@ -45,11 +45,7 @@ namespace Properties
NEW_TYPE_TAG(LensTwoPTwoCProblem, INHERITS_FROM(BoxTwoPTwoC, Lens2pSpatialParams));
// Set the grid type
#if HAVE_UG
SET_TYPE_PROP(LensTwoPTwoCProblem, Grid, Dune::UGGrid<2>);
#else
SET_TYPE_PROP(LensTwoPTwoCProblem, Grid, Dune::YaspGrid<2>);
#endif
// Set the problem property
SET_TYPE_PROP(LensTwoPTwoCProblem, Problem, Dumux::LensTwoPTwoCProblem<TypeTag>);
......
......@@ -49,11 +49,7 @@ namespace Properties
NEW_TYPE_TAG(LensTwoPProblem, INHERITS_FROM(BoxTwoP, Lens2pSpatialParams));
// Set the grid type
#if HAVE_UG
SET_TYPE_PROP(LensTwoPProblem, Grid, Dune::UGGrid<2>);
#else
SET_TYPE_PROP(LensTwoPProblem, Grid, Dune::YaspGrid<2>);
#endif
// Set the problem property
SET_TYPE_PROP(LensTwoPProblem, Problem, LensTwoPProblem<TypeTag>);
......@@ -365,8 +361,8 @@ private:
*/
bool isInitial_(const GlobalPosition &globalPos) const
{
return (globalPos[1] > 1.0 && globalPos[1] < 1.25 && globalPos[0] > 1.7
&& globalPos[0] < 2.3);
return (globalPos[1] > 1.0 + eps_ && globalPos[1] < 1.25 - eps_ && globalPos[0] > 1.7 + eps_
&& globalPos[0] < 2.3 - eps_);
}
};
} //end namespace
......
......@@ -45,11 +45,7 @@ namespace Properties
NEW_TYPE_TAG(LensOnePTwoCProblem, INHERITS_FROM(BoxOnePTwoC));
// Set the grid type
#if HAVE_UG
SET_TYPE_PROP(LensOnePTwoCProblem, Grid, Dune::UGGrid<2>);
#else
SET_TYPE_PROP(LensOnePTwoCProblem, Grid, Dune::YaspGrid<2>);
#endif
// Set the problem property
SET_TYPE_PROP(LensOnePTwoCProblem, Problem, Dumux::LensOnePTwoCProblem<TypeTag>);
......
......@@ -47,11 +47,7 @@ namespace Properties
NEW_TYPE_TAG(LensTwoPProblem, INHERITS_FROM(BoxTwoP, Lens2pSpatialParams));
// Set the grid type
#if HAVE_UG
SET_TYPE_PROP(LensTwoPProblem, Grid, Dune::UGGrid<2>);
#else
SET_TYPE_PROP(LensTwoPProblem, Grid, Dune::YaspGrid<2>);
#endif
// Set the problem property
SET_TYPE_PROP(LensTwoPProblem, Problem, LensTwoPProblem<TypeTag>);
......@@ -367,10 +363,10 @@ private:
*/
bool onInlet_(const GlobalPosition &globalPos) const
{
Scalar width = this->bBoxMax()[0] - this->bBoxMin()[0];
Scalar lambda = (this->bBoxMax()[0] - globalPos[0])/width;
return (onUpperBoundary_(globalPos) && (this->bBoxMax()[0]-0.45*width)/width > lambda
&& lambda > (this->bBoxMax()[0]-0.55*width)/width);
const Scalar width = this->bBoxMax()[0] - this->bBoxMin()[0];
const Scalar lambda = (this->bBoxMax()[0] - globalPos[0])/width;
return (onUpperBoundary_(globalPos) && (this->bBoxMax()[0]-0.45*width)/width > lambda + eps_
&& (this->bBoxMax()[0]-0.55*width)/width < lambda - eps_);
}
Scalar eps_;
......
......@@ -5,7 +5,8 @@ add_dumux_test(lens2pexercise2 lens2pexercise2 lens2pexercise2.cc
--script fuzzy
--files ${CMAKE_SOURCE_DIR}/lecture/references/lens-2p-exercise2-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/lens-2p-00052.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/lens2pexercise2")
--command "${CMAKE_CURRENT_BINARY_DIR}/lens2pexercise2"
--zeroThreshold {"Sn":0.001})
# headers for installation and headercheck
install(FILES
......
......@@ -48,11 +48,7 @@ namespace Properties
NEW_TYPE_TAG(LensTwoPProblem, INHERITS_FROM(BoxTwoP, Lens2pSpatialParams));
// Set the grid type
#if HAVE_UG
SET_TYPE_PROP(LensTwoPProblem, Grid, Dune::UGGrid<2>);
#else
SET_TYPE_PROP(LensTwoPProblem, Grid, Dune::YaspGrid<2>);
#endif
// Set the problem property
SET_TYPE_PROP(LensTwoPProblem, Problem, LensTwoPProblem<TypeTag>);
......@@ -425,10 +421,10 @@ private:
*/
bool onInlet_(const GlobalPosition &globalPos) const
{
Scalar width = this->bBoxMax()[0] - this->bBoxMin()[0];
Scalar lambda = (this->bBoxMax()[0] - globalPos[0])/width;
return (onUpperBoundary_(globalPos) && (this->bBoxMax()[0]-0.40*width)/width > lambda
&& lambda > (this->bBoxMax()[0]-0.60*width)/width);
const Scalar width = this->bBoxMax()[0] - this->bBoxMin()[0];
const Scalar lambda = (this->bBoxMax()[0] - globalPos[0])/width;
return (onUpperBoundary_(globalPos) && (this->bBoxMax()[0]-0.40*width)/width > lambda + eps_
&& (this->bBoxMax()[0]-0.60*width)/width < lambda - eps_);
}
Scalar eps_;
......
......@@ -3,9 +3,9 @@ add_input_file_links()
add_dumux_test(co2plumeshapeexercise co2plumeshapeexercise co2plumeshapeexercise.cc
python ${dumux_INCLUDE_DIRS}/bin/runtest.py
--script fuzzy
--files ${CMAKE_SOURCE_DIR}/lecture/references/CO2_PlumeShape-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/CO2_PlumeShape-00018.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/co2plumeshapeexercise -ParameterFile ${CMAKE_CURRENT_SOURCE_DIR}/co2plumeshapeexercise.input")
--files ${CMAKE_SOURCE_DIR}/lecture/references/co2plumeshape-reference.vtu
${CMAKE_CURRENT_BINARY_DIR}/co2plumeshape-00003.vtu
--command "${CMAKE_CURRENT_BINARY_DIR}/co2plumeshapeexercise -TimeManager.TEnd 1e7 -TimeManager.EpisodeLength 1e7 -BoundaryConditions.InjectionRate 0.01")
# headers for installation and headercheck
install(FILES
......
[TimeManager]
DtInitial = 250# [s]
TEnd = 2# [s]
DtInitial = 250 # [s]
TEnd = 1e100 # [s] actual end time is controlled by injection rate
EpisodeLength = 1e7 # [s]
[Grid]
UpperRightX = 200. # x-coordinate of the upper-right corner of the grid [m]
UpperRightY = 60. # y-coordinate of the upper-right corner of the grid [m]
NumberOfCellsX = 100 # x-resolution of the grid
NumberOfCellsY = 30 # y-resolution of the grid
UpperRight = 200 60 # upper right corner coordinates [m]
Cells = 100 30 # number of cells in (x,y) directions [-]
[FluidSystem]
NTemperature = 3# [-] number of tabularization entries
......@@ -19,24 +16,23 @@ TemperatureLow = 283.15 # [Pa] low end for tabularization of fluid propertie
TemperatureHigh = 320.15 # [Pa] high end for tabularization of fluid properties
[SpatialParams]
Kh = 1e-13 # [m^2] intrinsic permeability
dipAngle = 0. # [deg] dip angle for the domain
phi = 0.3 # % porosity
Permeability = 1e-13 # [m^2] intrinsic permeability
DipAngle = 0.0 # [deg] dip angle for the domain
Porosity = 0.3 # porosity
[MaterialLaw]
swr = 0.2 # [-] residual wetting phase sat.
snr = 0.2 # [-] residual non-wetting phase sat.
Swr = 0.2 # [-] residual wetting phase sat.
Snr = 0.2 # [-] residual non-wetting phase sat.
Pe = 5e3 # [Pa] capillary entry pressure
Lambda = 2 # [-] Brooks Corey parameter
[SimulationControl]
Name = CO2_PlumeShape# [-] the name of the output files
Name = co2plumeshape # the name of the output files
[InitialConditions]
Temperature = 283.15 # [K] initial temperature of injected CO2
Pressure = 1.5e7 # [Pa] initial pressure
[BoundaryConditions]
massInj_ = 0.001 # [kg/s] mass injection of CO2
Temperature_inj = 313.15 # [K] temperature of injected CO2
InjectionRate = 0.001 # [kg/s] mass injection of CO2
InjectionTemperature = 313.15 # [K] temperature of injected CO2
......@@ -23,10 +23,10 @@
* meters at the bottom of the left boundary and moves upwards towards
* an impermeable rock.
*/
#ifndef CO2_PLUMESHAPE_PROBLEM_HH_
#define CO2_PLUMESHAPE_PROBLEM_HH_
#ifndef CO2_PLUMESHAPE_PROBLEM_HH
#define CO2_PLUMESHAPE_PROBLEM_HH
//#define PI 3.14159
#include <cmath>
#include <dumux/porousmediumflow/co2/implicit/model.hh>
#include <dumux/porousmediumflow/co2/implicit/volumevariables.hh>
......@@ -35,11 +35,10 @@
#include <dumux/porousmediumflow/implicit/problem.hh>
#include <dumux/implicit/box/intersectiontovertexbc.hh>
#include <lecture/common/co2tablesbenchmark3.hh>
#include "co2plumeshapespatialparameters.hh"
#include "injectionco2tables.hh"
#include <dumux/io/cubegridcreator.hh>
namespace Dumux
{
......@@ -51,25 +50,17 @@ namespace Properties
// for the correct type tag, see 2p2cniproperties.hh
NEW_TYPE_TAG(PlumeShapeProblem, INHERITS_FROM(BoxTwoPTwoCNI, PlumeShapeSpatialParams));
SET_TYPE_PROP(PlumeShapeProblem, Grid, Dune::YaspGrid</*dim=*/2>); /*@\label{tutorial-coupled:set-grid}@*/
SET_TYPE_PROP(PlumeShapeProblem, GridCreator, Dumux::CubeGridCreator<TypeTag>); /*@\label{tutorial-coupled:set-gridcreator}@*/
// Set grid to a two-dimensional structured quadrilateral grid
SET_TYPE_PROP(PlumeShapeProblem, Grid, Dune::YaspGrid<2>);
// Set the problem property
SET_PROP(PlumeShapeProblem, Problem)
{
typedef Dumux::PlumeShapeProblem<TypeTag> type;
};
SET_TYPE_PROP(PlumeShapeProblem, Problem, Dumux::PlumeShapeProblem<TypeTag>);
// Set fluid configuration
SET_PROP(PlumeShapeProblem, FluidSystem)
{
typedef Dumux::BrineCO2FluidSystem<TypeTag> type;
};
SET_TYPE_PROP(PlumeShapeProblem, FluidSystem, Dumux::BrineCO2FluidSystem<TypeTag>);
// Set the CO2 table to be used; in this case not the the default table
//SET_TYPE_PROP(PlumeShapeProblem, CO2Table, Dumux::Injection::CO2Tables);
SET_TYPE_PROP(PlumeShapeProblem, CO2Table, Dumux::Injection::CO2Tables);
SET_TYPE_PROP(PlumeShapeProblem, CO2Table, Dumux::CO2TablesBenchmarkThree::CO2Tables);
// Set the salinity mass fraction of the brine in the reservoir
SET_SCALAR_PROP(PlumeShapeProblem, ProblemSalinity, 1e-1);
......@@ -82,7 +73,6 @@ SET_TYPE_PROP(PlumeShapeProblem, IsothermalModel, CO2Model<TypeTag>);
SET_BOOL_PROP(PlumeShapeProblem, ProblemEnableGravity, true);
SET_BOOL_PROP(PlumeShapeProblem, ImplicitEnableJacobianRecycling, true);
SET_BOOL_PROP(PlumeShapeProblem, VtkAddVelocity, false);
// set newton relative tolerance
SET_SCALAR_PROP(PlumeShapeProblem, NewtonMaxRelativeShift, 1e-6);
......@@ -123,47 +113,43 @@ class PlumeShapeProblem : public ImplicitPorousMediaProblem<TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, CO2Table) CO2Tables;
enum {
// Grid and world dimension
dim = GridView::dimension,
dimWorld = GridView::dimensionworld
// Grid and world dimension
dim = GridView::dimension,
dimWorld = GridView::dimensionworld
};
// copy some indices for convenience
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
enum {
lPhaseIdx = Indices::wPhaseIdx,
gPhaseIdx = Indices::nPhaseIdx,
BrineIdx = FluidSystem::BrineIdx,
CO2Idx = FluidSystem::CO2Idx,
// copy some indices for convenience
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
enum {
lPhaseIdx = Indices::wPhaseIdx,
gPhaseIdx = Indices::nPhaseIdx,
BrineIdx = FluidSystem::BrineIdx,
CO2Idx = FluidSystem::CO2Idx,
conti0EqIdx = Indices::conti0EqIdx,
contiCO2EqIdx = conti0EqIdx + CO2Idx,
conti0EqIdx = Indices::conti0EqIdx,
contiCO2EqIdx = conti0EqIdx + CO2Idx,
#if !ISOTHERMAL
temperatureIdx = Indices::temperatureIdx,
energyEqIdx = Indices::energyEqIdx,
temperatureIdx = Indices::temperatureIdx,
energyEqIdx = Indices::energyEqIdx,
#endif
};
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GridView::template Codim<0>::Entity Element;
typedef typename GridView::template Codim<dim>::Entity Vertex;
typedef typename GridView::Intersection Intersection;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryTypes) BoundaryTypes;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, GridCreator) GridCreator;
typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables;
typedef typename GridView::template Codim<0>::Entity Element;
typedef typename GridView::template Codim<dim>::Entity Vertex;
typedef typename GridView::Intersection Intersection;
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
typedef Dune::FieldVector<Scalar, dim> DimVector;
typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, GridCreator) GridCreator;
typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables;
typedef Dumux::CO2<Scalar, CO2Tables> CO2;
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
typedef Dumux::CO2<Scalar, CO2Tables> CO2;
public:
/*!
......@@ -173,326 +159,300 @@ public:
* \param gridView The grid view
*/
PlumeShapeProblem(TimeManager &timeManager, const GridView &gridView)
: ParentType(timeManager, gridView)
, eps_(1e-6),
gravity_(0.)
: ParentType(timeManager, gridView), eps_(1e-6)
{
try
{
nTemperature_ = GET_RUNTIME_PARAM(TypeTag, int, FluidSystem.NTemperature);
nPressure_ = GET_RUNTIME_PARAM(TypeTag, int, FluidSystem.NPressure);
pressureLow_ = GET_RUNTIME_PARAM(TypeTag, Scalar, FluidSystem.PressureLow);
pressureHigh_ = GET_RUNTIME_PARAM(TypeTag, Scalar, FluidSystem.PressureHigh);
pressure_ = GET_RUNTIME_PARAM(TypeTag, Scalar, InitialConditions.Pressure); // hydrodynamic pressure at top layer
temperatureLow_ = GET_RUNTIME_PARAM(TypeTag, Scalar, FluidSystem.TemperatureLow);
temperatureHigh_ = GET_RUNTIME_PARAM(TypeTag, Scalar, FluidSystem.TemperatureHigh);
temperature_ = GET_RUNTIME_PARAM(TypeTag, Scalar, InitialConditions.Temperature);
massInj_ = GET_RUNTIME_PARAM(TypeTag, Scalar, BoundaryConditions.massInj_);
temperatureInj_ = GET_RUNTIME_PARAM(TypeTag, Scalar, BoundaryConditions.Temperature_inj);
kh_ = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.Kh);
dipAngle_ = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.dipAngle); // [deg]
name_ = GET_RUNTIME_PARAM(TypeTag, std::string, SimulationControl.Name);
}
catch (Dumux::ParameterException &e) {
std::cerr << e << ". Abort!\n";
exit(1) ;
}
catch (...) {
std::cerr << "Unknown exception thrown!\n";
exit(1);
}
eps_ = 1e-6;
episodeLength_ = GET_RUNTIME_PARAM(TypeTag, Scalar, TimeManager.EpisodeLength);
this->timeManager().startNextEpisode(episodeLength_);
Scalar pi_ = 3.14159;
dipAngleRadians_ = (dipAngle_ * pi_)/180.; // [rad]
// rotate the coordinate system / gravity:
gravity_[dim-1] = -9.81 * cos(dipAngleRadians_);
gravity_[0] = -9.81 * sin(dipAngleRadians_);
// initialize the tables of the fluid system
FluidSystem::init(/*Tmin=*/temperatureLow_,
nTemperature_ = GET_RUNTIME_PARAM(TypeTag, int, FluidSystem.NTemperature);
nPressure_ = GET_RUNTIME_PARAM(TypeTag, int, FluidSystem.NPressure);
pressureLow_ = GET_RUNTIME_PARAM(TypeTag, Scalar, FluidSystem.PressureLow);
pressureHigh_ = GET_RUNTIME_PARAM(TypeTag, Scalar, FluidSystem.PressureHigh);
pressure_ = GET_RUNTIME_PARAM(TypeTag, Scalar, InitialConditions.Pressure); // hydrodynamic pressure at top layer
temperatureLow_ = GET_RUNTIME_PARAM(TypeTag, Scalar, FluidSystem.TemperatureLow);
temperatureHigh_ = GET_RUNTIME_PARAM(TypeTag, Scalar, FluidSystem.TemperatureHigh);
temperature_ = GET_RUNTIME_PARAM(TypeTag, Scalar, InitialConditions.Temperature);
injectionRate_ = GET_RUNTIME_PARAM(TypeTag, Scalar, BoundaryConditions.InjectionRate);
injectionTemperature_ = GET_RUNTIME_PARAM(TypeTag, Scalar, BoundaryConditions.InjectionTemperature);
dipAngle_ = GET_RUNTIME_PARAM(TypeTag, Scalar, SpatialParams.DipAngle); // [deg]
name_ = GET_RUNTIME_PARAM(TypeTag, std::string, SimulationControl.Name);
episodeLength_ = GET_RUNTIME_PARAM(TypeTag, Scalar, TimeManager.EpisodeLength);
this->timeManager().startNextEpisode(episodeLength_);
dipAngleRadians_ = (dipAngle_ * M_PI)/180.0; // [rad]
// rotate the coordinate system / gravity:
gravity_[1] = -9.81 * cos(dipAngleRadians_);
gravity_[0] = -9.81 * sin(dipAngleRadians_);
// initialize the tables of the fluid system
FluidSystem::init(/*Tmin=*/temperatureLow_,
/*Tmax=*/temperatureHigh_,
/*nT=*/nTemperature_,
/*pmin=*/pressureLow_,
/*pmax=*/pressureHigh_,
/*np=*/nPressure_);
end_ = false;
simulationFinished_ = false; //boolean controlling the simulation end
}
/*!
* \brief Called directly after the time integration.
*/
void postTimeStep()
{
// Calculate storage terms
PrimaryVariables storageL, storageG;
this->model().globalPhaseStorage(storageL, lPhaseIdx);
this->model().globalPhaseStorage(storageG, gPhaseIdx);
// Write mass balance information for rank 0
if (this->gridView().comm().rank() == 0) {
std::cout<<"Storage: liquid=[" << storageL << "]"
<< " gas=[" << storageG << "]\n";
}
// if (storageG[1] >= 1.e6) end_ = true;
//loop over all nodes in the globalIdx_ vector and check if the saturation in any of them is greater zero
if(end_)
{
this->writeOutput();
Dumux::Parameters::print<TypeTag>();
exit(EXIT_SUCCESS);
}
* \brief Called directly after the time integration.
*/
void postTimeStep()
{
// Calculate storage terms
PrimaryVariables storageL, storageG;
this->model().globalPhaseStorage(storageL, lPhaseIdx);
this->model().globalPhaseStorage(storageG, gPhaseIdx);
// Write mass balance information for rank 0
if (this->gridView().comm().rank() == 0) {
std::cout<<"Storage: liquid=[" << storageL << "]"
<< " gas=[" << storageG << "]\n";
}
void init()
{
// set end time:
Scalar final_storage = 1.55e5; // [kg]
Scalar endtime_ = final_storage/massInj_; // [s]
this->timeManager().setEndTime(endtime_);
ParentType::init();
}
// tell the time manager in case we reached the end of the injection
if(simulationFinished_)
this->timeManager().setFinished(true);
}
/*!
* \name Problem parameters
*/
// \{
/*!
* \brief The problem name.
*
* This is used as a prefix for files generated by the simulation.
*/
const std::string name() const
{ return name_; }
/*!
* \brief Returns the temperature within the domain.
*
* This problem assumes a temperature of 10 degrees Celsius.
*/
Scalar temperature() const
{ return temperature_; };
void sourceAtPos(PrimaryVariables &values,
const GlobalPosition &globalPos) const
{
values = 0;
}
void init()
{
// set the simulation end time
const Scalar finalStorage = 1.55e5; // [kg]
// set TimeManager.TEnd in input file to small value to end the simulation earlier
const Scalar endTime = std::min(finalStorage/injectionRate_, this->timeManager().endTime()); // [s]
this->timeManager().setEndTime(endTime);
ParentType::init();
}
/*!
* \name Problem parameters
*/
// \{
/*!
* \brief The problem name.
*
* This is used as a prefix for files generated by the simulation.
*/
const std::string name() const
{ return name_; }
/*!
* \brief Returns the temperature within the domain.
*
* This problem assumes a temperature of 10 degrees Celsius.
*/
Scalar temperature() const
{ return temperature_; };
/*!
* \name Boundary conditions
*/
// \{
/*!
* \brief Evaluate the source term for all phases within a given
* sub-control-volume.
*
* \param values The source and sink values for the conservation equations in units of
* \f$ [ \textnormal{unit of conserved quantity} / (m^3 \cdot s )] \f$
* \param globalPos The position of the center of the finite volume
* for which the source term ought to be
* specified in global coordinates
*
* For this method, the \a values parameter stores the conserved quantity rate
* generated or annihilate per volume unit. Positive values mean
* that the conserved quantity is created, negative ones mean that it vanishes.
* E.g. for the mass balance that would be a mass rate in \f$ [ kg / (m^3 \cdot s)] \f$.
*/
void sourceAtPos(PrimaryVariables &values,
const GlobalPosition &globalPos) const
{
values = 0;
}
/*!
* \name Boundary conditions
*/
// \{
/*!
* \brief Specifies which kind of boundary condition should be
* used for which equation on a given boundary segment.
*
* \param values The boundary types for the conservation equations
* \param vertex The vertex for which the boundary type is set
*/
void boundaryTypes(BoundaryTypes &values, const Vertex &vertex) const
{
const GlobalPosition globalPos = vertex.geometry().center();
/*!
* \brief Specifies which kind of boundary condition should be
* used for which equation on a given boundary segment.
*
* \param values The boundary types for the conservation equations
* \param vertex The vertex for which the boundary type is set
*/
void boundaryTypes(BoundaryTypes &values, const Vertex &vertex) const
{
const GlobalPosition& globalPos = vertex.geometry().center();
values.setAllNeumann();
values.setAllNeumann();