version 3.10-dev
multidomain/boundary/freeflowporenetwork/couplingmanager.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//
13#ifndef DUMUX_MULTIDOMAIN_BOUNDARY_FREEFLOW_PORENETWORK_COUPLINGMANAGER_HH
14#define DUMUX_MULTIDOMAIN_BOUNDARY_FREEFLOW_PORENETWORK_COUPLINGMANAGER_HH
15
16#include <utility>
17#include <memory>
18
19#include <dune/common/indices.hh>
25
26#include "couplingconditions.hh"
27#include "couplingmapper.hh"
28
29namespace Dumux {
30
31namespace FreeFlowPoreNetworkDetail {
32
33// global subdomain indices
34static constexpr auto freeFlowMomentumIndex = Dune::index_constant<0>();
35static constexpr auto freeFlowMassIndex = Dune::index_constant<1>();
36static constexpr auto poreNetworkIndex = Dune::index_constant<2>();
37
38// coupling indices
39static constexpr auto freeFlowMassToFreeFlowMomentumIndex = Dune::index_constant<0>();
40static constexpr auto freeFlowMomentumToPoreNetworkIndex = Dune::index_constant<1>();
41static constexpr auto freeFlowMassToPoreNetworkIndex = Dune::index_constant<2>();
42static constexpr auto noCouplingIdx = Dune::index_constant<99>();
43
44constexpr auto makeCouplingManagerMap()
45{
46 auto map = std::array<std::array<std::size_t, 3>, 3>{};
47
48 // free flow (momentum-mass)
51
52 // free flow momentum - porous medium
55
56 // free flow mass - porous medium
59
60 return map;
61}
62
63template<std::size_t i>
64constexpr auto coupledDomains(Dune::index_constant<i> domainI)
65{
66 if constexpr (i == freeFlowMomentumIndex)
67 return std::make_tuple(freeFlowMassIndex, poreNetworkIndex);
68 else if constexpr (i == freeFlowMassIndex)
69 return std::make_tuple(freeFlowMomentumIndex, poreNetworkIndex);
70 else // i == poreNetworkIndex
71 return std::make_tuple(freeFlowMomentumIndex, freeFlowMassIndex);
72}
73
74template<std::size_t i, std::size_t j>
75constexpr auto globalToLocalDomainIndices(Dune::index_constant<i>, Dune::index_constant<j>)
76{
77 static_assert(i <= 2 && j <= 2);
78 static_assert(i != j);
79
80 if constexpr (i < j)
81 return std::pair<Dune::index_constant<0>, Dune::index_constant<1>>{};
82 else
83 return std::pair<Dune::index_constant<1>, Dune::index_constant<0>>{};
84}
85
87{
88 static constexpr auto managerMap()
89 {
91 }
92
93 template<std::size_t i, std::size_t j>
94 static constexpr auto globalToLocal(Dune::index_constant<i> domainI, Dune::index_constant<j> domainJ)
95 {
97 }
98
99 template<std::size_t i>
100 static constexpr auto coupledDomains(Dune::index_constant<i> domainI)
101 {
103 }
104};
105
106template<class MDTraits>
108{
109 template<std::size_t id>
110 using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
111
114 >;
115
118 >;
119
122 >;
123
130};
131
132} // end namespace Detail
133
138template<class MDTraits>
141 MDTraits,
142 FreeFlowPoreNetworkDetail::CouplingMaps,
143 typename FreeFlowPoreNetworkDetail::CouplingManagers<MDTraits>::FreeFlowCouplingManager,
144 typename FreeFlowPoreNetworkDetail::CouplingManagers<MDTraits>::FreeFlowMomentumPoreNetworkCouplingManager,
145 typename FreeFlowPoreNetworkDetail::CouplingManagers<MDTraits>::FreeFlowMassPoreNetworkCouplingManager
146>
147{
149 MDTraits,
154 >;
155
157
158 using Scalar = typename MDTraits::Scalar;
159
160 // the sub domain type tags
161 template<std::size_t id>
162 using SubDomainTypeTag = typename MDTraits::template SubDomain<id>::TypeTag;
163
164 template<std::size_t id> using Problem = GetPropType<SubDomainTypeTag<id>, Properties::Problem>;
165 template<std::size_t id> using GridGeometry = GetPropType<SubDomainTypeTag<id>, Properties::GridGeometry>;
166 template<std::size_t id> using FVElementGeometry = typename GridGeometry<id>::LocalView;
167 template<std::size_t id> using SubControlVolumeFace = typename FVElementGeometry<id>::SubControlVolumeFace;
168 template<std::size_t id> using SubControlVolume = typename FVElementGeometry<id>::SubControlVolume;
169 template<std::size_t id> using ElementVolumeVariables = typename GetPropType<SubDomainTypeTag<id>, Properties::GridVolumeVariables>::LocalView;
170 template<std::size_t id> using NumEqVector = typename Problem<id>::Traits::NumEqVector;
171
172 template<std::size_t id> using GridView = typename GridGeometry<id>::GridView;
173 template<std::size_t id> using Element = typename GridView<id>::template Codim<0>::Entity;
174 using SolutionVector = typename MDTraits::SolutionVector;
175
176 template<std::size_t id>
177 using SubSolutionVector
178 = std::decay_t<decltype(std::declval<SolutionVector>()[Dune::index_constant<id>()])>;
179
182
183public:
184
185 template<std::size_t i, std::size_t j>
186 using SubCouplingManager = typename ParentType::template SubCouplingManager<i, j>;
187
191
192public:
193 using ParentType::ParentType;
194
195 template<class GridVarsTuple>
196 void init(std::shared_ptr<Problem<freeFlowMomentumIndex>> freeFlowMomentumProblem,
197 std::shared_ptr<Problem<freeFlowMassIndex>> freeFlowMassProblem,
198 std::shared_ptr<Problem<poreNetworkIndex>> poreNetworkProblem,
199 GridVarsTuple&& gridVarsTuple,
200 const SolutionVector& curSol)
201 {
202 // initialize sub coupling manager that are not stationary or transient problem specific
203 this->init_(freeFlowMomentumProblem, freeFlowMassProblem, poreNetworkProblem, std::forward<GridVarsTuple>(gridVarsTuple), curSol);
204
205 // initialize stationary-specific sub coupling manager for free-flow
208 freeFlowMomentumProblem, freeFlowMassProblem,
209 std::make_tuple(std::get<freeFlowMomentumIndex>(gridVarsTuple), std::get<freeFlowMassIndex>(gridVarsTuple)),
210 FFSol{ std::get<freeFlowMomentumIndex>(this->curSol()), std::get<freeFlowMassIndex>(this->curSol()) }
211 );
212 }
213
214 template<class GridVarsTuple>
215 void init(std::shared_ptr<Problem<freeFlowMomentumIndex>> freeFlowMomentumProblem,
216 std::shared_ptr<Problem<freeFlowMassIndex>> freeFlowMassProblem,
217 std::shared_ptr<Problem<poreNetworkIndex>> poreNetworkProblem,
218 GridVarsTuple&& gridVarsTuple,
219 const SolutionVector& curSol,
220 const SolutionVector& prevSol)
221 {
222 // initialize sub coupling manager that are not stationary or transient problem specific
223 this->init_(freeFlowMomentumProblem, freeFlowMassProblem, poreNetworkProblem, std::forward<GridVarsTuple>(gridVarsTuple), curSol);
224
226 using FFPrevSol = std::tuple<const SubSolutionVector<freeFlowMomentumIndex>*, const SubSolutionVector<freeFlowMassIndex>*>;
228 freeFlowMomentumProblem, freeFlowMassProblem,
229 std::make_tuple(std::get<freeFlowMomentumIndex>(gridVarsTuple), std::get<freeFlowMassIndex>(gridVarsTuple)),
230 FFSol{ std::get<freeFlowMomentumIndex>(this->curSol()), std::get<freeFlowMassIndex>(this->curSol()) },
231 FFPrevSol{ &prevSol[freeFlowMomentumIndex], &prevSol[freeFlowMassIndex] }
232 );
233 }
234
238 auto massCouplingCondition(Dune::index_constant<poreNetworkIndex> domainI, Dune::index_constant<freeFlowMassIndex> domainJ,
239 const FVElementGeometry<poreNetworkIndex>& fvGeometry,
240 const typename FVElementGeometry<poreNetworkIndex>::SubControlVolume& scv,
241 const ElementVolumeVariables<poreNetworkIndex>& elemVolVars) const
242 {
243
244 const auto& couplingContext = this->subApply(domainI, domainJ, [&](const auto& cm, auto&& ii, auto&& jj) -> const auto& {
245 return cm.couplingContext(ii, fvGeometry, scv);
246 });
247
248 const auto& freeFlowMassGridGeometry = this->subApply(domainI, domainJ, [&](const auto& cm, auto&& ii, auto&& jj) -> const auto& {
249 return cm.problem(jj).gridGeometry();
250 });
251
252 for (auto& c : couplingContext)
253 {
254 const auto& freeFlowElement = freeFlowMassGridGeometry.element(c.scv.elementIndex());
255 c.velocity = this->subCouplingManager(freeFlowMomentumIndex, freeFlowMassIndex).faceVelocity(freeFlowElement, c.scvf);
256 }
257
258 return CouplingConditions::massCouplingCondition(domainI, domainJ, fvGeometry, scv, elemVolVars, couplingContext);
259 }
260
264 auto massCouplingCondition(Dune::index_constant<freeFlowMassIndex> domainI, Dune::index_constant<poreNetworkIndex> domainJ,
265 const FVElementGeometry<freeFlowMassIndex>& fvGeometry,
266 const typename FVElementGeometry<freeFlowMassIndex>::SubControlVolumeFace& scvf,
267 const ElementVolumeVariables<freeFlowMassIndex>& elemVolVars) const
268 {
269
270 const auto& couplingContext = this->subApply(domainI, domainJ, [&](const auto& cm, auto&& ii, auto&& jj) -> const auto& {
271 return cm.couplingContext(ii, fvGeometry, scvf);
272 });
273
274 couplingContext.velocity = this->subCouplingManager(freeFlowMomentumIndex, freeFlowMassIndex).faceVelocity(fvGeometry.element(), scvf);
275 return CouplingConditions::massCouplingCondition(domainI, domainJ, fvGeometry, scvf, elemVolVars, couplingContext);
276 }
277
280
281 NumEqVector<freeFlowMomentumIndex> momentumCouplingCondition(Dune::index_constant<freeFlowMomentumIndex> domainI,
282 Dune::index_constant<poreNetworkIndex> domainJ,
283 const FVElementGeometry<freeFlowMomentumIndex>& fvGeometry,
284 const typename FVElementGeometry<freeFlowMomentumIndex>::SubControlVolumeFace& scvf,
285 const ElementVolumeVariables<freeFlowMomentumIndex>& elemVolVars) const
286 {
287 if (scvf.isLateral())
288 return NumEqVector<freeFlowMomentumIndex>(0.0);
289
290 const auto& context = this->subCouplingManager(freeFlowMomentumIndex, poreNetworkIndex).couplingContext(
291 fvGeometry, scvf
292 );
293
294 return CouplingConditions::momentumCouplingCondition(fvGeometry, scvf, elemVolVars, context);
295 }
296
297 Scalar coupledPoreInscribedRadius(const FVElementGeometry<freeFlowMomentumIndex>& fvGeometry,
298 const typename FVElementGeometry<freeFlowMomentumIndex>::SubControlVolumeFace& scvf) const
299 {
300 const auto& context = this->subCouplingManager(freeFlowMomentumIndex, poreNetworkIndex).couplingContext(
301 fvGeometry, scvf
302 );
303
304 const auto& pnmScv = [&]
305 {
306 for (const auto& scv : scvs(context.fvGeometry))
307 if (scv.dofIndex() == context.poreNetworkDofIdx)
308 return scv;
309
310 DUNE_THROW(Dune::InvalidStateException, "No scv found");
311 }();
312
313 return context.elemVolVars[pnmScv].poreInscribedRadius();
314 }
315
316 auto interfaceThroatVelocity(const FVElementGeometry<freeFlowMomentumIndex>& fvGeometry,
317 const typename FVElementGeometry<freeFlowMomentumIndex>::SubControlVolumeFace& scvf) const
318 {
319 const auto& context = this->subCouplingManager(freeFlowMomentumIndex, poreNetworkIndex).couplingContext(
320 fvGeometry, scvf
321 );
322
323 return CouplingConditions::interfaceThroatVelocity(fvGeometry, scvf, context);
324 }
325
326 // //////////////////////// Conditions for FreeFlowMomentum - FreeFlowMass coupling //////////
327 // ///////////////////////////////////////////////////////////////////////////////////////////
328
332 Scalar pressure(const Element<freeFlowMomentumIndex>& element,
333 const FVElementGeometry<freeFlowMomentumIndex>& fvGeometry,
334 const SubControlVolumeFace<freeFlowMomentumIndex>& scvf) const
335 {
337 element, fvGeometry, scvf
338 );
339 }
340
347 Scalar cellPressure(const Element<freeFlowMomentumIndex>& element,
348 const SubControlVolumeFace<freeFlowMomentumIndex>& scvf) const
349 {
351 element, scvf
352 );
353 }
354
358 Scalar density(const Element<freeFlowMomentumIndex>& element,
359 const FVElementGeometry<freeFlowMomentumIndex>& fvGeometry,
360 const SubControlVolumeFace<freeFlowMomentumIndex>& scvf,
361 const bool considerPreviousTimeStep = false) const
362 {
364 element, fvGeometry, scvf, considerPreviousTimeStep
365 );
366 }
367
368 auto insideAndOutsideDensity(const Element<freeFlowMomentumIndex>& element,
369 const FVElementGeometry<freeFlowMomentumIndex>& fvGeometry,
370 const SubControlVolumeFace<freeFlowMomentumIndex>& scvf,
371 const bool considerPreviousTimeStep = false) const
372 {
373 return this->subCouplingManager(freeFlowMomentumIndex, freeFlowMassIndex).insideAndOutsideDensity(
374 element, fvGeometry, scvf, considerPreviousTimeStep
375 );
376 }
377
381 Scalar density(const Element<freeFlowMomentumIndex>& element,
382 const SubControlVolume<freeFlowMomentumIndex>& scv,
383 const bool considerPreviousTimeStep = false) const
384 {
386 element, scv, considerPreviousTimeStep
387 );
388 }
389
393 Scalar effectiveViscosity(const Element<freeFlowMomentumIndex>& element,
394 const FVElementGeometry<freeFlowMomentumIndex>& fvGeometry,
395 const SubControlVolumeFace<freeFlowMomentumIndex>& scvf) const
396 {
397 return this->subCouplingManager(freeFlowMomentumIndex, freeFlowMassIndex).effectiveViscosity(
398 element, fvGeometry, scvf
399 );
400 }
401
405 auto faceVelocity(const Element<freeFlowMassIndex>& element,
406 const SubControlVolumeFace<freeFlowMassIndex>& scvf) const
407 {
409 element, scvf
410 );
411 }
412
413 template<std::size_t i>
414 const Problem<i>& problem(Dune::index_constant<i> domainI) const
415 {
416 return this->subApply(domainI, [&](const auto& cm, auto&& ii) -> const auto& {
417 return cm.problem(ii);
418 });
419 }
420
421 template<std::size_t i, std::size_t j>
422 bool isCoupled(Dune::index_constant<i> domainI,
423 Dune::index_constant<j> domainJ,
424 const SubControlVolumeFace<i>& scvf) const
425 {
426 return this->subApply(domainI, domainJ, [&](const auto& cm, auto&& ii, auto&& jj){
427 return cm.isCoupled(ii, scvf);
428 });
429 }
430
437 template<std::size_t i, std::size_t j>
438 bool isCoupled(Dune::index_constant<i> domainI,
439 Dune::index_constant<j> domainJ,
440 const SubControlVolume<i>& scv) const
441 {
442 return this->subApply(domainI, domainJ, [&](const auto& cm, auto&& ii, auto&& jj){
443 return cm.isCoupled(ii, scv);
444 });
445 }
446
447 // /*!
448 // * \brief Returns whether a given scvf is coupled to the other domain
449 // */
450 // bool isCoupledLateralScvf(Dune::index_constant<freeFlowMomentumIndex> domainI,
451 // Dune::index_constant<poreNetworkIndex> domainJ,
452 // const SubControlVolumeFace<freeFlowMomentumIndex>& scvf) const
453 // {
454 // return this->subApply(domainI, domainJ, [&](const auto& cm, auto&& ii, auto&& jj){
455 // return cm.isCoupledLateralScvf(ii, scvf);
456 // });
457 // }
458
459
470 template<std::size_t j>
471 const auto& couplingStencil(Dune::index_constant<freeFlowMomentumIndex> domainI,
472 const Element<freeFlowMomentumIndex>& elementI,
473 const SubControlVolume<freeFlowMomentumIndex>& scvI,
474 Dune::index_constant<j> domainJ) const
475 {
476 static_assert(freeFlowMomentumIndex != j);
477 return this->subApply(domainI, domainJ, [&](const auto& cm, auto&& ii, auto&& jj) -> const auto& {
478 return cm.couplingStencil(ii, elementI, scvI, jj);
479 });
480 }
481
482private:
483 /*
484 * \brief Initializes sub-coupling managers for stationary and transient problems
485 */
486 template<class GridVarsTuple>
487 void init_(std::shared_ptr<Problem<freeFlowMomentumIndex>> freeFlowMomentumProblem,
488 std::shared_ptr<Problem<freeFlowMassIndex>> freeFlowMassProblem,
489 std::shared_ptr<Problem<poreNetworkIndex>> poreNetworkProblem,
490 GridVarsTuple&& gridVarsTuple,
491 const SolutionVector& curSol)
492 {
493 this->updateSolution(curSol); // generic coupling manager stores tuple of shared_ptr
494
495 auto couplingMapper = std::make_shared<CouplingMapper>();
496 couplingMapper->update(freeFlowMomentumProblem->gridGeometry(),
497 freeFlowMassProblem->gridGeometry(),
498 poreNetworkProblem->gridGeometry()
499 );
500
501 // initialize the binary sub coupling managers for stationary and transient problems
502 using FFMassPNMSol = typename SubCouplingManager<freeFlowMassIndex, poreNetworkIndex>::SolutionVectorStorage;
504 freeFlowMassProblem, poreNetworkProblem, couplingMapper,
505 FFMassPNMSol{ std::get<freeFlowMassIndex>(this->curSol()), std::get<poreNetworkIndex>(this->curSol()) }
506 );
507
508 using FFMomPNMSol = typename SubCouplingManager<freeFlowMomentumIndex, poreNetworkIndex>::SolutionVectorStorage;
510 freeFlowMomentumProblem, poreNetworkProblem,
511 std::make_tuple(std::get<freeFlowMomentumIndex>(gridVarsTuple), std::get<poreNetworkIndex>(gridVarsTuple)),
512 couplingMapper, FFMomPNMSol{ std::get<freeFlowMomentumIndex>(this->curSol()), std::get<poreNetworkIndex>(this->curSol()) }
513 );
514 }
515
516};
517
518} // end namespace Dumux
519
520#endif
Coupling manager for free-flow mass and pore-network models.
Definition: multidomain/boundary/freeflowporenetwork/ffmassporenetwork/couplingmanager.hh:35
Coupling manager for free-flow momentum and pore-network models.
Definition: multidomain/boundary/freeflowporenetwork/ffmomentumporenetwork/couplingmanager.hh:35
Definition: freeflowporenetwork/couplingconditions.hh:31
Coupling manager for coupling freeflow and pore-network models.
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:147
auto insideAndOutsideDensity(const Element< freeFlowMomentumIndex > &element, const FVElementGeometry< freeFlowMomentumIndex > &fvGeometry, const SubControlVolumeFace< freeFlowMomentumIndex > &scvf, const bool considerPreviousTimeStep=false) const
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:368
bool isCoupled(Dune::index_constant< i > domainI, Dune::index_constant< j > domainJ, const SubControlVolumeFace< i > &scvf) const
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:422
void init(std::shared_ptr< Problem< freeFlowMomentumIndex > > freeFlowMomentumProblem, std::shared_ptr< Problem< freeFlowMassIndex > > freeFlowMassProblem, std::shared_ptr< Problem< poreNetworkIndex > > poreNetworkProblem, GridVarsTuple &&gridVarsTuple, const SolutionVector &curSol)
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:196
Scalar density(const Element< freeFlowMomentumIndex > &element, const SubControlVolume< freeFlowMomentumIndex > &scv, const bool considerPreviousTimeStep=false) const
Returns the density at a given sub control volume.
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:381
static constexpr auto freeFlowMomentumIndex
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:188
Scalar density(const Element< freeFlowMomentumIndex > &element, const FVElementGeometry< freeFlowMomentumIndex > &fvGeometry, const SubControlVolumeFace< freeFlowMomentumIndex > &scvf, const bool considerPreviousTimeStep=false) const
Returns the density at a given sub control volume face.
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:358
void init(std::shared_ptr< Problem< freeFlowMomentumIndex > > freeFlowMomentumProblem, std::shared_ptr< Problem< freeFlowMassIndex > > freeFlowMassProblem, std::shared_ptr< Problem< poreNetworkIndex > > poreNetworkProblem, GridVarsTuple &&gridVarsTuple, const SolutionVector &curSol, const SolutionVector &prevSol)
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:215
Scalar effectiveViscosity(const Element< freeFlowMomentumIndex > &element, const FVElementGeometry< freeFlowMomentumIndex > &fvGeometry, const SubControlVolumeFace< freeFlowMomentumIndex > &scvf) const
Returns the pressure at a given sub control volume face.
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:393
auto massCouplingCondition(Dune::index_constant< poreNetworkIndex > domainI, Dune::index_constant< freeFlowMassIndex > domainJ, const FVElementGeometry< poreNetworkIndex > &fvGeometry, const typename FVElementGeometry< poreNetworkIndex >::SubControlVolume &scv, const ElementVolumeVariables< poreNetworkIndex > &elemVolVars) const
Returns the mass flux across the coupling boundary.
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:238
const auto & couplingStencil(Dune::index_constant< freeFlowMomentumIndex > domainI, const Element< freeFlowMomentumIndex > &elementI, const SubControlVolume< freeFlowMomentumIndex > &scvI, Dune::index_constant< j > domainJ) const
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:471
static constexpr auto freeFlowMassIndex
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:189
typename ParentType::template SubCouplingManager< i, j > SubCouplingManager
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:186
Scalar pressure(const Element< freeFlowMomentumIndex > &element, const FVElementGeometry< freeFlowMomentumIndex > &fvGeometry, const SubControlVolumeFace< freeFlowMomentumIndex > &scvf) const
Returns the pressure at a given sub control volume face.
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:332
const Problem< i > & problem(Dune::index_constant< i > domainI) const
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:414
Scalar cellPressure(const Element< freeFlowMomentumIndex > &element, const SubControlVolumeFace< freeFlowMomentumIndex > &scvf) const
Returns the pressure at the center of a sub control volume corresponding to a given sub control volum...
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:347
NumEqVector< freeFlowMomentumIndex > momentumCouplingCondition(Dune::index_constant< freeFlowMomentumIndex > domainI, Dune::index_constant< poreNetworkIndex > domainJ, const FVElementGeometry< freeFlowMomentumIndex > &fvGeometry, const typename FVElementGeometry< freeFlowMomentumIndex >::SubControlVolumeFace &scvf, const ElementVolumeVariables< freeFlowMomentumIndex > &elemVolVars) const
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:281
Scalar coupledPoreInscribedRadius(const FVElementGeometry< freeFlowMomentumIndex > &fvGeometry, const typename FVElementGeometry< freeFlowMomentumIndex >::SubControlVolumeFace &scvf) const
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:297
auto faceVelocity(const Element< freeFlowMassIndex > &element, const SubControlVolumeFace< freeFlowMassIndex > &scvf) const
Returns the velocity at a given sub control volume face.
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:405
auto interfaceThroatVelocity(const FVElementGeometry< freeFlowMomentumIndex > &fvGeometry, const typename FVElementGeometry< freeFlowMomentumIndex >::SubControlVolumeFace &scvf) const
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:316
static constexpr auto poreNetworkIndex
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:190
bool isCoupled(Dune::index_constant< i > domainI, Dune::index_constant< j > domainJ, const SubControlVolume< i > &scv) const
If the boundary entity is on a coupling boundary.
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:438
auto massCouplingCondition(Dune::index_constant< freeFlowMassIndex > domainI, Dune::index_constant< poreNetworkIndex > domainJ, const FVElementGeometry< freeFlowMassIndex > &fvGeometry, const typename FVElementGeometry< freeFlowMassIndex >::SubControlVolumeFace &scvf, const ElementVolumeVariables< freeFlowMassIndex > &elemVolVars) const
Returns the mass flux across the coupling boundary.
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:264
Coupling manager that combines an arbitrary number of binary coupling manager (coupling two domains e...
Definition: multibinarycouplingmanager.hh:50
const auto & couplingStencil(Dune::index_constant< i > domainI, const Entity &entity, Dune::index_constant< j > domainJ) const
Return the coupling element stencil for a given bulk domain element.
Definition: multibinarycouplingmanager.hh:203
Coupling mapper for staggered free-flow and pore-network models.
Definition: boundary/freeflowporenetwork/couplingmapper.hh:42
Defines all properties used in Dumux.
Coupling conditions specialized for different discretization schemes.
typename Detail::FreeFlowCouplingManagerSelector< Traits >::type FreeFlowCouplingManager
The interface of the coupling manager for free flow systems.
Definition: multidomain/freeflow/couplingmanager.hh:47
typename GetProp< TypeTag, Property >::type GetPropType
get the type alias defined in the property
Definition: propertysystem.hh:296
Freeflow coupling managers (Navier-Stokes mass-momentum coupling)
constexpr auto coupledDomains(Dune::index_constant< i > domainI)
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:64
constexpr auto globalToLocalDomainIndices(Dune::index_constant< i >, Dune::index_constant< j >)
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:75
static constexpr auto freeFlowMassIndex
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:35
static constexpr auto freeFlowMomentumIndex
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:34
static constexpr auto freeFlowMomentumToPoreNetworkIndex
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:40
static constexpr auto noCouplingIdx
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:42
static constexpr auto poreNetworkIndex
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:36
static constexpr auto freeFlowMassToFreeFlowMomentumIndex
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:39
constexpr auto makeCouplingManagerMap()
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:44
static constexpr auto freeFlowMassToPoreNetworkIndex
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:41
Definition: adapt.hh:17
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:108
Dumux::FreeFlowCouplingManager< FreeFlowTraits > FreeFlowCouplingManager
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:125
typename MDTraits::template SubDomain< id >::TypeTag SubDomainTypeTag
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:110
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:87
static constexpr auto globalToLocal(Dune::index_constant< i > domainI, Dune::index_constant< j > domainJ)
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:94
static constexpr auto managerMap()
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:88
static constexpr auto coupledDomains(Dune::index_constant< i > domainI)
Definition: multidomain/boundary/freeflowporenetwork/couplingmanager.hh:100
Definition: multidomain/traits.hh:134