3.4
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
3dpressurevelocityadaptive.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2/*****************************************************************************
3 * See the file COPYING for full copying permissions. *
4 * *
5 * This program is free software: you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation, either version 3 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17 *****************************************************************************/
23#ifndef DUMUX_FVMPFALPRESSUREVELOCITY2P_ADAPTIVE_HH
24#define DUMUX_FVMPFALPRESSUREVELOCITY2P_ADAPTIVE_HH
25
26#include <dune/common/float_cmp.hh>
27#include "3dpressureadaptive.hh"
28#include "3dvelocityadaptive.hh"
29
30namespace Dumux {
31
45template<class TypeTag> class FvMpfaL3dPressureVelocity2pAdaptive: public FvMpfaL3dPressure2pAdaptive<TypeTag>
46{
49
51
52 enum
53 {
54 dim = GridView::dimension, dimWorld = GridView::dimensionworld
55 };
56
58
59 enum
60 {
61 pw = Indices::pressureW,
62 pn = Indices::pressureNw,
63 sw = Indices::saturationW,
64 sn = Indices::saturationNw,
65 wPhaseIdx = Indices::wPhaseIdx,
66 nPhaseIdx = Indices::nPhaseIdx,
67 pressureIdx = Indices::pressureIdx,
68 saturationIdx = Indices::saturationIdx,
69 pressEqIdx = Indices::pressureEqIdx,
70 satEqIdx = Indices::satEqIdx,
71 numPhases = getPropValue<TypeTag, Properties::NumPhases>()
72 };
73
80 using PrimaryVariables = typename SolutionTypes::PrimaryVariables;
82
84 using Intersection = typename GridView::Intersection;
85
86 using Element = typename GridView::template Codim<0>::Entity;
87
88 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
89 using DimMatrix = Dune::FieldMatrix<Scalar, dim, dim>;
90 using DimVector = Dune::FieldVector<Scalar, dim>;
91
92public:
99 ParentType(problem), problem_(problem), velocity_(problem)
100{
101 density_[wPhaseIdx] = 0.;
102 density_[nPhaseIdx] = 0.;
103 viscosity_[wPhaseIdx] = 0.;
104 viscosity_[nPhaseIdx] = 0.;
105
106 calcVelocityInTransport_ = getParam<bool>("MPFA.CalcVelocityInTransport");
107}
108
109 void calculateVelocity();
110
112 void calculateVelocity(const Intersection&, CellData&);
113 void calculateVelocityOnBoundary(const Intersection& intersection, CellData& cellData);
114
117 {
118 this->updateMaterialLaws();
119
120 this->storePressureSolution();
121
124 }
125
131 void initialize(bool solveTwice = true)
132 {
133 const auto element = *problem_.gridView().template begin<0>();
134 FluidState fluidState;
135 fluidState.setPressure(wPhaseIdx, problem_.referencePressure(element));
136 fluidState.setPressure(nPhaseIdx, problem_.referencePressure(element));
137 fluidState.setTemperature(problem_.temperature(element));
138 fluidState.setSaturation(wPhaseIdx, 1.);
139 fluidState.setSaturation(nPhaseIdx, 0.);
140 density_[wPhaseIdx] = FluidSystem::density(fluidState, wPhaseIdx);
141 density_[nPhaseIdx] = FluidSystem::density(fluidState, nPhaseIdx);
142 viscosity_[wPhaseIdx] = FluidSystem::viscosity(fluidState, wPhaseIdx);
143 viscosity_[nPhaseIdx] = FluidSystem::viscosity(fluidState, nPhaseIdx);
144
146 velocity_.initialize();
147
150
151 return;
152 }
153
159 void update()
160 {
162
165 }
166
173 {
174 return calcVelocityInTransport_;
175 }
176
187 template<class MultiWriter>
188 void addOutputVtkFields(MultiWriter &writer)
189 {
191 velocity_.addOutputVtkFields(writer);
192 }
193
194private:
195 Problem& problem_;
197
198 Scalar density_[numPhases];
199 Scalar viscosity_[numPhases];
200 bool calcVelocityInTransport_;
201
203 static const int pressureType_ = getPropValue<TypeTag, Properties::PressureFormulation>();
205 static const int saturationType_ = getPropValue<TypeTag, Properties::SaturationFormulation>();
206};
207// end of template
208
214template<class TypeTag>
216{
217 // run through all vertices
218 for (const auto& vertex : vertices(problem_.gridView()))
219 {
220 int vIdxGlobal = problem_.variables().index(vertex);
221
222 InteractionVolume& interactionVolume = this->interactionVolumes_.interactionVolume(vIdxGlobal);
223
224 // inner interactionvolume
225 if (interactionVolume.isInnerVolume())
226 {
227 // cell index
228 int eIdxGlobal[8];
229 for (int i = 0; i < 8; i++)
230 {
231 eIdxGlobal[i] = problem_.variables().index(interactionVolume.getSubVolumeElement(i));
232 }
233
234 //get the cell Data
235 CellData & cellData1 = problem_.variables().cellData(eIdxGlobal[0]);
236 CellData & cellData2 = problem_.variables().cellData(eIdxGlobal[1]);
237 CellData & cellData3 = problem_.variables().cellData(eIdxGlobal[2]);
238 CellData & cellData4 = problem_.variables().cellData(eIdxGlobal[3]);
239 CellData & cellData5 = problem_.variables().cellData(eIdxGlobal[4]);
240 CellData & cellData6 = problem_.variables().cellData(eIdxGlobal[5]);
241 CellData & cellData7 = problem_.variables().cellData(eIdxGlobal[6]);
242 CellData & cellData8 = problem_.variables().cellData(eIdxGlobal[7]);
243
244 if (!interactionVolume.isHangingNodeVolume())
245 {
246 velocity_.calculateInnerInteractionVolumeVelocity(interactionVolume,
247 cellData1, cellData2, cellData3, cellData4,
248 cellData5, cellData6, cellData7, cellData8,
249 this->interactionVolumes_, this->transmissibilityCalculator_);
250 }
251 else
252 {
253 velocity_.calculateHangingNodeInteractionVolumeVelocity(interactionVolume,
254 cellData1, cellData2, cellData3, cellData4,
255 cellData5, cellData6, cellData7, cellData8);
256 }
257 }
258 // at least one face on boundary! (boundary interactionvolume)
259 else
260 {
261 for (int elemIdx = 0; elemIdx < 8; elemIdx++)
262 {
263 if (!interactionVolume.hasSubVolumeElement(elemIdx))
264 {
265 continue;
266 }
267 bool isOutside = false;
268 for (int fIdx = 0; fIdx < dim; fIdx++)
269 {
270 int intVolFaceIdx = interactionVolume.getFaceIndexFromSubVolume(elemIdx, fIdx);
271 if (interactionVolume.isOutsideFace(intVolFaceIdx))
272 {
273 isOutside = true;
274 break;
275 }
276 }
277 if (isOutside)
278 {
279 continue;
280 }
281
282 // cell index
283 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(elemIdx));
284 //get the cell Data
285 CellData& cellData = problem_.variables().cellData(eIdxGlobal);
286
287 velocity_.calculateBoundaryInteractionVolumeVelocity(interactionVolume, cellData, elemIdx);
288 }
289 } // end boundaries
290
291 } // end vertex iterator
292
293 return;
294}
295
304template<class TypeTag>
305void FvMpfaL3dPressureVelocity2pAdaptive<TypeTag>::calculateVelocity(const Intersection& intersection, CellData& cellData)
306{
307 auto elementI = intersection.inside();
308 auto elementJ = intersection.outside();
309
310 int levelI = elementI.level();
311 int levelJ = elementJ.level();
312
313 int eIdxGlobalI = problem_.variables().index(elementI);
314 int eIdxGlobalJ = problem_.variables().index(elementJ);
315
316 CellData& cellDataJ = problem_.variables().cellData(eIdxGlobalJ);
317
318 int indexInInside = intersection.indexInInside();
319 int indexInOutside = intersection.indexInOutside();
320
321 Dune::FieldVector<CellData, 8> cellDataTemp;
322
323 if (levelI != levelJ)
324 {
325 DimVector vel(0);
326 cellData.fluxData().setVelocity(wPhaseIdx, indexInInside, vel);
327 cellData.fluxData().setVelocity(nPhaseIdx, indexInInside, vel);
328 cellData.fluxData().setUpwindPotential(wPhaseIdx, indexInInside, 0);
329 cellData.fluxData().setUpwindPotential(nPhaseIdx, indexInInside, 0);
330
331 cellDataJ.fluxData().setVelocity(wPhaseIdx, indexInOutside, vel);
332 cellDataJ.fluxData().setVelocity(nPhaseIdx, indexInOutside, vel);
333 cellDataJ.fluxData().setUpwindPotential(wPhaseIdx, indexInOutside, 0);
334 cellDataJ.fluxData().setUpwindPotential(nPhaseIdx, indexInOutside, 0);
335 }
336
337 std::set<int> vIdxGlobal;
338
339 if (levelI >= levelJ)
340 {
341 vIdxGlobal = this->interactionVolumes_.faceVerticeIndices(eIdxGlobalI, indexInInside);
342 }
343 else
344 {
345 vIdxGlobal = this->interactionVolumes_.faceVerticeIndices(eIdxGlobalJ, indexInOutside);
346 }
347
348 std::set<int>::iterator itEnd = vIdxGlobal.end();
349
350 for (std::set<int>::iterator vIdxIt = vIdxGlobal.begin(); vIdxIt != itEnd; ++vIdxIt)
351 {
352 InteractionVolume& interactionVolume = this->interactionVolumes_.interactionVolume(*vIdxIt);
353
354 if (interactionVolume.isInnerVolume())
355 {
356 // cell index
357 std::vector<std::pair<int,int> > localMpfaElemIdx(0);
358
359 int eIdxGlobal[8];
360 for (int i = 0; i < 8; i++)
361 {
362 auto elem = interactionVolume.getSubVolumeElement(i);
363
364 if (interactionVolume.isHangingNodeVolume())
365 {
366 if (elem == elementI)
367 {
368 for (int j = 0; j < 3; j++)
369 {
370 for (int k = 0; k < 8; k++)
371 {
372 if (interactionVolume.getSubVolumeElement(k) == elementJ &&
373 IndexTranslator::getFaceIndexFromSubVolume(i,j)
374 == IndexTranslator::getFaceIndexFromElements(i,k))
375 {
376 std::pair<int,int> localIdx = std::make_pair(i, k);
377 localMpfaElemIdx.push_back(localIdx);
378 }
379 }
380 }
381 }
382 }
383 else
384 {
385 if (localMpfaElemIdx.size() != 1)
386 localMpfaElemIdx.resize(1);
387
388 if (elem == elementI)
389 localMpfaElemIdx[0].first = i;
390 else if (elem == elementJ)
391 localMpfaElemIdx[0].second = i;
392 }
393
394 eIdxGlobal[i] = problem_.variables().index(elem);
395 cellDataTemp[i] = problem_.variables().cellData(eIdxGlobal[i]);
396 }
397
398 int size = localMpfaElemIdx.size();
399
400 // if (size > 1)
401 // std::cout<<"size = "<<size<<"\n";
402
403 for (int i = 0; i < size; i++)
404 {
405 int mpfaFaceIdx = IndexTranslator::getFaceIndexFromElements(localMpfaElemIdx[i].first, localMpfaElemIdx[i].second);
406
407 if (!interactionVolume.isHangingNodeVolume())
408 {
409 velocity_.calculateInnerInteractionVolumeVelocity(interactionVolume,
410 cellDataTemp[0], cellDataTemp[1], cellDataTemp[2], cellDataTemp[3],
411 cellDataTemp[4], cellDataTemp[5], cellDataTemp[6], cellDataTemp[7],
412 this->interactionVolumes_, this->transmissibilityCalculator_, mpfaFaceIdx);
413 }
414 else
415 {
416 velocity_.calculateHangingNodeInteractionVolumeVelocity(interactionVolume,
417 cellDataTemp[0], cellDataTemp[1], cellDataTemp[2], cellDataTemp[3],
418 cellDataTemp[4], cellDataTemp[5], cellDataTemp[6], cellDataTemp[7], mpfaFaceIdx);
419 }
420
421 if (levelI >= levelJ)
422 {
423 cellData.fluxData().setVelocity(wPhaseIdx, indexInInside,
424 cellDataTemp[localMpfaElemIdx[i].first].fluxData().velocity(wPhaseIdx, indexInInside));
425 cellData.fluxData().setVelocity(nPhaseIdx, indexInInside,
426 cellDataTemp[localMpfaElemIdx[i].first].fluxData().velocity(nPhaseIdx, indexInInside));
427 cellData.fluxData().setUpwindPotential(wPhaseIdx, indexInInside,
428 cellDataTemp[localMpfaElemIdx[i].first].fluxData().upwindPotential(wPhaseIdx, indexInInside));
429 cellData.fluxData().setUpwindPotential(nPhaseIdx, indexInInside,
430 cellDataTemp[localMpfaElemIdx[i].first].fluxData().upwindPotential(nPhaseIdx, indexInInside));
431 }
432 if (levelJ >= levelI)
433 {
434 cellDataJ.fluxData().setVelocity(wPhaseIdx, indexInOutside,
435 cellDataTemp[localMpfaElemIdx[i].second].fluxData().velocity(wPhaseIdx, indexInOutside));
436 cellDataJ.fluxData().setVelocity(nPhaseIdx, indexInOutside,
437 cellDataTemp[localMpfaElemIdx[i].second].fluxData().velocity(nPhaseIdx, indexInOutside));
438 cellDataJ.fluxData().setUpwindPotential(wPhaseIdx, indexInOutside,
439 cellDataTemp[localMpfaElemIdx[i].second].fluxData().upwindPotential(wPhaseIdx, indexInOutside));
440 cellDataJ.fluxData().setUpwindPotential(nPhaseIdx, indexInOutside,
441 cellDataTemp[localMpfaElemIdx[i].second].fluxData().upwindPotential(nPhaseIdx, indexInOutside));
442 }
443
444 if (size > 1)
445 {
446 for (int j = 0; j < 8; j++)
447 {
448 cellDataTemp[j] = problem_.variables().cellData(eIdxGlobal[j]);
449 }
450 }
451 }
452 }
453 }
454
455 if (levelI == levelJ)
456 {
457 cellData.fluxData().setVelocityMarker(indexInInside);
458 cellDataJ.fluxData().setVelocityMarker(indexInOutside);
459 }
460 else if (levelI > levelJ)
461 {
462 cellDataJ.fluxData().setVelocity(wPhaseIdx, indexInOutside, cellData.fluxData().velocity(wPhaseIdx, indexInInside));
463 cellDataJ.fluxData().setVelocity(nPhaseIdx, indexInOutside, cellData.fluxData().velocity(nPhaseIdx, indexInInside));
464 cellDataJ.fluxData().setUpwindPotential(wPhaseIdx, indexInOutside, -1*cellData.fluxData().upwindPotential(wPhaseIdx, indexInInside));
465 cellDataJ.fluxData().setUpwindPotential(nPhaseIdx, indexInOutside, -1*cellData.fluxData().upwindPotential(nPhaseIdx, indexInInside));
466 }
467 else if (levelJ > levelI)
468 {
469 cellData.fluxData().setVelocity(wPhaseIdx, indexInInside, cellDataJ.fluxData().velocity(wPhaseIdx, indexInOutside));
470 cellData.fluxData().setVelocity(nPhaseIdx, indexInInside, cellDataJ.fluxData().velocity(nPhaseIdx, indexInOutside));
471 cellData.fluxData().setUpwindPotential(wPhaseIdx, indexInInside, -1*cellDataJ.fluxData().upwindPotential(wPhaseIdx, indexInOutside));
472 cellData.fluxData().setUpwindPotential(nPhaseIdx, indexInInside, -1*cellDataJ.fluxData().upwindPotential(nPhaseIdx, indexInOutside));
473 }
474}
475
484template<class TypeTag>
485void FvMpfaL3dPressureVelocity2pAdaptive<TypeTag>::calculateVelocityOnBoundary(const Intersection& intersection, CellData& cellData)
486{
487 auto element = intersection.inside();
488
489 //get face index
490 int isIndex = intersection.indexInInside();
491
492 //get face normal
493 const Dune::FieldVector<Scalar, dim>& unitOuterNormal = intersection.centerUnitOuterNormal();
494
495 BoundaryTypes bcType;
496 //get boundary type
497 problem_.boundaryTypes(bcType, intersection);
498 PrimaryVariables boundValues(0.0);
499
500 if (bcType.isDirichlet(pressEqIdx))
501 {
502 problem_.dirichlet(boundValues, intersection);
503
504 // get global coordinates of cell centers
505 const GlobalPosition& globalPosI = element.geometry().center();
506
507 // center of face in global coordinates
508 const GlobalPosition& globalPosJ = intersection.geometry().center();
509
510 // get mobilities and fractional flow factors
511 Scalar lambdaWI = cellData.mobility(wPhaseIdx);
512 Scalar lambdaNwI = cellData.mobility(nPhaseIdx);
513
514 // get capillary pressure
515 Scalar pcI = cellData.capillaryPressure();
516
517 // distance vector between barycenters
518 GlobalPosition distVec = globalPosJ - globalPosI;
519
520 // compute distance between cell centers
521 Scalar dist = distVec.two_norm();
522
523 //permeability vector at boundary
524 // compute vectorized permeabilities
525 DimMatrix meanPermeability(0);
526
527 problem_.spatialParams().meanK(meanPermeability, problem_.spatialParams().intrinsicPermeability(element));
528
529 Dune::FieldVector<Scalar, dim> permeability(0);
530 meanPermeability.mv(unitOuterNormal, permeability);
531
532 //determine saturation at the boundary -> if no saturation is known directly at the boundary use the cell saturation
533 Scalar satW = 0;
534 if (bcType.isDirichlet(satEqIdx))
535 {
536 switch (saturationType_)
537 {
538 case sw:
539 {
540 satW = boundValues[saturationIdx];
541 break;
542 }
543 case sn:
544 {
545 satW = 1 - boundValues[saturationIdx];
546 break;
547 }
548 }
549 }
550 else
551 {
552 satW = cellData.saturation(wPhaseIdx);
553 }
554
555 const Scalar pressBound = boundValues[pressureIdx];
556
557 const auto fluidMatrixInteraction = problem_.spatialParams().fluidMatrixInteractionAtPos(element.geometry().center());
558 const Scalar pcBound = fluidMatrixInteraction.pc(satW);
559
560 //determine phase pressures from primary pressure variable
561 Scalar pressWBound = 0;
562 Scalar pressNwBound = 0;
563 if (pressureType_ == pw)
564 {
565 pressWBound = pressBound;
566 pressNwBound = pressBound + pcBound;
567 }
568 else if (pressureType_ == pn)
569 {
570 pressWBound = pressBound - pcBound;
571 pressNwBound = pressBound;
572 }
573
574 const Scalar lambdaWBound = fluidMatrixInteraction.krw(satW) / viscosity_[wPhaseIdx];
575 const Scalar lambdaNwBound = fluidMatrixInteraction.krn(satW) / viscosity_[nPhaseIdx];
576
577 Scalar potentialDiffW = cellData.fluxData().upwindPotential(wPhaseIdx, isIndex);
578 Scalar potentialDiffNw = cellData.fluxData().upwindPotential(nPhaseIdx, isIndex);
579
580 //calculate potential gradient
581 potentialDiffW = (cellData.pressure(wPhaseIdx) - pressWBound);
582 potentialDiffNw = (cellData.pressure(nPhaseIdx) - pressNwBound);
583
584 potentialDiffW += density_[wPhaseIdx] * (distVec * problem_.gravity());
585 potentialDiffNw += density_[nPhaseIdx] * (distVec * problem_.gravity());
586
587 //store potential gradients for further calculations
588 cellData.fluxData().setUpwindPotential(wPhaseIdx, isIndex, potentialDiffW);
589 cellData.fluxData().setUpwindPotential(nPhaseIdx, isIndex, potentialDiffNw);
590
591 //do the upwinding of the mobility depending on the phase potentials
592 Scalar lambdaW = (potentialDiffW > 0.) ? lambdaWI : lambdaWBound;
593 lambdaW = (Dune::FloatCmp::eq<Scalar, Dune::FloatCmp::absolute>(potentialDiffW, 0.0, 1.0e-30)) ? 0.5 * (lambdaWI + lambdaWBound) : lambdaW;
594 Scalar lambdaNw = (potentialDiffNw > 0.) ? lambdaNwI : lambdaNwBound;
595 lambdaNw = (Dune::FloatCmp::eq<Scalar, Dune::FloatCmp::absolute>(potentialDiffNw, 0.0, 1.0e-30)) ? 0.5 * (lambdaNwI + lambdaNwBound) : lambdaNw;
596
597
598 Scalar scalarPerm = permeability.two_norm();
599
600 //calculate the gravity term
601 Dune::FieldVector<Scalar, dimWorld> velocityW(unitOuterNormal);
602 Dune::FieldVector<Scalar, dimWorld> velocityNw(unitOuterNormal);
603
604 //calculate unit distVec
605 distVec /= dist;
606 Scalar areaScaling = (unitOuterNormal * distVec);
607 //this treatment of g allows to account for gravity flux through faces where the face normal has no z component (e.g. parallelepiped grids)
608 Scalar gravityTermW = (problem_.gravity() * distVec) * density_[wPhaseIdx] * areaScaling;
609 Scalar gravityTermNw = (problem_.gravity() * distVec) * density_[nPhaseIdx] * areaScaling;
610
611 //calculate velocity depending on the pressure used -> use pc = pn - pw
612 switch (pressureType_)
613 {
614 case pw:
615 {
616 velocityW *= lambdaW * scalarPerm * ((cellData.pressure(wPhaseIdx) - pressBound) / dist + gravityTermW);
617 velocityNw *= lambdaNw * scalarPerm * ((cellData.pressure(wPhaseIdx) - pressBound) / dist + gravityTermNw)
618 + 0.5 * (lambdaNwI + lambdaNwBound) * scalarPerm * (pcI - pcBound) / dist;
619 break;
620 }
621 case pn:
622 {
623 velocityW *= lambdaW * scalarPerm * ((cellData.pressure(nPhaseIdx) - pressBound) / dist + gravityTermW)
624 - 0.5 * (lambdaWI + lambdaWBound) * scalarPerm * (pcI - pcBound) / dist;
625 velocityNw *= lambdaNw * scalarPerm * ((cellData.pressure(nPhaseIdx) - pressBound) / dist + gravityTermNw);
626 break;
627 }
628 }
629
630 //store velocities
631 cellData.fluxData().setVelocity(wPhaseIdx, isIndex, velocityW);
632 cellData.fluxData().setVelocity(nPhaseIdx, isIndex, velocityNw);
633 cellData.fluxData().setVelocityMarker(isIndex);
634
635 } //end dirichlet boundary
636
637 else if (bcType.isNeumann(pressEqIdx))
638 {
639 problem_.neumann(boundValues, intersection);
640
641 Dune::FieldVector<Scalar, dimWorld> velocityW(unitOuterNormal);
642 Dune::FieldVector<Scalar, dimWorld> velocityNw(unitOuterNormal);
643
644 velocityW *= boundValues[wPhaseIdx];
645 velocityNw *= boundValues[nPhaseIdx];
646
647 velocityW /= density_[wPhaseIdx];
648 velocityNw /= density_[nPhaseIdx];
649
650 //store potential gradients for further calculations
651 cellData.fluxData().setUpwindPotential(wPhaseIdx, isIndex, boundValues[wPhaseIdx]);
652 cellData.fluxData().setUpwindPotential(nPhaseIdx, isIndex, boundValues[nPhaseIdx]);
653
654 cellData.fluxData().setVelocity(wPhaseIdx, isIndex, velocityW);
655 cellData.fluxData().setVelocity(nPhaseIdx, isIndex, velocityNw);
656 cellData.fluxData().setVelocityMarker(isIndex);
657 } //end neumann boundary
658 else
659 {
660 DUNE_THROW(Dune::NotImplemented, "No valid boundary condition type defined for pressure equation!");
661 }
662}
663
664} // end namespace Dumux
665#endif
3-d velocity calculation on adaptive grids using a 3-d MPFA L-method.
3-d finite Volume-MPFAL implementation of a two-phase pressure equation on h-adaptive grids
Definition: adapt.hh:29
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type GetProp
get the type of a property
Definition: propertysystem.hh:141
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:150
std::string viscosity(int phaseIdx) noexcept
I/O name of viscosity for multiphase systems.
Definition: name.hh:74
std::string permeability() noexcept
I/O name of permeability.
Definition: name.hh:143
std::string density(int phaseIdx) noexcept
I/O name of density for multiphase systems.
Definition: name.hh:65
GetPropType< TypeTag, Properties::MPFAInteractionVolume > InteractionVolume
Type for storing interaction volume information.
Definition: 3dpressure.hh:154
void storePressureSolution()
Globally stores the pressure solution.
Definition: 3dpressure.hh:205
void addOutputVtkFields(MultiWriter &writer)
Adds pressure output to the output file.
Definition: 3dpressure.hh:384
void updateMaterialLaws()
constitutive functions are initialized and stored in the variables object
Definition: 3dpressure.hh:2478
3-d finite volume MPFA L-method discretization of a two-phase flow pressure equation of the sequentia...
Definition: 3dpressureadaptive.hh:78
void update()
updates the pressure field (analog to update function in IMPET)
Definition: 3dpressureadaptive.hh:194
Class for the calculation of 3d velocities from the pressure solution of an IMPES scheme using a grid...
Definition: 3dpressurevelocityadaptive.hh:46
void calculateVelocity()
Calculates the velocities at a cell-cell interfaces for the entire simulation grid.
Definition: 3dpressurevelocityadaptive.hh:215
FvMpfaL3dPressureVelocity2pAdaptive(Problem &problem)
Constructs a FvMpfaL3dPressureVelocity2pAdaptive object.
Definition: 3dpressurevelocityadaptive.hh:98
void updateVelocity()
Function for updating the velocity field if iterations are necessary in the transport solution.
Definition: 3dpressurevelocityadaptive.hh:116
void calculateVelocityOnBoundary(const Intersection &intersection, CellData &cellData)
Calculates the velocity at a boundary.
Definition: 3dpressurevelocityadaptive.hh:485
bool calculateVelocityInTransport()
Indicates if velocity is reconstructed in the pressure step or in the transport step.
Definition: 3dpressurevelocityadaptive.hh:172
void initialize(bool solveTwice=true)
Initializes pressure and velocity.
Definition: 3dpressurevelocityadaptive.hh:131
void addOutputVtkFields(MultiWriter &writer)
Adds velocity output to the output file.
Definition: 3dpressurevelocityadaptive.hh:188
void update()
Pressure and velocity update.
Definition: 3dpressurevelocityadaptive.hh:159
Class for calculating 3-d velocities from cell-wise constant pressure values.
Definition: 3dvelocityadaptive.hh:54
The finite volume base class for the solution of a pressure equation.
Definition: sequential/cellcentered/pressure.hh:49
void initialize()
Initialize pressure model.
Definition: sequential/cellcentered/pressure.hh:213