22 #ifndef OPM_BLACKOILPROPSADFROMDECK_HEADER_INCLUDED
23 #define OPM_BLACKOILPROPSADFROMDECK_HEADER_INCLUDED
28 #include <opm/core/props/BlackoilPhases.hpp>
29 #include <opm/core/props/satfunc/SaturationPropsFromDeck.hpp>
30 #include <opm/core/props/rock/RockFromDeck.hpp>
32 #include <opm/parser/eclipse/Deck/Deck.hpp>
33 #include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
39 #ifdef HAVE_DUNE_CORNERPOINT
40 #include <opm/common/utility/platform_dependent/disable_warnings.h>
41 #include <dune/grid/CpGrid.hpp>
42 #include <opm/common/utility/platform_dependent/reenable_warnings.h>
79 Opm::EclipseStateConstPtr eclState,
80 std::shared_ptr<MaterialLawManager> materialLawManager,
81 const UnstructuredGrid& grid,
82 const bool init_rock =
true );
84 #ifdef HAVE_DUNE_CORNERPOINT
100 Opm::EclipseStateConstPtr eclState,
101 std::shared_ptr<MaterialLawManager> materialLawManager,
102 const Dune::CpGrid& grid,
103 const bool init_rock =
true );
114 Opm::EclipseStateConstPtr eclState,
115 const UnstructuredGrid& grid,
116 const bool init_rock =
true );
118 #ifdef HAVE_DUNE_CORNERPOINT
127 Opm::EclipseStateConstPtr eclState,
128 const Dune::CpGrid& grid,
129 const bool init_rock =
true );
143 const int number_of_cells);
159 {
return &cellPvtRegionIdx_[0]; }
198 ADB
muWat(
const ADB& pw,
200 const Cells& cells)
const;
209 ADB
muOil(
const ADB& po,
212 const std::vector<PhasePresence>& cond,
213 const Cells& cells)
const;
222 ADB
muGas(
const ADB& pg,
225 const std::vector<PhasePresence>& cond,
226 const Cells& cells)
const;
235 ADB
bWat(
const ADB& pw,
237 const Cells& cells)
const;
246 ADB
bOil(
const ADB& po,
249 const std::vector<PhasePresence>& cond,
250 const Cells& cells)
const;
259 ADB
bGas(
const ADB& pg,
262 const std::vector<PhasePresence>& cond,
263 const Cells& cells)
const;
272 const Cells& cells)
const;
281 const Cells& cells)
const;
287 ADB
rsSat(
const ADB& po,
288 const Cells& cells)
const;
295 ADB
rsSat(
const ADB& po,
297 const Cells& cells)
const;
305 ADB
rvSat(
const ADB& po,
306 const Cells& cells)
const;
313 ADB
rvSat(
const ADB& po,
315 const Cells& cells)
const;
326 std::vector<ADB>
relperm(
const ADB& sw,
329 const Cells& cells)
const;
339 std::vector<ADB>
capPress(
const ADB& sw,
342 const Cells& cells)
const;
347 const std::vector<int>& cells);
356 const std::vector<double>& pc);
361 void init(Opm::DeckConstPtr deck,
362 Opm::EclipseStateConstPtr eclState,
363 std::shared_ptr<MaterialLawManager> materialLawManager,
365 const int* global_cell,
366 const int* cart_dims,
367 const bool init_rock);
372 const std::vector<int>& cells,
373 const double vap)
const;
375 void applyVap(ADB& r,
377 const std::vector<int>& cells,
378 const double vap)
const;
381 void mapPvtRegions(
const std::vector<int>& cells)
const;
387 std::shared_ptr<MaterialLawManager> materialLawManager_;
388 std::shared_ptr<SaturationPropsFromDeck> satprops_;
390 PhaseUsage phase_usage_;
395 std::vector<int> cellPvtRegionIdx_;
399 mutable std::vector<int> pvt_region_;
402 std::vector<std::shared_ptr<Opm::PvtInterface> > props_;
405 std::vector<std::array<double, BlackoilPhases::MaxNumPhases> > densities_;
410 std::vector<double> satOilMax_;
411 double vap_satmax_guard_;
416 #endif // OPM_BLACKOILPROPSADFROMDECK_HEADER_INCLUDED
std::vector< ADB > relperm(const ADB &sw, const ADB &so, const ADB &sg, const Cells &cells) const
ADB muGas(const ADB &pg, const ADB &T, const ADB &rv, const std::vector< PhasePresence > &cond, const Cells &cells) const
ADB::V V
Definition: BlackoilPropsAdFromDeck.hpp:175
Definition: BlackoilPropsAdInterface.hpp:38
int numDimensions() const
Eigen::Array< double, Eigen::Dynamic, 1 > V
Underlying type for values.
Definition: AutoDiffBlock.hpp:98
const double * surfaceDensity(const int cellIdx=0) const
Definition: AdditionalObjectDeleter.hpp:22
void setSwatInitScaling(const std::vector< double > &saturation, const std::vector< double > &pc)
ADB rvSat(const ADB &po, const Cells &cells) const
ADB bOil(const ADB &po, const ADB &T, const ADB &rs, const std::vector< PhasePresence > &cond, const Cells &cells) const
Definition: BlackoilPropsAdFromDeck.hpp:58
ADB bWat(const ADB &pw, const ADB &T, const Cells &cells) const
AutoDiffBlock< double > ADB
Definition: BlackoilPropsAdFromDeck.hpp:174
ADB muOil(const ADB &po, const ADB &T, const ADB &rs, const std::vector< PhasePresence > &cond, const Cells &cells) const
V rsSat(const V &po, const Cells &cells) const
friend class BlackoilPropsDataHandle
Definition: BlackoilPropsAdFromDeck.hpp:60
void updateSatOilMax(const std::vector< double > &saturation)
Update for max oil saturation.
ADB bGas(const ADB &pg, const ADB &T, const ADB &rv, const std::vector< PhasePresence > &cond, const Cells &cells) const
ADB muWat(const ADB &pw, const ADB &T, const Cells &cells) const
BlackoilPropsAdFromDeck(Opm::DeckConstPtr deck, Opm::EclipseStateConstPtr eclState, std::shared_ptr< MaterialLawManager > materialLawManager, const UnstructuredGrid &grid, const bool init_rock=true)
PhaseUsage phaseUsage() const
virtual const int * cellPvtRegionIndex() const
Definition: BlackoilPropsAdFromDeck.hpp:158
void updateSatHyst(const std::vector< double > &saturation, const std::vector< int > &cells)
std::vector< int > Cells
Definition: BlackoilPropsAdFromDeck.hpp:176
const double * porosity() const
const double * permeability() const
std::vector< ADB > capPress(const ADB &sw, const ADB &so, const ADB &sg, const Cells &cells) const
SaturationPropsFromDeck::MaterialLawManager MaterialLawManager
Definition: BlackoilPropsAdFromDeck.hpp:62