Commit 0a34f077 authored by Timo Koch's avatar Timo Koch
Browse files

[1p2c] Delete the useTwoPointGradients function.

The function is unique to the 1p2c model is not actively in use (functions in the spatial params always return false).
It is still possible to globally use two point gradients with the box method by setting the property ImplicitUseTwoPointFluxes.



git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@14442 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent f70335af
......@@ -293,58 +293,37 @@ protected:
const VolumeVariables &volVarsI = elemVolVars[face().i];
const VolumeVariables &volVarsJ = elemVolVars[face().j];
GlobalPosition tmp;
if (!problem.spatialParams().useTwoPointGradient(element, face().i, face().j)) {
// use finite-element gradients
tmp = 0.0;
for (unsigned int idx = 0;
idx < face().numFap;
idx++) // loop over adjacent vertices
{
// FE gradient at vertex idx
const GlobalPosition &feGrad = face().grad[idx];
// index for the element volume variables
int volVarsIdx = face().fapIndices[idx];
// the pressure gradient
tmp = feGrad;
tmp *= elemVolVars[volVarsIdx].pressure();
potentialGrad_ += tmp;
// the mole-fraction gradient
tmp = feGrad;
tmp *= elemVolVars[volVarsIdx].moleFraction(transportCompIdx);
moleFractionGrad_ += tmp;
// phase viscosity
viscosity_ += elemVolVars[volVarsIdx].viscosity()*face().shapeValue[idx];
//phase molar density
molarDensity_ += elemVolVars[volVarsIdx].molarDensity()*face().shapeValue[idx];
//phase density
density_ += elemVolVars[volVarsIdx].density()*face().shapeValue[idx];
}
}
else {
// use two-point gradients
const auto geometry = element.geometry();
const GlobalPosition &globalPosI = geometry.corner(face().i);
const GlobalPosition &globalPosJ = geometry.corner(face().j);
tmp = globalPosI;
tmp -= globalPosJ;
Scalar dist = tmp.two_norm();
tmp = face().normal;
tmp /= face().normal.two_norm()*dist;
potentialGrad_ = tmp;
potentialGrad_ *= volVarsJ.pressure() - volVarsI.pressure();
moleFractionGrad_ = tmp;
moleFractionGrad_ *= volVarsJ.moleFraction(transportCompIdx) - volVarsI.moleFraction(transportCompIdx);
GlobalPosition tmp(0.0);
// use finite-element gradients
for (unsigned int idx = 0; idx < face().numFap; idx++) // loop over adjacent vertices
{
// FE gradient at vertex idx
const GlobalPosition &feGrad = face().grad[idx];
// index for the element volume variables
int volVarsIdx = face().fapIndices[idx];
// the pressure gradient
tmp = feGrad;
tmp *= elemVolVars[volVarsIdx].pressure();
potentialGrad_ += tmp;
// the mole-fraction gradient
tmp = feGrad;
tmp *= elemVolVars[volVarsIdx].moleFraction(transportCompIdx);
moleFractionGrad_ += tmp;
// phase viscosity
viscosity_ += elemVolVars[volVarsIdx].viscosity()*face().shapeValue[idx];
//phase molar density
molarDensity_ += elemVolVars[volVarsIdx].molarDensity()*face().shapeValue[idx];
//phase density
density_ += elemVolVars[volVarsIdx].density()*face().shapeValue[idx];
}
///////////////
// correct the pressure gradients by the gravitational acceleration
///////////////
......
......@@ -185,21 +185,6 @@ public:
return param;
}
/*!
* \brief Define if the model should apply two-point approximation
* instead of a box approximation for the fluxes
*
* \param element The finite element
* \param vertexI first point for the two-point flux approximation
* \param vertexJ second point for the two-point flux approximation
*/
bool useTwoPointGradient(const Element &element,
int vertexI,
int vertexJ) const
{
return false;
}
/*!
* \brief Return dispersivity (not needed here
*
......
......@@ -116,13 +116,6 @@ public:
return 0;
}
bool useTwoPointGradient(const Element &element,
const int vertexI,
const int vertexJ) const
{
return false;
}
/*!
* \brief Returns the heat capacity \f$[J / (kg K)]\f$ of the rock matrix.
*
......
......@@ -116,13 +116,6 @@ public:
return 0;
}
bool useTwoPointGradient(const Element &element,
const int vertexI,
const int vertexJ) const
{
return false;
}
/*!
* \brief Returns the heat capacity \f$[J / (kg K)]\f$ of the rock matrix.
*
......
......@@ -118,13 +118,6 @@ public:
return 0;
}
bool useTwoPointGradient(const Element &element,
const int vertexI,
const int vertexJ) const
{
return false;
}
/*!
* \brief Returns the heat capacity \f$[J / (kg K)]\f$ of the rock matrix.
*
......
......@@ -158,14 +158,6 @@ public:
return materialParams_;
}
bool useTwoPointGradient(const Element &element,
const int vertexI,
const int vertexJ) const
{
return false;
}
/*!
* \brief Returns the heat capacity \f$[J / (kg K)]\f$ of the rock matrix.
*
......
......@@ -165,14 +165,6 @@ public:
return materialParams_;
}
bool useTwoPointGradient(const Element &element,
const int vertexI,
const int vertexJ) const
{
return false;
}
/*!
* \brief Returns the heat capacity \f$[J / (kg K)]\f$ of the rock matrix.
*
......
Markdown is supported
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