mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Simulator Blackoil and StandardWellsDense uses same rate_converter
fixing the running of group control.
This commit is contained in:
parent
0a440d98ce
commit
cf902e1a8b
@ -171,9 +171,9 @@ namespace Opm {
|
|||||||
, has_solvent_(GET_PROP_VALUE(TypeTag, EnableSolvent))
|
, has_solvent_(GET_PROP_VALUE(TypeTag, EnableSolvent))
|
||||||
, has_polymer_(GET_PROP_VALUE(TypeTag, EnablePolymer))
|
, has_polymer_(GET_PROP_VALUE(TypeTag, EnablePolymer))
|
||||||
, param_( param )
|
, param_( param )
|
||||||
, well_model_ (well_model)
|
, well_model_ (well_model)
|
||||||
, terminal_output_ (terminal_output)
|
, terminal_output_ (terminal_output)
|
||||||
, rate_converter_(phaseUsage_, ebosSimulator_.problem().pvtRegionArray().empty()?nullptr:ebosSimulator_.problem().pvtRegionArray().data(), AutoDiffGrid::numCells(grid_), std::vector<int>(AutoDiffGrid::numCells(grid_),0))
|
, rate_converter_(wellModel().rateConverter())
|
||||||
, current_relaxation_(1.0)
|
, current_relaxation_(1.0)
|
||||||
, dx_old_(AutoDiffGrid::numCells(grid_))
|
, dx_old_(AutoDiffGrid::numCells(grid_))
|
||||||
, isBeginReportStep_(false)
|
, isBeginReportStep_(false)
|
||||||
@ -1505,7 +1505,7 @@ namespace Opm {
|
|||||||
long int global_nc_;
|
long int global_nc_;
|
||||||
|
|
||||||
// rate converter between the surface volume rates and reservoir voidage rates
|
// rate converter between the surface volume rates and reservoir voidage rates
|
||||||
RateConverterType rate_converter_;
|
RateConverterType* rate_converter_;
|
||||||
|
|
||||||
std::vector<std::vector<double>> residual_norms_history_;
|
std::vector<std::vector<double>> residual_norms_history_;
|
||||||
double current_relaxation_;
|
double current_relaxation_;
|
||||||
@ -1660,7 +1660,7 @@ namespace Opm {
|
|||||||
global_number_wells = info.communicator().sum(global_number_wells);
|
global_number_wells = info.communicator().sum(global_number_wells);
|
||||||
if ( global_number_wells )
|
if ( global_number_wells )
|
||||||
{
|
{
|
||||||
rate_converter_.defineState(reservoir_state, boost::any_cast<const ParallelISTLInformation&>(istlSolver_->parallelInformation()));
|
rate_converter_->defineState(reservoir_state, boost::any_cast<const ParallelISTLInformation&>(istlSolver_->parallelInformation()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1668,7 +1668,7 @@ namespace Opm {
|
|||||||
{
|
{
|
||||||
if ( global_number_wells )
|
if ( global_number_wells )
|
||||||
{
|
{
|
||||||
rate_converter_.defineState(reservoir_state);
|
rate_converter_->defineState(reservoir_state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ enum WellVariablePositions {
|
|||||||
const double gravity_arg,
|
const double gravity_arg,
|
||||||
const std::vector<double>& depth_arg,
|
const std::vector<double>& depth_arg,
|
||||||
const std::vector<double>& pv_arg,
|
const std::vector<double>& pv_arg,
|
||||||
const RateConverterType* rate_converter,
|
RateConverterType* rate_converter,
|
||||||
long int global_nc,
|
long int global_nc,
|
||||||
const Grid& grid);
|
const Grid& grid);
|
||||||
|
|
||||||
@ -291,6 +291,7 @@ enum WellVariablePositions {
|
|||||||
|
|
||||||
void applyVREPGroupControl(WellState& well_state) const;
|
void applyVREPGroupControl(WellState& well_state) const;
|
||||||
|
|
||||||
|
RateConverterType* rateConverter() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool wells_active_;
|
bool wells_active_;
|
||||||
@ -310,7 +311,7 @@ enum WellVariablePositions {
|
|||||||
std::vector<bool> active_;
|
std::vector<bool> active_;
|
||||||
const VFPProperties* vfp_properties_;
|
const VFPProperties* vfp_properties_;
|
||||||
double gravity_;
|
double gravity_;
|
||||||
const RateConverterType* rate_converter_;
|
RateConverterType* rate_converter_;
|
||||||
|
|
||||||
// The efficiency factor for each connection. It is specified based on wells and groups,
|
// The efficiency factor for each connection. It is specified based on wells and groups,
|
||||||
// We calculate the factor for each connection for the computation of contributions to the mass balance equations.
|
// We calculate the factor for each connection for the computation of contributions to the mass balance equations.
|
||||||
|
@ -46,7 +46,7 @@ namespace Opm {
|
|||||||
const double gravity_arg,
|
const double gravity_arg,
|
||||||
const std::vector<double>& depth_arg,
|
const std::vector<double>& depth_arg,
|
||||||
const std::vector<double>& pv_arg,
|
const std::vector<double>& pv_arg,
|
||||||
const RateConverterType* rate_converter,
|
RateConverterType* rate_converter,
|
||||||
long int global_nc,
|
long int global_nc,
|
||||||
const Grid& grid)
|
const Grid& grid)
|
||||||
{
|
{
|
||||||
@ -143,6 +143,19 @@ namespace Opm {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
template<typename TypeTag>
|
||||||
|
typename StandardWellsDense<TypeTag>::RateConverterType*
|
||||||
|
StandardWellsDense<TypeTag>::
|
||||||
|
rateConverter() const
|
||||||
|
{
|
||||||
|
return rate_converter_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template<typename TypeTag>
|
template<typename TypeTag>
|
||||||
SimulatorReport
|
SimulatorReport
|
||||||
StandardWellsDense<TypeTag>::
|
StandardWellsDense<TypeTag>::
|
||||||
|
Loading…
Reference in New Issue
Block a user