57 using TracerVectorSingle = Dune::BlockVector<Dune::FieldVector<Scalar, 1>>;
58 using TracerMatrix = Dune::BCRSMatrix<Opm::MatrixBlock<Scalar, 2, 2>>;
59 using TracerVector = Dune::BlockVector<Dune::FieldVector<Scalar, 2>>;
61 static constexpr int dimWorld = Grid::dimensionworld;
73 std::string wellfname(
int tracerIdx)
const;
74 std::string wellsname(
int tracerIdx)
const;
77 const std::vector<bool>& enableSolTracers()
const;
91 const std::map<std::pair<std::string, std::string>, Scalar>&
93 const std::map<std::pair<std::string, std::string>, Scalar>&
94 getWellFreeTracerRates()
const {
return wellFreeTracerRate_;}
95 const std::map<std::pair<std::string, std::string>, Scalar>&
96 getWellSolTracerRates()
const {
return wellSolTracerRate_;}
97 const std::map<std::tuple<std::string, std::string, std::size_t>, Scalar>&
98 getMswTracerRates()
const {
return mSwTracerRate_;}
100 template<
class Serializer>
113 GenericTracerModel(
const GridView& gridView,
114 const EclipseState& eclState,
116 const DofMapper& dofMapper,
117 const std::function<std::array<double,dimWorld>(
int)>
centroids);
123 std::size_t numGridDof,
124 std::size_t gasPhaseIdx,
125 std::size_t oilPhaseIdx,
126 std::size_t waterPhaseIdx);
128 bool linearSolve_(
const TracerMatrix& M, TracerVector& x, TracerVector&
b);
130 bool linearSolveBatchwise_(
const TracerMatrix& M,
131 std::vector<TracerVector>& x,
132 std::vector<TracerVector>&
b);
134 Scalar currentConcentration_(
const Well&
eclWell,
const std::string&
name)
const;
136 const GridView& gridView_;
137 const EclipseState& eclState_;
138 const CartesianIndexMapper& cartMapper_;
139 const DofMapper& dofMapper_;
141 std::vector<int> tracerPhaseIdx_;
142 std::vector<bool> enableSolTracers_;
143 std::vector<TracerVector> tracerConcentration_;
144 std::unique_ptr<TracerMatrix> tracerMatrix_;
145 std::vector<TracerVectorSingle> freeTracerConcentration_;
146 std::vector<TracerVectorSingle> solTracerConcentration_;
149 std::map<std::pair<std::string, std::string>, Scalar> wellTracerRate_;
150 std::map<std::pair<std::string, std::string>, Scalar> wellFreeTracerRate_;
151 std::map<std::pair<std::string, std::string>, Scalar> wellSolTracerRate_;
154 std::map<std::tuple<std::string, std::string, std::size_t>, Scalar> mSwTracerRate_;
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.
Definition GenericTracerModel_impl.hpp:222
std::function< std::array< double, dimWorld >(int)> centroids_
Function returning the cell centers.
Definition GenericTracerModel.hpp:157
const std::map< std::pair< std::string, std::string >, Scalar > & getWellTracerRates() const
Return well tracer rates.
Definition GenericTracerModel.hpp:92
Scalar freeTracerConcentration(int tracerIdx, int globalDofIdx) const
Return the tracer concentration for tracer index and global DofIdx.
Definition GenericTracerModel_impl.hpp:116
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242