multiphaseInterFoam: cache the mixture kinematic viscosity for use in fvOptions etc.
This commit is contained in:
parent
78d8f619ee
commit
b211c5d5a2
2 changed files with 19 additions and 4 deletions
|
|
@ -112,6 +112,17 @@ Foam::multiphaseMixture::multiphaseMixture
|
|||
zeroGradientFvPatchScalarField::typeName
|
||||
),
|
||||
|
||||
nu_
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"nu",
|
||||
mesh_.time().timeName(),
|
||||
mesh_
|
||||
),
|
||||
mu()/rho()
|
||||
),
|
||||
|
||||
sigmas_(lookup("sigmas")),
|
||||
dimSigma_(1, 0, -2, 0, 0),
|
||||
deltaN_
|
||||
|
|
@ -218,14 +229,14 @@ Foam::multiphaseMixture::muf() const
|
|||
Foam::tmp<Foam::volScalarField>
|
||||
Foam::multiphaseMixture::nu() const
|
||||
{
|
||||
return mu()/rho();
|
||||
return nu_;
|
||||
}
|
||||
|
||||
|
||||
Foam::tmp<Foam::scalarField>
|
||||
Foam::multiphaseMixture::nu(const label patchi) const
|
||||
{
|
||||
return mu(patchi)/rho(patchi);
|
||||
return nu_.boundaryField()[patchi];
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -340,6 +351,9 @@ void Foam::multiphaseMixture::solve()
|
|||
{
|
||||
solveAlphas(cAlpha);
|
||||
}
|
||||
|
||||
// Update the mixture kinematic viscosity
|
||||
nu_ = mu()/rho();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
|
|
@ -141,9 +141,10 @@ private:
|
|||
const surfaceScalarField& phi_;
|
||||
|
||||
surfaceScalarField rhoPhi_;
|
||||
|
||||
volScalarField alphas_;
|
||||
|
||||
volScalarField nu_;
|
||||
|
||||
typedef HashTable<scalar, interfacePair, interfacePair::hash>
|
||||
sigmaTable;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue