Commit c20d4871 authored by Timo Koch's avatar Timo Koch

Merge branch 'fix/Indices' into 'master'

Fix dumux-lecture test

See merge request !27
parents 0c31145f 67ba750d
......@@ -229,13 +229,13 @@ public:
{
if (onUpperBoundary_(globalPos))
{
values[Indices::pwIdx] = upperPressure_;
values[Indices::snOrXIdx] = 0.0;
values[Indices::pressureIdx] = upperPressure_;
values[Indices::switchIdx] = 0.0;
}
else if (onLowerBoundary_(globalPos))
{
values[Indices::pwIdx] = lowerPressure_;
values[Indices::snOrXIdx] = 0.0;
values[Indices::pressureIdx] = lowerPressure_;
values[Indices::switchIdx] = 0.0;
}
}
......@@ -302,9 +302,9 @@ public:
const Scalar depth = this->bBoxMax()[1] - globalPos[1];
const Scalar height = this->bBoxMax()[1] - this->bBoxMin()[1];
values[Indices::pwIdx] = upperPressure_
values[Indices::pressureIdx] = upperPressure_
- depth/height*(upperPressure_ - lowerPressure_);
values[Indices::snOrXIdx] = isInitial_(globalPos) ? 0.9 : 0.0;
values[Indices::switchIdx] = isInitial_(globalPos) ? 0.9 : 0.0;
//values[Indices::plIdx] = 1e5 - densityW*this->gravity()[1]*(depthBOR_ - globalPos[1]);
//values[Indices::plIdx] = 1.0e5;
//values[Indices::SgOrXIdx] = values[Indices::plIdx]*0.95/ BinaryCoeff::H2O_N2::henry(temperature_);
......@@ -313,12 +313,9 @@ public:
/*!
* \brief Return the initial phase state inside a control volume.
*
* \param vert The vertex
* \param globalIdx The index of the global vertex
* \param globalPos The global position
*/
int initialPhasePresence(const Vertex &vertex, int &globalIdx,
const GlobalPosition &globalPos) const
int initialPhasePresenceAtPos(const GlobalPosition &globalPos) const
{
if (isInitial_(globalPos))
return Indices::bothPhases;
......
......@@ -135,7 +135,7 @@ class LensTwoPProblem : public ImplicitPorousMediaProblem<TypeTag>
enum {
// primary variable indices
pwIdx = Indices::pwIdx,
pressureIdx = Indices::pressureIdx,
snIdx = Indices::snIdx,
// equation indices
......@@ -241,12 +241,12 @@ public:
if (onUpperBoundary_(globalPos))
{
values[pwIdx] = upperPressure_;
values[pressureIdx] = upperPressure_;
values[snIdx] = 0.0;
}
else if (onLowerBoundary_(globalPos))
{
values[pwIdx] = lowerPressure_;
values[pressureIdx] = lowerPressure_;
values[snIdx] = 0.0;
}
}
......@@ -313,7 +313,7 @@ public:
const Scalar depth = this->bBoxMax()[1] - globalPos[1];
const Scalar height = this->bBoxMax()[1] - this->bBoxMin()[1];
values[pwIdx] = upperPressure_ - depth/height*(upperPressure_-lowerPressure_);
values[pressureIdx] = upperPressure_ - depth/height*(upperPressure_-lowerPressure_);
values[snIdx] = (isInitial_(globalPos)) ? 0.9 :0.0;
}
// \}
......
......@@ -133,7 +133,7 @@ class LensTwoPProblem : public ImplicitPorousMediaProblem<TypeTag>
enum
{
// primary variable indices
pwIdx = Indices::pwIdx,
pressureIdx = Indices::pressureIdx,
snIdx = Indices::snIdx,
// equation indices
......@@ -244,12 +244,12 @@ public:
{
if (onUpperBoundary_(globalPos))
{
values[pwIdx] = upperPressure_;
values[pressureIdx] = upperPressure_;
values[snIdx] = 0.0;
}
else if (onLowerBoundary_(globalPos))
{
values[pwIdx] = lowerPressure_;
values[pressureIdx] = lowerPressure_;
values[snIdx] = 0.0;
}
else
......@@ -322,7 +322,7 @@ public:
const Scalar depth = this->bBoxMax()[1] - globalPos[1];
const Scalar height = this->bBoxMax()[1] - this->bBoxMin()[1];
values[pwIdx] = upperPressure_ - depth/height*(upperPressure_-lowerPressure_);
values[pressureIdx] = upperPressure_ - depth/height*(upperPressure_-lowerPressure_);
values[snIdx] = 0.0;
}
// \}
......
......@@ -121,7 +121,7 @@ class LensTwoPProblem : public ImplicitPorousMediaProblem<TypeTag>
enum
{
// primary variable indices
pwIdx = Indices::pwIdx,
pressureIdx = Indices::pressureIdx,
snIdx = Indices::snIdx,
// equation indices
......@@ -260,12 +260,12 @@ public:
if (onUpperBoundary_(globalPos))
{
values[pwIdx] = upperPressure_;
values[pressureIdx] = upperPressure_;
values[snIdx] = 0.0;
}
else if (onLowerBoundary_(globalPos))
{
values[pwIdx] = lowerPressure_;
values[pressureIdx] = lowerPressure_;
values[snIdx] = 0.0;
}
else
......@@ -341,7 +341,7 @@ public:
const Scalar depth = this->bBoxMax()[1] - globalPos[1];
const Scalar height = this->bBoxMax()[1] - this->bBoxMin()[1];
values[pwIdx] = upperPressure_ - depth/height*(upperPressure_-lowerPressure_);
values[pressureIdx] = upperPressure_ - depth/height*(upperPressure_-lowerPressure_);
values[snIdx] = 0.0;
}
......
......@@ -111,7 +111,7 @@ class BuckleyLeverettProblem: public IMPESProblem2P<TypeTag>
{
wPhaseIdx = Indices::wPhaseIdx,
nPhaseIdx = Indices::nPhaseIdx,
pwIdx = Indices::pwIdx,
pressureIdx = Indices::pressureIdx,
swIdx = Indices::swIdx,
pressEqIdx = Indices::pressureEqIdx,
satEqIdx = Indices::satEqIdx
......@@ -251,7 +251,7 @@ public:
*/
void dirichletAtPos(PrimaryVariables &values, const GlobalPosition& globalPos) const
{
values[pwIdx] = pLeftBc_;
values[pressureIdx] = pLeftBc_;
values[swIdx] = 1.0 - snr_;
}
/*!
......@@ -278,7 +278,7 @@ public:
void initialAtPos(PrimaryVariables &values,
const GlobalPosition &globalPos) const
{
values[pwIdx] = pLeftBc_;
values[pressureIdx] = pLeftBc_;
values[swIdx] = swr_;
}
......
......@@ -383,13 +383,9 @@ public:
/*!
* \brief Return the initial phase state inside a control volume.
*
* \param vert The vertex
* \param globalIdx The index of the global vertex
* \param globalPos The global position
*/
int initialPhasePresence(const Vertex &vert,
int &globalIdx,
const GlobalPosition &globalPos) const
int initialPhasePresenceAtPos(const GlobalPosition &globalPos) const
{ return Indices::wPhaseOnly; }
bool shouldWriteOutput() const
......
......@@ -247,13 +247,9 @@ public:
/*!
* \brief Return the initial phase state inside a control volume.
*
* \param vert The vertex
* \param globalIdx The index of the global vertex
* \param globalPos The global position
*/
int initialPhasePresence(const Vertex &vert,
int &globalIdx,
const GlobalPosition &globalPos) const
int initialPhasePresenceAtPos(const GlobalPosition &globalPos) const
{
return threePhases;
}
......
......@@ -253,13 +253,9 @@ public:
/*!
* \brief Return the initial phase state inside a control volume.
*
* \param vert The vertex
* \param globalIdx The index of the global vertex
* \param globalPos The global position
*/
int initialPhasePresence(const Vertex &vert,
int &globalIdx,
const GlobalPosition &globalPos) const
int initialPhasePresenceAtPos(const GlobalPosition &globalPos) const
{
return threePhases;
}
......
......@@ -240,13 +240,9 @@ public:
/*!
* \brief Return the initial phase state inside a control volume.
*
* \param vert The vertex
* \param globalIdx The index of the global vertex
* \param globalPos The global position
*/
int initialPhasePresence(const Vertex &vert,
int &globalIdx,
const GlobalPosition &globalPos) const
int initialPhasePresenceAtPos(const GlobalPosition &globalPos) const
{
return bothPhases;
}
......
......@@ -448,13 +448,9 @@ public:
/*!
* \brief Return the initial phase state inside a control volume.
*
* \param vert The vertex
* \param globalIdx The index of the global vertex
* \param globalPos The global position
*/
int initialPhasePresence(const Vertex &vert,
int &globalIdx,
const GlobalPosition &globalPos) const
int initialPhasePresenceAtPos(const GlobalPosition &globalPos) const
{
return wnPhaseOnly;
//return threePhases;
......
......@@ -454,13 +454,9 @@ public:
/*!
* \brief Return the initial phase state inside a control volume.
*
* \param vert The vertex
* \param globalIdx The index of the global vertex
* \param globalPos The global position
*/
int initialPhasePresence(const Vertex &vert,
int &globalIdx,
const GlobalPosition &globalPos) const
int initialPhasePresenceAtPos(const GlobalPosition &globalPos) const
{
return wnPhaseOnly;
//return threePhases;
......
......@@ -459,13 +459,9 @@ public:
/*!
* \brief Return the initial phase state inside a control volume.
*
* \param vert The vertex
* \param globalIdx The index of the global vertex
* \param globalPos The global position
*/
int initialPhasePresence(const Vertex &vert,
int &globalIdx,
const GlobalPosition &globalPos) const
int initialPhasePresenceAtPos(const GlobalPosition &globalPos) const
{
return wnPhaseOnly;
//return threePhases;
......
......@@ -112,7 +112,7 @@ class Henry2pProblem : public ImplicitPorousMediaProblem<TypeTag>
enum {
// primary variable indices
pwIdx = Indices::pwIdx,
pressureIdx = Indices::pressureIdx,
snIdx = Indices::snIdx,
// equation indices
......@@ -273,16 +273,16 @@ public:
if(globalPos[1]<0.8+eps_)
{
Scalar densityB = 1025;
values[pwIdx] = 1.0133e5+(depthBOR_-globalPos[1]-0.2)*densityB*9.81+1000*9.81*0.2;
values[pressureIdx] = 1.0133e5+(depthBOR_-globalPos[1]-0.2)*densityB*9.81+1000*9.81*0.2;
values[snIdx] = 1.0;
}
else {
// Scalar densityW = 1000;
// // hydrostatic pressure
// values[pwIdx] = 1.0133e5+(depthBOR_-globalPos[1])*densityW*9.81;
// values[pressureIdx] = 1.0133e5+(depthBOR_-globalPos[1])*densityW*9.81;
// values[snIdx] = 0.0;
Scalar densityB = 1025;
values[pwIdx] = 1.0133e5+(depthBOR_-globalPos[1]-0.2)*densityB*9.81+1000*9.81*0.2;
values[pressureIdx] = 1.0133e5+(depthBOR_-globalPos[1]-0.2)*densityB*9.81+1000*9.81*0.2;
values[snIdx] = 0.0;
}
}
......@@ -330,12 +330,12 @@ public:
if(globalPos[1]<0.8+eps_)
{
Scalar densityB = 1025;
values[pwIdx] = 1.0133e5+(depthBOR_-globalPos[1]-0.2)*densityB*9.81+1000*9.81*0.2;
values[pressureIdx] = 1.0133e5+(depthBOR_-globalPos[1]-0.2)*densityB*9.81+1000*9.81*0.2;
values[snIdx] = 0.0;
}
else {
Scalar densityW = 1000;
values[pwIdx] = 1.0133e5+(depthBOR_-globalPos[1])*densityW*9.81;
values[pressureIdx] = 1.0133e5+(depthBOR_-globalPos[1])*densityW*9.81;
values[snIdx] = 0.0;
}
......
......@@ -62,6 +62,9 @@ SET_SCALAR_PROP(InfiltrationProblem, NewtonMaxRelativeShift, 1e-4);
// -1 backward differences, 0: central differences, +1: forward differences
SET_INT_PROP(InfiltrationProblem, ImplicitNumericDifferenceMethod, 1);
// Set the linear solver
SET_TYPE_PROP(InfiltrationProblem, LinearSolver, ILU0BiCGSTABBackend<TypeTag>);
}
/*!
......
......@@ -62,6 +62,9 @@ SET_SCALAR_PROP(InfiltrationProblem, NewtonMaxRelativeShift, 1e-4);
// -1 backward differences, 0: central differences, +1: forward differences
SET_INT_PROP(InfiltrationProblem, ImplicitNumericDifferenceMethod, 1);
// Set the linear solver
SET_TYPE_PROP(InfiltrationProblem, LinearSolver, ILU0BiCGSTABBackend<TypeTag>);
}
/*!
......@@ -286,13 +289,9 @@ public:
/*!
* \brief Return the initial phase state inside a control volume.
*
* \param vert The vertex
* \param globalIdx The index of the global vertex
* \param globalPos The global position
*/
int initialPhasePresence(const Vertex &vertex,
int globalIdx,
const GlobalPosition &globalPos) const
int initialPhasePresenceAtPos(const GlobalPosition &globalPos) const
{
return Indices::wgPhaseOnly;
}
......
......@@ -453,6 +453,13 @@ public:
return 1.0;
}
template <class FluidState>
static Scalar kelvinVaporPressure(const FluidState &fluidState,
const int phaseIdx,
const int compIdx)
{
DUNE_THROW(Dune::NotImplemented, "FluidSystems::H2OAirNAPL::kelvinVaporPressure()");
}
/*!
* \brief Given all mole fractions in a phase, return the specific
......
......@@ -71,6 +71,9 @@ SET_SCALAR_PROP(KuevetteProblem, NewtonMaxRelativeShift, 1e-4);
// Use ConstraintSolver
SET_BOOL_PROP(KuevetteProblem, UseConstraintSolver, false);
// Set the linear solver
SET_TYPE_PROP(KuevetteProblem, LinearSolver, ILU0BiCGSTABBackend<TypeTag>);
}
......@@ -337,13 +340,9 @@ public:
/*!
* \brief Return the initial phase state inside a control volume.
*
* \param vert The vertex
* \param globalIdx The index of the global vertex
* \param globalPos The global position
*/
int initialPhasePresence(const Vertex &vertex,
const int &globalIdx,
const GlobalPosition &globalPos) const
int initialPhasePresenceAtPos(const GlobalPosition &globalPos) const
{
if((globalPos[0] > 0.20 - eps_) && (globalPos[0] < 0.80 + eps_) &&
(globalPos[1] > 0.4 - eps_) && (globalPos[1] < 0.65 + eps_))
......
This diff is collapsed.
Markdown is supported
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