From a457dcaccc805d38fdb4e3329f476aac16f7bb3e Mon Sep 17 00:00:00 2001 From: Thomas Fetzer <thomas.fetzer@iws.uni-stuttgart.de> Date: Wed, 9 Apr 2014 15:10:06 +0000 Subject: [PATCH] [multidomain] added eddy viscosity, diffusivity and conductivity to couplinglocalresiduals. this is done in consistency with the freeflow stokes models. the eddy coefficient are zero for the stokes case. approved by gruenich git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@12738 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- .../2cnistokes2p2cni/2cnistokes2p2cnilocaloperator.hh | 2 +- dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh | 6 +++--- .../couplinglocalresiduals/stokesnccouplinglocalresidual.hh | 6 ++++-- .../stokesncnicouplinglocalresidual.hh | 5 +++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/dumux/multidomain/2cnistokes2p2cni/2cnistokes2p2cnilocaloperator.hh b/dumux/multidomain/2cnistokes2p2cni/2cnistokes2p2cnilocaloperator.hh index 7672bed006..90c217942a 100644 --- a/dumux/multidomain/2cnistokes2p2cni/2cnistokes2p2cnilocaloperator.hh +++ b/dumux/multidomain/2cnistokes2p2cni/2cnistokes2p2cnilocaloperator.hh @@ -119,7 +119,7 @@ public: const Scalar conductiveFlux = bfNormal1 * boundaryVars1.temperatureGrad() * - boundaryVars1.thermalConductivity(); + (boundaryVars1.thermalConductivity() + boundaryVars1.thermalEddyConductivity()); couplingRes2.accumulate(lfsu_n.child(energyEqIdx2), vertInElem2, -(convectiveFlux - conductiveFlux)); diff --git a/dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh b/dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh index 4a27349c02..1f6e962c86 100644 --- a/dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh +++ b/dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh @@ -388,7 +388,7 @@ class TwoCStokesTwoPTwoCLocalOperator : const Scalar diffusiveFlux = bfNormal1.two_norm() * normalMoleFracGrad * - boundaryVars1.diffusionCoeff(transportCompIdx1) * + (boundaryVars1.diffusionCoeff(transportCompIdx1) + boundaryVars1.eddyDiffusivity()) * boundaryVars1.molarDensity() * FluidSystem::molarMass(transportCompIdx1); @@ -412,7 +412,7 @@ class TwoCStokesTwoPTwoCLocalOperator : const Scalar diffusiveFluxAtCorner = bfNormal1 * boundaryVars1.moleFractionGrad(transportCompIdx1) * - boundaryVars1.diffusionCoeff(transportCompIdx1) * + (boundaryVars1.diffusionCoeff(transportCompIdx1) + boundaryVars1.eddyDiffusivity()) * boundaryVars1.molarDensity() * FluidSystem::molarMass(transportCompIdx1); @@ -439,7 +439,7 @@ class TwoCStokesTwoPTwoCLocalOperator : const Scalar diffusiveFlux = bfNormal1 * boundaryVars1.moleFractionGrad(transportCompIdx1) * - boundaryVars1.diffusionCoeff(transportCompIdx1) * + (boundaryVars1.diffusionCoeff(transportCompIdx1) + boundaryVars1.eddyDiffusivity()) * boundaryVars1.molarDensity() * FluidSystem::molarMass(transportCompIdx1); diff --git a/dumux/multidomain/couplinglocalresiduals/stokesnccouplinglocalresidual.hh b/dumux/multidomain/couplinglocalresiduals/stokesnccouplinglocalresidual.hh index 33853f1f85..52ae8ee49d 100644 --- a/dumux/multidomain/couplinglocalresiduals/stokesnccouplinglocalresidual.hh +++ b/dumux/multidomain/couplinglocalresiduals/stokesnccouplinglocalresidual.hh @@ -159,7 +159,8 @@ public: boundaryVars.face().normal; boundaryVars.velocityGrad().umv(boundaryFaceNormal, muGradVelNormal); - muGradVelNormal *= boundaryVars.dynamicViscosity(); + muGradVelNormal *= (boundaryVars.dynamicViscosity() + + boundaryVars.dynamicEddyViscosity()); for (int i=0; i < this->residual_.size(); i++) Valgrind::CheckDefined(this->residual_[i]); @@ -352,7 +353,8 @@ protected: this->residual_[scvIdx][dimIdx] += beaversJosephCoeff * boundaryFaceArea * tangentialV[dimIdx] * - boundaryVars.dynamicViscosity(); + (boundaryVars.dynamicViscosity() + + boundaryVars.dynamicEddyViscosity()); //////////////////////////////////////////////////////////////////////////////////// //normal component has only to be set if no coupling conditions are defined diff --git a/dumux/multidomain/couplinglocalresiduals/stokesncnicouplinglocalresidual.hh b/dumux/multidomain/couplinglocalresiduals/stokesncnicouplinglocalresidual.hh index 04178fd731..5bfeb58f89 100644 --- a/dumux/multidomain/couplinglocalresiduals/stokesncnicouplinglocalresidual.hh +++ b/dumux/multidomain/couplinglocalresiduals/stokesncnicouplinglocalresidual.hh @@ -162,7 +162,8 @@ namespace Dumux boundaryVars.face().normal; boundaryVars.velocityGrad().umv(boundaryFaceNormal, muGradVelNormal); - muGradVelNormal *= boundaryVars.dynamicViscosity(); + muGradVelNormal *= (boundaryVars.dynamicViscosity() + + boundaryVars.dynamicEddyViscosity()); for (int i=0; i < this->residual_.size(); i++) Valgrind::CheckDefined(this->residual_[i]); @@ -351,7 +352,7 @@ namespace Dumux this->residual_[scvIdx][dimIdx] += beaversJosephCoeff * boundaryFaceArea * tangentialV[dimIdx] * - boundaryVars.dynamicViscosity(); + (boundaryVars.dynamicViscosity() + boundaryVars.dynamicEddyViscosity()); //////////////////////////////////////////////////////////////////////////////////// //normal component has only to be set if no coupling conditions are defined -- GitLab