A class to write the reservoir state and the well state of a blackoil simulation to disk using the Eclipse binary format. More...

#include <EclipseWriter.hpp>

Inheritance diagram for Opm::EclipseWriter:
Inheritance graph

Public Member Functions

 EclipseWriter (const parameter::ParameterGroup &params, Opm::EclipseStateConstPtr eclipseState, const Opm::PhaseUsage &phaseUsage, int numCells, const int *compressedToCartesianCellIdx)
 Sets the common attributes required to write eclipse binary files using ERT. More...
 
virtual ~EclipseWriter ()
 
virtual void writeInit (const SimulatorTimerInterface &timer)
 
virtual void writeTimeStep (const SimulatorTimerInterface &timer, const SimulatorState &reservoirState, const WellState &wellState, bool isSubstep)
 Write a reservoir state and summary information to disk. More...
 

Static Public Member Functions

static int eclipseWellTypeMask (WellType wellType, WellInjector::TypeEnum injectorType)
 
static int eclipseWellStatusMask (WellCommon::StatusEnum wellStatus)
 
static ert_ecl_unit_enum convertUnitTypeErtEclUnitEnum (UnitSystem::UnitType unit)
 
static std::unique_ptr
< OutputWriter
create (const parameter::ParameterGroup &params, std::shared_ptr< const EclipseState > eclipseState, const Opm::PhaseUsage &phaseUsage, std::shared_ptr< const UnstructuredGrid > grid)
 

Detailed Description

A class to write the reservoir state and the well state of a blackoil simulation to disk using the Eclipse binary format.

This class only writes files if the 'write_output' parameter is set to 1. It needs the ERT libraries to write to disk, so if the 'write_output' parameter is set but ERT is not available, all methods throw a std::runtime_error.

Constructor & Destructor Documentation

Opm::EclipseWriter::EclipseWriter ( const parameter::ParameterGroup params,
Opm::EclipseStateConstPtr  eclipseState,
const Opm::PhaseUsage phaseUsage,
int  numCells,
const int *  compressedToCartesianCellIdx 
)

Sets the common attributes required to write eclipse binary files using ERT.

virtual Opm::EclipseWriter::~EclipseWriter ( )
virtual

We need a destructor in the compilation unit to avoid the EclipseSummary being a complete type here.

Member Function Documentation

static ert_ecl_unit_enum Opm::EclipseWriter::convertUnitTypeErtEclUnitEnum ( UnitSystem::UnitType  unit)
static
static std::unique_ptr<OutputWriter> Opm::OutputWriter::create ( const parameter::ParameterGroup params,
std::shared_ptr< const EclipseState >  eclipseState,
const Opm::PhaseUsage phaseUsage,
std::shared_ptr< const UnstructuredGrid grid 
)
staticinherited

Create a suitable set of output formats based on configuration.

Parameters
paramsConfiguration properties. This function will setup a multiplexer of applicable output formats based on the desired configuration values.
deckInput deck used to set up the simulation.
eclipseStateThe internalized input deck.
Returns
Pointer to a multiplexer to all applicable output formats.
See also
Opm::share_obj
static int Opm::EclipseWriter::eclipseWellStatusMask ( WellCommon::StatusEnum  wellStatus)
static
static int Opm::EclipseWriter::eclipseWellTypeMask ( WellType  wellType,
WellInjector::TypeEnum  injectorType 
)
static
virtual void Opm::EclipseWriter::writeInit ( const SimulatorTimerInterface timer)
virtual

Write the static eclipse data (grid, PVT curves, etc) to disk.

Implements Opm::OutputWriter.

virtual void Opm::EclipseWriter::writeTimeStep ( const SimulatorTimerInterface timer,
const SimulatorState reservoirState,
const WellState wellState,
bool  isSubstep 
)
virtual

Write a reservoir state and summary information to disk.

The reservoir state can be inspected with visualization tools like ResInsight.

The summary information can then be visualized using tools from ERT or ECLIPSE. Note that calling this method is only meaningful after the first time step has been completed.

Parameters
[in]timerThe timer providing time step and time information
[in]reservoirStateThe thermodynamic state of the reservoir
[in]wellStateThe production/injection data for all wells

Implements Opm::OutputWriter.


The documentation for this class was generated from the following file: