Commit a3788fe8 authored by Mark Olesen's avatar Mark Olesen
Browse files

COMP: avoid ambiguous construct from tmp - utils/ pre+post processing

parent 25951c0f
scalarField UMeanXvalues = channelIndexing.collapse
scalarField UMeanXvalues
(
UMean.component(vector::X)()
channelIndexing.collapse(UMean.component(vector::X)())
);
scalarField UMeanYvalues = channelIndexing.collapse
scalarField UMeanYvalues
(
UMean.component(vector::Y)()
channelIndexing.collapse(UMean.component(vector::Y)())
);
scalarField UMeanZvalues = channelIndexing.collapse
scalarField UMeanZvalues
(
UMean.component(vector::Z)()
channelIndexing.collapse(UMean.component(vector::Z)())
);
scalarField RxxValues = channelIndexing.collapse(Rxx);
scalarField RyyValues = channelIndexing.collapse(Ryy);
scalarField RzzValues = channelIndexing.collapse(Rzz);
scalarField RxyValues = channelIndexing.collapse(Rxy, true);
scalarField RxxValues(channelIndexing.collapse(Rxx));
scalarField RyyValues(channelIndexing.collapse(Ryy));
scalarField RzzValues(channelIndexing.collapse(Rzz));
scalarField RxyValues(channelIndexing.collapse(Rxy, true));
scalarField pPrime2MeanValues = channelIndexing.collapse(pPrime2Mean);
scalarField pPrime2MeanValues(channelIndexing.collapse(pPrime2Mean));
/*
scalarField epsilonValues = channelIndexing.collapse(epsilonMean);
scalarField epsilonValues(channelIndexing.collapse(epsilonMean));
scalarField nuMeanValues = channelIndexing.collapse(nuMean);
scalarField nuPrimeValues = channelIndexing.collapse(nuPrime);
scalarField nuMeanValues(channelIndexing.collapse(nuMean));
scalarField nuPrimeValues(channelIndexing.collapse(nuPrime));
scalarField gammaDotMeanValues = channelIndexing.collapse(gammaDotMean);
scalarField gammaDotPrimeValues = channelIndexing.collapse(gammaDotPrime);
scalarField gammaDotMeanValues(channelIndexing.collapse(gammaDotMean));
scalarField gammaDotPrimeValues(channelIndexing.collapse(gammaDotPrime));
*/
scalarField urmsValues = sqrt(mag(RxxValues));
scalarField vrmsValues = sqrt(mag(RyyValues));
scalarField wrmsValues = sqrt(mag(RzzValues));
scalarField urmsValues(sqrt(mag(RxxValues)));
scalarField vrmsValues(sqrt(mag(RyyValues)));
scalarField wrmsValues(sqrt(mag(RzzValues)));
scalarField kValues =
0.5*(sqr(urmsValues) + sqr(vrmsValues) + sqr(wrmsValues));
scalarField kValues
(
0.5*(sqr(urmsValues) + sqr(vrmsValues) + sqr(wrmsValues))
);
const scalarField& y = channelIndexing.y();
......
......@@ -61,13 +61,13 @@ int main(int argc, char *argv[])
// Cache the turbulence fields
Info<< "\nRetrieving field k from turbulence model" << endl;
const volScalarField k = RASModel->k();
const volScalarField k(RASModel->k());
Info<< "\nRetrieving field epsilon from turbulence model" << endl;
const volScalarField epsilon = RASModel->epsilon();
const volScalarField epsilon(RASModel->epsilon());
Info<< "\nRetrieving field R from turbulence model" << endl;
const volSymmTensorField R = RASModel->R();
const volSymmTensorField R(RASModel->R());
// Check availability of tubulence fields
......
......@@ -55,8 +55,10 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
const volTensorField gradU(fvc::grad(U));
volTensorField SSplusWW =
(symm(gradU) & symm(gradU)) + (skew(gradU) & skew(gradU));
volTensorField SSplusWW
(
(symm(gradU) & symm(gradU)) + (skew(gradU) & skew(gradU))
);
volScalarField Lambda2
(
......
......@@ -71,8 +71,8 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
basicPsiThermo::New(mesh)
);
volScalarField Cp = thermo->Cp();
volScalarField Cv = thermo->Cv();
volScalarField Cp(thermo->Cp());
volScalarField Cv(thermo->Cv());
MachPtr.set
(
......
......@@ -53,7 +53,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
{
Info<< " Reading U" << endl;
volVectorField U(Uheader, mesh);
volTensorField gradU = fvc::grad(U);
volTensorField gradU(fvc::grad(U));
volScalarField Q
(
......@@ -72,11 +72,11 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
// This is a second way of calculating Q, that delivers results
// very close, but not identical to the first approach.
volSymmTensorField S = symm(gradU); // symmetric part of tensor
volTensorField W = skew(gradU); // anti-symmetric part
volSymmTensorField S(symm(gradU)); // symmetric part of tensor
volTensorField W(skew(gradU)); // anti-symmetric part
volScalarField SS = S&&S;
volScalarField WW = W&&W;
volScalarField SS(S && S);
volScalarField WW(W && W);
volScalarField Q
(
......
......@@ -62,9 +62,9 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
Info<< " Reading U" << endl;
volVectorField U(Uheader, mesh);
volTensorField gradU = fvc::grad(U);
volScalarField magD = mag(symm(gradU));
volScalarField magOmega = mag(skew(gradU));
volTensorField gradU(fvc::grad(U));
volScalarField magD(mag(symm(gradU)));
volScalarField magOmega (mag(skew(gradU)));
dimensionedScalar smallMagD("smallMagD", magD.dimensions(), SMALL);
Info<< " Calculating flowType" << endl;
......
......@@ -54,8 +54,10 @@ int main(int argc, char *argv[])
#include "createFields.H"
surfaceScalarField heatFlux =
fvc::interpolate(RASModel->alphaEff())*fvc::snGrad(h);
surfaceScalarField heatFlux
(
fvc::interpolate(RASModel->alphaEff())*fvc::snGrad(h)
);
const surfaceScalarField::GeometricBoundaryField& patchHeatFlux =
heatFlux.boundaryField();
......
......@@ -21,4 +21,4 @@ autoPtr<incompressible::LESModel> sgsModel
incompressible::LESModel::New(U, phi, laminarTransport)
);
volScalarField::GeometricBoundaryField d = nearWallDist(mesh).y();
volScalarField::GeometricBoundaryField d(nearWallDist(mesh).y());
......@@ -100,7 +100,7 @@ int main(int argc, char *argv[])
);
volScalarField::GeometricBoundaryField d = nearWallDist(mesh).y();
volScalarField nuEff = sgsModel->nuEff();
volScalarField nuEff(sgsModel->nuEff());
const fvPatchList& patches = mesh.boundary();
......
......@@ -104,7 +104,7 @@ int main(int argc, char *argv[])
// Calculate nut
tmp<volScalarField> tnut = turbulence->nut();
volScalarField& nut = tnut();
volScalarField S = mag(dev(symm(fvc::grad(U))));
volScalarField S(mag(dev(symm(fvc::grad(U)))));
nut = sqr(kappa*min(y, ybl))*::sqrt(2)*S;
if (args.optionFound("writenut"))
......
......@@ -47,7 +47,7 @@ License
);
Info<< "Calculating wall distance field" << endl;
volScalarField y = wallDist(mesh).y();
volScalarField y(wallDist(mesh).y());
// Set the mean boundary-layer thickness
dimensionedScalar ybl("ybl", dimLength, 0);
......
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