|
52 | 52 | #include <opm/simulators/flow/MixingRateControls.hpp> |
53 | 53 | #include <opm/simulators/flow/OutputBlackoilModule.hpp> |
54 | 54 | #include <opm/simulators/flow/VtkTracerModule.hpp> |
| 55 | +#include <opm/simulators/flow/HybridNewton.hpp> |
| 56 | +#include <opm/simulators/flow/HybridNewtonConfig.hpp> |
55 | 57 |
|
56 | 58 | #include <opm/simulators/utils/satfunc/SatfuncConsistencyCheckManager.hpp> |
57 | 59 |
|
@@ -148,6 +150,7 @@ class FlowProblemBlackoil : public FlowProblem<TypeTag> |
148 | 150 | using DiffusionModule = BlackOilDiffusionModule<TypeTag, enableDiffusion>; |
149 | 151 | using ConvectiveMixingModule = BlackOilConvectiveMixingModule<TypeTag, enableConvectiveMixing>; |
150 | 152 | using ModuleParams = typename BlackOilLocalResidualTPFA<TypeTag>::ModuleParams; |
| 153 | + using HybridNewton = BlackOilHybridNewton<TypeTag>; |
151 | 154 |
|
152 | 155 | using InitialFluidState = typename EquilInitializer<TypeTag>::ScalarFluidState; |
153 | 156 | using EclWriterType = EclWriter<TypeTag, OutputBlackOilModule<TypeTag> >; |
@@ -188,6 +191,7 @@ class FlowProblemBlackoil : public FlowProblem<TypeTag> |
188 | 191 | simulator.vanguard().summaryState(), |
189 | 192 | this->wellModel_, |
190 | 193 | simulator.vanguard().grid().comm()) |
| 194 | + , hybridNewton_(simulator) |
191 | 195 | { |
192 | 196 | this->model().addOutputModule(std::make_unique<VtkTracerModule<TypeTag>>(simulator)); |
193 | 197 |
|
@@ -264,6 +268,15 @@ class FlowProblemBlackoil : public FlowProblem<TypeTag> |
264 | 268 | this->moduleParams_.convectiveMixingModuleParam); |
265 | 269 | } |
266 | 270 |
|
| 271 | + /*! |
| 272 | + * \brief Called by the simulator before each time integration. |
| 273 | + */ |
| 274 | + void beginTimeStep() override |
| 275 | + { |
| 276 | + FlowProblemType::beginTimeStep(); |
| 277 | + hybridNewton_.tryApplyHybridNewton(); |
| 278 | + } |
| 279 | + |
267 | 280 | /*! |
268 | 281 | * \copydoc FvBaseProblem::finishInit |
269 | 282 | */ |
@@ -1695,6 +1708,8 @@ class FlowProblemBlackoil : public FlowProblem<TypeTag> |
1695 | 1708 |
|
1696 | 1709 | ModuleParams moduleParams_; |
1697 | 1710 |
|
| 1711 | + HybridNewton hybridNewton_; |
| 1712 | + |
1698 | 1713 | private: |
1699 | 1714 | /// Whether or not the current epsiode will end at the end of the |
1700 | 1715 | /// current time step. |
|
0 commit comments