mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adapt to the changes in opm-material
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user