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::unordered_map< int, std::vector< WellTracerRate< GetPropType< TypeTag, Properties::Scalar > > > > & getWellTracerRates () const
 Return well tracer rates.
 
const std::unordered_map< int, std::vector< WellTracerRate< GetPropType< TypeTag, Properties::Scalar > > > > & getWellFreeTracerRates () const
 
const std::unordered_map< int, std::vector< WellTracerRate< GetPropType< TypeTag, Properties::Scalar > > > > & getWellSolTracerRates () const
 
const std::unordered_map< int, std::vector< MSWellTracerRate< GetPropType< TypeTag, Properties::Scalar > > > > & getMswTracerRates () const
 
void serializeOp (Serializer &serializer)
 

Protected Types

using TracerTypeIdx = typename BaseType::TracerTypeIdx
 
- Protected 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 > >
enum  TracerTypeIdx
 Tracer type index.
 

Protected Member Functions

template<TracerTypeIdx Index>
Scalar computeVolume_ (const int tracerPhaseIdx, const unsigned globalDofIdx, const unsigned timeIdx) const
 
template<TracerTypeIdx Index>
std::pair< TracerEvaluation, boolcomputeFlux_ (const int tracerPhaseIdx, const ElementContext &elemCtx, const unsigned scvfIdx, const unsigned timeIdx) const
 
template<TracerTypeIdx Index, class TrRe >
Scalar storage1_ (const TrRe &tr, const unsigned tIdx, const unsigned I, const unsigned I1, const bool cache)
 
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_ ()
 
template<TracerTypeIdx Index, class TrRe >
void updateElem (TrRe &tr, const Scalar scvVolume, const unsigned globalDofIdx)
 
void updateStorageCache ()
 
template<TracerTypeIdx Index, class TrRe >
void copyForOutput (TrRe &tr, const std::vector< TracerVector > &dx, const Scalar S, const unsigned tIdx, const unsigned globalDofIdx, std::vector< TracerVectorSingle > &sc)
 
template<TracerTypeIdx Index, class TrRe >
void assignRates (const TrRe &tr, const Well &eclWell, const std::size_t i, const std::size_t I, const Scalar rate, std::vector< WellTracerRate< Scalar > > &tracerRate, std::vector< MSWellTracerRate< Scalar > > *mswTracerRate, std::vector< WellTracerRate< Scalar > > &splitRate)
 
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 >, numPhases > tbatch
 
TracerBatch< TracerVector > & wat_
 
TracerBatch< TracerVector > & oil_
 
TracerBatch< TracerVector > & gas_
 
std::array< std::array< std::vector< Scalar >, numPhases >, 2 > vol1_
 
std::array< std::array< std::vector< Scalar >, numPhases >, 2 > dVol_
 
- 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::unordered_map< int, std::vector< WellTracerRate< GetPropType< TypeTag, Properties::Scalar > > > > wellTracerRate_
 
std::unordered_map< int, std::vector< WellTracerRate< GetPropType< TypeTag, Properties::Scalar > > > > wellFreeTracerRate_
 
std::unordered_map< int, std::vector< WellTracerRate< GetPropType< TypeTag, Properties::Scalar > > > > wellSolTracerRate_
 
std::unordered_map< int, std::vector< MSWellTracerRate< 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: