ENH: LES turbulence - named k and epsilon fields returned by utililty functions
This commit is contained in:
parent
5541a62875
commit
33d24875f7
@ -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<volScalarField> epsilon() const
|
||||
{
|
||||
return ce_*k()*sqrt(k())/delta();
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"epsilon",
|
||||
runTime_.timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
ce_*k()*sqrt(k())/delta()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//- Return viscosity
|
||||
|
@ -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<volScalarField> k() const
|
||||
{
|
||||
return 0.5*tr(B_);
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"k",
|
||||
runTime_.timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
0.5*tr(B_)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//- Return the SGS turbulent dissipation
|
||||
virtual tmp<volScalarField> epsilon() const
|
||||
{
|
||||
const volScalarField K(k());
|
||||
return ce_*K*sqrt(K)/delta();
|
||||
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"epsilon",
|
||||
runTime_.timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
ce_*K*sqrt(K)/delta()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//- Return the SGS viscosity
|
||||
|
@ -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<volScalarField> epsilon() const
|
||||
{
|
||||
return ce_*k()*sqrt(k())/delta();
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"epsilon",
|
||||
runTime_.timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
ce_*k()*sqrt(k())/delta()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//- Return the SGS viscosity.
|
||||
|
@ -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<volScalarField> k() const
|
||||
{
|
||||
return 0.5*tr(B_);
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"k",
|
||||
runTime_.timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
0.5*tr(B_)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//- Return the SGS turbulent dissipation.
|
||||
virtual tmp<volScalarField> epsilon() const
|
||||
{
|
||||
const volScalarField K(k());
|
||||
return ce_*K*sqrt(K)/delta();
|
||||
|
||||
return tmp<volScalarField>
|
||||
(
|
||||
new volScalarField
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"epsilon",
|
||||
runTime_.timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
ce_*K*sqrt(K)/delta()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
//- Return the SGS viscosity.
|
||||
|
Loading…
Reference in New Issue
Block a user