21 #ifndef OPM_IMPESTPFAAD_HEADER_INCLUDED
22 #define OPM_IMPESTPFAAD_HEADER_INCLUDED
24 #include <opm/autodiff/AutoDiffBlock.hpp>
25 #include <opm/autodiff/AutoDiffHelpers.hpp>
26 #include <opm/autodiff/BlackoilModelEnums.hpp>
27 #include <opm/autodiff/BlackoilPropsAdFromDeck.hpp>
29 struct UnstructuredGrid;
35 class LinearSolverInterface;
52 const LinearSolverInterface& linsolver);
58 void solve(
const double dt,
60 WellState& well_state);
70 typedef Eigen::Array<double,
73 Eigen::RowMajor> DataBlock;
74 enum { Water = Opm::Water,
79 const UnstructuredGrid& grid_;
83 const LinearSolverInterface& linsolver_;
87 std::vector<ADB> well_flow_residual_;
91 std::vector<V> well_kr_;
96 void computeExplicitData(
const double dt,
97 const BlackoilState& state,
98 const WellState& well_state);
99 void assemble(
const double dt,
100 const BlackoilState& state,
101 const WellState& well_state);
102 void solveJacobianSystem(BlackoilState& state,
103 WellState& well_state)
const;
104 double residualNorm()
const;
105 void computeFluxes(BlackoilState& state, WellState& well_state)
const;
108 V fluidMu(
const int phase,
const V& p,
const V& T,
const std::vector<int>& cells)
const;
109 ADB fluidMu(
const int phase,
const ADB& p,
const ADB& T,
const std::vector<int>& cells)
const;
110 V fluidFvf(
const int phase,
const V& p,
const V& T,
const std::vector<int>& cells)
const;
111 ADB fluidFvf(
const int phase,
const ADB& p,
const ADB& T,
const std::vector<int>& cells)
const;
112 V fluidRho(
const int phase,
const V& p,
const V& T,
const std::vector<int>& cells)
const;
113 ADB fluidRho(
const int phase,
const ADB& p,
const ADB& T,
const std::vector<int>& cells)
const;
114 std::vector<V> fluidRelperm(
const V& sw,
const V& so,
const V& sg,
const std::vector<int>& cells)
const;
115 V fluidKr(
const int phase)
const;
116 V fluidKrWell(
const int phase)
const;
Contains vectors and sparse matrices that represent subsets or operations on (AD or regular) vectors ...
Definition: AutoDiffHelpers.hpp:44
AutoDiffMatrix is a wrapper class that optimizes matrix operations.
Definition: AutoDiffMatrix.hpp:43
Class containing static geological properties that are derived from grid and petrophysical properties...
Definition: GeoProps.hpp:59
void solve(const double dt, BlackoilState &state, WellState &well_state)
Solve forward in time.
Definition: ImpesTPFAAD.cpp:172
ImpesTPFAAD(const UnstructuredGrid &grid, const BlackoilPropsAdFromDeck &fluid, const DerivedGeology &geo, const Wells &wells, const LinearSolverInterface &linsolver)
Construct impes solver.
Definition: ImpesTPFAAD.cpp:146
This class implements the AD-adapted fluid interface for three-phase black-oil.
Definition: BlackoilPropsAdFromDeck.hpp:61
Eigen::Array< Scalar, Eigen::Dynamic, 1 > V
Underlying type for values.
Definition: AutoDiffBlock.hpp:99
Class for solving black-oil impes problems.
Definition: ImpesTPFAAD.hpp:44