mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: LES turbulence - named k and epsilon fields returned by utililty functions
This commit is contained in:
@ -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 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -51,7 +51,7 @@ namespace LESModels
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class GenEddyVisc Declaration
|
Class GenEddyVisc Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class GenEddyVisc
|
class GenEddyVisc
|
||||||
@ -108,7 +108,21 @@ public:
|
|||||||
//- Return sub-grid disipation rate
|
//- Return sub-grid disipation rate
|
||||||
virtual tmp<volScalarField> epsilon() const
|
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
|
//- Return viscosity
|
||||||
|
|||||||
@ -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 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -52,7 +52,7 @@ namespace LESModels
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class GenSGSStress Declaration
|
Class GenSGSStress Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class GenSGSStress
|
class GenSGSStress
|
||||||
@ -109,14 +109,43 @@ public:
|
|||||||
//- Return the SGS turbulent kinetic energy
|
//- Return the SGS turbulent kinetic energy
|
||||||
virtual tmp<volScalarField> k() const
|
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
|
//- Return the SGS turbulent dissipation
|
||||||
virtual tmp<volScalarField> epsilon() const
|
virtual tmp<volScalarField> epsilon() const
|
||||||
{
|
{
|
||||||
const volScalarField K(k());
|
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
|
//- Return the SGS viscosity
|
||||||
|
|||||||
@ -51,7 +51,7 @@ namespace LESModels
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class GenEddyVisc Declaration
|
Class GenEddyVisc Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class GenEddyVisc
|
class GenEddyVisc
|
||||||
@ -104,7 +104,21 @@ public:
|
|||||||
//- Return sub-grid disipation rate
|
//- Return sub-grid disipation rate
|
||||||
virtual tmp<volScalarField> epsilon() const
|
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.
|
//- Return the SGS viscosity.
|
||||||
|
|||||||
@ -52,7 +52,7 @@ namespace LESModels
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class GenSGSStress Declaration
|
Class GenSGSStress Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class GenSGSStress
|
class GenSGSStress
|
||||||
@ -104,14 +104,43 @@ public:
|
|||||||
//- Return the SGS turbulent kinetic energy.
|
//- Return the SGS turbulent kinetic energy.
|
||||||
virtual tmp<volScalarField> k() const
|
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.
|
//- Return the SGS turbulent dissipation.
|
||||||
virtual tmp<volScalarField> epsilon() const
|
virtual tmp<volScalarField> epsilon() const
|
||||||
{
|
{
|
||||||
const volScalarField K(k());
|
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.
|
//- Return the SGS viscosity.
|
||||||
|
|||||||
Reference in New Issue
Block a user