diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C index 9edc7a78b305367c74e72dfe76062d5312fc5a6e..aac421f1d396aabe68f525c05c8ab2f531391eb2 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C @@ -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(); } diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H index be4f2cbe599ed5f9519347065378f9af9ed7f190..173e9b03cbcce2e4f2bf1c870fb865da19a3881f 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.H @@ -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;