mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-21 16:57:25 -06:00
adapt to the changes in opm-material
This commit is contained in:
parent
1145e39559
commit
531d287eda
@ -21,8 +21,8 @@
|
||||
*
|
||||
* \copydoc Ewoms::TutorialProblemCoupled
|
||||
*/
|
||||
#ifndef EWOMS_TUTORIAL1_PROBLEM_HH // guardian macro /*@\label{tutorial-coupled:guardian1}@*/
|
||||
#define EWOMS_TUTORIAL1_PROBLEM_HH // guardian macro /*@\label{tutorial-coupled:guardian2}@*/
|
||||
#ifndef EWOMS_TUTORIAL1_PROBLEM_HH // guardian macro /*@\label{tutorial-coupled:guardian1}@*/
|
||||
#define EWOMS_TUTORIAL1_PROBLEM_HH // guardian macro /*@\label{tutorial-coupled:guardian2}@*/
|
||||
|
||||
// The numerical model
|
||||
#include <ewoms/models/immiscible/immisciblemodel.hh>
|
||||
@ -31,10 +31,10 @@
|
||||
#include <opm/material/components/SimpleH2O.hpp>
|
||||
#include <opm/material/components/Lnapl.hpp>
|
||||
|
||||
// The material laws
|
||||
#include <opm/material/fluidmatrixinteractions/2p/RegularizedBrooksCorey.hpp> /*@\label{tutorial-coupled:rawLawInclude}@*/
|
||||
#include <opm/material/fluidmatrixinteractions/2p/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2pAdapter.hpp>
|
||||
// Headers required for the capillary pressure law
|
||||
#include <opm/material/fluidmatrixinteractions/RegularizedBrooksCorey.hpp> /*@\label{tutorial-coupled:rawLawInclude}@*/
|
||||
#include <opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
|
||||
// For the DUNE grid
|
||||
#include <dune/grid/yaspgrid.hh> /*@\label{tutorial-coupled:include-grid-manager}@*/
|
||||
@ -76,21 +76,22 @@ SET_TYPE_PROP(TutorialProblemCoupled, NonwettingPhase, /*@\label{tutorial-coupl
|
||||
SET_PROP(TutorialProblemCoupled, MaterialLaw)
|
||||
{
|
||||
private:
|
||||
// Retrieve the C++ type used to represent scalar values
|
||||
// create a class holding the necessary information for a
|
||||
// two-phase capillary pressure law
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
// Select the base material law to be used
|
||||
typedef Opm::RegularizedBrooksCorey<Scalar> RawMaterialLaw; /*@\label{tutorial-coupled:rawlaw}@*/
|
||||
// Converts absolute saturations into effective ones before
|
||||
// passing it to the base material law
|
||||
typedef Opm::EffToAbsLaw<RawMaterialLaw> TwoPMaterialLaw; /*@\label{tutorial-coupled:eff2abs}@*/
|
||||
|
||||
// Retrieve the index of the wetting phase
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
enum { wPhaseIdx = FluidSystem::wPhaseIdx };
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::nPhaseIdx> Traits;
|
||||
|
||||
// define the material law which is parameterized by effective
|
||||
// saturations
|
||||
typedef Opm::RegularizedBrooksCorey<Traits> RawMaterialLaw; /*@\label{tutorial-coupled:rawlaw}@*/
|
||||
|
||||
public:
|
||||
// Convert two-phase material law into a general M-phase one.
|
||||
typedef Opm::TwoPAdapter<wPhaseIdx, TwoPMaterialLaw> type;
|
||||
// Convert absolute saturations into effective ones before passing
|
||||
// it to the base capillary pressure law
|
||||
typedef Opm::EffToAbsLaw<RawMaterialLaw> type; /*@\label{tutorial-coupled:eff2abs}@*/
|
||||
};
|
||||
|
||||
// Disable gravity
|
||||
@ -159,12 +160,15 @@ public:
|
||||
K_ = this->toDimMatrix_(1e-7);
|
||||
|
||||
// Parameters of the Brooks-Corey law
|
||||
materialParams_.setPe(500.0); // entry pressure [Pa] /*@\label{tutorial-coupled:setLawParams}@*/
|
||||
materialParams_.setEntryPressure(500.0); // entry pressure [Pa] /*@\label{tutorial-coupled:setLawParams}@*/
|
||||
materialParams_.setLambda(2); // shape parameter
|
||||
|
||||
// Set the residual saturations
|
||||
materialParams_.setSwr(0.0);
|
||||
materialParams_.setSnr(0.0);
|
||||
materialParams_.setResidualSaturation(wPhaseIdx, 0.0);
|
||||
materialParams_.setResidualSaturation(nPhaseIdx, 0.0);
|
||||
|
||||
// wrap up the initialization of the material law's parameters
|
||||
materialParams_.finalize();
|
||||
}
|
||||
|
||||
//! Specifies the problem name. This is used for files generated by the simulation.
|
||||
|
@ -31,10 +31,10 @@
|
||||
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
||||
#include <opm/material/fluidstates/ImmiscibleFluidState.hpp>
|
||||
#include <opm/material/constraintsolvers/ComputeFromReferencePhase.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/RegularizedBrooksCorey.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2pAdapter.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/RegularizedBrooksCorey.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/heatconduction/Somerton.hpp>
|
||||
#include <opm/material/binarycoefficients/Brine_CO2.hpp>
|
||||
#include <opm/material/StaticTabulated2dFunction.hpp>
|
||||
@ -49,18 +49,15 @@
|
||||
#include <string>
|
||||
|
||||
namespace Ewoms {
|
||||
|
||||
template <class TypeTag>
|
||||
class Co2InjectionProblem;
|
||||
|
||||
namespace Co2Injection {
|
||||
#include <opm/material/components/co2tables.inc>
|
||||
}
|
||||
} // namespace Ewoms
|
||||
}} // namespace Ewoms
|
||||
|
||||
namespace Opm {
|
||||
namespace Properties {
|
||||
|
||||
NEW_TYPE_TAG(Co2InjectionBaseProblem);
|
||||
|
||||
// declare the CO2 injection problem specific property tags
|
||||
@ -97,18 +94,19 @@ public:
|
||||
SET_PROP(Co2InjectionBaseProblem, MaterialLaw)
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::lPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::gPhaseIdx> Traits;
|
||||
|
||||
// define the material law which is parameterized by effective
|
||||
// saturations
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef Opm::RegularizedBrooksCorey<Scalar> EffMaterialLaw;
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::EffToAbsLaw<EffMaterialLaw> TwoPMaterialLaw;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
enum { lPhaseIdx = FluidSystem::lPhaseIdx };
|
||||
typedef Opm::RegularizedBrooksCorey<Traits> EffMaterialLaw;
|
||||
|
||||
public:
|
||||
typedef Opm::TwoPAdapter<lPhaseIdx, TwoPMaterialLaw> type;
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::EffToAbsLaw<EffMaterialLaw> type;
|
||||
};
|
||||
|
||||
// Set the heat conduction law
|
||||
@ -266,17 +264,20 @@ public:
|
||||
coarsePorosity_ = 0.3;
|
||||
|
||||
// residual saturations
|
||||
fineMaterialParams_.setSwr(0.2);
|
||||
fineMaterialParams_.setSnr(0.0);
|
||||
coarseMaterialParams_.setSwr(0.2);
|
||||
coarseMaterialParams_.setSnr(0.0);
|
||||
fineMaterialParams_.setResidualSaturation(lPhaseIdx, 0.2);
|
||||
fineMaterialParams_.setResidualSaturation(gPhaseIdx, 0.0);
|
||||
coarseMaterialParams_.setResidualSaturation(lPhaseIdx, 0.2);
|
||||
coarseMaterialParams_.setResidualSaturation(gPhaseIdx, 0.0);
|
||||
|
||||
// parameters for the Brooks-Corey law
|
||||
fineMaterialParams_.setPe(1e4);
|
||||
coarseMaterialParams_.setPe(5e3);
|
||||
fineMaterialParams_.setEntryPressure(1e4);
|
||||
coarseMaterialParams_.setEntryPressure(5e3);
|
||||
fineMaterialParams_.setLambda(2.0);
|
||||
coarseMaterialParams_.setLambda(2.0);
|
||||
|
||||
fineMaterialParams_.finalize();
|
||||
coarseMaterialParams_.finalize();
|
||||
|
||||
// parameters for the somerton law of heat conduction
|
||||
computeHeatCondParams_(fineHeatCondParams_, finePorosity_);
|
||||
computeHeatCondParams_(coarseHeatCondParams_, coarsePorosity_);
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <opm/material/fluidsystems/H2OAirMesityleneFluidSystem.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/3p/3pParkerVanGenuchten.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/3pAdapter.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MpLinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
#include <opm/material/heatconduction/Somerton.hpp>
|
||||
#include <opm/material/constraintsolvers/MiscibleMultiPhaseComposition.hpp>
|
||||
|
||||
|
@ -27,7 +27,8 @@
|
||||
#include <ewoms/models/ncp/ncpproperties.hh>
|
||||
#include <ewoms/io/cubegridcreator.hh>
|
||||
|
||||
#include <opm/material/fluidmatrixinteractions/MpLinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/fluidsystems/H2ON2FluidSystem.hpp>
|
||||
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
||||
#include <opm/material/constraintsolvers/ComputeFromReferencePhase.hpp>
|
||||
@ -39,15 +40,11 @@
|
||||
#include <string>
|
||||
|
||||
namespace Ewoms {
|
||||
|
||||
template <class TypeTag>
|
||||
class DiffusionProblem;
|
||||
}
|
||||
|
||||
namespace Opm {
|
||||
//////////
|
||||
// Specify the properties for the powerInjection problem
|
||||
//////////
|
||||
namespace Properties {
|
||||
|
||||
NEW_TYPE_TAG(DiffusionBaseProblem);
|
||||
@ -78,8 +75,16 @@ private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
|
||||
static_assert(FluidSystem::numPhases == 2,
|
||||
"A fluid system with two phases is required "
|
||||
"for this problem!");
|
||||
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::lPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::gPhaseIdx> Traits;
|
||||
|
||||
public:
|
||||
typedef Opm::MpLinearMaterial<FluidSystem::numPhases, Scalar> type;
|
||||
typedef Opm::LinearMaterial<Traits> type;
|
||||
};
|
||||
|
||||
// Enable molecular diffusion for this problem
|
||||
@ -102,8 +107,8 @@ SET_SCALAR_PROP(DiffusionBaseProblem, EndTime, 1e6);
|
||||
|
||||
// The default for the initial time step size of the simulation
|
||||
SET_SCALAR_PROP(DiffusionBaseProblem, InitialTimeStepSize, 1000);
|
||||
} // namespace Properties
|
||||
} // namespace Opm
|
||||
}} // namespace Opm, Properties
|
||||
|
||||
|
||||
namespace Ewoms {
|
||||
/*!
|
||||
@ -167,6 +172,8 @@ public:
|
||||
|
||||
temperature_ = 273.15 + 20.0;
|
||||
|
||||
materialParams_.finalize();
|
||||
|
||||
K_ = this->toDimMatrix_(1e-12); // [m^2]
|
||||
|
||||
setupInitialFluidStates_();
|
||||
|
@ -26,11 +26,11 @@
|
||||
|
||||
#include "fingergridcreator.hh"
|
||||
|
||||
#include <opm/material/fluidmatrixinteractions/2p/RegularizedVanGenuchten.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/ParkerLenhard.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2pAdapter.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/RegularizedVanGenuchten.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/ParkerLenhard.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
|
||||
#include <opm/material/fluidsystems/2pImmiscibleFluidSystem.hpp>
|
||||
#include <opm/material/fluidstates/ImmiscibleFluidState.hpp>
|
||||
@ -51,9 +51,6 @@ class FingerProblem;
|
||||
}
|
||||
|
||||
namespace Opm {
|
||||
//////////
|
||||
// Specify the properties for the finger problem
|
||||
//////////
|
||||
namespace Properties {
|
||||
NEW_TYPE_TAG(FingerBaseProblem);
|
||||
|
||||
@ -91,15 +88,14 @@ public:
|
||||
SET_PROP(FingerBaseProblem, MaterialLaw)
|
||||
{
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::nPhaseIdx> Traits;
|
||||
|
||||
// use the parker-lenhard hysteresis law
|
||||
typedef Opm::ParkerLenhard<Scalar> TwoPMaterialLaw;
|
||||
typedef Opm::ParkerLenhard<Scalar> ParkerLenhard;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
enum { wPhaseIdx = FluidSystem::wPhaseIdx };
|
||||
|
||||
typedef Opm::TwoPAdapter<wPhaseIdx, TwoPMaterialLaw> type;
|
||||
typedef Opm::ParkerLenhard<Traits> ParkerLenhard;
|
||||
typedef ParkerLenhard type;
|
||||
};
|
||||
|
||||
// Enable partial reassembly of the jacobian matrix?
|
||||
@ -249,9 +245,11 @@ public:
|
||||
// and the main drainage curves.
|
||||
micParams_.setVgAlpha(0.0037);
|
||||
micParams_.setVgN(4.7);
|
||||
micParams_.finalize();
|
||||
|
||||
mdcParams_.setVgAlpha(0.0037);
|
||||
mdcParams_.setVgN(4.7);
|
||||
mdcParams_.finalize();
|
||||
|
||||
// initialize the material parameter objects of the individual
|
||||
// finite volumes
|
||||
@ -262,6 +260,7 @@ public:
|
||||
materialParams_[i].setMdcParams(&mdcParams_);
|
||||
materialParams_[i].setSwr(0.0);
|
||||
materialParams_[i].setSnr(0.1);
|
||||
materialParams_[i].finalize();
|
||||
ParkerLenhard::reset(materialParams_[i]);
|
||||
}
|
||||
|
||||
@ -288,8 +287,7 @@ public:
|
||||
for (int scvIdx = 0; scvIdx < elemCtx.numScv(); ++scvIdx) {
|
||||
int globalIdx = elemCtx.globalSpaceIndex(scvIdx, /*timeIdx=*/0);
|
||||
const auto &fs = elemCtx.volVars(scvIdx, /*timeIdx=*/0).fluidState();
|
||||
ParkerLenhard::update(materialParams_[globalIdx],
|
||||
fs.saturation(wPhaseIdx));
|
||||
ParkerLenhard::update(materialParams_[globalIdx], fs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,11 +27,12 @@
|
||||
#include <ewoms/parallel/mpihelper.hh>
|
||||
#include <dune/grid/alugrid.hh>
|
||||
|
||||
#include <opm/material/fluidmatrixinteractions/2p/RegularizedBrooksCorey.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/RegularizedVanGenuchten.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2pAdapter.hpp>
|
||||
#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/2pImmiscibleFluidSystem.hpp>
|
||||
#include <opm/material/components/SimpleH2O.hpp>
|
||||
@ -92,20 +93,20 @@ public:
|
||||
SET_PROP(FractureProblem, MaterialLaw)
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::nPhaseIdx> Traits;
|
||||
|
||||
// define the material law which is parameterized by effective
|
||||
// saturations
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef Opm::RegularizedBrooksCorey<Scalar> EffectiveLaw;
|
||||
//typedef RegularizedVanGenuchten<Scalar> EffectiveLaw;
|
||||
//typedef LinearMaterial<Scalar> EffectiveLaw;
|
||||
//typedef EffToAbsLaw<EffectiveLaw> TwoPMaterialLaw;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
enum { wPhaseIdx = FluidSystem::wPhaseIdx };
|
||||
typedef Opm::EffToAbsLaw<EffectiveLaw> TwoPMaterialLaw;
|
||||
typedef Opm::RegularizedBrooksCorey<Traits> EffectiveLaw;
|
||||
//typedef RegularizedVanGenuchten<Traits> EffectiveLaw;
|
||||
//typedef LinearMaterial<Traits> EffectiveLaw;
|
||||
|
||||
public:
|
||||
typedef Opm::TwoPAdapter<wPhaseIdx, TwoPMaterialLaw> type;
|
||||
typedef Opm::EffToAbsLaw<EffectiveLaw> type;
|
||||
};
|
||||
|
||||
// Enable the energy equation
|
||||
@ -211,10 +212,10 @@ public:
|
||||
eps_ = 3e-6;
|
||||
temperature_ = 273.15 + 20; // -> 20°C
|
||||
|
||||
matrixMaterialParams_.setSwr(0.0);
|
||||
matrixMaterialParams_.setSnr(0.0);
|
||||
fractureMaterialParams_.setSwr(0.0);
|
||||
fractureMaterialParams_.setSnr(0.0);
|
||||
matrixMaterialParams_.setResidualSaturation(wPhaseIdx, 0.0);
|
||||
matrixMaterialParams_.setResidualSaturation(nPhaseIdx, 0.0);
|
||||
fractureMaterialParams_.setResidualSaturation(wPhaseIdx, 0.0);
|
||||
fractureMaterialParams_.setResidualSaturation(nPhaseIdx, 0.0);
|
||||
|
||||
#if 0 // linear
|
||||
matrixMaterialParams_.setEntryPC(0.0);
|
||||
@ -224,10 +225,10 @@ public:
|
||||
#endif
|
||||
|
||||
#if 1 // Brooks-Corey
|
||||
matrixMaterialParams_.setPe(2000);
|
||||
matrixMaterialParams_.setEntryPressure(2000);
|
||||
matrixMaterialParams_.setLambda(2.0);
|
||||
matrixMaterialParams_.setThresholdSw(1e-1);
|
||||
fractureMaterialParams_.setPe(1000);
|
||||
fractureMaterialParams_.setEntryPressure(1000);
|
||||
fractureMaterialParams_.setLambda(2.0);
|
||||
fractureMaterialParams_.setThresholdSw(5e-2);
|
||||
#endif
|
||||
@ -239,6 +240,9 @@ public:
|
||||
fractureMaterialParams_.setVgN(4.7);
|
||||
#endif
|
||||
|
||||
matrixMaterialParams_.finalize();
|
||||
fractureMaterialParams_.finalize();
|
||||
|
||||
matrixK_ = this->toDimMatrix_(1e-15); //m^2
|
||||
fractureK_ = this->toDimMatrix_(1e5*1e-15); //m^2
|
||||
|
||||
|
@ -29,10 +29,10 @@
|
||||
#include <ewoms/models/immiscible/immiscibleproperties.hh>
|
||||
#include <ewoms/linear/parallelamgbackend.hh>
|
||||
|
||||
#include <opm/material/fluidmatrixinteractions/2p/RegularizedVanGenuchten.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2pAdapter.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/fluidsystems/2pImmiscibleFluidSystem.hpp>
|
||||
#include <opm/material/fluidstates/ImmiscibleFluidState.hpp>
|
||||
#include <opm/material/components/SimpleH2O.hpp>
|
||||
@ -94,18 +94,19 @@ public:
|
||||
SET_PROP(LensBaseProblem, MaterialLaw)
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::nPhaseIdx> Traits;
|
||||
|
||||
// define the material law which is parameterized by effective
|
||||
// saturations
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef Opm::RegularizedVanGenuchten<Scalar> EffectiveLaw;
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::EffToAbsLaw<EffectiveLaw> TwoPMaterialLaw;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
enum { wPhaseIdx = FluidSystem::wPhaseIdx };
|
||||
typedef Opm::RegularizedVanGenuchten<Traits> EffectiveLaw;
|
||||
|
||||
public:
|
||||
typedef Opm::TwoPAdapter<wPhaseIdx, TwoPMaterialLaw> type;
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::EffToAbsLaw<EffectiveLaw> type;
|
||||
};
|
||||
|
||||
// Use the algebraic multi-grid linear solver for this problem
|
||||
@ -244,6 +245,9 @@ public:
|
||||
outerMaterialParams_.setVgAlpha(0.0037);
|
||||
outerMaterialParams_.setVgN(4.7);
|
||||
|
||||
lensMaterialParams_.finalize();
|
||||
outerMaterialParams_.finalize();
|
||||
|
||||
lensK_ = this->toDimMatrix_(9.05e-12);
|
||||
outerK_ = this->toDimMatrix_(4.6e-10);
|
||||
|
||||
|
@ -86,8 +86,7 @@ SET_SCALAR_PROP(NavierStokesTestProblem, InitialTimeStepSize, 1e-3);
|
||||
|
||||
// Default grid file to load
|
||||
SET_STRING_PROP(NavierStokesTestProblem, GridFile, "grids/test_navierstokes.dgf");
|
||||
} // namespace Properties
|
||||
} // namespace Opm
|
||||
}}
|
||||
|
||||
namespace Ewoms {
|
||||
/*!
|
||||
|
@ -29,12 +29,10 @@
|
||||
#include <opm/material/fluidsystems/H2ON2FluidSystem.hpp>
|
||||
#include <opm/material/constraintsolvers/ComputeFromReferencePhase.hpp>
|
||||
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/RegularizedLinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/RegularizedBrooksCorey.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MpLinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2pAdapter.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/RegularizedBrooksCorey.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/heatconduction/Somerton.hpp>
|
||||
|
||||
#include <dune/grid/io/file/dgfparser/dgfug.hh>
|
||||
@ -74,19 +72,18 @@ SET_TYPE_PROP(ObstacleBaseProblem,
|
||||
SET_PROP(ObstacleBaseProblem, MaterialLaw)
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
enum {
|
||||
lPhaseIdx = FluidSystem::lPhaseIdx,
|
||||
gPhaseIdx = FluidSystem::gPhaseIdx
|
||||
};
|
||||
// define the material law
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
// typedef RegularizedBrooksCorey<Scalar> EffMaterialLaw;
|
||||
typedef Opm::RegularizedLinearMaterial<Scalar> EffMaterialLaw;
|
||||
typedef Opm::EffToAbsLaw<EffMaterialLaw> TwoPMaterialLaw;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::lPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::gPhaseIdx>
|
||||
MaterialTraits;
|
||||
|
||||
typedef Opm::LinearMaterial<MaterialTraits> EffMaterialLaw;
|
||||
|
||||
public:
|
||||
typedef Opm::TwoPAdapter<lPhaseIdx, TwoPMaterialLaw> type;
|
||||
typedef Opm::EffToAbsLaw<EffMaterialLaw> type;
|
||||
};
|
||||
|
||||
// Set the heat conduction law
|
||||
@ -210,28 +207,31 @@ public:
|
||||
coarsePorosity_ = 0.3;
|
||||
|
||||
// residual saturations
|
||||
fineMaterialParams_.setSwr(0.0);
|
||||
fineMaterialParams_.setSnr(0.0);
|
||||
coarseMaterialParams_.setSwr(0.0);
|
||||
coarseMaterialParams_.setSnr(0.0);
|
||||
fineMaterialParams_.setResidualSaturation(lPhaseIdx, 0.0);
|
||||
fineMaterialParams_.setResidualSaturation(gPhaseIdx, 0.0);
|
||||
coarseMaterialParams_.setResidualSaturation(lPhaseIdx, 0.0);
|
||||
coarseMaterialParams_.setResidualSaturation(gPhaseIdx, 0.0);
|
||||
|
||||
// parameters for the linear law, i.e. minimum and maximum
|
||||
// pressures
|
||||
fineMaterialParams_.setEntryPC(0.0);
|
||||
coarseMaterialParams_.setEntryPC(0.0);
|
||||
fineMaterialParams_.setMaxPC(0.0);
|
||||
coarseMaterialParams_.setMaxPC(0.0);
|
||||
fineMaterialParams_.setPcMinSat(lPhaseIdx,0.0);
|
||||
fineMaterialParams_.setPcMaxSat(lPhaseIdx,0.0);
|
||||
coarseMaterialParams_.setPcMinSat(lPhaseIdx,0.0);
|
||||
coarseMaterialParams_.setPcMaxSat(lPhaseIdx,0.0);
|
||||
|
||||
/*
|
||||
// entry pressures for Brooks-Corey
|
||||
fineMaterialParams_.setPe(5e3);
|
||||
coarseMaterialParams_.setPe(1e3);
|
||||
fineMaterialParams_.setEntryPressure(5e3);
|
||||
coarseMaterialParams_.setEntryPressure(1e3);
|
||||
|
||||
// Brooks-Corey shape parameters
|
||||
fineMaterialParams_.setLambda(2);
|
||||
coarseMaterialParams_.setLambda(2);
|
||||
*/
|
||||
|
||||
fineMaterialParams_.finalize();
|
||||
coarseMaterialParams_.finalize();
|
||||
|
||||
// parameters for the somerton law of heat conduction
|
||||
computeHeatCondParams_(fineHeatCondParams_, finePorosity_);
|
||||
computeHeatCondParams_(coarseHeatCondParams_, coarsePorosity_);
|
||||
|
@ -24,10 +24,10 @@
|
||||
#ifndef EWOMS_POWER_INJECTION_PROBLEM_HH
|
||||
#define EWOMS_POWER_INJECTION_PROBLEM_HH
|
||||
|
||||
#include <opm/material/fluidmatrixinteractions/2p/RegularizedVanGenuchten.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2pAdapter.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/fluidsystems/2pImmiscibleFluidSystem.hpp>
|
||||
#include <opm/material/fluidstates/ImmiscibleFluidState.hpp>
|
||||
#include <opm/material/components/SimpleH2O.hpp>
|
||||
@ -83,18 +83,19 @@ public:
|
||||
SET_PROP(PowerInjectionBaseProblem, MaterialLaw)
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::nPhaseIdx> Traits;
|
||||
|
||||
// define the material law which is parameterized by effective
|
||||
// saturations
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef Opm::RegularizedVanGenuchten<Scalar> EffectiveLaw;
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::EffToAbsLaw<EffectiveLaw> TwoPMaterialLaw;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
enum { wPhaseIdx = FluidSystem::wPhaseIdx };
|
||||
typedef Opm::RegularizedVanGenuchten<Traits> EffectiveLaw;
|
||||
|
||||
public:
|
||||
typedef Opm::TwoPAdapter<wPhaseIdx, TwoPMaterialLaw> type;
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::EffToAbsLaw<EffectiveLaw> type;
|
||||
};
|
||||
|
||||
// Write out the filter velocities for this problem
|
||||
@ -190,6 +191,7 @@ public:
|
||||
// alpha and n
|
||||
materialParams_.setVgAlpha(0.00045);
|
||||
materialParams_.setVgN(7.3);
|
||||
materialParams_.finalize();
|
||||
|
||||
K_ = this->toDimMatrix_(5.73e-08); // [m^2]
|
||||
|
||||
|
@ -26,7 +26,8 @@
|
||||
|
||||
#include <ewoms/models/blackoil/blackoilproperties.hh>
|
||||
|
||||
#include <opm/material/fluidmatrixinteractions/MpLinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
||||
|
||||
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
|
||||
@ -69,8 +70,13 @@ private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
|
||||
typedef Opm::ThreePhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::oPhaseIdx,
|
||||
/*gasPhaseIdx=*/FluidSystem::gPhaseIdx> Traits;
|
||||
|
||||
public:
|
||||
typedef Opm::MpLinearMaterial<FluidSystem::numPhases, Scalar> type;
|
||||
typedef Opm::LinearMaterial<Traits> type;
|
||||
};
|
||||
|
||||
// Write the Newton convergence behavior to disk?
|
||||
@ -275,15 +281,14 @@ public:
|
||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
|
||||
fineMaterialParams_.setPcMinSat(phaseIdx, 0.0);
|
||||
fineMaterialParams_.setPcMaxSat(phaseIdx, 0.0);
|
||||
fineMaterialParams_.setResidSat(phaseIdx, 0.0);
|
||||
|
||||
coarseMaterialParams_.setPcMinSat(phaseIdx, 0.0);
|
||||
coarseMaterialParams_.setPcMaxSat(phaseIdx, 0.0);
|
||||
coarseMaterialParams_.setResidSat(phaseIdx, 0.0);
|
||||
}
|
||||
|
||||
fineMaterialParams_.setResidSat(oPhaseIdx, 0.01);
|
||||
coarseMaterialParams_.setResidSat(oPhaseIdx, 0.01);
|
||||
// wrap up the initialization of the material law's parameters
|
||||
fineMaterialParams_.finalize();
|
||||
coarseMaterialParams_.finalize();
|
||||
|
||||
initFluidState_();
|
||||
}
|
||||
|
@ -28,10 +28,10 @@
|
||||
|
||||
#include <opm/material/components/SimpleH2O.hpp>
|
||||
#include <opm/material/fluidsystems/LiquidPhase.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/RegularizedVanGenuchten.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2pAdapter.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 <dune/grid/io/file/dgfparser.hh>
|
||||
|
||||
@ -67,18 +67,19 @@ public:
|
||||
SET_PROP(RichardsLensProblem, MaterialLaw)
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::wPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::nPhaseIdx> Traits;
|
||||
|
||||
// define the material law which is parameterized by effective
|
||||
// saturations
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef Opm::RegularizedVanGenuchten<Scalar> EffectiveLaw;
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::EffToAbsLaw<EffectiveLaw> TwoPMaterialLaw;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
enum { wPhaseIdx = FluidSystem::wPhaseIdx };
|
||||
typedef Opm::RegularizedVanGenuchten<Traits> EffectiveLaw;
|
||||
|
||||
public:
|
||||
typedef Opm::TwoPAdapter<wPhaseIdx, TwoPMaterialLaw> type;
|
||||
// define the material law parameterized by absolute saturations
|
||||
typedef Opm::EffToAbsLaw<EffectiveLaw> type;
|
||||
};
|
||||
|
||||
// Enable gravitational acceleration
|
||||
@ -192,8 +193,11 @@ public:
|
||||
// alpha and n
|
||||
lensMaterialParams_.setVgAlpha(0.00045);
|
||||
lensMaterialParams_.setVgN(7.3);
|
||||
lensMaterialParams_.finalize();
|
||||
|
||||
outerMaterialParams_.setVgAlpha(0.0037);
|
||||
outerMaterialParams_.setVgN(4.7);
|
||||
outerMaterialParams_.finalize();
|
||||
|
||||
// parameters for the linear law
|
||||
// minimum and maximum pressures
|
||||
|
@ -29,10 +29,10 @@
|
||||
#include <opm/material/fluidsystems/H2OAirFluidSystem.hpp>
|
||||
#include <opm/material/fluidstates/ImmiscibleFluidState.hpp>
|
||||
#include <opm/material/fluidstates/CompositionalFluidState.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/RegularizedBrooksCorey.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2p/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/2pAdapter.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/LinearMaterial.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/RegularizedBrooksCorey.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/EffToAbsLaw.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
|
||||
#include <opm/material/heatconduction/Somerton.hpp>
|
||||
#include <opm/material/constraintsolvers/ComputeFromReferencePhase.hpp>
|
||||
|
||||
@ -65,21 +65,20 @@ SET_TYPE_PROP(WaterAirBaseProblem, Problem, Ewoms::WaterAirProblem<TypeTag>);
|
||||
SET_PROP(WaterAirBaseProblem, MaterialLaw)
|
||||
{
|
||||
private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
typedef Opm::TwoPhaseMaterialTraits<Scalar,
|
||||
/*wettingPhaseIdx=*/FluidSystem::lPhaseIdx,
|
||||
/*nonWettingPhaseIdx=*/FluidSystem::gPhaseIdx> Traits;
|
||||
|
||||
// define the material law which is parameterized by effective
|
||||
// saturations
|
||||
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
|
||||
typedef Opm::RegularizedBrooksCorey<Scalar> EffMaterialLaw;
|
||||
|
||||
// define the material law parameterized by absolute saturations
|
||||
// which uses the two-phase API
|
||||
typedef Opm::EffToAbsLaw<EffMaterialLaw> TwoPMaterialLaw;
|
||||
|
||||
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
|
||||
enum { lPhaseIdx = FluidSystem::lPhaseIdx };
|
||||
typedef Opm::RegularizedBrooksCorey<Traits> EffMaterialLaw;
|
||||
|
||||
public:
|
||||
// define the type of the generic material law
|
||||
typedef Opm::TwoPAdapter<lPhaseIdx, TwoPMaterialLaw> type;
|
||||
// define the material law parameterized by absolute saturations
|
||||
// which uses the two-phase API
|
||||
typedef Opm::EffToAbsLaw<EffMaterialLaw> type;
|
||||
};
|
||||
|
||||
// Set the heat conduction law
|
||||
@ -228,17 +227,20 @@ public:
|
||||
coarsePorosity_ = 0.3;
|
||||
|
||||
// residual saturations
|
||||
fineMaterialParams_.setSwr(0.2);
|
||||
fineMaterialParams_.setSnr(0.0);
|
||||
coarseMaterialParams_.setSwr(0.2);
|
||||
coarseMaterialParams_.setSnr(0.0);
|
||||
fineMaterialParams_.setResidualSaturation(lPhaseIdx, 0.2);
|
||||
fineMaterialParams_.setResidualSaturation(gPhaseIdx, 0.0);
|
||||
coarseMaterialParams_.setResidualSaturation(lPhaseIdx, 0.2);
|
||||
coarseMaterialParams_.setResidualSaturation(gPhaseIdx, 0.0);
|
||||
|
||||
// parameters for the Brooks-Corey law
|
||||
fineMaterialParams_.setPe(1e4);
|
||||
coarseMaterialParams_.setPe(1e4);
|
||||
fineMaterialParams_.setEntryPressure(1e4);
|
||||
coarseMaterialParams_.setEntryPressure(1e4);
|
||||
fineMaterialParams_.setLambda(2.0);
|
||||
coarseMaterialParams_.setLambda(2.0);
|
||||
|
||||
fineMaterialParams_.finalize();
|
||||
coarseMaterialParams_.finalize();
|
||||
|
||||
// parameters for the somerton law of heat conduction
|
||||
computeHeatCondParams_(fineHeatCondParams_, finePorosity_);
|
||||
computeHeatCondParams_(coarseHeatCondParams_, coarsePorosity_);
|
||||
|
Loading…
Reference in New Issue
Block a user