TurbulenceModels: Updated the handling of mass-flux when computing div(U)

This commit is contained in:
Henry
2014-04-29 17:40:26 +01:00
committed by Andrew Heather
parent 3bcc136458
commit 60c761d0ca
4 changed files with 31 additions and 10 deletions

View File

@ -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) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,7 +34,7 @@ CompressibleTurbulenceModel
const geometricOneField& alpha, const geometricOneField& alpha,
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& alphaPhi, const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const transportModel& transport, const transportModel& transport,
const word& propertiesName const word& propertiesName
@ -51,7 +51,7 @@ CompressibleTurbulenceModel
alpha, alpha,
rho, rho,
U, U,
alphaPhi, alphaRhoPhi,
phi, phi,
transport, transport,
propertiesName propertiesName

View File

@ -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) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -75,7 +75,7 @@ public:
const geometricOneField& alpha, const geometricOneField& alpha,
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& alphaPhi, const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const transportModel& trasport, const transportModel& trasport,
const word& propertiesName const word& propertiesName

View File

@ -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) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,6 +24,8 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "compressibleTurbulenceModel.H" #include "compressibleTurbulenceModel.H"
#include "surfaceInterpolate.H"
#include "surfaceFields.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -39,7 +41,7 @@ Foam::compressibleTurbulenceModel::compressibleTurbulenceModel
( (
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& alphaPhi, const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const word& propertiesName const word& propertiesName
) )
@ -47,7 +49,7 @@ Foam::compressibleTurbulenceModel::compressibleTurbulenceModel
turbulenceModel turbulenceModel
( (
U, U,
alphaPhi, alphaRhoPhi,
phi, phi,
propertiesName propertiesName
), ),
@ -55,4 +57,20 @@ Foam::compressibleTurbulenceModel::compressibleTurbulenceModel
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::surfaceScalarField>
Foam::compressibleTurbulenceModel::phi() const
{
if (phi_.dimensions() == dimensionSet(0, 3, -1, 0, 0))
{
return phi_;
}
else
{
return phi_/fvc::interpolate(rho_);
}
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -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) 2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -85,7 +85,7 @@ public:
( (
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& alphaPhi, const surfaceScalarField& alphaRhoPhi,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const word& propertiesName const word& propertiesName
); );
@ -98,6 +98,9 @@ public:
// Member functions // Member functions
//- Return the volumetric flux field
virtual tmp<surfaceScalarField> phi() const;
//- Return the effective stress tensor including the laminar stress //- Return the effective stress tensor including the laminar stress
virtual tmp<volSymmTensorField> devRhoReff() const = 0; virtual tmp<volSymmTensorField> devRhoReff() const = 0;