diff --git a/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H b/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H index f11a06da9b..fb7558eec6 100644 --- a/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H +++ b/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -51,7 +51,7 @@ namespace LESModels { /*---------------------------------------------------------------------------*\ - Class GenEddyVisc Declaration + Class GenEddyVisc Declaration \*---------------------------------------------------------------------------*/ class GenEddyVisc @@ -108,7 +108,21 @@ public: //- Return sub-grid disipation rate virtual tmp epsilon() const { - return ce_*k()*sqrt(k())/delta(); + return tmp + ( + new volScalarField + ( + IOobject + ( + "epsilon", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ce_*k()*sqrt(k())/delta() + ) + ); } //- Return viscosity diff --git a/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H b/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H index 20309c3203..ce0da3763f 100644 --- a/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H +++ b/src/turbulenceModels/compressible/LES/GenSGSStress/GenSGSStress.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -52,7 +52,7 @@ namespace LESModels { /*---------------------------------------------------------------------------*\ - Class GenSGSStress Declaration + Class GenSGSStress Declaration \*---------------------------------------------------------------------------*/ class GenSGSStress @@ -109,14 +109,43 @@ public: //- Return the SGS turbulent kinetic energy virtual tmp k() const { - return 0.5*tr(B_); + return tmp + ( + new volScalarField + ( + IOobject + ( + "k", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + 0.5*tr(B_) + ) + ); } //- Return the SGS turbulent dissipation virtual tmp epsilon() const { const volScalarField K(k()); - return ce_*K*sqrt(K)/delta(); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "epsilon", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ce_*K*sqrt(K)/delta() + ) + ); } //- Return the SGS viscosity diff --git a/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H index 62c216ee3e..c40adc383b 100644 --- a/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H +++ b/src/turbulenceModels/incompressible/LES/GenEddyVisc/GenEddyVisc.H @@ -51,7 +51,7 @@ namespace LESModels { /*---------------------------------------------------------------------------*\ - Class GenEddyVisc Declaration + Class GenEddyVisc Declaration \*---------------------------------------------------------------------------*/ class GenEddyVisc @@ -104,7 +104,21 @@ public: //- Return sub-grid disipation rate virtual tmp epsilon() const { - return ce_*k()*sqrt(k())/delta(); + return tmp + ( + new volScalarField + ( + IOobject + ( + "epsilon", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ce_*k()*sqrt(k())/delta() + ) + ); } //- Return the SGS viscosity. diff --git a/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H b/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H index 0456d69a71..f7b6040f37 100644 --- a/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H +++ b/src/turbulenceModels/incompressible/LES/GenSGSStress/GenSGSStress.H @@ -52,7 +52,7 @@ namespace LESModels { /*---------------------------------------------------------------------------*\ - Class GenSGSStress Declaration + Class GenSGSStress Declaration \*---------------------------------------------------------------------------*/ class GenSGSStress @@ -104,14 +104,43 @@ public: //- Return the SGS turbulent kinetic energy. virtual tmp k() const { - return 0.5*tr(B_); + return tmp + ( + new volScalarField + ( + IOobject + ( + "k", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + 0.5*tr(B_) + ) + ); } //- Return the SGS turbulent dissipation. virtual tmp epsilon() const { const volScalarField K(k()); - return ce_*K*sqrt(K)/delta(); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "epsilon", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ce_*K*sqrt(K)/delta() + ) + ); } //- Return the SGS viscosity.