Skip to content
Snippets Groups Projects
Commit 49c5519b authored by Henry's avatar Henry Committed by Andrew Heather
Browse files

multiphaseInterFoam: cache the mixture kinematic viscosity for use in fvOptions etc.

parent 813b6936
Branches
Tags
No related merge requests found
...@@ -112,6 +112,17 @@ Foam::multiphaseMixture::multiphaseMixture ...@@ -112,6 +112,17 @@ Foam::multiphaseMixture::multiphaseMixture
zeroGradientFvPatchScalarField::typeName zeroGradientFvPatchScalarField::typeName
), ),
nu_
(
IOobject
(
"nu",
mesh_.time().timeName(),
mesh_
),
mu()/rho()
),
sigmas_(lookup("sigmas")), sigmas_(lookup("sigmas")),
dimSigma_(1, 0, -2, 0, 0), dimSigma_(1, 0, -2, 0, 0),
deltaN_ deltaN_
...@@ -218,14 +229,14 @@ Foam::multiphaseMixture::muf() const ...@@ -218,14 +229,14 @@ Foam::multiphaseMixture::muf() const
Foam::tmp<Foam::volScalarField> Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixture::nu() const Foam::multiphaseMixture::nu() const
{ {
return mu()/rho(); return nu_;
} }
Foam::tmp<Foam::scalarField> Foam::tmp<Foam::scalarField>
Foam::multiphaseMixture::nu(const label patchi) const Foam::multiphaseMixture::nu(const label patchi) const
{ {
return mu(patchi)/rho(patchi); return nu_.boundaryField()[patchi];
} }
...@@ -340,6 +351,9 @@ void Foam::multiphaseMixture::solve() ...@@ -340,6 +351,9 @@ void Foam::multiphaseMixture::solve()
{ {
solveAlphas(cAlpha); solveAlphas(cAlpha);
} }
// Update the mixture kinematic viscosity
nu_ = mu()/rho();
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -141,9 +141,10 @@ private: ...@@ -141,9 +141,10 @@ private:
const surfaceScalarField& phi_; const surfaceScalarField& phi_;
surfaceScalarField rhoPhi_; surfaceScalarField rhoPhi_;
volScalarField alphas_; volScalarField alphas_;
volScalarField nu_;
typedef HashTable<scalar, interfacePair, interfacePair::hash> typedef HashTable<scalar, interfacePair, interfacePair::hash>
sigmaTable; sigmaTable;
......
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