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

This commit is contained in:
Mark Olesen
2010-12-20 10:37:17 +01:00
parent 25951c0f74
commit a3788fe854
11 changed files with 48 additions and 42 deletions

View File

@ -1,41 +1,43 @@
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 RxxValues(channelIndexing.collapse(Rxx));
scalarField RyyValues = channelIndexing.collapse(Ryy); scalarField RyyValues(channelIndexing.collapse(Ryy));
scalarField RzzValues = channelIndexing.collapse(Rzz); scalarField RzzValues(channelIndexing.collapse(Rzz));
scalarField RxyValues = channelIndexing.collapse(Rxy, true); 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 nuMeanValues(channelIndexing.collapse(nuMean));
scalarField nuPrimeValues = channelIndexing.collapse(nuPrime); scalarField nuPrimeValues(channelIndexing.collapse(nuPrime));
scalarField gammaDotMeanValues = channelIndexing.collapse(gammaDotMean); scalarField gammaDotMeanValues(channelIndexing.collapse(gammaDotMean));
scalarField gammaDotPrimeValues = channelIndexing.collapse(gammaDotPrime); scalarField gammaDotPrimeValues(channelIndexing.collapse(gammaDotPrime));
*/ */
scalarField urmsValues = sqrt(mag(RxxValues)); scalarField urmsValues(sqrt(mag(RxxValues)));
scalarField vrmsValues = sqrt(mag(RyyValues)); scalarField vrmsValues(sqrt(mag(RyyValues)));
scalarField wrmsValues = sqrt(mag(RzzValues)); scalarField wrmsValues(sqrt(mag(RzzValues)));
scalarField kValues = scalarField kValues
0.5*(sqr(urmsValues) + sqr(vrmsValues) + sqr(wrmsValues)); (
0.5*(sqr(urmsValues) + sqr(vrmsValues) + sqr(wrmsValues))
);
const scalarField& y = channelIndexing.y(); const scalarField& y = channelIndexing.y();

View File

@ -61,13 +61,13 @@ int main(int argc, char *argv[])
// Cache the turbulence fields // Cache the turbulence fields
Info<< "\nRetrieving field k from turbulence model" << endl; 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; 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; Info<< "\nRetrieving field R from turbulence model" << endl;
const volSymmTensorField R = RASModel->R(); const volSymmTensorField R(RASModel->R());
// Check availability of tubulence fields // Check availability of tubulence fields

View File

@ -55,8 +55,10 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
const volTensorField gradU(fvc::grad(U)); const volTensorField gradU(fvc::grad(U));
volTensorField SSplusWW = volTensorField SSplusWW
(symm(gradU) & symm(gradU)) + (skew(gradU) & skew(gradU)); (
(symm(gradU) & symm(gradU)) + (skew(gradU) & skew(gradU))
);
volScalarField Lambda2 volScalarField Lambda2
( (

View File

@ -71,8 +71,8 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
basicPsiThermo::New(mesh) basicPsiThermo::New(mesh)
); );
volScalarField Cp = thermo->Cp(); volScalarField Cp(thermo->Cp());
volScalarField Cv = thermo->Cv(); volScalarField Cv(thermo->Cv());
MachPtr.set MachPtr.set
( (

View File

@ -53,7 +53,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
{ {
Info<< " Reading U" << endl; Info<< " Reading U" << endl;
volVectorField U(Uheader, mesh); volVectorField U(Uheader, mesh);
volTensorField gradU = fvc::grad(U); volTensorField gradU(fvc::grad(U));
volScalarField Q 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 // This is a second way of calculating Q, that delivers results
// very close, but not identical to the first approach. // very close, but not identical to the first approach.
volSymmTensorField S = symm(gradU); // symmetric part of tensor volSymmTensorField S(symm(gradU)); // symmetric part of tensor
volTensorField W = skew(gradU); // anti-symmetric part volTensorField W(skew(gradU)); // anti-symmetric part
volScalarField SS = S&&S; volScalarField SS(S && S);
volScalarField WW = W&&W; volScalarField WW(W && W);
volScalarField Q volScalarField Q
( (

View File

@ -62,9 +62,9 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh)
Info<< " Reading U" << endl; Info<< " Reading U" << endl;
volVectorField U(Uheader, mesh); volVectorField U(Uheader, mesh);
volTensorField gradU = fvc::grad(U); volTensorField gradU(fvc::grad(U));
volScalarField magD = mag(symm(gradU)); volScalarField magD(mag(symm(gradU)));
volScalarField magOmega = mag(skew(gradU)); volScalarField magOmega (mag(skew(gradU)));
dimensionedScalar smallMagD("smallMagD", magD.dimensions(), SMALL); dimensionedScalar smallMagD("smallMagD", magD.dimensions(), SMALL);
Info<< " Calculating flowType" << endl; Info<< " Calculating flowType" << endl;

View File

@ -54,8 +54,10 @@ int main(int argc, char *argv[])
#include "createFields.H" #include "createFields.H"
surfaceScalarField heatFlux = surfaceScalarField heatFlux
fvc::interpolate(RASModel->alphaEff())*fvc::snGrad(h); (
fvc::interpolate(RASModel->alphaEff())*fvc::snGrad(h)
);
const surfaceScalarField::GeometricBoundaryField& patchHeatFlux = const surfaceScalarField::GeometricBoundaryField& patchHeatFlux =
heatFlux.boundaryField(); heatFlux.boundaryField();

View File

@ -21,4 +21,4 @@ autoPtr<incompressible::LESModel> sgsModel
incompressible::LESModel::New(U, phi, laminarTransport) incompressible::LESModel::New(U, phi, laminarTransport)
); );
volScalarField::GeometricBoundaryField d = nearWallDist(mesh).y(); volScalarField::GeometricBoundaryField d(nearWallDist(mesh).y());

View File

@ -100,7 +100,7 @@ int main(int argc, char *argv[])
); );
volScalarField::GeometricBoundaryField d = nearWallDist(mesh).y(); volScalarField::GeometricBoundaryField d = nearWallDist(mesh).y();
volScalarField nuEff = sgsModel->nuEff(); volScalarField nuEff(sgsModel->nuEff());
const fvPatchList& patches = mesh.boundary(); const fvPatchList& patches = mesh.boundary();

View File

@ -104,7 +104,7 @@ int main(int argc, char *argv[])
// Calculate nut // Calculate nut
tmp<volScalarField> tnut = turbulence->nut(); tmp<volScalarField> tnut = turbulence->nut();
volScalarField& nut = tnut(); 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; nut = sqr(kappa*min(y, ybl))*::sqrt(2)*S;
if (args.optionFound("writenut")) if (args.optionFound("writenut"))

View File

@ -47,7 +47,7 @@ License
); );
Info<< "Calculating wall distance field" << endl; Info<< "Calculating wall distance field" << endl;
volScalarField y = wallDist(mesh).y(); volScalarField y(wallDist(mesh).y());
// Set the mean boundary-layer thickness // Set the mean boundary-layer thickness
dimensionedScalar ybl("ybl", dimLength, 0); dimensionedScalar ybl("ybl", dimLength, 0);