Commit 68c2b32e authored by Thomas Fetzer's avatar Thomas Fetzer
Browse files

[ stokes ] deprecated viscosity(), use dynamicViscosity() instead or for

viscosity()/density() the kinematicViscosity() function
- reviewed by johannes


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10496 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 76b7a57d
......@@ -84,7 +84,7 @@ protected:
DimVector tmp(0.0);
density_ = Scalar(0);
viscosity_ = Scalar(0);
dynamicViscosity_ = Scalar(0);
pressure_ = Scalar(0);
normalvelocity_ = Scalar(0);
velocity_ = Scalar(0);
......@@ -99,7 +99,7 @@ protected:
// phase density and viscosity at IP
density_ += elemVolVars[idx].density() *
face().shapeValue[idx];
viscosity_ += elemVolVars[idx].viscosity() *
dynamicViscosity_ += elemVolVars[idx].dynamicViscosity() *
face().shapeValue[idx];
pressure_ += elemVolVars[idx].pressure() *
face().shapeValue[idx];
......@@ -133,7 +133,7 @@ protected:
normalvelocity_ = velocity_ * face().normal;
Valgrind::CheckDefined(density_);
Valgrind::CheckDefined(viscosity_);
Valgrind::CheckDefined(dynamicViscosity_);
Valgrind::CheckDefined(normalvelocity_);
Valgrind::CheckDefined(velocity_);
Valgrind::CheckDefined(pressureGrad_);
......@@ -193,8 +193,23 @@ public:
* \brief Return the dynamic viscosity \f$ \mathrm{[Pa\cdot s]} \f$ at the integration
* point.
*/
DUNE_DEPRECATED_MSG("function StokesFluxVariables::viscosity() is deprecated, use StokesFluxVariables::dynamicViscosity() instead.")
Scalar viscosity() const
{ return viscosity_; }
{ return dynamicViscosity(); }
/*!
* \brief Return the dynamic viscosity \f$ \mathrm{[Pa\cdot s]} \f$ at the integration
* point.
*/
Scalar dynamicViscosity() const
{ return dynamicViscosity_; }
/*!
* \brief Returns the kinematic viscosity \f$ \frac{m^2}{s} \f$ of the fluid in
* the sub-control volume.
*/
Scalar kinematicViscosity() const
{ return dynamicViscosity_ / density_; }
/*!
* \brief Return the velocity \f$ \mathrm{[m/s]} \f$ at the integration
......@@ -261,7 +276,7 @@ protected:
// values at the integration point
Scalar density_;
Scalar viscosity_;
Scalar dynamicViscosity_;
Scalar pressure_;
Scalar normalvelocity_;
// Scalar velocityDiv_;
......
......@@ -209,7 +209,7 @@ protected:
// momentum balance - pressure is evaluated as volume term
// at the center of the SCV in computeSource
// viscosity is upwinded
// dynamic viscosity is upwinded
// compute symmetrized gradient for the momentum flux:
// mu (grad v + (grad v)^t)
......@@ -226,7 +226,7 @@ protected:
// TODO: dilatation term has to be accounted for in outflow, coupling, neumann
// velGradComp[velIdx] += 2./3*fluxVars.velocityDiv;
velGradComp *= fluxVars.viscosity() + fluxVars.eddyViscosity();
velGradComp *= fluxVars.dynamicViscosity() + fluxVars.eddyViscosity();
flux[momentumXIdx + velIdx] -=
velGradComp*fluxVars.face().normal;
......@@ -381,7 +381,7 @@ protected:
boundaryVars.face().normal;
boundaryVars.velocityGrad().umv(boundaryFaceNormal, muGradVelNormal);
muGradVelNormal *= boundaryVars.viscosity();
muGradVelNormal *= boundaryVars.dynamicViscosity();
for (unsigned int i=0; i < this->residual_.size(); i++)
Valgrind::CheckDefined(this->residual_[i]);
......@@ -465,7 +465,7 @@ protected:
tangent[1] = -elementUnitNormal[0];
DimVector tangentialVelGrad;
boundaryVars.velocityGrad().mv(tangent, tangentialVelGrad);
tangentialVelGrad *= boundaryVars.viscosity();
tangentialVelGrad *= boundaryVars.dynamicViscosity();
this->residual_[scvIdx][massBalanceIdx] -= stabilizationBeta_*0.5*
this->curVolVars_(scvIdx).pressure();
......@@ -525,7 +525,7 @@ protected:
boundaryVars.velocityGrad().mv(tangent, tangentialVelGrad);
this->residual_[scvIdx][massBalanceIdx] -= 0.5*stabilizationBeta_
* boundaryVars.viscosity()
* boundaryVars.dynamicViscosity()
* (tangentialVelGrad*tangent);
}
}
......
......@@ -184,7 +184,7 @@ public:
pN[globalIdx] = volVars.pressure();
delP[globalIdx] = volVars.pressure() - 1e5;
rho[globalIdx] = volVars.density();
mu[globalIdx] = volVars.viscosity();
mu[globalIdx] = volVars.dynamicViscosity();
velocity[globalIdx] = volVars.velocity();
}
}
......
......@@ -148,6 +148,7 @@ public:
* \brief Returns the fluid pressure \f$\mathrm{[Pa]}\f$ within
* the sub-control volume.
*/
DUNE_DEPRECATED_MSG("type StokesFluxVariables::viscosity() is deprecated, use StokesFluxVariables::dynamicViscosity() instead.");
Scalar pressure() const
{ return fluidState_.pressure(phaseIdx); }
......@@ -161,9 +162,24 @@ public:
* \brief Returns the dynamic viscosity \f$ \mathrm{[Pa s]} \f$ of the fluid in
* the sub-control volume.
*/
DUNE_DEPRECATED_MSG("function StokesFluxVariables::viscosity() is deprecated, use StokesFluxVariables::dynamicViscosity() instead.")
Scalar viscosity() const
{ return dynamicViscosity(); }
/*!
* \brief Returns the dynamic viscosity \f$ \mathrm{[Pa s]} \f$ of the fluid in
* the sub-control volume.
*/
Scalar dynamicViscosity() const
{ return fluidState_.viscosity(phaseIdx); }
/*!
* \brief Returns the kinematic viscosity \f$ \frac{m^2}{s} \f$ of the fluid in
* the sub-control volume.
*/
Scalar kinematicViscosity() const
{ return fluidState_.viscosity(phaseIdx) / fluidState_.density(phaseIdx); }
/*!
* \brief Returns the velocity vector in the sub-control volume.
*/
......
......@@ -135,7 +135,7 @@ public:
delP[globalIdx] = volVars.pressure()*scale_ - 1e5;
Xw[globalIdx] = volVars.fluidState().massFraction(phaseIdx, transportCompIdx);
rho[globalIdx] = volVars.density()*scale_*scale_*scale_;
mu[globalIdx] = volVars.viscosity()*scale_;
mu[globalIdx] = volVars.dynamicViscosity()*scale_;
velocity[globalIdx] = volVars.velocity();
velocity[globalIdx] *= 1/scale_;
}
......
......@@ -147,7 +147,7 @@ public:
Xw [globalIdx] = volVars.fluidState().massFraction(phaseIdx, transportCompIdx);
T [globalIdx] = volVars.temperature();
rho [globalIdx] = volVars.density();
mu [globalIdx] = volVars.viscosity();
mu [globalIdx] = volVars.dynamicViscosity();
h [globalIdx] = volVars.enthalpy();
// D [globalIdx] = volVars.diffusionCoeff();
velocity[globalIdx] = volVars.velocity();
......
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