version 3.10-dev
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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_DISCRETIZATION_CC_TPFA_FACET_COUPLING_DARCYS_LAW_HH
13#define DUMUX_DISCRETIZATION_CC_TPFA_FACET_COUPLING_DARCYS_LAW_HH
14
15#include <array>
16#include <cmath>
17
18#include <dune/common/float_cmp.hh>
19
20#include <dumux/common/math.hh>
23
28
29namespace Dumux {
30
32template<class ScalarType, class GridGeometry, bool isNetwork>
34
41template<class AdvectionType, class GridGeometry, bool isNetwork>
43
50template<class ScalarType, class GridGeometry>
52 CCTpfaFacetCouplingDarcysLawImpl< ScalarType, GridGeometry, ( int(GridGeometry::GridView::dimension) <
53 int(GridGeometry::GridView::dimensionworld) ) >;
54
59template<class AdvectionType, class GridGeometry>
60class CCTpfaFacetCouplingDarcysLawCache<AdvectionType, GridGeometry, /*isNetwork*/false>
61{
62 using Scalar = typename AdvectionType::Scalar;
63 using FVElementGeometry = typename GridGeometry::LocalView;
64 using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace;
65 using Element = typename GridGeometry::GridView::template Codim<0>::Entity;
66
67public:
70
74 static constexpr int insideTijIdx = 0;
75 static constexpr int outsideTijIdx = 1;
76 static constexpr int facetTijIdx = 2;
77
79 using AdvectionTransmissibilityContainer = std::array<Scalar, 3>;
80
82 using GravityCoefficients = std::array<Scalar, 2>;
83
85 template< class Problem, class ElementVolumeVariables >
86 void updateAdvection(const Problem& problem,
87 const Element& element,
88 const FVElementGeometry& fvGeometry,
89 const ElementVolumeVariables& elemVolVars,
90 const SubControlVolumeFace &scvf)
91 {
92 tij_ = AdvectionType::calculateTransmissibility(problem, element, fvGeometry, elemVolVars, scvf, g_);
93 }
94
99 Scalar advectionTij() const
100 { return tij_[insideTijIdx]; }
101
103 Scalar advectionTijInside() const
104 { return tij_[insideTijIdx]; }
105
107 Scalar advectionTijOutside() const
108 { return tij_[outsideTijIdx]; }
109
111 Scalar advectionTijFacet() const
112 { return tij_[facetTijIdx]; }
113
116 { return g_; }
117
118private:
119 std::array<Scalar, 3> tij_;
120 GravityCoefficients g_;
121};
122
127template<class ScalarType, class GridGeometry>
128class CCTpfaFacetCouplingDarcysLawImpl<ScalarType, GridGeometry, /*isNetwork*/false>
129{
132
133 using FVElementGeometry = typename GridGeometry::LocalView;
134 using SubControlVolume = typename GridGeometry::SubControlVolume;
135 using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace;
136 using Extrusion = Extrusion_t<GridGeometry>;
137
138 using GridView = typename GridGeometry::GridView;
139 using Element = typename GridView::template Codim<0>::Entity;
140 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
141
142 public:
144 using Scalar = ScalarType;
147 static constexpr DiscretizationMethod discMethod{};
149 using Cache = CCTpfaFacetCouplingDarcysLawCache<ThisType, GridGeometry, /*isNetwork*/false>;
151 using TijContainer = typename Cache::AdvectionTransmissibilityContainer;
152
153
155 template< class Problem, class ElementVolumeVariables, class ElementFluxVarsCache >
156 static Scalar flux(const Problem& problem,
157 const Element& element,
158 const FVElementGeometry& fvGeometry,
159 const ElementVolumeVariables& elemVolVars,
160 const SubControlVolumeFace& scvf,
161 int phaseIdx,
162 const ElementFluxVarsCache& elemFluxVarsCache)
163 {
164 if (!problem.couplingManager().isOnInteriorBoundary(element, scvf))
165 return TpfaDarcysLaw::flux(problem, element, fvGeometry, elemVolVars, scvf, phaseIdx, elemFluxVarsCache);
166
167 // Obtain inside and fracture pressures
168 const auto& insideVolVars = elemVolVars[scvf.insideScvIdx()];
169 const auto& facetVolVars = problem.couplingManager().getLowDimVolVars(element, scvf);
170 const auto pInside = insideVolVars.pressure(phaseIdx);
171 const auto pFacet = facetVolVars.pressure(phaseIdx);
172
173 // compute and return flux
174 const auto& fluxVarsCache = elemFluxVarsCache[scvf];
175 Scalar flux = fluxVarsCache.advectionTijInside()*pInside + fluxVarsCache.advectionTijFacet()*pFacet;
176
177 // maybe add gravitational acceleration
178 static const Scalar gravity = getParamFromGroup<bool>(problem.paramGroup(), "Problem.EnableGravity");
179 if (gravity)
180 {
181 // compute alpha := n^T*K*g and add to flux (use arithmetic mean for density)
182 const auto& g = problem.spatialParams().gravity(scvf.ipGlobal());
183 const auto rho = 0.5*(insideVolVars.density(phaseIdx) + facetVolVars.density(phaseIdx));
184 const auto rhoTimesArea = rho*Extrusion::area(fvGeometry, scvf);
185 const auto alpha_inside = rhoTimesArea*insideVolVars.extrusionFactor()
186 *vtmv(scvf.unitOuterNormal(), insideVolVars.permeability(), g);
187
188 flux += alpha_inside;
189 if (!scvf.boundary())
190 {
191 const auto& outsideVolVars = elemVolVars[scvf.outsideScvIdx()];
192
193 // add further gravitational contributions
194 if ( problem.interiorBoundaryTypes(element, scvf).hasOnlyNeumann() )
195 {
196 static const Scalar xi = getParamFromGroup<Scalar>(problem.paramGroup(), "FacetCoupling.Xi", 1.0);
197 const auto alpha_facet = rhoTimesArea*insideVolVars.extrusionFactor()
198 *vtmv(scvf.unitOuterNormal(), facetVolVars.permeability(), g);
199 const auto alpha_outside = rhoTimesArea*outsideVolVars.extrusionFactor()
200 *vtmv(scvf.unitOuterNormal(), outsideVolVars.permeability(), g);
201
202 flux -= fluxVarsCache.gravityCoefficients()[0]*(xi*alpha_inside - alpha_facet + (1.0 - xi)*alpha_outside);
203 flux += fluxVarsCache.gravityCoefficients()[1]*(xi*alpha_outside - alpha_facet + (1.0 - xi)*alpha_inside);
204 }
205
206 // add outside contribution
207 flux += fluxVarsCache.advectionTijOutside()*outsideVolVars.pressure(phaseIdx);
208 }
209
210 return flux;
211 }
212 else
213 return scvf.boundary() ? flux
214 : flux + fluxVarsCache.advectionTijOutside()*elemVolVars[scvf.outsideScvIdx()].pressure(phaseIdx);
215 }
216
217 // The flux variables cache has to be bound to an element prior to flux calculations
218 // During the binding, the transmissibility will be computed and stored using the method below.
219 template< class Problem, class ElementVolumeVariables >
220 static TijContainer calculateTransmissibility(const Problem& problem,
221 const Element& element,
222 const FVElementGeometry& fvGeometry,
223 const ElementVolumeVariables& elemVolVars,
224 const SubControlVolumeFace& scvf)
225 {
226 typename Cache::GravityCoefficients g;
227 return calculateTransmissibility(problem, element, fvGeometry, elemVolVars, scvf, g);
228 }
229
230 // This overload additionally receives a container in which the coefficients required
231 // for the computation of the gravitational acceleration ar the scvf are stored
232 template< class Problem, class ElementVolumeVariables >
233 static TijContainer calculateTransmissibility(const Problem& problem,
234 const Element& element,
235 const FVElementGeometry& fvGeometry,
236 const ElementVolumeVariables& elemVolVars,
237 const SubControlVolumeFace& scvf,
238 typename Cache::GravityCoefficients& g)
239 {
240 TijContainer tij;
241 if (!problem.couplingManager().isCoupled(element, scvf))
242 {
244 tij[Cache::insideTijIdx] = TpfaDarcysLaw::calculateTransmissibility(problem, element, fvGeometry, elemVolVars, scvf);
245 return tij;
246 }
247
249 static const Scalar xi = getParamFromGroup<Scalar>(problem.paramGroup(), "FacetCoupling.Xi", 1.0);
250
251 const auto insideScvIdx = scvf.insideScvIdx();
252 const auto& insideScv = fvGeometry.scv(insideScvIdx);
253 const auto& insideVolVars = elemVolVars[insideScvIdx];
254 const auto wIn = Extrusion::area(fvGeometry, scvf)
255 *computeTpfaTransmissibility(fvGeometry, scvf, insideScv,
256 insideVolVars.permeability(),
257 insideVolVars.extrusionFactor());
258
259 // proceed depending on the interior BC types used
260 const auto iBcTypes = problem.interiorBoundaryTypes(element, scvf);
261
262 // neumann-coupling
263 if (iBcTypes.hasOnlyNeumann())
264 {
265 const auto& facetVolVars = problem.couplingManager().getLowDimVolVars(element, scvf);
266 const auto wFacet = 2.0*Extrusion::area(fvGeometry, scvf)*insideVolVars.extrusionFactor()
267 /facetVolVars.extrusionFactor()
268 *vtmv(scvf.unitOuterNormal(), facetVolVars.permeability(), scvf.unitOuterNormal());
269
270 // The fluxes across this face and the outside face can be expressed in matrix form:
271 // \f$\mathbf{C} \bar{\mathbf{u}} + \mathbf{D} \mathbf{u} + \mathbf{E} \mathbf{u}_\gamma\f$,
272 // where \f$\gamma$\f denotes the domain living on the facets and \f$\bar{\mathbf{u}}$\f are
273 // intermediate face unknowns in the matrix domain. Equivalently, flux continuity reads:
274 // \f$\mathbf{A} \bar{\mathbf{u}} = \mathbf{B} \mathbf{u} + \mathbf{M} \mathbf{u}_\gamma\f$.
275 // Combining the two, we can eliminate the intermediate unknowns and compute the transmissibilities
276 // that allow the description of the fluxes as functions of the cell and Dirichlet pressures only.
277 if (!scvf.boundary())
278 {
279 const auto outsideScvIdx = scvf.outsideScvIdx();
280 const auto& outsideVolVars = elemVolVars[outsideScvIdx];
281 const auto wOut = -1.0*Extrusion::area(fvGeometry, scvf)
282 *computeTpfaTransmissibility(fvGeometry, scvf, fvGeometry.scv(outsideScvIdx),
283 outsideVolVars.permeability(),
284 outsideVolVars.extrusionFactor());
285
286 if ( !Dune::FloatCmp::eq(xi, 1.0, 1e-6) )
287 {
288 // The gravity coefficients are the first row of the inverse of the A matrix in the local eq system
289 // multiplied with wIn. Note that we never compute the inverse but use an optimized implementation below.
290 // The A matrix has the following coefficients:
291 // A = | xi*wIn + wFacet, (xi - 1.0)*wOut | -> AInv = 1/detA | xi*wOut + wFacet, -(xi - 1.0)*wOut |
292 // | wIn*(xi - 1.0) , xi*wOut + wFacet | | -wIn*(xi - 1.0) , xi*wIn + wFacet |
293 const Scalar xiMinusOne = (xi - 1.0);
294 const Scalar a01 = xiMinusOne*wOut;
295 const Scalar a11 = xi*wOut + wFacet;
296 const Scalar detA = (xi*wIn + wFacet)*a11 - xiMinusOne*wIn*a01;
297 g[0] = wIn*a11/detA; g[1] = -wIn*a01/detA;
298
299 // optimized implementation: factorization obtained using sympy
300 const Scalar factor = wIn * wFacet / ( wIn * wOut * ( 2.0 * xi - 1.0 ) + wFacet * ( xi * ( wIn + wOut ) + wFacet ) );
301 tij[Cache::insideTijIdx] = factor * ( wOut * xi + wFacet );
302 tij[Cache::outsideTijIdx] = factor * ( wOut * ( 1.0 - xi ) );
303 tij[Cache::facetTijIdx] = factor * ( - wOut - wFacet );
304 }
305 else
306 {
307 g[0] = wIn/(wIn+wFacet); g[1] = 0.0;
308 tij[Cache::insideTijIdx] = wFacet*g[0];
309 tij[Cache::facetTijIdx] = -tij[Cache::insideTijIdx];
310 tij[Cache::outsideTijIdx] = 0.0;
311 }
312 }
313 else
314 {
315 // TODO: check for division by zero??
316 tij[Cache::insideTijIdx] = wFacet*wIn/(wIn+wFacet);
317 tij[Cache::facetTijIdx] = -tij[Cache::insideTijIdx];
318 tij[Cache::outsideTijIdx] = 0.0;
319 }
320 }
321 else if (iBcTypes.hasOnlyDirichlet())
322 {
323 tij[Cache::insideTijIdx] = wIn;
324 tij[Cache::outsideTijIdx] = 0.0;
325 tij[Cache::facetTijIdx] = -wIn;
326 }
327 else
328 DUNE_THROW(Dune::NotImplemented, "Interior boundary types other than pure Dirichlet or Neumann");
329
330 return tij;
331 }
332};
333
338template<class AdvectionType, class GridGeometry>
339class CCTpfaFacetCouplingDarcysLawCache<AdvectionType, GridGeometry, /*isNetwork*/true>
340{
341 using Scalar = typename AdvectionType::Scalar;
342 using FVElementGeometry = typename GridGeometry::LocalView;
343 using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace;
344 using Element = typename GridGeometry::GridView::template Codim<0>::Entity;
345
346public:
349
353 static constexpr int insideTijIdx = 0;
354 static constexpr int facetTijIdx = 1;
355
357 using AdvectionTransmissibilityContainer = std::array<Scalar, 2>;
358
360 using GravityCoefficients = std::array<Scalar, 1>;
361
363 template< class Problem, class ElementVolumeVariables >
364 void updateAdvection(const Problem& problem,
365 const Element& element,
366 const FVElementGeometry& fvGeometry,
367 const ElementVolumeVariables& elemVolVars,
368 const SubControlVolumeFace &scvf)
369 {
370 tij_ = AdvectionType::calculateTransmissibility(problem, element, fvGeometry, elemVolVars, scvf, g_);
371 }
372
377 Scalar advectionTij() const
378 { return tij_[insideTijIdx]; }
379
381 Scalar advectionTijInside() const
382 { return tij_[insideTijIdx]; }
383
385 Scalar advectionTijFacet() const
386 { return tij_[facetTijIdx]; }
387
390 { return g_; }
391
392private:
393 AdvectionTransmissibilityContainer tij_;
394 GravityCoefficients g_;
395};
396
401template<class ScalarType, class GridGeometry>
402class CCTpfaFacetCouplingDarcysLawImpl<ScalarType, GridGeometry, /*isNetwork*/true>
403{
406
407 using FVElementGeometry = typename GridGeometry::LocalView;
408 using SubControlVolume = typename GridGeometry::SubControlVolume;
409 using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace;
410 using Extrusion = Extrusion_t<GridGeometry>;
411
412 using GridView = typename GridGeometry::GridView;
413 using Element = typename GridView::template Codim<0>::Entity;
414 using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
415
416 public:
418 using Scalar = ScalarType;
421 static constexpr DiscretizationMethod discMethod{};
423 using Cache = CCTpfaFacetCouplingDarcysLawCache<ThisType, GridGeometry, /*isNetwork*/true>;
425 using TijContainer = typename Cache::AdvectionTransmissibilityContainer;
426
428 template< class Problem, class ElementVolumeVariables, class ElementFluxVarsCache >
429 static Scalar flux(const Problem& problem,
430 const Element& element,
431 const FVElementGeometry& fvGeometry,
432 const ElementVolumeVariables& elemVolVars,
433 const SubControlVolumeFace& scvf,
434 int phaseIdx,
435 const ElementFluxVarsCache& elemFluxVarsCache)
436 {
437 if (!problem.couplingManager().isOnInteriorBoundary(element, scvf))
438 return TpfaDarcysLaw::flux(problem, element, fvGeometry, elemVolVars, scvf, phaseIdx, elemFluxVarsCache);
439
440 // On surface grids only xi = 1.0 can be used, as the coupling condition
441 // for xi != 1.0 does not generalize for surface grids where there can be
442 // seveal neighbor meeting at a branching point.
443 static const Scalar xi = getParamFromGroup<Scalar>(problem.paramGroup(), "FacetCoupling.Xi", 1.0);
444 if (Dune::FloatCmp::ne(xi, 1.0, 1e-6))
445 DUNE_THROW(Dune::InvalidStateException, "Xi != 1.0 cannot be used on surface grids");
446
447 // Obtain inside and fracture pressures
448 const auto& insideVolVars = elemVolVars[scvf.insideScvIdx()];
449 const auto& facetVolVars = problem.couplingManager().getLowDimVolVars(element, scvf);
450 const auto pInside = insideVolVars.pressure(phaseIdx);
451 const auto pFacet = facetVolVars.pressure(phaseIdx);
452
453 // compute and return flux
454 const auto& fluxVarsCache = elemFluxVarsCache[scvf];
455 Scalar flux = fluxVarsCache.advectionTijInside()*pInside + fluxVarsCache.advectionTijFacet()*pFacet;
456
457 static const Scalar gravity = getParamFromGroup<bool>(problem.paramGroup(), "Problem.EnableGravity");
458 if (gravity)
459 {
460 // compute alpha := n^T*K*g and add to flux (use arithmetic mean for density)
461 const auto& g = problem.spatialParams().gravity(scvf.ipGlobal());
462 const auto rho = 0.5*(insideVolVars.density(phaseIdx) + facetVolVars.density(phaseIdx));
463 const auto rhoTimesArea = rho*Extrusion::area(fvGeometry, scvf);
464 const auto alpha_inside = rhoTimesArea*insideVolVars.extrusionFactor()
465 *vtmv(scvf.unitOuterNormal(), insideVolVars.permeability(), g);
466
467 flux += alpha_inside;
468
469 // maybe add further gravitational contributions
470 if ( !scvf.boundary() && problem.interiorBoundaryTypes(element, scvf).hasOnlyNeumann() )
471 {
472 const auto alpha_facet = rhoTimesArea*insideVolVars.extrusionFactor()
473 *vtmv(scvf.unitOuterNormal(), facetVolVars.permeability(), g);
474
475 flux -= fluxVarsCache.gravityCoefficients()[0]*(alpha_inside - alpha_facet);
476 }
477 }
478
479 return flux;
480 }
481
482 // The flux variables cache has to be bound to an element prior to flux calculations
483 // During the binding, the transmissibility will be computed and stored using the method below.
484 template< class Problem, class ElementVolumeVariables >
485 static TijContainer calculateTransmissibility(const Problem& problem,
486 const Element& element,
487 const FVElementGeometry& fvGeometry,
488 const ElementVolumeVariables& elemVolVars,
489 const SubControlVolumeFace& scvf)
490 {
491 typename Cache::GravityCoefficients g;
492 return calculateTransmissibility(problem, element, fvGeometry, elemVolVars, scvf, g);
493 }
494
495 // This overload additionally receives a container in which the coefficients required
496 // for the computation of the gravitational acceleration ar the scvf are stored
497 template< class Problem, class ElementVolumeVariables >
498 static TijContainer calculateTransmissibility(const Problem& problem,
499 const Element& element,
500 const FVElementGeometry& fvGeometry,
501 const ElementVolumeVariables& elemVolVars,
502 const SubControlVolumeFace& scvf,
503 typename Cache::GravityCoefficients& g)
504 {
505 TijContainer tij;
506 if (!problem.couplingManager().isCoupled(element, scvf))
507 {
509 tij[Cache::insideTijIdx] = TpfaDarcysLaw::calculateTransmissibility(problem, element, fvGeometry, elemVolVars, scvf);
510 return tij;
511 }
512
514 static const Scalar xi = getParamFromGroup<Scalar>(problem.paramGroup(), "FacetCoupling.Xi", 1.0);
515
516 // On surface grids only xi = 1.0 can be used, as the coupling condition
517 // for xi != 1.0 does not generalize for surface grids where the normal
518 // vectors of the inside/outside elements have different orientations.
519 if (Dune::FloatCmp::ne(xi, 1.0, 1e-6))
520 DUNE_THROW(Dune::InvalidStateException, "Xi != 1.0 cannot be used on surface grids");
521
522 const auto area = Extrusion::area(fvGeometry, scvf);
523 const auto insideScvIdx = scvf.insideScvIdx();
524 const auto& insideScv = fvGeometry.scv(insideScvIdx);
525 const auto& insideVolVars = elemVolVars[insideScvIdx];
526 const auto wIn = area*computeTpfaTransmissibility(fvGeometry, scvf, insideScv, insideVolVars.permeability(), insideVolVars.extrusionFactor());
527
528 // proceed depending on the interior BC types used
529 const auto iBcTypes = problem.interiorBoundaryTypes(element, scvf);
530
531 // neumann-coupling
532 if (iBcTypes.hasOnlyNeumann())
533 {
534 const auto& facetVolVars = problem.couplingManager().getLowDimVolVars(element, scvf);
535
536 // Here we use the square root of the facet extrusion factor
537 // as an approximate average distance from scvf ip to facet center
538 using std::sqrt;
539 const auto wFacet = 2.0*area*insideVolVars.extrusionFactor()
540 /sqrt(facetVolVars.extrusionFactor())
541 *vtmv(scvf.unitOuterNormal(), facetVolVars.permeability(), scvf.unitOuterNormal());
542
543 // TODO: check for division by zero??
544 g[0] = wIn/(wIn+wFacet);
545 tij[Cache::insideTijIdx] = wFacet*g[0];
546 tij[Cache::facetTijIdx] = -tij[Cache::insideTijIdx];
547 }
548 else if (iBcTypes.hasOnlyDirichlet())
549 {
550 tij[Cache::insideTijIdx] = wIn;
551 tij[Cache::facetTijIdx] = -wIn;
552 }
553 else
554 DUNE_THROW(Dune::NotImplemented, "Interior boundary types other than pure Dirichlet or Neumann");
555
556 return tij;
557 }
558};
559
560} // end namespace Dumux
561
562#endif
Specialization of the CCTpfaDarcysLaw grids where dim=dimWorld.
Definition: flux/cctpfa/darcyslaw.hh:118
Specialization of the CCTpfaDarcysLaw grids where dim < dimWorld (network/surface grids)
Definition: flux/cctpfa/darcyslaw.hh:283
const GravityCoefficients & gravityCoefficients() const
return the coefficients for the computation of gravity at the scvf
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:115
std::array< Scalar, 3 > AdvectionTransmissibilityContainer
Export transmissibility storage type.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:79
Scalar advectionTijInside() const
returns the transmissibility associated with the inside cell
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:103
std::array< Scalar, 2 > GravityCoefficients
Export the type used for the gravity coefficients.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:82
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:86
Scalar advectionTijOutside() const
returns the transmissibility associated with the outside cell
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:107
Scalar advectionTijFacet() const
returns the transmissibility associated with the outside cell
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:111
Scalar advectionTij() const
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:99
std::array< Scalar, 1 > GravityCoefficients
Export the type used for the gravity coefficients.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:360
std::array< Scalar, 2 > AdvectionTransmissibilityContainer
Export transmissibility storage type.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:357
Scalar advectionTij() const
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:377
Scalar advectionTijInside() const
returns the transmissibility associated with the inside cell
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:381
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:364
const GravityCoefficients & gravityCoefficients() const
return the coefficients for the computation of gravity at the scvf
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:389
Scalar advectionTijFacet() const
returns the transmissibility associated with the outside cell
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:385
The cache corresponding to tpfa Darcy's Law with facet coupling.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:42
Specialization of CCTpfaFacetCouplingDarcysLawImpl for dim=dimWorld.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:129
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:156
ScalarType Scalar
state the scalar type of the law
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:144
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:220
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:233
typename Cache::AdvectionTransmissibilityContainer TijContainer
export the type used to store transmissibilities
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:151
Specialization of CCTpfaFacetCouplingDarcysLawImpl for dim<dimWorld.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:403
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:485
typename Cache::AdvectionTransmissibilityContainer TijContainer
export the type used to store transmissibilities
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:425
ScalarType Scalar
state the scalar type of the law
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:418
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:429
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:498
Forward declaration of the implementation.
Definition: multidomain/facet/cellcentered/tpfa/darcyslaw.hh:33
Class that fills the cache corresponding to tpfa Darcy's Law.
Definition: flux/cctpfa/darcyslaw.hh:58
Defines all properties used in Dumux.
Helper classes to compute the integration elements.
Darcy's law for cell-centered finite volume schemes with two-point flux approximation.
Tensor::field_type computeTpfaTransmissibility(const FVElementGeometry &fvGeometry, const typename FVElementGeometry::SubControlVolumeFace &scvf, const typename FVElementGeometry::SubControlVolume &scv, const Tensor &T, typename FVElementGeometry::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:36
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:880
Define some often used mathematical functions.
The available discretization methods in Dumux.
Definition: adapt.hh:17
typename Extrusion< T >::type Extrusion_t
Convenience alias for obtaining the extrusion type.
Definition: extrusion.hh:166
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Definition: method.hh:25
Free functions to evaluate the transmissibilities associated with flux evaluations across sub-control...