diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H index 1e972269ff..897ce2a097 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/pEqn.H @@ -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++) diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H index daa7867fd5..0e8ae4e793 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/pEqn.H @@ -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++) diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H index 05863b264c..768876c316 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H @@ -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++) diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H index 197005e0f7..6f39aff1c1 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H @@ -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++) diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/pEqn.H index 34536155ef..a90dd23ebc 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam_old/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam_old/pEqn.H @@ -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++) diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H index 2f339b87d7..862581ef79 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/pEqn.H @@ -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 diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C index d578cc9682..93caaf34fb 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C @@ -138,7 +138,7 @@ Foam::solidWallHeatFluxTemperatureFvPatchScalarField::K() const const symmTensorField& KWall = patch().lookupPatchField(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 diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/compressibleCourantNo.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/compressibleCourantNo.C index 606cd811ea..0af7eaa06e 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/compressibleCourantNo.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/compressibleCourantNo.C @@ -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(); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H index 854dc9e2cc..07ab9c92e8 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/pEqn.H @@ -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(); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffNo.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffNo.C index c0a5277e88..cce2dcb09c 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffNo.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffNo.C @@ -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();