blackoilfoammodules.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*/
28#ifndef EWOMS_BLACK_OIL_FOAM_MODULE_HH
29#define EWOMS_BLACK_OIL_FOAM_MODULE_HH
30
31#include "blackoilproperties.hh"
32
33#include <dune/common/fvector.hh>
34
35#include <opm/common/OpmLog/OpmLog.hpp>
36
37#if HAVE_ECL_INPUT
38#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
39#include <opm/input/eclipse/EclipseState/Tables/FoamadsTable.hpp>
40#include <opm/input/eclipse/EclipseState/Tables/FoammobTable.hpp>
41#endif
42
44
47
48#include <string>
49
50namespace Opm {
51
57template <class TypeTag, bool enableFoamV = getPropValue<TypeTag, Properties::EnableFoam>()>
59{
72
73 using Toolbox = MathToolbox<Evaluation>;
74
75 using TabulatedFunction = typename BlackOilFoamParams<Scalar>::TabulatedFunction;
76
77 static constexpr unsigned foamConcentrationIdx = Indices::foamConcentrationIdx;
78 static constexpr unsigned contiFoamEqIdx = Indices::contiFoamEqIdx;
79 static constexpr unsigned gasPhaseIdx = FluidSystem::gasPhaseIdx;
80 static constexpr unsigned waterPhaseIdx = FluidSystem::waterPhaseIdx;
81
82 static constexpr unsigned enableFoam = enableFoamV;
83
84 static constexpr unsigned numEq = getPropValue<TypeTag, Properties::NumEq>();
85 static constexpr unsigned numPhases = FluidSystem::numPhases;
86
87 enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
88
89public:
90#if HAVE_ECL_INPUT
94 static void initFromState(const EclipseState& eclState)
95 {
96 // some sanity checks: if foam is enabled, the FOAM keyword must be
97 // present, if foam is disabled the keyword must not be present.
98 if (enableFoam && !eclState.runspec().phases().active(Phase::FOAM)) {
99 throw std::runtime_error("Non-trivial foam treatment requested at compile time, but "
100 "the deck does not contain the FOAM keyword");
101 }
102 else if (!enableFoam && eclState.runspec().phases().active(Phase::FOAM)) {
103 throw std::runtime_error("Foam treatment disabled at compile time, but the deck "
104 "contains the FOAM keyword");
105 }
106
107 if (!eclState.runspec().phases().active(Phase::FOAM)) {
108 return; // foam treatment is supposed to be disabled
109 }
110
111 params_.transport_phase_ = eclState.getInitConfig().getFoamConfig().getTransportPhase();
112
113 if (eclState.getInitConfig().getFoamConfig().getMobilityModel() != FoamConfig::MobilityModel::TAB) {
114 throw std::runtime_error("In FOAMOPTS, only TAB is allowed for the gas mobility factor reduction model.");
115 }
116
117 const auto& tableManager = eclState.getTableManager();
118 const unsigned int numSatRegions = tableManager.getTabdims().getNumSatTables();
119 params_.setNumSatRegions(numSatRegions);
120 const unsigned int numPvtRegions = tableManager.getTabdims().getNumPVTTables();
121 params_.gasMobilityMultiplierTable_.resize(numPvtRegions);
122
123 // Get and check FOAMROCK data.
124 const FoamConfig& foamConf = eclState.getInitConfig().getFoamConfig();
125 if (numSatRegions != foamConf.size()) {
126 throw std::runtime_error("Inconsistent sizes, number of saturation regions differ from the number of elements "
127 "in FoamConfig, which typically corresponds to the number of records in FOAMROCK.");
128 }
129
130 // Get and check FOAMADS data.
131 const auto& foamadsTables = tableManager.getFoamadsTables();
132 if (foamadsTables.empty()) {
133 throw std::runtime_error("FOAMADS must be specified in FOAM runs");
134 }
135 if (numSatRegions != foamadsTables.size()) {
136 throw std::runtime_error("Inconsistent sizes, number of saturation regions differ from the "
137 "number of FOAMADS tables.");
138 }
139
140 // Set data that vary with saturation region.
141 for (std::size_t satReg = 0; satReg < numSatRegions; ++satReg) {
142 const auto& rec = foamConf.getRecord(satReg);
143 params_.foamCoefficients_[satReg] = typename BlackOilFoamParams<Scalar>::FoamCoefficients();
144 params_.foamCoefficients_[satReg].fm_min = rec.minimumSurfactantConcentration();
145 params_.foamCoefficients_[satReg].fm_surf = rec.referenceSurfactantConcentration();
146 params_.foamCoefficients_[satReg].ep_surf = rec.exponent();
147 params_.foamRockDensity_[satReg] = rec.rockDensity();
148 params_.foamAllowDesorption_[satReg] = rec.allowDesorption();
149 const auto& foamadsTable = foamadsTables.template getTable<FoamadsTable>(satReg);
150 const auto& conc = foamadsTable.getFoamConcentrationColumn();
151 const auto& ads = foamadsTable.getAdsorbedFoamColumn();
152 params_.adsorbedFoamTable_[satReg].setXYContainers(conc, ads);
153 }
154
155 // Get and check FOAMMOB data.
156 const auto& foammobTables = tableManager.getFoammobTables();
157 if (foammobTables.empty()) {
158 // When in the future adding support for the functional
159 // model, FOAMMOB will not be required anymore (functional
160 // family of keywords can be used instead, FOAMFSC etc.).
161 throw std::runtime_error("FOAMMOB must be specified in FOAM runs");
162 }
163 if (numPvtRegions != foammobTables.size()) {
164 throw std::runtime_error("Inconsistent sizes, number of PVT regions differ from the "
165 "number of FOAMMOB tables.");
166 }
167
168 // Set data that vary with PVT region.
169 for (std::size_t pvtReg = 0; pvtReg < numPvtRegions; ++pvtReg) {
170 const auto& foammobTable = foammobTables.template getTable<FoammobTable>(pvtReg);
171 const auto& conc = foammobTable.getFoamConcentrationColumn();
172 const auto& mobMult = foammobTable.getMobilityMultiplierColumn();
173 params_.gasMobilityMultiplierTable_[pvtReg].setXYContainers(conc, mobMult);
174 }
175 }
176#endif
177
181 static void registerParameters()
182 {
183 }
184
188 static void registerOutputModules(Model&,
189 Simulator&)
190 {
191 if constexpr (enableFoam) {
192 if (Parameters::Get<Parameters::EnableVtkOutput>()) {
193 OpmLog::warning("VTK output requested, currently unsupported by the foam module.");
194 }
195 }
196 //model.addOutputModule(new VtkBlackOilFoamModule<TypeTag>(simulator));
197 }
198
199 static bool primaryVarApplies(unsigned pvIdx)
200 {
201 if constexpr (enableFoam)
202 return pvIdx == foamConcentrationIdx;
203 else
204 return false;
205 }
206
207 static std::string primaryVarName([[maybe_unused]] unsigned pvIdx)
208 {
209 assert(primaryVarApplies(pvIdx));
210 return "foam_concentration";
211 }
212
213 static Scalar primaryVarWeight([[maybe_unused]] unsigned pvIdx)
214 {
215 assert(primaryVarApplies(pvIdx));
216
217 // TODO: it may be beneficial to chose this differently.
218 return static_cast<Scalar>(1.0);
219 }
220
221 static bool eqApplies(unsigned eqIdx)
222 {
223 if constexpr (enableFoam)
224 return eqIdx == contiFoamEqIdx;
225 else
226 return false;
227
228 }
229
230 static std::string eqName([[maybe_unused]] unsigned eqIdx)
231 {
232 assert(eqApplies(eqIdx));
233
234 return "conti^foam";
235 }
236
237 static Scalar eqWeight([[maybe_unused]] unsigned eqIdx)
238 {
239 assert(eqApplies(eqIdx));
240
241 // TODO: it may be beneficial to chose this differently.
242 return static_cast<Scalar>(1.0);
243 }
244
245 // must be called after water storage is computed
246 template <class LhsEval>
247 static void addStorage(Dune::FieldVector<LhsEval, numEq>& storage,
248 const IntensiveQuantities& intQuants)
249 {
250 if constexpr (enableFoam) {
251 const auto& fs = intQuants.fluidState();
252
253 LhsEval surfaceVolume = Toolbox::template decay<LhsEval>(intQuants.porosity());
254 if (params_.transport_phase_ == Phase::WATER) {
255 surfaceVolume *= (Toolbox::template decay<LhsEval>(fs.saturation(waterPhaseIdx))
256 * Toolbox::template decay<LhsEval>(fs.invB(waterPhaseIdx)));
257 } else if (params_.transport_phase_ == Phase::GAS) {
258 surfaceVolume *= (Toolbox::template decay<LhsEval>(fs.saturation(gasPhaseIdx))
259 * Toolbox::template decay<LhsEval>(fs.invB(gasPhaseIdx)));
260 } else if (params_.transport_phase_ == Phase::SOLVENT) {
261 if constexpr (enableSolvent) {
262 surfaceVolume *= (Toolbox::template decay<LhsEval>( intQuants.solventSaturation())
263 * Toolbox::template decay<LhsEval>(intQuants.solventInverseFormationVolumeFactor()));
264 }
265 } else {
266 throw std::runtime_error("Transport phase is GAS/WATER/SOLVENT");
267 }
268
269 // Avoid singular matrix if no gas is present.
270 surfaceVolume = max(surfaceVolume, 1e-10);
271
272 // Foam/surfactant in free phase.
273 const LhsEval freeFoam = surfaceVolume
274 * Toolbox::template decay<LhsEval>(intQuants.foamConcentration());
275
276 // Adsorbed foam/surfactant.
277 const LhsEval adsorbedFoam =
278 Toolbox::template decay<LhsEval>(1.0 - intQuants.porosity())
279 * Toolbox::template decay<LhsEval>(intQuants.foamRockDensity())
280 * Toolbox::template decay<LhsEval>(intQuants.foamAdsorbed());
281
282 LhsEval accumulationFoam = freeFoam + adsorbedFoam;
283 storage[contiFoamEqIdx] += accumulationFoam;
284 }
285 }
286
287 static void computeFlux([[maybe_unused]] RateVector& flux,
288 [[maybe_unused]] const ElementContext& elemCtx,
289 [[maybe_unused]] unsigned scvfIdx,
290 [[maybe_unused]] unsigned timeIdx)
291
292 {
293 if constexpr (enableFoam) {
294 const auto& extQuants = elemCtx.extensiveQuantities(scvfIdx, timeIdx);
295 const unsigned inIdx = extQuants.interiorIndex();
296
297 // The effect of the mobility reduction factor is
298 // incorporated in the mobility for the relevant phase,
299 // so fluxes do not need modification here.
300 switch (transportPhase()) {
301 case Phase::WATER: {
302 const unsigned upIdx = extQuants.upstreamIndex(waterPhaseIdx);
303 const auto& up = elemCtx.intensiveQuantities(upIdx, timeIdx);
304 if (upIdx == inIdx) {
305 flux[contiFoamEqIdx] =
306 extQuants.volumeFlux(waterPhaseIdx)
307 *up.fluidState().invB(waterPhaseIdx)
308 *up.foamConcentration();
309 } else {
310 flux[contiFoamEqIdx] =
311 extQuants.volumeFlux(waterPhaseIdx)
312 *decay<Scalar>(up.fluidState().invB(waterPhaseIdx))
313 *decay<Scalar>(up.foamConcentration());
314 }
315 break;
316 }
317 case Phase::GAS: {
318 const unsigned upIdx = extQuants.upstreamIndex(gasPhaseIdx);
319 const auto& up = elemCtx.intensiveQuantities(upIdx, timeIdx);
320 if (upIdx == inIdx) {
321 flux[contiFoamEqIdx] =
322 extQuants.volumeFlux(gasPhaseIdx)
323 *up.fluidState().invB(gasPhaseIdx)
324 *up.foamConcentration();
325 } else {
326 flux[contiFoamEqIdx] =
327 extQuants.volumeFlux(gasPhaseIdx)
328 *decay<Scalar>(up.fluidState().invB(gasPhaseIdx))
329 *decay<Scalar>(up.foamConcentration());
330 }
331 break;
332 }
333 case Phase::SOLVENT: {
334 if constexpr (enableSolvent) {
335 const unsigned upIdx = extQuants.solventUpstreamIndex();
336 const auto& up = elemCtx.intensiveQuantities(upIdx, timeIdx);
337 if (upIdx == inIdx) {
338 flux[contiFoamEqIdx] =
339 extQuants.solventVolumeFlux()
340 *up.solventInverseFormationVolumeFactor()
341 *up.foamConcentration();
342 } else {
343 flux[contiFoamEqIdx] =
344 extQuants.solventVolumeFlux()
345 *decay<Scalar>(up.solventInverseFormationVolumeFactor())
346 *decay<Scalar>(up.foamConcentration());
347 }
348 } else {
349 throw std::runtime_error("Foam transport phase is SOLVENT but SOLVENT is not activated.");
350 }
351 break;
352 }
353 default: {
354 throw std::runtime_error("Foam transport phase must be GAS/WATER/SOLVENT.");
355 }
356 }
357 }
358 }
359
363 static Scalar computeUpdateError(const PrimaryVariables&,
364 const EqVector&)
365 {
366 // do not consider the change of foam primary variables for convergence
367 // TODO: maybe this should be changed
368 return static_cast<Scalar>(0.0);
369 }
370
371 template <class DofEntity>
372 static void serializeEntity([[maybe_unused]] const Model& model,
373 [[maybe_unused]] std::ostream& outstream,
374 [[maybe_unused]] const DofEntity& dof)
375 {
376 if constexpr (enableFoam) {
377 unsigned dofIdx = model.dofMapper().index(dof);
378 const PrimaryVariables& priVars = model.solution(/*timeIdx=*/0)[dofIdx];
379 outstream << priVars[foamConcentrationIdx];
380 }
381 }
382
383 template <class DofEntity>
384 static void deserializeEntity([[maybe_unused]] Model& model,
385 [[maybe_unused]] std::istream& instream,
386 [[maybe_unused]] const DofEntity& dof)
387 {
388 if constexpr (enableFoam) {
389 unsigned dofIdx = model.dofMapper().index(dof);
390 PrimaryVariables& priVars0 = model.solution(/*timeIdx=*/0)[dofIdx];
391 PrimaryVariables& priVars1 = model.solution(/*timeIdx=*/1)[dofIdx];
392
393 instream >> priVars0[foamConcentrationIdx];
394
395 // set the primary variables for the beginning of the current time step.
396 priVars1[foamConcentrationIdx] = priVars0[foamConcentrationIdx];
397 }
398 }
399
400 static const Scalar foamRockDensity(const ElementContext& elemCtx,
401 unsigned scvIdx,
402 unsigned timeIdx)
403 {
404 unsigned satnumRegionIdx = elemCtx.problem().satnumRegionIndex(elemCtx, scvIdx, timeIdx);
405 return params_.foamRockDensity_[satnumRegionIdx];
406 }
407
408 static bool foamAllowDesorption(const ElementContext& elemCtx,
409 unsigned scvIdx,
410 unsigned timeIdx)
411 {
412 unsigned satnumRegionIdx = elemCtx.problem().satnumRegionIndex(elemCtx, scvIdx, timeIdx);
413 return params_.foamAllowDesorption_[satnumRegionIdx];
414 }
415
416 static const TabulatedFunction& adsorbedFoamTable(const ElementContext& elemCtx,
417 unsigned scvIdx,
418 unsigned timeIdx)
419 {
420 unsigned satnumRegionIdx = elemCtx.problem().satnumRegionIndex(elemCtx, scvIdx, timeIdx);
421 return params_.adsorbedFoamTable_[satnumRegionIdx];
422 }
423
424 static const TabulatedFunction& gasMobilityMultiplierTable(const ElementContext& elemCtx,
425 unsigned scvIdx,
426 unsigned timeIdx)
427 {
428 unsigned pvtnumRegionIdx = elemCtx.problem().pvtRegionIndex(elemCtx, scvIdx, timeIdx);
429 return params_.gasMobilityMultiplierTable_[pvtnumRegionIdx];
430 }
431
433 foamCoefficients(const ElementContext& elemCtx,
434 const unsigned scvIdx,
435 const unsigned timeIdx)
436 {
437 unsigned satnumRegionIdx = elemCtx.problem().satnumRegionIndex(elemCtx, scvIdx, timeIdx);
438 return params_.foamCoefficients_[satnumRegionIdx];
439 }
440
441 static Phase transportPhase() {
442 return params_.transport_phase_;
443 }
444
445private:
446 static BlackOilFoamParams<Scalar> params_;
447};
448
449template <class TypeTag, bool enableFoam>
450BlackOilFoamParams<typename BlackOilFoamModule<TypeTag, enableFoam>::Scalar>
451BlackOilFoamModule<TypeTag, enableFoam>::params_;
452
460template <class TypeTag, bool enableFoam = getPropValue<TypeTag, Properties::EnableFoam>()>
462{
464
472
474
475 enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
476 enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
477
478 static constexpr int foamConcentrationIdx = Indices::foamConcentrationIdx;
479 static constexpr unsigned waterPhaseIdx = FluidSystem::waterPhaseIdx;
480 static constexpr unsigned oilPhaseIdx = FluidSystem::oilPhaseIdx;
481 static constexpr int gasPhaseIdx = FluidSystem::gasPhaseIdx;
482
483public:
484
490 void foamPropertiesUpdate_(const ElementContext& elemCtx,
491 unsigned dofIdx,
492 unsigned timeIdx)
493 {
494 const PrimaryVariables& priVars = elemCtx.primaryVars(dofIdx, timeIdx);
495 foamConcentration_ = priVars.makeEvaluation(foamConcentrationIdx, timeIdx);
496 const auto& fs = asImp_().fluidState_;
497
498 // Compute gas mobility reduction factor
499 Evaluation mobilityReductionFactor = 1.0;
500 if (false) {
501 // The functional model is used.
502 // TODO: allow this model.
503 // In order to do this we must allow transport to be in the water phase, not just the gas phase.
504 const auto& foamCoefficients = FoamModule::foamCoefficients(elemCtx, dofIdx, timeIdx);
505
506 const Scalar fm_mob = foamCoefficients.fm_mob;
507
508 const Scalar fm_surf = foamCoefficients.fm_surf;
509 const Scalar ep_surf = foamCoefficients.ep_surf;
510
511 const Scalar fm_oil = foamCoefficients.fm_oil;
512 const Scalar fl_oil = foamCoefficients.fl_oil;
513 const Scalar ep_oil = foamCoefficients.ep_oil;
514
515 const Scalar fm_dry = foamCoefficients.fm_dry;
516 const Scalar ep_dry = foamCoefficients.ep_dry;
517
518 const Scalar fm_cap = foamCoefficients.fm_cap;
519 const Scalar ep_cap = foamCoefficients.ep_cap;
520
521 const Evaluation C_surf = foamConcentration_;
522 const Evaluation Ca = 1e10; // TODO: replace with proper capillary number.
523 const Evaluation S_o = fs.saturation(oilPhaseIdx);
524 const Evaluation S_w = fs.saturation(waterPhaseIdx);
525
526 Evaluation F1 = pow(C_surf/fm_surf, ep_surf);
527 Evaluation F2 = pow((fm_oil-S_o)/(fm_oil-fl_oil), ep_oil);
528 Evaluation F3 = pow(fm_cap/Ca, ep_cap);
529 Evaluation F7 = 0.5 + atan(ep_dry*(S_w-fm_dry))/M_PI;
530
531 mobilityReductionFactor = 1./(1. + fm_mob*F1*F2*F3*F7);
532 } else {
533 // The tabular model is used.
534 // Note that the current implementation only includes the effect of foam concentration (FOAMMOB),
535 // and not the optional pressure dependence (FOAMMOBP) or shear dependence (FOAMMOBS).
536 const auto& gasMobilityMultiplier = FoamModule::gasMobilityMultiplierTable(elemCtx, dofIdx, timeIdx);
537 mobilityReductionFactor = gasMobilityMultiplier.eval(foamConcentration_, /* extrapolate = */ true);
538 }
539
540 // adjust mobility
541 switch (FoamModule::transportPhase()) {
542 case Phase::WATER: {
543 asImp_().mobility_[waterPhaseIdx] *= mobilityReductionFactor;
544 break;
545 }
546 case Phase::GAS: {
547 asImp_().mobility_[gasPhaseIdx] *= mobilityReductionFactor;
548 break;
549 }
550 case Phase::SOLVENT: {
551 if constexpr (enableSolvent) {
552 asImp_().solventMobility_ *= mobilityReductionFactor;
553 } else {
554 throw std::runtime_error("Foam transport phase is SOLVENT but SOLVENT is not activated.");
555 }
556 break;
557 }
558 default: {
559 throw std::runtime_error("Foam transport phase must be GAS/WATER/SOLVENT.");
560 }
561 }
562
563 foamRockDensity_ = FoamModule::foamRockDensity(elemCtx, dofIdx, timeIdx);
564
565 const auto& adsorbedFoamTable = FoamModule::adsorbedFoamTable(elemCtx, dofIdx, timeIdx);
566 foamAdsorbed_ = adsorbedFoamTable.eval(foamConcentration_, /*extrapolate=*/true);
567 if (!FoamModule::foamAllowDesorption(elemCtx, dofIdx, timeIdx)) {
568 throw std::runtime_error("Foam module does not support the 'no desorption' option.");
569 }
570 }
571
572 const Evaluation& foamConcentration() const
573 { return foamConcentration_; }
574
575 Scalar foamRockDensity() const
576 { return foamRockDensity_; }
577
578 const Evaluation& foamAdsorbed() const
579 { return foamAdsorbed_; }
580
581protected:
582 Implementation& asImp_()
583 { return *static_cast<Implementation*>(this); }
584
587 Evaluation foamAdsorbed_;
588};
589
590template <class TypeTag>
592{
596
597public:
598 void foamPropertiesUpdate_(const ElementContext&,
599 unsigned,
600 unsigned)
601 { }
602
603
604 const Evaluation& foamConcentration() const
605 { throw std::runtime_error("foamConcentration() called but foam is disabled"); }
606
607 Scalar foamRockDensity() const
608 { throw std::runtime_error("foamRockDensity() called but foam is disabled"); }
609
610 Scalar foamAdsorbed() const
611 { throw std::runtime_error("foamAdsorbed() called but foam is disabled"); }
612};
613
614} // namespace Opm
615
616#endif
Contains the parameters to extend the black-oil model to include the effects of foam.
Declares the properties required by the black oil model.
Scalar foamRockDensity() const
Definition: blackoilfoammodules.hh:607
const Evaluation & foamConcentration() const
Definition: blackoilfoammodules.hh:604
void foamPropertiesUpdate_(const ElementContext &, unsigned, unsigned)
Definition: blackoilfoammodules.hh:598
Scalar foamAdsorbed() const
Definition: blackoilfoammodules.hh:610
Provides the volumetric quantities required for the equations needed by the polymers extension of the...
Definition: blackoilfoammodules.hh:462
const Evaluation & foamConcentration() const
Definition: blackoilfoammodules.hh:572
Implementation & asImp_()
Definition: blackoilfoammodules.hh:582
Scalar foamRockDensity_
Definition: blackoilfoammodules.hh:586
const Evaluation & foamAdsorbed() const
Definition: blackoilfoammodules.hh:578
Evaluation foamAdsorbed_
Definition: blackoilfoammodules.hh:587
Evaluation foamConcentration_
Definition: blackoilfoammodules.hh:585
Scalar foamRockDensity() const
Definition: blackoilfoammodules.hh:575
void foamPropertiesUpdate_(const ElementContext &elemCtx, unsigned dofIdx, unsigned timeIdx)
Update the intensive properties needed to handle polymers from the primary variables.
Definition: blackoilfoammodules.hh:490
Contains the high level supplements required to extend the black oil model to include the effects of ...
Definition: blackoilfoammodules.hh:59
static bool eqApplies(unsigned eqIdx)
Definition: blackoilfoammodules.hh:221
static void registerOutputModules(Model &, Simulator &)
Register all foam specific VTK and ECL output modules.
Definition: blackoilfoammodules.hh:188
static void registerParameters()
Register all run-time parameters for the black-oil foam module.
Definition: blackoilfoammodules.hh:181
static std::string primaryVarName(unsigned pvIdx)
Definition: blackoilfoammodules.hh:207
static Scalar eqWeight(unsigned eqIdx)
Definition: blackoilfoammodules.hh:237
static void deserializeEntity(Model &model, std::istream &instream, const DofEntity &dof)
Definition: blackoilfoammodules.hh:384
static std::string eqName(unsigned eqIdx)
Definition: blackoilfoammodules.hh:230
static bool primaryVarApplies(unsigned pvIdx)
Definition: blackoilfoammodules.hh:199
static void addStorage(Dune::FieldVector< LhsEval, numEq > &storage, const IntensiveQuantities &intQuants)
Definition: blackoilfoammodules.hh:247
static bool foamAllowDesorption(const ElementContext &elemCtx, unsigned scvIdx, unsigned timeIdx)
Definition: blackoilfoammodules.hh:408
static Scalar primaryVarWeight(unsigned pvIdx)
Definition: blackoilfoammodules.hh:213
static const BlackOilFoamParams< Scalar >::FoamCoefficients & foamCoefficients(const ElementContext &elemCtx, const unsigned scvIdx, const unsigned timeIdx)
Definition: blackoilfoammodules.hh:433
static void computeFlux(RateVector &flux, const ElementContext &elemCtx, unsigned scvfIdx, unsigned timeIdx)
Definition: blackoilfoammodules.hh:287
static Scalar computeUpdateError(const PrimaryVariables &, const EqVector &)
Return how much a Newton-Raphson update is considered an error.
Definition: blackoilfoammodules.hh:363
static const Scalar foamRockDensity(const ElementContext &elemCtx, unsigned scvIdx, unsigned timeIdx)
Definition: blackoilfoammodules.hh:400
static void serializeEntity(const Model &model, std::ostream &outstream, const DofEntity &dof)
Definition: blackoilfoammodules.hh:372
static const TabulatedFunction & adsorbedFoamTable(const ElementContext &elemCtx, unsigned scvIdx, unsigned timeIdx)
Definition: blackoilfoammodules.hh:416
static Phase transportPhase()
Definition: blackoilfoammodules.hh:441
static const TabulatedFunction & gasMobilityMultiplierTable(const ElementContext &elemCtx, unsigned scvIdx, unsigned timeIdx)
Definition: blackoilfoammodules.hh:424
Declare the properties used by the infrastructure code of the finite volume discretizations.
Declare the properties used by the infrastructure code of the finite volume discretizations.
Definition: blackoilboundaryratevector.hh:37
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:235
Definition: blackoilfoamparams.hh:59
Struct holding the parameters for the BlackoilFoamModule class.
Definition: blackoilfoamparams.hh:40
Tabulated1DFunction< Scalar > TabulatedFunction
Definition: blackoilfoamparams.hh:41