Merge branch 'master' of ssh://dm/home/dm4/OpenFOAM/OpenFOAM-dev

Conflicts:
	src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C
This commit is contained in:
Henry
2013-02-18 15:27:10 +00:00
43 changed files with 104 additions and 89 deletions

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -116,7 +116,7 @@ void PDRkEpsilon::correct()
} }
tmp<volTensorField> tgradU = fvc::grad(U_); tmp<volTensorField> tgradU = fvc::grad(U_);
volScalarField G(type() + ".G", mut_*(tgradU() && dev(twoSymm(tgradU())))); volScalarField G(GName(), mut_*(tgradU() && dev(twoSymm(tgradU()))));
tgradU.clear(); tgradU.clear();
// Update espsilon and G at the wall // Update espsilon and G at the wall

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -136,7 +136,7 @@ int main(int argc, char *argv[])
} }
// Create G field - used by RAS wall functions // Create G field - used by RAS wall functions
volScalarField G(turbulence().type() + ".G", nut*2*sqr(S)); volScalarField G(turbulence().GName(), nut*2*sqr(S));
//--- Read and modify turbulence fields //--- Read and modify turbulence fields

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,7 +28,7 @@ License
\section about About OpenFOAM \section about About OpenFOAM
OpenFOAM is a free, open source CFD software package released free and OpenFOAM is a free, open source CFD software package released free and
open-source under the GNU General Public License by the OpenFOAM Foundation, open-source under the GNU General Public License by the,
<a href="http://www.openfoam.org">OpenFOAM Foundation</a>. It has a large <a href="http://www.openfoam.org">OpenFOAM Foundation</a>. It has a large
user base across most areas of engineering and science, from both commercial user base across most areas of engineering and science, from both commercial
and academic organisations. OpenFOAM has an extensive range of features to and academic organisations. OpenFOAM has an extensive range of features to

View File

@ -119,23 +119,26 @@ void Foam::fv::effectivenessHeatExchangerSource::init()
} }
void Foam::fv::effectivenessHeatExchangerSource::calculateTotalArea(scalar& var) void Foam::fv::effectivenessHeatExchangerSource::calculateTotalArea
(
scalar& area
)
{ {
var = 0; area = 0;
forAll(faceId_, i) forAll(faceId_, i)
{ {
label faceI = faceId_[i]; label faceI = faceId_[i];
if (facePatchId_[i] != -1) if (facePatchId_[i] != -1)
{ {
label patchI = facePatchId_[i]; label patchI = facePatchId_[i];
var += mesh_.magSf().boundaryField()[patchI][faceI]; area += mesh_.magSf().boundaryField()[patchI][faceI];
} }
else else
{ {
var += mesh_.magSf()[faceI]; area += mesh_.magSf()[faceI];
} }
} }
reduce(var, sumOp<scalar>()); reduce(area, sumOp<scalar>());
} }
@ -171,10 +174,10 @@ Foam::fv::effectivenessHeatExchangerSource::effectivenessHeatExchangerSource
( (
"effectivenessHeatExchangerSource::effectivenessHeatExchangerSource" "effectivenessHeatExchangerSource::effectivenessHeatExchangerSource"
"(" "("
" const word& name," "const word&, "
" const word& modelType," "const word&, "
" const dictionary& dict," "const dictionary&, "
" const fvMesh& mesh" "const fvMesh&"
")" ")"
) )
<< type() << " " << this->name() << ": " << type() << " " << this->name() << ": "
@ -223,7 +226,7 @@ void Foam::fv::effectivenessHeatExchangerSource::addSup
CpfMean += CpfMean +=
Cpf.boundaryField()[patchI][faceI] Cpf.boundaryField()[patchI][faceI]
* mesh_.magSf().boundaryField()[patchI][faceI]; *mesh_.magSf().boundaryField()[patchI][faceI];
} }
else else
{ {
@ -236,8 +239,8 @@ void Foam::fv::effectivenessHeatExchangerSource::addSup
scalar Qt = scalar Qt =
eTable_()(mag(totalphi), secondaryMassFlowRate_) eTable_()(mag(totalphi), secondaryMassFlowRate_)
* (secondaryInletT_ - primaryInletT_) *(secondaryInletT_ - primaryInletT_)
* (CpfMean/faceZoneArea_)*mag(totalphi); *(CpfMean/faceZoneArea_)*mag(totalphi);
const volScalarField& T = mesh_.lookupObject<volScalarField>(TName_); const volScalarField& T = mesh_.lookupObject<volScalarField>(TName_);
const scalarField TCells(T, cells_); const scalarField TCells(T, cells_);

View File

@ -170,7 +170,7 @@ private:
void init(); void init();
//- Calculate total area of faceZone accross procesors //- Calculate total area of faceZone accross procesors
void calculateTotalArea(scalar& var); void calculateTotalArea(scalar& area);
public: public:

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -145,7 +145,7 @@ void homogeneousDynOneEqEddy::correct(const tmp<volTensorField>& tgradU)
volSymmTensorField D(dev(symm(gradU))); volSymmTensorField D(dev(symm(gradU)));
volScalarField divU(fvc::div(phi()/fvc::interpolate(rho()))); volScalarField divU(fvc::div(phi()/fvc::interpolate(rho())));
volScalarField G(type() + ".G", 2*muSgs_*(gradU && D)); volScalarField G(GName(), 2*muSgs_*(gradU && D));
tmp<fvScalarMatrix> kEqn tmp<fvScalarMatrix> kEqn
( (

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -118,7 +118,7 @@ void lowReOneEqEddy::correct(const tmp<volTensorField>& tgradU)
GenEddyVisc::correct(gradU); GenEddyVisc::correct(gradU);
volScalarField divU(fvc::div(phi()/fvc::interpolate(rho()))); volScalarField divU(fvc::div(phi()/fvc::interpolate(rho())));
volScalarField G(type() + ".G", 2*muSgs_*(gradU && dev(symm(gradU)))); volScalarField G(GName(), 2*muSgs_*(gradU && dev(symm(gradU))));
tmp<fvScalarMatrix> kEqn tmp<fvScalarMatrix> kEqn
( (

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -105,7 +105,7 @@ void oneEqEddy::correct(const tmp<volTensorField>& tgradU)
GenEddyVisc::correct(gradU); GenEddyVisc::correct(gradU);
volScalarField divU(fvc::div(phi()/fvc::interpolate(rho()))); volScalarField divU(fvc::div(phi()/fvc::interpolate(rho())));
volScalarField G(type() + ".G", 2*muSgs_*(gradU && dev(symm(gradU)))); volScalarField G(GName(), 2*muSgs_*(gradU && dev(symm(gradU))));
tmp<fvScalarMatrix> kEqn tmp<fvScalarMatrix> kEqn
( (

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -342,7 +342,7 @@ void LRR::correct()
RASModel::correct(); RASModel::correct();
volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_))); volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_)));
volScalarField G(type() + ".G", 0.5*mag(tr(P))); volScalarField G(GName(), 0.5*mag(tr(P)));
// Update epsilon and G at the wall // Update epsilon and G at the wall
epsilon_.boundaryField().updateCoeffs(); epsilon_.boundaryField().updateCoeffs();

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -379,7 +379,7 @@ void LaunderGibsonRSTM::correct()
} }
volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_))); volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_)));
volScalarField G(type() + ".G", 0.5*mag(tr(P))); volScalarField G(GName(), 0.5*mag(tr(P)));
// Update epsilon and G at the wall // Update epsilon and G at the wall
epsilon_.boundaryField().updateCoeffs(); epsilon_.boundaryField().updateCoeffs();

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -304,7 +304,7 @@ void LaunderSharmaKE::correct()
} }
tmp<volTensorField> tgradU = fvc::grad(U_); tmp<volTensorField> tgradU = fvc::grad(U_);
volScalarField G(type() + ".G", mut_*(tgradU() && dev(twoSymm(tgradU())))); volScalarField G(GName(), mut_*(tgradU() && dev(twoSymm(tgradU()))));
tgradU.clear(); tgradU.clear();

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -303,7 +303,7 @@ void RNGkEpsilon::correct()
volScalarField S2((tgradU() && dev(twoSymm(tgradU())))); volScalarField S2((tgradU() && dev(twoSymm(tgradU()))));
tgradU.clear(); tgradU.clear();
volScalarField G(type() + ".G", mut_*S2); volScalarField G(GName(), mut_*S2);
volScalarField eta(sqrt(mag(S2))*k_/epsilon_); volScalarField eta(sqrt(mag(S2))*k_/epsilon_);
volScalarField eta3(eta*sqr(eta)); volScalarField eta3(eta*sqr(eta));

View File

@ -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) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -139,7 +139,7 @@ void epsilonLowReWallFunctionFvPatchScalarField::updateCoeffs()
( (
db().lookupObject<volScalarField> db().lookupObject<volScalarField>
( (
turbulence.type() + ".G" turbulence.GName()
) )
); );

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -165,7 +165,7 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
( (
db().lookupObject<volScalarField> db().lookupObject<volScalarField>
( (
turbulence.type() + ".G" turbulence.GName()
) )
); );

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -175,7 +175,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
( (
db().lookupObject<volScalarField> db().lookupObject<volScalarField>
( (
turbulence.type() + ".G" turbulence.GName()
) )
); );

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -281,7 +281,7 @@ void kEpsilon::correct()
} }
tmp<volTensorField> tgradU = fvc::grad(U_); tmp<volTensorField> tgradU = fvc::grad(U_);
volScalarField G(type() + ".G", mut_*(tgradU() && dev(twoSymm(tgradU())))); volScalarField G(GName(), mut_*(tgradU() && dev(twoSymm(tgradU()))));
tgradU.clear(); tgradU.clear();
// Update epsilon and G at the wall // Update epsilon and G at the wall

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -437,7 +437,7 @@ void kOmegaSST::correct()
tmp<volTensorField> tgradU = fvc::grad(U_); tmp<volTensorField> tgradU = fvc::grad(U_);
volScalarField S2(2*magSqr(symm(tgradU()))); volScalarField S2(2*magSqr(symm(tgradU())));
volScalarField GbyMu((tgradU() && dev(twoSymm(tgradU())))); volScalarField GbyMu((tgradU() && dev(twoSymm(tgradU()))));
volScalarField G(type() + ".G", mut_*GbyMu); volScalarField G(GName(), mut_*GbyMu);
tgradU.clear(); tgradU.clear();
// Update omega and G at the wall // Update omega and G at the wall

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -321,7 +321,7 @@ void realizableKE::correct()
volScalarField eta(magS*k_/epsilon_); volScalarField eta(magS*k_/epsilon_);
volScalarField C1(max(eta/(scalar(5) + eta), scalar(0.43))); volScalarField C1(max(eta/(scalar(5) + eta), scalar(0.43)));
volScalarField G(type() + ".G", mut_*(gradU && dev(twoSymm(gradU)))); volScalarField G(GName(), mut_*(gradU && dev(twoSymm(gradU))));
// Update epsilon and G at the wall // Update epsilon and G at the wall
epsilon_.boundaryField().updateCoeffs(); epsilon_.boundaryField().updateCoeffs();

View File

@ -398,7 +398,7 @@ void v2f::correct()
const volTensorField gradU(fvc::grad(U_)); const volTensorField gradU(fvc::grad(U_));
const volScalarField S2(2*magSqr(dev(symm(gradU)))); const volScalarField S2(2*magSqr(dev(symm(gradU))));
const volScalarField G(type() + ".G", mut_*S2); const volScalarField G(GName(), mut_*S2);
const volScalarField T(Ts()); const volScalarField T(Ts());
const volScalarField L2("v2f.L2", sqr(Ls())); const volScalarField L2("v2f.L2", sqr(Ls()));
const volScalarField alpha const volScalarField alpha

View File

@ -161,6 +161,12 @@ public:
//- Const access to the coefficients dictionary //- Const access to the coefficients dictionary
virtual const dictionary& coeffDict() const = 0; virtual const dictionary& coeffDict() const = 0;
//- Helper function to return the nam eof the turbulence G field
inline word GName() const
{
return word(type() + ":G");
}
//- Access function to density field //- Access function to density field
const volScalarField& rho() const const volScalarField& rho() const
{ {

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -353,7 +353,7 @@ void kOmegaSSTSAS::correct(const tmp<volTensorField>& gradU)
volScalarField L(sqrt(k_)/(pow025(Cmu_)*omega_)); volScalarField L(sqrt(k_)/(pow025(Cmu_)*omega_));
volScalarField CDkOmega((2.0*alphaOmega2_)*(gradK & gradOmega)/omega_); volScalarField CDkOmega((2.0*alphaOmega2_)*(gradK & gradOmega)/omega_);
volScalarField F1(this->F1(CDkOmega)); volScalarField F1(this->F1(CDkOmega));
volScalarField G(type() + ".G", nuSgs_*S2); volScalarField G(GName(), nuSgs_*S2);
// Turbulent kinetic energy equation // Turbulent kinetic energy equation
{ {

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -101,7 +101,7 @@ void oneEqEddy::correct(const tmp<volTensorField>& gradU)
{ {
GenEddyVisc::correct(gradU); GenEddyVisc::correct(gradU);
volScalarField G(type() + ".G", 2.0*nuSgs_*magSqr(symm(gradU))); volScalarField G(GName(), 2.0*nuSgs_*magSqr(symm(gradU)));
tmp<fvScalarMatrix> kEqn tmp<fvScalarMatrix> kEqn
( (

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -339,7 +339,7 @@ void LRR::correct()
} }
volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_))); volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_)));
volScalarField G(type() + ".G", 0.5*mag(tr(P))); volScalarField G(GName(), 0.5*mag(tr(P)));
// Update epsilon and G at the wall // Update epsilon and G at the wall
epsilon_.boundaryField().updateCoeffs(); epsilon_.boundaryField().updateCoeffs();

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -252,7 +252,7 @@ void LamBremhorstKE::correct()
y_.correct(); y_.correct();
} }
volScalarField G(type() + ".G", nut_*2*magSqr(symm(fvc::grad(U_)))); volScalarField G(GName(), nut_*2*magSqr(symm(fvc::grad(U_))));
// Calculate parameters and coefficients for low-Reynolds number model // Calculate parameters and coefficients for low-Reynolds number model

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -386,7 +386,7 @@ void LaunderGibsonRSTM::correct()
} }
volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_))); volSymmTensorField P(-twoSymm(R_ & fvc::grad(U_)));
volScalarField G(type() + ".G", 0.5*mag(tr(P))); volScalarField G(GName(), 0.5*mag(tr(P)));
// Update epsilon and G at the wall // Update epsilon and G at the wall
epsilon_.boundaryField().updateCoeffs(); epsilon_.boundaryField().updateCoeffs();

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -255,7 +255,7 @@ void LaunderSharmaKE::correct()
tmp<volScalarField> S2 = 2*magSqr(symm(fvc::grad(U_))); tmp<volScalarField> S2 = 2*magSqr(symm(fvc::grad(U_)));
volScalarField G(type() + ".G", nut_*S2); volScalarField G(GName(), nut_*S2);
const volScalarField E(2.0*nu()*nut_*fvc::magSqrGradGrad(U_)); const volScalarField E(2.0*nu()*nut_*fvc::magSqrGradGrad(U_));
const volScalarField D(2.0*nu()*magSqr(fvc::grad(sqrt(k_)))); const volScalarField D(2.0*nu()*magSqr(fvc::grad(sqrt(k_))));

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -356,7 +356,7 @@ void LienCubicKE::correct()
volScalarField G volScalarField G
( (
type() + ".G", GName(),
Cmu_*sqr(k_)/epsilon_*S2 - (nonlinearStress_ && gradU) Cmu_*sqr(k_)/epsilon_*S2 - (nonlinearStress_ && gradU)
); );

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -446,7 +446,7 @@ void LienCubicKELowRe::correct()
volScalarField G volScalarField G
( (
type() + ".G", GName(),
Cmu_*fMu*sqr(k_)/epsilon_*S2 - (nonlinearStress_ && gradU) Cmu_*fMu*sqr(k_)/epsilon_*S2 - (nonlinearStress_ && gradU)
); );

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -319,7 +319,7 @@ void LienLeschzinerLowRe::correct()
const volScalarField f2(scalar(1) - 0.3*exp(-sqr(Rt))); const volScalarField f2(scalar(1) - 0.3*exp(-sqr(Rt)));
volScalarField G(type() + ".G", Cmu_*fMu*sqr(k_)/epsilon_*S2); volScalarField G(GName(), Cmu_*fMu*sqr(k_)/epsilon_*S2);
// Dissipation equation // Dissipation equation

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -348,7 +348,7 @@ void NonlinearKEShih::correct()
volScalarField G volScalarField G
( (
type() + ".G", GName(),
Cmu_*sqr(k_)/epsilon_*S2 - (nonlinearStress_ && gradU) Cmu_*sqr(k_)/epsilon_*S2 - (nonlinearStress_ && gradU)
); );

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -267,7 +267,7 @@ void RNGkEpsilon::correct()
} }
const volScalarField S2(2*magSqr(symm(fvc::grad(U_)))); const volScalarField S2(2*magSqr(symm(fvc::grad(U_))));
volScalarField G(type() + ".G", nut_*S2); volScalarField G(GName(), nut_*S2);
const volScalarField eta(sqrt(S2)*k_/epsilon_); const volScalarField eta(sqrt(S2)*k_/epsilon_);
volScalarField R volScalarField R

View File

@ -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) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -139,7 +139,7 @@ void epsilonLowReWallFunctionFvPatchScalarField::updateCoeffs()
( (
db().lookupObject<volScalarField> db().lookupObject<volScalarField>
( (
turbulence.type() + ".G" turbulence.GName()
) )
); );

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -165,7 +165,7 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
( (
db().lookupObject<volScalarField> db().lookupObject<volScalarField>
( (
turbulence.type() + ".G" turbulence.GName()
) )
); );

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -175,7 +175,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
( (
db().lookupObject<volScalarField> db().lookupObject<volScalarField>
( (
turbulence.type() + ".G" turbulence.GName()
) )
); );

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -235,7 +235,7 @@ void kEpsilon::correct()
return; return;
} }
volScalarField G(type() + ".G", nut_*2*magSqr(symm(fvc::grad(U_)))); volScalarField G(GName(), nut_*2*magSqr(symm(fvc::grad(U_))));
// Update epsilon and G at the wall // Update epsilon and G at the wall
epsilon_.boundaryField().updateCoeffs(); epsilon_.boundaryField().updateCoeffs();

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -244,7 +244,7 @@ void kOmega::correct()
return; return;
} }
volScalarField G(type() + ".G", nut_*2*magSqr(symm(fvc::grad(U_)))); volScalarField G(GName(), nut_*2*magSqr(symm(fvc::grad(U_))));
// Update omega and G at the wall // Update omega and G at the wall
omega_.boundaryField().updateCoeffs(); omega_.boundaryField().updateCoeffs();

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -410,7 +410,7 @@ void kOmegaSST::correct()
} }
const volScalarField S2(2*magSqr(symm(fvc::grad(U_)))); const volScalarField S2(2*magSqr(symm(fvc::grad(U_))));
volScalarField G(type() + ".G", nut_*S2); volScalarField G(GName(), nut_*S2);
// Update omega and G at the wall // Update omega and G at the wall
omega_.boundaryField().updateCoeffs(); omega_.boundaryField().updateCoeffs();

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -311,7 +311,7 @@ void qZeta::correct()
tmp<volScalarField> S2 = 2*magSqr(symm(fvc::grad(U_))); tmp<volScalarField> S2 = 2*magSqr(symm(fvc::grad(U_)));
volScalarField G(type() + ".G", nut_/(2.0*q_)*S2); volScalarField G(GName(), nut_/(2.0*q_)*S2);
const volScalarField E(nu()*nut_/q_*fvc::magSqrGradGrad(U_)); const volScalarField E(nu()*nut_/q_*fvc::magSqrGradGrad(U_));

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -297,7 +297,7 @@ void realizableKE::correct()
const volScalarField eta(magS*k_/epsilon_); const volScalarField eta(magS*k_/epsilon_);
tmp<volScalarField> C1 = max(eta/(scalar(5) + eta), scalar(0.43)); tmp<volScalarField> C1 = max(eta/(scalar(5) + eta), scalar(0.43));
volScalarField G(type() + ".G", nut_*S2); volScalarField G(GName(), nut_*S2);
// Update epsilon and G at the wall // Update epsilon and G at the wall
epsilon_.boundaryField().updateCoeffs(); epsilon_.boundaryField().updateCoeffs();

View File

@ -364,7 +364,7 @@ void v2f::correct()
const volTensorField gradU(fvc::grad(U_)); const volTensorField gradU(fvc::grad(U_));
const volScalarField S2(2*magSqr(dev(symm(gradU)))); const volScalarField S2(2*magSqr(dev(symm(gradU))));
const volScalarField G(type() + ".G", nut_*S2); const volScalarField G(GName(), nut_*S2);
const volScalarField T(Ts()); const volScalarField T(Ts());
const volScalarField L2(type() + ".L2", sqr(Ls())); const volScalarField L2(type() + ".L2", sqr(Ls()));
const volScalarField alpha const volScalarField alpha

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -35,7 +35,7 @@ namespace Foam
namespace incompressible namespace incompressible
{ {
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(turbulenceModel, 0); defineTypeNameAndDebug(turbulenceModel, 0);
defineRunTimeSelectionTable(turbulenceModel, turbulenceModel); defineRunTimeSelectionTable(turbulenceModel, turbulenceModel);

View File

@ -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-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -156,6 +156,12 @@ public:
//- Const access to the coefficients dictionary //- Const access to the coefficients dictionary
virtual const dictionary& coeffDict() const = 0; virtual const dictionary& coeffDict() const = 0;
//- Helper function to return the nam eof the turbulence G field
inline word GName() const
{
return word(type() + ":G");
}
//- Access function to velocity field //- Access function to velocity field
inline const volVectorField& U() const inline const volVectorField& U() const
{ {

View File

@ -63,7 +63,7 @@ solvers
PIMPLE PIMPLE
{ {
correctPhi no; correctPhi no;
nOuterCorrectors 3; nOuterCorrectors 2;
nCorrectors 1; nCorrectors 1;
nNonOrthogonalCorrectors 0; nNonOrthogonalCorrectors 0;
} }