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::FluidSystem >, 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::FluidSystem >, 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
 
std::string sname (int tracerIdx) const
 
std::string wellfname (int tracerIdx) const
 
std::string wellsname (int tracerIdx) const
 
Phase phase (int tracerIdx) const
 
const std::vector< bool > & enableSolTracers () const
 
GetPropType< TypeTag, Properties::ScalarfreeTracerConcentration (int tracerIdx, int globalDofIdx) const
 Return the tracer concentration for tracer index and global DofIdx.
 
GetPropType< TypeTag, Properties::ScalarsolTracerConcentration (int tracerIdx, int globalDofIdx) const
 
void setFreeTracerConcentration (int tracerIdx, int globalDofIdx, GetPropType< TypeTag, Properties::Scalar > value)
 
void setSolTracerConcentration (int tracerIdx, int globalDofIdx, GetPropType< TypeTag, Properties::Scalar > value)
 
void setEnableSolTracers (int tracerIdx, bool enableSolTracer)
 
const std::map< std::pair< std::string, std::string >, GetPropType< TypeTag, Properties::Scalar > > & getWellTracerRates () const
 Return well tracer rates.
 
const std::map< std::pair< std::string, std::string >, GetPropType< TypeTag, Properties::Scalar > > & getWellFreeTracerRates () const
 
const std::map< std::pair< std::string, std::string >, GetPropType< TypeTag, Properties::Scalar > > & getWellSolTracerRates () const
 
const std::map< std::tuple< std::string, std::string, std::size_t >, GetPropType< TypeTag, Properties::Scalar > > & getMswTracerRates () const
 
void serializeOp (Serializer &serializer)
 

Protected Member Functions

Scalar computeFreeVolume_ (const int tracerPhaseIdx, unsigned globalDofIdx, unsigned timeIdx)
 
Scalar computeSolutionVolume_ (const int tracerPhaseIdx, unsigned globalDofIdx, unsigned timeIdx)
 
void computeFreeFlux_ (TracerEvaluation &freeFlux, bool &isUp, const int tracerPhaseIdx, const ElementContext &elemCtx, unsigned scvfIdx, unsigned timeIdx)
 
void computeSolFlux_ (TracerEvaluation &solFlux, bool &isUp, 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, const Scalar dt)
 
template<class TrRe , class Well >
void assembleTracerEquationWell (TrRe &tr, const Well &well)
 
template<class TrRe >
void assembleTracerEquationSource (TrRe &tr, const Scalar dt, unsigned I)
 
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::FluidSystem >, 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)
 
GetPropType< TypeTag, Properties::ScalarcurrentConcentration_ (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_
 
std::array< std::vector< Scalar >, 3 > fVol1_
 
std::array< std::vector< Scalar >, 3 > sVol1_
 
std::array< std::vector< Scalar >, 3 > dsVol_
 
std::array< std::vector< Scalar >, 3 > dfVol_
 
- 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::FluidSystem >, 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< bool > enableSolTracers_
 
std::vector< TracerVector > tracerConcentration_
 
std::unique_ptr< TracerMatrix > tracerMatrix_
 
std::vector< TracerVectorSingle > freeTracerConcentration_
 
std::vector< TracerVectorSingle > solTracerConcentration_
 
std::map< std::pair< std::string, std::string >, GetPropType< TypeTag, Properties::Scalar > > wellTracerRate_
 
std::map< std::pair< std::string, std::string >, GetPropType< TypeTag, Properties::Scalar > > wellFreeTracerRate_
 
std::map< std::pair< std::string, std::string >, GetPropType< TypeTag, Properties::Scalar > > wellSolTracerRate_
 
std::map< std::tuple< std::string, std::string, std::size_t >, GetPropType< TypeTag, Properties::Scalar > > mSwTracerRate_
 
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::FluidSystem >, GetPropType< TypeTag, Properties::Scalar > >
using TracerVectorSingle = Dune::BlockVector< Dune::FieldVector< GetPropType< TypeTag, Properties::Scalar >, 1 > >
 
using TracerMatrix = Dune::BCRSMatrix< Opm::MatrixBlock< GetPropType< TypeTag, Properties::Scalar >, 2, 2 > >
 
using TracerVector = Dune::BlockVector< Dune::FieldVector< GetPropType< TypeTag, Properties::Scalar >, 2 > >
 
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::FluidSystem >, 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: