mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Partial integration of VFPProperties into BlackoilModel
This commit is contained in:
parent
066e54bbfc
commit
15d3171ae1
@ -65,12 +65,13 @@ namespace Opm {
|
|||||||
const DerivedGeology& geo,
|
const DerivedGeology& geo,
|
||||||
const RockCompressibility* rock_comp_props,
|
const RockCompressibility* rock_comp_props,
|
||||||
const Wells* wells,
|
const Wells* wells,
|
||||||
|
const VFPProperties* vfp_properties,
|
||||||
const NewtonIterationBlackoilInterface& linsolver,
|
const NewtonIterationBlackoilInterface& linsolver,
|
||||||
Opm::EclipseStateConstPtr eclState,
|
Opm::EclipseStateConstPtr eclState,
|
||||||
const bool has_disgas,
|
const bool has_disgas,
|
||||||
const bool has_vapoil,
|
const bool has_vapoil,
|
||||||
const bool terminal_output)
|
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)
|
eclState, has_disgas, has_vapoil, terminal_output)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,7 @@ namespace Opm {
|
|||||||
class DerivedGeology;
|
class DerivedGeology;
|
||||||
class RockCompressibility;
|
class RockCompressibility;
|
||||||
class NewtonIterationBlackoilInterface;
|
class NewtonIterationBlackoilInterface;
|
||||||
|
class VFPProperties;
|
||||||
|
|
||||||
|
|
||||||
/// Struct for containing iteration variables.
|
/// Struct for containing iteration variables.
|
||||||
@ -117,6 +118,7 @@ namespace Opm {
|
|||||||
/// \param[in] geo rock properties
|
/// \param[in] geo rock properties
|
||||||
/// \param[in] rock_comp_props if non-null, rock compressibility properties
|
/// \param[in] rock_comp_props if non-null, rock compressibility properties
|
||||||
/// \param[in] wells well structure
|
/// \param[in] wells well structure
|
||||||
|
/// \param[in] vfp_properties Vertical flow performance tables
|
||||||
/// \param[in] linsolver linear solver
|
/// \param[in] linsolver linear solver
|
||||||
/// \param[in] eclState eclipse state
|
/// \param[in] eclState eclipse state
|
||||||
/// \param[in] has_disgas turn on dissolved gas
|
/// \param[in] has_disgas turn on dissolved gas
|
||||||
@ -128,6 +130,7 @@ namespace Opm {
|
|||||||
const DerivedGeology& geo ,
|
const DerivedGeology& geo ,
|
||||||
const RockCompressibility* rock_comp_props,
|
const RockCompressibility* rock_comp_props,
|
||||||
const Wells* wells,
|
const Wells* wells,
|
||||||
|
const VFPProperties* vfp_properties,
|
||||||
const NewtonIterationBlackoilInterface& linsolver,
|
const NewtonIterationBlackoilInterface& linsolver,
|
||||||
Opm::EclipseStateConstPtr eclState,
|
Opm::EclipseStateConstPtr eclState,
|
||||||
const bool has_disgas,
|
const bool has_disgas,
|
||||||
@ -236,6 +239,7 @@ namespace Opm {
|
|||||||
const DerivedGeology& geo_;
|
const DerivedGeology& geo_;
|
||||||
const RockCompressibility* rock_comp_props_;
|
const RockCompressibility* rock_comp_props_;
|
||||||
const Wells* wells_;
|
const Wells* wells_;
|
||||||
|
const VFPProperties* vfp_properties_;
|
||||||
const NewtonIterationBlackoilInterface& linsolver_;
|
const NewtonIterationBlackoilInterface& linsolver_;
|
||||||
// For each canonical phase -> true if active
|
// For each canonical phase -> true if active
|
||||||
const std::vector<bool> active_;
|
const std::vector<bool> active_;
|
||||||
|
@ -144,6 +144,7 @@ namespace detail {
|
|||||||
const DerivedGeology& geo ,
|
const DerivedGeology& geo ,
|
||||||
const RockCompressibility* rock_comp_props,
|
const RockCompressibility* rock_comp_props,
|
||||||
const Wells* wells,
|
const Wells* wells,
|
||||||
|
const VFPProperties* vfp_properties,
|
||||||
const NewtonIterationBlackoilInterface& linsolver,
|
const NewtonIterationBlackoilInterface& linsolver,
|
||||||
Opm::EclipseStateConstPtr eclState,
|
Opm::EclipseStateConstPtr eclState,
|
||||||
const bool has_disgas,
|
const bool has_disgas,
|
||||||
@ -154,6 +155,7 @@ namespace detail {
|
|||||||
, geo_ (geo)
|
, geo_ (geo)
|
||||||
, rock_comp_props_(rock_comp_props)
|
, rock_comp_props_(rock_comp_props)
|
||||||
, wells_ (wells)
|
, wells_ (wells)
|
||||||
|
, vfp_properties_(vfp_properties)
|
||||||
, linsolver_ (linsolver)
|
, linsolver_ (linsolver)
|
||||||
, active_(detail::activePhases(fluid.phaseUsage()))
|
, active_(detail::activePhases(fluid.phaseUsage()))
|
||||||
, canph_ (detail::active2Canonical(fluid.phaseUsage()))
|
, canph_ (detail::active2Canonical(fluid.phaseUsage()))
|
||||||
@ -1369,7 +1371,7 @@ namespace detail {
|
|||||||
}
|
}
|
||||||
const ADB bhp_residual = state.bhp - bhp_targets;
|
const ADB bhp_residual = state.bhp - bhp_targets;
|
||||||
const ADB rate_residual = rate_distr * state.qs - rate_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
|
//wells
|
||||||
// Choose bhp residual for positive bhp targets.
|
// Choose bhp residual for positive bhp targets.
|
||||||
Selector<double> bhp_selector(bhp_targets);
|
Selector<double> bhp_selector(bhp_targets);
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <opm/autodiff/BlackoilPropsAdInterface.hpp>
|
#include <opm/autodiff/BlackoilPropsAdInterface.hpp>
|
||||||
#include <opm/autodiff/WellStateFullyImplicitBlackoil.hpp>
|
#include <opm/autodiff/WellStateFullyImplicitBlackoil.hpp>
|
||||||
#include <opm/autodiff/RateConverter.hpp>
|
#include <opm/autodiff/RateConverter.hpp>
|
||||||
|
#include <opm/autodiff/VFPProperties.hpp>
|
||||||
|
|
||||||
#include <opm/core/grid.h>
|
#include <opm/core/grid.h>
|
||||||
#include <opm/core/wells.h>
|
#include <opm/core/wells.h>
|
||||||
@ -191,6 +192,8 @@ namespace Opm
|
|||||||
RateConverterType rateConverter_;
|
RateConverterType rateConverter_;
|
||||||
// Threshold pressures.
|
// Threshold pressures.
|
||||||
std::vector<double> threshold_pressures_by_face_;
|
std::vector<double> threshold_pressures_by_face_;
|
||||||
|
//Vertical flow performance tables
|
||||||
|
VFPProperties vfpProperties_;
|
||||||
// Whether this a parallel simulation or not
|
// Whether this a parallel simulation or not
|
||||||
bool is_parallel_run_;
|
bool is_parallel_run_;
|
||||||
};
|
};
|
||||||
|
@ -53,7 +53,8 @@ namespace Opm
|
|||||||
output_writer_(output_writer),
|
output_writer_(output_writer),
|
||||||
rateConverter_(props_, std::vector<int>(AutoDiffGrid::numCells(grid_), 0)),
|
rateConverter_(props_, std::vector<int>(AutoDiffGrid::numCells(grid_), 0)),
|
||||||
threshold_pressures_by_face_(threshold_pressures_by_face),
|
threshold_pressures_by_face_(threshold_pressures_by_face),
|
||||||
is_parallel_run_( false )
|
is_parallel_run_( false ),
|
||||||
|
vfpProperties_(eclipse_state->getVFPProdTables())
|
||||||
{
|
{
|
||||||
// Misc init.
|
// Misc init.
|
||||||
const int num_cells = AutoDiffGrid::numCells(grid);
|
const int num_cells = AutoDiffGrid::numCells(grid);
|
||||||
@ -339,6 +340,7 @@ namespace Opm
|
|||||||
geo_,
|
geo_,
|
||||||
rock_comp_props_,
|
rock_comp_props_,
|
||||||
wells,
|
wells,
|
||||||
|
&vfpProperties_,
|
||||||
solver_,
|
solver_,
|
||||||
eclipse_state_,
|
eclipse_state_,
|
||||||
has_disgas_,
|
has_disgas_,
|
||||||
|
Loading…
Reference in New Issue
Block a user