mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-28 20:13:49 -06:00
adding a rate converter to the BlackoilModelBase
This commit is contained in:
parent
e65d24aa16
commit
a15513e546
@ -32,6 +32,7 @@
|
||||
#include <opm/autodiff/NewtonIterationBlackoilInterface.hpp>
|
||||
#include <opm/autodiff/BlackoilModelEnums.hpp>
|
||||
#include <opm/autodiff/VFPProperties.hpp>
|
||||
#include <opm/autodiff/RateConverter.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/NNC.hpp>
|
||||
#include <opm/core/simulator/SimulatorTimerInterface.hpp>
|
||||
|
||||
@ -152,6 +153,11 @@ namespace Opm {
|
||||
typedef typename ModelTraits<Implementation>::ModelParameters ModelParameters;
|
||||
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 ---------
|
||||
|
||||
/// Construct the model. It will retain references to the
|
||||
@ -360,6 +366,9 @@ namespace Opm {
|
||||
double current_relaxation_;
|
||||
V dx_old_;
|
||||
|
||||
// rate converter between the surface volume rates and reservoir voidage rates
|
||||
RateConverterType rate_converter_;
|
||||
|
||||
// --------- Protected methods ---------
|
||||
|
||||
/// Access the most-derived class used for
|
||||
|
@ -203,6 +203,7 @@ namespace detail {
|
||||
, terminal_output_ (terminal_output)
|
||||
, material_name_(0)
|
||||
, current_relaxation_(1.0)
|
||||
, rate_converter_(fluid_, std::vector<int>(std::vector<int>(AutoDiffGrid::numCells(grid_),0)))
|
||||
{
|
||||
if (active_[Water]) {
|
||||
material_name_.push_back("Water");
|
||||
|
Loading…
Reference in New Issue
Block a user