All Classes Namespaces Files Functions Variables Typedefs Enumerator Pages
Opm Namespace Reference

This file contains a set of helper functions used by VFPProd / VFPInj. More...

Classes

class  AdditionalObjectDeleter
 A custom deleter that will delete an additional object, too. More...
 
class  AutoDiff
 A simple class for forward-mode automatic differentiation. More...
 
class  AutoDiffBlock
 A class for forward-mode automatic differentiation with vector values and sparse jacobian matrices. More...
 
struct  HelperOps
 Contains vectors and sparse matrices that represent subsets or operations on (AD or regular) vectors of data. More...
 
class  UpwindSelector
 Upwind selection in absence of counter-current flow (i.e., without effects of gravity and/or capillary pressure). More...
 
class  Selector
 Selection. Choose first of two elements if selection basis element is nonnegative. More...
 
class  Span
 
class  AutoDiffMatrix
 AutoDiffMatrix is a wrapper class that optimizes matrix operations. More...
 
class  BlackoilModel
 A model implementation for three-phase black oil. More...
 
struct  ModelTraits< BlackoilModel< Grid > >
 Providing types by template specialisation of ModelTraits for BlackoilModel. More...
 
struct  ModelTraits
 Traits to encapsulate the types used by classes using or extending this model. More...
 
class  BlackoilModelBase
 A model implementation for three-phase black oil. More...
 
class  BlackoilModelEbos
 A model implementation for three-phase black oil. More...
 
struct  FIPDataEnums
 
class  FIPData
 
struct  BlackoilModelParameters
 Solver parameters for the BlackoilModel. More...
 
struct  BlackoilMultiSegmentSolutionState
 
class  BlackoilMultiSegmentModel
 A model implementation for three-phase black oil with support for multi-segment wells. More...
 
struct  ModelTraits< BlackoilMultiSegmentModel< GridT > >
 Providing types by template specialisation of ModelTraits for BlackoilMultiSegmentModel. More...
 
class  BlackoilPressureModel
 A model implementation for the pressure equation in three-phase black oil. More...
 
struct  ModelTraits< BlackoilPressureModel< Grid, WellModel > >
 Providing types by template specialisation of ModelTraits for BlackoilPressureModel. More...
 
class  BlackoilPropsAdFromDeck
 This class implements the AD-adapted fluid interface for three-phase black-oil. More...
 
class  BlackoilReorderingTransportModel
 A model implementation for the transport equation in three-phase black oil. More...
 
struct  ModelTraits< BlackoilReorderingTransportModel< Grid, WellModel > >
 Providing types by template specialisation of ModelTraits for BlackoilReorderingTransportModel. More...
 
struct  BlackoilSequentialModelParameters
 
class  BlackoilSequentialModel
 A sequential splitting model implementation for three-phase black oil. More...
 
class  BlackoilSolventModel
 A model implementation for three-phase black oil with one extra component. More...
 
struct  BlackoilSolventSolutionState
 Need to include concentration in our state variables, otherwise all is as the default blackoil model. More...
 
struct  ModelTraits< BlackoilSolventModel< Grid > >
 Providing types by template specialisation of ModelTraits for BlackoilSolventModel. More...
 
class  BlackoilTransportModel
 A model implementation for the transport equation in three-phase black oil. More...
 
struct  ModelTraits< BlackoilTransportModel< Grid, WellModel > >
 Providing types by template specialisation of ModelTraits for BlackoilTransportModel. More...
 
class  BlackoilWellModel
 Class for handling the blackoil well model. More...
 
struct  CPRParameter
 
class  CPRPreconditioner
 CPR preconditioner. More...
 
class  DebugTimeReport
 
struct  DefaultBlackoilSolutionState
 Struct for containing iteration variables. More...
 
class  DuneMatrix
 
struct  QuickSort
 
struct  QuickSort< 0 >
 
class  FlowMainBase
 This class encapsulates the setup and running of a simulator based on an input deck. More...
 
class  FlowMain
 
class  FlowMainEbos
 
class  FlowMainPolymer
 
class  FlowMainSequential
 
class  FlowMainSolvent
 
class  DerivedGeology
 Class containing static geological properties that are derived from grid and petrophysical properties: More...
 
class  GridInit
 A class intended to give a generic interface to initializing and accessing UnstructuredGrid and CpGrid, using specialized templates to accomplish this. More...
 
class  GridInit< UnstructuredGrid >
 Specialization for UnstructuredGrid. More...
 
class  ImpesTPFAAD
 Class for solving black-oil impes problems. More...
 
class  ISTLSolver
 This class solves the fully implicit black-oil system by solving the reduced system (after eliminating well variables) as a block-structured matrix (one block for all cell variables) for a fixed number of cell variables np . More...
 
struct  IterationReport
 Class used for reporting the outcome of a nonlinearIteration() call. More...
 
struct  LinearisedBlackoilResidual
 Residual structure of the fully implicit solver. More...
 
class  MultisegmentWell
 
class  MultisegmentWells
 Class for handling the multi-segment well model. More...
 
class  NewtonIterationBlackoilCPR
 This class solves the fully implicit black-oil system by applying a Constrained Pressure Residual preconditioning strategy. More...
 
class  NewtonIterationBlackoilInterface
 Interface class for (linear) solvers for the fully implicit black-oil system. More...
 
class  NewtonIterationBlackoilInterleavedImpl
 This class solves the fully implicit black-oil system by solving the reduced system (after eliminating well variables) as a block-structured matrix (one block for all cell variables) for a fixed number of cell variables np . More...
 
struct  NewtonIterationBlackoilInterleavedParameters
 This class carries all parameters for the NewtonIterationBlackoilInterleaved class. More...
 
class  NewtonIterationBlackoilInterleaved
 This class solves the fully implicit black-oil system by solving the reduced system (after eliminating well variables) as a block-structured matrix (one block for all cell variables). More...
 
class  NewtonIterationBlackoilSimple
 This class solves the fully implicit black-oil system by simply concatenating the Jacobian matrices and passing the resulting system to a linear solver. More...
 
class  NonlinearSolver
 A nonlinear solver class suitable for general fully-implicit models, as well as pressure, transport and sequential models. More...
 
class  ParallelDebugOutputInterface
 
class  ParallelDebugOutput
 
class  ParallelOverlappingILU0
 A two-step version of an overlapping Schwarz preconditioner using one step ILU0 as. More...
 
class  ParallelRestrictedOverlappingSchwarz
 Block parallel preconditioner. More...
 
class  FixedSizeIterCopyHandle
 A handle that copies a fixed number data per index. More...
 
struct  SimulatorTraits
 
class  SimulatorBase
 Class collecting all necessary components for a two-phase simulation. More...
 
class  SimulatorFullyImplicitBlackoil
 a simulator for the blackoil model More...
 
struct  SimulatorTraits< SimulatorFullyImplicitBlackoil< GridT > >
 
class  SimulatorFullyImplicitBlackoilEbos
 a simulator for the blackoil model More...
 
class  SimulatorFullyImplicitBlackoilMultiSegment
 a simulator for the blackoil model More...
 
struct  SimulatorTraits< SimulatorFullyImplicitBlackoilMultiSegment< GridT > >
 
class  BlackoilSubWriter
 
class  BlackoilVTKWriter
 
class  BlackoilMatlabWriter
 
struct  ExtraData
 Extra data to read/write for OPM restarting. More...
 
class  BlackoilOutputWriter
 Wrapper class for VTK, Matlab, and ECL output. More...
 
class  SimulatorFullyImplicitBlackoilSolvent
 Class collecting all necessary components for a blackoil simulation with polymer injection. More...
 
struct  SimulatorTraits< SimulatorFullyImplicitBlackoilSolvent< GridT > >
 
class  SimulatorIncompTwophaseAd
 Class collecting all necessary components for a two-phase simulation. More...
 
class  SimulatorSequentialBlackoil
 a simulator for the blackoil model More...
 
struct  SimulatorTraits< SimulatorSequentialBlackoil< GridT, WellModelT, PressureModel, TransportModel > >
 
class  SolventPropsAdFromDeck
 
class  StandardWell
 
class  StandardWells
 Class for handling the standard well model. More...
 
class  StandardWellsSolvent
 Class for handling the standard well model for solvent model. More...
 
class  ThreadHandle
 
class  TransportSolverTwophaseAd
 Implements an implicit transport solver for incompressible two-phase flow, using automatic differentiation. More...
 
class  VFPInjProperties
 
class  VFPProdProperties
 Class which linearly interpolates BHP as a function of rate, tubing head pressure, water fraction, gas fraction, and artificial lift for production VFP tables, and similarly the BHP as a function of the rate and tubing head pressure. More...
 
class  VFPProperties
 A thin wrapper class that holds one VFPProdProperties and one VFPInjProperties object. More...
 
class  WellDensitySegmented
 A class giving a well model, by which we mean a way to compute the pressure deltas of each perforation and the bottom-hole pressure. More...
 
class  WellInterface
 
class  WellMultiSegment
 
class  WellStateFullyImplicitBlackoil
 The state of a set of wells, tailored for use by the fully implicit blackoil simulator. More...
 
class  WellStateFullyImplicitBlackoilSolvent
 
class  WellStateMultiSegment
 The state of a set of multi-sgemnet wells. More...
 
class  CompressibleTpfaPolymer
 Encapsulating a tpfa pressure solver for the compressible-fluid case with polymer. More...
 
class  BlackoilPolymerModel
 A model implementation for three-phase black oil with polymer. More...
 
struct  BlackoilPolymerSolutionState
 Need to include concentration in our state variables, otherwise all is as the default blackoil model. More...
 
struct  ModelTraits< BlackoilPolymerModel< Grid > >
 Providing types by template specialisation of ModelTraits for BlackoilPolymerModel. More...
 
class  PolymerPropsAd
 
class  SimulatorFullyImplicitBlackoilPolymer
 Class collecting all necessary components for a blackoil simulation with polymer injection. More...
 
struct  SimulatorTraits< SimulatorFullyImplicitBlackoilPolymer< GridT > >
 
class  WellStateFullyImplicitBlackoilPolymer
 
class  GravityColumnSolverPolymer
 Class for doing gravity segregation (only), on a vertical column of cells. More...
 
class  IncompPropertiesDefaultPolymer
 
class  IncompTpfaPolymer
 Encapsulating a tpfa pressure solver for the incompressible-fluid case with polymer. More...
 
class  PolymerBlackoilState
 Simulator state for a compressible two-phase simulator with polymer. More...
 
class  PolymerInflowInterface
 Interface for classes encapsulating polymer inflow information. More...
 
class  PolymerInflowBasic
 Basic polymer injection behaviour class. More...
 
class  PolymerInflowFromDeck
 Polymer injection behaviour class using deck WPOLYMER. More...
 
class  PolymerProperties
 
class  PolymerState
 Simulator state for a two-phase simulator with polymer. More...
 
class  SimulatorCompressiblePolymer
 Class collecting all necessary components for a two-phase simulation. More...
 
class  SimulatorPolymer
 Class collecting all necessary components for a two-phase simulation. More...
 
class  SinglePointUpwindTwoPhasePolymer
 
class  TransportSolverTwophaseCompressiblePolymer
 Implements a reordering transport solver for incompressible two-phase flow with polymer in the water phase. More...
 
class  TransportSolverTwophasePolymer
 Implements a reordering transport solver for incompressible two-phase flow with polymer in the water phase. More...
 
class  SimulatorCompressibleTwophase
 Class collecting all necessary components for a two-phase simulation. More...
 
class  SimulatorIncompTwophase
 Class collecting all necessary components for a two-phase simulation. More...
 
class  AdaptiveSimulatorTimer
 Simulation timer for adaptive time stepping. More...
 
class  AdaptiveTimeStepping
 
class  SimulatorTimer
 
class  SimulatorTimerInterface
 Interface class for SimulatorTimer objects, to be improved. More...
 
class  SimpleIterationCountTimeStepControl
 A simple iteration count based adaptive time step control. More...
 
class  PIDTimeStepControl
 PID controller based adaptive time step control as suggested in: Turek and Kuzmin. More...
 
class  PIDAndIterationCountTimeStepControl
 PID controller based adaptive time step control as above that also takes an target iteration into account. More...
 
class  HardcodedTimeStepControl
 HardcodedTimeStepControl Input generated from summary file using the ert application: More...
 
class  RelativeChangeInterface
 RelativeChangeInterface. More...
 
class  TimeStepControlInterface
 TimeStepControlInterface. More...
 
struct  Tag
 

Typedefs

typedef AutoDiffBlock< double > ADB
 
typedef ADB::V V
 
typedef ADB::M M
 
typedef Eigen::Array< double,
Eigen::Dynamic, Eigen::Dynamic,
Eigen::RowMajor > 
DataBlock
 
typedef Eigen::Array< double,
Eigen::Dynamic, Eigen::Dynamic,
Eigen::RowMajor > 
Block
 
typedef Eigen::SparseMatrix
< double > 
S
 
typedef Eigen::DiagonalMatrix
< double, Eigen::Dynamic > 
D
 
typedef std::shared_ptr
< WellMultiSegment
WellMultiSegmentPtr
 
typedef std::shared_ptr< const
WellMultiSegment
WellMultiSegmentConstPtr
 
typedef std::map< std::string,
std::string > 
PMap
 

Enumerations

enum  PrimalVariables { Sg = 0, RS = 1, RV = 2 }
 
enum  CanonicalVariablePositions {
  Pressure = 0, Sw = 1, Xvar = 2, Qs = 3,
  Bhp = 4, Next
}
 

Functions

template<class Ostream , typename Scalar >
Ostream & operator<< (Ostream &os, const AutoDiff< Scalar > &fw)
 
template<typename Scalar >
AutoDiff< Scalar > operator+ (const AutoDiff< Scalar > &lhs, const AutoDiff< Scalar > &rhs)
 
template<typename Scalar , typename T >
AutoDiff< Scalar > operator+ (const T lhs, const AutoDiff< Scalar > &rhs)
 
template<typename Scalar , typename T >
AutoDiff< Scalar > operator+ (const AutoDiff< Scalar > &lhs, const T rhs)
 
template<typename Scalar >
AutoDiff< Scalar > operator- (const AutoDiff< Scalar > &lhs, const AutoDiff< Scalar > &rhs)
 
template<typename Scalar , typename T >
AutoDiff< Scalar > operator- (const T lhs, const AutoDiff< Scalar > &rhs)
 
template<typename Scalar , typename T >
AutoDiff< Scalar > operator- (const AutoDiff< Scalar > &lhs, const T rhs)
 
template<typename Scalar >
AutoDiff< Scalar > operator* (const AutoDiff< Scalar > &lhs, const AutoDiff< Scalar > &rhs)
 
template<typename Scalar , typename T >
AutoDiff< Scalar > operator* (const T lhs, const AutoDiff< Scalar > &rhs)
 
template<typename Scalar , typename T >
AutoDiff< Scalar > operator* (const AutoDiff< Scalar > &lhs, const T rhs)
 
template<typename Scalar >
AutoDiff< Scalar > operator/ (const AutoDiff< Scalar > &lhs, const AutoDiff< Scalar > &rhs)
 
template<typename Scalar , typename T >
AutoDiff< Scalar > operator/ (const T lhs, const AutoDiff< Scalar > &rhs)
 
template<typename Scalar , typename T >
AutoDiff< Scalar > operator/ (const AutoDiff< Scalar > &lhs, const T rhs)
 
template<typename Scalar >
AutoDiff< Scalar > cos (const AutoDiff< Scalar > &x)
 
template<typename Scalar >
AutoDiff< Scalar > sqrt (const AutoDiff< Scalar > &x)
 
template<class Ostream , typename Scalar >
Ostream & operator<< (Ostream &os, const AutoDiffBlock< Scalar > &fw)
 Stream output.
 
template<typename Scalar >
AutoDiffBlock< Scalar > operator* (const typename AutoDiffBlock< Scalar >::M &lhs, const AutoDiffBlock< Scalar > &rhs)
 Multiply with AutoDiffMatrix from the left.
 
template<typename Scalar >
AutoDiffBlock< Scalar > operator* (const Eigen::SparseMatrix< Scalar > &lhs, const AutoDiffBlock< Scalar > &rhs)
 Multiply with Eigen sparse matrix from the left.
 
template<typename Scalar >
AutoDiffBlock< Scalar > operator* (const typename AutoDiffBlock< Scalar >::V &lhs, const AutoDiffBlock< Scalar > &rhs)
 Elementwise multiplication with constant on the left.
 
template<typename Scalar >
AutoDiffBlock< Scalar > operator* (const AutoDiffBlock< Scalar > &lhs, const typename AutoDiffBlock< Scalar >::V &rhs)
 Elementwise multiplication with constant on the right.
 
template<typename Scalar >
AutoDiffBlock< Scalar > operator+ (const typename AutoDiffBlock< Scalar >::V &lhs, const AutoDiffBlock< Scalar > &rhs)
 Elementwise addition with constant on the left.
 
template<typename Scalar >
AutoDiffBlock< Scalar > operator+ (const AutoDiffBlock< Scalar > &lhs, const typename AutoDiffBlock< Scalar >::V &rhs)
 Elementwise addition with constant on the right.
 
template<typename Scalar >
AutoDiffBlock< Scalar > operator- (const typename AutoDiffBlock< Scalar >::V &lhs, const AutoDiffBlock< Scalar > &rhs)
 Elementwise subtraction with constant on the left.
 
template<typename Scalar >
AutoDiffBlock< Scalar > operator- (const AutoDiffBlock< Scalar > &lhs, const typename AutoDiffBlock< Scalar >::V &rhs)
 Elementwise subtraction with constant on the right.
 
template<typename Scalar >
AutoDiffBlock< Scalar > operator/ (const typename AutoDiffBlock< Scalar >::V &lhs, const AutoDiffBlock< Scalar > &rhs)
 Elementwise division with constant on the left.
 
template<typename Scalar >
AutoDiffBlock< Scalar > operator/ (const AutoDiffBlock< Scalar > &lhs, const typename AutoDiffBlock< Scalar >::V &rhs)
 Elementwise division with constant on the right.
 
template<typename Scalar >
AutoDiffBlock< Scalar > operator* (const AutoDiffBlock< Scalar > &lhs, const Scalar &rhs)
 Operator for multiplication with a scalar on the right-hand side. More...
 
template<typename Scalar >
AutoDiffBlock< Scalar > operator* (const Scalar &lhs, const AutoDiffBlock< Scalar > &rhs)
 Operator for multiplication with a scalar on the left-hand side. More...
 
template<typename Scalar >
AutoDiffBlock< Scalar > pow (const AutoDiffBlock< Scalar > &base, const double exponent)
 Computes the value of base raised to the power of exponent. More...
 
template<typename Scalar >
AutoDiffBlock< Scalar > pow (const AutoDiffBlock< Scalar > &base, const typename AutoDiffBlock< Scalar >::V &exponent)
 Computes the value of base raised to the power of exponent. More...
 
template<typename Scalar >
AutoDiffBlock< Scalar > pow (const typename AutoDiffBlock< Scalar >::V &base, const AutoDiffBlock< Scalar > &exponent)
 Computes the value of base raised to the power of exponent. More...
 
template<typename Scalar >
AutoDiffBlock< Scalar > pow (const AutoDiffBlock< Scalar > &base, const AutoDiffBlock< Scalar > &exponent)
 Computes the value of base raised to the power of exponent. More...
 
template<typename Scalar , class IntVec >
Eigen::Array< Scalar,
Eigen::Dynamic, 1 > 
subset (const Eigen::Array< Scalar, Eigen::Dynamic, 1 > &x, const IntVec &indices)
 Returns x(indices).
 
template<typename Scalar , class IntVec >
AutoDiffBlock< Scalar > subset (const AutoDiffBlock< Scalar > &x, const IntVec &indices)
 Returns x(indices).
 
template<typename Scalar , class IntVec >
AutoDiffBlock< Scalar > superset (const AutoDiffBlock< Scalar > &x, const IntVec &indices, const int n)
 Returns v where v(indices) == x, v(!indices) == 0 and v.size() == n.
 
template<typename Scalar , class IntVec >
Eigen::Array< Scalar,
Eigen::Dynamic, 1 > 
superset (const Eigen::Array< Scalar, Eigen::Dynamic, 1 > &x, const IntVec &indices, const int n)
 Returns v where v(indices) == x, v(!indices) == 0 and v.size() == n.
 
Eigen::SparseMatrix< double > spdiag (const AutoDiffBlock< double >::V &d)
 Construct square sparse matrix with the elements of d on the diagonal. More...
 
template<class Matrix >
void collapseJacs (const AutoDiffBlock< double > &x, Matrix &jacobian)
 Returns the input expression, but with all Jacobians collapsed to one.
 
AutoDiffBlock< double > collapseJacs (const AutoDiffBlock< double > &x)
 Returns the input expression, but with all Jacobians collapsed to one.
 
AutoDiffBlock< double > vertcat (const AutoDiffBlock< double > &x, const AutoDiffBlock< double > &y)
 Returns the vertical concatenation [ x; y ] of the inputs.
 
AutoDiffBlock< double > vertcatCollapseJacs (const std::vector< AutoDiffBlock< double > > &x)
 Returns the vertical concatenation [ x[0]; x[1]; ...; x[n-1] ] of the inputs. More...
 
Eigen::ArrayXd sign (const Eigen::ArrayXd &x)
 Return a vector of (-1.0, 0.0 or 1.0), depending on sign per element.
 
void fastSparseProduct (const AutoDiffMatrix &lhs, const AutoDiffMatrix &rhs, AutoDiffMatrix &res)
 Utility function to lessen code changes required elsewhere.
 
void fastSparseProduct (const Eigen::SparseMatrix< double > &lhs, const AutoDiffMatrix &rhs, AutoDiffMatrix &res)
 Utility function to lessen code changes required elsewhere.
 
AutoDiffMatrix operator* (const Eigen::SparseMatrix< double > &lhs, const AutoDiffMatrix &rhs)
 Multiplies an Eigen sparse matrix with an AutoDiffMatrix.
 
std::ostream & operator<< (std::ostream &out, const SimulationDataContainer &state)
 
std::istream & operator>> (std::istream &in, SimulationDataContainer &state)
 
std::ostream & operator<< (std::ostream &out, const WellState &state)
 
std::istream & operator>> (std::istream &in, WellState &state)
 
std::ostream & operator<< (std::ostream &out, const WellStateFullyImplicitBlackoil &state)
 
std::istream & operator>> (std::istream &in, WellStateFullyImplicitBlackoil &state)
 
 terminal_output_ (terminal_output)
 
 material_name_ (0)
 
 current_relaxation_ (1.0)
 
 rate_converter_ (fluid_.phaseUsage(), std::vector< int >(AutoDiffGrid::numCells(grid_), 0))
 
std::vector< double > destripe (const std::vector< double > &v, size_t stride, size_t offset)
 Extract single data vector from striped data. More...
 
std::vector< double > & stripe (const std::vector< double > &v, size_t stride, size_t offset, std::vector< double > &dst)
 Inject single data vector into striped data. More...
 
data::Solution simToSolution (const SimulationDataContainer &reservoir, const bool use_si_units, PhaseUsage phases)
 Returns Solution with the following fields: PRESSURE, TEMP (unconditionally) SWAT, SGAS, RS, RV, SSOL (if appropriate fields present in input) If use_si_units is true, the fields will have the measure UnitSystem::measure::identity, and therefore not be converted to customary units (depending on family) upon output. More...
 
void solutionToSim (const data::Solution &sol, const std::map< std::string, std::vector< double > > &extra, PhaseUsage phases, SimulationDataContainer &state)
 Copies the following fields from sol into state (all conditionally): PRESSURE, TEMP, SWAT, SGAS, RS, RV, SSOL Also handles extra data such as hysteresis parameters, SOMAX, etc. More...
 
void wellsToState (const data::Wells &wells, PhaseUsage phases, WellStateFullyImplicitBlackoil &state)
 Copies the following fields from wells into state. More...
 
template<class Grid >
void createGlobalCellArray (const Grid &grid, std::vector< int > &dest)
 Create a mapping from a global cell index of a grid to the logically Cartesian index of the ECL deck.
 
template<typename Lhs , typename Rhs , typename ResultType >
void fastSparseProduct (const Lhs &lhs, const Rhs &rhs, ResultType &res)
 
void fastDiagSparseProduct (const std::vector< double > &lhs, const Eigen::SparseMatrix< double > &rhs, Eigen::SparseMatrix< double > &res)
 
void fastSparseDiagProduct (const Eigen::SparseMatrix< double > &lhs, const std::vector< double > &rhs, Eigen::SparseMatrix< double > &res)
 
template<typename Lhs , typename Rhs >
bool equalSparsityPattern (const Lhs &lhs, const Rhs &rhs)
 
template<typename Lhs , typename Rhs >
void fastSparseAdd (Lhs &lhs, const Rhs &rhs)
 
template<typename Lhs , typename Rhs >
void fastSparseSubstract (Lhs &lhs, const Rhs &rhs)
 
std::string moduleVersionName ()
 Return the version name of the module, for example "2015.10" (for a release branch) or "2016.04-pre" (for a master branch). More...
 
std::string moduleVersionHash ()
 Return a (short) git hash for the current version of the module if this is a Release build (as defined by CMake), or "debug" for Debug builds. More...
 
std::string moduleVersion ()
 Return a string containing both the name and hash, if N is the name and H is the hash it will be "N (H)". More...
 
std::array< double, 3 > connectionMultiPhaseUpwind (const std::array< double, 3 > &head_diff, const std::array< double, 3 > &mob1, const std::array< double, 3 > &mob2, const double transmissibility, const double flux)
 Compute upwind directions for three-phase flow across a connection. More...
 
std::vector< ADBeliminateVariable (const std::vector< ADB > &eqs, const int n)
 Eliminate a variable via Schur complement. More...
 
recoverVariable (const ADB &equation, const V &partial_solution, const int n)
 
void formEllipticSystem (const int num_phases, const std::vector< ADB > &eqs_in, Eigen::SparseMatrix< double, Eigen::RowMajor > &A, V &b)
 Form an elliptic system of equations. More...
 
bool isIORank (const boost::any &parallel_info)
 Return true if this is a serial run, or rank zero on an MPI run.
 
std::vector< AutoDiffBlock
< double > > 
eliminateVariable (const std::vector< AutoDiffBlock< double > > &eqs, const int n)
 Eliminate a variable via Schur complement. More...
 
AutoDiffBlock< double >::V recoverVariable (const AutoDiffBlock< double > &equation, const AutoDiffBlock< double >::V &partial_solution, const int n)
 Recover that value of a variable previously eliminated. More...
 
void formEllipticSystem (const int num_phases, const std::vector< AutoDiffBlock< double > > &eqs, Eigen::SparseMatrix< double, Eigen::RowMajor > &A, AutoDiffBlock< double >::V &b)
 Form an elliptic system of equations. More...
 
template<class Grid >
std::unordered_set< std::string > distributeGridAndData (Grid &, const Opm::Deck &, const EclipseState &, BlackoilState &, BlackoilPropsAdFromDeck &, DerivedGeology &, std::shared_ptr< BlackoilPropsAdFromDeck::MaterialLawManager > &, std::vector< double > &, boost::any &, const bool)
 
 if (!Base::threshold_pressures_by_face_.empty())
 
return std::unique_ptr< ThisType::Solver > (new Solver(Base::solver_param_, std::move(model)))
 
void outputStateVtk (const UnstructuredGrid &grid, const SimulationDataContainer &state, const int step, const std::string &output_dir)
 
void outputWellStateMatlab (const Opm::WellState &well_state, const int step, const std::string &output_dir)
 
void outputStateVtk (const UnstructuredGrid &grid, const Opm::SimulationDataContainer &state, const int step, const std::string &output_dir)
 
template<class Grid >
void outputStateMatlab (const Grid &grid, const Opm::SimulationDataContainer &state, const int step, const std::string &output_dir)
 
 parallelOutput_ (output_?new ParallelDebugOutput< Grid >(grid, eclipseState, phaseUsage.num_phases, phaseUsage):0)
 
 outputDir_ (eclipseState.getIOConfig().getOutputDir())
 
 restart_double_si_ (output_?param.getDefault("restart_double_si", false):false)
 
 lastBackupReportStep_ (-1)
 
 phaseUsage_ (phaseUsage)
 
 eclipseState_ (eclipseState)
 
 asyncOutput_ ()
 
 if (!BaseType::threshold_pressures_by_face_.empty())
 
void computeTotalMobility (const Opm::IncompPropertiesInterface &props, const Opm::PolymerProperties &polyprops, const std::vector< int > &cells, const std::vector< double > &s, const std::vector< double > &c, const std::vector< double > &cmax, std::vector< double > &totmob)
 Computes total mobility for a set of s/c values. More...
 
void computeTotalMobilityOmega (const Opm::IncompPropertiesInterface &props, const Opm::PolymerProperties &polyprops, const std::vector< int > &cells, const std::vector< double > &s, const std::vector< double > &c, const std::vector< double > &cmax, std::vector< double > &totmob, std::vector< double > &omega)
 Computes total mobility and omega for a set of s/c values. More...
 
void computeFractionalFlow (const Opm::IncompPropertiesInterface &props, const Opm::PolymerProperties &polyprops, const std::vector< int > &cells, const std::vector< double > &s, const std::vector< double > &c, const std::vector< double > &cmax, std::vector< double > &fractional_flows)
 Computes the fractional flow for each cell in the cells argument. More...
 
void computeFractionalFlow (const Opm::BlackoilPropertiesInterface &props, const Opm::PolymerProperties &polyprops, const std::vector< int > &cells, const std::vector< double > &p, const std::vector< double > &T, const std::vector< double > &z, const std::vector< double > &s, const std::vector< double > &c, const std::vector< double > &cmax, std::vector< double > &fractional_flows)
 Computes the fractional flow for each cell in the cells argument. More...
 
void computeInjectedProduced (const IncompPropertiesInterface &props, const Opm::PolymerProperties &polyprops, const PolymerState &state, const std::vector< double > &transport_src, const std::vector< double > &inj_c, const double dt, double *injected, double *produced, double &polyinj, double &polyprod)
 Computes injected and produced volumes of all phases, and injected and produced polymer mass. More...
 
void computeInjectedProduced (const BlackoilPropertiesInterface &props, const Opm::PolymerProperties &polyprops, const PolymerBlackoilState &state, const std::vector< double > &transport_src, const std::vector< double > &inj_c, const double dt, double *injected, double *produced, double &polyinj, double &polyprod)
 Computes injected and produced volumes of all phases, and injected and produced polymer mass - in the compressible case. More...
 
double computePolymerMass (const std::vector< double > &pv, const std::vector< double > &s, const std::vector< double > &c, const double dps)
 Computes total polymer mass over all grid cells. More...
 
double computePolymerAdsorbed (const IncompPropertiesInterface &props, const Opm::PolymerProperties &polyprops, const std::vector< double > &pv, const std::vector< double > &cmax)
 Computes total absorbed polymer mass over all grid cells. More...
 
double computePolymerAdsorbed (const UnstructuredGrid &grid, const BlackoilPropertiesInterface &props, const Opm::PolymerProperties &polyprops, const PolymerBlackoilState &state, const RockCompressibility *rock_comp)
 Computes total absorbed polymer mass over all grid cells. More...
 
void ensureDirectoryExists (const boost::filesystem::path &dirpath)
 The directory pointed to by 'dirpath' will be created if it does not already exist. More...
 
void flowEbosBlackoilSetDeck (Deck &deck, EclipseState &eclState)
 
int flowEbosBlackoilMain (int argc, char **argv)
 
void flowEbosGasOilSetDeck (Deck &deck, EclipseState &eclState)
 
int flowEbosGasOilMain (int argc, char **argv)
 
void flowEbosOilWaterSetDeck (Deck &deck, EclipseState &eclState)
 
int flowEbosOilWaterMain (int argc, char **argv)
 
void flowEbosPolymerSetDeck (Deck &deck, EclipseState &eclState)
 
int flowEbosPolymerMain (int argc, char **argv)
 
void flowEbosSolventSetDeck (Deck &deck, EclipseState &eclState)
 
int flowEbosSolventMain (int argc, char **argv)
 
template<class Grid >
void computeMaxDp (std::map< std::pair< int, int >, double > &maxDp, const Deck &deck, const EclipseState &eclipseState, const Grid &grid, const BlackoilState &initialState, const BlackoilPropertiesFromDeck &props, const double gravity)
 Compute the maximum gravity corrected pressure difference of all equilibration regions given a reservoir state. More...
 
template<class Grid >
std::vector< double > thresholdPressures (const Deck &, const EclipseState &eclipseState, const Grid &grid, const std::map< std::pair< int, int >, double > &maxDp)
 Get a vector of pressure thresholds from EclipseState. More...
 
std::vector< double > thresholdPressuresNNC (const EclipseState &eclipseState, const NNC &nnc, const std::map< std::pair< int, int >, double > &maxDp)
 Get a vector of pressure thresholds from either EclipseState or maxDp (for defaulted values) for all Non-neighbour connections (NNCs). More...
 
void writeVtkData (const std::array< int, 3 > &dims, const std::array< double, 3 > &cell_size, const std::map< std::string, const std::vector< double > * > &data, std::ostream &os)
 Vtk output for cartesian grids.
 
void writeVtkData (const UnstructuredGrid &, const std::map< std::string, const std::vector< double > * > &data, std::ostream &os)
 Vtk output for general grids.
 

Variables

constexpr const auto Water = BlackoilPhases::Aqua
 
constexpr const auto Oil = BlackoilPhases::Liquid
 
constexpr const auto Gas = BlackoilPhases::Vapour
 
constexpr const auto MaxNumPhases = BlackoilPhases::MaxNumPhases
 
auto model
 
template<class Grid >
BlackoilOutputWriter::BlackoilOutputWriter(const
Grid &grid, const
ParameterGroup &param, const
Opm::EclipseState
&eclipseState, std::unique_ptr
< EclipseIO > &&eclIO, const
Opm::PhaseUsage &phaseUsage) 
return (outputString=="all"||outputString=="true")
 

Detailed Description

This file contains a set of helper functions used by VFPProd / VFPInj.

Function Documentation

void Opm::computeFractionalFlow ( const Opm::IncompPropertiesInterface &  props,
const Opm::PolymerProperties polyprops,
const std::vector< int > &  cells,
const std::vector< double > &  s,
const std::vector< double > &  c,
const std::vector< double > &  cmax,
std::vector< double > &  fractional_flows 
)

Computes the fractional flow for each cell in the cells argument.

Parameters
[in]propsrock and fluid properties
[in]polypropspolymer properties
[in]cellscells with which the saturation values are associated
[in]ssaturation values (for all phases)
[in]cconcentration values
[in]cmaxmax polymer concentration experienced by cell
[out]fractional_flowthe fractional flow for each phase for each cell.
void Opm::computeFractionalFlow ( const Opm::BlackoilPropertiesInterface &  props,
const Opm::PolymerProperties polyprops,
const std::vector< int > &  cells,
const std::vector< double > &  p,
const std::vector< double > &  T,
const std::vector< double > &  z,
const std::vector< double > &  s,
const std::vector< double > &  c,
const std::vector< double > &  cmax,
std::vector< double > &  fractional_flows 
)

Computes the fractional flow for each cell in the cells argument.

Parameters
[in]propsrock and fluid properties
[in]polypropspolymer properties
[in]cellscells with which the saturation values are associated
[in]ppressure (one value per cell)
[in]zsurface-volume values (for all P phases)
[in]ssaturation values (for all phases)
[in]cconcentration values
[in]cmaxmax polymer concentration experienced by cell
[out]fractional_flowthe fractional flow for each phase for each cell.
[in]propsrock and fluid properties
[in]polypropspolymer properties
[in]cellscells with which the saturation values are associated
[in]ppressure (one value per cell)
[in]Ttemperature (one value per cell)
[in]zsurface-volume values (for all P phases)
[in]ssaturation values (for all phases)
[in]cconcentration values
[in]cmaxmax polymer concentration experienced by cell
[out]fractional_flowthe fractional flow for each phase for each cell.
void Opm::computeInjectedProduced ( const IncompPropertiesInterface &  props,
const Opm::PolymerProperties polyprops,
const PolymerState &  state,
const std::vector< double > &  transport_src,
const std::vector< double > &  inj_c,
const double  dt,
double *  injected,
double *  produced,
double &  polyinj,
double &  polyprod 
)

Computes injected and produced volumes of all phases, and injected and produced polymer mass.

Note 1: assumes that only the first phase is injected. Note 2: assumes that transport has been done with an implicit method, i.e. that the current state gives the mobilities used for the preceding timestep.

Parameters
[in]propsfluid and rock properties.
[in]polypropspolymer properties
[in]statestate variables (pressure, fluxes etc.)
[in]srcif < 0: total reservoir volume outflow, if > 0: first phase reservoir volume inflow.
[in]inj_cinjected concentration by cell
[in]dttimestep used
[out]injectedmust point to a valid array with P elements, where P = s.size()/src.size().
[out]producedmust also point to a valid array with P elements.
[out]polyinjinjected mass of polymer
[out]polyprodproduced mass of polymer
void Opm::computeInjectedProduced ( const BlackoilPropertiesInterface &  props,
const Opm::PolymerProperties polyprops,
const PolymerBlackoilState &  state,
const std::vector< double > &  transport_src,
const std::vector< double > &  inj_c,
const double  dt,
double *  injected,
double *  produced,
double &  polyinj,
double &  polyprod 
)

Computes injected and produced volumes of all phases, and injected and produced polymer mass - in the compressible case.

Note 1: assumes that only the first phase is injected. Note 2: assumes that transport has been done with an implicit method, i.e. that the current state gives the mobilities used for the preceding timestep.

Parameters
[in]propsfluid and rock properties.
[in]polypropspolymer properties
[in]statestate variables (pressure, fluxes etc.)
[in]transport_srcif < 0: total reservoir volume outflow, if > 0: first phase surface volume inflow.
[in]inj_cinjected concentration by cell
[in]dttimestep used
[out]injectedmust point to a valid array with P elements, where P = s.size()/transport_src.size().
[out]producedmust also point to a valid array with P elements.
[out]polyinjinjected mass of polymer
[out]polyprodproduced mass of polymer

Note 1: assumes that only the first phase is injected. Note 2: assumes that transport has been done with an implicit method, i.e. that the current state gives the mobilities used for the preceding timestep.

Parameters
[in]propsfluid and rock properties.
[in]polypropspolymer properties
[in]statestate variables (pressure, fluxes etc.)
[in]srcif < 0: total reservoir volume outflow, if > 0: first phase surface volume inflow.
[in]inj_cinjected concentration by cell
[in]dttimestep used
[out]injectedmust point to a valid array with P elements, where P = s.size()/src.size().
[out]producedmust also point to a valid array with P elements.
[out]polyinjinjected mass of polymer
[out]polyprodproduced mass of polymer
template<class Grid >
void Opm::computeMaxDp ( std::map< std::pair< int, int >, double > &  maxDp,
const Deck &  deck,
const EclipseState &  eclipseState,
const Grid &  grid,
const BlackoilState &  initialState,
const BlackoilPropertiesFromDeck &  props,
const double  gravity 
)

Compute the maximum gravity corrected pressure difference of all equilibration regions given a reservoir state.

Template Parameters
GridType of grid object (UnstructuredGrid or CpGrid).
Parameters
[out]maxDpThe resulting pressure difference between equilibration regions
[in]deckInput deck, EQLOPTS and THPRES are accessed from it.
[in]eclipseStateProcessed eclipse state, EQLNUM is accessed from it.
[in]gridThe grid to which the thresholds apply.
[in]initialStateThe state of the reservoir
[in]propsThe object which calculates fluid properties
[in]gravityThe gravity constant
double Opm::computePolymerAdsorbed ( const IncompPropertiesInterface &  props,
const Opm::PolymerProperties polyprops,
const std::vector< double > &  pv,
const std::vector< double > &  cmax 
)

Computes total absorbed polymer mass over all grid cells.

Parameters
[in]propsfluid and rock properties.
[in]polypropspolymer properties
[in]pvthe pore volume by cell.
[in]cmaxmax polymer concentration for cell
Returns
total absorbed polymer mass.
double Opm::computePolymerAdsorbed ( const UnstructuredGrid &  grid,
const BlackoilPropertiesInterface &  props,
const Opm::PolymerProperties polyprops,
const PolymerBlackoilState &  state,
const RockCompressibility *  rock_comp 
)

Computes total absorbed polymer mass over all grid cells.

With compressibility

Parameters
[in]gridgrid
[in]propsfluid and rock properties.
[in]polypropspolymer properties
[in]statefluid state variable
[in]rock_comprock compressibility (depends on pressure)
Returns
total absorbed polymer mass.

With compressibility

Parameters
[in]gridgrid
[in]propsfluid and rock properties.
[in]polypropspolymer properties
[in]stateState variables
[in]rock_compRock compressibility (optional)
Returns
total absorbed polymer mass.
double Opm::computePolymerMass ( const std::vector< double > &  pv,
const std::vector< double > &  s,
const std::vector< double > &  c,
const double  dps 
)

Computes total polymer mass over all grid cells.

Computes total (free) polymer mass over all grid cells.

Parameters
[in]pvthe pore volume by cell.
[in]ssaturation values (for all P phases)
[in]cpolymer concentration
[in]dpsdead pore space
Returns
total polymer mass in grid.
void Opm::computeTotalMobility ( const Opm::IncompPropertiesInterface &  props,
const Opm::PolymerProperties polyprops,
const std::vector< int > &  cells,
const std::vector< double > &  s,
const std::vector< double > &  c,
const std::vector< double > &  cmax,
std::vector< double > &  totmob 
)

Computes total mobility for a set of s/c values.

Parameters
[in]propsrock and fluid properties
[in]polypropspolymer properties
[in]cellscells with which the saturation values are associated
[in]ssaturation values (for all phases)
[in]cpolymer concentration
[out]totmobtotal mobilities.
void Opm::computeTotalMobilityOmega ( const Opm::IncompPropertiesInterface &  props,
const Opm::PolymerProperties polyprops,
const std::vector< int > &  cells,
const std::vector< double > &  s,
const std::vector< double > &  c,
const std::vector< double > &  cmax,
std::vector< double > &  totmob,
std::vector< double > &  omega 
)

Computes total mobility and omega for a set of s/c values.

Parameters
[in]propsrock and fluid properties
[in]polypropspolymer properties
[in]cellscells with which the saturation values are associated
[in]ssaturation values (for all phases)
[in]cpolymer concentration
[out]totmobtotal mobility
[out]omegamobility-weighted (or fractional-flow weighted) fluid densities.
[in]propsrock and fluid properties
[in]polypropspolymer properties
[in]cellscells with which the saturation values are associated
[in]ssaturation values (for all phases)
[in]cpolymer concentration
[in]cmaxmax polymer concentration experienced by cell
[out]totmobtotal mobility
[out]omegamobility-weighted (or fractional-flow weighted) fluid densities.
std::array< double, 3 > Opm::connectionMultiPhaseUpwind ( const std::array< double, 3 > &  head_diff,
const std::array< double, 3 > &  mob1,
const std::array< double, 3 > &  mob2,
const double  transmissibility,
const double  flux 
)

Compute upwind directions for three-phase flow across a connection.

Parameters
[in]head_diffhead differences by phase
[in]mob1phase mobilities for first cell
[in]mob2phase mobilities for second cell
[in]transmissibilitytranmissibility of connection
[in]fluxtotal volume flux across connection
Returns
array containing, for each phase, 1.0 if flow in the direction of the connection, -1.0 if flow in the opposite direction.
std::vector< double > Opm::destripe ( const std::vector< double > &  v,
size_t  stride,
size_t  offset 
)

Extract single data vector from striped data.

Returns
u such that u[i] = v[offset + i*stride].
std::vector< AutoDiffBlock<double> > Opm::eliminateVariable ( const std::vector< AutoDiffBlock< double > > &  eqs,
const int  n 
)

Eliminate a variable via Schur complement.

Parameters
[in]eqsset of equations with Jacobians
[in]nindex of equation/variable to eliminate.
Returns
new set of equations, one smaller than eqs. Note: this method requires the eliminated variable to have the same size as the equation in the corresponding position (that also will be eliminated).
std::vector<ADB> Opm::eliminateVariable ( const std::vector< AutoDiffBlock< double > > &  eqs,
const int  n 
)

Eliminate a variable via Schur complement.

Parameters
[in]eqsset of equations with Jacobians
[in]nindex of equation/variable to eliminate.
Returns
new set of equations, one smaller than eqs. Note: this method requires the eliminated variable to have the same size as the equation in the corresponding position (that also will be eliminated).
void Opm::ensureDirectoryExists ( const boost::filesystem::path &  dirpath)

The directory pointed to by 'dirpath' will be created if it does not already exist.

Will throw an exception if this cannot be done.

Will throw an exception if this cannot be done.

Note that std::string can be passed to this functions, as they can be implicitly converted to boost::filesystem::path objects.

void Opm::formEllipticSystem ( const int  num_phases,
const std::vector< AutoDiffBlock< double > > &  eqs,
Eigen::SparseMatrix< double, Eigen::RowMajor > &  A,
AutoDiffBlock< double >::V &  b 
)

Form an elliptic system of equations.

Parameters
[in]num_phasesthe number of fluid phases
[in]eqsthe equations
[out]Athe resulting full system matrix
[out]bthe right hand side This function will deal with the first num_phases equations in eqs, and return a matrix A for the full system that has a elliptic upper left corner, if possible.
void Opm::formEllipticSystem ( const int  num_phases,
const std::vector< ADB > &  eqs_in,
Eigen::SparseMatrix< double, Eigen::RowMajor > &  A,
V &  b 
)

Form an elliptic system of equations.

Parameters
[in]num_phasesthe number of fluid phases
[in]eqsthe equations
[out]Athe resulting full system matrix
[out]bthe right hand side This function will deal with the first num_phases equations in eqs, and return a matrix A for the full system that has a elliptic upper left corner, if possible.
std::string Opm::moduleVersion ( )

Return a string containing both the name and hash, if N is the name and H is the hash it will be "N (H)".

For example "2016.04-pre (f15be17)" or "2016.04-pre (debug)".

std::string Opm::moduleVersionHash ( )

Return a (short) git hash for the current version of the module if this is a Release build (as defined by CMake), or "debug" for Debug builds.

std::string Opm::moduleVersionName ( )

Return the version name of the module, for example "2015.10" (for a release branch) or "2016.04-pre" (for a master branch).

template<typename Scalar >
AutoDiffBlock<Scalar> Opm::operator* ( const AutoDiffBlock< Scalar > &  lhs,
const Scalar &  rhs 
)

Operator for multiplication with a scalar on the right-hand side.

Parameters
lhsThe left-hand side AD forward block
rhsThe scalar to multiply with
Returns
The product
template<typename Scalar >
AutoDiffBlock<Scalar> Opm::operator* ( const Scalar &  lhs,
const AutoDiffBlock< Scalar > &  rhs 
)

Operator for multiplication with a scalar on the left-hand side.

Parameters
lhsThe scalar to multiply with
rhsThe right-hand side AD forward block
Returns
The product
template<typename Scalar >
AutoDiffBlock<Scalar> Opm::pow ( const AutoDiffBlock< Scalar > &  base,
const double  exponent 
)

Computes the value of base raised to the power of exponent.

Parameters
baseThe AD forward block
exponentdouble
Returns
The value of base raised to the power of exponent
template<typename Scalar >
AutoDiffBlock<Scalar> Opm::pow ( const AutoDiffBlock< Scalar > &  base,
const typename AutoDiffBlock< Scalar >::V &  exponent 
)

Computes the value of base raised to the power of exponent.

Parameters
baseThe AD forward block
exponentArray of exponents
Returns
The value of base raised to the power of exponent elementwise
template<typename Scalar >
AutoDiffBlock<Scalar> Opm::pow ( const typename AutoDiffBlock< Scalar >::V &  base,
const AutoDiffBlock< Scalar > &  exponent 
)

Computes the value of base raised to the power of exponent.

Parameters
baseArray of base values
exponentThe AD forward block
Returns
The value of base raised to the power of exponent elementwise
template<typename Scalar >
AutoDiffBlock<Scalar> Opm::pow ( const AutoDiffBlock< Scalar > &  base,
const AutoDiffBlock< Scalar > &  exponent 
)

Computes the value of base raised to the power of exponent.

Parameters
baseThe base AD forward block
exponentThe exponent AD forward block
Returns
The value of base raised to the power of exp
AutoDiffBlock<double>::V Opm::recoverVariable ( const AutoDiffBlock< double > &  equation,
const AutoDiffBlock< double >::V &  partial_solution,
const int  n 
)

Recover that value of a variable previously eliminated.

Parameters
[in]equationpreviously eliminated equation.
[in]partial_solutionsolution to the remainder system after elimination.
[in]nindex of equation/variable that was eliminated.
Returns
solution to complete system.
data::Solution Opm::simToSolution ( const SimulationDataContainer &  reservoir,
const bool  use_si_units,
PhaseUsage  phases 
)

Returns Solution with the following fields: PRESSURE, TEMP (unconditionally) SWAT, SGAS, RS, RV, SSOL (if appropriate fields present in input) If use_si_units is true, the fields will have the measure UnitSystem::measure::identity, and therefore not be converted to customary units (depending on family) upon output.

void Opm::solutionToSim ( const data::Solution &  sol,
const std::map< std::string, std::vector< double > > &  extra,
PhaseUsage  phases,
SimulationDataContainer &  state 
)

Copies the following fields from sol into state (all conditionally): PRESSURE, TEMP, SWAT, SGAS, RS, RV, SSOL Also handles extra data such as hysteresis parameters, SOMAX, etc.

Eigen::SparseMatrix<double> Opm::spdiag ( const AutoDiffBlock< double >::V &  d)
inline

Construct square sparse matrix with the elements of d on the diagonal.

Need to mark this as inline since it is defined in a header and not a template.

std::vector< double > & Opm::stripe ( const std::vector< double > &  v,
size_t  stride,
size_t  offset,
std::vector< double > &  dst 
)

Inject single data vector into striped data.

Returns
reference to dst input, that is changed so that dst[offset + i*stride] = v[i]. This is done for i = 0..(dst.size()/stride).
template<class Grid >
std::vector<double> Opm::thresholdPressures ( const Deck &  ,
const EclipseState &  eclipseState,
const Grid &  grid,
const std::map< std::pair< int, int >, double > &  maxDp 
)

Get a vector of pressure thresholds from EclipseState.

This function looks at EQLOPTS, THPRES and EQLNUM to determine pressure thresholds. It does not consider the case where the threshold values are defaulted, in which case they should be determined from the initial, equilibrated simulation state.

Template Parameters
GridType of grid object (UnstructuredGrid or CpGrid).
Parameters
[in]deckInput deck, EQLOPTS and THPRES are accessed from it.
[in]eclipseStateProcessed eclipse state, EQLNUM is accessed from it.
[in]maxDpThe maximum gravity corrected pressure differences between the equilibration regions.
[in]gridThe grid to which the thresholds apply.
Returns
A vector of pressure thresholds, one for each face in the grid. A value of zero means no threshold for that particular face. An empty vector is returned if there is no THPRES feature used in the deck.
std::vector<double> Opm::thresholdPressuresNNC ( const EclipseState &  eclipseState,
const NNC &  nnc,
const std::map< std::pair< int, int >, double > &  maxDp 
)

Get a vector of pressure thresholds from either EclipseState or maxDp (for defaulted values) for all Non-neighbour connections (NNCs).

Parameters
[in]nncThe NNCs,
[in]eclipseStateProcessed eclipse state, EQLNUM is accessed from it.
[in]maxDpThe maximum gravity corrected pressure differences between the equilibration regions.
Returns
A vector of pressure thresholds, one for each NNC in the grid. A value of zero means no threshold for that particular connection. An empty vector is returned if there is no THPRES feature used in the deck.
AutoDiffBlock<double> Opm::vertcatCollapseJacs ( const std::vector< AutoDiffBlock< double > > &  x)
inline

Returns the vertical concatenation [ x[0]; x[1]; ...; x[n-1] ] of the inputs.

This function also collapses the Jacobian matrices into one like collapsJacs().

void Opm::wellsToState ( const data::Wells &  wells,
PhaseUsage  phases,
WellStateFullyImplicitBlackoil &  state 
)

Copies the following fields from wells into state.

bhp, temperature, currentControls, wellRates, perfPress, perfRates, perfPhaseRates

Variable Documentation

auto Opm::model
Initial value:
= std::unique_ptr<Model>(new Model(model_param_,
grid_,
props_,
geo_,
rock_comp_props_,
well_model,
solver_,
eclipse_state_,
has_disgas_,
has_vapoil_,
terminal_output_))