mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adding a rate converter to the BlackoilModelBase
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
#include <opm/autodiff/NewtonIterationBlackoilInterface.hpp>
|
#include <opm/autodiff/NewtonIterationBlackoilInterface.hpp>
|
||||||
#include <opm/autodiff/BlackoilModelEnums.hpp>
|
#include <opm/autodiff/BlackoilModelEnums.hpp>
|
||||||
#include <opm/autodiff/VFPProperties.hpp>
|
#include <opm/autodiff/VFPProperties.hpp>
|
||||||
|
#include <opm/autodiff/RateConverter.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Grid/NNC.hpp>
|
#include <opm/parser/eclipse/EclipseState/Grid/NNC.hpp>
|
||||||
#include <opm/core/simulator/SimulatorTimerInterface.hpp>
|
#include <opm/core/simulator/SimulatorTimerInterface.hpp>
|
||||||
|
|
||||||
@@ -152,6 +153,11 @@ namespace Opm {
|
|||||||
typedef typename ModelTraits<Implementation>::ModelParameters ModelParameters;
|
typedef typename ModelTraits<Implementation>::ModelParameters ModelParameters;
|
||||||
typedef typename ModelTraits<Implementation>::SolutionState SolutionState;
|
typedef typename ModelTraits<Implementation>::SolutionState SolutionState;
|
||||||
|
|
||||||
|
// for the conversion between the surface volume rate and resrevoir voidage rate
|
||||||
|
// Due to the requirement of the grid information, put the converter in the model.
|
||||||
|
using RateConverterType = RateConverter::
|
||||||
|
SurfaceToReservoirVoidage<BlackoilPropsAdInterface, std::vector<int> >;
|
||||||
|
|
||||||
// --------- Public methods ---------
|
// --------- Public methods ---------
|
||||||
|
|
||||||
/// Construct the model. It will retain references to the
|
/// Construct the model. It will retain references to the
|
||||||
@@ -360,6 +366,9 @@ namespace Opm {
|
|||||||
double current_relaxation_;
|
double current_relaxation_;
|
||||||
V dx_old_;
|
V dx_old_;
|
||||||
|
|
||||||
|
// rate converter between the surface volume rates and reservoir voidage rates
|
||||||
|
RateConverterType rate_converter_;
|
||||||
|
|
||||||
// --------- Protected methods ---------
|
// --------- Protected methods ---------
|
||||||
|
|
||||||
/// Access the most-derived class used for
|
/// Access the most-derived class used for
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ namespace detail {
|
|||||||
, terminal_output_ (terminal_output)
|
, terminal_output_ (terminal_output)
|
||||||
, material_name_(0)
|
, material_name_(0)
|
||||||
, current_relaxation_(1.0)
|
, current_relaxation_(1.0)
|
||||||
|
, rate_converter_(fluid_, std::vector<int>(std::vector<int>(AutoDiffGrid::numCells(grid_),0)))
|
||||||
{
|
{
|
||||||
if (active_[Water]) {
|
if (active_[Water]) {
|
||||||
material_name_.push_back("Water");
|
material_name_.push_back("Water");
|
||||||
|
|||||||
Reference in New Issue
Block a user