3.3.0
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
multidomain/facet/cellcentered/tpfa/darcyslaw.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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program 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 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
24#ifndef DUMUX_DISCRETIZATION_CC_TPFA_FACET_COUPLING_DARCYS_LAW_HH
25#define DUMUX_DISCRETIZATION_CC_TPFA_FACET_COUPLING_DARCYS_LAW_HH
26
27#include <array>
28#include <cmath>
29
30#include <dune/common/float_cmp.hh>
31
32#include <dumux/common/math.hh>
35
40
41namespace Dumux {
42
44template<class ScalarType, class GridGeometry, bool isNetwork>
46
53template<class AdvectionType, class GridGeometry, bool isNetwork>
55
62template<class ScalarType, class GridGeometry>
64 CCTpfaFacetCouplingDarcysLawImpl< ScalarType, GridGeometry, ( int(GridGeometry::GridView::dimension) <
65 int(GridGeometry::GridView::dimensionworld) ) >;
66
71template<class AdvectionType, class GridGeometry>
72class CCTpfaFacetCouplingDarcysLawCache<AdvectionType, GridGeometry, /*isNetwork*/false>
73{
74 using Scalar = typename AdvectionType::Scalar;
75 using FVElementGeometry = typename GridGeometry::LocalView;
76 using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace;
77 using Element = typename GridGeometry::GridView::template Codim<0>::Entity;
78
79public:
82
86 static constexpr int insideTijIdx = 0;
87 static constexpr int outsideTijIdx = 1;
88 static constexpr int facetTijIdx = 2;
89
91 using AdvectionTransmissibilityContainer = std::array<Scalar, 3>;
92
94 using GravityCoefficients = std::array<Scalar, 2>;
95
97 template< class Problem, class ElementVolumeVariables >
98 void updateAdvection(const Problem& problem,
99 const Element& element,
100 const FVElementGeometry& fvGeometry,
101 const ElementVolumeVariables& elemVolVars,
102 const SubControlVolumeFace &scvf)
103 {
104 tij_ = AdvectionType::calculateTransmissibility(problem, element, fvGeometry, elemVolVars, scvf, g_);
105 }
106
111 Scalar advectionTij() const
112 { return tij_[insideTijIdx]; }
113
115 Scalar advectionTijInside() const
116 { return tij_[insideTijIdx]; }
117
119 Scalar advectionTijOutside() const
120 { return tij_[outsideTijIdx]; }
121
123 Scalar advectionTijFacet() const
124 { return tij_[facetTijIdx]; }
125
128 { return g_; }
129
130private:
131 std::array<Scalar, 3> tij_;
132 GravityCoefficients g_;
133};
134
139template<class ScalarType, class GridGeometry>
140class CCTpfaFacetCouplingDarcysLawImpl<ScalarType, GridGeometry, /*isNetwork*/false>
141{
144
145 using FVElementGeometry = typename GridGeometry::LocalView;
146 using SubControlVolume = typename GridGeometry::SubControlVolume;
147 using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace;
148 using Extrusion = Extrusion_t<GridGeometry>;
149
150 using GridView = typename GridGeometry::GridView;
151 using Element = typename GridView::template Codim<0>::Entity;
152 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
153
154 public:
156 using Scalar = ScalarType;
160 using Cache = CCTpfaFacetCouplingDarcysLawCache<ThisType, GridGeometry, /*isNetwork*/false>;
162 using TijContainer = typename Cache::AdvectionTransmissibilityContainer;
163
164
166 template< class Problem, class ElementVolumeVariables, class ElementFluxVarsCache >
167 static Scalar flux(const Problem& problem,
168 const Element& element,
169 const FVElementGeometry& fvGeometry,
170 const ElementVolumeVariables& elemVolVars,
171 const SubControlVolumeFace& scvf,
172 int phaseIdx,
173 const ElementFluxVarsCache& elemFluxVarsCache)
174 {
175 if (!problem.couplingManager().isOnInteriorBoundary(element, scvf))
176 return TpfaDarcysLaw::flux(problem, element, fvGeometry, elemVolVars, scvf, phaseIdx, elemFluxVarsCache);
177
178 // Obtain inside and fracture pressures
179 const auto& insideVolVars = elemVolVars[scvf.insideScvIdx()];
180 const auto& facetVolVars = problem.couplingManager().getLowDimVolVars(element, scvf);
181 const auto pInside = insideVolVars.pressure(phaseIdx);
182 const auto pFacet = facetVolVars.pressure(phaseIdx);
183
184 // compute and return flux
185 const auto& fluxVarsCache = elemFluxVarsCache[scvf];
186 Scalar flux = fluxVarsCache.advectionTijInside()*pInside + fluxVarsCache.advectionTijFacet()*pFacet;
187
188 // maybe add gravitational acceleration
189 static const Scalar gravity = getParamFromGroup<bool>(problem.paramGroup(), "Problem.EnableGravity");
190 if (gravity)
191 {
192 // compute alpha := n^T*K*g and add to flux (use arithmetic mean for density)
193 const auto& g = problem.spatialParams().gravity(scvf.ipGlobal());
194 const auto rho = 0.5*(insideVolVars.density(phaseIdx) + facetVolVars.density(phaseIdx));
195 const auto rhoTimesArea = rho*Extrusion::area(scvf);
196 const auto alpha_inside = rhoTimesArea*insideVolVars.extrusionFactor()
197 *vtmv(scvf.unitOuterNormal(), insideVolVars.permeability(), g);
198
199 flux += alpha_inside;
200 if (!scvf.boundary())
201 {
202 const auto& outsideVolVars = elemVolVars[scvf.outsideScvIdx()];
203
204 // add further gravitational contributions
205 if ( problem.interiorBoundaryTypes(element, scvf).hasOnlyNeumann() )
206 {
207 static const Scalar xi = getParamFromGroup<Scalar>(problem.paramGroup(), "FacetCoupling.Xi", 1.0);
208 const auto alpha_facet = rhoTimesArea*insideVolVars.extrusionFactor()
209 *vtmv(scvf.unitOuterNormal(), facetVolVars.permeability(), g);
210 const auto alpha_outside = rhoTimesArea*outsideVolVars.extrusionFactor()
211 *vtmv(scvf.unitOuterNormal(), outsideVolVars.permeability(), g);
212
213 flux -= fluxVarsCache.gravityCoefficients()[0]*(xi*alpha_inside - alpha_facet + (1.0 - xi)*alpha_outside);
214 flux += fluxVarsCache.gravityCoefficients()[1]*(xi*alpha_outside - alpha_facet + (1.0 - xi)*alpha_inside);
215 }
216
217 // add outside contribution
218 flux += fluxVarsCache.advectionTijOutside()*outsideVolVars.pressure(phaseIdx);
219 }
220
221 return flux;
222 }
223 else
224 return scvf.boundary() ? flux
225 : flux + fluxVarsCache.advectionTijOutside()*elemVolVars[scvf.outsideScvIdx()].pressure(phaseIdx);
226 }
227
228 // The flux variables cache has to be bound to an element prior to flux calculations
229 // During the binding, the transmissibility will be computed and stored using the method below.
230 template< class Problem, class ElementVolumeVariables >
231 static TijContainer calculateTransmissibility(const Problem& problem,
232 const Element& element,
233 const FVElementGeometry& fvGeometry,
234 const ElementVolumeVariables& elemVolVars,
235 const SubControlVolumeFace& scvf)
236 {
237 typename Cache::GravityCoefficients g;
238 return calculateTransmissibility(problem, element, fvGeometry, elemVolVars, scvf, g);
239 }
240
241 // This overload additionally receives a container in which the coefficients required
242 // for the computation of the gravitational acceleration ar the scvf are stored
243 template< class Problem, class ElementVolumeVariables >
244 static TijContainer calculateTransmissibility(const Problem& problem,
245 const Element& element,
246 const FVElementGeometry& fvGeometry,
247 const ElementVolumeVariables& elemVolVars,
248 const SubControlVolumeFace& scvf,
249 typename Cache::GravityCoefficients& g)
250 {
251 TijContainer tij;
252 if (!problem.couplingManager().isCoupled(element, scvf))
253 {
255 tij[Cache::insideTijIdx] = TpfaDarcysLaw::calculateTransmissibility(problem, element, fvGeometry, elemVolVars, scvf);
256 return tij;
257 }
258
260 static const Scalar xi = getParamFromGroup<Scalar>(problem.paramGroup(), "FacetCoupling.Xi", 1.0);
261
262 const auto insideScvIdx = scvf.insideScvIdx();
263 const auto& insideScv = fvGeometry.scv(insideScvIdx);
264 const auto& insideVolVars = elemVolVars[insideScvIdx];
265 const auto wIn = Extrusion::area(scvf)
266 *computeTpfaTransmissibility(scvf, insideScv,
267 insideVolVars.permeability(),
268 insideVolVars.extrusionFactor());
269
270 // proceed depending on the interior BC types used
271 const auto iBcTypes = problem.interiorBoundaryTypes(element, scvf);
272
273 // neumann-coupling
274 if (iBcTypes.hasOnlyNeumann())
275 {
276 const auto& facetVolVars = problem.couplingManager().getLowDimVolVars(element, scvf);
277 const auto wFacet = 2.0*Extrusion::area(scvf)*insideVolVars.extrusionFactor()
278 /facetVolVars.extrusionFactor()
279 *vtmv(scvf.unitOuterNormal(), facetVolVars.permeability(), scvf.unitOuterNormal());
280
281 // The fluxes across this face and the outside face can be expressed in matrix form:
282 // \f$\mathbf{C} \bar{\mathbf{u}} + \mathbf{D} \mathbf{u} + \mathbf{E} \mathbf{u}_\gamma\f$,
283 // where \f$\gamma$\f denotes the domain living on the facets and \f$\bar{\mathbf{u}}$\f are
284 // intermediate face unknowns in the matrix domain. Equivalently, flux continuity reads:
285 // \f$\mathbf{A} \bar{\mathbf{u}} = \mathbf{B} \mathbf{u} + \mathbf{M} \mathbf{u}_\gamma\f$.
286 // Combining the two, we can eliminate the intermediate unknowns and compute the transmissibilities
287 // that allow the description of the fluxes as functions of the cell and Dirichlet pressures only.
288 if (!scvf.boundary())
289 {
290 const auto outsideScvIdx = scvf.outsideScvIdx();
291 const auto& outsideVolVars = elemVolVars[outsideScvIdx];
292 const auto wOut = -1.0*Extrusion::area(scvf)
293 *computeTpfaTransmissibility(scvf, fvGeometry.scv(outsideScvIdx),
294 outsideVolVars.permeability(),
295 outsideVolVars.extrusionFactor());
296
297 if ( !Dune::FloatCmp::eq(xi, 1.0, 1e-6) )
298 {
299 // The gravity coefficients are the first row of the inverse of the A matrix in the local eq system
300 // multiplied with wIn. Note that we never compute the inverse but use an optimized implementation below.
301 // The A matrix has the following coefficients:
302 // A = | xi*wIn + wFacet, (xi - 1.0)*wOut | -> AInv = 1/detA | xi*wOut + wFacet, -(xi - 1.0)*wOut |
303 // | wIn*(xi - 1.0) , xi*wOut + wFacet | | -wIn*(xi - 1.0) , xi*wIn + wFacet |
304 const Scalar xiMinusOne = (xi - 1.0);
305 const Scalar a01 = xiMinusOne*wOut;
306 const Scalar a11 = xi*wOut + wFacet;
307 const Scalar detA = (xi*wIn + wFacet)*a11 - xiMinusOne*wIn*a01;
308 g[0] = wIn*a11/detA; g[1] = -wIn*a01/detA;
309
310 // optimized implementation: factorization obtained using sympy
311 const Scalar factor = wIn * wFacet / ( wIn * wOut * ( 2.0 * xi - 1.0 ) + wFacet * ( xi * ( wIn + wOut ) + wFacet ) );
312 tij[Cache::insideTijIdx] = factor * ( wOut * xi + wFacet );
313 tij[Cache::outsideTijIdx] = factor * ( wOut * ( 1.0 - xi ) );
314 tij[Cache::facetTijIdx] = factor * ( - wOut - wFacet );
315 }
316 else
317 {
318 g[0] = wIn/(wIn+wFacet); g[1] = 0.0;
319 tij[Cache::insideTijIdx] = wFacet*g[0];
320 tij[Cache::facetTijIdx] = -tij[Cache::insideTijIdx];
321 tij[Cache::outsideTijIdx] = 0.0;
322 }
323 }
324 else
325 {
326 // TODO: check for division by zero??
327 tij[Cache::insideTijIdx] = wFacet*wIn/(wIn+wFacet);
328 tij[Cache::facetTijIdx] = -tij[Cache::insideTijIdx];
329 tij[Cache::outsideTijIdx] = 0.0;
330 }
331 }
332 else if (iBcTypes.hasOnlyDirichlet())
333 {
334 tij[Cache::insideTijIdx] = wIn;
335 tij[Cache::outsideTijIdx] = 0.0;
336 tij[Cache::facetTijIdx] = -wIn;
337 }
338 else
339 DUNE_THROW(Dune::NotImplemented, "Interior boundary types other than pure Dirichlet or Neumann");
340
341 return tij;
342 }
343};
344
349template<class AdvectionType, class GridGeometry>
350class CCTpfaFacetCouplingDarcysLawCache<AdvectionType, GridGeometry, /*isNetwork*/true>
351{
352 using Scalar = typename AdvectionType::Scalar;
353 using FVElementGeometry = typename GridGeometry::LocalView;
354 using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace;
355 using Element = typename GridGeometry::GridView::template Codim<0>::Entity;
356
357public:
360
364 static constexpr int insideTijIdx = 0;
365 static constexpr int facetTijIdx = 1;
366
368 using AdvectionTransmissibilityContainer = std::array<Scalar, 2>;
369
371 using GravityCoefficients = std::array<Scalar, 1>;
372
374 template< class Problem, class ElementVolumeVariables >
375 void updateAdvection(const Problem& problem,
376 const Element& element,
377 const FVElementGeometry& fvGeometry,
378 const ElementVolumeVariables& elemVolVars,
379 const SubControlVolumeFace &scvf)
380 {
381 tij_ = AdvectionType::calculateTransmissibility(problem, element, fvGeometry, elemVolVars, scvf, g_);
382 }
383
388 Scalar advectionTij() const
389 { return tij_[insideTijIdx]; }
390
392 Scalar advectionTijInside() const
393 { return tij_[insideTijIdx]; }
394
396 Scalar advectionTijFacet() const
397 { return tij_[facetTijIdx]; }
398
401 { return g_; }
402
403private:
404 AdvectionTransmissibilityContainer tij_;
405 GravityCoefficients g_;
406};
407
412template<class ScalarType, class GridGeometry>
413class CCTpfaFacetCouplingDarcysLawImpl<ScalarType, GridGeometry, /*isNetwork*/true>
414{
417
418 using FVElementGeometry = typename GridGeometry::LocalView;
419 using SubControlVolume = typename GridGeometry::SubControlVolume;
420 using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace;
421 using Extrusion = Extrusion_t<GridGeometry>;
422
423 using GridView = typename GridGeometry::GridView;
424 using Element = typename GridView::template Codim<0>::Entity;
425 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
426
427 public:
429 using Scalar = ScalarType;
433 using Cache = CCTpfaFacetCouplingDarcysLawCache<ThisType, GridGeometry, /*isNetwork*/true>;
435 using TijContainer = typename Cache::AdvectionTransmissibilityContainer;
436
438 template< class Problem, class ElementVolumeVariables, class ElementFluxVarsCache >
439 static Scalar flux(const Problem& problem,
440 const Element& element,
441 const FVElementGeometry& fvGeometry,
442 const ElementVolumeVariables& elemVolVars,
443 const SubControlVolumeFace& scvf,
444 int phaseIdx,
445 const ElementFluxVarsCache& elemFluxVarsCache)
446 {
447 if (!problem.couplingManager().isOnInteriorBoundary(element, scvf))
448 return TpfaDarcysLaw::flux(problem, element, fvGeometry, elemVolVars, scvf, phaseIdx, elemFluxVarsCache);
449
450 // On surface grids only xi = 1.0 can be used, as the coupling condition
451 // for xi != 1.0 does not generalize for surface grids where there can be
452 // seveal neighbor meeting at a branching point.
453 static const Scalar xi = getParamFromGroup<Scalar>(problem.paramGroup(), "FacetCoupling.Xi", 1.0);
454 if (Dune::FloatCmp::ne(xi, 1.0, 1e-6))
455 DUNE_THROW(Dune::InvalidStateException, "Xi != 1.0 cannot be used on surface grids");
456
457 // Obtain inside and fracture pressures
458 const auto& insideVolVars = elemVolVars[scvf.insideScvIdx()];
459 const auto& facetVolVars = problem.couplingManager().getLowDimVolVars(element, scvf);
460 const auto pInside = insideVolVars.pressure(phaseIdx);
461 const auto pFacet = facetVolVars.pressure(phaseIdx);
462
463 // compute and return flux
464 const auto& fluxVarsCache = elemFluxVarsCache[scvf];
465 Scalar flux = fluxVarsCache.advectionTijInside()*pInside + fluxVarsCache.advectionTijFacet()*pFacet;
466
467 static const Scalar gravity = getParamFromGroup<bool>(problem.paramGroup(), "Problem.EnableGravity");
468 if (gravity)
469 {
470 // compute alpha := n^T*K*g and add to flux (use arithmetic mean for density)
471 const auto& g = problem.spatialParams().gravity(scvf.ipGlobal());
472 const auto rho = 0.5*(insideVolVars.density(phaseIdx) + facetVolVars.density(phaseIdx));
473 const auto rhoTimesArea = rho*Extrusion::area(scvf);
474 const auto alpha_inside = rhoTimesArea*insideVolVars.extrusionFactor()
475 *vtmv(scvf.unitOuterNormal(), insideVolVars.permeability(), g);
476
477 flux += alpha_inside;
478
479 // maybe add further gravitational contributions
480 if ( !scvf.boundary() && problem.interiorBoundaryTypes(element, scvf).hasOnlyNeumann() )
481 {
482 const auto alpha_facet = rhoTimesArea*insideVolVars.extrusionFactor()
483 *vtmv(scvf.unitOuterNormal(), facetVolVars.permeability(), g);
484
485 flux -= fluxVarsCache.gravityCoefficients()[0]*(alpha_inside - alpha_facet);
486 }
487 }
488
489 return flux;
490 }
491
492 // The flux variables cache has to be bound to an element prior to flux calculations
493 // During the binding, the transmissibility will be computed and stored using the method below.
494 template< class Problem, class ElementVolumeVariables >
495 static TijContainer calculateTransmissibility(const Problem& problem,
496 const Element& element,
497 const FVElementGeometry& fvGeometry,
498 const ElementVolumeVariables& elemVolVars,
499 const SubControlVolumeFace& scvf)
500 {
501 typename Cache::GravityCoefficients g;
502 return calculateTransmissibility(problem, element, fvGeometry, elemVolVars, scvf, g);
503 }
504
505 // This overload additionally receives a container in which the coefficients required
506 // for the computation of the gravitational acceleration ar the scvf are stored
507 template< class Problem, class ElementVolumeVariables >
508 static TijContainer calculateTransmissibility(const Problem& problem,
509 const Element& element,
510 const FVElementGeometry& fvGeometry,
511 const ElementVolumeVariables& elemVolVars,
512 const SubControlVolumeFace& scvf,
513 typename Cache::GravityCoefficients& g)
514 {
515 TijContainer tij;
516 if (!problem.couplingManager().isCoupled(element, scvf))
517 {
519 tij[Cache::insideTijIdx] = TpfaDarcysLaw::calculateTransmissibility(problem, element, fvGeometry, elemVolVars, scvf);
520 return tij;
521 }
522
524 static const Scalar xi = getParamFromGroup<Scalar>(problem.paramGroup(), "FacetCoupling.Xi", 1.0);
525
526 // On surface grids only xi = 1.0 can be used, as the coupling condition
527 // for xi != 1.0 does not generalize for surface grids where the normal
528 // vectors of the inside/outside elements have different orientations.
529 if (Dune::FloatCmp::ne(xi, 1.0, 1e-6))
530 DUNE_THROW(Dune::InvalidStateException, "Xi != 1.0 cannot be used on surface grids");
531
532 const auto area = Extrusion::area(scvf);
533 const auto insideScvIdx = scvf.insideScvIdx();
534 const auto& insideScv = fvGeometry.scv(insideScvIdx);
535 const auto& insideVolVars = elemVolVars[insideScvIdx];
536 const auto wIn = area*computeTpfaTransmissibility(scvf, insideScv, insideVolVars.permeability(), insideVolVars.extrusionFactor());
537
538 // proceed depending on the interior BC types used
539 const auto iBcTypes = problem.interiorBoundaryTypes(element, scvf);
540
541 // neumann-coupling
542 if (iBcTypes.hasOnlyNeumann())
543 {
544 const auto& facetVolVars = problem.couplingManager().getLowDimVolVars(element, scvf);
545
546 // Here we use the square root of the facet extrusion factor
547 // as an approximate average distance from scvf ip to facet center
548 using std::sqrt;
549 const auto wFacet = 2.0*area*insideVolVars.extrusionFactor()
550 /sqrt(facetVolVars.extrusionFactor())
551 *vtmv(scvf.unitOuterNormal(), facetVolVars.permeability(), scvf.unitOuterNormal());
552
553 // TODO: check for division by zero??
554 g[0] = wIn/(wIn+wFacet);
555 tij[Cache::insideTijIdx] = wFacet*g[0];
556 tij[Cache::facetTijIdx] = -tij[Cache::insideTijIdx];
557 }
558 else if (iBcTypes.hasOnlyDirichlet())
559 {
560 tij[Cache::insideTijIdx] = wIn;
561 tij[Cache::facetTijIdx] = -wIn;
562 }
563 else
564 DUNE_THROW(Dune::NotImplemented, "Interior boundary types other than pure Dirichlet or Neumann");
565
566 return tij;
567 }
568};
569
570} // end namespace Dumux
571
572#endif
Define some often used mathematical functions.
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
The available discretization methods in Dumux.
Helper classes to compute the integration elements.
DiscretizationMethod
The available discretization methods in Dumux.
Definition: method.hh:37
Tensor::field_type computeTpfaTransmissibility(const SubControlVolumeFace &scvf, const SubControlVolume &scv, const Tensor &T, typename SubControlVolume::Traits::Scalar extrusionFactor)
Free function to evaluate the Tpfa transmissibility associated with the flux (in the form of flux = T...
Definition: tpfa/computetransmissibility.hh:47
Dune::DenseMatrix< MAT >::value_type vtmv(const Dune::DenseVector< V1 > &v1, const Dune::DenseMatrix< MAT > &M, const Dune::DenseVector< V2 > &v2)
Evaluates the scalar product of a vector v2, projected by a matrix M, with a vector v1.
Definition: math.hh:849
Definition: adapt.hh:29
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition: extrusion.hh:177
Class that fills the cache corresponding to tpfa Darcy's Law.
Definition: flux/cctpfa/darcyslaw.hh:70
Specialization of the CCTpfaDarcysLaw grids where dim=dimWorld.
Definition: flux/cctpfa/darcyslaw.hh:130
Specialization of the CCTpfaDarcysLaw grids where dim < dimWorld (network/surface grids)
Definition: flux/cctpfa/darcyslaw.hh:294
Forward declaration of the implementation.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:45
The cache corresponding to tpfa Darcy's Law with facet coupling.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:54
const GravityCoefficients & gravityCoefficients() const
return the coefficients for the computation of gravity at the scvf
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:127
std::array< Scalar, 3 > AdvectionTransmissibilityContainer
Export transmissibility storage type.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:91
Scalar advectionTijInside() const
returns the transmissibility associated with the inside cell
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:115
std::array< Scalar, 2 > GravityCoefficients
Export the type used for the gravity coefficients.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:94
void updateAdvection(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf)
update subject to a given problem
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:98
Scalar advectionTijOutside() const
returns the transmissibility associated with the outside cell
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:119
Scalar advectionTijFacet() const
returns the transmissibility associated with the outside cell
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:123
Scalar advectionTij() const
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:111
Specialization of CCTpfaFacetCouplingDarcysLawImpl for dim=dimWorld.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:141
static Scalar flux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf, int phaseIdx, const ElementFluxVarsCache &elemFluxVarsCache)
Compute the advective flux.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:167
ScalarType Scalar
state the scalar type of the law
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:156
static TijContainer calculateTransmissibility(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf)
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:231
static TijContainer calculateTransmissibility(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf, typename Cache::GravityCoefficients &g)
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:244
typename Cache::AdvectionTransmissibilityContainer TijContainer
export the type used to store transmissibilities
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:162
std::array< Scalar, 1 > GravityCoefficients
Export the type used for the gravity coefficients.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:371
std::array< Scalar, 2 > AdvectionTransmissibilityContainer
Export transmissibility storage type.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:368
Scalar advectionTij() const
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:388
Scalar advectionTijInside() const
returns the transmissibility associated with the inside cell
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:392
void updateAdvection(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf)
update subject to a given problem
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:375
const GravityCoefficients & gravityCoefficients() const
return the coefficients for the computation of gravity at the scvf
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:400
Scalar advectionTijFacet() const
returns the transmissibility associated with the outside cell
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:396
Specialization of CCTpfaFacetCouplingDarcysLawImpl for dim<dimWorld.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:414
static TijContainer calculateTransmissibility(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf)
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:495
typename Cache::AdvectionTransmissibilityContainer TijContainer
export the type used to store transmissibilities
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:435
ScalarType Scalar
state the scalar type of the law
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:429
static Scalar flux(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf, int phaseIdx, const ElementFluxVarsCache &elemFluxVarsCache)
Compute the advective flux.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:439
static TijContainer calculateTransmissibility(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry, const ElementVolumeVariables &elemVolVars, const SubControlVolumeFace &scvf, typename Cache::GravityCoefficients &g)
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:508
Declares all properties used in Dumux.
Free functions to evaluate the transmissibilities associated with flux evaluations across sub-control...
Darcy's law for cell-centered finite volume schemes with two-point flux approximation.