blackoilextbomodules.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 2 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18
19 Consult the COPYING file in the top-level source directory of this
20 module for the precise wording of the license and the list of
21 copyright holders.
22*/
32#ifndef EWOMS_BLACK_OIL_EXTBO_MODULE_HH
33#define EWOMS_BLACK_OIL_EXTBO_MODULE_HH
34
35#include <dune/common/fvector.hh>
36
37#include <opm/common/utility/gpuDecorators.hpp>
38
42
44
46
47//#include <opm/models/io/vtkBlackOilExtboModule.hh> //TODO: Missing ...
48
49#include <cassert>
50#include <cmath>
51#include <istream>
52#include <ostream>
53#include <stdexcept>
54#include <string>
55
56namespace Opm {
57
63template <class TypeTag>
64class BlackOilExtboModule<TypeTag, true>
65{
77
78 using Toolbox = MathToolbox<Evaluation>;
79
80 static constexpr unsigned zFractionIdx = Indices::zFractionIdx;
81 static constexpr unsigned contiZfracEqIdx = Indices::contiZfracEqIdx;
82 static constexpr bool enableExtbo = true;
83 static constexpr unsigned numEq = getPropValue<TypeTag, Properties::NumEq>();
84 static constexpr unsigned gasPhaseIdx = FluidSystem::gasPhaseIdx;
85 static constexpr unsigned oilPhaseIdx = FluidSystem::oilPhaseIdx;
86 static constexpr bool blackoilConserveSurfaceVolume =
87 getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>();
88
89public:
92 {
93 params_ = params;
94 }
95
99 static void registerParameters()
100 {}
101
105 static void registerOutputModules(Model&,
106 Simulator&)
107 {}
108
109 static bool primaryVarApplies(unsigned pvIdx)
110 {
111 return pvIdx == zFractionIdx;
112 }
113
114 static std::string primaryVarName([[maybe_unused]] unsigned pvIdx)
115 {
116 assert(primaryVarApplies(pvIdx));
117
118 return "z_fraction";
119 }
120
121 static Scalar primaryVarWeight([[maybe_unused]] unsigned pvIdx)
122 {
123 assert(primaryVarApplies(pvIdx));
124
125 // TODO: it may be beneficial to chose this differently.
126 return static_cast<Scalar>(1.0);
127 }
128
129 static bool eqApplies(unsigned eqIdx)
130 {
131 return eqIdx == contiZfracEqIdx;
132 }
133
134 static std::string eqName([[maybe_unused]] unsigned eqIdx)
135 {
136 assert(eqApplies(eqIdx));
137
138 return "conti^solvent";
139 }
140
141 static Scalar eqWeight([[maybe_unused]] unsigned eqIdx)
142 {
143 assert(eqApplies(eqIdx));
144
145 // TODO: it may be beneficial to chose this differently.
146 return static_cast<Scalar>(1.0);
147 }
148
149 template <class StorageType>
150 OPM_HOST_DEVICE static void addStorage(StorageType& storage,
151 const IntensiveQuantities& intQuants)
152 {
153 using LhsEval = typename StorageType::value_type;
154
155 if constexpr (blackoilConserveSurfaceVolume) {
156 storage[contiZfracEqIdx] =
157 Toolbox::template decay<LhsEval>(intQuants.porosity()) *
158 Toolbox::template decay<LhsEval>(intQuants.yVolume()) *
159 Toolbox::template decay<LhsEval>(intQuants.fluidState().saturation(gasPhaseIdx)) *
160 Toolbox::template decay<LhsEval>(intQuants.fluidState().invB(gasPhaseIdx));
161 if (FluidSystem::enableDissolvedGas()) { // account for dissolved z in oil phase
162 storage[contiZfracEqIdx] +=
163 Toolbox::template decay<LhsEval>(intQuants.porosity()) *
164 Toolbox::template decay<LhsEval>(intQuants.xVolume()) *
165 Toolbox::template decay<LhsEval>(intQuants.fluidState().Rs()) *
166 Toolbox::template decay<LhsEval>(intQuants.fluidState().saturation(oilPhaseIdx)) *
167 Toolbox::template decay<LhsEval>(intQuants.fluidState().invB(oilPhaseIdx));
168 }
169 // Reg. terms: Preliminary attempt to avoid singular behaviour when solvent is invading a pure water
170 // region. Results seems insensitive to the weighting factor.
171 // TODO: Further investigations ...
172 const Scalar regWghtFactor = 1.0e-6;
173 storage[contiZfracEqIdx] +=
174 regWghtFactor* (1.0 - Toolbox::template decay<LhsEval>(intQuants.zFraction())) +
175 regWghtFactor*Toolbox::template decay<LhsEval>(intQuants.porosity()) *
176 Toolbox::template decay<LhsEval>(intQuants.fluidState().saturation(gasPhaseIdx)) *
177 Toolbox::template decay<LhsEval>(intQuants.fluidState().invB(gasPhaseIdx));
178 storage[contiZfracEqIdx - 1] += regWghtFactor*Toolbox::template decay<LhsEval>(intQuants.zFraction());
179 }
180 else {
181 OPM_THROW(std::runtime_error, "Only component conservation in terms of surface volumes is implemented. ");
182 }
183 }
184
185 static void computeFlux(RateVector& flux,
186 const ElementContext& elemCtx,
187 unsigned scvfIdx,
188 unsigned timeIdx)
189 {
190 const auto& extQuants = elemCtx.extensiveQuantities(scvfIdx, timeIdx);
191 const unsigned inIdx = extQuants.interiorIndex();
192
193 flux[contiZfracEqIdx] = 0.0;
194
195 const unsigned upIdxGas = static_cast<unsigned>(extQuants.upstreamIndex(gasPhaseIdx));
196 const auto& upGas = elemCtx.intensiveQuantities(upIdxGas, timeIdx);
197 if (upIdxGas == inIdx) {
198 addExtboFluxes_<Evaluation>(
199 flux, gasPhaseIdx, extQuants.volumeFlux(gasPhaseIdx), upGas);
200 } else {
201 addExtboFluxes_<Scalar>(flux, gasPhaseIdx, extQuants.volumeFlux(gasPhaseIdx), upGas);
202 }
203
204 if (FluidSystem::enableDissolvedGas()) { // account for dissolved z in oil phase
205 const unsigned upIdxOil = static_cast<unsigned>(extQuants.upstreamIndex(oilPhaseIdx));
206 const auto& upOil = elemCtx.intensiveQuantities(upIdxOil, timeIdx);
207 if (upIdxOil == inIdx) {
208 addExtboFluxes_<Evaluation>(
209 flux, oilPhaseIdx, extQuants.volumeFlux(oilPhaseIdx), upOil);
210 } else {
211 addExtboFluxes_<Scalar>(
212 flux, oilPhaseIdx, extQuants.volumeFlux(oilPhaseIdx), upOil);
213 }
214 }
215 }
216
228 template <class UpEval>
229 static void addExtboFluxes_(RateVector& flux,
230 const unsigned phaseIdx,
231 const Evaluation& volumeFlux,
232 const IntensiveQuantities& up)
233 {
234 if constexpr (blackoilConserveSurfaceVolume) {
235 const auto& fs = up.fluidState();
236 if (phaseIdx == gasPhaseIdx) {
237 flux[contiZfracEqIdx] += volumeFlux
238 * decay<UpEval>(up.yVolume())
239 * decay<UpEval>(fs.invB(gasPhaseIdx));
240 } else if (phaseIdx == oilPhaseIdx && FluidSystem::enableDissolvedGas()) {
241 // account for dissolved z in oil phase
242 flux[contiZfracEqIdx] += volumeFlux
243 * decay<UpEval>(up.xVolume())
244 * decay<UpEval>(fs.Rs())
245 * decay<UpEval>(fs.invB(oilPhaseIdx));
246 }
247 } else {
248 throw std::runtime_error(
249 "Only component conservation in terms of surface volumes is implemented. ");
250 }
251 }
252
256 static void assignPrimaryVars(PrimaryVariables& priVars,
257 Scalar zFraction)
258 {
259 priVars[zFractionIdx] = zFraction;
260 }
261
265 static void updatePrimaryVars(PrimaryVariables& newPv,
266 const PrimaryVariables& oldPv,
267 const EqVector& delta)
268 {
269 // do a plain unchopped Newton update
270 newPv[zFractionIdx] = oldPv[zFractionIdx] - delta[zFractionIdx];
271 }
272
276 static Scalar computeUpdateError(const PrimaryVariables&,
277 const EqVector&)
278 {
279 // do not consider consider the cange of solvent primary variables for
280 // convergence
281 // TODO: maybe this should be changed
282 return static_cast<Scalar>(0.0);
283 }
284
288 static Scalar computeResidualError(const EqVector& resid)
289 {
290 // do not weight the residual of solvents when it comes to convergence
291 return std::abs(Toolbox::scalarValue(resid[contiZfracEqIdx]));
292 }
293
294 template <class DofEntity>
295 static void serializeEntity(const Model& model, std::ostream& outstream, const DofEntity& dof)
296 {
297 const unsigned dofIdx = model.dofMapper().index(dof);
298
299 const PrimaryVariables& priVars = model.solution(/*timeIdx=*/0)[dofIdx];
300 outstream << priVars[zFractionIdx];
301 }
302
303 template <class DofEntity>
304 static void deserializeEntity(Model& model, std::istream& instream, const DofEntity& dof)
305 {
306 const unsigned dofIdx = model.dofMapper().index(dof);
307
308 PrimaryVariables& priVars0 = model.solution(/*timeIdx=*/0)[dofIdx];
309 PrimaryVariables& priVars1 = model.solution(/*timeIdx=*/1)[dofIdx];
310
311 instream >> priVars0[zFractionIdx];
312
313 // set the primary variables for the beginning of the current time step.
314 priVars1 = priVars0[zFractionIdx];
315 }
316
317 template <typename Value>
318 static Value xVolume(unsigned pvtRegionIdx, const Value& pressure, const Value& z)
319 { return params_.X_[pvtRegionIdx].eval(z, pressure, true); }
320
321 template <typename Value>
322 static Value yVolume(unsigned pvtRegionIdx, const Value& pressure, const Value& z)
323 { return params_.Y_[pvtRegionIdx].eval(z, pressure, true); }
324
325 template <typename Value>
326 static Value pbubRs(unsigned pvtRegionIdx, const Value& z, const Value& rs)
327 { return params_.PBUB_RS_[pvtRegionIdx].eval(z, rs, true); }
328
329 template <typename Value>
330 static Value pbubRv(unsigned pvtRegionIdx, const Value& z, const Value& rv)
331 { return params_.PBUB_RV_[pvtRegionIdx].eval(z, rv, true); }
332
333 template <typename Value>
334 static Value oilViscosity(unsigned pvtRegionIdx, const Value& pressure, const Value& z)
335 { return params_.VISCO_[pvtRegionIdx].eval(z, pressure, true); }
336
337 template <typename Value>
338 static Value gasViscosity(unsigned pvtRegionIdx, const Value& pressure, const Value& z)
339 { return params_.VISCG_[pvtRegionIdx].eval(z, pressure, true); }
340
341 template <typename Value>
342 static Value bo(unsigned pvtRegionIdx, const Value& pressure, const Value& z)
343 { return params_.BO_[pvtRegionIdx].eval(z, pressure, true); }
344
345 template <typename Value>
346 static Value bg(unsigned pvtRegionIdx, const Value& pressure, const Value& z)
347 { return params_.BG_[pvtRegionIdx].eval(z, pressure, true); }
348
349 template <typename Value>
350 static Value rs(unsigned pvtRegionIdx, const Value& pressure, const Value& z)
351 { return params_.RS_[pvtRegionIdx].eval(z, pressure, true); }
352
353 template <typename Value>
354 static Value rv(unsigned pvtRegionIdx, const Value& pressure, const Value& z)
355 { return params_.RV_[pvtRegionIdx].eval(z, pressure, true); }
356
357 static Scalar referenceDensity(unsigned regionIdx)
358 { return params_.zReferenceDensity_[regionIdx]; }
359
360 static Scalar zLim(unsigned regionIdx)
361 { return params_.zLim_[regionIdx]; }
362
363 template <typename Value>
364 static Value oilCmp(unsigned pvtRegionIdx, const Value& z)
365 { return params_.oilCmp_[pvtRegionIdx].eval(z, true); }
366
367 template <typename Value>
368 static Value gasCmp(unsigned pvtRegionIdx, const Value& z)
369 { return params_.gasCmp_[pvtRegionIdx].eval(z, true); }
370
371private:
372 static BlackOilExtboParams<Scalar> params_;
373};
374
375template <class TypeTag>
376BlackOilExtboParams<typename BlackOilExtboModule<TypeTag, true>::Scalar>
377BlackOilExtboModule<TypeTag, true>::params_;
378
386template <class TypeTag>
387class BlackOilExtboIntensiveQuantities<TypeTag, /*enableExtboV=*/true>
388{
390
397
399
400 static constexpr unsigned zFractionIdx = Indices::zFractionIdx;
401 static constexpr int oilPhaseIdx = FluidSystem::oilPhaseIdx;
402 static constexpr int gasPhaseIdx = FluidSystem::gasPhaseIdx;
403
404public:
410 void zFractionUpdate_(const ElementContext& elemCtx,
411 unsigned dofIdx,
412 unsigned timeIdx)
413 {
414 zFractionUpdate_(elemCtx.primaryVars(dofIdx, timeIdx), timeIdx);
415 }
416
422 void zFractionUpdate_(const PrimaryVariables& priVars,
423 unsigned timeIdx)
424 {
425 const unsigned pvtRegionIdx = priVars.pvtRegionIndex();
426 const auto& fs = asImp_().fluidState_;
427
428 zFraction_ = priVars.makeEvaluation(zFractionIdx, timeIdx);
429
430 oilViscosity_ = ExtboModule::oilViscosity(pvtRegionIdx, fs.pressure(oilPhaseIdx), zFraction_);
431 gasViscosity_ = ExtboModule::gasViscosity(pvtRegionIdx, fs.pressure(gasPhaseIdx), zFraction_);
432
433 bo_ = ExtboModule::bo(pvtRegionIdx, fs.pressure(oilPhaseIdx), zFraction_);
434 bg_ = ExtboModule::bg(pvtRegionIdx, fs.pressure(gasPhaseIdx), zFraction_);
435
436 bz_ = ExtboModule::bg(pvtRegionIdx, fs.pressure(oilPhaseIdx), Evaluation{0.99});
437
438 if (FluidSystem::enableDissolvedGas()) {
439 rs_ = ExtboModule::rs(pvtRegionIdx, fs.pressure(oilPhaseIdx), zFraction_);
440 }
441 else {
442 rs_ = 0.0;
443 }
444
445 if (FluidSystem::enableVaporizedOil()) {
446 rv_ = ExtboModule::rv(pvtRegionIdx, fs.pressure(gasPhaseIdx), zFraction_);
447 }
448 else {
449 rv_ = 0.0;
450 }
451
452 xVolume_ = ExtboModule::xVolume(pvtRegionIdx, fs.pressure(oilPhaseIdx), zFraction_);
453 yVolume_ = ExtboModule::yVolume(pvtRegionIdx, fs.pressure(oilPhaseIdx), zFraction_);
454
455 Evaluation pbub = fs.pressure(oilPhaseIdx);
456
457 if (priVars.primaryVarsMeaningWater() == PrimaryVariables::WaterMeaning::Sw) {
458 static const Scalar thresholdWaterFilledCell = 1.0 - 1e-6;
459 Scalar sw = priVars.makeEvaluation(Indices::waterSwitchIdx, timeIdx).value();
460 if (sw >= thresholdWaterFilledCell) {
461 rs_ = 0.0; // water only, zero rs_ ...
462 }
463 }
464
465 if (priVars.primaryVarsMeaningGas() == PrimaryVariables::GasMeaning::Rs) {
466 rs_ = priVars.makeEvaluation(Indices::compositionSwitchIdx, timeIdx);
467 const Evaluation zLim = ExtboModule::zLim(pvtRegionIdx);
468 if (zFraction_ > zLim) {
469 pbub = ExtboModule::pbubRs(pvtRegionIdx, zLim, rs_);
470 } else {
471 pbub = ExtboModule::pbubRs(pvtRegionIdx, zFraction_, rs_);
472 }
473 bo_ = ExtboModule::bo(pvtRegionIdx, pbub, zFraction_) +
474 ExtboModule::oilCmp(pvtRegionIdx, zFraction_) * (fs.pressure(oilPhaseIdx) - pbub);
475
476 xVolume_ = ExtboModule::xVolume(pvtRegionIdx, pbub, zFraction_);
477 }
478
479 if (priVars.primaryVarsMeaningGas() == PrimaryVariables::GasMeaning::Rv) {
480 rv_ = priVars.makeEvaluation(Indices::compositionSwitchIdx, timeIdx);
481 const Evaluation rvsat = ExtboModule::rv(pvtRegionIdx, pbub, zFraction_);
482 bg_ = ExtboModule::bg(pvtRegionIdx, pbub, zFraction_) +
483 ExtboModule::gasCmp(pvtRegionIdx, zFraction_) * (rv_ - rvsat);
484
485 yVolume_ = ExtboModule::yVolume(pvtRegionIdx, pbub, zFraction_);
486 }
487 }
488
495 {
496 const auto& iq = asImp_();
497 auto& fs = asImp_().fluidState_;
498
499 const unsigned pvtRegionIdx = iq.pvtRegionIndex();
500 zRefDensity_ = ExtboModule::referenceDensity(pvtRegionIdx);
501
502 fs.setInvB(oilPhaseIdx, 1.0 / bo_);
503 fs.setInvB(gasPhaseIdx, 1.0 / bg_);
504
505 fs.setDensity(oilPhaseIdx,
506 fs.invB(oilPhaseIdx) *
507 (FluidSystem::referenceDensity(oilPhaseIdx, pvtRegionIdx) +
508 (1.0 - xVolume_) * fs.Rs() * FluidSystem::referenceDensity(gasPhaseIdx, pvtRegionIdx) +
509 xVolume_ * fs.Rs() * zRefDensity_));
510 fs.setDensity(gasPhaseIdx,
511 fs.invB(gasPhaseIdx) *
512 (FluidSystem::referenceDensity(gasPhaseIdx, pvtRegionIdx) *
513 (1.0 - yVolume_) + yVolume_* zRefDensity_ +
514 FluidSystem::referenceDensity(oilPhaseIdx, pvtRegionIdx) * fs.Rv()));
515 }
516
517 const Evaluation& zFraction() const
518 { return zFraction_; }
519
520 const Evaluation& xVolume() const
521 { return xVolume_; }
522
523 const Evaluation& yVolume() const
524 { return yVolume_; }
525
526 const Evaluation& oilViscosity() const
527 { return oilViscosity_; }
528
529 const Evaluation& gasViscosity() const
530 { return gasViscosity_; }
531
532 const Evaluation& bo() const
533 { return bo_; }
534
535 const Evaluation& bg() const
536 { return bg_; }
537
538 const Evaluation& rs() const
539 { return rs_; }
540
541 const Evaluation& rv() const
542 { return rv_; }
543
544 const Evaluation zPureInvFormationVolumeFactor() const
545 { return 1.0 / bz_; }
546
547 Scalar zRefDensity() const
548 { return zRefDensity_; }
549
550protected:
551 Implementation& asImp_()
552 { return *static_cast<Implementation*>(this); }
553
554 // Abstract "mass fraction" accounting for the solvent component. The relation between this
555 // quantity and the actual mass fraction of solvent, is implicitly defined from the specific
556 // pvt measurements as provided by kw PVTSOL.
557 Evaluation zFraction_;
558
559 // The solvent component is assumed gas at surface conditions
560 Evaluation xVolume_; // Solvent volume fraction of Rs
561 Evaluation yVolume_; // Solvent volume fraction of Sg/Bg
562
563 // Standard black oil parameters modified for presence of solvent
564 Evaluation oilViscosity_;
565 Evaluation gasViscosity_;
566 Evaluation bo_;
567 Evaluation bg_;
568 Evaluation rs_;
569 Evaluation rv_;
570
571 // Properties of pure solvent
572 Evaluation bz_;
574};
575
583template <class TypeTag>
585{
587
588 Implementation& asImp_()
589 { return *static_cast<Implementation*>(this); }
590};
591
592
593} // namespace Opm
594
595#endif
Defines a type tags and some fundamental properties all models.
Contains the parameters required to extend the black-oil model by solvent component....
Contains classes extending the black-oil model. \detail This file holds dummy definitions,...
Declares the properties required by the black oil model.
Provides the solvent specific extensive quantities to the generic black-oil module's extensive quanti...
void zFractionUpdate_(const ElementContext &elemCtx, unsigned dofIdx, unsigned timeIdx)
Compute extended pvt properties from table lookups.
Definition: blackoilextbomodules.hh:410
Evaluation xVolume_
Definition: blackoilextbomodules.hh:560
Evaluation bo_
Definition: blackoilextbomodules.hh:566
void zPvtUpdate_()
Re-compute face densities to account for zFraction dependency.
Definition: blackoilextbomodules.hh:494
const Evaluation & oilViscosity() const
Definition: blackoilextbomodules.hh:526
const Evaluation & xVolume() const
Definition: blackoilextbomodules.hh:520
const Evaluation & zFraction() const
Definition: blackoilextbomodules.hh:517
Scalar zRefDensity_
Definition: blackoilextbomodules.hh:573
void zFractionUpdate_(const PrimaryVariables &priVars, unsigned timeIdx)
Compute extended pvt properties from table lookups.
Definition: blackoilextbomodules.hh:422
const Evaluation & gasViscosity() const
Definition: blackoilextbomodules.hh:529
const Evaluation & yVolume() const
Definition: blackoilextbomodules.hh:523
Evaluation oilViscosity_
Definition: blackoilextbomodules.hh:564
const Evaluation & rv() const
Definition: blackoilextbomodules.hh:541
Evaluation bg_
Definition: blackoilextbomodules.hh:567
Evaluation bz_
Definition: blackoilextbomodules.hh:572
const Evaluation & bg() const
Definition: blackoilextbomodules.hh:535
Evaluation yVolume_
Definition: blackoilextbomodules.hh:561
Evaluation gasViscosity_
Definition: blackoilextbomodules.hh:565
Scalar zRefDensity() const
Definition: blackoilextbomodules.hh:547
const Evaluation & rs() const
Definition: blackoilextbomodules.hh:538
const Evaluation zPureInvFormationVolumeFactor() const
Definition: blackoilextbomodules.hh:544
Evaluation rs_
Definition: blackoilextbomodules.hh:568
const Evaluation & bo() const
Definition: blackoilextbomodules.hh:532
Implementation & asImp_()
Definition: blackoilextbomodules.hh:551
Evaluation rv_
Definition: blackoilextbomodules.hh:569
Evaluation zFraction_
Definition: blackoilextbomodules.hh:557
Provides the volumetric quantities required for the equations needed by the solvents extension of the...
Contains the high level supplements required to extend the black oil model.
Definition: blackoilextbomodules.hh:65
static Scalar computeResidualError(const EqVector &resid)
Return how much a residual is considered an error.
Definition: blackoilextbomodules.hh:288
static Value rs(unsigned pvtRegionIdx, const Value &pressure, const Value &z)
Definition: blackoilextbomodules.hh:350
static Scalar eqWeight(unsigned eqIdx)
Definition: blackoilextbomodules.hh:141
static void assignPrimaryVars(PrimaryVariables &priVars, Scalar zFraction)
Assign the solvent specific primary variables to a PrimaryVariables object.
Definition: blackoilextbomodules.hh:256
static bool eqApplies(unsigned eqIdx)
Definition: blackoilextbomodules.hh:129
static Value xVolume(unsigned pvtRegionIdx, const Value &pressure, const Value &z)
Definition: blackoilextbomodules.hh:318
static Value pbubRv(unsigned pvtRegionIdx, const Value &z, const Value &rv)
Definition: blackoilextbomodules.hh:330
static Scalar primaryVarWeight(unsigned pvIdx)
Definition: blackoilextbomodules.hh:121
static Value rv(unsigned pvtRegionIdx, const Value &pressure, const Value &z)
Definition: blackoilextbomodules.hh:354
static void computeFlux(RateVector &flux, const ElementContext &elemCtx, unsigned scvfIdx, unsigned timeIdx)
Definition: blackoilextbomodules.hh:185
static Value gasViscosity(unsigned pvtRegionIdx, const Value &pressure, const Value &z)
Definition: blackoilextbomodules.hh:338
static void updatePrimaryVars(PrimaryVariables &newPv, const PrimaryVariables &oldPv, const EqVector &delta)
Do a Newton-Raphson update the primary variables of the solvents.
Definition: blackoilextbomodules.hh:265
static void serializeEntity(const Model &model, std::ostream &outstream, const DofEntity &dof)
Definition: blackoilextbomodules.hh:295
static Scalar referenceDensity(unsigned regionIdx)
Definition: blackoilextbomodules.hh:357
static void addExtboFluxes_(RateVector &flux, const unsigned phaseIdx, const Evaluation &volumeFlux, const IntensiveQuantities &up)
Add the z-component flux carried by one phase over a face.
Definition: blackoilextbomodules.hh:229
static Value yVolume(unsigned pvtRegionIdx, const Value &pressure, const Value &z)
Definition: blackoilextbomodules.hh:322
static void registerOutputModules(Model &, Simulator &)
Register all solvent specific VTK and ECL output modules.
Definition: blackoilextbomodules.hh:105
static void setParams(BlackOilExtboParams< Scalar > &&params)
Set parameters.
Definition: blackoilextbomodules.hh:91
static void registerParameters()
Register all run-time parameters for the black-oil solvent module.
Definition: blackoilextbomodules.hh:99
static bool primaryVarApplies(unsigned pvIdx)
Definition: blackoilextbomodules.hh:109
static std::string primaryVarName(unsigned pvIdx)
Definition: blackoilextbomodules.hh:114
static Value bg(unsigned pvtRegionIdx, const Value &pressure, const Value &z)
Definition: blackoilextbomodules.hh:346
static Scalar computeUpdateError(const PrimaryVariables &, const EqVector &)
Return how much a Newton-Raphson update is considered an error.
Definition: blackoilextbomodules.hh:276
static Value gasCmp(unsigned pvtRegionIdx, const Value &z)
Definition: blackoilextbomodules.hh:368
static void deserializeEntity(Model &model, std::istream &instream, const DofEntity &dof)
Definition: blackoilextbomodules.hh:304
static std::string eqName(unsigned eqIdx)
Definition: blackoilextbomodules.hh:134
static Value oilViscosity(unsigned pvtRegionIdx, const Value &pressure, const Value &z)
Definition: blackoilextbomodules.hh:334
static Value pbubRs(unsigned pvtRegionIdx, const Value &z, const Value &rs)
Definition: blackoilextbomodules.hh:326
static OPM_HOST_DEVICE void addStorage(StorageType &storage, const IntensiveQuantities &intQuants)
Definition: blackoilextbomodules.hh:150
static Value bo(unsigned pvtRegionIdx, const Value &pressure, const Value &z)
Definition: blackoilextbomodules.hh:342
static Scalar zLim(unsigned regionIdx)
Definition: blackoilextbomodules.hh:360
static Value oilCmp(unsigned pvtRegionIdx, const Value &z)
Definition: blackoilextbomodules.hh:364
Declare the properties used by the infrastructure code of the finite volume discretizations.
Definition: blackoilbioeffectsmodules.hh:45
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:233
Struct holding the parameters for the BlackoilExtboModule class.
Definition: blackoilextboparams.hpp:48