Partial integration of VFPProperties into BlackoilModel

This commit is contained in:
babrodtk 2015-07-03 12:16:50 +02:00
parent 066e54bbfc
commit 15d3171ae1
5 changed files with 15 additions and 3 deletions

View File

@ -65,12 +65,13 @@ namespace Opm {
const DerivedGeology& geo,
const RockCompressibility* rock_comp_props,
const Wells* wells,
const VFPProperties* vfp_properties,
const NewtonIterationBlackoilInterface& linsolver,
Opm::EclipseStateConstPtr eclState,
const bool has_disgas,
const bool has_vapoil,
const bool terminal_output)
: Base(param, grid, fluid, geo, rock_comp_props, wells, linsolver,
: Base(param, grid, fluid, geo, rock_comp_props, wells, vfp_properties, linsolver,
eclState, has_disgas, has_vapoil, terminal_output)
{
}

View File

@ -43,6 +43,7 @@ namespace Opm {
class DerivedGeology;
class RockCompressibility;
class NewtonIterationBlackoilInterface;
class VFPProperties;
/// Struct for containing iteration variables.
@ -117,6 +118,7 @@ namespace Opm {
/// \param[in] geo rock properties
/// \param[in] rock_comp_props if non-null, rock compressibility properties
/// \param[in] wells well structure
/// \param[in] vfp_properties Vertical flow performance tables
/// \param[in] linsolver linear solver
/// \param[in] eclState eclipse state
/// \param[in] has_disgas turn on dissolved gas
@ -128,6 +130,7 @@ namespace Opm {
const DerivedGeology& geo ,
const RockCompressibility* rock_comp_props,
const Wells* wells,
const VFPProperties* vfp_properties,
const NewtonIterationBlackoilInterface& linsolver,
Opm::EclipseStateConstPtr eclState,
const bool has_disgas,
@ -236,6 +239,7 @@ namespace Opm {
const DerivedGeology& geo_;
const RockCompressibility* rock_comp_props_;
const Wells* wells_;
const VFPProperties* vfp_properties_;
const NewtonIterationBlackoilInterface& linsolver_;
// For each canonical phase -> true if active
const std::vector<bool> active_;

View File

@ -144,6 +144,7 @@ namespace detail {
const DerivedGeology& geo ,
const RockCompressibility* rock_comp_props,
const Wells* wells,
const VFPProperties* vfp_properties,
const NewtonIterationBlackoilInterface& linsolver,
Opm::EclipseStateConstPtr eclState,
const bool has_disgas,
@ -154,6 +155,7 @@ namespace detail {
, geo_ (geo)
, rock_comp_props_(rock_comp_props)
, wells_ (wells)
, vfp_properties_(vfp_properties)
, linsolver_ (linsolver)
, active_(detail::activePhases(fluid.phaseUsage()))
, canph_ (detail::active2Canonical(fluid.phaseUsage()))
@ -1369,7 +1371,7 @@ namespace detail {
}
const ADB bhp_residual = state.bhp - bhp_targets;
const ADB rate_residual = rate_distr * state.qs - rate_targets;
//ARB: add here const ... thp_residual = state.bhp - vfpprop.bhp(thp_ctrl, state.qs, alq?); //Make bhp function take ADB's as input params.
//const ADB thp_residual = state.bhp - vfpprop.bhp(thp_ctrl, state.qs, alq);
//wells
// Choose bhp residual for positive bhp targets.
Selector<double> bhp_selector(bhp_targets);

View File

@ -31,6 +31,7 @@
#include <opm/autodiff/BlackoilPropsAdInterface.hpp>
#include <opm/autodiff/WellStateFullyImplicitBlackoil.hpp>
#include <opm/autodiff/RateConverter.hpp>
#include <opm/autodiff/VFPProperties.hpp>
#include <opm/core/grid.h>
#include <opm/core/wells.h>
@ -191,6 +192,8 @@ namespace Opm
RateConverterType rateConverter_;
// Threshold pressures.
std::vector<double> threshold_pressures_by_face_;
//Vertical flow performance tables
VFPProperties vfpProperties_;
// Whether this a parallel simulation or not
bool is_parallel_run_;
};

View File

@ -53,7 +53,8 @@ namespace Opm
output_writer_(output_writer),
rateConverter_(props_, std::vector<int>(AutoDiffGrid::numCells(grid_), 0)),
threshold_pressures_by_face_(threshold_pressures_by_face),
is_parallel_run_( false )
is_parallel_run_( false ),
vfpProperties_(eclipse_state->getVFPProdTables())
{
// Misc init.
const int num_cells = AutoDiffGrid::numCells(grid);
@ -339,6 +340,7 @@ namespace Opm
geo_,
rock_comp_props_,
wells,
&vfpProperties_,
solver_,
eclipse_state_,
has_disgas_,