Skip to content
Snippets Groups Projects
Commit 92958ad5 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

[Stokes, Stokes2c]

Move (deprecate & add) molarDensity from Stokes to Stokes2c where it
belongs.
After the release, despite removing the deprecated code the member in
StokesFluxVariables must be un-commented and the "this->" must be
removed, too.
(reviewed by klaus)


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@9594 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 896e8fef
No related branches found
No related tags found
No related merge requests found
......@@ -195,7 +195,10 @@ public:
/*!
* \brief Return the molar density \f$ \mathrm{[mol/m^3]} \f$ at the integration point.
* \deprecated Use molarDensity() from Stokes2c model because it does not belong
* to this model.
*/
DUNE_DEPRECATED_MSG("Use molarDensity() from Stokes2c model")
const Scalar molarDensity() const
{ return molarDensity_; }
......@@ -271,7 +274,7 @@ protected:
// values at the integration point
Scalar density_;
Scalar molarDensity_;
Scalar molarDensity_; //!< \deprecated Does not belong to this model but to Stokes2c
Scalar viscosity_;
Scalar pressure_;
Scalar normalvelocity_;
......
......@@ -147,7 +147,10 @@ public:
/*!
* \brief Returns the molar density \f$\mathrm{[mol/m^3]}\f$ of the fluid within the
* sub-control volume.
* \deprecated Use molarDensity() from Stokes2c model because it does not belong
* to this model.
*/
DUNE_DEPRECATED_MSG("Use molarDensity() from Stokes2c model")
Scalar molarDensity() const
{ return fluidState_.density(phaseIdx) / fluidState_.averageMolarMass(phaseIdx); }
......
......@@ -80,6 +80,12 @@ public:
calculateValues_(problem, element, elemVolVars);
}
/*!
* \brief Return the molar density \f$ \mathrm{[mol/m^3]} \f$ at the integration point.
*/
const Scalar molarDensity() const
{ return this->molarDensity_; }
/*!
* \brief Return the mass fraction of the transported component at the integration point.
*/
......@@ -110,6 +116,7 @@ protected:
const Element &element,
const ElementVolumeVariables &elemVolVars)
{
this->molarDensity_ = Scalar(0);
massFraction_ = Scalar(0);
diffusionCoeff_ = Scalar(0);
moleFractionGrad_ = Scalar(0);
......@@ -119,6 +126,8 @@ protected:
idx < this->fvGeometry_.numVertices;
idx++) // loop over vertices of the element
{
this->molarDensity_ += elemVolVars[idx].molarDensity()*
this->face().shapeValue[idx];
massFraction_ += elemVolVars[idx].fluidState().massFraction(phaseIdx, transportCompIdx) *
this->face().shapeValue[idx];
diffusionCoeff_ += elemVolVars[idx].diffusionCoeff() *
......@@ -138,6 +147,7 @@ protected:
Valgrind::CheckDefined(moleFractionGrad_);
}
// Scalar molarDensity_; //Use this variable after the deprecated one from StokesFluxVariables is removed + remove this-> before uses of molarDensity_ in this file
Scalar massFraction_;
Scalar diffusionCoeff_;
DimVector moleFractionGrad_;
......
......@@ -126,6 +126,13 @@ public:
fluidState.setMoleFraction(phaseIdx, phaseCompIdx, massFraction[phaseCompIdx]*avgMolarMass/M2);
}
/*!
* \brief Returns the molar density \f$\mathrm{[mol/m^3]}\f$ of the fluid within the
* sub-control volume.
*/
Scalar molarDensity() const
{ return this->fluidState_.density(phaseIdx) / this->fluidState_.averageMolarMass(phaseIdx); }
/*!
* \brief Returns the binary (mass) diffusion coefficient
*/
......
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