mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fix most pedantic compiler warnings in the basic infrastructure
i.e., using clang 3.8 to compile the test suite with the following
flags:
```
-Weverything
-Wno-documentation
-Wno-documentation-unknown-command
-Wno-c++98-compat
-Wno-c++98-compat-pedantic
-Wno-undef
-Wno-padded
-Wno-global-constructors
-Wno-exit-time-destructors
-Wno-weak-vtables
-Wno-float-equal
```
should not produce any warnings anymore. In my opinion the only flag
which would produce beneficial warnings is -Wdocumentation. This has
not been fixed in this patch because writing documentation is left for
another day (or, more likely, year).
note that this patch consists of a heavy dose of the OPM_UNUSED macro
and plenty of static_casts (to fix signedness issues). Fixing the
singedness issues were quite a nightmare and the fact that the Dune
API is quite inconsistent in that regard was not exactly helpful. :/
Finally this patch includes quite a few formatting changes (e.g., all
occurences of 'T &t' should be changed to `T& t`) and some fixes for
minor issues which I've found during the excercise.
I've made sure that all unit tests the test suite still pass
successfully and I've made sure that flow_ebos still works for Norne
and that it did not regress w.r.t. performance.
(Note that this patch does not fix compiler warnings triggered `ebos`
and `flow_ebos` but only those caused by the basic infrastructure or
the unit tests.)
v2: fix the warnings that occur if the dune-localfunctions module is
not available. thanks to [at]atgeirr for testing.
v3: fix dune 2.3 build issue
This commit is contained in:
@@ -54,7 +54,7 @@ public:
|
||||
{
|
||||
ParentType::guessInitial(fluidState, globalMolarities);
|
||||
|
||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||
// pressure. use something close to the reservoir pressure as initial guess
|
||||
fluidState.setPressure(phaseIdx, 100e5);
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
#include <opm/material/heatconduction/Somerton.hpp>
|
||||
#include <opm/material/binarycoefficients/Brine_CO2.hpp>
|
||||
#include <opm/material/common/UniformTabulated2DFunction.hpp>
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
|
||||
@@ -245,11 +246,11 @@ public:
|
||||
|
||||
temperatureLow_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemTemperatureLow);
|
||||
temperatureHigh_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemTemperatureHigh);
|
||||
nTemperature_ = EWOMS_GET_PARAM(TypeTag, int, FluidSystemNumTemperature);
|
||||
nTemperature_ = EWOMS_GET_PARAM(TypeTag, unsigned, FluidSystemNumTemperature);
|
||||
|
||||
nPressure_ = EWOMS_GET_PARAM(TypeTag, int, FluidSystemNumPressure);
|
||||
pressureLow_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemPressureLow);
|
||||
pressureHigh_ = EWOMS_GET_PARAM(TypeTag, Scalar, FluidSystemPressureHigh);
|
||||
nPressure_ = EWOMS_GET_PARAM(TypeTag, unsigned, FluidSystemNumPressure);
|
||||
|
||||
maxDepth_ = EWOMS_GET_PARAM(TypeTag, Scalar, MaxDepth);
|
||||
temperature_ = EWOMS_GET_PARAM(TypeTag, Scalar, Temperature);
|
||||
@@ -426,8 +427,9 @@ public:
|
||||
* In this case, we assume the rock-matrix to be granite.
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar heatCapacitySolid(const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
Scalar heatCapacitySolid(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{
|
||||
return 790 // specific heat capacity of granite [J / (kg K)]
|
||||
* 2700; // density of granite [kg/m^3]
|
||||
@@ -524,16 +526,20 @@ public:
|
||||
* everywhere.
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void source(RateVector& rate,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ rate = Scalar(0.0); }
|
||||
|
||||
//! \}
|
||||
|
||||
private:
|
||||
template <class Context, class FluidState>
|
||||
void initialFluidState_(FluidState &fs, const Context &context,
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
void initialFluidState_(FluidState& fs,
|
||||
const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
|
||||
|
||||
@@ -623,8 +629,8 @@ private:
|
||||
Scalar maxDepth_;
|
||||
Scalar eps_;
|
||||
|
||||
int nTemperature_;
|
||||
int nPressure_;
|
||||
unsigned nTemperature_;
|
||||
unsigned nPressure_;
|
||||
|
||||
Scalar pressureLow_, pressureHigh_;
|
||||
Scalar temperatureLow_, temperatureHigh_;
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#ifndef EWOMS_CUVETTE_PROBLEM_HH
|
||||
#define EWOMS_CUVETTE_PROBLEM_HH
|
||||
|
||||
#include <ewoms/models/pvs/pvsproperties.hh>
|
||||
|
||||
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
||||
#include <opm/material/fluidstates/ImmiscibleFluidState.hpp>
|
||||
#include <opm/material/fluidsystems/H2OAirMesityleneFluidSystem.hpp>
|
||||
@@ -36,8 +38,8 @@
|
||||
#include <opm/material/heatconduction/Somerton.hpp>
|
||||
#include <opm/material/constraintsolvers/MiscibleMultiPhaseComposition.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
|
||||
#include <ewoms/models/pvs/pvsproperties.hh>
|
||||
#include <opm/material/common/Valgrind.hpp>
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
|
||||
@@ -317,7 +319,9 @@ public:
|
||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar temperature(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return 293.15; /* [K] */ }
|
||||
|
||||
/*!
|
||||
@@ -365,15 +369,18 @@ public:
|
||||
*/
|
||||
template <class Context>
|
||||
const HeatConductionLawParams &
|
||||
heatConductionParams(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
heatConductionParams(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return heatCondParams_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::heatCapacitySolid
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar heatCapacitySolid(const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
Scalar heatCapacitySolid(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{
|
||||
return 850 // specific heat capacity [J / (kg K)]
|
||||
* 2650; // density of sand [kg/m^3]
|
||||
@@ -457,8 +464,10 @@ public:
|
||||
* everywhere.
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void source(RateVector& rate,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ rate = Scalar(0.0); }
|
||||
|
||||
//! \}
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
|
||||
#include <ewoms/models/ncp/ncpproperties.hh>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#include <ewoms/io/cubegridmanager.hh>
|
||||
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
@@ -38,7 +37,9 @@
|
||||
#include <opm/material/fluidsystems/H2ON2FluidSystem.hpp>
|
||||
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
||||
#include <opm/material/constraintsolvers/ComputeFromReferencePhase.hpp>
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/common/fvector.hh>
|
||||
#include <dune/common/fmatrix.hh>
|
||||
@@ -237,30 +238,37 @@ public:
|
||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||
*/
|
||||
template <class Context>
|
||||
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
const DimMatrix& intrinsicPermeability(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return K_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar porosity(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return 0.35; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::materialLawParams
|
||||
*/
|
||||
template <class Context>
|
||||
const MaterialLawParams &materialLawParams(const Context &context,
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
const MaterialLawParams&
|
||||
materialLawParams(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return materialParams_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar temperature(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return temperature_; }
|
||||
|
||||
//! \}
|
||||
@@ -276,8 +284,10 @@ public:
|
||||
* This problem sets no-flow boundaries everywhere.
|
||||
*/
|
||||
template <class Context>
|
||||
void boundary(BoundaryRateVector &values, const Context &context,
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
void boundary(BoundaryRateVector& values,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ values.setNoFlow(); }
|
||||
|
||||
//! \}
|
||||
@@ -291,7 +301,9 @@ public:
|
||||
* \copydoc FvBaseProblem::initial
|
||||
*/
|
||||
template <class Context>
|
||||
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||
void initial(PrimaryVariables& values,
|
||||
const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const auto& pos = context.pos(spaceIdx, timeIdx);
|
||||
@@ -308,8 +320,10 @@ public:
|
||||
* everywhere.
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void source(RateVector& rate,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ rate = Scalar(0.0); }
|
||||
|
||||
//! \}
|
||||
|
||||
@@ -28,9 +28,6 @@
|
||||
#ifndef EWOMS_FINGER_PROBLEM_HH
|
||||
#define EWOMS_FINGER_PROBLEM_HH
|
||||
|
||||
// uncomment to run problem in 3d
|
||||
// #define GRIDDIM 3
|
||||
|
||||
#include <ewoms/io/structuredgridmanager.hh>
|
||||
|
||||
#include <opm/material/fluidmatrixinteractions/RegularizedVanGenuchten.hpp>
|
||||
@@ -336,8 +333,8 @@ public:
|
||||
for (; elemIt != elemEndIt; ++elemIt) {
|
||||
const auto& elem = *elemIt;
|
||||
elemCtx.updateAll( elem );
|
||||
const int numDofs = elemCtx.numDof(/*timeIdx=*/0);
|
||||
for (int scvIdx = 0; scvIdx < numDofs; ++scvIdx)
|
||||
size_t numDofs = elemCtx.numDof(/*timeIdx=*/0);
|
||||
for (unsigned scvIdx = 0; scvIdx < numDofs; ++scvIdx)
|
||||
{
|
||||
MaterialLawParams& materialParam = materialLawParams( elemCtx, scvIdx, /*timeIdx=*/0 );
|
||||
const auto& fs = elemCtx.intensiveQuantities(scvIdx, /*timeIdx=*/0).fluidState();
|
||||
@@ -357,22 +354,21 @@ public:
|
||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar temperature(const Context& /*context*/, unsigned /*spaceIdx*/, unsigned /*timeIdx*/) const
|
||||
{ return temperature_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||
*/
|
||||
template <class Context>
|
||||
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
const DimMatrix& intrinsicPermeability(const Context& /*context*/, unsigned /*spaceIdx*/, unsigned /*timeIdx*/) const
|
||||
{ return K_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar porosity(const Context& /*context*/, unsigned /*spaceIdx*/, unsigned /*timeIdx*/) const
|
||||
{ return 0.4; }
|
||||
|
||||
/*!
|
||||
@@ -380,11 +376,11 @@ public:
|
||||
*/
|
||||
template <class Context>
|
||||
MaterialLawParams& materialLawParams(const Context& context,
|
||||
const int spaceIdx, const int timeIdx)
|
||||
unsigned spaceIdx, unsigned timeIdx)
|
||||
{
|
||||
const auto& entity = context.stencil(timeIdx).entity(spaceIdx);
|
||||
assert(materialParams_[entity]);
|
||||
return *(materialParams_[ entity ] );
|
||||
return *materialParams_[entity];
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -392,11 +388,11 @@ public:
|
||||
*/
|
||||
template <class Context>
|
||||
const MaterialLawParams& materialLawParams(const Context& context,
|
||||
const int spaceIdx, const int timeIdx) const
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
{
|
||||
const auto& entity = context.stencil(timeIdx).entity( spaceIdx );
|
||||
assert(materialParams_[entity]);
|
||||
return *(materialParams_[ entity ] );
|
||||
return *materialParams_[entity];
|
||||
}
|
||||
|
||||
//! \}
|
||||
@@ -441,8 +437,7 @@ public:
|
||||
* \copydoc FvBaseProblem::initial
|
||||
*/
|
||||
template <class Context>
|
||||
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void initial(PrimaryVariables& values, const Context& /*context*/, unsigned /*spaceIdx*/, unsigned /*timeIdx*/) const
|
||||
{
|
||||
// assign the primary variables
|
||||
values.assignNaive(initialFluidState_);
|
||||
@@ -474,8 +469,8 @@ public:
|
||||
* everywhere.
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void source(RateVector& rate, const Context& /*context*/,
|
||||
unsigned /*spaceIdx*/, unsigned /*timeIdx*/) const
|
||||
{ rate = Scalar(0.0); }
|
||||
//! \}
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#ifndef EWOMS_FRACTURE_PROBLEM_HH
|
||||
#define EWOMS_FRACTURE_PROBLEM_HH
|
||||
|
||||
|
||||
#if HAVE_DUNE_ALUGRID
|
||||
// avoid reordering of macro elements, otherwise this problem won't work
|
||||
#define DISABLE_ALUGRID_SFC_ORDERING 1
|
||||
@@ -40,16 +39,17 @@
|
||||
|
||||
#include <ewoms/models/discretefracture/discretefracturemodel.hh>
|
||||
#include <ewoms/io/dgfgridmanager.hh>
|
||||
|
||||
#include <opm/material/fluidmatrixinteractions/RegularizedBrooksCorey.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/RegularizedVanGenuchten.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
|
||||
#include <opm/material/heatconduction/Somerton.hpp>
|
||||
#include <opm/material/fluidsystems/TwoPhaseImmiscibleFluidSystem.hpp>
|
||||
#include <opm/material/components/SimpleH2O.hpp>
|
||||
#include <opm/material/components/Dnapl.hpp>
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/common/fmatrix.hh>
|
||||
@@ -316,7 +316,9 @@ public:
|
||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar temperature(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return temperature_; }
|
||||
|
||||
// \}
|
||||
@@ -330,8 +332,9 @@ public:
|
||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||
*/
|
||||
template <class Context>
|
||||
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
const DimMatrix& intrinsicPermeability(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return matrixK_; }
|
||||
|
||||
/*!
|
||||
@@ -340,16 +343,18 @@ public:
|
||||
* \copydoc Doxygen::contextParams
|
||||
*/
|
||||
template <class Context>
|
||||
const DimMatrix &fractureIntrinsicPermeability(const Context &context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
const DimMatrix& fractureIntrinsicPermeability(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return fractureK_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar porosity(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return matrixPorosity_; }
|
||||
|
||||
/*!
|
||||
@@ -358,16 +363,18 @@ public:
|
||||
* \copydoc Doxygen::contextParams
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar fracturePorosity(const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
Scalar fracturePorosity(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return fracturePorosity_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::materialLawParams
|
||||
*/
|
||||
template <class Context>
|
||||
const MaterialLawParams &materialLawParams(const Context &context,
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
const MaterialLawParams& materialLawParams(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return matrixMaterialParams_; }
|
||||
|
||||
/*!
|
||||
@@ -376,9 +383,9 @@ public:
|
||||
* \copydoc Doxygen::contextParams
|
||||
*/
|
||||
template <class Context>
|
||||
const MaterialLawParams &fractureMaterialLawParams(const Context &context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
const MaterialLawParams& fractureMaterialLawParams(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return fractureMaterialParams_; }
|
||||
|
||||
/*!
|
||||
@@ -400,8 +407,10 @@ public:
|
||||
* \param timeIdx The index used by the time discretization.
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar fractureWidth(const Context &context, unsigned spaceIdx1, unsigned spaceIdx2,
|
||||
unsigned timeIdx) const
|
||||
Scalar fractureWidth(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx1,
|
||||
unsigned OPM_UNUSED spaceIdx2,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return fractureWidth_; }
|
||||
|
||||
/*!
|
||||
@@ -409,7 +418,9 @@ public:
|
||||
*/
|
||||
template <class Context>
|
||||
const HeatConductionLawParams &
|
||||
heatConductionParams(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
heatConductionParams(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return heatCondParams_; }
|
||||
|
||||
/*!
|
||||
@@ -418,8 +429,9 @@ public:
|
||||
* In this case, we assume the rock-matrix to be granite.
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar heatCapacitySolid(const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
Scalar heatCapacitySolid(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{
|
||||
return 790 // specific heat capacity of granite [J / (kg K)]
|
||||
* 2700; // density of granite [kg/m^3]
|
||||
@@ -520,8 +532,10 @@ public:
|
||||
* \copydoc FvBaseProblem::initial
|
||||
*/
|
||||
template <class Context>
|
||||
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void initial(PrimaryVariables& values,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{
|
||||
FluidState fluidState;
|
||||
fluidState.setTemperature(temperature_);
|
||||
@@ -542,8 +556,10 @@ public:
|
||||
* everywhere.
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void source(RateVector& rate,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ rate = Scalar(0.0); }
|
||||
|
||||
// \}
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <opm/material/components/SimpleH2O.hpp>
|
||||
#include <opm/material/fluidstates/ImmiscibleFluidState.hpp>
|
||||
#include <opm/material/fluidsystems/LiquidPhase.hpp>
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
|
||||
@@ -263,25 +264,32 @@ public:
|
||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar temperature(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return 273.15 + 10; } // 10C
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar porosity(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return 0.4; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||
*/
|
||||
template <class Context>
|
||||
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||
const DimMatrix& intrinsicPermeability(const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
return isInLens_(context.pos(spaceIdx, timeIdx)) ? intrinsicPermLens_
|
||||
: intrinsicPerm_;
|
||||
if (isInLens_(context.pos(spaceIdx, timeIdx)))
|
||||
return intrinsicPermLens_;
|
||||
else
|
||||
return intrinsicPerm_;
|
||||
}
|
||||
|
||||
//! \}
|
||||
@@ -333,8 +341,10 @@ public:
|
||||
* \copydoc FvBaseProblem::initial
|
||||
*/
|
||||
template <class Context>
|
||||
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void initial(PrimaryVariables& values,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{
|
||||
// const GlobalPosition& globalPos = context.pos(spaceIdx, timeIdx);
|
||||
values[pressure0Idx] = 1.0e+5; // + 9.81*1.23*(20-globalPos[dim-1]);
|
||||
@@ -344,8 +354,10 @@ public:
|
||||
* \copydoc FvBaseProblem::source
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void source(RateVector& rate,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ rate = Scalar(0.0); }
|
||||
|
||||
//! \}
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/constraintsolvers/ComputeFromReferencePhase.hpp>
|
||||
#include <opm/material/heatconduction/Somerton.hpp>
|
||||
#include <opm/material/common/Valgrind.hpp>
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
|
||||
@@ -277,14 +279,18 @@ public:
|
||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar temperature(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return temperature_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||
*/
|
||||
template <class Context>
|
||||
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||
const DimMatrix&
|
||||
intrinsicPermeability(const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
|
||||
@@ -297,15 +303,19 @@ public:
|
||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar porosity(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return porosity_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::materialLawParams
|
||||
*/
|
||||
template <class Context>
|
||||
const MaterialLawParams &materialLawParams(const Context &context,
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
const MaterialLawParams&
|
||||
materialLawParams(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return materialParams_; }
|
||||
|
||||
/*!
|
||||
@@ -314,8 +324,9 @@ public:
|
||||
* In this case, we assume the rock-matrix to be quartz.
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar heatCapacitySolid(const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
Scalar heatCapacitySolid(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{
|
||||
return 850. // specific heat capacity [J / (kg K)]
|
||||
* 2650.; // density of sand [kg/m^3]
|
||||
@@ -332,8 +343,10 @@ public:
|
||||
* \copydoc FvBaseProblem::boundary
|
||||
*/
|
||||
template <class Context>
|
||||
void boundary(BoundaryRateVector &values, const Context &context,
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
void boundary(BoundaryRateVector& values,
|
||||
const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const auto& pos = context.pos(spaceIdx, timeIdx);
|
||||
|
||||
@@ -366,7 +379,9 @@ public:
|
||||
* \copydoc FvBaseProblem::initial
|
||||
*/
|
||||
template <class Context>
|
||||
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||
void initial(PrimaryVariables& values,
|
||||
const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
Opm::CompositionalFluidState<Scalar, FluidSystem> fs;
|
||||
@@ -385,8 +400,10 @@ public:
|
||||
* everywhere.
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void source(RateVector& rate,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ rate = Scalar(0.0); }
|
||||
|
||||
//! \}
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
#include <opm/material/fluidstates/ImmiscibleFluidState.hpp>
|
||||
#include <opm/material/components/SimpleH2O.hpp>
|
||||
#include <opm/material/components/Dnapl.hpp>
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/common/fvector.hh>
|
||||
@@ -325,7 +326,9 @@ public:
|
||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar porosity(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return 0.4; }
|
||||
|
||||
/*!
|
||||
@@ -346,7 +349,9 @@ public:
|
||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar temperature(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return temperature_; }
|
||||
|
||||
//! \}
|
||||
@@ -410,7 +415,9 @@ public:
|
||||
*/
|
||||
template <class Context>
|
||||
void boundary(BoundaryRateVector& values,
|
||||
const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
|
||||
|
||||
@@ -523,8 +530,10 @@ public:
|
||||
* everywhere.
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void source(RateVector& rate,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ rate = Scalar(0.0); }
|
||||
|
||||
//! \}
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/heatconduction/Somerton.hpp>
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
|
||||
@@ -195,11 +196,11 @@ public:
|
||||
// initialize the tables of the fluid system
|
||||
Scalar Tmin = temperature_ - 1.0;
|
||||
Scalar Tmax = temperature_ + 1.0;
|
||||
int nT = 3;
|
||||
unsigned nT = 3;
|
||||
|
||||
Scalar pmin = 1.0e5 * 0.75;
|
||||
Scalar pmax = 2.0e5 * 1.25;
|
||||
int np = 1000;
|
||||
unsigned np = 1000;
|
||||
|
||||
FluidSystem::init(Tmin, Tmax, nT, pmin, pmax, np);
|
||||
|
||||
@@ -298,14 +299,18 @@ public:
|
||||
* This problem simply assumes a constant temperature.
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar temperature(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return temperature_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||
*/
|
||||
template <class Context>
|
||||
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||
const DimMatrix&
|
||||
intrinsicPermeability(const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
if (isFineMaterial_(context.pos(spaceIdx, timeIdx)))
|
||||
@@ -317,7 +322,9 @@ public:
|
||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar porosity(const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
|
||||
if (isFineMaterial_(pos))
|
||||
@@ -330,8 +337,10 @@ public:
|
||||
* \copydoc FvBaseMultiPhaseProblem::materialLawParams
|
||||
*/
|
||||
template <class Context>
|
||||
const MaterialLawParams &materialLawParams(const Context &context,
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
const MaterialLawParams&
|
||||
materialLawParams(const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
|
||||
if (isFineMaterial_(pos))
|
||||
@@ -347,8 +356,9 @@ public:
|
||||
* medium is granite.
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar heatCapacitySolid(const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
Scalar heatCapacitySolid(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{
|
||||
return 790 // specific heat capacity of granite [J / (kg K)]
|
||||
* 2700; // density of granite [kg/m^3]
|
||||
@@ -359,7 +369,9 @@ public:
|
||||
*/
|
||||
template <class Context>
|
||||
const HeatConductionLawParams &
|
||||
heatConductionParams(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
heatConductionParams(const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
|
||||
if (isFineMaterial_(pos))
|
||||
@@ -378,8 +390,10 @@ public:
|
||||
* \copydoc FvBaseProblem::boundary
|
||||
*/
|
||||
template <class Context>
|
||||
void boundary(BoundaryRateVector &values, const Context &context,
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
void boundary(BoundaryRateVector& values,
|
||||
const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const auto& pos = context.pos(spaceIdx, timeIdx);
|
||||
|
||||
@@ -402,7 +416,9 @@ public:
|
||||
* \copydoc FvBaseProblem::initial
|
||||
*/
|
||||
template <class Context>
|
||||
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||
void initial(PrimaryVariables& values,
|
||||
const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const auto& matParams = materialLawParams(context, spaceIdx, timeIdx);
|
||||
@@ -416,8 +432,10 @@ public:
|
||||
* everywhere.
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void source(RateVector& rate,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ rate = 0.0; }
|
||||
|
||||
//! \}
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
||||
#include <opm/material/fluidsystems/H2ON2LiquidPhaseFluidSystem.hpp>
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
|
||||
@@ -194,7 +195,9 @@ public:
|
||||
* This problem assumes a temperature.
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar temperature(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return temperature_; } // in [K]
|
||||
|
||||
/*!
|
||||
@@ -203,8 +206,9 @@ public:
|
||||
* This problem uses a constant intrinsic permeability.
|
||||
*/
|
||||
template <class Context>
|
||||
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
const DimMatrix& intrinsicPermeability(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return perm_; }
|
||||
|
||||
/*!
|
||||
@@ -213,7 +217,9 @@ public:
|
||||
* This problem uses a constant porosity.
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar porosity(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return porosity_; }
|
||||
|
||||
#if 0
|
||||
@@ -288,7 +294,9 @@ public:
|
||||
* \copydoc FvBaseProblem::initial
|
||||
*/
|
||||
template <class Context>
|
||||
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||
void initial(PrimaryVariables& values,
|
||||
const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
Opm::CompositionalFluidState<Scalar, FluidSystem, /*storeEnthalpy=*/false> fs;
|
||||
@@ -304,8 +312,10 @@ public:
|
||||
* everywhere.
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void source(RateVector& rate,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ rate = Scalar(0.0); }
|
||||
|
||||
//! \}
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
#ifndef EWOMS_POWER_INJECTION_PROBLEM_HH
|
||||
#define EWOMS_POWER_INJECTION_PROBLEM_HH
|
||||
|
||||
#include <ewoms/models/immiscible/immisciblemodel.hh>
|
||||
#include <ewoms/io/cubegridmanager.hh>
|
||||
|
||||
#include <opm/material/fluidmatrixinteractions/RegularizedVanGenuchten.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp>
|
||||
@@ -36,10 +39,9 @@
|
||||
#include <opm/material/fluidstates/ImmiscibleFluidState.hpp>
|
||||
#include <opm/material/components/SimpleH2O.hpp>
|
||||
#include <opm/material/components/Air.hpp>
|
||||
#include <ewoms/models/immiscible/immisciblemodel.hh>
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#include <ewoms/io/cubegridmanager.hh>
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/common/fvector.hh>
|
||||
@@ -269,38 +271,46 @@ public:
|
||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||
*/
|
||||
template <class Context>
|
||||
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
const DimMatrix& intrinsicPermeability(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return K_; }
|
||||
|
||||
/*!
|
||||
* \copydoc ForchheimerBaseProblem::ergunCoefficient
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar ergunCoefficient(const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
Scalar ergunCoefficient(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return 0.3866; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar porosity(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return 0.558; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::materialLawParams
|
||||
*/
|
||||
template <class Context>
|
||||
const MaterialLawParams &materialLawParams(const Context &context,
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
const MaterialLawParams&
|
||||
materialLawParams(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return materialParams_; }
|
||||
|
||||
/*!
|
||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar temperature(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return temperature_; }
|
||||
|
||||
//! \}
|
||||
@@ -317,8 +327,10 @@ public:
|
||||
* left and a free-flow boundary on the right.
|
||||
*/
|
||||
template <class Context>
|
||||
void boundary(BoundaryRateVector &values, const Context &context,
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
void boundary(BoundaryRateVector& values,
|
||||
const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
|
||||
|
||||
@@ -348,8 +360,10 @@ public:
|
||||
* \copydoc FvBaseProblem::initial
|
||||
*/
|
||||
template <class Context>
|
||||
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void initial(PrimaryVariables& values,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{
|
||||
// assign the primary variables
|
||||
values.assignNaive(initialFluidState_);
|
||||
@@ -362,8 +376,10 @@ public:
|
||||
* everywhere.
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void source(RateVector& rate,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ rate = Scalar(0.0); }
|
||||
|
||||
//! \}
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
||||
#include <opm/material/fluidsystems/BlackOilFluidSystem.hpp>
|
||||
#include <opm/material/constraintsolvers/ComputeFromReferencePhase.hpp>
|
||||
|
||||
#include <opm/material/fluidsystems/blackoilpvt/DryGasPvt.hpp>
|
||||
#include <opm/material/fluidsystems/blackoilpvt/LiveOilPvt.hpp>
|
||||
#include <opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityWaterPvt.hpp>
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
|
||||
@@ -351,9 +351,9 @@ public:
|
||||
const auto& eEndIt = this->simulator().gridView().template end<0>();
|
||||
for (; eIt != eEndIt; ++eIt) {
|
||||
elemCtx.updateStencil(*eIt);
|
||||
int nDof = elemCtx.numPrimaryDof(/*timeIdx=*/0);
|
||||
for (int dofIdx = 0; dofIdx < nDof; ++ dofIdx) {
|
||||
int globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, /*timeIdx=*/0);
|
||||
size_t nDof = elemCtx.numPrimaryDof(/*timeIdx=*/0);
|
||||
for (unsigned dofIdx = 0; dofIdx < nDof; ++ dofIdx) {
|
||||
unsigned globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, /*timeIdx=*/0);
|
||||
const GlobalPosition& pos = elemCtx.pos(dofIdx, /*timeIdx=*/0);
|
||||
|
||||
if (isFineMaterial_(pos))
|
||||
@@ -481,7 +481,9 @@ public:
|
||||
* will need it one day?
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar temperature(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return temperature_; }
|
||||
|
||||
// \}
|
||||
@@ -498,8 +500,10 @@ public:
|
||||
* extraction and production wells, so all boundaries are no-flow.
|
||||
*/
|
||||
template <class Context>
|
||||
void boundary(BoundaryRateVector &values, const Context &context,
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
void boundary(BoundaryRateVector& values,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{
|
||||
// no flow on top and bottom
|
||||
values.setNoFlow();
|
||||
@@ -519,7 +523,10 @@ public:
|
||||
* the whole domain.
|
||||
*/
|
||||
template <class Context>
|
||||
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
void initial(PrimaryVariables& values,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{
|
||||
values.assignNaive(initialFluidState_);
|
||||
|
||||
@@ -561,8 +568,10 @@ public:
|
||||
* For this problem, the source term of all components is 0 everywhere.
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void source(RateVector& rate,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ rate = Scalar(0.0); }
|
||||
|
||||
//! \}
|
||||
@@ -643,8 +652,8 @@ private:
|
||||
injFs.setSaturation(gasPhaseIdx, 0.0);
|
||||
|
||||
// set the composition of the phases to immiscible
|
||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
||||
for (int compIdx = 0; compIdx < numComponents; ++compIdx)
|
||||
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
||||
for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx)
|
||||
injFs.setMoleFraction(phaseIdx, compIdx, 0.0);
|
||||
|
||||
injFs.setMoleFraction(gasPhaseIdx, gasCompIdx, 1.0);
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
|
||||
@@ -273,7 +274,7 @@ public:
|
||||
Scalar temperature(const Context& context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
{ return temperature(context.globalSpaceIndex(spaceIdx, timeIdx), timeIdx); }
|
||||
|
||||
Scalar temperature(unsigned globalSpaceIdx, unsigned timeIdx) const
|
||||
Scalar temperature(unsigned OPM_UNUSED globalSpaceIdx, unsigned OPM_UNUSED timeIdx) const
|
||||
{ return 273.15 + 10; } // -> 10°C
|
||||
|
||||
/*!
|
||||
@@ -294,7 +295,9 @@ public:
|
||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar porosity(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return 0.4; }
|
||||
|
||||
/*!
|
||||
@@ -309,7 +312,8 @@ public:
|
||||
return materialLawParams(globalSpaceIdx, timeIdx);
|
||||
}
|
||||
|
||||
const MaterialLawParams& materialLawParams(unsigned globalSpaceIdx, unsigned timeIdx) const
|
||||
const MaterialLawParams& materialLawParams(unsigned globalSpaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{
|
||||
if (dofIsInLens_[globalSpaceIdx])
|
||||
return lensMaterialParams_;
|
||||
@@ -329,7 +333,8 @@ public:
|
||||
|
||||
// the Richards model does not have an element context available at all places
|
||||
// where the reference pressure is required...
|
||||
Scalar referencePressure(unsigned globalSpaceIdx, unsigned timeIdx) const
|
||||
Scalar referencePressure(unsigned OPM_UNUSED globalSpaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return pnRef_; }
|
||||
|
||||
//! \}
|
||||
@@ -413,9 +418,9 @@ public:
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector& rate,
|
||||
const Context &context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ rate = Scalar(0.0); }
|
||||
|
||||
//! \}
|
||||
|
||||
@@ -28,7 +28,9 @@
|
||||
#define EWOMS_STOKES_2C_TEST_PROBLEM_HH
|
||||
|
||||
#include <ewoms/models/stokes/stokesmodel.hh>
|
||||
|
||||
#include <opm/material/fluidsystems/H2OAirFluidSystem.hpp>
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
|
||||
@@ -181,7 +183,9 @@ public:
|
||||
* This problem assumes a temperature of 10 degrees Celsius.
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar temperature(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return 273.15 + 10; /* -> 10 deg C */ }
|
||||
|
||||
// \}
|
||||
@@ -199,22 +203,22 @@ public:
|
||||
* upper edge.
|
||||
*/
|
||||
template <class Context>
|
||||
void boundary(BoundaryRateVector &values, const Context &context,
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
void boundary(BoundaryRateVector& values,
|
||||
const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const GlobalPosition& pos = context.pos(spaceIdx, timeIdx);
|
||||
|
||||
if (onLowerBoundary_(pos))
|
||||
values.setOutFlow(context, spaceIdx, timeIdx);
|
||||
else if (onUpperBoundary_(pos)) {
|
||||
else if (onUpperBoundary_(pos))
|
||||
// upper boundary is constraint!
|
||||
values = 0.0;
|
||||
}
|
||||
else {
|
||||
else
|
||||
// left and right boundaries
|
||||
values.setNoFlow(context, spaceIdx, timeIdx);
|
||||
}
|
||||
}
|
||||
|
||||
//! \}
|
||||
|
||||
@@ -231,7 +235,9 @@ public:
|
||||
* 0.5% is set.
|
||||
*/
|
||||
template <class Context>
|
||||
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||
void initial(PrimaryVariables& values,
|
||||
const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const GlobalPosition& globalPos = context.pos(spaceIdx, timeIdx);
|
||||
@@ -266,8 +272,10 @@ public:
|
||||
* is 0 everywhere.
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void source(RateVector& rate,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ rate = Scalar(0.0); }
|
||||
|
||||
/*!
|
||||
@@ -277,8 +285,10 @@ public:
|
||||
* initial conditions.
|
||||
*/
|
||||
template <class Context>
|
||||
void constraints(Constraints &constraints, const Context &context,
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
void constraints(Constraints& constraints,
|
||||
const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const auto& pos = context.pos(spaceIdx, timeIdx);
|
||||
|
||||
|
||||
@@ -29,7 +29,9 @@
|
||||
|
||||
#include <ewoms/models/stokes/stokesmodel.hh>
|
||||
#include <ewoms/io/simplexgridmanager.hh>
|
||||
|
||||
#include <opm/material/fluidsystems/H2OAirFluidSystem.hpp>
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
|
||||
@@ -276,8 +278,10 @@ public:
|
||||
* is 0 everywhere.
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void source(RateVector& rate,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ rate = Scalar(0.0); }
|
||||
|
||||
/*!
|
||||
@@ -287,8 +291,10 @@ public:
|
||||
* adjacent to the inlet.
|
||||
*/
|
||||
template <class Context>
|
||||
void constraints(Constraints &constraints, const Context &context,
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
void constraints(Constraints& constraints,
|
||||
const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const auto& pos = context.pos(spaceIdx, timeIdx);
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include <opm/material/fluidsystems/H2ON2FluidSystem.hpp>
|
||||
#include <opm/material/fluidsystems/GasPhase.hpp>
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
|
||||
@@ -175,7 +176,9 @@ public:
|
||||
* This problem assumes a constant temperature of 10 degrees Celsius.
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar temperature(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ return 273.15 + 10; } // -> 10 deg C
|
||||
|
||||
//! \}
|
||||
@@ -264,8 +267,10 @@ public:
|
||||
* is 0 everywhere.
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
void source(RateVector& rate,
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ rate = Scalar(0.0); }
|
||||
|
||||
/*!
|
||||
@@ -275,8 +280,10 @@ public:
|
||||
* velocity profile using constraints.
|
||||
*/
|
||||
template <class Context>
|
||||
void constraints(Constraints &constraints, const Context &context,
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
void constraints(Constraints& constraints,
|
||||
const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
const auto& pos = context.pos(spaceIdx, timeIdx);
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/heatconduction/Somerton.hpp>
|
||||
#include <opm/material/constraintsolvers/ComputeFromReferencePhase.hpp>
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
|
||||
@@ -343,7 +344,9 @@ public:
|
||||
* In this case, we assume the rock-matrix to be granite.
|
||||
*/
|
||||
template <class Context>
|
||||
Scalar heatCapacitySolid(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
Scalar heatCapacitySolid(const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{
|
||||
return
|
||||
790 // specific heat capacity of granite [J / (kg K)]
|
||||
@@ -432,7 +435,10 @@ public:
|
||||
* liquid water and assume hydrostatic pressure.
|
||||
*/
|
||||
template <class Context>
|
||||
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
void initial(PrimaryVariables& values,
|
||||
const Context& context,
|
||||
unsigned spaceIdx,
|
||||
unsigned timeIdx) const
|
||||
{
|
||||
Opm::CompositionalFluidState<Scalar, FluidSystem> fs;
|
||||
initialFluidState_(fs, context, spaceIdx, timeIdx);
|
||||
@@ -449,7 +455,9 @@ public:
|
||||
*/
|
||||
template <class Context>
|
||||
void source(RateVector& rate,
|
||||
const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||
const Context& OPM_UNUSED context,
|
||||
unsigned OPM_UNUSED spaceIdx,
|
||||
unsigned OPM_UNUSED timeIdx) const
|
||||
{ rate = 0; }
|
||||
|
||||
//! \}
|
||||
|
||||
@@ -200,31 +200,32 @@ public:
|
||||
|
||||
//! Returns the temperature at a given position.
|
||||
template <class Context>
|
||||
Scalar temperature(const Context &context, int spaceIdx, int timeIdx) const
|
||||
Scalar temperature(const Context& /*context*/,
|
||||
unsigned /*spaceIdx*/, unsigned /*timeIdx*/) const
|
||||
{ return 283.15; }
|
||||
|
||||
//! Returns the intrinsic permeability tensor [m^2] at a position.
|
||||
template <class Context>
|
||||
const DimMatrix &intrinsicPermeability(const Context &context, /*@\label{tutorial1:permeability}@*/
|
||||
int spaceIdx, int timeIdx) const
|
||||
const DimMatrix& intrinsicPermeability(const Context& /*context*/, /*@\label{tutorial1:permeability}@*/
|
||||
unsigned /*spaceIdx*/, unsigned /*timeIdx*/) const
|
||||
{ return K_; }
|
||||
|
||||
//! Defines the porosity [-] of the medium at a given position
|
||||
template <class Context>
|
||||
Scalar porosity(const Context &context,
|
||||
int spaceIdx, int timeIdx) const /*@\label{tutorial1:porosity}@*/
|
||||
Scalar porosity(const Context& /*context*/,
|
||||
unsigned /*spaceIdx*/, unsigned /*timeIdx*/) const /*@\label{tutorial1:porosity}@*/
|
||||
{ return 0.2; }
|
||||
|
||||
//! Returns the parameter object for the material law at a given position
|
||||
template <class Context>
|
||||
const MaterialLawParams &materialLawParams(const Context &context, /*@\label{tutorial1:matLawParams}@*/
|
||||
int spaceIdx, int timeIdx) const
|
||||
const MaterialLawParams& materialLawParams(const Context& /*context*/, /*@\label{tutorial1:matLawParams}@*/
|
||||
unsigned /*spaceIdx*/, unsigned /*timeIdx*/) const
|
||||
{ return materialParams_; }
|
||||
|
||||
//! Evaluates the boundary conditions.
|
||||
template <class Context>
|
||||
void boundary(BoundaryRateVector& values, const Context& context,
|
||||
int spaceIdx, int timeIdx) const
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
{
|
||||
const auto& pos = context.pos(spaceIdx, timeIdx);
|
||||
if (pos[0] < eps_) {
|
||||
@@ -261,8 +262,8 @@ public:
|
||||
//! position of the domain [kg/(m^3 * s)]. Positive values mean that
|
||||
//! mass is created.
|
||||
template <class Context>
|
||||
void source(RateVector &source, const Context &context, int spaceIdx,
|
||||
int timeIdx) const
|
||||
void source(RateVector& source, const Context& /*context*/,
|
||||
unsigned /*spaceIdx*/, unsigned /*timeIdx*/) const
|
||||
{
|
||||
source[contiWettingEqIdx] = 0.0;
|
||||
source[contiNonWettingEqIdx] = 0.0;
|
||||
@@ -270,8 +271,8 @@ public:
|
||||
|
||||
//! Evaluates the initial value at a given position in the domain.
|
||||
template <class Context>
|
||||
void initial(PrimaryVariables &values, const Context &context, int spaceIdx,
|
||||
int timeIdx) const
|
||||
void initial(PrimaryVariables& values, const Context& context,
|
||||
unsigned spaceIdx, unsigned timeIdx) const
|
||||
{
|
||||
Opm::ImmiscibleFluidState<Scalar, FluidSystem> fs;
|
||||
|
||||
@@ -285,8 +286,7 @@ public:
|
||||
|
||||
// set pressure of the wetting phase to 200 kPa = 2 bar
|
||||
Scalar pC[numPhases];
|
||||
MaterialLaw::capillaryPressures(pC, materialLawParams(context, spaceIdx,
|
||||
timeIdx),
|
||||
MaterialLaw::capillaryPressures(pC, materialLawParams(context, spaceIdx, timeIdx),
|
||||
fs);
|
||||
fs.setPressure(wettingPhaseIdx, 200e3);
|
||||
fs.setPressure(nonWettingPhaseIdx, 200e3 + pC[nonWettingPhaseIdx] - pC[nonWettingPhaseIdx]);
|
||||
|
||||
@@ -41,6 +41,14 @@
|
||||
|
||||
#include <ewoms/disc/vcfv/vcfvstencil.hh>
|
||||
|
||||
#include <opm/material/common/Unused.hpp>
|
||||
|
||||
#if HAVE_DUNE_ALUGRID
|
||||
#define EWOMS_NO_ALUGRID_UNUSED
|
||||
#else
|
||||
#define EWOMS_NO_ALUGRID_UNUSED OPM_UNUSED
|
||||
#endif
|
||||
|
||||
const unsigned dim = 3;
|
||||
typedef double Scalar;
|
||||
typedef Ewoms::QuadrialteralQuadratureGeometry<Scalar, dim> QuadratureGeom;
|
||||
@@ -102,7 +110,7 @@ void testIdenityMapping()
|
||||
}
|
||||
|
||||
template <class Grid>
|
||||
void writeTetrahedronSubControlVolumes(const Grid &grid)
|
||||
void writeTetrahedronSubControlVolumes(const Grid& EWOMS_NO_ALUGRID_UNUSED grid)
|
||||
{
|
||||
#if HAVE_DUNE_ALUGRID
|
||||
typedef typename Grid::LeafGridView GridView;
|
||||
@@ -134,14 +142,14 @@ void writeTetrahedronSubControlVolumes(const Grid &grid)
|
||||
}
|
||||
}
|
||||
|
||||
int cornerOffset = 0;
|
||||
unsigned cornerOffset = 0;
|
||||
eIt = gridView.template begin<0>();
|
||||
for (; eIt != eEndIt; ++eIt) {
|
||||
stencil.update(*eIt);
|
||||
for (unsigned scvIdx = 0; scvIdx < stencil.numDof(); ++scvIdx) {
|
||||
const auto &scvLocalGeom = stencil.subControlVolume(scvIdx).localGeometry();
|
||||
|
||||
std::vector<unsigned int> vertexIndices;
|
||||
std::vector<unsigned> vertexIndices;
|
||||
for (unsigned i = 0; i < scvLocalGeom.numCorners; ++i) {
|
||||
vertexIndices.push_back(cornerOffset);
|
||||
++cornerOffset;
|
||||
@@ -185,7 +193,7 @@ void testTetrahedron()
|
||||
}
|
||||
|
||||
template <class Grid>
|
||||
void writeCubeSubControlVolumes(const Grid &grid)
|
||||
void writeCubeSubControlVolumes(const Grid& EWOMS_NO_ALUGRID_UNUSED grid)
|
||||
{
|
||||
#if HAVE_DUNE_ALUGRID
|
||||
typedef typename Grid::LeafGridView GridView;
|
||||
@@ -215,7 +223,7 @@ void writeCubeSubControlVolumes(const Grid &grid)
|
||||
}
|
||||
}
|
||||
|
||||
int cornerOffset = 0;
|
||||
unsigned cornerOffset = 0;
|
||||
eIt = gridView.template begin<0>();
|
||||
for (; eIt != eEndIt; ++eIt) {
|
||||
stencil.update(*eIt);
|
||||
@@ -318,7 +326,7 @@ void testQuadrature()
|
||||
const auto &scvLocalGeom = stencil.subControlVolume(scvIdx).localGeometry();
|
||||
|
||||
Dune::GeometryType geomType = scvLocalGeom.type();
|
||||
static const int quadratureOrder = 2;
|
||||
static const unsigned quadratureOrder = 2;
|
||||
const auto &rule
|
||||
= Dune::QuadratureRules<Scalar, dim>::rule(geomType,
|
||||
quadratureOrder);
|
||||
|
||||
Reference in New Issue
Block a user