3.3.0
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Dumux::FvMpfaL3d2P2CInteractionVolumeContainerAdaptive< TypeTag > Class Template Reference

Interaction volume container for compositional adaptive 3-d (using MPFA L-method) Model. More...

#include <dumux/porousmediumflow/2p2c/sequential/fvmpfal3dinteractionvolumecontaineradaptive.hh>

Inheritance diagram for Dumux::FvMpfaL3d2P2CInteractionVolumeContainerAdaptive< TypeTag >:

Description

template<class TypeTag>
class Dumux::FvMpfaL3d2P2CInteractionVolumeContainerAdaptive< TypeTag >

Interaction volume container for compositional adaptive 3-d (using MPFA L-method) Model.

Container class which stores MPFA-interaction-volume information for each vertex of a DUNE grid.

For the compositional case, we predominantly apply a TPFA, which is the reason why the model loops over all cells and their interfaces. This means that the in the case of a hanging node, the mpfa has to be build from an interface, so the mpfa implementation needs to be access, which is facilitated by this class. Provides methods that determines which MPFA case needs to be considered.

Public Types

using InteractionVolume = GetPropType< TypeTag, Properties::MPFAInteractionVolume >
 Type for storing an MPFA-interaction-volume. (Usually of type FvMpfaL3dInteractionVolume or FvMpfaL3dInteractionVolumeAdaptive) More...
 
using GlobalInteractionVolumeVector = std::vector< InteractionVolume >
 
using FaceAreaVector = std::vector< Dune::FieldVector< Dune::FieldVector< Scalar, 2 >, 2 *dim > >
 

Public Member Functions

void storeBoundaryInteractionVolume (InteractionVolume &interactionVolume, const Vertex &vertex)
 Overwrites the method from the base class FvMpfaL3dInteractionVolumeContainerAdaptive On each boundary, a TPFA is used in compositional models. Therefore we do not need to store interaction volume containers on the boundary cells. More...
 
int getMpfaCase8cells (const IntersectionIterator &isIt, const int localidxLarge, InteractionVolume &interactionVolume, bool &properFluxDirection)
 Determine the subVolumeFaceIdx for a given intersection and interactionVolume with 8 cells. More...
 
int getMpfaCase6cells (const IntersectionIterator &isIt, InteractionVolume &interactionVolume, bool &properFluxDirection)
 Determine the subVolumeFaceIdx for a given intersection and interactionVolume with 6 cells. More...
 
int getMpfaCase2or4cells (const IntersectionIterator &isIt, InteractionVolume &interactionVolume, bool &properFluxDirection)
 Determine the subVolumeFaceIdx for a given intersection and interactionVolume with 2/4 cells. More...
 
 FvMpfaL3d2P2CInteractionVolumeContainerAdaptive (Problem &problem)
 
std::set< int > & faceVerticeIndices (int eIdxGlobal, int fIdx)
 Returns the set of vertices on an element face. More...
 
void update ()
 Updates the interaction volume container. More...
 
void initialize (bool solveTwice=true)
 Initializes the interaction volume container. More...
 
InteractionVolumeinteractionVolume (int vertexIdx)
 Returns an interaction volume. More...
 
InteractionVolumeinteractionVolume (int vertexIdx) const
 Returns an interaction volume. More...
 
GlobalInteractionVolumeVectorinteractionVolumesGlobal ()
 Returns the interaction volumes container. More...
 
GlobalInteractionVolumeVectorinteractionVolumesGlobal () const
 Returns the interaction volumes container. More...
 
Scalar faceAreaFactor (InteractionVolume &interactionVolume, int elemGlobalIdx, int elemLocalIdx, int localFaceIdx)
 Returns the area weighting factor for the fluxes. More...
 
Scalar faceAreaFactor (int elemGlobalIdx, int indexInInside)
 Returns the area weighting factor for the fluxes. More...
 
Scalar getRealFluxFaceArea (InteractionVolume &interactionVolume, int elemGlobalIdx, int elemLocalIdx, int localFaceIdx)
 Returns the area trough which fluxes are calculated by the MPFA. More...
 
Scalar getRealFluxFaceArea (int elemGlobalIdx, int indexInInside)
 Returns the area trough which fluxes are calculated by the MPFA. More...
 
Scalar getRealFaceArea (InteractionVolume &interactionVolume, int elemGlobalIdx, int elemLocalIdx, int localFaceIdx)
 Returns the face area of the element. More...
 
Scalar getRealFaceArea (int elemGlobalIdx, int indexInInside)
 Returns the face area of the element. More...
 

Protected Member Functions

void storeInnerInteractionVolume (InteractionVolume &interactionVolume, const Vertex &vertex, bool sameLevel=true)
 Stores additional information which can be constructed for interaction volumes of non-boundary vertices. More...
 
void storeInteractionVolumeInfo ()
 Stores interaction volumes for each grid vertex. More...
 
void storeSubVolumeElements (const Element &element, std::vector< std::vector< int > > &elemVertMap)
 Function for storing the elements of an interaction volume and constructing a map from a vertex to its surrounding elements. More...
 
void storeIntersectionInfo (const Element &element, std::vector< std::vector< int > > &elemVertMap)
 Stores information with respect to DUNE intersections in the interaction volumes. More...
 
void addRealFluxFaceArea_ (Scalar faceArea, int eIdxGlobal, int fIdx)
 
void addRealFaceArea_ (Scalar faceArea, int eIdxGlobal, int fIdx)
 

Protected Attributes

GlobalInteractionVolumeVector interactionVolumes_
 
FaceAreaVector realFluxFaceArea_
 

Member Typedef Documentation

◆ FaceAreaVector

template<class TypeTag >
using Dumux::FvMpfaL3d2P2CInteractionVolumeContainerAdaptive< TypeTag >::FaceAreaVector = std::vector<Dune::FieldVector<Dune::FieldVector<Scalar, 2>, 2*dim> >

◆ GlobalInteractionVolumeVector

template<class TypeTag >
using Dumux::FvMpfaL3d2P2CInteractionVolumeContainerAdaptive< TypeTag >::GlobalInteractionVolumeVector = std::vector<InteractionVolume>

◆ InteractionVolume

template<class TypeTag >
using Dumux::FvMpfaL3d2P2CInteractionVolumeContainerAdaptive< TypeTag >::InteractionVolume = GetPropType<TypeTag, Properties::MPFAInteractionVolume>

Type for storing an MPFA-interaction-volume. (Usually of type FvMpfaL3dInteractionVolume or FvMpfaL3dInteractionVolumeAdaptive)

Constructor & Destructor Documentation

◆ FvMpfaL3d2P2CInteractionVolumeContainerAdaptive()

template<class TypeTag >
Dumux::FvMpfaL3d2P2CInteractionVolumeContainerAdaptive< TypeTag >::FvMpfaL3d2P2CInteractionVolumeContainerAdaptive ( Problem &  problem)
inline

Member Function Documentation

◆ addRealFaceArea_()

template<class TypeTag >
void Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::addRealFaceArea_ ( Scalar  faceArea,
int  eIdxGlobal,
int  fIdx 
)
inlineprotectedinherited

◆ addRealFluxFaceArea_()

template<class TypeTag >
void Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::addRealFluxFaceArea_ ( Scalar  faceArea,
int  eIdxGlobal,
int  fIdx 
)
inlineprotectedinherited

◆ faceAreaFactor() [1/2]

template<class TypeTag >
Scalar Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::faceAreaFactor ( int  elemGlobalIdx,
int  indexInInside 
)
inlineinherited

Returns the area weighting factor for the fluxes.

Parameters
elemGlobalIdxGlobal index of an element in the DUNE grid
indexInInsideLocal index of the face in the DUNE reference element
Returns
Ratio of the element face area and the flux face area through which fluxes are calculated by the MPFA method (1 if an element does not touches the domain boundary!)

◆ faceAreaFactor() [2/2]

template<class TypeTag >
Scalar Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::faceAreaFactor ( InteractionVolume interactionVolume,
int  elemGlobalIdx,
int  elemLocalIdx,
int  localFaceIdx 
)
inlineinherited

Returns the area weighting factor for the fluxes.

Parameters
interactionVolumeAn interaction volume object
elemGlobalIdxGlobal index of an element in the DUNE grid
elemLocalIdxLocal index of an element in the interaction volume
localFaceIdxLocal index of a flux face with respect to an element of the interaction volume
Returns
Ratio of the element face area and the flux face area through which fluxes are calculated by the MPFA method (1 if an element does not touches the domain boundary!)

◆ faceVerticeIndices()

template<class TypeTag >
std::set< int > & Dumux::FvMpfaL3dInteractionVolumeContainerAdaptive< TypeTag >::faceVerticeIndices ( int  eIdxGlobal,
int  fIdx 
)
inlineinherited

Returns the set of vertices on an element face.

The DUNE reference elements does not allow to access hanging nodes from a given element face. However, if a flux through a entire element face has to be calculated, e.g. if single fluxes have to be updated in an implicit treatment of the transport equation, it is necessary to get the complete set of vertices on a face: 4 corners + all hanging nodes.

◆ getMpfaCase2or4cells()

template<class TypeTag >
int Dumux::FvMpfaL3d2P2CInteractionVolumeContainerAdaptive< TypeTag >::getMpfaCase2or4cells ( const IntersectionIterator &  isIt,
InteractionVolume interactionVolume,
bool &  properFluxDirection 
)
inline

Determine the subVolumeFaceIdx for a given intersection and interactionVolume with 2/4 cells.

The MPFA is about to be calculated through an intersection, and to do so, its place in the local indexing scheme, i.e. its subVolumeFaceIdx, has to be found. This method investigates the case (see FvMpfaL3dInteractionVolumeAdaptive.HangingNodeTypes ) if 2 or 4 cells are present in the current interaction region.

Parameters
isItThe iterator of the intersection the mpfa should be calculated for
interactionVolumeThe interaction volume (FvMpfaL3dInteractionVolumeAdaptive) of interest
properFluxDirectionIndicates whether the flux through the intersection aligns with its normal
Returns
The Subvolume Face Idx required by the methods in FvMpfaL3dTransmissibilityCalculator

◆ getMpfaCase6cells()

template<class TypeTag >
int Dumux::FvMpfaL3d2P2CInteractionVolumeContainerAdaptive< TypeTag >::getMpfaCase6cells ( const IntersectionIterator &  isIt,
InteractionVolume interactionVolume,
bool &  properFluxDirection 
)
inline

Determine the subVolumeFaceIdx for a given intersection and interactionVolume with 6 cells.

The MPFA is about to be calculated through an intersection, and to do so, its place in the local indexing scheme, i.e. its subVolumeFaceIdx, has to be found. This method investigates the case (see FvMpfaL3dInteractionVolumeAdaptive.HangingNodeTypes ) if 6 cells are present in the current interaction region.

Parameters
isItThe iterator of the intersection the mpfa should be calculated for
interactionVolumeThe interaction volume (FvMpfaL3dInteractionVolumeAdaptive) of interest
properFluxDirectionIndicates whether the flux through the intersection aligns with its normal
Returns
The Subvolume Face Idx required by the methods in FvMpfaL3dTransmissibilityCalculator

◆ getMpfaCase8cells()

template<class TypeTag >
int Dumux::FvMpfaL3d2P2CInteractionVolumeContainerAdaptive< TypeTag >::getMpfaCase8cells ( const IntersectionIterator &  isIt,
const int  localIdxLarge,
InteractionVolume interactionVolume,
bool &  properFluxDirection 
)
inline

Determine the subVolumeFaceIdx for a given intersection and interactionVolume with 8 cells.

The MPFA is about to be calculated through an intersection, and to do so, its place in the local indexing scheme, i.e. its subVolumeFaceIdx, has to be found. This method investigates the case (see FvMpfaL3dInteractionVolumeAdaptive.HangingNodeTypes ) if 8 cells are present in the current interaction region: A Interaction region where the non-adaptive MPFA-model is applied. This requires a local Index of the "large" cell (where the hanging node rests) to get the right subVolumeFaceIdx.

Parameters
isItThe iterator of the intersection the mpfa should be calculated for
localIdxLargeThe (local) Index of the large cell (on which the hanging node lives)
interactionVolumeThe interaction volume (FvMpfaL3dInteractionVolumeAdaptive) of interest
properFluxDirectionIndicates whether the flux through the intersection aligns with its normal
Returns
The Subvolume Face Idx required by the methods in FvMpfaL3dTransmissibilityCalculator

◆ getRealFaceArea() [1/2]

template<class TypeTag >
Scalar Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::getRealFaceArea ( int  elemGlobalIdx,
int  indexInInside 
)
inlineinherited

Returns the face area of the element.

Parameters
elemGlobalIdxGlobal index of an element in the DUNE grid
indexInInsideLocal index of the face in the DUNE reference element
Returns
the face area of the element

◆ getRealFaceArea() [2/2]

template<class TypeTag >
Scalar Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::getRealFaceArea ( InteractionVolume interactionVolume,
int  elemGlobalIdx,
int  elemLocalIdx,
int  localFaceIdx 
)
inlineinherited

Returns the face area of the element.

Parameters
interactionVolumeAn interaction volume object
elemGlobalIdxGlobal index of an element in the DUNE grid
elemLocalIdxLocal index of an element in the interaction volume
localFaceIdxLocal index of a flux face with respect to an element of the interaction volume
Returns
the face area of the element

◆ getRealFluxFaceArea() [1/2]

template<class TypeTag >
Scalar Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::getRealFluxFaceArea ( int  elemGlobalIdx,
int  indexInInside 
)
inlineinherited

Returns the area trough which fluxes are calculated by the MPFA.

Parameters
elemGlobalIdxGlobal index of an element in the DUNE grid
indexInInsideLocal index of the face in the DUNE reference element
Returns
flux face area (equal to the element face area if an element does not touches the domain boundary!)

◆ getRealFluxFaceArea() [2/2]

template<class TypeTag >
Scalar Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::getRealFluxFaceArea ( InteractionVolume interactionVolume,
int  elemGlobalIdx,
int  elemLocalIdx,
int  localFaceIdx 
)
inlineinherited

Returns the area trough which fluxes are calculated by the MPFA.

Parameters
interactionVolumeAn interaction volume object
elemGlobalIdxGlobal index of an element in the DUNE grid
elemLocalIdxLocal index of an element in the interaction volume
localFaceIdxLocal index of a flux face with respect to an element of the interaction volume
Returns
flux face area (equal to the element face area if an element does not touches the domain boundary!)

◆ initialize()

template<class TypeTag >
void Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::initialize ( bool  solveTwice = true)
inlineinherited

Initializes the interaction volume container.

Builds and stores the interaction volumes for the entire grid

◆ interactionVolume() [1/2]

template<class TypeTag >
InteractionVolume & Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::interactionVolume ( int  vertexIdx)
inlineinherited

Returns an interaction volume.

Parameters
vertexIdxGlobal index of a vertex in the DUNE grid

◆ interactionVolume() [2/2]

template<class TypeTag >
InteractionVolume & Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::interactionVolume ( int  vertexIdx) const
inlineinherited

Returns an interaction volume.

Parameters
vertexIdxGlobal index of a vertex in the DUNE grid

◆ interactionVolumesGlobal() [1/2]

template<class TypeTag >
GlobalInteractionVolumeVector & Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::interactionVolumesGlobal ( )
inlineinherited

Returns the interaction volumes container.

◆ interactionVolumesGlobal() [2/2]

template<class TypeTag >
GlobalInteractionVolumeVector & Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::interactionVolumesGlobal ( ) const
inlineinherited

Returns the interaction volumes container.

◆ storeBoundaryInteractionVolume()

template<class TypeTag >
void Dumux::FvMpfaL3d2P2CInteractionVolumeContainerAdaptive< TypeTag >::storeBoundaryInteractionVolume ( InteractionVolume interactionVolume,
const Vertex &  vertex 
)

Overwrites the method from the base class FvMpfaL3dInteractionVolumeContainerAdaptive On each boundary, a TPFA is used in compositional models. Therefore we do not need to store interaction volume containers on the boundary cells.

◆ storeInnerInteractionVolume()

template<class TypeTag >
void Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::storeInnerInteractionVolume ( InteractionVolume interactionVolume,
const Vertex &  vertex,
bool  sameLevel = true 
)
protectedinherited

Stores additional information which can be constructed for interaction volumes of non-boundary vertices.

Stores additional information which can be constructed for interaction volumes of non-boundary vertices:

  • edge coordinates (coordinates of edge-continuity-points)
  • flux face areas

Assumes a local storage following the DUNE reference element index, which is performed by the function FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeSubVolumeElements(const Element& element, std::vector < std::vector<int> >& elemVertMap).

Parameters
interactionVolumeAn interaction volume object
vertexThe vertex (level dim entity) for which the interaction volume is stored
sameLevelLevel indicator: true if all elements of an interaction volume are of the same level

◆ storeInteractionVolumeInfo()

template<class TypeTag >
void Dumux::FvMpfaL3dInteractionVolumeContainerAdaptive< TypeTag >::storeInteractionVolumeInfo
protectedinherited

Stores interaction volumes for each grid vertex.

◆ storeIntersectionInfo()

template<class TypeTag >
void Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::storeIntersectionInfo ( const Element &  element,
std::vector< std::vector< int > > &  elemVertMap 
)
protectedinherited

Stores information with respect to DUNE intersections in the interaction volumes.

Stores information with respect to DUNE intersections, such as normals, in the interaction volumes. Assumes a local storage following the DUNE reference element index, which is performed by the function FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeSubVolumeElements(const Element& element, std::vector < std::vector<int> >& elemVertMap).

Parameters
elementA level 0 Entity of a DUNE grid
elemVertMapVector containing the global vertex-element map

◆ storeSubVolumeElements()

template<class TypeTag >
void Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::storeSubVolumeElements ( const Element &  element,
std::vector< std::vector< int > > &  elemVertMap 
)
protectedinherited

Function for storing the elements of an interaction volume and constructing a map from a vertex to its surrounding elements.

Stores an element in all interaction volumes it belongs to. Additionally, the global index of an element is stored at the position of its local index according to a DUNE reference element for every vertex of the element.

Parameters
elementA level 0 Entity of a DUNE grid
elemVertMapVector containing the global vertex-element map

◆ update()

template<class TypeTag >
void Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::update ( )
inlineinherited

Updates the interaction volume container.

Rebuilds and stores the interaction volumes for the entire grid

Member Data Documentation

◆ interactionVolumes_

template<class TypeTag >
GlobalInteractionVolumeVector Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::interactionVolumes_
protectedinherited

◆ realFluxFaceArea_

template<class TypeTag >
FaceAreaVector Dumux::FvMpfaL3dInteractionVolumeContainer< TypeTag >::realFluxFaceArea_
protectedinherited

The documentation for this class was generated from the following file: