Skip to content
Snippets Groups Projects
Commit 63fa2e1c authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[facet][tpfa][darcyslaw] minor beautification

parent a78a2590
No related branches found
No related tags found
1 merge request!1283Feature/test facetcoupling xi
...@@ -104,7 +104,7 @@ public: ...@@ -104,7 +104,7 @@ public:
//! We use the same name as in the TpfaDarcysLawCache so //! We use the same name as in the TpfaDarcysLawCache so
//! that this cache and the law implementation for non-coupled //! that this cache and the law implementation for non-coupled
//! models can be reused here on facets that do not lie on an //! models can be reused here on facets that do not lie on an
//! interior boundary, i.e. do not coincide with a fracture //! interior boundary, i.e. do not coincide with a facet element
Scalar advectionTij() const { return tij_[insideTijIdx]; } Scalar advectionTij() const { return tij_[insideTijIdx]; }
//! returns the transmissibility associated with the inside cell //! returns the transmissibility associated with the inside cell
...@@ -337,17 +337,21 @@ public: ...@@ -337,17 +337,21 @@ public:
//! We use the same name as in the TpfaDarcysLawCache so //! We use the same name as in the TpfaDarcysLawCache so
//! that this cache and the law implementation for non-coupled //! that this cache and the law implementation for non-coupled
//! models can be reused here on facets that do not lie on an //! models can be reused here on facets that do not lie on an
//! interior boundary, i.e. do not coincide with a fracture //! interior boundary, i.e. do not coincide with a facet element
Scalar advectionTij() const { return tij_[insideTijIdx]; } Scalar advectionTij() const
{ return tij_[insideTijIdx]; }
//! returns the transmissibility associated with the inside cell //! returns the transmissibility associated with the inside cell
Scalar advectionTijInside() const { return tij_[insideTijIdx]; } Scalar advectionTijInside() const
{ return tij_[insideTijIdx]; }
//! returns the transmissibility associated with the outside cell //! returns the transmissibility associated with the outside cell
Scalar advectionTijOutside(unsigned int idxInOutside) const {return tij_[firstOutsideTijIdx+idxInOutside]; } Scalar advectionTijOutside(unsigned int idxInOutside) const
{ return tij_[firstOutsideTijIdx+idxInOutside]; }
//! returns the transmissibility associated with the outside cell //! returns the transmissibility associated with the outside cell
Scalar advectionTijFacet() const {return tij_[facetTijIdx]; } Scalar advectionTijFacet() const
{ return tij_[facetTijIdx]; }
private: private:
std::vector<Scalar> tij_; std::vector<Scalar> tij_;
...@@ -394,7 +398,7 @@ class CCTpfaFacetCouplingDarcysLawImpl<ScalarType, FVGridGeometry, /*isNetwork*/ ...@@ -394,7 +398,7 @@ class CCTpfaFacetCouplingDarcysLawImpl<ScalarType, FVGridGeometry, /*isNetwork*/
{ {
static const Scalar gravity = getParamFromGroup<bool>(problem.paramGroup(), "Problem.EnableGravity"); static const Scalar gravity = getParamFromGroup<bool>(problem.paramGroup(), "Problem.EnableGravity");
if (gravity) if (gravity)
DUNE_THROW(Dune::NotImplemented, "gravity for darcys law with facet coupling on surface grids"); DUNE_THROW(Dune::NotImplemented, "Gravity for darcys law with facet coupling on surface grids");
if (!problem.couplingManager().isOnInteriorBoundary(element, scvf)) if (!problem.couplingManager().isOnInteriorBoundary(element, scvf))
return TpfaDarcysLaw::flux(problem, element, fvGeometry, elemVolVars, scvf, phaseIdx, elemFluxVarsCache); return TpfaDarcysLaw::flux(problem, element, fvGeometry, elemVolVars, scvf, phaseIdx, elemFluxVarsCache);
...@@ -458,9 +462,10 @@ class CCTpfaFacetCouplingDarcysLawImpl<ScalarType, FVGridGeometry, /*isNetwork*/ ...@@ -458,9 +462,10 @@ class CCTpfaFacetCouplingDarcysLawImpl<ScalarType, FVGridGeometry, /*isNetwork*/
if (iBcTypes.hasOnlyNeumann()) if (iBcTypes.hasOnlyNeumann())
{ {
const auto& facetVolVars = problem.couplingManager().getLowDimVolVars(element, scvf); const auto& facetVolVars = problem.couplingManager().getLowDimVolVars(element, scvf);
using std::sqrt;
// Here we use the square root of the facet extrusion factor // Here we use the square root of the facet extrusion factor
// as an approximate average distance from scvf ip to facet center // as an approximate average distance from scvf ip to facet center
using std::sqrt;
const auto wFacet = 2.0*area*insideVolVars.extrusionFactor() const auto wFacet = 2.0*area*insideVolVars.extrusionFactor()
/sqrt(facetVolVars.extrusionFactor()) /sqrt(facetVolVars.extrusionFactor())
*vtmv(scvf.unitOuterNormal(), facetVolVars.permeability(), scvf.unitOuterNormal()); *vtmv(scvf.unitOuterNormal(), facetVolVars.permeability(), scvf.unitOuterNormal());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment