mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
multiphaseInterFoam: cache the mixture kinematic viscosity for use in fvOptions etc.
This commit is contained in:
@ -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
|
|||||||
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()
|
|||||||
{
|
{
|
||||||
solveAlphas(cAlpha);
|
solveAlphas(cAlpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update the mixture kinematic viscosity
|
||||||
|
nu_ = mu()/rho();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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:
|
|||||||
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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user