COMP: avoid ambiguous construct from tmp - solvers/ heatTransfer

This commit is contained in:
Mark Olesen
2010-12-21 09:51:00 +01:00
parent c0e4586aac
commit 1cd5659c45
10 changed files with 24 additions and 18 deletions

View File

@ -7,7 +7,7 @@
phi = (fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rAU, U, phi);
surfaceScalarField buoyancyPhi = rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf();
surfaceScalarField buoyancyPhi(rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf());
phi -= buoyancyPhi;
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)

View File

@ -8,7 +8,7 @@
phi = fvc::interpolate(U) & mesh.Sf();
adjustPhi(phi, U, p_rgh);
surfaceScalarField buoyancyPhi = rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf();
surfaceScalarField buoyancyPhi(rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf());
phi -= buoyancyPhi;
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)

View File

@ -5,7 +5,7 @@
// pressure solution - done in 2 parts. Part 1:
thermo.rho() -= psi*p_rgh;
volScalarField rAU = 1.0/UEqn.A();
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
U = rAU*UEqn.H();
@ -16,7 +16,7 @@
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
);
surfaceScalarField buoyancyPhi = -rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf();
surfaceScalarField buoyancyPhi(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
phi += buoyancyPhi;
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)

View File

@ -2,7 +2,7 @@
rho = thermo.rho();
rho.relax();
volScalarField rAU = 1.0/UEqn().A();
volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
U = rAU*UEqn().H();
@ -11,7 +11,7 @@
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
bool closedVolume = adjustPhi(phi, U, p_rgh);
surfaceScalarField buoyancyPhi = rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf();
surfaceScalarField buoyancyPhi(rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
phi -= buoyancyPhi;
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)

View File

@ -1,7 +1,7 @@
{
rho = thermo.rho();
volScalarField rAU = 1.0/UEqn().A();
volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
U = rAU*UEqn().H();
@ -10,8 +10,10 @@
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
bool closedVolume = adjustPhi(phi, U, p);
surfaceScalarField buoyancyPhi =
rhorAUf*fvc::interpolate(rho)*(g & mesh.Sf());
surfaceScalarField buoyancyPhi
(
rhorAUf*fvc::interpolate(rho)*(g & mesh.Sf())
);
phi += buoyancyPhi;
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)

View File

@ -4,7 +4,7 @@
rho = min(rho, rhoMax[i]);
rho.relax();
volScalarField rAU = 1.0/UEqn().A();
volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
U = rAU*UEqn().H();
@ -15,7 +15,7 @@
dimensionedScalar compressibility = fvc::domainIntegrate(psi);
bool compressible = (compressibility.value() > SMALL);
surfaceScalarField buoyancyPhi = rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf();
surfaceScalarField buoyancyPhi(rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
phi -= buoyancyPhi;
// Solve pressure

View File

@ -138,7 +138,7 @@ Foam::solidWallHeatFluxTemperatureFvPatchScalarField::K() const
const symmTensorField& KWall =
patch().lookupPatchField<volSymmTensorField, scalar>(KName_);
vectorField n = patch().nf();
vectorField n(patch().nf());
return n & KWall & n;
}
@ -203,7 +203,7 @@ void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::write
namespace Foam
{
makePatchTypeField
makeNonTemplatedPatchTypeField
(
fvPatchScalarField,
solidWallHeatFluxTemperatureFvPatchScalarField

View File

@ -34,9 +34,11 @@ Foam::scalar Foam::compressibleCourantNo
const surfaceScalarField& phi
)
{
scalarField sumPhi =
scalarField sumPhi
(
fvc::surfaceSum(mag(phi))().internalField()
/rho.internalField();
/ rho.internalField()
);
scalar CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();

View File

@ -5,7 +5,7 @@
rho = thermo.rho();
volScalarField rAU = 1.0/UEqn().A();
volScalarField rAU(1.0/UEqn().A());
surfaceScalarField rhorAUf("(rho*(1|A(U)))", fvc::interpolate(rho*rAU));
U = rAU*UEqn().H();

View File

@ -39,10 +39,12 @@ Foam::scalar Foam::solidRegionDiffNo
//- Take care: can have fluid domains with 0 cells so do not test for
// zero internal faces.
surfaceScalarField KrhoCpbyDelta =
surfaceScalarField KrhoCpbyDelta
(
mesh.surfaceInterpolation::deltaCoeffs()
* fvc::interpolate(K)
/ fvc::interpolate(Cprho);
/ fvc::interpolate(Cprho)
);
DiNum = gMax(KrhoCpbyDelta.internalField())*runTime.deltaT().value();