Commit dc8d9df8 authored by Andrew Heather's avatar Andrew Heather
Browse files
parents fdfc6316 81387e32
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -73,19 +73,6 @@ GenEddyVisc::GenEddyVisc
)
),
k_
(
IOobject
(
"k",
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh_
),
muSgs_
(
IOobject
......@@ -112,7 +99,7 @@ GenEddyVisc::GenEddyVisc
mesh_
)
{
bound(k_, kMin_);
// printCoeffs();
}
......@@ -120,7 +107,7 @@ GenEddyVisc::GenEddyVisc
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
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -75,7 +75,6 @@ protected:
// Fields
volScalarField k_;
volScalarField muSgs_;
volScalarField alphaSgs_;
......@@ -106,16 +105,10 @@ public:
// Member Functions
//- Return SGS kinetic energy
virtual tmp<volScalarField> k() const
{
return k_;
}
//- Return sub-grid disipation rate
virtual tmp<volScalarField> epsilon() const
{
return ce_*k_*sqrt(k_)/delta();
return 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) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -51,9 +51,9 @@ void Smagorinsky::updateSubGridScaleFields(const volTensorField& gradU)
volScalarField b((2.0/3.0)*tr(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();
alphaSgs_ = muSgs_/Prt_;
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -109,6 +109,20 @@ public:
// 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
virtual void correct(const tmp<volTensorField>& gradU);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -104,6 +104,19 @@ dynOneEqEddy::dynOneEqEddy
LESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName),
GenEddyVisc(rho, U, phi, thermoPhysicalModel),
k_
(
IOobject
(
"k",
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh_
),
filterPtr_(LESfilter::New(U.mesh(), coeffDict())),
filter_(filterPtr_())
{
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -75,6 +75,8 @@ class dynOneEqEddy
{
// Private data
volScalarField k_;
autoPtr<LESfilter> filterPtr_;
LESfilter& filter_;
......@@ -120,6 +122,12 @@ public:
// Member Functions
//- Return SGS kinetic energy
virtual tmp<volScalarField> k() const
{
return k_;
}
//- Return the effective diffusivity for k
tmp<volScalarField> DkEff() const
{
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -71,6 +71,19 @@ lowReOneEqEddy::lowReOneEqEddy
LESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName),
GenEddyVisc(rho, U, phi, thermoPhysicalModel),
k_
(
IOobject
(
"k",
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh_
),
ck_
(
dimensioned<scalar>::lookupOrAddToDict
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -71,6 +71,8 @@ class lowReOneEqEddy
{
// Private data
volScalarField k_;
dimensionedScalar ck_;
dimensionedScalar beta_;
......@@ -111,6 +113,12 @@ public:
// Member Functions
//- Return SGS kinetic energy
virtual tmp<volScalarField> k() const
{
return k_;
}
//- Return the effective diffusivity for k
tmp<volScalarField> DkEff() const
{
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -67,6 +67,19 @@ oneEqEddy::oneEqEddy
LESModel(modelName, rho, U, phi, thermoPhysicalModel, turbulenceModelName),
GenEddyVisc(rho, U, phi, thermoPhysicalModel),
k_
(
IOobject
(
"k",
runTime_.timeName(),
mesh_,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh_
),
ck_
(
dimensioned<scalar>::lookupOrAddToDict
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -74,6 +74,8 @@ class oneEqEddy
{
// Private data
volScalarField k_;
dimensionedScalar ck_;
......@@ -114,6 +116,12 @@ public:
// Member Functions
//- Return SGS kinetic energy
virtual tmp<volScalarField> k() const
{
return k_;
}
//- Return the effective diffusivity for k
tmp<volScalarField> DkEff() const
{
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -67,8 +67,12 @@ class GenEddyVisc
protected:
// Model coefficients
dimensionedScalar ce_;
// Fields
volScalarField nuSgs_;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment