Commit b69e0ae0 authored by andy's avatar andy
Browse files

ENH: Consisteny update for turbulence G field name

parent 94c9d909
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -116,7 +116,7 @@ void PDRkEpsilon::correct()
}
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();
// Update espsilon and G at the wall
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -136,7 +136,7 @@ int main(int argc, char *argv[])
}
// 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
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -145,7 +145,7 @@ void homogeneousDynOneEqEddy::correct(const tmp<volTensorField>& tgradU)
volSymmTensorField D(dev(symm(gradU)));
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
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -118,7 +118,7 @@ void lowReOneEqEddy::correct(const tmp<volTensorField>& tgradU)
GenEddyVisc::correct(gradU);
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
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -105,7 +105,7 @@ void oneEqEddy::correct(const tmp<volTensorField>& tgradU)
GenEddyVisc::correct(gradU);
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
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -342,7 +342,7 @@ void LRR::correct()
RASModel::correct();
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
epsilon_.boundaryField().updateCoeffs();
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -379,7 +379,7 @@ void LaunderGibsonRSTM::correct()
}
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
epsilon_.boundaryField().updateCoeffs();
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -304,7 +304,7 @@ void LaunderSharmaKE::correct()
}
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();
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -303,7 +303,7 @@ void RNGkEpsilon::correct()
volScalarField S2((tgradU() && dev(twoSymm(tgradU()))));
tgradU.clear();
volScalarField G(type() + ".G", mut_*S2);
volScalarField G(GName(), mut_*S2);
volScalarField eta(sqrt(mag(S2))*k_/epsilon_);
volScalarField eta3(eta*sqr(eta));
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -139,7 +139,7 @@ void epsilonLowReWallFunctionFvPatchScalarField::updateCoeffs()
(
db().lookupObject<volScalarField>
(
turbulence.type() + ".G"
turbulence.GName()
)
);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -165,7 +165,7 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
(
db().lookupObject<volScalarField>
(
turbulence.type() + ".G"
turbulence.GName()
)
);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -175,7 +175,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
(
db().lookupObject<volScalarField>
(
turbulence.type() + ".G"
turbulence.GName()
)
);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -281,7 +281,7 @@ void kEpsilon::correct()
}
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();
// Update epsilon and G at the wall
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -437,7 +437,7 @@ void kOmegaSST::correct()
tmp<volTensorField> tgradU = fvc::grad(U_);
volScalarField S2(2*magSqr(symm(tgradU())));
volScalarField GbyMu((tgradU() && dev(twoSymm(tgradU()))));
volScalarField G(type() + ".G", mut_*GbyMu);
volScalarField G(GName(), mut_*GbyMu);
tgradU.clear();
// Update omega and G at the wall
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -321,7 +321,7 @@ void realizableKE::correct()
volScalarField eta(magS*k_/epsilon_);
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
epsilon_.boundaryField().updateCoeffs();
......
......@@ -398,7 +398,7 @@ void v2f::correct()
const volTensorField gradU(fvc::grad(U_));
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 L2("v2f.L2", sqr(Ls()));
const volScalarField alpha
......
......@@ -161,6 +161,12 @@ public:
//- Const access to the coefficients dictionary
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
const volScalarField& rho() const
{
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -353,7 +353,7 @@ void kOmegaSSTSAS::correct(const tmp<volTensorField>& gradU)
volScalarField L(sqrt(k_)/(pow025(Cmu_)*omega_));
volScalarField CDkOmega((2.0*alphaOmega2_)*(gradK & gradOmega)/omega_);
volScalarField F1(this->F1(CDkOmega));
volScalarField G(type() + ".G", nuSgs_*S2);
volScalarField G(GName(), nuSgs_*S2);
// Turbulent kinetic energy equation
{
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -101,7 +101,7 @@ void oneEqEddy::correct(const tmp<volTensorField>& 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
(
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -339,7 +339,7 @@ void LRR::correct()
}
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
epsilon_.boundaryField().updateCoeffs();
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -252,7 +252,7 @@ void LamBremhorstKE::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
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -386,7 +386,7 @@ void LaunderGibsonRSTM::correct()
}
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
epsilon_.boundaryField().updateCoeffs();
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -255,7 +255,7 @@ void LaunderSharmaKE::correct()
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 D(2.0*nu()*magSqr(fvc::grad(sqrt(k_))));
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -356,7 +356,7 @@ void LienCubicKE::correct()
volScalarField G
(
type() + ".G",
GName(),
Cmu_*sqr(k_)/epsilon_*S2 - (nonlinearStress_ && gradU)
);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -446,7 +446,7 @@ void LienCubicKELowRe::correct()
volScalarField G
(
type() + ".G",
GName(),
Cmu_*fMu*sqr(k_)/epsilon_*S2 - (nonlinearStress_ && gradU)
);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -319,7 +319,7 @@ void LienLeschzinerLowRe::correct()
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
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -348,7 +348,7 @@ void NonlinearKEShih::correct()
volScalarField G
(
type() + ".G",
GName(),
Cmu_*sqr(k_)/epsilon_*S2 - (nonlinearStress_ && gradU)
);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -267,7 +267,7 @@ void RNGkEpsilon::correct()
}
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_);
volScalarField R
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -139,7 +139,7 @@ void epsilonLowReWallFunctionFvPatchScalarField::updateCoeffs()
(
db().lookupObject<volScalarField>
(
turbulence.type() + ".G"
turbulence.GName()
)
);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -165,7 +165,7 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs()
(
db().lookupObject<volScalarField>
(
turbulence.type() + ".G"
turbulence.GName()
)
);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -175,7 +175,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs()
(
db().lookupObject<volScalarField>
(
turbulence.type() + ".G"
turbulence.GName()
)
);
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -235,7 +235,7 @@ void kEpsilon::correct()
return;
}