Skip to content
Snippets Groups Projects
Commit 7dbe0f69 authored by Klaus Mosthaf's avatar Klaus Mosthaf
Browse files

Some cosmetic changes in 2p2cboundaryvariables

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@6644 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent d26b261e
No related branches found
No related tags found
No related merge requests found
...@@ -56,9 +56,7 @@ class TwoPTwoCBoundaryVariables ...@@ -56,9 +56,7 @@ class TwoPTwoCBoundaryVariables
typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPTwoCIndices)) Indices; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPTwoCIndices)) Indices;
enum { enum { dim = GridView::dimension };
dim = GridView::dimension,
};
typedef typename GridView::template Codim<0>::Entity Element; typedef typename GridView::template Codim<0>::Entity Element;
typedef Dune::FieldVector<Scalar, dim> VelocityVector; typedef Dune::FieldVector<Scalar, dim> VelocityVector;
...@@ -71,13 +69,13 @@ class TwoPTwoCBoundaryVariables ...@@ -71,13 +69,13 @@ class TwoPTwoCBoundaryVariables
enum { enum {
lPhaseIdx = Indices::lPhaseIdx, lPhaseIdx = Indices::lPhaseIdx,
gPhaseIdx = Indices::gPhaseIdx, gPhaseIdx = Indices::gPhaseIdx
};
enum {
lCompIdx = Indices::lCompIdx, lCompIdx = Indices::lCompIdx,
gCompIdx = Indices::gCompIdx, gCompIdx = Indices::gCompIdx
numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases))
}; };
enum { numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)) };
public: public:
TwoPTwoCBoundaryVariables(const Problem &problem, TwoPTwoCBoundaryVariables(const Problem &problem,
...@@ -86,7 +84,8 @@ public: ...@@ -86,7 +84,8 @@ public:
int boundaryFaceIdx, int boundaryFaceIdx,
const ElementVolumeVariables &elemDat, const ElementVolumeVariables &elemDat,
int scvIdx) int scvIdx)
: fvElemGeom_(elemGeom), scvIdx_(scvIdx) : fvElemGeom_(elemGeom),
scvIdx_(scvIdx)
{ {
boundaryFace_ = &fvElemGeom_.boundaryFace[boundaryFaceIdx]; boundaryFace_ = &fvElemGeom_.boundaryFace[boundaryFaceIdx];
...@@ -97,6 +96,8 @@ public: ...@@ -97,6 +96,8 @@ public:
potentialGrad_[phaseIdx] = Scalar(0); potentialGrad_[phaseIdx] = Scalar(0);
concentrationGrad_[phaseIdx] = Scalar(0); concentrationGrad_[phaseIdx] = Scalar(0);
molarConcGrad_[phaseIdx] = Scalar(0); molarConcGrad_[phaseIdx] = Scalar(0);
KmvpNormal_[phaseIdx] = Scalar(0);
porousDiffCoeff_[phaseIdx] = Scalar(0);
} }
calculateBoundaryValues_(problem, element, elemDat); calculateBoundaryValues_(problem, element, elemDat);
...@@ -197,9 +198,12 @@ protected: ...@@ -197,9 +198,12 @@ protected:
for (int phaseIdx=0; phaseIdx < numPhases; phaseIdx++) for (int phaseIdx=0; phaseIdx < numPhases; phaseIdx++)
{ {
tmp = problem.gravity(); if (GET_PARAM(TypeTag, bool, EnableGravity)) {
tmp *= densityAtIP_[phaseIdx]; tmp = problem.gravity();
tmp *= densityAtIP_[phaseIdx];
}
// calculate the potential gradient
potentialGrad_[phaseIdx] -= tmp; potentialGrad_[phaseIdx] -= tmp;
Scalar k = problem.spatialParameters().intrinsicPermeability(element, fvElemGeom_, scvIdx_); Scalar k = problem.spatialParameters().intrinsicPermeability(element, fvElemGeom_, scvIdx_);
......
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