Commit 596f24c2 authored by Martin Schneider's avatar Martin Schneider
Browse files

[md][ffpm][box] Consistently use facet instead of segment

parent e853ae4b
......@@ -172,7 +172,7 @@ public:
*
* The tangential porous medium velocity needs to be evaluated for the classical and new tangential coupling (slipCondition) at the
* stokes-darcy interface, "Effective coupling conditions for arbitrary flows in Stokes-Darcy systems" by Elissa Eggenweiler.
* We use darcys law and perform an integral average over all coupling segments.
* We use darcys law and perform an integral average over all coupling facets.
*
* Depending on the parameter "Problem.NewIc" the standard permeability tensor K
* or an altered permeability tensor M is used to evaluate the velocity. The method is using K per default.
......@@ -193,7 +193,7 @@ public:
const auto& stokesContext = this->couplingManager().stokesCouplingContextVector(element, scvf);
static const bool enableGravity = getParamFromGroup<bool>(this->couplingManager().problem(porousMediumIdx).paramGroup(), "Problem.EnableGravity");
// iteration over the different coupling segments
// iteration over the different coupling facets
for (const auto& data : stokesContext)
{
if (scvf.index() == data.stokesScvfIdx)
......@@ -245,12 +245,12 @@ public:
// darcy spatial dependent parameters
const auto& epsInterface = this->couplingManager().problem(freeFlowIdx).epsInterface(scvf);
const auto& M = this->couplingManager().problem(freeFlowIdx).matrixNTangential(scvf);
//Add the integrated segment velocity to the sum: v+= -w_k * sqrt(det(A^T*A))*eps**2*M/mu*gradP
//Add the integrated facet velocity to the sum: v+= -w_k * sqrt(det(A^T*A))*eps**2*M/mu*gradP
velocity += mv(M, mv(qp.weight()*couplingFacet.geometry.integrationElement(ipLocal)/elemVolVars[darcyScvf.insideScvIdx()].viscosity(darcyPhaseIdx)*epsInterface*epsInterface, gradP));
}
else
{
//add the integrated segment velocity to the sum: v+= -weight_k * sqrt(det(A^T*A))*K/mu*gradP
//add the integrated facet velocity to the sum: v+= -weight_k * sqrt(det(A^T*A))*K/mu*gradP
velocity += mv(K, mv(-qp.weight()*couplingFacet.geometry.integrationElement(ipLocal)/elemVolVars[darcyScvf.insideScvIdx()].viscosity(darcyPhaseIdx), gradP));
}
}
......
......@@ -65,7 +65,7 @@ namespace Detail {
return ProjectionMethod::L2Projection;
}
// Each context object contains the data related to one coupling segment
// Each context object contains the data related to one coupling facet
template <class MDTraits, typename CouplingFacetGeometry>
struct StokesCouplingContext
{
......@@ -739,7 +739,7 @@ public:
auto fvGeometry = localView(this->problem(porousMediumIdx).gridGeometry());
auto elemVolVars = localView(darcyElemVolVars.gridVolVars());
// integrate darcy pressure over each coupling segment and average
// integrate darcy pressure over each coupling facet and average
for(const auto& couplingFacet : couplingFacets(domainI, couplingMapper_, stokesScvf.insideScvIdx(), stokesScvf.localFaceIdx()))
{
const auto darcyEIdxI = this->problem(porousMediumIdx).gridGeometry().elementMapper().index(darcyElement);
......@@ -750,12 +750,12 @@ public:
if(darcyEIdxI == darcyEIdxJ)
{
projection += calculateSegmentIntegral(element, fvGeometry, fvGeometry.scvf(couplingFacet.pmScvfIdx), darcyElemVolVars, couplingFacet.geometry, evalPriVar);
projection += calculateFacetIntegral(element, fvGeometry, fvGeometry.scvf(couplingFacet.pmScvfIdx), darcyElemVolVars, couplingFacet.geometry, evalPriVar);
}
else
{
elemVolVars.bind(element, fvGeometry, this->curSol()[porousMediumIdx]);
projection += calculateSegmentIntegral(element, fvGeometry, fvGeometry.scvf(couplingFacet.pmScvfIdx), elemVolVars, couplingFacet.geometry, evalPriVar);
projection += calculateFacetIntegral(element, fvGeometry, fvGeometry.scvf(couplingFacet.pmScvfIdx), elemVolVars, couplingFacet.geometry, evalPriVar);
}
}
......@@ -776,7 +776,7 @@ public:
Scalar projection = 0.0;
// integrate darcy pressure over each coupling segment and average
// integrate darcy pressure over each coupling facet and average
for (const auto& data : stokesCouplingContext_)
{
//ToDo Is this if really necessary?
......@@ -785,7 +785,7 @@ public:
const auto& elemVolVars = *(data.elementVolVars);
const auto& darcyScvf = data.fvGeometry.scvf(data.darcyScvfIdx);
const auto& couplingFacet = couplingMapper_.couplingFacet(data.facetIdx);
projection += calculateSegmentIntegral(data.element, data.fvGeometry, darcyScvf, elemVolVars, couplingFacet.geometry, evalPriVar);
projection += calculateFacetIntegral(data.element, data.fvGeometry, darcyScvf, elemVolVars, couplingFacet.geometry, evalPriVar);
}
}
......@@ -795,14 +795,14 @@ public:
}
template<class CouplingFacetGeometry, class Function>
Scalar calculateSegmentIntegral(const Element<porousMediumIdx>& element,
Scalar calculateFacetIntegral(const Element<porousMediumIdx>& element,
const FVElementGeometry<porousMediumIdx>& fvGeometry,
const SubControlVolumeFace<porousMediumIdx>& scvf,
const ElementVolumeVariables<porousMediumIdx>& elemVolVars,
const CouplingFacetGeometry& facetGeometry,
Function evalPriVar) const
{
Scalar segmentProjection = 0.0;
Scalar facetProjection = 0.0;
if constexpr (projectionMethod == ProjectionMethod::L2Projection)
{
const auto& localBasis = fvGeometry.feLocalBasis();
......@@ -823,19 +823,19 @@ public:
for (const auto& scv : scvs(fvGeometry))
value += evalPriVar(elemVolVars, scv)*shapeValues[scv.indexInElement()][0];
segmentProjection += value*facetGeometry.integrationElement(qp.position())*qp.weight();
facetProjection += value*facetGeometry.integrationElement(qp.position())*qp.weight();
}
}
else if constexpr (projectionMethod == ProjectionMethod::AreaWeightedDofEvaluation)
{
segmentProjection = facetGeometry.volume()*evalPriVar(elemVolVars, fvGeometry.scv(scvf.insideScvIdx()));
facetProjection = facetGeometry.volume()*evalPriVar(elemVolVars, fvGeometry.scv(scvf.insideScvIdx()));
}
else
{
DUNE_THROW(Dune::NotImplemented, "Unkown projection method!");
}
return segmentProjection;
return facetProjection;
}
const auto& couplingFacet(std::size_t idx) const
......
......@@ -156,10 +156,10 @@ private:
static_assert(GridGeometry<porousMediumIdx>::discMethod == DiscretizationMethod::box, "The Darcy domain must use the Box discretization");
public:
// export the type describing a coupling segment
// export the type describing a coupling facet
struct CouplingFacet
{
// each intersection segment is described by a simplex geometry of codimension one
// each intersection facet is described by a simplex geometry of codimension one
using Geometry = Dune::AffineGeometry<ctype, dim-1, dimWorld>;
std::size_t ffEIdx;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment