diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C b/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C index c524491307..0bbb056b9a 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C +++ b/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C @@ -131,7 +131,7 @@ void directMappedFixedInternalValueFvPatchField::updateCoeffs() ); // Retrieve the neighbour patch internal field - Field nbrIntFld = nbrField.patchInternalField(); + Field nbrIntFld(nbrField.patchInternalField()); distMap.distribute(nbrIntFld); // Assign (this) patch internal field to its neighbour values diff --git a/src/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.C b/src/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.C index 3d80d22575..78484ccaeb 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.C +++ b/src/surfaceFilmModels/derivedFvPatchFields/filmHeightInletVelocity/filmHeightInletVelocityFvPatchVectorField.C @@ -122,7 +122,7 @@ void Foam::filmHeightInletVelocityFvPatchVectorField::updateCoeffs() const fvPatchField& deltafp = patch().lookupPatchField(deltafName_); - vectorField n = patch().nf(); + const vectorField n(patch().nf()); const scalarField& magSf = patch().magSf(); operator==(deltafp*n*phip/(rhop*magSf*sqr(deltafp) + ROOTVSMALL)); diff --git a/src/surfaceFilmModels/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C b/src/surfaceFilmModels/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C index d8fb92b28c..b5137c087b 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C +++ b/src/surfaceFilmModels/derivedFvPatchFields/htcConv/htcConvFvPatchScalarField.C @@ -108,16 +108,16 @@ void htcConvFvPatchScalarField::updateCoeffs() const label patchI = patch().index(); const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalarField alphaEffw = rasModel.alphaEff()().boundaryField()[patchI]; + const scalarField alphaEffw(rasModel.alphaEff()().boundaryField()[patchI]); const scalarField& muw = rasModel.mu().boundaryField()[patchI]; const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; const vectorField& Uc = rasModel.U(); const vectorField& Uw = rasModel.U().boundaryField()[patchI]; const scalarField& Tw = rasModel.thermo().T().boundaryField()[patchI]; - const scalarField Cpw = rasModel.thermo().Cp(Tw, patchI); + const scalarField Cpw(rasModel.thermo().Cp(Tw, patchI)); - const scalarField kappaw = Cpw*alphaEffw; - const scalarField Pr = muw*Cpw/kappaw; + const scalarField kappaw(Cpw*alphaEffw); + const scalarField Pr(muw*Cpw/kappaw); scalarField& htc = *this; forAll(htc, faceI) diff --git a/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C b/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C index 46b5cfaa5d..23e883cd32 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C +++ b/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C @@ -163,8 +163,10 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs() } } - scalarField mDotFilm = - filmModel.massPhaseChangeForPrimary().boundaryField()[filmPatchI]; + scalarField mDotFilm + ( + filmModel.massPhaseChangeForPrimary().boundaryField()[filmPatchI] + ); distMap.distribute(mDotFilm); // Retrieve RAS turbulence model diff --git a/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutFilmWallFunction/mutFilmWallFunctionFvPatchScalarField.C b/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutFilmWallFunction/mutFilmWallFunctionFvPatchScalarField.C index d4aa92211f..07afc32739 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutFilmWallFunction/mutFilmWallFunctionFvPatchScalarField.C +++ b/src/surfaceFilmModels/derivedFvPatchFields/wallFunctions/mutFilmWallFunction/mutFilmWallFunctionFvPatchScalarField.C @@ -80,8 +80,10 @@ tmp mutFilmWallFunctionFvPatchScalarField::calcUTau } } - scalarField mDotFilm = - filmModel.massPhaseChangeForPrimary().boundaryField()[filmPatchI]; + scalarField mDotFilm + ( + filmModel.massPhaseChangeForPrimary().boundaryField()[filmPatchI] + ); distMap.distribute(mDotFilm); @@ -131,7 +133,7 @@ tmp mutFilmWallFunctionFvPatchScalarField::calcMut() const const RASModel& rasModel = db().lookupObject("RASProperties"); const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI]; - const scalarField magGradU = mag(Uw.snGrad()); + const scalarField magGradU(mag(Uw.snGrad())); const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; const scalarField& muw = rasModel.mu().boundaryField()[patchI]; diff --git a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModel.C b/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModel.C index 5e5d7e4077..0e9b553107 100644 --- a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModel.C +++ b/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModel.C @@ -50,7 +50,7 @@ void Foam::surfaceFilmModels::injectionModel::correctDetachedFilm const kinematicSingleLayer& film = refCast(owner_); - const scalarField gNorm = film.gNorm(); + const scalarField gNorm(film.gNorm()); const scalarField& delta = film.delta(); const scalarField& rho = film.rho(); const scalarField& magSf = film.magSf(); diff --git a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C index 3dea2ae910..29ae7ce8ea 100644 --- a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C +++ b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C @@ -120,10 +120,10 @@ void Foam::surfaceFilmModels::standardPhaseChange::correct const scalarField& rhoInf = film.rhoPrimary(); const scalarField& muInf = film.muPrimary(); const scalarField& magSf = film.magSf(); - const scalarField hInf = film.htcs().h(); - const scalarField hFilm = film.htcw().h(); - const vectorField dU = film.UPrimary() - film.Us(); - const scalarField availableMass = (delta - deltaMin_)*rho*magSf; + const scalarField hInf(film.htcs().h()); + const scalarField hFilm(film.htcw().h()); + const vectorField dU(film.UPrimary() - film.Us()); + const scalarField availableMass((delta - deltaMin_)*rho*magSf); forAll(dMass, cellI) diff --git a/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C b/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C index c645552e67..903cf1bda1 100644 --- a/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C @@ -289,12 +289,14 @@ Foam::surfaceFilmModels::kinematicSingleLayer::CourantNumber() const { const scalar deltaT = time_.deltaTValue(); - surfaceScalarField SfUfbyDelta = + surfaceScalarField SfUfbyDelta + ( filmRegion_.surfaceInterpolation::deltaCoeffs()*mag(phi_) /fvc::interpolate ( rho_*(delta_ + dimensionedScalar("SMALL", dimLength, SMALL)) - ); + ) + ); CoNum = max(SfUfbyDelta/filmRegion_.magSf()).value()*deltaT; @@ -310,13 +312,13 @@ Foam::surfaceFilmModels::kinematicSingleLayer::CourantNumber() const void Foam::surfaceFilmModels::kinematicSingleLayer::continuityCheck() { - const volScalarField deltaRho0 = deltaRho_; + const volScalarField deltaRho0(deltaRho_); solveContinuity(); if (debug) { - volScalarField mass = deltaRho_*magSf_; + volScalarField mass(deltaRho_*magSf_); dimensionedScalar totalMass = fvc::domainIntegrate(mass) + dimensionedScalar("SMALL", dimMass*dimVolume, ROOTVSMALL); @@ -478,11 +480,11 @@ void Foam::surfaceFilmModels::kinematicSingleLayer::solveThickness Info<< "kinematicSingleLayer::solveThickness()" << endl; } - volScalarField rAU = 1.0/UEqn.A(); + volScalarField rAU(1.0/UEqn.A()); U_ = rAU*UEqn.H(); - surfaceScalarField deltarAUf = fvc::interpolate(delta_*rAU); - surfaceScalarField rhof = fvc::interpolate(rho_); + surfaceScalarField deltarAUf(fvc::interpolate(delta_*rAU)); + surfaceScalarField rhof(fvc::interpolate(rho_)); surfaceScalarField phiAdd ( @@ -504,8 +506,10 @@ void Foam::surfaceFilmModels::kinematicSingleLayer::solveThickness ); constrainFilmField(phid, 0.0); - surfaceScalarField ddrhorAUppf = - fvc::interpolate(delta_)*deltarAUf*rhof*fvc::interpolate(pp); + surfaceScalarField ddrhorAUppf + ( + fvc::interpolate(delta_)*deltarAUf*rhof*fvc::interpolate(pp) + ); // constrainFilmField(ddrhorAUppf, 0.0); for (int nonOrth=0; nonOrth<=nNonOrthCorr_; nonOrth++) diff --git a/src/surfaceFilmModels/surfaceFilmModel/thermoSingleLayer/thermoSingleLayer.C b/src/surfaceFilmModels/surfaceFilmModel/thermoSingleLayer/thermoSingleLayer.C index 2d849f5804..1723c09f71 100644 --- a/src/surfaceFilmModels/surfaceFilmModel/thermoSingleLayer/thermoSingleLayer.C +++ b/src/surfaceFilmModels/surfaceFilmModel/thermoSingleLayer/thermoSingleLayer.C @@ -618,8 +618,10 @@ Foam::surfaceFilmModels::thermoSingleLayer::Srho() const const label filmPatchI = filmBottomPatchIDs_[i]; - scalarField patchMass = - massPhaseChangeForPrimary_.boundaryField()[filmPatchI]; + scalarField patchMass + ( + massPhaseChangeForPrimary_.boundaryField()[filmPatchI] + ); distMap.distribute(patchMass); @@ -678,8 +680,10 @@ Foam::surfaceFilmModels::thermoSingleLayer::Srho(const label i) const const label filmPatchI = filmBottomPatchIDs_[i]; - scalarField patchMass = - massPhaseChangeForPrimary_.boundaryField()[filmPatchI]; + scalarField patchMass + ( + massPhaseChangeForPrimary_.boundaryField()[filmPatchI] + ); distMap.distribute(patchMass); @@ -737,8 +741,10 @@ Foam::surfaceFilmModels::thermoSingleLayer::Sh() const const label filmPatchI = filmBottomPatchIDs_[i]; - scalarField patchEnergy = - energyPhaseChangeForPrimary_.boundaryField()[filmPatchI]; + scalarField patchEnergy + ( + energyPhaseChangeForPrimary_.boundaryField()[filmPatchI] + ); distMap.distribute(patchEnergy); const labelUList& cells = wpp.faceCells();