My Project
Loading...
Searching...
No Matches
Opm::TracerModel< TypeTag > Class Template Reference

A class which handles tracers as specified in by ECL. More...

#include <TracerModel.hpp>

Inheritance diagram for Opm::TracerModel< TypeTag >:
Opm::GenericTracerModel< GetPropType< TypeTag, Properties::Grid >, GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::DofMapper >, GetPropType< TypeTag, Properties::Stencil >, GetPropType< TypeTag, Properties::Scalar > >

Classes

struct  TracerBatch
 

Public Member Functions

 TracerModel (Simulator &simulator)
 
void init (bool rst)
 
void prepareTracerBatches ()
 
void beginTimeStep ()
 
void endTimeStep ()
 Informs the tracer model that a time step has just been finished.
 
template<class Restarter >
void serialize (Restarter &)
 This method writes the complete state of all tracer to the hard disk.
 
template<class Restarter >
void deserialize (Restarter &)
 This method restores the complete state of the tracer from disk.
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 
- Public Member Functions inherited from Opm::GenericTracerModel< GetPropType< TypeTag, Properties::Grid >, GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::DofMapper >, GetPropType< TypeTag, Properties::Stencil >, GetPropType< TypeTag, Properties::Scalar > >
int numTracers () const
 Return the number of tracers considered by the tracerModel.
 
const std::string & name (int tracerIdx) const
 Return the tracer name.
 
std::string fname (int tracerIdx) const
 
GetPropType< TypeTag, Properties::Scalar > tracerConcentration (int tracerIdx, int globalDofIdx) const
 Return the tracer concentration for tracer index and global DofIdx.
 
void setTracerConcentration (int tracerIdx, int globalDofIdx, GetPropType< TypeTag, Properties::Scalar > value)
 
const std::map< std::pair< std::string, std::string >, double > & getWellTracerRates () const
 Return well tracer rates.
 
void serializeOp (Serializer &serializer)
 

Protected Member Functions

template<class LhsEval >
void computeVolume_ (LhsEval &freeVolume, const int tracerPhaseIdx, const ElementContext &elemCtx, unsigned scvIdx, unsigned timeIdx)
 
void computeFlux_ (TracerEvaluation &freeFlux, bool &isUpFree, const int tracerPhaseIdx, const ElementContext &elemCtx, unsigned scvfIdx, unsigned timeIdx)
 
template<class TrRe >
void assembleTracerEquationVolume (TrRe &tr, const ElementContext &elemCtx, const Scalar scvVolume, const Scalar dt, unsigned I, unsigned I1)
 
template<class TrRe >
void assembleTracerEquationFlux (TrRe &tr, const ElementContext &elemCtx, unsigned scvfIdx, unsigned I, unsigned J)
 
template<class TrRe , class Well >
void assembleTracerEquationWell (TrRe &tr, const Well &well)
 
void assembleTracerEquations_ ()
 
void updateStorageCache ()
 
void advanceTracerFields ()
 
- Protected Member Functions inherited from Opm::GenericTracerModel< GetPropType< TypeTag, Properties::Grid >, GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::DofMapper >, GetPropType< TypeTag, Properties::Stencil >, GetPropType< TypeTag, Properties::Scalar > >
 GenericTracerModel (const GetPropType< TypeTag, Properties::GridView > &gridView, const EclipseState &eclState, const CartesianIndexMapper &cartMapper, const GetPropType< TypeTag, Properties::DofMapper > &dofMapper, const std::function< std::array< double, dimWorld >(int)> centroids)
 
void doInit (bool rst, std::size_t numGridDof, std::size_t gasPhaseIdx, std::size_t oilPhaseIdx, std::size_t waterPhaseIdx)
 Initialize all internal data structures needed by the tracer module.
 
bool linearSolve_ (const TracerMatrix &M, TracerVector &x, TracerVector &b)
 
bool linearSolveBatchwise_ (const TracerMatrix &M, std::vector< TracerVector > &x, std::vector< TracerVector > &b)
 
double currentConcentration_ (const Well &eclWell, const std::string &name) const
 

Protected Attributes

Simulator & simulator_
 
std::array< TracerBatch< TracerVector >, 3 > tbatch
 
TracerBatch< TracerVector > & wat_
 
TracerBatch< TracerVector > & oil_
 
TracerBatch< TracerVector > & gas_
 
- Protected Attributes inherited from Opm::GenericTracerModel< GetPropType< TypeTag, Properties::Grid >, GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::DofMapper >, GetPropType< TypeTag, Properties::Stencil >, GetPropType< TypeTag, Properties::Scalar > >
const GetPropType< TypeTag, Properties::GridView > & gridView_
 
const EclipseState & eclState_
 
const CartesianIndexMappercartMapper_
 
const GetPropType< TypeTag, Properties::DofMapper > & dofMapper_
 
std::vector< int > tracerPhaseIdx_
 
std::vector< Dune::BlockVector< Dune::FieldVector< GetPropType< TypeTag, Properties::Scalar >, 1 > > > tracerConcentration_
 
std::unique_ptr< TracerMatrix > tracerMatrix_
 
std::vector< Dune::BlockVector< Dune::FieldVector< GetPropType< TypeTag, Properties::Scalar >, 1 > > > storageOfTimeIndex1_
 
std::map< std::pair< std::string, std::string >, double > wellTracerRate_
 
std::function< std::array< double, dimWorld >(int)> centroids_
 Function returning the cell centers.
 

Additional Inherited Members

- Public Types inherited from Opm::GenericTracerModel< GetPropType< TypeTag, Properties::Grid >, GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::DofMapper >, GetPropType< TypeTag, Properties::Stencil >, GetPropType< TypeTag, Properties::Scalar > >
using TracerMatrix = Dune::BCRSMatrix< Opm::MatrixBlock< GetPropType< TypeTag, Properties::Scalar >, 1, 1 > >
 
using TracerVector = Dune::BlockVector< Dune::FieldVector< GetPropType< TypeTag, Properties::Scalar >, 1 > >
 
using CartesianIndexMapper = Dune::CartesianIndexMapper< GetPropType< TypeTag, Properties::Grid > >
 
- Static Public Attributes inherited from Opm::GenericTracerModel< GetPropType< TypeTag, Properties::Grid >, GetPropType< TypeTag, Properties::GridView >, GetPropType< TypeTag, Properties::DofMapper >, GetPropType< TypeTag, Properties::Stencil >, GetPropType< TypeTag, Properties::Scalar > >
static constexpr int dimWorld
 

Detailed Description

template<class TypeTag>
class Opm::TracerModel< TypeTag >

A class which handles tracers as specified in by ECL.

Member Function Documentation

◆ deserialize()

template<class TypeTag >
template<class Restarter >
void Opm::TracerModel< TypeTag >::deserialize ( Restarter &  )
inline

This method restores the complete state of the tracer from disk.

It is the inverse of the serialize() method.


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