mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
finger problem: provide a version that used the ECFV discretization
and some assorted cleanups.
This commit is contained in:
43
examples/finger_immiscible_ecfv.cpp
Normal file
43
examples/finger_immiscible_ecfv.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
Copyright (C) 2012-2013 by Andreas Lauser
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM 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.
|
||||
|
||||
OPM 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 OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief Problem featuring a saturation overshoot.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include <ewoms/common/start.hh>
|
||||
#include <ewoms/models/immiscible/immisciblemodel.hh>
|
||||
#include <ewoms/disc/ecfv/ecfvdiscretization.hh>
|
||||
#include "problems/fingerproblem.hh"
|
||||
|
||||
namespace Ewoms {
|
||||
namespace Properties {
|
||||
NEW_TYPE_TAG(FingerProblemEcfv, INHERITS_FROM(ImmiscibleTwoPhaseModel, FingerBaseProblem));
|
||||
SET_TAG_PROP(FingerProblemEcfv, SpatialDiscretizationSplice, EcfvDiscretization);
|
||||
}}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(FingerProblemEcfv) ProblemTypeTag;
|
||||
return Ewoms::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
43
examples/finger_immiscible_vcfv.cpp
Normal file
43
examples/finger_immiscible_vcfv.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
// vi: set et ts=4 sw=4 sts=4:
|
||||
/*
|
||||
Copyright (C) 2012-2013 by Andreas Lauser
|
||||
|
||||
This file is part of the Open Porous Media project (OPM).
|
||||
|
||||
OPM 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.
|
||||
|
||||
OPM 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 OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/*!
|
||||
* \file
|
||||
*
|
||||
* \brief Problem featuring a saturation overshoot.
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include <ewoms/common/start.hh>
|
||||
#include <ewoms/models/immiscible/immisciblemodel.hh>
|
||||
#include <ewoms/disc/vcfv/vcfvdiscretization.hh>
|
||||
#include "problems/fingerproblem.hh"
|
||||
|
||||
namespace Ewoms {
|
||||
namespace Properties {
|
||||
NEW_TYPE_TAG(FingerProblemVcfv, INHERITS_FROM(ImmiscibleTwoPhaseModel, FingerBaseProblem));
|
||||
SET_TAG_PROP(FingerProblemVcfv, SpatialDiscretizationSplice, VcfvDiscretization);
|
||||
}}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
typedef TTAG(FingerProblemVcfv) ProblemTypeTag;
|
||||
return Ewoms::start<ProblemTypeTag>(argc, argv);
|
||||
}
|
||||
@@ -114,12 +114,12 @@ SET_SCALAR_PROP(FingerBaseProblem, DomainSizeZ, 0.1);
|
||||
|
||||
SET_SCALAR_PROP(FingerBaseProblem, InitialWaterSaturation, 0.01);
|
||||
|
||||
SET_INT_PROP(FingerBaseProblem, CellsX, 20);
|
||||
SET_INT_PROP(FingerBaseProblem, CellsY, 70);
|
||||
SET_INT_PROP(FingerBaseProblem, CellsX, 10);
|
||||
SET_INT_PROP(FingerBaseProblem, CellsY, 35);
|
||||
SET_INT_PROP(FingerBaseProblem, CellsZ, 1);
|
||||
|
||||
// The default for the end time of the simulation
|
||||
SET_SCALAR_PROP(FingerBaseProblem, EndTime, 215);
|
||||
SET_SCALAR_PROP(FingerBaseProblem, EndTime, 10e3);
|
||||
|
||||
// The default for the initial time step size of the simulation
|
||||
SET_SCALAR_PROP(FingerBaseProblem, InitialTimeStepSize, 10);
|
||||
@@ -203,7 +203,12 @@ public:
|
||||
* \copydoc FvBaseProblem::name
|
||||
*/
|
||||
std::string name() const
|
||||
{ return std::string("finger_") + Model::name(); }
|
||||
{ return
|
||||
std::string("finger") +
|
||||
"_" + Model::name() +
|
||||
"_" + Model::discretizationName() +
|
||||
(this->model().enableGridAdaptation()?"_adaptive":"");
|
||||
}
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::registerParameters
|
||||
@@ -347,12 +352,10 @@ public:
|
||||
void boundary(BoundaryRateVector &values, const Context &context,
|
||||
int spaceIdx, int timeIdx) const
|
||||
{
|
||||
const GlobalPosition &pos = context.cvCenter(spaceIdx, timeIdx);
|
||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||
|
||||
if (onLeftBoundary_(pos) || onRightBoundary_(pos)
|
||||
|| onLowerBoundary_(pos)) {
|
||||
if (onLeftBoundary_(pos) || onRightBoundary_(pos) || onLowerBoundary_(pos))
|
||||
values.setNoFlow();
|
||||
}
|
||||
else {
|
||||
assert(onUpperBoundary_(pos));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user