My Project
Opm Namespace Reference

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

Namespaces

namespace  ExceptionType
 This class implements a deferred logger: 1) messages can be pushed back to a vector 2) a call to logMessages adds the messages to OpmLog backends.
 

Classes

class  AdaptiveSimulatorTimer
 Simulation timer for adaptive time stepping. More...
 
class  AdaptiveTimeSteppingEbos
 
class  ALQState
 
struct  AMGHelper
 
struct  AMGSmootherArgsHelper
 
struct  AMGSmootherArgsHelper< Opm::ParallelOverlappingILU0< M, V, V, C > >
 
class  AquiferAnalytical
 
class  AquiferCarterTracy
 
class  AquiferConstantFlux
 
class  AquiferFetkovich
 
class  AquiferInterface
 
class  AquiferNumerical
 
class  BdaBridge
 BdaBridge acts as interface between opm-simulators with the BdaSolvers. More...
 
class  BlackoilAquiferModel
 Class for handling the blackoil well model. More...
 
class  BlackoilModelEbos
 A model implementation for three-phase black oil. More...
 
struct  BlackoilModelParametersEbos
 Solver parameters for the BlackoilModel. More...
 
class  BlackoilPhases
 
class  BlackoilWellModel
 Class for handling the blackoil well model. More...
 
class  BlackoilWellModelConstraints
 Class for handling constraints for the blackoil well model. More...
 
class  BlackoilWellModelGeneric
 Class for handling the blackoil well model. More...
 
class  BlackoilWellModelGuideRates
 Class for handling the guide rates in the blackoil well model. More...
 
class  BlackoilWellModelRestart
 Class for restarting the blackoil well model. More...
 
class  CheckDistributedWellConnections
 Class checking that all connections are on active cells. More...
 
class  CommunicateAboveBelow
 Class to facilitate getting values associated with the above/below perforation. More...
 
class  ConvergenceOutputConfiguration
 Parse comma separated option strings into a runtime configuration object for whether to output additional convergence information and, if so, what information to output. More...
 
class  ConvergenceOutputThread
 Encapsulating object for thread processing producer's convergence output requests. More...
 
class  ConvergenceReport
 Represents the convergence status of the whole simulator, to make it possible to query and store the reasons for convergence failures. More...
 
class  ConvergenceReportQueue
 Communication channel between thread creating output requests and consumer thread writing those requests to a file. More...
 
struct  CopyGatherScatter
 
class  DeferredLogger
 
struct  FlowLinearSolverParameters
 This class carries all parameters for the NewtonIterationBlackoilInterleaved class. More...
 
class  FlowMainEbos
 
class  GasLiftCommon
 
class  GasLiftGroupInfo
 
class  GasLiftSingleWell
 
class  GasLiftSingleWellGeneric
 
class  GasLiftStage2
 
class  GasLiftWellState
 
class  GlobalPerfContainerFactory
 A factory for creating a global data representation for distributed wells. More...
 
class  GlobalWellInfo
 
class  GroupState
 
class  HardcodedTimeStepControl
 HardcodedTimeStepControl Input generated from summary file using the ert application: More...
 
class  HDF5File
 Class handling simple output to HDF5. More...
 
class  ISTLSolverEbos
 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...
 
class  LinearOperatorExtra
 Linear operator wrapper for well model. More...
 
class  Main
 
class  MatrixBlock
 
class  MultisegmentWell
 
class  MultisegmentWellAssemble
 Class handling assemble of the equation system for MultisegmentWell. More...
 
class  MultisegmentWellContribution
 This class serves to duplicate the functionality of the MultisegmentWell A MultisegmentWell uses C, D and B and performs y -= (C^T * (D^-1 * (B*x))) B and C are matrices, with M rows and N columns, where N is the size of the matrix. More...
 
class  MultisegmentWellEquationAccess
 Class administering assembler access to equation system. More...
 
class  MultisegmentWellEquations
 
class  MultisegmentWellEval
 
class  MultisegmentWellGeneric
 
class  MultisegmentWellPrimaryVariables
 
class  MultisegmentWellSegments
 
class  NonlinearSolverEbos
 A nonlinear solver class suitable for general fully-implicit models, as well as pressure, transport and sequential models. More...
 
class  ParallelEclipseState
 Parallel frontend to the EclipseState. More...
 
class  ParallelFieldPropsManager
 Parallel frontend to the field properties. More...
 
class  ParallelOverlappingILU0
 A two-step version of an overlapping Schwarz preconditioner using one step ILU0 as. More...
 
class  ParallelOverlappingILU0Args
 
class  ParallelRestrictedOverlappingSchwarz
 Block parallel preconditioner. More...
 
class  ParallelWellInfo
 Class encapsulating some information about parallel wells. More...
 
class  PerfData
 
struct  PerforationData
 Static data associated with a well perforation. More...
 
struct  PhaseUsage
 
class  PIDAndIterationCountTimeStepControl
 PID controller based adaptive time step control as above that also takes an target iteration into account. More...
 
class  PIDTimeStepControl
 PID controller based adaptive time step control as suggested in: Turek and Kuzmin. More...
 
class  PreconditionerFactory
 This is an object factory for creating preconditioners. More...
 
class  PressureBhpTransferPolicy
 
class  PressureTransferPolicy
 
class  PropertyTree
 
class  RelativeChangeInterface
 RelativeChangeInterface. More...
 
class  RelpermDiagnostics
 This class is intend to be a relperm diagnostics, to detect wrong input of relperm table and endpoints. More...
 
class  SegmentState
 
class  SimpleIterationCountTimeStepControl
 A simple iteration count based adaptive time step control. More...
 
class  SimulatorFullyImplicitBlackoilEbos
 a simulator for the blackoil model More...
 
struct  SimulatorReport
 
struct  SimulatorReportSingle
 A struct for returning timing data from a simulator to its caller. More...
 
class  SimulatorTimer
 
class  SimulatorTimerInterface
 Interface class for SimulatorTimer objects, to be improved. More...
 
class  SingleWellState
 
struct  StandardPreconditioners
 
struct  StandardPreconditioners< Operator, Dune::Amg::SequentialInformation >
 
class  StandardWell
 
class  StandardWellAssemble
 Class handling assemble of the equation system for StandardWell. More...
 
class  StandardWellConnections
 
class  StandardWellEquationAccess
 Class administering assembler access to equation system. More...
 
class  StandardWellEquations
 
class  StandardWellEval
 
class  StandardWellPrimaryVariables
 Class holding primary variables for StandardWell. More...
 
struct  StepReport
 
class  SupportsFaceTag
 
class  SupportsFaceTag< Dune::CpGrid >
 
class  TimeStepControlInterface
 TimeStepControlInterface. More...
 
class  VectorVectorDataHandle
 A data handle sending multiple data store in vectors attached to cells. 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  WellAssemble
 
class  WellBhpThpCalculator
 Class for computing BHP limits. More...
 
class  WellConnectionAuxiliaryModule
 
class  WellConnectionAuxiliaryModuleGeneric
 
class  WellConstraints
 Class for computing well group constraints. More...
 
class  WellContainer
 
class  WellContributions
 This class serves to eliminate the need to include the WellContributions into the matrix (with –matrix-add-well-contributions=true) for the cusparseSolver or openclSolver. More...
 
class  WellContributionsCuda
 
class  WellContributionsOCL
 
class  WellConvergence
 
class  WellGroupConstraints
 Class for computing well group constraints. More...
 
class  WellGroupControls
 Class for computing well group controls. More...
 
class  WellInterface
 
class  WellInterfaceFluidSystem
 
class  WellInterfaceGeneric
 
class  WellInterfaceIndices
 
class  WellModelAsLinearOperator
 
class  WellModelGhostLastMatrixAdapter
 Adapter to combine a matrix and another linear operator into a combined linear operator. More...
 
class  WellModelMatrixAdapter
 Adapter to combine a matrix and another linear operator into a combined linear operator. More...
 
class  WellProdIndexCalculator
 Collect per-connection static information to enable calculating connection-level or well-level productivity index values when incorporating dynamic phase mobilities. More...
 
class  WellState
 The state of a set of wells, tailored for use by the fully implicit blackoil simulator. More...
 
class  WellTest
 Class for performing well tests. More...
 
struct  WGState
 

Typedefs

typedef Dune::InverseOperatorResult InverseOperatorResult
 
using CommSeq = Dune::Amg::SequentialInformation
 
template<int Dim>
using OpFSeq = Dune::MatrixAdapter< Dune::BCRSMatrix< Dune::FieldMatrix< double, Dim, Dim > >, Dune::BlockVector< Dune::FieldVector< double, Dim > >, Dune::BlockVector< Dune::FieldVector< double, Dim > > >
 
template<int Dim>
using OpBSeq = Dune::MatrixAdapter< Dune::BCRSMatrix< Opm::MatrixBlock< double, Dim, Dim > >, Dune::BlockVector< Dune::FieldVector< double, Dim > >, Dune::BlockVector< Dune::FieldVector< double, Dim > > >
 
template<int Dim, bool overlap>
using OpW = WellModelMatrixAdapter< Dune::BCRSMatrix< MatrixBlock< double, Dim, Dim > >, Dune::BlockVector< Dune::FieldVector< double, Dim > >, Dune::BlockVector< Dune::FieldVector< double, Dim > >, overlap >
 
template<int Dim, bool overlap>
using OpWG = WellModelGhostLastMatrixAdapter< Dune::BCRSMatrix< MatrixBlock< double, Dim, Dim > >, Dune::BlockVector< Dune::FieldVector< double, Dim > >, Dune::BlockVector< Dune::FieldVector< double, Dim > >, overlap >
 
using dIter = typename std::vector< double >::iterator
 
using cdIter = typename std::vector< double >::const_iterator
 
using FluidSys = BlackOilFluidSystem< double, BlackOilDefaultIndexTraits >
 
using RegionId = int
 

Enumerations

enum class  NonlinearRelaxType { Dampen , SOR }
 
enum class  MILU_VARIANT {
  ILU = 0 , MILU_1 = 1 , MILU_2 = 2 , MILU_3 = 3 ,
  MILU_4 = 4
}
 
enum class  TimeStepControlType { SimpleIterationCount , PID , PIDAndIterationCount , HardCodedTimeStep }
 
enum class  FileOutputMode { OUTPUT_NONE = 0 , OUTPUT_LOG_ONLY = 1 , OUTPUT_ALL = 3 }
 

Functions

PhaseUsage phaseUsage (const Phases &phases)
 Determine the active phases.
 
PhaseUsage phaseUsageFromDeck (const EclipseState &eclipseState)
 Looks at presence of WATER, OIL and GAS keywords in state object to determine active phases.
 
PhaseUsage phaseUsageFromDeck (const Deck &deck)
 Looks at presence of WATER, OIL and GAS keywords in deck to determine active phases.
 
void printPRTHeader (const std::string &parameters, std::string_view moduleVersion, std::string_view compileTimestamp)
 
void printFlowBanner (int nprocs, int nthreads, std::string_view moduleVersionName)
 
void printFlowTrailer (int nprocs, int nthreads, const SimulatorReport &report)
 
template<class TypeTag >
int flowEbosMain (int argc, char **argv, bool outputCout, bool outputFiles)
 
void outputReportStep (const SimulatorTimer &timer)
 
void outputTimestampFIP (const SimulatorTimer &timer, const std::string &title, const std::string &version)
 
void checkSerializedCmdLine (const std::string &current, const std::string &stored)
 
template<class BridgeMatrix >
int replaceZeroDiagonal (BridgeMatrix &mat, std::vector< typename BridgeMatrix::size_type > &diag_indices)
 
template<class BridgeMatrix >
void checkMemoryContiguous (const BridgeMatrix &mat)
 
 INSTANTIATE_BDA_FUNCTIONS (1)
 
 INSTANTIATE_BDA_FUNCTIONS (2)
 
 INSTANTIATE_BDA_FUNCTIONS (3)
 
 INSTANTIATE_BDA_FUNCTIONS (4)
 
 INSTANTIATE_BDA_FUNCTIONS (5)
 
 INSTANTIATE_BDA_FUNCTIONS (6)
 
template<class Graph >
std::tuple< std::vector< int >, int, std::vector< std::size_t > > colorVerticesWelshPowell (const Graph &graph)
 Color the vertices of graph. More...
 
template<class Graph >
std::vector< std::size_t > reorderVerticesPreserving (const std::vector< int > &colors, int noColors, const std::vector< std::size_t > &verticesPerColor, const Graph &graph)
 ! Reorder colored graph preserving order of vertices with the same color.
 
template<class Graph >
std::vector< std::size_t > reorderVerticesSpheres (const std::vector< int > &colors, int noColors, const std::vector< std::size_t > &verticesPerColor, const Graph &graph, typename Graph::VertexDescriptor root)
 ! Reorder Vetrices in spheres
 
MILU_VARIANT convertString2Milu (const std::string &milu)
 
template<class T1 >
auto accumulateMaskedValues (const T1 &container, const std::vector< double > *maskContainer) -> decltype(container[0] *(*maskContainer)[0])
 Accumulates entries masked with 1. More...
 
template<class Communication >
void extendCommunicatorWithWells (const Communication &comm, std::shared_ptr< Communication > &commRW, const int nw)
 
template std::string PropertyTree::get< std::string > (const std::string &key) const
 
template std::string PropertyTree::get< std::string > (const std::string &key, const std::string &defValue) const
 
template void PropertyTree::put< std::string > (const std::string &key, const std::string &value)
 
PropertyTree setupPropertyTree (FlowLinearSolverParameters p, bool linearSolverMaxIterSet, bool linearSolverReductionSet)
 Set up a property tree intended for FlexibleSolver by either reading the tree from a JSON file or creating a tree giving the default solver and preconditioner. More...
 
std::string getSolverString (const FlowLinearSolverParameters &p)
 
PropertyTree setupCPRW (const std::string &, const FlowLinearSolverParameters &p)
 
PropertyTree setupCPR (const std::string &conf, const FlowLinearSolverParameters &p)
 
PropertyTree setupAMG (const std::string &conf, const FlowLinearSolverParameters &p)
 
PropertyTree setupILU (const std::string &conf, const FlowLinearSolverParameters &p)
 
ConvergenceReport gatherConvergenceReport (const ConvergenceReport &local_report, Parallel::Communication communicator)
 Create a global convergence report combining local (per-process) reports.
 
Opm::DeferredLogger gatherDeferredLogger (const Opm::DeferredLogger &local_deferredlogger, Parallel::Communication communicator)
 Create a global log combining local logs.
 
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).
 
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.
 
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::string compileTimestamp ()
 Return a string "dd-mm-yyyy at HH::MM::SS hrs" which is the time the binary was compiled.
 
RestartValue loadParallelRestart (const EclipseIO *eclIO, Action::State &actionState, SummaryState &summaryState, const std::vector< Opm::RestartKey > &solutionKeys, const std::vector< Opm::RestartKey > &extraKeys, Parallel::Communication comm)
 
RestartValue loadParallelRestart (const EclipseIO *eclIO, Action::State &actionState, SummaryState &summaryState, const std::vector< RestartKey > &solutionKeys, const std::vector< RestartKey > &extraKeys, Parallel::Communication comm)
 
void eclStateBroadcast (Parallel::Communication comm, EclipseState &eclState, Schedule &schedule, SummaryConfig &summaryConfig, UDQState &udqState, Action::State &actionState, WellTestState &wtestState)
 Broadcasts an eclipse state from root node in parallel runs. More...
 
template<class T >
void eclBroadcast (Parallel::Communication comm, T &data)
 
template void eclBroadcast< TransMult > (Parallel::Communication, TransMult &)
 
template void eclBroadcast< Schedule > (Parallel::Communication, Schedule &)
 
void ensureOutputDirExists (const std::string &cmdline_output_dir)
 
std::unique_ptr< ParseContext > setupParseContext (const bool exitOnAllErrors)
 
FileOutputMode setupLogging (int mpi_rank_, const std::string &deck_filename, const std::string &cmdline_output_dir, const std::string &cmdline_output, bool output_cout_, const std::string &stdout_log_id, const bool allRanksDbgLog)
 
void readDeck (Parallel::Communication comm, const std::string &deckFilename, std::shared_ptr< EclipseState > &eclipseState, std::shared_ptr< Schedule > &schedule, std::unique_ptr< UDQState > &udqState, std::unique_ptr< Action::State > &actionState, std::unique_ptr< WellTestState > &wtestState, std::shared_ptr< SummaryConfig > &summaryConfig, std::shared_ptr< Python > python, const std::string &parsingStrictness, bool initFromRestart, bool checkDeck, const std::optional< int > &outputInterval)
 Reads the deck and creates all necessary objects if needed. More...
 
void verifyValidCellGeometry (Parallel::Communication comm, const EclipseState &eclipseState)
 
std::map< std::string, std::string > setupZoltanParams (const std::string &conf)
 
bool has_control (int controls, Group::InjectionCMode cmode)
 
bool operator< (const ParallelWellInfo &well1, const ParallelWellInfo &well2)
 
bool operator== (const ParallelWellInfo &well1, const ParallelWellInfo &well2)
 
bool operator!= (const ParallelWellInfo &well1, const ParallelWellInfo &well2)
 
bool operator< (const std::pair< std::string, bool > &pair, const ParallelWellInfo &well)
 
bool operator< (const ParallelWellInfo &well, const std::pair< std::string, bool > &pair)
 
bool operator== (const std::pair< std::string, bool > &pair, const ParallelWellInfo &well)
 
bool operator== (const ParallelWellInfo &well, const std::pair< std::string, bool > &pair)
 
bool operator!= (const std::pair< std::string, bool > &pair, const ParallelWellInfo &well)
 
bool operator!= (const ParallelWellInfo &well, const std::pair< std::string, bool > &pair)
 
std::vector< double > connectionProdIndStandard (const WellProdIndexCalculator &wellPICalc, const std::vector< double > &connMobility)
 Compute connection-level productivity index values for all connections in a well. More...
 
double wellProdIndStandard (const WellProdIndexCalculator &wellPICalc, const std::vector< double > &connMobility)
 Compute well-level productivity index value. More...
 
template void WellState::updateGlobalIsGrup< Parallel::Communication > (const Parallel::Communication &comm)
 
template void WellState::communicateGroupRates< Parallel::Communication > (const Parallel::Communication &comm)
 

Detailed Description

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

Enumeration Type Documentation

◆ FileOutputMode

enum class Opm::FileOutputMode
strong
Enumerator
OUTPUT_NONE 

No file output.

OUTPUT_LOG_ONLY 

Output only to log files, no ECLIPSE output.

OUTPUT_ALL 

Output to all files.

◆ MILU_VARIANT

enum class Opm::MILU_VARIANT
strong
Enumerator
ILU 

Do not perform modified ILU.

MILU_1 

$U_{ii} = U_{ii} +$ sum(dropped entries)

MILU_2 

$U_{ii} = U_{ii} + sign(U_{ii}) * $ sum(dropped entries)

MILU_3 

$U_{ii} = U_{ii} sign(U_{ii}) * $ sum(|dropped entries|)

MILU_4 

$U_{ii} = U_{ii} + (U_{ii}>0?1:0) * $ sum(dropped entries)

Function Documentation

◆ accumulateMaskedValues()

template<class T1 >
auto Opm::accumulateMaskedValues ( const T1 &  container,
const std::vector< double > *  maskContainer 
) -> decltype(container[0] *(*maskContainer)[0])

Accumulates entries masked with 1.

Parameters
containerThe container whose values to accumulate.
maskContainernull pointer or a pointer to a container with entries 0 and 1. Only values at indices with a 1 stored will be accumulated. If null then all values will be accumulated
Returns
the summ of all entries that should be represented.

◆ colorVerticesWelshPowell()

template<class Graph >
std::tuple< std::vector< int >, int, std::vector< std::size_t > > Opm::colorVerticesWelshPowell ( const Graph &  graph)

Color the vertices of graph.

It uses the algorithm of Welsh and Powell for this.

Parameters
graphThe graph to color. Must adhere to the graph interface of dune-istl.
Returns
A pair of a vector with the colors of the vertices and the number of colors assigned

◆ connectionProdIndStandard()

std::vector< double > Opm::connectionProdIndStandard ( const WellProdIndexCalculator wellPICalc,
const std::vector< double > &  connMobility 
)

Compute connection-level productivity index values for all connections in a well.

Parameters
[in]wellPICalcProductivity index calculator.
[in]connMobilityPhase mobility for each connection. Typically derived from dynamic flow state conditions in cells intersected by well's connections. Must have one value for each
wellPICalc.numConnections()
well connection.
Returns
Connection-level steady-state productivity index values for all connections.

◆ eclStateBroadcast()

void Opm::eclStateBroadcast ( Parallel::Communication  comm,
EclipseState &  eclState,
Schedule &  schedule,
SummaryConfig &  summaryConfig,
UDQState &  udqState,
Action::State &  actionState,
WellTestState &  wtestState 
)

Broadcasts an eclipse state from root node in parallel runs.

!

Parameters
eclStateEclipseState to broadcast !
scheduleSchedule to broadcast !
summaryConfigSummaryConfig to broadcast

◆ moduleVersion()

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)".

◆ readDeck()

void Opm::readDeck ( Parallel::Communication  comm,
const std::string &  deckFilename,
std::shared_ptr< EclipseState > &  eclipseState,
std::shared_ptr< Schedule > &  schedule,
std::unique_ptr< UDQState > &  udqState,
std::unique_ptr< Action::State > &  actionState,
std::unique_ptr< WellTestState > &  wtestState,
std::shared_ptr< SummaryConfig > &  summaryConfig,
std::shared_ptr< Python >  python,
const std::string &  parsingStrictness,
bool  initFromRestart,
bool  checkDeck,
const std::optional< int > &  outputInterval 
)

Reads the deck and creates all necessary objects if needed.

If pointers already contains objects then they are used otherwise they are created and can be used outside later.

◆ setupPropertyTree()

PropertyTree Opm::setupPropertyTree ( FlowLinearSolverParameters  p,
bool  linearSolverMaxIterSet,
bool  linearSolverReductionSet 
)

Set up a property tree intended for FlexibleSolver by either reading the tree from a JSON file or creating a tree giving the default solver and preconditioner.

If the latter, the parameters –linear-solver-reduction, –linear-solver-maxiter and –linear-solver-verbosity are used, but if reading from file the data in the JSON file will override any other options.

◆ wellProdIndStandard()

double Opm::wellProdIndStandard ( const WellProdIndexCalculator wellPICalc,
const std::vector< double > &  connMobility 
)

Compute well-level productivity index value.

Parameters
[in]wellPICalcProductivity index calculator.
[in]connMobilityPhase mobility for each connection. Typically derived from dynamic flow state conditions in cells intersected by well's connections. Must have one value for each
wellPICalc.numConnections()
well connection.
Returns
Well-level steady-state productivity index value.