mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Commiting stuff
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) 1991-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -73,19 +73,6 @@ GenEddyVisc::GenEddyVisc
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
k_
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"k",
|
|
||||||
runTime_.timeName(),
|
|
||||||
mesh_,
|
|
||||||
IOobject::MUST_READ,
|
|
||||||
IOobject::AUTO_WRITE
|
|
||||||
),
|
|
||||||
mesh_
|
|
||||||
),
|
|
||||||
|
|
||||||
muSgs_
|
muSgs_
|
||||||
(
|
(
|
||||||
IOobject
|
IOobject
|
||||||
@ -112,7 +99,7 @@ GenEddyVisc::GenEddyVisc
|
|||||||
mesh_
|
mesh_
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
bound(k_, kMin_);
|
// printCoeffs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -120,7 +107,7 @@ GenEddyVisc::GenEddyVisc
|
|||||||
|
|
||||||
tmp<volSymmTensorField> GenEddyVisc::B() const
|
tmp<volSymmTensorField> GenEddyVisc::B() const
|
||||||
{
|
{
|
||||||
return ((2.0/3.0)*I)*k_ - (muSgs_/rho())*dev(twoSymm(fvc::grad(U())));
|
return ((2.0/3.0)*I)*k() - (muSgs_/rho())*dev(twoSymm(fvc::grad(U())));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -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) 1991-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -75,7 +75,6 @@ protected:
|
|||||||
|
|
||||||
// Fields
|
// Fields
|
||||||
|
|
||||||
volScalarField k_;
|
|
||||||
volScalarField muSgs_;
|
volScalarField muSgs_;
|
||||||
volScalarField alphaSgs_;
|
volScalarField alphaSgs_;
|
||||||
|
|
||||||
@ -106,16 +105,10 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- Return SGS kinetic energy
|
|
||||||
virtual tmp<volScalarField> k() const
|
|
||||||
{
|
|
||||||
return k_;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- 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 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) 1991-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -51,9 +51,9 @@ void Smagorinsky::updateSubGridScaleFields(const volTensorField& gradU)
|
|||||||
volScalarField b((2.0/3.0)*tr(D));
|
volScalarField b((2.0/3.0)*tr(D));
|
||||||
volScalarField c(2*ck_*delta()*(dev(D) && D));
|
volScalarField c(2*ck_*delta()*(dev(D) && D));
|
||||||
|
|
||||||
k_ = sqr((-b + sqrt(sqr(b) + 4*a*c))/(2*a));
|
volScalarField k = sqr((-b + sqrt(sqr(b) + 4*a*c))/(2*a));
|
||||||
|
|
||||||
muSgs_ = ck_*rho()*delta()*sqrt(k_);
|
muSgs_ = ck_*rho()*delta()*sqrt(k);
|
||||||
muSgs_.correctBoundaryConditions();
|
muSgs_.correctBoundaryConditions();
|
||||||
|
|
||||||
alphaSgs_ = muSgs_/Prt_;
|
alphaSgs_ = muSgs_/Prt_;
|
||||||
|
|||||||
@ -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) 1991-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -109,6 +109,20 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return SGS kinetic energy
|
||||||
|
// calculated from the given velocity gradient
|
||||||
|
tmp<volScalarField> k(const tmp<volTensorField>& gradU) const
|
||||||
|
{
|
||||||
|
return (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU)));
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return SGS kinetic energy
|
||||||
|
virtual tmp<volScalarField> k() const
|
||||||
|
{
|
||||||
|
return k(fvc::grad(U()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Correct Eddy-Viscosity and related properties
|
//- Correct Eddy-Viscosity and related properties
|
||||||
virtual void correct(const tmp<volTensorField>& gradU);
|
virtual void correct(const tmp<volTensorField>& gradU);
|
||||||
|
|
||||||
|
|||||||
@ -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) 1991-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -104,6 +104,19 @@ dynOneEqEddy::dynOneEqEddy
|
|||||||
LESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName),
|
LESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName),
|
||||||
GenEddyVisc(rho, U, phi, thermoPhysicalModel),
|
GenEddyVisc(rho, U, phi, thermoPhysicalModel),
|
||||||
|
|
||||||
|
k_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"k",
|
||||||
|
runTime_.timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh_
|
||||||
|
),
|
||||||
|
|
||||||
filterPtr_(LESfilter::New(U.mesh(), coeffDict())),
|
filterPtr_(LESfilter::New(U.mesh(), coeffDict())),
|
||||||
filter_(filterPtr_())
|
filter_(filterPtr_())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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) 1991-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -75,6 +75,8 @@ class dynOneEqEddy
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
volScalarField k_;
|
||||||
|
|
||||||
autoPtr<LESfilter> filterPtr_;
|
autoPtr<LESfilter> filterPtr_;
|
||||||
LESfilter& filter_;
|
LESfilter& filter_;
|
||||||
|
|
||||||
@ -120,6 +122,12 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return SGS kinetic energy
|
||||||
|
virtual tmp<volScalarField> k() const
|
||||||
|
{
|
||||||
|
return k_;
|
||||||
|
}
|
||||||
|
|
||||||
//- Return the effective diffusivity for k
|
//- Return the effective diffusivity for k
|
||||||
tmp<volScalarField> DkEff() const
|
tmp<volScalarField> DkEff() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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) 1991-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -71,6 +71,19 @@ lowReOneEqEddy::lowReOneEqEddy
|
|||||||
LESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName),
|
LESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName),
|
||||||
GenEddyVisc(rho, U, phi, thermoPhysicalModel),
|
GenEddyVisc(rho, U, phi, thermoPhysicalModel),
|
||||||
|
|
||||||
|
k_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"k",
|
||||||
|
runTime_.timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh_
|
||||||
|
),
|
||||||
|
|
||||||
ck_
|
ck_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::lookupOrAddToDict
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
|||||||
@ -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) 1991-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -71,6 +71,8 @@ class lowReOneEqEddy
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
volScalarField k_;
|
||||||
|
|
||||||
dimensionedScalar ck_;
|
dimensionedScalar ck_;
|
||||||
dimensionedScalar beta_;
|
dimensionedScalar beta_;
|
||||||
|
|
||||||
@ -111,6 +113,12 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return SGS kinetic energy
|
||||||
|
virtual tmp<volScalarField> k() const
|
||||||
|
{
|
||||||
|
return k_;
|
||||||
|
}
|
||||||
|
|
||||||
//- Return the effective diffusivity for k
|
//- Return the effective diffusivity for k
|
||||||
tmp<volScalarField> DkEff() const
|
tmp<volScalarField> DkEff() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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) 1991-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -67,6 +67,19 @@ oneEqEddy::oneEqEddy
|
|||||||
LESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName),
|
LESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName),
|
||||||
GenEddyVisc(rho, U, phi, thermoPhysicalModel),
|
GenEddyVisc(rho, U, phi, thermoPhysicalModel),
|
||||||
|
|
||||||
|
k_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"k",
|
||||||
|
runTime_.timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh_
|
||||||
|
),
|
||||||
|
|
||||||
ck_
|
ck_
|
||||||
(
|
(
|
||||||
dimensioned<scalar>::lookupOrAddToDict
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
|||||||
@ -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) 1991-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -74,6 +74,8 @@ class oneEqEddy
|
|||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
|
volScalarField k_;
|
||||||
|
|
||||||
dimensionedScalar ck_;
|
dimensionedScalar ck_;
|
||||||
|
|
||||||
|
|
||||||
@ -114,6 +116,12 @@ public:
|
|||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return SGS kinetic energy
|
||||||
|
virtual tmp<volScalarField> k() const
|
||||||
|
{
|
||||||
|
return k_;
|
||||||
|
}
|
||||||
|
|
||||||
//- Return the effective diffusivity for k
|
//- Return the effective diffusivity for k
|
||||||
tmp<volScalarField> DkEff() const
|
tmp<volScalarField> DkEff() const
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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) 1991-2010 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -67,8 +67,12 @@ class GenEddyVisc
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
// Model coefficients
|
||||||
|
|
||||||
dimensionedScalar ce_;
|
dimensionedScalar ce_;
|
||||||
|
|
||||||
|
// Fields
|
||||||
|
|
||||||
volScalarField nuSgs_;
|
volScalarField nuSgs_;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user