diff --git a/applications/solvers/basic/potentialFoam/createFields.H b/applications/solvers/basic/potentialFoam/createFields.H index fb699bddf02b6f4eddfe83d3edadc0f048d0fe93..5152727b1db74bf902830f71b0b94e215ae216bf 100644 --- a/applications/solvers/basic/potentialFoam/createFields.H +++ b/applications/solvers/basic/potentialFoam/createFields.H @@ -13,7 +13,7 @@ volVectorField U ); // Initialise the velocity internal field to zero -U = dimensionedVector("0", U.dimensions(), Zero); +U = dimensionedVector(U.dimensions(), Zero); surfaceScalarField phi ( @@ -74,7 +74,7 @@ volScalarField p false ), mesh, - dimensionedScalar(pName, sqr(dimVelocity), 0), + dimensionedScalar(sqr(dimVelocity), Zero), pBCTypes ); @@ -105,7 +105,7 @@ volScalarField Phi IOobject::NO_WRITE ), mesh, - dimensionedScalar("Phi", dimLength*dimVelocity, 0), + dimensionedScalar(dimLength*dimVelocity, Zero), PhiBCTypes ); diff --git a/applications/solvers/basic/potentialFoam/overPotentialFoam/createFields.H b/applications/solvers/basic/potentialFoam/overPotentialFoam/createFields.H index 0dae19a0dedcb837d804d2df21cef82972ede168..67c1c67e59b0440de4f50d86968cdc53838ed5e6 100644 --- a/applications/solvers/basic/potentialFoam/overPotentialFoam/createFields.H +++ b/applications/solvers/basic/potentialFoam/overPotentialFoam/createFields.H @@ -13,7 +13,7 @@ volVectorField U ); // Initialise the velocity internal field to zero -U = dimensionedVector("0", U.dimensions(), Zero); +U = dimensionedVector(U.dimensions(), Zero); surfaceScalarField phi ( @@ -74,7 +74,7 @@ volScalarField p false ), mesh, - dimensionedScalar(pName, sqr(dimVelocity), 0), + dimensionedScalar(sqr(dimVelocity), Zero), pBCTypes ); @@ -105,7 +105,7 @@ volScalarField Phi IOobject::NO_WRITE ), mesh, - dimensionedScalar("Phi", dimLength*dimVelocity, 0), + dimensionedScalar(dimLength*dimVelocity, Zero), PhiBCTypes ); diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C index befc3f3b59c4cbc07d3b350b69d625688c206cfc..c0d9079a8eeadca802b2c5921bf8659bafc4c380 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C @@ -103,7 +103,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", Nv.dimensions(), 0.0) + dimensionedScalar(Nv.dimensions(), Zero) ); N.primitiveFieldRef() = Nv.primitiveField()*Cw; @@ -118,12 +118,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const IOobject::NO_WRITE ), U.mesh(), - dimensionedSymmTensor - ( - "zero", - nsv.dimensions(), - Zero - ) + dimensionedSymmTensor(nsv.dimensions(), Zero) ); ns.primitiveFieldRef() = nsv.primitiveField()*Cw; diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C index 7e3d2bb7aab9ff9732a89fe131f65fa062ede8c4..5f3e6f1bc5640252cbdaa5e2b6723ee199feac23 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C @@ -104,12 +104,7 @@ Foam::tmp<Foam::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const IOobject::NO_WRITE ), U_.mesh(), - dimensionedSymmTensor - ( - "zero", - dimMass/dimTime/pow(dimLength, 3), - Zero - ) + dimensionedSymmTensor(dimMass/dimTime/dimVolume, Zero) ) ); @@ -143,7 +138,7 @@ Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basic::Gk() const IOobject::NO_WRITE ), U_.mesh(), - dimensionedScalar("zero", dimMass/dimLength/pow(dimTime, 3), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C index d91f1b9e319073397bbc02a09db9cefcf45b2c17..c7b55925cac2382c5ddaab5aa8e6d3db2be6ad7f 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C @@ -105,7 +105,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const IOobject::NO_WRITE ), epsilon.mesh(), - dimensionedScalar("XiEq", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); volScalarField& xieq = tXiEq.ref(); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C index 7e3b2536b13cd15b3896408c46d0144d4a959bc0..64ddded3f438bcaebc8a09452cde6a0b19d68304 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C @@ -110,7 +110,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const false ), mesh, - dimensionedScalar("zero", Nv.dimensions(), 0.0) + dimensionedScalar(Nv.dimensions(), Zero) ) ); volScalarField& N = tN.ref(); @@ -127,12 +127,7 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const IOobject::NO_WRITE ), mesh, - dimensionedSymmTensor - ( - "zero", - nsv.dimensions(), - Zero - ) + dimensionedSymmTensor(nsv.dimensions(), Zero) ); ns.primitiveFieldRef() = nsv.primitiveField()*pow(mesh.V(), 2.0/3.0); diff --git a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C index afdebbd2c6493b6de861bec6744533860188cd96..cd6d99dae84ff094e1ad5f3f81789a1cbd81a2c2 100644 --- a/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C +++ b/applications/solvers/combustion/PDRFoam/laminarFlameSpeed/SCOPE/SCOPELaminarFlameSpeed.C @@ -255,7 +255,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi IOobject::NO_WRITE ), p.mesh(), - dimensionedScalar("Su0", dimVelocity, 0.0) + dimensionedScalar(dimVelocity, Zero) ) ); @@ -304,7 +304,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi IOobject::NO_WRITE ), p.mesh(), - dimensionedScalar("Su0", dimVelocity, 0.0) + dimensionedScalar(dimVelocity, Zero) ) ); @@ -358,7 +358,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Ma IOobject::NO_WRITE ), phi.mesh(), - dimensionedScalar("Ma", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); diff --git a/applications/solvers/combustion/XiFoam/bEqn.H b/applications/solvers/combustion/XiFoam/bEqn.H index 6e66e8014f6343989225503b8c7952aa296cf268..fda39d3f51f7cb82cf5c578c44d98f0c39d2d22e 100644 --- a/applications/solvers/combustion/XiFoam/bEqn.H +++ b/applications/solvers/combustion/XiFoam/bEqn.H @@ -243,7 +243,7 @@ if (ign.ignited()) rho*max ( sigmat - sigmas, - dimensionedScalar("0", sigmat.dimensions(), 0) + dimensionedScalar(sigmat.dimensions(), Zero) ), Xi ) diff --git a/applications/solvers/combustion/chemFoam/createFields.H b/applications/solvers/combustion/chemFoam/createFields.H index 8b35089fc88784cefdb6a8a650799c3024f2ac25..ada27f69a878f9e2b8e911cecdf497387b20c164 100644 --- a/applications/solvers/combustion/chemFoam/createFields.H +++ b/applications/solvers/combustion/chemFoam/createFields.H @@ -55,12 +55,7 @@ IOobject::AUTO_WRITE ), mesh, - dimensionedScalar - ( - "zero", - dimensionSet(dimEnergy/dimMass/dimTemperature), - 0.0 - ) + dimensionedScalar(dimEnergy/dimMass/dimTemperature, Zero) ); volVectorField U @@ -74,7 +69,7 @@ IOobject::NO_WRITE ), mesh, - dimensionedVector("zero", dimVelocity, Zero) + dimensionedVector(dimVelocity, Zero) ); #include "createPhi.H" diff --git a/applications/solvers/combustion/fireFoam/createFields.H b/applications/solvers/combustion/fireFoam/createFields.H index 35781d27d56e7c9370ee1122a7e8ea1c17409966..2938f97f12ce5f03077020d50972663f3ae9c057 100644 --- a/applications/solvers/combustion/fireFoam/createFields.H +++ b/applications/solvers/combustion/fireFoam/createFields.H @@ -142,7 +142,7 @@ volScalarField Qdot IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ); #include "createDpdt.H" diff --git a/applications/solvers/combustion/reactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/createFields.H index 708cab0b42d94b7f347b98c624b15d144a707b26..e989a03a2097e74b21c5fca32884baabf73e9ccb 100644 --- a/applications/solvers/combustion/reactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/createFields.H @@ -90,7 +90,7 @@ volScalarField Qdot IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ); #include "createDpdt.H" diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/createFields.H b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/createFields.H index 8e56e940fb1c21b2b9da05d2484e1ff51f093d4b..330c6fbb18d362af7bc1150299a8b3de2cfe2963 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/rhoReactingBuoyantFoam/createFields.H @@ -111,7 +111,7 @@ volScalarField Qdot IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ); #include "createDpdt.H" diff --git a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/createFields.H b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/createFields.H index 6f0c93cc5dd897d336e9e47752484fbc8f0616bb..9f5b4c899b156fdef3499b92f8473f2e0bd5d706 100644 --- a/applications/solvers/combustion/reactingFoam/rhoReactingFoam/createFields.H +++ b/applications/solvers/combustion/reactingFoam/rhoReactingFoam/createFields.H @@ -91,7 +91,7 @@ volScalarField Qdot IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ); #include "createDpdt.H" diff --git a/applications/solvers/combustion/reactingFoam/setRDeltaT.H b/applications/solvers/combustion/reactingFoam/setRDeltaT.H index b0f9c02b6531127d5ebd713d1c9549f5200fd68c..129e749fe8574feae8ed91c27e37552ed34b057c 100644 --- a/applications/solvers/combustion/reactingFoam/setRDeltaT.H +++ b/applications/solvers/combustion/reactingFoam/setRDeltaT.H @@ -104,7 +104,7 @@ License mesh ), mesh, - dimensionedScalar("rDeltaTY", rDeltaT.dimensions(), 0) + dimensionedScalar(rDeltaT.dimensions(), Zero) ); bool foundY = false; diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C index 5d76f3deabf4739c352db1f26dc67deb3f2e608b..47047c702fe98781b48d7bb6988da3d9609ad82f 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralDyMFoam/rhoCentralDyMFoam.C @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) #include "readFluxScheme.H" - dimensionedScalar v_zero("v_zero", dimVolume/dimTime, 0.0); + const dimensionedScalar v_zero(dimVolume/dimTime, Zero); // Courant numbers used to adjust the time-step scalar CoNum = 0.0; diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C index a975275925843dc8e8d6b3d1002e7d00f28be488..cd6fb827dd3aa71584c26fdc03457a0c1a124923 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) #include "readFluxScheme.H" - dimensionedScalar v_zero("v_zero", dimVolume/dimTime, 0.0); + const dimensionedScalar v_zero(dimVolume/dimTime, Zero); // Courant numbers used to adjust the time-step scalar CoNum = 0.0; diff --git a/applications/solvers/compressible/rhoPimpleAdiabaticFoam/createFields.H b/applications/solvers/compressible/rhoPimpleAdiabaticFoam/createFields.H index 322ec367120e68a3fe67c4dcf7b6b61144c0101d..245406c54c40597e6503a5f8d34f792dff85ac00 100644 --- a/applications/solvers/compressible/rhoPimpleAdiabaticFoam/createFields.H +++ b/applications/solvers/compressible/rhoPimpleAdiabaticFoam/createFields.H @@ -91,7 +91,7 @@ volScalarField dpdt mesh ), mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) + dimensionedScalar(p.dimensions()/dimTime, Zero) ); #include "createMRF.H" diff --git a/applications/solvers/compressible/rhoPimpleFoam/overRhoPimpleDyMFoam/createFields.H b/applications/solvers/compressible/rhoPimpleFoam/overRhoPimpleDyMFoam/createFields.H index 41c1cd56354ee60f2acbab2ae7ae76d278dbbadf..adb9fa1b61280a8e9638e368f3f10ef2476fbc62 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/overRhoPimpleDyMFoam/createFields.H +++ b/applications/solvers/compressible/rhoPimpleFoam/overRhoPimpleDyMFoam/createFields.H @@ -73,7 +73,7 @@ volScalarField dpdt mesh ), mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) + dimensionedScalar(p.dimensions()/dimTime, Zero) ); Info<< "Creating field kinetic energy K\n" << endl; diff --git a/applications/solvers/electromagnetics/magneticFoam/createFields.H b/applications/solvers/electromagnetics/magneticFoam/createFields.H index 189ef5d10586d6f12f83c3308f8554f25dbaa1c3..4db509c0434cc04940dd3cfe285bf2d31cad59a1 100644 --- a/applications/solvers/electromagnetics/magneticFoam/createFields.H +++ b/applications/solvers/electromagnetics/magneticFoam/createFields.H @@ -49,7 +49,7 @@ mesh ), mesh, - dimensionedScalar("Mr", dimensionSet(0, 1, 0, 0, 0, 1, 0), 0) + dimensionedScalar(dimensionSet(0, 1, 0, 0, 0, 1, 0), Zero) ); forAll(magnets, i) diff --git a/applications/solvers/financial/financialFoam/createFields.H b/applications/solvers/financial/financialFoam/createFields.H index d9a8769d77a0b7e4b3486fca54955d7876defe2c..a64337e794a2f278d7cd5a1154182d7645b6d225 100644 --- a/applications/solvers/financial/financialFoam/createFields.H +++ b/applications/solvers/financial/financialFoam/createFields.H @@ -82,7 +82,7 @@ volVectorField P V == max ( P.component(Foam::vector::X) - strike, - dimensionedScalar("0", V.dimensions(), 0.0) + dimensionedScalar(V.dimensions(), Zero) ); volScalarField delta diff --git a/applications/solvers/finiteArea/liquidFilmFoam/createFaFields.H b/applications/solvers/finiteArea/liquidFilmFoam/createFaFields.H index 5c760788c94e2a2de064f8e5bbf2135583372af6..f269ea0e658e675878bae6795fe0ccc0d65b3700 100644 --- a/applications/solvers/finiteArea/liquidFilmFoam/createFaFields.H +++ b/applications/solvers/finiteArea/liquidFilmFoam/createFaFields.H @@ -72,7 +72,7 @@ IOobject::NO_WRITE ), aMesh, - dimensionedScalar("Sm", dimLength/dimTime, 0) + dimensionedScalar(dimLength/dimTime, Zero) ); // Mass sink @@ -87,7 +87,7 @@ IOobject::NO_WRITE ), aMesh, - dimensionedScalar("Sd", dimLength/dimTime, 0) + dimensionedScalar(dimLength/dimTime, Zero) ); areaVectorField Ug @@ -101,7 +101,7 @@ IOobject::NO_WRITE ), aMesh, - dimensionedVector("Ug", dimVelocity, vector::zero) + dimensionedVector(dimVelocity, Zero) ); diff --git a/applications/solvers/finiteArea/liquidFilmFoam/createFvFields.H b/applications/solvers/finiteArea/liquidFilmFoam/createFvFields.H index 788b155588bee39bb83c0d2d7617dcadeedb60cb..d422eaef3a625220f7c9b25e790fba3318e16f69 100644 --- a/applications/solvers/finiteArea/liquidFilmFoam/createFvFields.H +++ b/applications/solvers/finiteArea/liquidFilmFoam/createFvFields.H @@ -9,7 +9,7 @@ volVectorField U IOobject::AUTO_WRITE ), mesh, - dimensionedVector("0", dimVelocity, vector::zero) + dimensionedVector(dimVelocity, Zero) ); @@ -24,7 +24,7 @@ volScalarField H IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("0", dimLength, 0) + dimensionedScalar(dimLength, Zero) ); // Create volume-to surface mapping object diff --git a/applications/solvers/finiteArea/sphereSurfactantFoam/createFaFields.H b/applications/solvers/finiteArea/sphereSurfactantFoam/createFaFields.H index 4ec416f95b6ee4f3ee14b89c2b285316191bb76f..49e783e199595b509ce0bc2ad1b51dae22af4ebc 100644 --- a/applications/solvers/finiteArea/sphereSurfactantFoam/createFaFields.H +++ b/applications/solvers/finiteArea/sphereSurfactantFoam/createFaFields.H @@ -43,7 +43,7 @@ areaVectorField Us IOobject::NO_WRITE ), aMesh, - dimensioned<vector>("Us", dimVelocity, vector::zero) + dimensionedVector(dimVelocity, Zero) ); dimensioned<scalar> Uinf("Uinf", dimVelocity, 1.0); diff --git a/applications/solvers/finiteArea/sphereSurfactantFoam/createVolFields.H b/applications/solvers/finiteArea/sphereSurfactantFoam/createVolFields.H index fed56e0409da47a092e5cd4b24a1ac4a3aeb2ba0..2f42dae83d971a8ba8794086d3575c80bf7200ac 100644 --- a/applications/solvers/finiteArea/sphereSurfactantFoam/createVolFields.H +++ b/applications/solvers/finiteArea/sphereSurfactantFoam/createVolFields.H @@ -12,7 +12,7 @@ IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("0", dimless/dimLength, 0) + dimensionedScalar(dimless/dimLength, Zero) ); vsm.mapToVolume(Cs, Cvf.boundaryFieldRef()); @@ -29,7 +29,7 @@ IOobject::AUTO_WRITE ), mesh, - dimensionedVector("zero", dimVelocity, vector::zero) + dimensionedVector(dimVelocity, Zero) ); vsm.mapToVolume(Us, U.boundaryFieldRef()); diff --git a/applications/solvers/finiteArea/surfactantFoam/createVolFields.H b/applications/solvers/finiteArea/surfactantFoam/createVolFields.H index fed56e0409da47a092e5cd4b24a1ac4a3aeb2ba0..2f42dae83d971a8ba8794086d3575c80bf7200ac 100644 --- a/applications/solvers/finiteArea/surfactantFoam/createVolFields.H +++ b/applications/solvers/finiteArea/surfactantFoam/createVolFields.H @@ -12,7 +12,7 @@ IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("0", dimless/dimLength, 0) + dimensionedScalar(dimless/dimLength, Zero) ); vsm.mapToVolume(Cs, Cvf.boundaryFieldRef()); @@ -29,7 +29,7 @@ IOobject::AUTO_WRITE ), mesh, - dimensionedVector("zero", dimVelocity, vector::zero) + dimensionedVector(dimVelocity, Zero) ); vsm.mapToVolume(Us, U.boundaryFieldRef()); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H index aabee1cd37f43e8fab1ac9089945512e1ffb46d4..c46ac5021b27772f06f52c8c9a3057a33ac1af0e 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/createFluidFields.H @@ -122,7 +122,7 @@ forAll(fluidRegions, i) IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), - dimensionedScalar("hRef", dimLength, 0) + dimensionedScalar("hRef", dimLength, Zero) // uses name ) ); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H index 15aba4cb27fc9a4542cef4289bb7d7b402a03ee7..5bcd4b4999a2ce86bde000e16e7265ed9f8fdebe 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H @@ -122,7 +122,7 @@ forAll(fluidRegions, i) IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), - dimensionedScalar("hRef", dimLength, 0) + dimensionedScalar("hRef", dimLength, Zero) // uses name ) ); @@ -223,12 +223,7 @@ forAll(fluidRegions, i) fluidRegions[i] ), fluidRegions[i], - dimensionedScalar - ( - "dpdt", - thermoFluid[i].p().dimensions()/dimTime, - 0 - ) + dimensionedScalar(thermoFluid[i].p().dimensions()/dimTime, Zero) ) ); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H index b6957ee7908329cf0dbe5deb66a815516dd31e6f..6b67f0c73084aa49fe45660a9c28c272a1c49894 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H @@ -51,12 +51,7 @@ IOobject::NO_WRITE ), solidRegions[i], - dimensionedSymmTensor - ( - "zero", - tkappaByCp().dimensions(), - Zero - ), + dimensionedSymmTensor(tkappaByCp().dimensions(), Zero), zeroGradientFvPatchSymmTensorField::typeName ) ); diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H index bba352e71c9a14b1408f19accdbe888971e8430a..d7545b7900742205152d88e16290ce4e020ecedc 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H @@ -86,8 +86,8 @@ autoPtr<incompressible::turbulenceModel> turbulence ); -dimensionedScalar zeroSensitivity("0", dimVelocity*dimVelocity, 0.0); -dimensionedScalar zeroAlpha("0", dimless/dimTime, 0.0); +dimensionedScalar zeroSensitivity(dimVelocity*dimVelocity, Zero); +dimensionedScalar zeroAlpha(dimless/dimTime, Zero); dimensionedScalar lambda ( diff --git a/applications/solvers/incompressible/boundaryFoam/createFields.H b/applications/solvers/incompressible/boundaryFoam/createFields.H index dff4b701f589ab06eea23d34826baeebe03c2e5f..4402b3af68c010343f9919f65faeb6c5f5097244 100644 --- a/applications/solvers/incompressible/boundaryFoam/createFields.H +++ b/applications/solvers/incompressible/boundaryFoam/createFields.H @@ -25,7 +25,7 @@ surfaceScalarField phi IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", mesh.Sf().dimensions()*U.dimensions(), 0.0) + dimensionedScalar(mesh.Sf().dimensions()*U.dimensions(), Zero) ); diff --git a/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/correctPhi.H b/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/correctPhi.H index 1d8b670811983c6f0038052685ab7de79451b89f..9eb96b281efa5231b77fe311496257db5426a591 100644 --- a/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/correctPhi.H +++ b/applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/correctPhi.H @@ -47,7 +47,7 @@ if (mesh.changing()) IOobject::NO_WRITE ), mesh, - dimensionedScalar("pcorr", p.dimensions(), 0.0), + dimensionedScalar(p.dimensions(), Zero), pcorrTypes ); diff --git a/applications/solvers/incompressible/shallowWaterFoam/createFields.H b/applications/solvers/incompressible/shallowWaterFoam/createFields.H index 2e987664ece3eec363f83fa3238fb10f4ec30a36..7e323166dd4d3d93b8da0f902cb0a8ebdeaaac02 100644 --- a/applications/solvers/incompressible/shallowWaterFoam/createFields.H +++ b/applications/solvers/incompressible/shallowWaterFoam/createFields.H @@ -25,7 +25,7 @@ volScalarField h0 IOobject::READ_IF_PRESENT ), mesh, - dimensionedScalar("h0", dimLength, 0.0) + dimensionedScalar(dimLength, Zero) ); Info<< "Creating field hU\n" << endl; diff --git a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/DPMDyMFoam.C b/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/DPMDyMFoam.C index ded2af139beaed6df96de9a1e8de6d76b86db7b9..a282ef19a98ccb00bffb7d4198c99d369c6e00c8 100644 --- a/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/DPMDyMFoam.C +++ b/applications/solvers/lagrangian/DPMFoam/DPMDyMFoam/DPMDyMFoam.C @@ -120,12 +120,7 @@ int main(int argc, char *argv[]) mesh ), mesh, - dimensionedVector - ( - "0", - cloudSU.dimensions()/dimVolume, - Zero - ), + dimensionedVector(cloudSU.dimensions()/dimVolume, Zero), zeroGradientFvPatchVectorField::typeName ); diff --git a/applications/solvers/lagrangian/DPMFoam/DPMFoam.C b/applications/solvers/lagrangian/DPMFoam/DPMFoam.C index 85bba58da3fb9cb468140847eb7157cfd65235a8..174e165f496159b7ad6f96d3baf557b3c6bf441d 100644 --- a/applications/solvers/lagrangian/DPMFoam/DPMFoam.C +++ b/applications/solvers/lagrangian/DPMFoam/DPMFoam.C @@ -100,12 +100,7 @@ int main(int argc, char *argv[]) mesh ), mesh, - dimensionedVector - ( - "0", - cloudSU.dimensions()/dimVolume, - Zero - ), + dimensionedVector(cloudSU.dimensions()/dimVolume, Zero), zeroGradientFvPatchVectorField::typeName ); diff --git a/applications/solvers/lagrangian/DPMFoam/createFields.H b/applications/solvers/lagrangian/DPMFoam/createFields.H index 218388f5c5a3f65b4ef5e11fd44218159bb43330..f135bc791c4ce7cbae8316186e94bc645f1ba817 100644 --- a/applications/solvers/lagrangian/DPMFoam/createFields.H +++ b/applications/solvers/lagrangian/DPMFoam/createFields.H @@ -119,7 +119,7 @@ volScalarField alphac IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("0", dimless, 0) + dimensionedScalar(dimless, Zero) ); word kinematicCloudName("kinematicCloud"); diff --git a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H index f97d5af51ea4a09f1d30042d0d5897c266430038..3df6eefa27a8962b696b73e91be45ee6231f5255 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H @@ -63,7 +63,7 @@ volScalarField rhoEffLagrangian IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("zero", dimDensity, 0.0) + dimensionedScalar(dimDensity, Zero) ); // dynamic pressure field - used externally (optional) @@ -78,7 +78,7 @@ volScalarField pDyn IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("zero", dimPressure, 0.0) + dimensionedScalar(dimPressure, Zero) ); @@ -126,7 +126,7 @@ volScalarField Qdot IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ); #include "createDpdt.H" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H index 66c70f5e39291eb48568932dc17dfb9c4d0bcd1a..bd223a81ce211af81e1a2dc6077859df5ddd03c9 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H @@ -121,7 +121,7 @@ volScalarField Qdot IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ); #include "createDpdt.H" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H index 328fc672242e79696dfa283fabbbe9c097858fd5..47ffa16e50eea334424de18cc3df29d3da2daf03 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/simpleReactingParcelFoam/createFields.H @@ -114,7 +114,7 @@ volScalarField Qdot IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ); #include "createMRF.H" diff --git a/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H b/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H index 983ecf25973064af9c84b24104d3a1b3b4732705..6c758048c7a8bec7601141fbed99ae80c63d8152 100644 --- a/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/simpleCoalParcelFoam/createFields.H @@ -114,7 +114,7 @@ volScalarField Qdot IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ); #include "createMRF.H" diff --git a/applications/solvers/lagrangian/sprayFoam/createFields.H b/applications/solvers/lagrangian/sprayFoam/createFields.H index df9df8fbf34ef8588aaeef8fae610d9ff90cca5f..6b5bda6b2f3adfdf6f468a7b0c1269b092286bd2 100644 --- a/applications/solvers/lagrangian/sprayFoam/createFields.H +++ b/applications/solvers/lagrangian/sprayFoam/createFields.H @@ -113,7 +113,7 @@ volScalarField Qdot IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ); #include "createDpdt.H" diff --git a/applications/solvers/multiphase/MPPICInterFoam/MPPICInterFoam.C b/applications/solvers/multiphase/MPPICInterFoam/MPPICInterFoam.C index 62b6b0e18652d15263248e3ddb0e75941e9e56b4..d6fce4ef552178f73954e44ed0d9d85a4b34a1bf 100644 --- a/applications/solvers/multiphase/MPPICInterFoam/MPPICInterFoam.C +++ b/applications/solvers/multiphase/MPPICInterFoam/MPPICInterFoam.C @@ -130,12 +130,7 @@ int main(int argc, char *argv[]) mesh ), mesh, - dimensionedVector - ( - "0", - cloudSU.dimensions()/dimVolume, - vector::zero - ), + dimensionedVector(cloudSU.dimensions()/dimVolume, Zero), zeroGradientFvPatchVectorField::typeName ); diff --git a/applications/solvers/multiphase/MPPICInterFoam/alphaEqnSubCycle.H b/applications/solvers/multiphase/MPPICInterFoam/alphaEqnSubCycle.H index 6820b2e596f38d7335013da8d4a1d3559f23541e..740e314f96a0b1adf3a1b187deda30d6a52ea4f1 100644 --- a/applications/solvers/multiphase/MPPICInterFoam/alphaEqnSubCycle.H +++ b/applications/solvers/multiphase/MPPICInterFoam/alphaEqnSubCycle.H @@ -10,7 +10,7 @@ if (nAlphaSubCycles > 1) mesh ), mesh, - dimensionedScalar("0", rhoPhi.dimensions(), 0) + dimensionedScalar(rhoPhi.dimensions(), Zero) ); tmp<volScalarField> trSubDeltaT; diff --git a/applications/solvers/multiphase/MPPICInterFoam/createFields.H b/applications/solvers/multiphase/MPPICInterFoam/createFields.H index bcf4252b5b0c165467b5ab93d100a6b236be0d9f..95746f2f6db2356a4e21bf79f8d621518bedfb91 100644 --- a/applications/solvers/multiphase/MPPICInterFoam/createFields.H +++ b/applications/solvers/multiphase/MPPICInterFoam/createFields.H @@ -138,7 +138,7 @@ volScalarField alphac IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("0", dimless, 0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); alphac.oldTime(); diff --git a/applications/solvers/multiphase/VoF/alphaEqnSubCycle.H b/applications/solvers/multiphase/VoF/alphaEqnSubCycle.H index 772de0b97af120527af42789bbeb3b3d8bafc55f..c53d6e106b428d58df1799c11f8694c976c38439 100644 --- a/applications/solvers/multiphase/VoF/alphaEqnSubCycle.H +++ b/applications/solvers/multiphase/VoF/alphaEqnSubCycle.H @@ -10,7 +10,7 @@ if (nAlphaSubCycles > 1) mesh ), mesh, - dimensionedScalar("0", rhoPhi.dimensions(), 0) + dimensionedScalar(rhoPhi.dimensions(), Zero) ); tmp<volScalarField> trSubDeltaT; diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/correctPhi.H b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/correctPhi.H index 62f83226bc0114e9b6199a31fc33a46992380875..4bde1b55f1cdaf8b059fc58bfe9e8b4507701e1e 100644 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/correctPhi.H +++ b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/correctPhi.H @@ -12,7 +12,7 @@ correctUphiBCs(U, phi); IOobject::NO_WRITE ), mesh, - dimensionedScalar("pcorr", p.dimensions(), 0.0), + dimensionedScalar(p.dimensions(), Zero), pcorrTypes ); diff --git a/applications/solvers/multiphase/compressibleInterFoam/alphaSuSp.H b/applications/solvers/multiphase/compressibleInterFoam/alphaSuSp.H index 12d2bcfbd766f7607cc623c60624e9081fff0862..ce2e5520015656a43b6923eafcf0879fe5a9b37e 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/alphaSuSp.H +++ b/applications/solvers/multiphase/compressibleInterFoam/alphaSuSp.H @@ -7,7 +7,7 @@ volScalarField::Internal Sp mesh ), mesh, - dimensionedScalar("Sp", dgdt.dimensions(), 0) + dimensionedScalar(dgdt.dimensions(), Zero) ); volScalarField::Internal Su @@ -19,7 +19,7 @@ volScalarField::Internal Su mesh ), mesh, - dimensionedScalar("Su", dgdt.dimensions(), 0) + dimensionedScalar(dgdt.dimensions(), Zero) ); forAll(dgdt, celli) diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleAlphaEqnSubCycle.H b/applications/solvers/multiphase/compressibleInterFoam/compressibleAlphaEqnSubCycle.H index 006b26317e7208c0b135cdaf2ccde919538c1243..51dd6ea56c2d265d633f5ca15075fcd61be230df 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleAlphaEqnSubCycle.H +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleAlphaEqnSubCycle.H @@ -13,7 +13,7 @@ if (nAlphaSubCycles > 1) mesh ), mesh, - dimensionedScalar("0", alphaPhi10.dimensions(), 0) + dimensionedScalar(alphaPhi10.dimensions(), Zero) ); surfaceScalarField rhoPhiSum @@ -25,7 +25,7 @@ if (nAlphaSubCycles > 1) mesh ), mesh, - dimensionedScalar("0", rhoPhi.dimensions(), 0) + dimensionedScalar(rhoPhi.dimensions(), Zero) ); tmp<volScalarField> trSubDeltaT; diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/alphaSuSp.H b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/alphaSuSp.H index 81309cd091ffbed46ba2ce456c9afaf110394f22..e580b4620d4d359071efee21c1b77a99950adfcc 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/alphaSuSp.H +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/alphaSuSp.H @@ -7,7 +7,7 @@ volScalarField::Internal Sp mesh ), mesh, - dimensionedScalar("Sp", dgdt.dimensions(), 0) + dimensionedScalar(dgdt.dimensions(), Zero) ); volScalarField::Internal Su @@ -19,7 +19,7 @@ volScalarField::Internal Su mesh ), mesh, - dimensionedScalar("Su", dgdt.dimensions(), 0) + dimensionedScalar(dgdt.dimensions(), Zero) ); forAll(dgdt, celli) diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C index efcee3dca1545bee31741fffa412535c089d4629..ca6c5ae4fdec26be4e5d328eedd2667f86407e7b 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/VoFSolidificationMeltingSource/VoFSolidificationMeltingSource.C @@ -136,7 +136,7 @@ Foam::fv::VoFSolidificationMeltingSource::VoFSolidificationMeltingSource IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("alpha1", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ), curTimeIndex_(-1) diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C index 5532f7a3d694a0df20571f556215e843bf8f6db8..afaf713ef23e0ac336cf32666d613672439b0f11 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C @@ -85,7 +85,7 @@ Foam::multiphaseMixtureThermo::multiphaseMixtureThermo IOobject::NO_WRITE ), mesh_, - dimensionedScalar("rhoPhi", dimMass/dimTime, 0.0) + dimensionedScalar(dimMass/dimTime, Zero) ), alphas_ @@ -99,7 +99,7 @@ Foam::multiphaseMixtureThermo::multiphaseMixtureThermo IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("alphas", dimless, 0.0) + dimensionedScalar(dimless, Zero) ), sigmas_(lookup("sigmas")), @@ -686,12 +686,7 @@ Foam::multiphaseMixtureThermo::surfaceTensionForce() const mesh_ ), mesh_, - dimensionedScalar - ( - "surfaceTensionForce", - dimensionSet(1, -2, -2, 0, 0), - 0.0 - ) + dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), Zero) ) ); @@ -943,7 +938,7 @@ Foam::multiphaseMixtureThermo::nearInterface() const mesh_ ), mesh_, - dimensionedScalar("nearInterface", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); @@ -1030,7 +1025,7 @@ void Foam::multiphaseMixtureThermo::solveAlphas MULES::limitSum(alphaPhiCorrs); - rhoPhi_ = dimensionedScalar("0", dimensionSet(1, 0, -1, 0, 0), 0); + rhoPhi_ = dimensionedScalar(dimensionSet(1, 0, -1, 0, 0), Zero); volScalarField sumAlpha ( @@ -1041,7 +1036,7 @@ void Foam::multiphaseMixtureThermo::solveAlphas mesh_ ), mesh_, - dimensionedScalar("sumAlpha", dimless, 0) + dimensionedScalar(dimless, Zero) ); @@ -1066,7 +1061,7 @@ void Foam::multiphaseMixtureThermo::solveAlphas mesh_ ), mesh_, - dimensionedScalar("Sp", alpha.dgdt().dimensions(), 0.0) + dimensionedScalar(alpha.dgdt().dimensions(), Zero) ); volScalarField::Internal Su diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/phaseModel/phaseModel.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/phaseModel/phaseModel.C index 007b8206ae23c70076d049cc35c343a012eb7b28..ac37bac4aefc5d59fadfc26cf90ce458fcc49cd7 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/phaseModel/phaseModel.C @@ -61,7 +61,7 @@ Foam::phaseModel::phaseModel IOobject::AUTO_WRITE ), p.mesh(), - dimensionedScalar("0", dimless/dimTime, 0) + dimensionedScalar(dimless/dimTime, Zero) ) { { diff --git a/applications/solvers/multiphase/driftFluxFoam/alphaEqnSubCycle.H b/applications/solvers/multiphase/driftFluxFoam/alphaEqnSubCycle.H index e77f66b880ec5c93cf48dc8027888544e4b45d7b..115f9c67388e54828d4727dca36a6f72fe250065 100644 --- a/applications/solvers/multiphase/driftFluxFoam/alphaEqnSubCycle.H +++ b/applications/solvers/multiphase/driftFluxFoam/alphaEqnSubCycle.H @@ -8,7 +8,7 @@ mesh ), mesh, - dimensionedScalar("0", phi.dimensions(), 0) + dimensionedScalar(phi.dimensions(), Zero) ); surfaceScalarField phir(fvc::flux(UdmModel.Udm())); @@ -25,7 +25,7 @@ mesh ), mesh, - dimensionedScalar("0", phi.dimensions(), 0) + dimensionedScalar(phi.dimensions(), Zero) ); for diff --git a/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C b/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C index 4ee639f30b51e7dcae1f3cd02215c7ac6671ffef..5058b55eaf89af0e818e1dd5a75f72984674283f 100644 --- a/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C +++ b/applications/solvers/multiphase/driftFluxFoam/incompressibleTwoPhaseInteractingMixture/incompressibleTwoPhaseInteractingMixture.C @@ -102,7 +102,7 @@ incompressibleTwoPhaseInteractingMixture U_.db() ), U_.mesh(), - dimensionedScalar("mu", dimensionSet(1, -1, -1, 0, 0), 0), + dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), Zero), calculatedFvPatchScalarField::typeName ) { diff --git a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C index f497b3c9884b49c92a769b60fbbd917dc83b49f5..26019f439e00f6b10ebbb8610de6cd5f0380fcbe 100644 --- a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C +++ b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C @@ -90,7 +90,7 @@ Foam::relativeVelocityModel::relativeVelocityModel IOobject::AUTO_WRITE ), alphac_.mesh(), - dimensionedVector("Udm", dimVelocity, Zero), + dimensionedVector(dimVelocity, Zero), UdmPatchFieldTypes() ) {} diff --git a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/createFields.H b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/createFields.H index c6bde4234f6f3452665a8b943deafe791d30d7b0..6414b371e90b99f7a87c1f4e803898453e8bcb4c 100644 --- a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/createFields.H +++ b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/createFields.H @@ -136,6 +136,6 @@ volScalarField pDivU mesh ), mesh, - dimensionedScalar("pDivU", p.dimensions()/dimTime, 0) + dimensionedScalar(p.dimensions()/dimTime, Zero) ); diff --git a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/interCondensatingEvaporatingFoam.C b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/interCondensatingEvaporatingFoam.C index d9981659b8db1fe93eef0fb9646e3623c5dfee67..566f074b584890b317c4e28539ab16501221450f 100644 --- a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/interCondensatingEvaporatingFoam.C +++ b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/interCondensatingEvaporatingFoam.C @@ -102,7 +102,7 @@ int main(int argc, char *argv[]) mesh ), mesh, - dimensionedScalar("0", dimMass/dimTime, 0) + dimensionedScalar(dimMass/dimTime, Zero) ); mixture->correct(); diff --git a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/constant/constant.C b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/constant/constant.C index c215b3d21cbe22ba1f9c7df5a2513e3abc9e445b..6a79460da6cbc7dcedb6184c5d8499557febffdd 100644 --- a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/constant/constant.C +++ b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/constant/constant.C @@ -72,9 +72,9 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDotAlphal() const mesh_.lookupObject<basicThermo>(basicThermo::dictName) ); - const dimensionedScalar& TSat = thermo.TSat(); + const dimensionedScalar& TSat = thermo.TSat(); - dimensionedScalar T0("0", dimTemperature, 0.0); + const dimensionedScalar T0(dimTemperature, Zero); return Pair<tmp<volScalarField>> ( @@ -106,9 +106,9 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDot() const mesh_.lookupObject<basicThermo>(basicThermo::dictName) ); - const dimensionedScalar& TSat = thermo.TSat(); + const dimensionedScalar& TSat = thermo.TSat(); - dimensionedScalar T0("0", dimTemperature, 0.0); + const dimensionedScalar T0(dimTemperature, Zero); return Pair<tmp<volScalarField>> ( @@ -139,8 +139,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDotDeltaT() const mesh_.lookupObject<basicThermo>(basicThermo::dictName) ); - const dimensionedScalar& TSat = thermo.TSat(); - + const dimensionedScalar& TSat = thermo.TSat(); return Pair<tmp<volScalarField>> ( diff --git a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C index 0c443f2c1476b6b2bd7ea692ae4138ef9fff35c9..751df5fcb78711323dce2a659bb73c50df0637d2 100644 --- a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C +++ b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C @@ -100,7 +100,7 @@ Foam::twoPhaseMixtureEThermo::twoPhaseMixtureEThermo IOobject::NO_WRITE ), U.mesh(), - dimensionedScalar("zero", dimEnergy/dimMass, 0.0), + dimensionedScalar(dimEnergy/dimMass, Zero), heBoundaryTypes() ) ), @@ -234,21 +234,18 @@ Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::hc() const { const fvMesh& mesh = this->T_.mesh(); - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "hc", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), + "hc", + mesh.time().timeName(), mesh, - dimensionedScalar("hc",Hf2() - Hf1()) - ) + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("hc", Hf2() - Hf1()) ); } diff --git a/applications/solvers/multiphase/interFoam/createFields.H b/applications/solvers/multiphase/interFoam/createFields.H index 23bdacf6b28a7220724437993b0982a3458032af..c0c23c3b1ecdbbc4c5d1d0b2a1181c19d21e0c66 100644 --- a/applications/solvers/multiphase/interFoam/createFields.H +++ b/applications/solvers/multiphase/interFoam/createFields.H @@ -133,7 +133,7 @@ surfaceScalarField alphaPhiUn IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", phi.dimensions(), 0.0) + dimensionedScalar(phi.dimensions(), Zero) ); #include "createMRF.H" diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqnSubCycle.H b/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqnSubCycle.H index 2f117f2cd4a2309d9c7ad5fa32bb7825e4eb178c..117e593c69ea90d23489a08097e577addc0d7dd8 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqnSubCycle.H +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/alphaEqnSubCycle.H @@ -10,7 +10,7 @@ if (nAlphaSubCycles > 1) mesh ), mesh, - dimensionedScalar("0", rhoPhi.dimensions(), 0) + dimensionedScalar(rhoPhi.dimensions(), Zero) ); for diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C index b5eae6b98c7f316b4551c1469d70136636022e3c..e68661b678ef0c994ba3a19c657d93865d86fb2c 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/incompressibleThreePhaseMixture/incompressibleThreePhaseMixture.C @@ -116,7 +116,7 @@ Foam::incompressibleThreePhaseMixture::incompressibleThreePhaseMixture U.db() ), U.mesh(), - dimensionedScalar("nu", dimensionSet(0, 2, -1, 0, 0), 0), + dimensionedScalar(dimensionSet(0, 2, -1, 0, 0), Zero), calculatedFvPatchScalarField::typeName ), diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C index 99b26c4a83cbf35de1cae4c349b53c3bec34db6a..70cc298fe9d5b8eb63a378d5e8403b4ce60434e1 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C @@ -181,7 +181,7 @@ Foam::threePhaseInterfaceProperties::threePhaseInterfaceProperties mixture.alpha1().mesh() ), mixture.alpha1().mesh(), - dimensionedScalar("nHatf", dimArea, 0.0) + dimensionedScalar(dimArea, Zero) ), K_ @@ -193,7 +193,7 @@ Foam::threePhaseInterfaceProperties::threePhaseInterfaceProperties mixture.alpha1().mesh() ), mixture.alpha1().mesh(), - dimensionedScalar("K", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) { calculateK(); diff --git a/applications/solvers/multiphase/interFoam/overInterDyMFoam/correctPhi.H b/applications/solvers/multiphase/interFoam/overInterDyMFoam/correctPhi.H index cfd0353622316f66316a71cb9f4346c4444d8a1b..a7fe042a8b43cce233cf8bfc7ab88e4e1843add7 100644 --- a/applications/solvers/multiphase/interFoam/overInterDyMFoam/correctPhi.H +++ b/applications/solvers/multiphase/interFoam/overInterDyMFoam/correctPhi.H @@ -49,7 +49,7 @@ IOobject::NO_WRITE ), mesh, - dimensionedScalar("pcorr", p_rgh.dimensions(), 0.0), + dimensionedScalar(p_rgh.dimensions(), Zero), pcorrTypes ); diff --git a/applications/solvers/multiphase/interFoam/overInterDyMFoam/createFields.H b/applications/solvers/multiphase/interFoam/overInterDyMFoam/createFields.H index 4a83ab58506bd085b1dbe351e569f63a252c5a19..9f0ff19da7798b9217f290c8432bdea3724786e6 100644 --- a/applications/solvers/multiphase/interFoam/overInterDyMFoam/createFields.H +++ b/applications/solvers/multiphase/interFoam/overInterDyMFoam/createFields.H @@ -165,7 +165,7 @@ surfaceScalarField alphaPhiUn IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", phi.dimensions(), 0.0) + dimensionedScalar(phi.dimensions(), Zero) ); #include "createMRF.H" diff --git a/applications/solvers/multiphase/interIsoFoam/alphaEqnSubCycle.H b/applications/solvers/multiphase/interIsoFoam/alphaEqnSubCycle.H index 8f0af80e0da0de71599babef39d407eca5138621..8fd965e312001207001e31b402b9c4d1b3060a64 100644 --- a/applications/solvers/multiphase/interIsoFoam/alphaEqnSubCycle.H +++ b/applications/solvers/multiphase/interIsoFoam/alphaEqnSubCycle.H @@ -10,7 +10,7 @@ if (nAlphaSubCycles > 1) mesh ), mesh, - dimensionedScalar("0", rhoPhi.dimensions(), 0) + dimensionedScalar(rhoPhi.dimensions(), Zero) ); tmp<volScalarField> trSubDeltaT; diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C index 17b66fa024c77dec49f8959753903625161169aa..8465100138bf7f032c4ec8b3ac1441d05134dbee 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C @@ -158,7 +158,7 @@ int main(int argc, char *argv[]) mesh ), mesh, - dimensionedScalar("0", dimMass/dimTime, 0) + dimensionedScalar(dimMass/dimTime, Zero) ); mixture->correct(); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C index 3ef77d362f753507e99b02a03d7ce5251e608ef6..2998d3a78c15ca86e02bf669351ca4702a3f4314 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.C @@ -98,7 +98,7 @@ int main(int argc, char *argv[]) mesh ), mesh, - dimensionedScalar("0", dimMass/dimTime, 0) + dimensionedScalar(dimMass/dimTime, Zero) ); mixture->correct(); diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C index 0f0cfac2104c6c18a597d8b8a05f2bf9bfb27177..0a172e764af417b182022abbcbc115709479242a 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Kunz/Kunz.C @@ -52,7 +52,7 @@ Foam::phaseChangeTwoPhaseMixtures::Kunz::Kunz Cc_("Cc", dimless, phaseChangeTwoPhaseMixtureCoeffs_), Cv_("Cv", dimless, phaseChangeTwoPhaseMixtureCoeffs_), - p0_("0", pSat().dimensions(), 0.0), + p0_(pSat().dimensions(), Zero), mcCoeff_(Cc_*rho2()/tInf_), mvCoeff_(Cv_*rho2()/(0.5*rho1()*sqr(UInf_)*tInf_)) diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C index e9b1b9358889b6f4ca6e8c7bca032735730910fa..f682ed5725538395fb21e0b31c3758b751af373d 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/Merkle/Merkle.C @@ -52,7 +52,7 @@ Foam::phaseChangeTwoPhaseMixtures::Merkle::Merkle Cc_("Cc", dimless, phaseChangeTwoPhaseMixtureCoeffs_), Cv_("Cv", dimless, phaseChangeTwoPhaseMixtureCoeffs_), - p0_("0", pSat().dimensions(), 0.0), + p0_(pSat().dimensions(), Zero), mcCoeff_(Cc_/(0.5*sqr(UInf_)*tInf_)), mvCoeff_(Cv_*rho1()/(0.5*sqr(UInf_)*tInf_*rho2())) diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C index cc21a86a4fa0f8c2f5defa9d9d94c835ca454244..7d02a651fe8609d6453650c69bd6f5a9a2737fe0 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C @@ -59,7 +59,7 @@ Foam::phaseChangeTwoPhaseMixtures::SchnerrSauer::SchnerrSauer Cc_("Cc", dimless, phaseChangeTwoPhaseMixtureCoeffs_), Cv_("Cv", dimless, phaseChangeTwoPhaseMixtureCoeffs_), - p0_("0", pSat().dimensions(), 0.0) + p0_(pSat().dimensions(), Zero) { correct(); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H b/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H index a4b9838335d68e65d717a8c6b03e4537eb54e0dc..fa5ff769815914807e6e0e06da566a8a664dbab4 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H @@ -23,7 +23,7 @@ volVectorField U IOobject::AUTO_WRITE ), mesh, - dimensionedVector("U", dimVelocity, Zero) + dimensionedVector(dimVelocity, Zero) ); surfaceScalarField phi @@ -37,7 +37,7 @@ surfaceScalarField phi IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("phi", dimArea*dimVelocity, 0) + dimensionedScalar(dimArea*dimVelocity, Zero) ); multiphaseSystem fluid(U, phi); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/interface/interface.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/interface/interface.C index 0ef07da220005b3993d5e76fff5f8703c8d8db3d..de9318246d1ef46da875f338926e220cb6ef5de6 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/interface/interface.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/interface/interface.C @@ -70,22 +70,19 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::interface::K const volScalarField& Ur ) const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "K", - Ur.mesh().time().timeName(), - Ur.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "K", + Ur.mesh().time().timeName(), Ur.mesh(), - dimensionedScalar("K", dimDensity/dimTime, 0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + Ur.mesh(), + dimensionedScalar(dimDensity/dimTime, Zero) ); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index 2f923c38a653f2ccc447f7abb19fa43b0166ecfb..3d51ee57cd00a44ec53fe35e00a9c46b7476a35e 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -146,7 +146,7 @@ void Foam::multiphaseSystem::solveAlphas() mesh_ ), mesh_, - dimensionedScalar("sumAlpha", dimless, 0) + dimensionedScalar(dimless, Zero) ); phasei = 0; @@ -398,7 +398,7 @@ Foam::multiphaseSystem::multiphaseSystem IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("alphas", dimless, 0.0) + dimensionedScalar(dimless, Zero) ), sigmas_(lookup("sigmas")), @@ -557,12 +557,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::Cvm mesh_ ), mesh_, - dimensionedScalar - ( - "Cvm", - dimensionSet(1, -3, 0, 0, 0), - 0 - ) + dimensionedScalar(dimensionSet(1, -3, 0, 0, 0), Zero) ) ); @@ -613,12 +608,7 @@ Foam::tmp<Foam::volVectorField> Foam::multiphaseSystem::Svm mesh_ ), mesh_, - dimensionedVector - ( - "Svm", - dimensionSet(1, -2, -2, 0, 0), - Zero - ) + dimensionedVector(dimensionSet(1, -2, -2, 0, 0), Zero) ) ); @@ -740,12 +730,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::dragCoeff mesh_ ), mesh_, - dimensionedScalar - ( - "dragCoeff", - dimensionSet(1, -3, -1, 0, 0), - 0 - ) + dimensionedScalar(dimensionSet(1, -3, -1, 0, 0), Zero) ) ); @@ -788,12 +773,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::surfaceTension mesh_ ), mesh_, - dimensionedScalar - ( - "surfaceTension", - dimensionSet(1, -2, -2, 0, 0), - 0 - ) + dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), Zero) ) ); tSurfaceTension.ref().setOriented(); @@ -840,7 +820,7 @@ Foam::multiphaseSystem::nearInterface() const mesh_ ), mesh_, - dimensionedScalar("nearInterface", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); @@ -897,7 +877,7 @@ void Foam::multiphaseSystem::solve() mesh_ ), mesh_, - dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0) + dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero) ) ); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C index b57058d61ff3829def823b4c2260083257586219..cc6790499f099bb4b68e5a94ca2996747b6faae0 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C @@ -99,7 +99,7 @@ Foam::phaseModel::phaseModel mesh ), mesh, - dimensionedVector("0", dimVelocity/dimTime, Zero) + dimensionedVector(dimVelocity/dimTime, Zero) ), alphaPhi_ ( @@ -110,7 +110,7 @@ Foam::phaseModel::phaseModel mesh ), mesh, - dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0) + dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero) ) { alphaPhi_.setOriented(); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H index c81f20db76befb2fdd6692b6c13cf175c74b66bb..ad92a797183a0bbf22249a7b7334dba20339f2c7 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H @@ -55,7 +55,7 @@ IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("phiHbyA", dimArea*dimVelocity, 0) + dimensionedScalar(dimArea*dimVelocity, Zero) ); volScalarField rho("rho", fluid.rho()); @@ -173,7 +173,7 @@ mesh ), mesh, - dimensionedScalar("rAUf", dimensionSet(-1, 3, 1, 0, 0), 0) + dimensionedScalar(dimensionSet(-1, 3, 1, 0, 0), Zero) ); phasei = 0; diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C index 825022dee93eec688fddd123a9cd7f0a92fc068a..27f1e937d4f2ec0ecc82e4ccb957abaf6eacf51e 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C @@ -87,7 +87,7 @@ Foam::multiphaseMixture::multiphaseMixture IOobject::NO_WRITE ), mesh_, - dimensionedScalar("rhoPhi", dimMass/dimTime, 0.0) + dimensionedScalar(dimMass/dimTime, Zero) ), alphas_ @@ -101,7 +101,7 @@ Foam::multiphaseMixture::multiphaseMixture IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("alphas", dimless, 0.0) + dimensionedScalar(dimless, Zero) ), nu_ @@ -260,12 +260,7 @@ Foam::multiphaseMixture::surfaceTensionForce() const mesh_ ), mesh_, - dimensionedScalar - ( - "surfaceTensionForce", - dimensionSet(1, -2, -2, 0, 0), - 0.0 - ) + dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), Zero) ) ); @@ -330,7 +325,7 @@ void Foam::multiphaseMixture::solve() mesh_ ), mesh_, - dimensionedScalar("0", rhoPhi_.dimensions(), 0) + dimensionedScalar(rhoPhi_.dimensions(), Zero) ); dimensionedScalar totalDeltaT = runTime.deltaT(); @@ -542,7 +537,7 @@ Foam::multiphaseMixture::nearInterface() const mesh_ ), mesh_, - dimensionedScalar("nearInterface", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); @@ -629,7 +624,7 @@ void Foam::multiphaseMixture::solveAlphas MULES::limitSum(alphaPhiCorrs); - rhoPhi_ = dimensionedScalar("0", dimensionSet(1, 0, -1, 0, 0), 0); + rhoPhi_ = dimensionedScalar(dimensionSet(1, 0, -1, 0, 0), Zero); volScalarField sumAlpha ( @@ -640,7 +635,7 @@ void Foam::multiphaseMixture::solveAlphas mesh_ ), mesh_, - dimensionedScalar("sumAlpha", dimless, 0) + dimensionedScalar(dimless, Zero) ); phasei = 0; diff --git a/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H index e20b5aea2c1fc6207ef1633a95b0919787dca5ea..61c2b37136a1877c20600a236f1f431582204370 100644 --- a/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H @@ -49,7 +49,7 @@ volVectorField zeta IOobject::AUTO_WRITE ), mesh, - dimensionedVector("zero", dimLength, Zero) + dimensionedVector(dimLength, Zero) ); Info<< "Creating field p_gh\n" << endl; diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Henry/Henry.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Henry/Henry.C index 03b21be4909d9e9e4db6349c3b743c56bc461721..8ed6e4a0cd54e64c100337e530a8069ed38f69bd 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Henry/Henry.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Henry/Henry.C @@ -116,19 +116,16 @@ Foam::interfaceCompositionModels::Henry<Thermo, OtherThermo>::YfPrime const volScalarField& Tf ) const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("YfPrime", this->pair_.name()), - this->pair_.phase1().mesh().time().timeName(), - this->pair_.phase1().mesh() - ), - this->pair_.phase1().mesh(), - dimensionedScalar("zero", dimless/dimTemperature, 0) - ) + IOobject::groupName("YfPrime", this->pair_.name()), + this->pair_.phase1().mesh().time().timeName(), + this->pair_.phase1().mesh() + ), + this->pair_.phase1().mesh(), + dimensionedScalar(dimless/dimTemperature, Zero) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C index c33df3cf5c0fd04da300e301df015c3a6f287c0c..f58cdbc562f6a3b9628ee02da7949e5a956b0968 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C @@ -149,7 +149,7 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::D p.mesh() ), p.mesh(), - dimensionedScalar("zero", dimArea/dimTime, 0) + dimensionedScalar(dimArea/dimTime, Zero) ) ); @@ -203,7 +203,7 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::L p.mesh() ), p.mesh(), - dimensionedScalar("zero", dimEnergy/dimMass, 0) + dimensionedScalar(dimEnergy/dimMass, Zero) ) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Raoult/Raoult.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Raoult/Raoult.C index 0cc976c042e4b356bddf2b3563992f5871561566..b178253db5f95894e0463db364691b2ac5c31fc9 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Raoult/Raoult.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Raoult/Raoult.C @@ -55,7 +55,7 @@ Foam::interfaceCompositionModels::Raoult<Thermo, OtherThermo>::Raoult pair.phase1().mesh() ), pair.phase1().mesh(), - dimensionedScalar("zero", dimless/dimTemperature, 0) + dimensionedScalar(dimless/dimTemperature, Zero) ) { forAllConstIter(hashedWordList, this->speciesNames_, iter) diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/constantSaturationConditions/constantSaturationConditions.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/constantSaturationConditions/constantSaturationConditions.C index 241cf8d4b4e0a97138f5d6f230733e68c2e11bfa..2e8afb99df6c0c6f72976eb0b5c2970a3053829c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/constantSaturationConditions/constantSaturationConditions.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/constantSaturationConditions/constantSaturationConditions.C @@ -69,22 +69,19 @@ Foam::saturationModels::constantSaturationConditions::pSat const volScalarField& T ) const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "pSat", - T.mesh().time().timeName(), - T.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "pSat", + T.mesh().time().timeName(), T.mesh(), - pSat_ - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + T.mesh(), + pSat_ ); } @@ -95,22 +92,19 @@ Foam::saturationModels::constantSaturationConditions::pSatPrime const volScalarField& T ) const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "pSatPrime", - T.mesh().time().timeName(), - T.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "pSatPrime", + T.mesh().time().timeName(), T.mesh(), - dimensionedScalar("zero", dimPressure/dimTemperature, 0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + T.mesh(), + dimensionedScalar(dimPressure/dimTemperature, Zero) ); } @@ -121,22 +115,19 @@ Foam::saturationModels::constantSaturationConditions::lnPSat const volScalarField& T ) const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "lnPSat", - T.mesh().time().timeName(), - T.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "lnPSat", + T.mesh().time().timeName(), T.mesh(), - dimensionedScalar("lnPSat", dimless, log(pSat_.value())) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + T.mesh(), + dimensionedScalar("lnPSat", dimless, log(pSat_.value())) ); } @@ -147,22 +138,19 @@ Foam::saturationModels::constantSaturationConditions::Tsat const volScalarField& p ) const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "Tsat", - p.mesh().time().timeName(), - p.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "Tsat", + p.mesh().time().timeName(), p.mesh(), - Tsat_ - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + p.mesh(), + Tsat_ ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/function1/function1.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/function1/function1.C index f165c24d29f79f94b901936067b4a0c31edb4b58..d21dd563db5b87cd0ed09f8a70db62796849acf1 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/function1/function1.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/function1/function1.C @@ -110,7 +110,7 @@ Foam::saturationModels::function1::Tsat IOobject::NO_WRITE ), p.mesh(), - dimensionedScalar("zero", dimTemperature, 0) + dimensionedScalar(dimTemperature, Zero) ) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C index a629c46375dbd5fac16837d240f386bdc38a8bda..8236b94c460f1d64789da0b0f13984c02e0f002a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/polynomial/polynomial.C @@ -107,7 +107,7 @@ Foam::saturationModels::polynomial::Tsat IOobject::NO_WRITE ), p.mesh(), - dimensionedScalar("zero", dimTemperature, 0) + dimensionedScalar(dimTemperature, Zero) ) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C index fa2bccdcf4eee0d02907fc5ac4270f38493a5e67..823b5c4a9b0530f19ccd03948b884538d5c567ac 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/segregated/segregated.C @@ -101,7 +101,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::segregated::K() const mesh ), mesh, - dimensionedScalar("L", dimLength, 0), + dimensionedScalar(dimLength, Zero), zeroGradientFvPatchField<scalar>::typeName ); L.primitiveFieldRef() = cbrt(mesh.V()); diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C index b85199d86a4a89ae9b64ad6c54feaeaba81c5280..abff0d30d031ad534ca24326e6969b49c4838aee 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C @@ -65,21 +65,17 @@ Foam::liftModels::constantLiftCoefficient::Cl() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp<volScalarField> + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - Cl_ - ) - ); + "zero", + mesh.time().timeName(), + mesh + ), + mesh, + Cl_ + ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/noLift/noLift.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/noLift/noLift.C index f8480dc69b79199bb96b6bf5184c01cf33bec6b8..66d99da7405f0b34884b1286c9aaf2e91d7e8ff4 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/noLift/noLift.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/noLift/noLift.C @@ -63,22 +63,19 @@ Foam::tmp<Foam::volScalarField> Foam::liftModels::noLift::Cl() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "Cl", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "Cl", + mesh.time().timeName(), mesh, - dimensionedScalar("Cl", dimless, 0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedScalar(dimless, Zero) ); } @@ -87,22 +84,19 @@ Foam::tmp<Foam::volVectorField> Foam::liftModels::noLift::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<volVectorField> + return tmp<volVectorField>::New ( - new volVectorField + IOobject ( - IOobject - ( - "noLift:F", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noLift:F", + mesh.time().timeName(), mesh, - dimensionedVector("zero", dimF, Zero) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedVector(dimF, Zero) ); } @@ -111,22 +105,19 @@ Foam::tmp<Foam::surfaceScalarField> Foam::liftModels::noLift::Ff() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - "noLift:Ff", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noLift:Ff", + mesh.time().timeName(), mesh, - dimensionedScalar("zero", dimF*dimArea, 0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedScalar(dimF*dimArea, Zero) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C index 2a65c1e1c6acab6f98869b33587874fba0355a12..e1a0b46d3b753ece42baeced995bb341fd31caca 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C @@ -70,22 +70,19 @@ Foam::turbulentDispersionModels::noTurbulentDispersion::D() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "zero", + mesh.time().timeName(), mesh, - dimensionedScalar("zero", dimD, 0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedScalar(dimD, Zero) ); } @@ -95,21 +92,17 @@ Foam::turbulentDispersionModels::noTurbulentDispersion::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp<volVectorField> + return tmp<volVectorField>::New + ( + IOobject ( - new volVectorField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedVector("zero", dimF, Zero) - ) - ); + "zero", + mesh.time().timeName(), + mesh + ), + mesh, + dimensionedVector(dimF, Zero) + ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C index 20378a0ad100d533a94e96499df9d134b95f8929..50f9ea24ec3f7339e5081bb588d7a26ddddf1750 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C @@ -65,28 +65,24 @@ Foam::virtualMassModels::noVirtualMass::Cvm() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp<volScalarField> + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedScalar("zero", dimless, 0) - ) - ); + "zero", + mesh.time().timeName(), + mesh + ), + mesh, + dimensionedScalar(dimless, Zero) + ); } Foam::tmp<Foam::volScalarField> Foam::virtualMassModels::noVirtualMass::K() const { - return Cvm()*dimensionedScalar("zero", dimDensity, 0); + return Cvm()*dimensionedScalar("zero", dimDensity, Zero); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Antal/Antal.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Antal/Antal.C index 80cdae42c736e9b8705d745867f9fe571971fad1..be615f34f319e54ed889f91798f04446aec1392d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Antal/Antal.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Antal/Antal.C @@ -76,7 +76,7 @@ Foam::tmp<Foam::volVectorField> Foam::wallLubricationModels::Antal::Fi() const ( max ( - dimensionedScalar("zero", dimless/dimLength, 0), + dimensionedScalar(dimless/dimLength, Zero), Cw1_/pair_.dispersed().d() + Cw2_/yWall() ) *pair_.continuous().rho() diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C index f549142810b2e6db8ca075b8d901ba535cf11be0..8c068653f8ced45502da342b22b68e7febfa28d5 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C @@ -86,7 +86,7 @@ Foam::tmp<Foam::volVectorField> Foam::wallLubricationModels::Frank::Fi() const ) *max ( - dimensionedScalar("zero", dimless/dimLength, 0.0), + dimensionedScalar(dimless/dimLength, Zero), (1.0 - yTilde)/(Cwd_*y*pow(yTilde, p_ - 1.0)) ) *pair_.continuous().rho() diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C index b35bd0ef8fd4451464db3c7b7109e2dec7fb53fd..d074c5b02e2d96d684665da87a19ba338be9c219 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C @@ -69,22 +69,19 @@ Foam::wallLubricationModels::noWallLubrication::Fi() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<volVectorField> + return tmp<volVectorField>::New ( - new volVectorField + IOobject ( - IOobject - ( - "noWallLubrication:Fi", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noWallLubrication:Fi", + mesh.time().timeName(), mesh, - dimensionedVector("zero", dimF, Zero) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedVector(dimF, Zero) ); } @@ -94,22 +91,19 @@ Foam::wallLubricationModels::noWallLubrication::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<volVectorField> + return tmp<volVectorField>::New ( - new volVectorField + IOobject ( - IOobject - ( - "noWallLubrication:F", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noWallLubrication:F", + mesh.time().timeName(), mesh, - dimensionedVector("zero", dimF, Zero) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedVector(dimF, Zero) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C index 2213f1a7253e0ca60ca47724196492e1e8a551ad..b4865e1f7867a02da1b80cac2583da660faa7d81 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C @@ -195,7 +195,7 @@ Foam::BlendedInterfacialModel<ModelType>::K() const false ), phase1_.mesh(), - dimensionedScalar("zero", ModelType::dimK, 0) + dimensionedScalar(ModelType::dimK, Zero) ) ); @@ -255,7 +255,7 @@ Foam::BlendedInterfacialModel<ModelType>::K(const scalar residualAlpha) const false ), phase1_.mesh(), - dimensionedScalar("zero", ModelType::dimK, 0) + dimensionedScalar(ModelType::dimK, Zero) ) ); @@ -321,7 +321,7 @@ Foam::BlendedInterfacialModel<ModelType>::Kf() const false ), phase1_.mesh(), - dimensionedScalar("zero", ModelType::dimK, 0) + dimensionedScalar(ModelType::dimK, Zero) ) ); @@ -384,7 +384,7 @@ Foam::BlendedInterfacialModel<ModelType>::F() const false ), phase1_.mesh(), - dimensioned<Type>("zero", ModelType::dimF, Zero) + dimensioned<Type>(ModelType::dimF, Zero) ) ); @@ -452,7 +452,7 @@ Foam::BlendedInterfacialModel<ModelType>::Ff() const false ), phase1_.mesh(), - dimensionedScalar("zero", ModelType::dimF*dimArea, 0) + dimensionedScalar(ModelType::dimF*dimArea, Zero) ) ); x.ref().setOriented(); @@ -515,7 +515,7 @@ Foam::BlendedInterfacialModel<ModelType>::D() const false ), phase1_.mesh(), - dimensionedScalar("zero", ModelType::dimD, 0) + dimensionedScalar(ModelType::dimD, Zero) ) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C index bb493847b05b01c21410cc1fc9c38b5e1a9b5c4b..4da0bb0cc134b0ca353b1f5433c53c5edf197508 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C @@ -84,7 +84,7 @@ HeatAndMassTransferPhaseSystem IOobject::AUTO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimDensity/dimTime, 0) + dimensionedScalar(dimDensity/dimTime, Zero) ) ); @@ -100,7 +100,7 @@ HeatAndMassTransferPhaseSystem this->mesh() ), this->mesh(), - dimensionedScalar("zero", dimDensity/dimTime, 0) + dimensionedScalar(dimDensity/dimTime, Zero) ) ); @@ -188,7 +188,7 @@ Foam::HeatAndMassTransferPhaseSystem<BasePhaseSystem>::dmdt this->mesh_ ), this->mesh_, - dimensionedScalar("zero", dimDensity/dimTime, 0) + dimensionedScalar(dimDensity/dimTime, Zero) ) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C index 465d0b3af961cc6a115f5f7463052d29779cba89..2654fce6f9bdcbdca59898d710ff8ff94355ae07 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C @@ -74,23 +74,20 @@ Foam::HeatTransferPhaseSystem<BasePhaseSystem>::dmdt const phasePairKey& key ) const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject + IOobject::groupName ( - IOobject::groupName - ( - "dmdt", - this->phasePairs_[key]->name() + "dmdt", + this->phasePairs_[key]->name() ), - this->mesh().time().timeName(), - this->mesh().time() - ), - this->mesh(), - dimensionedScalar("zero", dimDensity/dimTime, 0) - ) + this->mesh().time().timeName(), + this->mesh().time() + ), + this->mesh(), + dimensionedScalar(dimDensity/dimTime, Zero) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C index 53f724680beb03faf5e837f59614df7299e2963b..54fec2f8ec8a302997d0310cbffc4e8d2516e99a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C @@ -99,7 +99,7 @@ massTransfer() const *this->dmdtExplicit_[pair]; *this->dmdtExplicit_[pair] = - dimensionedScalar("zero", dimDensity/dimTime, 0); + dimensionedScalar(dimDensity/dimTime, Zero); } // Sum up the contribution from each interface composition model @@ -225,7 +225,7 @@ correctThermo() this->mesh() ), this->mesh(), - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ); volScalarField mDotLPrime ( @@ -236,7 +236,7 @@ correctThermo() this->mesh() ), this->mesh(), - dimensionedScalar("zero", mDotL.dimensions()/dimTemperature, 0) + dimensionedScalar(mDotL.dimensions()/dimTemperature, Zero) ); volScalarField& Tf = *this->Tf_[pair]; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C index 43d5881fed049580e4f84e3b2ae0c407b1355799..812fbce2ac9aa7e9afc1ceafed2a07c77a7613f6 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C @@ -166,12 +166,7 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Kd this->mesh_ ), this->mesh_, - dimensionedScalar - ( - IOobject::groupName("Kd", phase.name()), - dimensionSet(1, -3, -1, 0, 0), - 0 - ) + dimensionedScalar(dimensionSet(1, -3, -1, 0, 0), Zero) ) ); @@ -210,26 +205,21 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Vm { return virtualMassModels_[key]->K(); } - else - { - return tmp<volScalarField> + + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - virtualMassModel::typeName + ":K", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedScalar("zero", virtualMassModel::dimK, 0) - ) - ); - } + virtualMassModel::typeName + ":K", + this->mesh_.time().timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(virtualMassModel::dimK, Zero) + ); } @@ -244,26 +234,21 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Vmf { return virtualMassModels_[key]->Kf(); } - else - { - return tmp<surfaceScalarField> + + return tmp<surfaceScalarField>::New + ( + IOobject ( - new surfaceScalarField - ( - IOobject - ( - virtualMassModel::typeName + ":Kf", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedScalar("zero", virtualMassModel::dimK, 0) - ) - ); - } + virtualMassModel::typeName + ":Kf", + this->mesh_.time().timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(virtualMassModel::dimK, Zero) + ); } @@ -288,26 +273,21 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::F { return wallLubricationModels_[key]->template F<vector>(); } - else - { - return tmp<volVectorField> + + return tmp<volVectorField>::New + ( + IOobject ( - new volVectorField - ( - IOobject - ( - liftModel::typeName + ":F", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedVector("zero", liftModel::dimF, Zero) - ) - ); - } + liftModel::typeName + ":F", + this->mesh_.time().timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedVector(liftModel::dimF, Zero) + ); } @@ -348,7 +328,7 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Ff false ), this->mesh_, - dimensionedScalar("zero", liftModel::dimF*dimArea, 0) + dimensionedScalar(liftModel::dimF*dimArea, Zero) ) ); @@ -370,26 +350,21 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::D { return turbulentDispersionModels_[key]->D(); } - else - { - return tmp<volScalarField> + + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - turbulentDispersionModel::typeName + ":D", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedScalar("zero", turbulentDispersionModel::dimD, 0) - ) - ); - } + turbulentDispersionModel::typeName + ":D", + this->mesh_.time().timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(turbulentDispersionModel::dimD, Zero) + ); } @@ -504,7 +479,7 @@ Foam::volVectorField& Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::setF false ), this->mesh_, - dimensionedVector("zero", liftModel::dimF, Zero) + dimensionedVector(liftModel::dimF, Zero) ) ); } @@ -575,9 +550,8 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::setPhiD this->mesh_, dimensionedScalar ( - "zero", dimTime*dimArea*turbulentDispersionModel::dimF/dimDensity, - 0 + Zero ) ) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C index bb5c2462c34bf8827e6740096d5b678b7d2fee24..9ffa4a882f56b2cda4ca9e1c0aabf2b1eb53c7d2 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C @@ -66,7 +66,7 @@ ThermalPhaseChangePhaseSystem IOobject::AUTO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimDensity/dimTime, 0) + dimensionedScalar(dimDensity/dimTime, Zero) ) ); } @@ -128,7 +128,7 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::heatTransfer() const false ), phase.mesh(), - dimensionedScalar("",dimensionSet(1,-1,-3,0,0),0.0) + dimensionedScalar(dimensionSet(1,-1,-3,0,0), Zero) ); if @@ -274,7 +274,7 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::iDmdt this->mesh_ ), this->mesh_, - dimensionedScalar("zero", dimDensity/dimTime, 0) + dimensionedScalar(dimDensity/dimTime, Zero) ) ); @@ -383,7 +383,7 @@ void Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctThermo() } else { - iDmdtNew == dimensionedScalar("0",dmdt.dimensions(), 0); + iDmdtNew == dimensionedScalar(dmdt.dimensions(), Zero); } volScalarField H1(this->heatTransferModels_[pair][pair.first()]->K()); @@ -430,7 +430,7 @@ void Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctThermo() false ), this->mesh(), - dimensionedScalar("zero", dimDensity/dimTime, 0) + dimensionedScalar(dimDensity/dimTime, Zero) ); if diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C index e7c8f0f8f95c5002061a846f6a27bddfa21c0f88..01038b5200ab0e26e576a5bd270390d218122569 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C @@ -46,7 +46,7 @@ Foam::AnisothermalPhaseModel<BasePhaseModel>::AnisothermalPhaseModel fluid.mesh() ), fluid.mesh(), - dimensionedScalar("K", sqr(dimVelocity), scalar(0)) + dimensionedScalar(sqr(dimVelocity), Zero) ) {} diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C index e92cae4c9f075765d116b6729c591c37a04b53fb..dd93d29a723e672bbc4fab1a1a7032bec0133adc 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C @@ -67,19 +67,16 @@ template<class BasePhaseModel> Foam::tmp<Foam::volScalarField> Foam::InertPhaseModel<BasePhaseModel>::Qdot() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("Qdot", this->name()), - this->mesh().time().timeName(), - this->mesh() - ), - this->mesh(), - dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0) - ) + IOobject::groupName("Qdot", this->name()), + this->mesh().time().timeName(), + this->mesh() + ), + this->mesh(), + dimensionedScalar(dimEnergy/dimTime/dimVolume, Zero) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C index 460e21ce8592a485757de290706869dd836d74ec..768e015e5109f0b7ff7113bded36854bbf8ebfb1 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C @@ -151,7 +151,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel fluid.mesh() ), fluid.mesh(), - dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0) + dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero) ), alphaRhoPhi_ ( @@ -162,7 +162,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel fluid.mesh() ), fluid.mesh(), - dimensionedScalar("0", dimensionSet(1, 0, -1, 0, 0), 0) + dimensionedScalar(dimensionSet(1, 0, -1, 0, 0), Zero) ), DUDt_ ( @@ -173,7 +173,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel fluid.mesh() ), fluid.mesh(), - dimensionedVector("0", dimAcceleration, Zero) + dimensionedVector(dimAcceleration, Zero) ), divU_(nullptr), turbulence_ @@ -197,7 +197,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel fluid.mesh() ), fluid.mesh(), - dimensionedScalar("0", dimDensity/dimTime, 0) + dimensionedScalar(dimDensity/dimTime, Zero) ) { alphaPhi_.setOriented(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C index 279b3bb64a4b0252a271873f6c6229cfe300c140..171f2f38786e5792778886ce53726588a9e5e17c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C @@ -93,7 +93,7 @@ void Foam::MultiComponentPhaseModel<BasePhaseModel>::correctThermo() this->fluid().mesh() ), this->fluid().mesh(), - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ); PtrList<volScalarField>& Yi = Y(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C index 26be4e1bc7051ac6804949e9ec3a56f881bc5bbd..4d183cd0a296f9c1e08fd8fffce8363cc57b49d6 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C @@ -56,7 +56,7 @@ Foam::phaseModel::phaseModel IOobject::AUTO_WRITE ), fluid.mesh(), - dimensionedScalar("alpha", dimless, 0) + dimensionedScalar(dimless, Zero) ), fluid_(fluid), diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C index 19e768416fdf33e477794ffbc31796552f269b37..816140df2f53008725428d9c7d29f1ee8cb0e89f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseSystem/phaseSystem.C @@ -149,7 +149,7 @@ Foam::phaseSystem::phaseSystem mesh ), mesh, - dimensionedScalar("dpdt", dimPressure/dimTime, 0) + dimensionedScalar(dimPressure/dimTime, Zero) ), MRF_(mesh_) @@ -225,26 +225,21 @@ Foam::phaseSystem::E(const phasePairKey& key) const { return aspectRatioModels_[key]->E(); } - else - { - return tmp<volScalarField> + + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - aspectRatioModel::typeName + ":E", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedScalar("zero", dimless, 1) - ) - ); - } + aspectRatioModel::typeName + ":E", + this->mesh_.time().timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar("one", dimless, 1) + ); } @@ -255,26 +250,21 @@ Foam::phaseSystem::sigma(const phasePairKey& key) const { return surfaceTensionModels_[key]->sigma(); } - else - { - return tmp<volScalarField> + + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - surfaceTensionModel::typeName + ":sigma", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedScalar("zero", surfaceTensionModel::dimSigma, 0) - ) - ); - } + surfaceTensionModel::typeName + ":sigma", + this->mesh_.time().timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(surfaceTensionModel::dimSigma, Zero) + ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index d9aeeded84f67c96a5f1d14232854a57bc215c38..e7b7121d450a5f08799744070c315002414c9e65 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -184,7 +184,7 @@ void Foam::multiphaseSystem::solveAlphas() mesh_ ), mesh_, - dimensionedScalar("sumAlpha", dimless, 0) + dimensionedScalar(dimless, Zero) ); @@ -208,7 +208,7 @@ void Foam::multiphaseSystem::solveAlphas() mesh_ ), mesh_, - dimensionedScalar("Sp", divU.dimensions(), 0.0) + dimensionedScalar(divU.dimensions(), Zero) ); volScalarField::Internal Su @@ -495,7 +495,7 @@ Foam::multiphaseSystem::multiphaseSystem IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("alphas", dimless, 0.0) + dimensionedScalar(dimless, Zero) ), cAlphas_(lookup("interfaceCompression")), @@ -538,12 +538,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::surfaceTension mesh_ ), mesh_, - dimensionedScalar - ( - "surfaceTension", - dimensionSet(1, -2, -2, 0, 0), - 0 - ) + dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), Zero) ) ); @@ -589,7 +584,7 @@ Foam::multiphaseSystem::nearInterface() const mesh_ ), mesh_, - dimensionedScalar("nearInterface", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); @@ -651,7 +646,7 @@ void Foam::multiphaseSystem::solve() mesh_ ), mesh_, - dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0) + dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero) ) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H index 758c411968e0d19eaa4f2926205214cc4aef83c0..2b0c178f148e0c6cff28f78f6346ca0470a87350 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H @@ -166,7 +166,7 @@ while (pimple.correct()) IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("phiHbyA", dimArea*dimVelocity, 0) + dimensionedScalar(dimArea*dimVelocity, Zero) ); forAll(phases, phasei) @@ -256,7 +256,7 @@ while (pimple.correct()) mesh ), mesh, - dimensionedScalar("rAUf", dimensionSet(-1, 3, 1, 0, 0), 0) + dimensionedScalar(dimensionSet(-1, 3, 1, 0, 0), Zero) ); forAll(phases, phasei) diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/IATEsource/wallBoiling.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/IATEsource/wallBoiling.C index c21e38a0a24685cfd497fdfcf97faea028243421..0b9a40f6bc7f94cfdcc36db3bc5bf054628c596c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/IATEsource/wallBoiling.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/wallBoilingSubModels/IATEsource/wallBoiling.C @@ -74,7 +74,7 @@ Foam::diameterModels::IATEsources::wallBoiling::R phase().mesh() ), phase().mesh(), - dimensionedScalar("R", dimless/dimTime, 0) + dimensionedScalar(dimless/dimTime, Zero) ); volScalarField::Internal Rdk @@ -86,7 +86,7 @@ Foam::diameterModels::IATEsources::wallBoiling::R phase().mesh() ), phase().mesh(), - dimensionedScalar("Rdk", kappai.dimensions()/dimTime, 0) + dimensionedScalar(kappai.dimensions()/dimTime, Zero) ); const phaseCompressibleTurbulenceModel& turbulence = diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C index 67517beb073ebb452b4c9b7fcae664505ef314d1..3d9dc99376b86c3fe4731d61998b3391a786f6ef 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C @@ -141,7 +141,7 @@ JohnsonJacksonSchaeffer::nu false ), phase.mesh(), - dimensionedScalar("nu", dimensionSet(0, 2, -1, 0, 0), 0.0) + dimensionedScalar(dimensionSet(0, 2, -1, 0, 0), Zero) ) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C index eeabe622e12a425078a71b675cf2cc690e2d4138..76d194aa9d0a35591ed5bd0f40f7b46a5327d0de 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C @@ -130,7 +130,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu false ), phase.mesh(), - dimensionedScalar("nu", dimensionSet(0, 2, -1, 0, 0), 0.0) + dimensionedScalar(dimensionSet(0, 2, -1, 0, 0), Zero) ) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index 9f96dd749269aeafe7d7a0764544304792f397ad..5e09566569e7c182850b61f508fa21de6fd02473 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -142,7 +142,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel IOobject::NO_WRITE ), U.mesh(), - dimensionedScalar("zero", dimensionSet(0, 2, -1, 0, 0), 0.0) + dimensionedScalar(dimensionSet(0, 2, -1, 0, 0), Zero) ), gs0_ @@ -156,7 +156,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel IOobject::NO_WRITE ), U.mesh(), - dimensionedScalar("zero", dimensionSet(0, 0, 0, 0, 0), 0.0) + dimensionedScalar(dimensionSet(0, 0, 0, 0, 0), Zero) ), kappa_ @@ -170,7 +170,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel IOobject::NO_WRITE ), U.mesh(), - dimensionedScalar("zero", dimensionSet(1, -1, -1, 0, 0), 0.0) + dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), Zero) ), nuFric_ @@ -184,7 +184,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel IOobject::AUTO_WRITE ), U.mesh(), - dimensionedScalar("zero", dimensionSet(0, 2, -1, 0, 0), 0.0) + dimensionedScalar(dimensionSet(0, 2, -1, 0, 0), Zero) ) { if (type == typeName) diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.C index 4b3c97d69a4274f15b29c2465c7b02826d1cf033..34141a9f5e170648d01149075fb74f3cfcfd2d46 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.C @@ -63,12 +63,7 @@ Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModels::noneViscosity::nu const dimensionedScalar& e ) const { - return dimensionedScalar - ( - "0", - dimensionSet(0, 2, -1, 0, 0, 0, 0), - 0.0 - )*alpha1; + return dimensionedScalar(dimViscosity, Zero)*alpha1; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C index 89c6c8bbeae8b2e4c7f12bf382ee77b0026abae1..9176b7a1c8694aef1ddb7c9bc3273bae031cc93f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C @@ -67,7 +67,7 @@ Foam::RASModels::phasePressureModel::phasePressureModel coeffDict_.lookup("g0") ) { - nut_ == dimensionedScalar("zero", nut_.dimensions(), 0.0); + nut_ == dimensionedScalar(nut_.dimensions(), Zero); if (type == typeName) { @@ -127,26 +127,18 @@ Foam::RASModels::phasePressureModel::epsilon() const Foam::tmp<Foam::volSymmTensorField> Foam::RASModels::phasePressureModel::R() const { - return tmp<volSymmTensorField> + return tmp<volSymmTensorField>::New ( - new volSymmTensorField + IOobject ( - IOobject - ( - IOobject::groupName("R", U_.group()), - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("R", U_.group()), + runTime_.timeName(), mesh_, - dimensioned<symmTensor> - ( - "R", - dimensionSet(0, 2, -2, 0, 0), - Zero - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensioned<symmTensor>(dimensionSet(0, 2, -2, 0, 0)) //Zero ); } @@ -210,25 +202,20 @@ Foam::RASModels::phasePressureModel::pPrimef() const Foam::tmp<Foam::volSymmTensorField> Foam::RASModels::phasePressureModel::devRhoReff() const { - return tmp<volSymmTensorField> + return tmp<volSymmTensorField>::New ( - new volSymmTensorField + IOobject ( - IOobject - ( - IOobject::groupName("devRhoReff", U_.group()), - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("devRhoReff", U_.group()), + runTime_.timeName(), mesh_, - dimensioned<symmTensor> - ( - "R", - rho_.dimensions()*dimensionSet(0, 2, -2, 0, 0), - Zero - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensioned<symmTensor> + ( + rho_.dimensions()*dimensionSet(0, 2, -2, 0, 0), Zero ) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/dummy/dummy.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/dummy/dummy.C index c086f1f5d0469f08c4f2db354c99b125d9a2a8a9..fde7e369156b8f510257dcc519477b5cb93eb341 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/dummy/dummy.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/dummy/dummy.C @@ -59,7 +59,7 @@ Foam::diameterModels::IATEsources::dummy::R iate_.phase().mesh() ), iate_.phase().mesh(), - dimensionedScalar("R", kappai.dimensions()/dimTime, 0) + dimensionedScalar(kappai.dimensions()/dimTime, Zero) ); return fvm::Su(R, kappai); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C index 10739955e88fec39ee10908ccf7c0400db7b98ba..fd3a666e62b4183736088d2aeaf7b4cafeeda194 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C @@ -76,7 +76,7 @@ Foam::diameterModels::IATEsources::randomCoalescence::R iate_.phase().mesh() ), iate_.phase().mesh(), - dimensionedScalar("R", dimless/dimTime, 0) + dimensionedScalar(dimless/dimTime, Zero) ); const scalar Crc = Crc_.value(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/turbulentBreakUp/turbulentBreakUp.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/turbulentBreakUp/turbulentBreakUp.C index f1135bd51af6d14dfc62c0b2ae82aac6b82aee36..22485f5740e949d27596378309b7145d030d335d 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/turbulentBreakUp/turbulentBreakUp.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/turbulentBreakUp/turbulentBreakUp.C @@ -75,7 +75,7 @@ Foam::diameterModels::IATEsources::turbulentBreakUp::R iate_.phase().mesh() ), iate_.phase().mesh(), - dimensionedScalar("R", kappai.dimensions()/dimTime, 0) + dimensionedScalar(kappai.dimensions()/dimTime, Zero) ); const scalar Cti = Cti_.value(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C index 1ab0d22780c1c5e483b87ac9a29b336cbc466a82..bbe3c419252bc7e705e3fa0870b4a7d4cbd7a88f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C @@ -263,7 +263,7 @@ void Foam::twoPhaseSystem::solve() mesh_ ), mesh_, - dimensionedScalar("Sp", dimless/dimTime, 0.0) + dimensionedScalar(dimless/dimTime, Zero) ); volScalarField::Internal Su diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqnSubCycle.H b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqnSubCycle.H index 81c65c1caf737480956f72ff2d3952f7311436c5..0347512d2810cddb89684be89f503b3b66a9da22 100644 --- a/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqnSubCycle.H +++ b/applications/solvers/multiphase/twoLiquidMixingFoam/alphaEqnSubCycle.H @@ -12,7 +12,7 @@ if (nAlphaSubCycles > 1) mesh ), mesh, - dimensionedScalar("0", rhoPhi.dimensions(), 0) + dimensionedScalar(rhoPhi.dimensions(), Zero) ); for diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H b/applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H index b8192fa2ba7f0965fa9dad1658c22e73db169108..d82e79ee545ee8b29267e990e387e8250a48b5dc 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/createFields.H @@ -73,7 +73,7 @@ volScalarField dpdt mesh ), mesh, - dimensionedScalar("dpdt", p.dimensions()/dimTime, 0) + dimensionedScalar(p.dimensions()/dimTime, Zero) ); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/constantAspectRatio/constantAspectRatio.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/constantAspectRatio/constantAspectRatio.C index 386b06d6aa5e493baf36ad7e9d214aaedd8441c7..31b523e8b3af68ac4bb9e29e196f73cb2ecd2cee 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/constantAspectRatio/constantAspectRatio.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/constantAspectRatio/constantAspectRatio.C @@ -70,21 +70,17 @@ Foam::aspectRatioModels::constantAspectRatio::E() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp<volScalarField> + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - E0_ - ) - ); + "zero", + mesh.time().timeName(), + mesh + ), + mesh, + E0_ + ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C index a538ba6364d2af143bde66fab4cbb2cf253e7380..92cb4f1ddabcac4b5b2338bcb3a2c8d5523a4125 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C @@ -101,7 +101,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::segregated::K() const mesh ), mesh, - dimensionedScalar("L", dimLength, 0), + dimensionedScalar(dimLength, Zero), zeroGradientFvPatchField<scalar>::typeName ); L.primitiveFieldRef() = cbrt(mesh.V()); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C index b85199d86a4a89ae9b64ad6c54feaeaba81c5280..abff0d30d031ad534ca24326e6969b49c4838aee 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C @@ -65,21 +65,17 @@ Foam::liftModels::constantLiftCoefficient::Cl() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp<volScalarField> + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - Cl_ - ) - ); + "zero", + mesh.time().timeName(), + mesh + ), + mesh, + Cl_ + ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C index f8480dc69b79199bb96b6bf5184c01cf33bec6b8..927ccc47c04f547cdc2a1a2b468fe07794e5ca60 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C @@ -63,22 +63,19 @@ Foam::tmp<Foam::volScalarField> Foam::liftModels::noLift::Cl() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "Cl", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "Cl", + mesh.time().timeName(), mesh, - dimensionedScalar("Cl", dimless, 0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedScalar(dimless, Zero) ); } @@ -87,22 +84,19 @@ Foam::tmp<Foam::volVectorField> Foam::liftModels::noLift::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<volVectorField> + return tmp<volVectorField>::New ( - new volVectorField + IOobject ( - IOobject - ( - "noLift:F", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noLift:F", + mesh.time().timeName(), mesh, - dimensionedVector("zero", dimF, Zero) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedVector(dimF, Zero) ); } @@ -111,22 +105,19 @@ Foam::tmp<Foam::surfaceScalarField> Foam::liftModels::noLift::Ff() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - "noLift:Ff", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noLift:Ff", + mesh.time().timeName(), mesh, - dimensionedScalar("zero", dimF*dimArea, 0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedScalar(dimF*dimArea, Zero) ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C index 2a65c1e1c6acab6f98869b33587874fba0355a12..e1a0b46d3b753ece42baeced995bb341fd31caca 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C @@ -70,22 +70,19 @@ Foam::turbulentDispersionModels::noTurbulentDispersion::D() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "zero", + mesh.time().timeName(), mesh, - dimensionedScalar("zero", dimD, 0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedScalar(dimD, Zero) ); } @@ -95,21 +92,17 @@ Foam::turbulentDispersionModels::noTurbulentDispersion::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp<volVectorField> + return tmp<volVectorField>::New + ( + IOobject ( - new volVectorField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedVector("zero", dimF, Zero) - ) - ); + "zero", + mesh.time().timeName(), + mesh + ), + mesh, + dimensionedVector(dimF, Zero) + ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C index 56d69ec77f49ad05ecd388eff5610849e1c240b7..f9d25643f0ebf1a8bb8f343b5ac0ae7c7a972dac 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C @@ -65,28 +65,24 @@ Foam::virtualMassModels::noVirtualMass::Cvm() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp<volScalarField> + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedScalar("zero", dimless, 0) - ) - ); + "zero", + mesh.time().timeName(), + mesh + ), + mesh, + dimensionedScalar(dimless, Zero) + ); } Foam::tmp<Foam::volScalarField> Foam::virtualMassModels::noVirtualMass::K() const { - return Cvm()*dimensionedScalar("zero", dimDensity, 0); + return Cvm()*dimensionedScalar("zero", dimDensity, Zero); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Antal/Antal.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Antal/Antal.C index 0b2c7b501297aac7928846a492bca32024fb86b1..3b546e90182a5daabc12d7c1899b598f974d4e08 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Antal/Antal.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Antal/Antal.C @@ -75,7 +75,7 @@ Foam::tmp<Foam::volVectorField> Foam::wallLubricationModels::Antal::Fi() const return max ( - dimensionedScalar("zero", dimless/dimLength, 0), + dimensionedScalar(dimless/dimLength, Zero), Cw1_/pair_.dispersed().d() + Cw2_/yWall() ) *pair_.continuous().rho() diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C index 024e5ef2dfe6bd7f571957514bd3d15160a629dc..033aaa82aae4e377b57c95b894d7aa3c994dbdba 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C @@ -85,7 +85,7 @@ Foam::tmp<Foam::volVectorField> Foam::wallLubricationModels::Frank::Fi() const ) *max ( - dimensionedScalar("zero", dimless/dimLength, 0.0), + dimensionedScalar(dimless/dimLength, Zero), (1.0 - yTilde)/(Cwd_*y*pow(yTilde, p_ - 1.0)) ) *pair_.continuous().rho() diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C index b35bd0ef8fd4451464db3c7b7109e2dec7fb53fd..d074c5b02e2d96d684665da87a19ba338be9c219 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C @@ -69,22 +69,19 @@ Foam::wallLubricationModels::noWallLubrication::Fi() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<volVectorField> + return tmp<volVectorField>::New ( - new volVectorField + IOobject ( - IOobject - ( - "noWallLubrication:Fi", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noWallLubrication:Fi", + mesh.time().timeName(), mesh, - dimensionedVector("zero", dimF, Zero) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedVector(dimF, Zero) ); } @@ -94,22 +91,19 @@ Foam::wallLubricationModels::noWallLubrication::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<volVectorField> + return tmp<volVectorField>::New ( - new volVectorField + IOobject ( - IOobject - ( - "noWallLubrication:F", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noWallLubrication:F", + mesh.time().timeName(), mesh, - dimensionedVector("zero", dimF, Zero) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedVector(dimF, Zero) ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C index 67517beb073ebb452b4c9b7fcae664505ef314d1..3d9dc99376b86c3fe4731d61998b3391a786f6ef 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C @@ -141,7 +141,7 @@ JohnsonJacksonSchaeffer::nu false ), phase.mesh(), - dimensionedScalar("nu", dimensionSet(0, 2, -1, 0, 0), 0.0) + dimensionedScalar(dimensionSet(0, 2, -1, 0, 0), Zero) ) ); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C index eeabe622e12a425078a71b675cf2cc690e2d4138..76d194aa9d0a35591ed5bd0f40f7b46a5327d0de 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C @@ -130,7 +130,7 @@ Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::nu false ), phase.mesh(), - dimensionedScalar("nu", dimensionSet(0, 2, -1, 0, 0), 0.0) + dimensionedScalar(dimensionSet(0, 2, -1, 0, 0), Zero) ) ); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C index 9f96dd749269aeafe7d7a0764544304792f397ad..5e09566569e7c182850b61f508fa21de6fd02473 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -142,7 +142,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel IOobject::NO_WRITE ), U.mesh(), - dimensionedScalar("zero", dimensionSet(0, 2, -1, 0, 0), 0.0) + dimensionedScalar(dimensionSet(0, 2, -1, 0, 0), Zero) ), gs0_ @@ -156,7 +156,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel IOobject::NO_WRITE ), U.mesh(), - dimensionedScalar("zero", dimensionSet(0, 0, 0, 0, 0), 0.0) + dimensionedScalar(dimensionSet(0, 0, 0, 0, 0), Zero) ), kappa_ @@ -170,7 +170,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel IOobject::NO_WRITE ), U.mesh(), - dimensionedScalar("zero", dimensionSet(1, -1, -1, 0, 0), 0.0) + dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), Zero) ), nuFric_ @@ -184,7 +184,7 @@ Foam::RASModels::kineticTheoryModel::kineticTheoryModel IOobject::AUTO_WRITE ), U.mesh(), - dimensionedScalar("zero", dimensionSet(0, 2, -1, 0, 0), 0.0) + dimensionedScalar(dimensionSet(0, 2, -1, 0, 0), Zero) ) { if (type == typeName) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.C index 4b3c97d69a4274f15b29c2465c7b02826d1cf033..34141a9f5e170648d01149075fb74f3cfcfd2d46 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/viscosityModel/none/noneViscosity.C @@ -63,12 +63,7 @@ Foam::tmp<Foam::volScalarField> Foam::kineticTheoryModels::noneViscosity::nu const dimensionedScalar& e ) const { - return dimensionedScalar - ( - "0", - dimensionSet(0, 2, -1, 0, 0, 0, 0), - 0.0 - )*alpha1; + return dimensionedScalar(dimViscosity, Zero)*alpha1; } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C index 62808f99a76b246a83e77d2935da60835011834a..4c272f8d579feb25fd04ed7605a55eb342f1aa24 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C @@ -70,7 +70,7 @@ Foam::RASModels::phasePressureModel::phasePressureModel coeffDict_.lookup("g0") ) { - nut_ == dimensionedScalar("zero", nut_.dimensions(), 0.0); + nut_ == dimensionedScalar(nut_.dimensions(), Zero); if (type == typeName) { @@ -133,26 +133,18 @@ Foam::RASModels::phasePressureModel::epsilon() const Foam::tmp<Foam::volSymmTensorField> Foam::RASModels::phasePressureModel::R() const { - return tmp<volSymmTensorField> + return tmp<volSymmTensorField>::New ( - new volSymmTensorField + IOobject ( - IOobject - ( - IOobject::groupName("R", U_.group()), - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("R", U_.group()), + runTime_.timeName(), mesh_, - dimensioned<symmTensor> - ( - "R", - dimensionSet(0, 2, -2, 0, 0), - Zero - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensioned<symmTensor>(dimensionSet(0, 2, -2, 0, 0), Zero) ); } @@ -216,25 +208,20 @@ Foam::RASModels::phasePressureModel::pPrimef() const Foam::tmp<Foam::volSymmTensorField> Foam::RASModels::phasePressureModel::devRhoReff() const { - return tmp<volSymmTensorField> + return tmp<volSymmTensorField>::New ( - new volSymmTensorField + IOobject ( - IOobject - ( - IOobject::groupName("devRhoReff", U_.group()), - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("devRhoReff", U_.group()), + runTime_.timeName(), mesh_, - dimensioned<symmTensor> - ( - "R", - rho_.dimensions()*dimensionSet(0, 2, -2, 0, 0), - Zero - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensioned<symmTensor> + ( + rho_.dimensions()*dimensionSet(0, 2, -2, 0, 0), Zero ) ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C index 289054982d922728f78e090203986cd763795231..2559e560780c51b8b2e25ffdac01347ddd5a2075 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C @@ -151,7 +151,7 @@ Foam::BlendedInterfacialModel<modelType>::K() const false ), pair_.phase1().mesh(), - dimensionedScalar("zero", modelType::dimK, 0) + dimensionedScalar(modelType::dimK, Zero) ) ); @@ -219,7 +219,7 @@ Foam::BlendedInterfacialModel<modelType>::Kf() const false ), pair_.phase1().mesh(), - dimensionedScalar("zero", modelType::dimK, 0) + dimensionedScalar(modelType::dimK, Zero) ) ); @@ -282,7 +282,7 @@ Foam::BlendedInterfacialModel<modelType>::F() const false ), pair_.phase1().mesh(), - dimensioned<Type>("zero", modelType::dimF, Zero) + dimensioned<Type>(modelType::dimF, Zero) ) ); @@ -350,7 +350,7 @@ Foam::BlendedInterfacialModel<modelType>::Ff() const false ), pair_.phase1().mesh(), - dimensionedScalar("zero", modelType::dimF*dimArea, 0) + dimensionedScalar(modelType::dimF*dimArea, Zero) ) ); @@ -412,7 +412,7 @@ Foam::BlendedInterfacialModel<modelType>::D() const false ), pair_.phase1().mesh(), - dimensionedScalar("zero", modelType::dimD, 0) + dimensionedScalar(modelType::dimD, Zero) ) ); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/dummy/dummy.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/dummy/dummy.C index d442373b0c3193311f0e48855ff056a6f3c3be0b..ac942feea3354dd4ea4e6853c7b0c7bd30dc0adb 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/dummy/dummy.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/dummy/dummy.C @@ -46,19 +46,16 @@ namespace IATEsources Foam::tmp<Foam::volScalarField> Foam::diameterModels::IATEsources::dummy::R() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "R", - iate_.phase().U().time().timeName(), - iate_.phase().mesh() - ), - iate_.phase().U().mesh(), - dimensionedScalar("R", dimless/dimTime, 0) - ) + "R", + iate_.phase().U().time().timeName(), + iate_.phase().mesh() + ), + iate_.phase().U().mesh(), + dimensionedScalar(dimless/dimTime, Zero) ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C index 480937663be0261b9fcddf2ccc5b1f9c0ff1ab4b..cf6a2d58416d1afe269038d94dd7433ba62a2476 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C @@ -73,7 +73,7 @@ Foam::diameterModels::IATEsources::randomCoalescence::R() const iate_.phase().mesh() ), iate_.phase().U().mesh(), - dimensionedScalar("R", dimless/dimTime, 0) + dimensionedScalar(dimless/dimTime, Zero) ) ); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/turbulentBreakUp/turbulentBreakUp.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/turbulentBreakUp/turbulentBreakUp.C index 8c0be0f23284629c22f8420b8971b88077d39610..50cca9b65789d5af786f76c9bd18fa2129fd4bca 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/turbulentBreakUp/turbulentBreakUp.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/turbulentBreakUp/turbulentBreakUp.C @@ -72,7 +72,7 @@ Foam::diameterModels::IATEsources::turbulentBreakUp::R() const iate_.phase().mesh() ), iate_.phase().U().mesh(), - dimensionedScalar("R", dimless/dimTime, 0) + dimensionedScalar(dimless/dimTime, Zero) ) ); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C index 139826e885862d502bd02a847b8b1305ea42d57d..9d96736585899c927c373f4160e203f5294f3735 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C @@ -58,7 +58,7 @@ Foam::phaseModel::phaseModel IOobject::AUTO_WRITE ), fluid.mesh(), - dimensionedScalar("alpha", dimless, 0) + dimensionedScalar(dimless, Zero) ), fluid_(fluid), name_(phaseName), @@ -95,7 +95,7 @@ Foam::phaseModel::phaseModel fluid.mesh() ), fluid.mesh(), - dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0) + dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero) ), alphaRhoPhi_ ( @@ -106,7 +106,7 @@ Foam::phaseModel::phaseModel fluid.mesh() ), fluid.mesh(), - dimensionedScalar("0", dimensionSet(1, 0, -1, 0, 0), 0) + dimensionedScalar(dimensionSet(1, 0, -1, 0, 0), Zero) ) { alphaPhi_.setOriented(); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C index 4750293fe81ced25d1c8d62fbf832ae839f286c0..ec5b76485afd2d7e8d449ea1112b06be5f08ca3c 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C @@ -106,7 +106,7 @@ Foam::twoPhaseSystem::twoPhaseSystem IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("dgdt", dimless/dimTime, 0) + dimensionedScalar(dimless/dimTime, Zero) ) { phase2_.volScalarField::operator=(scalar(1) - phase1_); @@ -399,7 +399,7 @@ void Foam::twoPhaseSystem::solve() mesh_ ), mesh_, - dimensionedScalar("Sp", dgdt_.dimensions(), 0.0) + dimensionedScalar(dgdt_.dimensions(), Zero) ); volScalarField::Internal Su diff --git a/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H b/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H index 0c90a8853263d7992d599fc5238e888a02b22891..ef7a53028c9576fe5ce91d681b6a33e08a955800 100644 --- a/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H +++ b/applications/solvers/stressAnalysis/solidDisplacementFoam/readThermalProperties.H @@ -25,7 +25,7 @@ volScalarField threeKalpha IOobject::NO_WRITE ), mesh, - dimensionedScalar("0", dimensionSet(0, 2, -2 , -1, 0), 0.0) + dimensionedScalar(dimensionSet(0, 2, -2 , -1, 0), Zero) ); @@ -40,7 +40,7 @@ volScalarField DT IOobject::NO_WRITE ), mesh, - dimensionedScalar("0", dimensionSet(0, 2, -1 , 0, 0), 0.0) + dimensionedScalar(dimensionSet(0, 2, -1 , 0, 0), Zero) ); diff --git a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/kineticEnergyLimiter.H b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/kineticEnergyLimiter.H index 589566e3a122387e7843f328ad12842c460eb62f..60a89e8acef5241340552cebeea89cc4571860f0 100644 --- a/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/kineticEnergyLimiter.H +++ b/applications/solvers/stressAnalysis/solidEquilibriumDisplacementFoam/kineticEnergyLimiter.H @@ -14,6 +14,6 @@ if (!(runTime.timeIndex() % 5)) if (smi < -SMALL) { Info<< "Resetting Dcorr to 0" << endl; - Dcorr == dimensionedVector("0", Dcorr.dimensions(), Zero); + Dcorr == dimensionedVector(Dcorr.dimensions(), Zero); } } diff --git a/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C b/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C index 434dd05986a875f78e79447313845b8dcf72bb26..0b867156c43d963688b97867571da095d3b39c5d 100644 --- a/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C +++ b/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C @@ -85,7 +85,7 @@ int main(int argc, char *argv[]) IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("aggomeration", dimless, 0.0) + dimensionedScalar(dimless, Zero) ); scalarField& fld = scalarAgglomeration.primitiveFieldRef(); forAll(fld, celli) @@ -164,7 +164,7 @@ int main(int argc, char *argv[]) IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("aggomeration", dimless, 0.0) + dimensionedScalar(dimless, Zero) ); scalarField& fld = scalarAgglomeration.primitiveFieldRef(); forAll(fld, celli) diff --git a/applications/test/PatchEdgeFaceWave/Test-PatchEdgeFaceWave.C b/applications/test/PatchEdgeFaceWave/Test-PatchEdgeFaceWave.C index 7613773733bc43ce21b8a975dc5d30dff48ba17b..1438e3b32cf9362dbfcc04f9bb8319f6c00673b9 100644 --- a/applications/test/PatchEdgeFaceWave/Test-PatchEdgeFaceWave.C +++ b/applications/test/PatchEdgeFaceWave/Test-PatchEdgeFaceWave.C @@ -111,7 +111,7 @@ int main(int argc, char *argv[]) IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("patchDist", dimLength, 0.0) + dimensionedScalar(dimLength, Zero) ); scalarField pf(vsf.boundaryField()[patch.index()].size()); forAll(pf, facei) @@ -150,7 +150,7 @@ int main(int argc, char *argv[]) IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("otherPatchDist", dimLength, 0.0) + dimensionedScalar(dimLength, Zero) ); vsf.boundaryFieldRef()[patch.index()] = pwd; diff --git a/applications/test/PointEdgeWave/Test-PointEdgeWave.C b/applications/test/PointEdgeWave/Test-PointEdgeWave.C index ea2419c7723ba7630e5927a796443c062caa4136..ff422a2943ff69dd53e1838692b48a6fb9e7dead 100644 --- a/applications/test/PointEdgeWave/Test-PointEdgeWave.C +++ b/applications/test/PointEdgeWave/Test-PointEdgeWave.C @@ -117,7 +117,7 @@ int main(int argc, char *argv[]) IOobject::AUTO_WRITE ), pointMesh::New(mesh), - dimensionedScalar("wallDist", dimLength, 0.0) + dimensionedScalar(dimLength, Zero) ); forAll(allPointInfo, pointi) diff --git a/applications/test/fieldDependency/Test-fieldDependency.C b/applications/test/fieldDependency/Test-fieldDependency.C index edcca1d6685695d3e61574da91ba21107abe0d54..17364b702624decdb8d3d5a0c8851c4c3be8edd2 100644 --- a/applications/test/fieldDependency/Test-fieldDependency.C +++ b/applications/test/fieldDependency/Test-fieldDependency.C @@ -54,7 +54,7 @@ int main(int argc, char *argv[]) IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ); Info<< "Creating field p\n" << endl; @@ -69,7 +69,7 @@ int main(int argc, char *argv[]) IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ); diff --git a/applications/test/mapDistributePolyMesh/cavity/system/processorField b/applications/test/mapDistributePolyMesh/cavity/system/processorField index 19c72f5418f12d49627896aa1ff317a2d288416a..a350fc30921a15081f4e5008440ed36b048a9611 100644 --- a/applications/test/mapDistributePolyMesh/cavity/system/processorField +++ b/applications/test/mapDistributePolyMesh/cavity/system/processorField @@ -49,7 +49,7 @@ functions IOobject::NO_READ ), mesh(), - dimensionedScalar("cellID", dimless, 0) + dimensionedScalar(dimless, Zero) ); forAll(cellID, celli) { diff --git a/applications/test/mappedPatch/Test-MappedPatch.C b/applications/test/mappedPatch/Test-MappedPatch.C index f0c05f9644278f5405101a0fa7b12f11af274eaf..06577292261a52f203bd76810498c06ae99d7f0b 100644 --- a/applications/test/mappedPatch/Test-MappedPatch.C +++ b/applications/test/mappedPatch/Test-MappedPatch.C @@ -81,7 +81,7 @@ int main(int argc, char *argv[]) IOobject::AUTO_WRITE ), mesh, - dimensionedVector("zero", dimLength, Zero), + dimensionedVector(dimLength, Zero), patchFieldTypes ); diff --git a/applications/test/pointField/Test-PointField.C b/applications/test/pointField/Test-PointField.C index 020fdb0e60c1a49f8b36a77fe2a79d7b31271374..cbb4a3f0d556bab58c203ddfc68c6f63435fbb58 100644 --- a/applications/test/pointField/Test-PointField.C +++ b/applications/test/pointField/Test-PointField.C @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) IOobject::AUTO_WRITE ), pMesh, - dimensionedVector("fvmU", dimLength, Zero), + dimensionedVector(dimLength, Zero), pointPatchVectorField::calculatedType() ); diff --git a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C index 468ede34537e56c9330fe84f9e1844bcf36ab3f5..0b3db1f187128763c7ecbb1f9c00f5d75d220a13 100644 --- a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C +++ b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C @@ -278,7 +278,7 @@ int main(int argc, char *argv[]) IOobject::NO_WRITE ), fMesh, - dimensionedScalar("zero", dimless/dimTime, 0) + dimensionedScalar(dimless/dimTime, Zero) ); // Set cell values diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C index d383b4a8897067c85dff9c18cc2a4807bf9549be..6e52cf00282414e61f140ffaad031d0b45996e96 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C @@ -658,7 +658,7 @@ void Foam::cellShapeControlMesh::write() const IOobject::AUTO_WRITE ), pointMesh::New(mesh), - dimensionedScalar("zero", dimLength, scalar(0)) + dimensionedScalar(dimLength, Zero) ); triadIOField alignments diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index 63d7542ceef1b70990ec4144f91f708e6a73e3b8..a65d51377257f7db36e1c9bb7829bec2a1e0391d 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -1113,7 +1113,7 @@ void Foam::conformalVoronoiMesh::writeCellSizes IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("cellSize", dimLength, 0), + dimensionedScalar(dimLength, Zero), zeroGradientFvPatchScalarField::typeName ); @@ -1139,7 +1139,7 @@ void Foam::conformalVoronoiMesh::writeCellSizes // IOobject::AUTO_WRITE // ), // mesh, - // dimensionedScalar("cellVolume", dimLength, 0), + // dimensionedScalar(dimLength, Zero), // zeroGradientFvPatchScalarField::typeName // ); @@ -1158,7 +1158,7 @@ void Foam::conformalVoronoiMesh::writeCellSizes // IOobject::AUTO_WRITE // ), // mesh, - // dimensionedScalar("cellVolume", dimVolume, 0), + // dimensionedScalar(dimVolume, Zero), // zeroGradientFvPatchScalarField::typeName // ); @@ -1177,7 +1177,7 @@ void Foam::conformalVoronoiMesh::writeCellSizes // IOobject::AUTO_WRITE // ), // mesh, - // dimensionedScalar("cellSize", dimLength, 0), + // dimensionedScalar(dimLength, Zero), // zeroGradientFvPatchScalarField::typeName // ); @@ -1223,7 +1223,7 @@ void Foam::conformalVoronoiMesh::writeCellSizes // IOobject::AUTO_WRITE // ), // ptMesh, - // dimensionedScalar("ptTargetCellSize", dimLength, 0), + // dimensionedScalar(dimLength, Zero), // pointPatchVectorField::calculatedType() // ); diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C index 0f07a3519735e8d721cc9439aa37f1a2ed369d1d..71033629702a8cb0e557771fb5ed24ae9b2ea7e4 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C @@ -603,7 +603,7 @@ int main(int argc, char *argv[]) false ), fvm, - dimensionedScalar("zero", dimLength, 0) + dimensionedScalar(dimLength, Zero) ); const searchableSurfaces& geometry = geometryToConformTo.geometry(); @@ -668,7 +668,7 @@ int main(int argc, char *argv[]) false ), pointMesh::New(fvm), - dimensionedScalar("zero", dimLength, 0) + dimensionedScalar(dimLength, Zero) ); { scalarField pointDistSqr(fvm.nPoints(), -sqr(GREAT)); diff --git a/applications/utilities/mesh/manipulation/checkMesh/writeFields.C b/applications/utilities/mesh/manipulation/checkMesh/writeFields.C index 6a7903085294727535f63f0756a68bf8c02f8537..d3341b5b9e8abbe116fb08449d7a3b9ca0775f8d 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/writeFields.C +++ b/applications/utilities/mesh/manipulation/checkMesh/writeFields.C @@ -115,7 +115,7 @@ void Foam::writeFields IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("angle", dimless, 0), + dimensionedScalar(dimless, Zero), calculatedFvPatchScalarField::typeName ); //- Take max @@ -149,7 +149,7 @@ void Foam::writeFields IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("weight", dimless, 0), + dimensionedScalar(dimless, Zero), calculatedFvPatchScalarField::typeName ); //- Take min @@ -190,7 +190,7 @@ void Foam::writeFields IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("skewness", dimless, 0), + dimensionedScalar(dimless, Zero), calculatedFvPatchScalarField::typeName ); //- Take max @@ -217,7 +217,7 @@ void Foam::writeFields false ), mesh, - dimensionedScalar("cellDeterminant", dimless, 0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); cellDeterminant.primitiveFieldRef() = @@ -251,7 +251,7 @@ void Foam::writeFields false ), mesh, - dimensionedScalar("aspectRatio", dimless, 0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); @@ -290,7 +290,7 @@ void Foam::writeFields false ), mesh, - dimensionedScalar("cellShapes", dimless, 0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); const cellShapeList& cellShapes = mesh.cellShapes(); @@ -319,7 +319,7 @@ void Foam::writeFields false ), mesh, - dimensionedScalar("cellVolume", dimVolume, 0), + dimensionedScalar(dimVolume, Zero), calculatedFvPatchScalarField::typeName ); V.ref() = mesh.V(); @@ -349,7 +349,7 @@ void Foam::writeFields IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("cellVolumeRatio", dimless, 0), + dimensionedScalar(dimless, Zero), calculatedFvPatchScalarField::typeName ); //- Take min @@ -438,7 +438,7 @@ void Foam::writeFields IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("cellRegion", dimless, 0), + dimensionedScalar(dimless, Zero), calculatedFvPatchScalarField::typeName ); diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 1974ed569cded6d295b39add1623224cfab01d00..cea85ffa20a50c352c89d5e7d0e2f9dda8d5cd34 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -85,7 +85,7 @@ tmp<volScalarField> createScalarField false ), mesh, - dimensionedScalar("zero", dimless, 0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ) ); diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index c67b886914c99cf21c064d479b6507a7f5a07a96..defed945bed77b4f19c089868f7ee1afbb863567 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -1396,7 +1396,7 @@ void writeCellToRegion(const fvMesh& mesh, const labelList& cellRegion) false ), mesh, - dimensionedScalar("zero", dimless, 0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); forAll(cellRegion, celli) diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpBoundary/helpBoundaryTemplates.C b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpBoundary/helpBoundaryTemplates.C index d552c294f7eabab062dd8f4004fbea20532a54a1..ed4243197d93be1c9d3958d6b7f022822365ccc1 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpBoundary/helpBoundaryTemplates.C +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpBoundary/helpBoundaryTemplates.C @@ -94,7 +94,7 @@ void Foam::helpTypes::helpBoundary::fixedValueFieldConditions false ), mesh, - dimensioned<Type>("zero", dimless, Zero) + dimensioned<Type>(dimless, Zero) ); diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C index 267dce6a9b9c423effa5078fe9d4b59422cc15bc..a61b582980763a5f1da173545c0cb6c73904c6dd 100644 --- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C +++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C @@ -421,7 +421,7 @@ void writeCellDistance IOobject::AUTO_WRITE ), masterMesh, - dimensionedScalar("cellDist", dimless, 0), + dimensionedScalar(dimless, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ); diff --git a/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C b/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C index 8412be157f242d0a3a286d77bb134910bf3e1032..3ba69405756714359b8bb9150cb6fcd9d090145e 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C +++ b/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C @@ -85,12 +85,7 @@ void ReadAndMapFields readField.registerObject() ), pointMesh::New(tetDualMesh), - dimensioned<Type> - ( - "zero", - readField.dimensions(), - Zero - ) + dimensioned<Type>(readField.dimensions(), Zero) ) ); diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H b/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H index 8f8de88d4cc0e794eaf9bf682b8702396e6b75fe..d82d9ffbf59665c56d14efdb22ced1cd8335a6d8 100644 --- a/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H +++ b/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H @@ -49,7 +49,7 @@ volScalarField y IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimLength, 0.0), + dimensionedScalar(dimLength, Zero), zeroGradientFvPatchScalarField::typeName ); y.primitiveFieldRef() = wallDist::New(mesh).y().primitiveField(); @@ -85,7 +85,7 @@ volScalarField mask IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); diff --git a/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C b/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C index eff776563f4ec6fce575cb1283613618db346c6d..fcf87634e3c823a4aa837fada2f06df13af0415c 100644 --- a/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C +++ b/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C @@ -175,7 +175,7 @@ int main(int argc, char *argv[]) IOobject::NO_WRITE ), mesh, - dimensionedScalar("facesAgglomeration", dimless, 0) + dimensionedScalar(dimless, Zero) ); volScalarField::Boundary& facesAgglomerationBf = diff --git a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C index dae63600ab9bf8347d1ef4fba56b85aa56b3827e..59f869d1a0d3870a4d548481323c7dbfe57fa28b 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C +++ b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C @@ -779,7 +779,7 @@ int main(int argc, char *argv[]) IOobject::NO_WRITE ), mesh, - dimensionedScalar("viewFactorField", dimless, 0) + dimensionedScalar(dimless, Zero) ); label compactI = 0; diff --git a/src/OpenFOAM/dimensionSet/dimensionSet.H b/src/OpenFOAM/dimensionSet/dimensionSet.H index fa078273823ff82b2d92110c6d2659fa64b90467..c84e8c683091c1c5277305ffd714a4cb1d591f96 100644 --- a/src/OpenFOAM/dimensionSet/dimensionSet.H +++ b/src/OpenFOAM/dimensionSet/dimensionSet.H @@ -52,7 +52,7 @@ SourceFiles namespace Foam { -// Forward declaration of friend functions and operators +// Forward declarations class dimensionSet; class dimensionSets; diff --git a/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C b/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C index be7cf05115a8aadc49511b980961428321a0cad8..489fd0ca968efcb7d08d98689f8fa9c50e00fac9 100644 --- a/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C +++ b/src/OpenFOAM/dimensionedTypes/dimensionedScalar/dimensionedScalar.C @@ -68,7 +68,6 @@ dimensionedScalar operator/(const scalar s1, const dimensionedScalar& ds2) } - dimensionedScalar pow ( const dimensionedScalar& ds, diff --git a/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.C b/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.C index 014c1e543fa81a9bcdf22910abb84ee508648b07..855d3e900ea8220bc02832294217b84c5366ea18 100644 --- a/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.C +++ b/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -71,17 +71,43 @@ void Foam::dimensioned<Type>::initialize(Istream& is) // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +template<class Type> +Foam::dimensioned<Type>::dimensioned() +: + name_("0"), + dimensions_(dimless), + value_(Zero) +{} + + +template<class Type> +Foam::dimensioned<Type>::dimensioned(const dimensionSet& dims) +: + name_("0"), + dimensions_(dims), + value_(Zero) +{} + + +template<class Type> +Foam::dimensioned<Type>::dimensioned(const dimensionSet& dims, const zero) +: + name_("0"), + dimensions_(dims), + value_(Zero) +{} + + template<class Type> Foam::dimensioned<Type>::dimensioned ( const word& name, - const dimensionSet& dimSet, - const Type t + const dimensioned<Type>& dt ) : name_(name), - dimensions_(dimSet), - value_(t) + dimensions_(dt.dimensions_), + value_(dt.value_) {} @@ -89,12 +115,13 @@ template<class Type> Foam::dimensioned<Type>::dimensioned ( const word& name, - const dimensioned<Type>& dt + const dimensionSet& dims, + const Type& val ) : name_(name), - dimensions_(dt.dimensions_), - value_(dt.value_) + dimensions_(dims), + value_(val) {} @@ -131,12 +158,12 @@ template<class Type> Foam::dimensioned<Type>::dimensioned ( const word& name, - const dimensionSet& dimSet, + const dimensionSet& dims, Istream& is ) : name_(name), - dimensions_(dimSet), + dimensions_(dims), value_(Zero) { initialize(is); @@ -147,40 +174,18 @@ template<class Type> Foam::dimensioned<Type>::dimensioned ( const word& name, - const dimensionSet& dimSet, + const dimensionSet& dims, const dictionary& dict ) : name_(name), - dimensions_(dimSet), + dimensions_(dims), value_(Zero) { initialize(dict.lookup(name)); } -template<class Type> -Foam::dimensioned<Type>::dimensioned -() -: - name_("undefined"), - dimensions_(dimless), - value_(Zero) -{} - - -template<class Type> -Foam::dimensioned<Type>::dimensioned -( - const dimensionSet& dimSet -) -: - name_("0"), - dimensions_(dimSet), - value_(Zero) -{} - - // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // template<class Type> @@ -196,10 +201,8 @@ Foam::dimensioned<Type> Foam::dimensioned<Type>::lookupOrDefault { return dimensioned<Type>(name, dims, dict.lookup(name)); } - else - { - return dimensioned<Type>(name, dims, defaultValue); - } + + return dimensioned<Type>(name, dims, defaultValue); } diff --git a/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.H b/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.H index 888426003a3ca6113c483f61548de2878c387c8a..65e8aa1d6fa5ad742028fa75b6657e761c8ead07 100644 --- a/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.H +++ b/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.H @@ -45,7 +45,9 @@ SourceFiles namespace Foam { -// Forward declaration of friend functions and operators +// Forward declarations +class zero; +class dictionary; template<class Type> class dimensioned; @@ -55,7 +57,6 @@ Istream& operator>>(Istream&, dimensioned<Type>&); template<class Type> Ostream& operator<<(Ostream&, const dimensioned<Type>&); -class dictionary; /*---------------------------------------------------------------------------*\ Class dimensioned Declaration @@ -91,37 +92,50 @@ public: // Constructors - //- Construct given a name, a value and its dimensionSet. - dimensioned(const word&, const dimensionSet&, const Type); + //- Null constructor: a dimensionless Zero, named "0" + dimensioned(); + + //- A dimensioned Zero, named "0" + explicit dimensioned(const dimensionSet& dims); - //- Construct from a dimensioned<Type> changing the name. - dimensioned(const word&, const dimensioned<Type>&); + //- A dimensioned Zero, named "0" + explicit dimensioned(const dimensionSet& dims, const zero); - //- Construct given a value (creates dimensionless value). - dimensioned(const Type& t) + //- Construct dimensionless from given value. + dimensioned(const Type& val) : - name_(::Foam::name(t)), + name_(::Foam::name(val)), dimensions_(dimless), - value_(t) + value_(val) {} - //- Construct from Istream. - dimensioned(Istream&); + //- Copy construct a dimensioned Type with a new name + dimensioned(const word& name, const dimensioned<Type>& dt); - //- Construct from an Istream with a given name - dimensioned(const word&, Istream&); + //- Construct from components: name, dimensionSet and a value. + dimensioned + ( + const word& name, + const dimensionSet& dims, + const Type& val + ); - //- Construct from an Istream with a given name and dimensions - dimensioned(const word&, const dimensionSet&, Istream&); + //- Construct from Istream. + dimensioned(Istream& is); - //- Construct from dictionary lookup with a given name and dimensions - dimensioned(const word&, const dimensionSet&, const dictionary&); + //- Construct from Istream with a given name + dimensioned(const word& name, Istream& is); - //- Null constructor - a dimensionless Zero, named "undefined" - dimensioned(); + //- Construct from Istream with a given name and dimensions + dimensioned(const word& name, const dimensionSet& dims, Istream& is); - //- A dimensioned Zero, named "0" - explicit dimensioned(const dimensionSet&); + //- Construct from dictionary lookup with a given name and dimensions + dimensioned + ( + const word& name, + const dimensionSet& dims, + const dictionary& dict + ); // Static member functions @@ -129,8 +143,8 @@ public: //- Construct from dictionary, with default dimensions and value. static dimensioned<Type> lookupOrDefault ( - const word&, - const dictionary&, + const word& name, + const dictionary& dict, const dimensionSet& dims = dimless, const Type& defaultValue = Type(Zero) ); @@ -138,8 +152,8 @@ public: //- Construct from dictionary dimensionless with value. static dimensioned<Type> lookupOrDefault ( - const word&, - const dictionary&, + const word& name, + const dictionary& dict, const Type& defaultValue = Type(Zero) ); @@ -147,8 +161,8 @@ public: // If the value is not found, it is added into the dictionary. static dimensioned<Type> lookupOrAddToDict ( - const word&, - dictionary&, + const word& name, + dictionary& dict, const dimensionSet& dims = dimless, const Type& defaultValue = Type(Zero) ); @@ -157,8 +171,8 @@ public: // If the value is not found, it is added into the dictionary. static dimensioned<Type> lookupOrAddToDict ( - const word&, - dictionary&, + const word& name, + dictionary& dict, const Type& defaultValue = Type(Zero) ); @@ -184,28 +198,28 @@ public: Type& value(); //- Return a component as a dimensioned<cmptType> - dimensioned<cmptType> component(const direction) const; + dimensioned<cmptType> component(const direction d) const; //- Return a component with a dimensioned<cmptType> - void replace(const direction, const dimensioned<cmptType>&); + void replace(const direction d, const dimensioned<cmptType>& dc); //- Return transpose. dimensioned<Type> T() const; //- Update the value of dimensioned<Type> - void read(const dictionary&); + void read(const dictionary& dict); //- Update the value of dimensioned<Type> if found in the dictionary. - bool readIfPresent(const dictionary&); + bool readIfPresent(const dictionary& dict); // I/O //- Read value from stream and units from dictionary - Istream& read(Istream& is, const dictionary&); + Istream& read(Istream& is, const dictionary& readSet); //- Read value from stream and units from table - Istream& read(Istream& is, const HashTable<dimensionedScalar>&); + Istream& read(Istream& is, const HashTable<dimensionedScalar>& readSet); //- Read value from stream and units from system table Istream& read(Istream& is); @@ -214,21 +228,27 @@ public: // Member operators //- Return a component as a dimensioned<cmptType> - dimensioned<cmptType> operator[](const direction) const; + dimensioned<cmptType> operator[](const direction d) const; - void operator+=(const dimensioned<Type>&); - void operator-=(const dimensioned<Type>&); - void operator*=(const scalar); - void operator/=(const scalar); + void operator+=(const dimensioned<Type>& dt); + void operator-=(const dimensioned<Type>& dt); + void operator*=(const scalar s); + void operator/=(const scalar s); // IOstream operators friend Istream& operator>> <Type> - (Istream&, dimensioned<Type>&); + ( + Istream& is, + dimensioned<Type>& dt + ); friend Ostream& operator<< <Type> - (Ostream&, const dimensioned<Type>&); + ( + Ostream& os, + const dimensioned<Type>& dt + ); }; diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H index 8abae114e7c8e734883bff6aade3bccd2207f68e..6fbeeb80ac87f66ff0bad46a6e57e2a29c8db970 100644 --- a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H +++ b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2015-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -144,7 +144,8 @@ public: List<Type>&& field ); - //- Construct from components + //- Construct from components, setting the initial size and assigning + //- the dimensions, but not initialising any field values. // Used for temporary fields which are initialised after construction DimensionedField ( @@ -154,7 +155,9 @@ public: const bool checkIOFlags = true ); - //- Construct from components + //- Construct from components, setting the initial size and assigning + //- both dimensions and values. + // The internal name for the dimensioned\<Type\> has no influence. DimensionedField ( const IOobject& io, @@ -163,7 +166,7 @@ public: const bool checkIOFlags = true ); - //- Construct from Istream + //- Construct from Istream. DimensionedField ( const IOobject& io, @@ -180,20 +183,20 @@ public: const word& fieldDictEntry = "value" ); - //- Construct as copy + //- Copy construct DimensionedField ( const DimensionedField<Type, GeoMesh>& df ); - //- Construct as copy or re-use as specified. + //- Copy construct or reuse (move) as specified. DimensionedField ( DimensionedField<Type, GeoMesh>& df, bool reuse ); - //- Construct by transferring the DimensionedField + //- Move construct explicit DimensionedField ( DimensionedField<Type, GeoMesh>&& df @@ -207,14 +210,14 @@ public: ); #endif - //- Construct as copy resetting IO parameters + //- Copy construct, resetting IO parameters DimensionedField ( const IOobject& io, const DimensionedField<Type, GeoMesh>& df ); - //- Construct as copy resetting IO parameters and re-use as specified. + //- Copy or move construct, resetting IO parameters. DimensionedField ( const IOobject& io, @@ -222,14 +225,14 @@ public: bool reuse ); - //- Construct as copy resetting name + //- Copy construct, resetting name DimensionedField ( const word& newName, const DimensionedField<Type, GeoMesh>& df ); - //- Construct as copy resetting name and re-use as specified. + //- Copy or move construct, resetting name. DimensionedField ( const word& newName, @@ -237,7 +240,7 @@ public: bool reuse ); - //- Construct by transferring the DimensionedField with a new name + //- Move construct with a new name DimensionedField ( const word& newName, @@ -343,6 +346,8 @@ public: void operator=(const DimensionedField<Type, GeoMesh>& df); void operator=(const tmp<DimensionedField<Type, GeoMesh>>& tdf); + + //- Assign dimensions and value. void operator=(const dimensioned<Type>& dt); void operator+=(const DimensionedField<Type, GeoMesh>& df); diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index 6fd5a97ce59fa535503b7741ea413b2f4bc50451..ea2091d26befc3b9cdb6082b3adff80e45595277 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -631,7 +631,6 @@ Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricField const GeometricField<Type, PatchField, GeoMesh>& gf, const wordList& patchFieldTypes, const wordList& actualPatchTypes - ) : Internal(io, gf), diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H index 0b13a145b2bc9a8203094b201ddf62e1a620ca84..202065d2a8f69e4c358389e3ba662b370888620c 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2015-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -51,10 +51,9 @@ SourceFiles namespace Foam { +// Forward declarations class dictionary; -// Forward declaration of friend functions and operators - template<class Type, template<class> class PatchField, class GeoMesh> class GeometricField; @@ -291,44 +290,48 @@ public: // Constructors - //- Constructor given IOobject, mesh, dimensions and patch type. - // This allocates storage for the field but not values. + //- Construct given IOobject, mesh, dimensions and patch type. + // This allocates storage for the field but does not set values. // Used only within this class to create TEMPORARY variables GeometricField ( - const IOobject&, - const Mesh&, - const dimensionSet&, + const IOobject& io, + const Mesh& mesh, + const dimensionSet& ds, const word& patchFieldType=PatchField<Type>::calculatedType() ); - //- Constructor given IOobject, mesh, dimensions and patch types. - // This allocates storage for the field but not values. + //- Construct given IOobject, mesh, dimensions and patch types. + // This allocates storage for the field but does not set values. // Used only within this class to create TEMPORARY variables GeometricField ( - const IOobject&, - const Mesh&, - const dimensionSet&, + const IOobject& io, + const Mesh& mesh, + const dimensionSet& ds, const wordList& wantedPatchTypes, const wordList& actualPatchTypes = wordList() ); - //- Constructor given IOobject, mesh, dimensioned<Type> and patch type. + //- Construct given IOobject, mesh, dimensioned<Type> and patch type. + // This assigns both dimensions and values. + // The internal name for the dimensioned\<Type\> has no influence. GeometricField ( - const IOobject&, - const Mesh&, - const dimensioned<Type>&, + const IOobject& io, + const Mesh& mesh, + const dimensioned<Type>& dt, const word& patchFieldType=PatchField<Type>::calculatedType() ); - //- Constructor given IOobject, mesh, dimensioned<Type> and patch types. + //- Construct given IOobject, mesh, dimensioned<Type> and patch types. + // This assigns both dimensions and values. + // The internal name for the dimensioned\<Type\> has no influence. GeometricField ( - const IOobject&, - const Mesh&, - const dimensioned<Type>&, + const IOobject& io, + const Mesh& mesh, + const dimensioned<Type>& dt, const wordList& wantedPatchTypes, const wordList& actualPatchTypes = wordList() ); @@ -336,64 +339,64 @@ public: //- Constructor from components GeometricField ( - const IOobject&, - const Internal&, - const PtrList<PatchField<Type>>& + const IOobject& io, + const Internal& diField, + const PtrList<PatchField<Type>>& ptfl ); //- Constructor from components GeometricField ( - const IOobject&, - const Mesh&, - const dimensionSet&, - const Field<Type>&, - const PtrList<PatchField<Type>>& + const IOobject& io, + const Mesh& mesh, + const dimensionSet& ds, + const Field<Type>& iField, + const PtrList<PatchField<Type>>& ptfl ); //- Construct and read given IOobject GeometricField ( - const IOobject&, - const Mesh&, + const IOobject& io, + const Mesh& mesh, const bool readOldTime = true ); //- Construct from dictionary GeometricField ( - const IOobject&, - const Mesh&, - const dictionary& + const IOobject& io, + const Mesh& mesh, + const dictionary& dict ); - //- Construct as copy + //- Copy construct GeometricField ( - const GeometricField<Type, PatchField, GeoMesh>& + const GeometricField<Type, PatchField, GeoMesh>& gf ); //- Construct as copy of tmp<GeometricField> deleting argument #ifndef NoConstructFromTmp GeometricField ( - const tmp<GeometricField<Type, PatchField, GeoMesh>>& + const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf ); #endif //- Construct as copy resetting IO parameters GeometricField ( - const IOobject&, - const GeometricField<Type, PatchField, GeoMesh>& + const IOobject& io, + const GeometricField<Type, PatchField, GeoMesh>& gf ); //- Construct as copy of tmp<GeometricField> resetting IO parameters #ifndef NoConstructFromTmp GeometricField ( - const IOobject&, - const tmp<GeometricField<Type, PatchField, GeoMesh>>& + const IOobject& io, + const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf ); #endif @@ -401,7 +404,7 @@ public: GeometricField ( const word& newName, - const GeometricField<Type, PatchField, GeoMesh>& + const GeometricField<Type, PatchField, GeoMesh>& gf ); //- Construct as copy resetting name @@ -409,23 +412,23 @@ public: GeometricField ( const word& newName, - const tmp<GeometricField<Type, PatchField, GeoMesh>>& + const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf ); #endif //- Construct as copy resetting IO parameters and patch type GeometricField ( - const IOobject&, - const GeometricField<Type, PatchField, GeoMesh>&, + const IOobject& io, + const GeometricField<Type, PatchField, GeoMesh>& gf, const word& patchFieldType ); //- Construct as copy resetting IO parameters and boundary types GeometricField ( - const IOobject&, - const GeometricField<Type, PatchField, GeoMesh>&, + const IOobject& io, + const GeometricField<Type, PatchField, GeoMesh>& gf, const wordList& patchFieldTypes, const wordList& actualPatchTypes = wordList() ); @@ -434,8 +437,8 @@ public: #ifndef NoConstructFromTmp GeometricField ( - const IOobject&, - const tmp<GeometricField<Type, PatchField, GeoMesh>>&, + const IOobject& io, + const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf, const wordList& patchFieldTypes, const wordList& actualPatchTypes = wordList() ); diff --git a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.H b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.H index dec729bf592155c06858726cbd1ffa4277ce56f0..2116b52fbb25b5df1d6f5f9724eb86a8ce6c78d9 100644 --- a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.H +++ b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.H @@ -67,13 +67,19 @@ public: // Constructors //- Construct from components. Either reads or uses supplied value. - UniformDimensionedField(const IOobject&, const dimensioned<Type>&); + // The name of the dimensioned\<Type\> defines the name of the + // field. + UniformDimensionedField + ( + const IOobject& io, + const dimensioned<Type>& dt + ); //- Construct as copy - UniformDimensionedField(const UniformDimensionedField<Type>&); + UniformDimensionedField(const UniformDimensionedField<Type>& rdt); //- Construct from Istream - UniformDimensionedField(const IOobject&); + UniformDimensionedField(const IOobject& io); //- Destructor @@ -111,8 +117,11 @@ public: // Member Operators - void operator=(const UniformDimensionedField<Type>&); - void operator=(const dimensioned<Type>&); + //- Assign name, dimensions and value. + void operator=(const UniformDimensionedField<Type>& rhs); + + //- Assign name, dimensions and value. + void operator=(const dimensioned<Type>& rhs); Type operator[](const label) const { diff --git a/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C b/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C index baaa6070ff6a9c09e0cf356cbba639243ef7ddca..f0f04409c65b7b662b1015aaa8313875876bedfc 100644 --- a/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C +++ b/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C @@ -118,21 +118,18 @@ template<class BasicTurbulenceModel> Foam::tmp<Foam::volScalarField> Foam::ThermalDiffusivity<BasicTurbulenceModel>::alphat() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("alphat", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("alphat", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("alphat", dimDensity*dimViscosity, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + this->mesh_, + dimensionedScalar(dimDensity*dimViscosity, Zero) ); } diff --git a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C index b78cdb4f5e4f4eb4561770158d3859690bd1af17..62bc1b59634d24b4307b8011d795c62c26f9346b 100644 --- a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C +++ b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C @@ -104,21 +104,18 @@ template<class TransportModel> Foam::tmp<Foam::volScalarField> Foam::PhaseCompressibleTurbulenceModel<TransportModel>::pPrime() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("pPrime", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("pPrime", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("pPrimef", dimPressure, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + this->mesh_, + dimensionedScalar(dimPressure, Zero) ); } @@ -127,21 +124,18 @@ template<class TransportModel> Foam::tmp<Foam::surfaceScalarField> Foam::PhaseCompressibleTurbulenceModel<TransportModel>::pPrimef() const { - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - IOobject::groupName("pPrimef", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("pPrimef", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("pPrimef", dimPressure, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + this->mesh_, + dimensionedScalar(dimPressure, Zero) ); } diff --git a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C index aadd2aac262b14c50076ded596ede6bb36d9380f..472d2cae7de8dbdae193b894f7893e1e5dd2589d 100644 --- a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C +++ b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C @@ -103,21 +103,18 @@ template<class TransportModel> Foam::tmp<Foam::volScalarField> Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::pPrime() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("pPrime", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("pPrime", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("pPrimef", dimPressure, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + this->mesh_, + dimensionedScalar(dimPressure, Zero) ); } @@ -126,21 +123,18 @@ template<class TransportModel> Foam::tmp<Foam::surfaceScalarField> Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::pPrimef() const { - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - IOobject::groupName("pPrimef", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("pPrimef", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("pPrimef", dimPressure, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + this->mesh_, + dimensionedScalar(dimPressure, Zero) ); } diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C index 2d7f5c904f175dbe20799e2c62f84844b805eeab..0b94f9e9547e6de0cd8330d82755af8ea38d6681 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C @@ -92,7 +92,7 @@ tmp<volScalarField> SpalartAllmarasDDES<BasicTurbulenceModel>::dTilda *max ( lRAS - lLES, - dimensionedScalar("zero", dimLength, 0) + dimensionedScalar(dimLength, Zero) ), dimensionedScalar("small", dimLength, SMALL) ); diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C index 7ed980046329107d640af93b84fdad2b3e6765bc..e28aa1579527c8be99107c80485819889b497a11 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C @@ -473,7 +473,7 @@ tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::k() const IOobject::NO_WRITE ), this->mesh_, - dimensionedScalar("0", dimLength, 0.0), + dimensionedScalar(dimLength, Zero), zeroGradientFvPatchField<vector>::typeName ) ); @@ -558,7 +558,7 @@ void SpalartAllmarasDES<BasicTurbulenceModel>::correct() fvOptions.constrain(nuTildaEqn.ref()); solve(nuTildaEqn); fvOptions.correct(nuTilda_); - bound(nuTilda_, dimensionedScalar("0", nuTilda_.dimensions(), 0.0)); + bound(nuTilda_, dimensionedScalar(nuTilda_.dimensions(), Zero)); nuTilda_.correctBoundaryConditions(); correctNut(); diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C index b0b4c8d1a005cb3c27fb9029803d3f9a0c71ad3d..3c6c97770c8ddf58b9592095baae44f9580a5452 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C @@ -94,7 +94,7 @@ tmp<volScalarField> kOmegaSSTDDES<BasicTurbulenceModel>::dTilda *max ( lRAS - lLES, - dimensionedScalar("zero", dimLength, 0) + dimensionedScalar(dimLength, Zero) ), dimensionedScalar("small", dimLength, SMALL) ); diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C index 575434e8f2fff4b89d03d184a0fe2f29a3aeeed4..2657b8e8b756a84e07a6f211c411b0ee945af5d6 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C @@ -63,7 +63,7 @@ void Foam::LESModels::IDDESDelta::calcDelta() IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimLength, 0.0) + dimensionedScalar(dimLength, Zero) ) ); diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C index f988138fe3ef6b65b73940bd1baf00c535c9ec12..052183a1aed4a3200b809dc00863d190833a22af 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/anisotropicFilter/anisotropicFilter.C @@ -57,7 +57,7 @@ Foam::anisotropicFilter::anisotropicFilter mesh ), mesh, - dimensionedVector("zero", dimLength*dimLength, Zero), + dimensionedVector(dimLength*dimLength, Zero), calculatedFvPatchVectorField::typeName ) { @@ -97,7 +97,7 @@ Foam::anisotropicFilter::anisotropicFilter mesh ), mesh, - dimensionedVector("zero", dimLength*dimLength, Zero), + dimensionedVector(dimLength*dimLength, Zero), calculatedFvPatchScalarField::typeName ) { diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C index 61934975af14fce6da0f1452fded9888ae9ac125..3b3490f5d7dc0efe5ab8e867a60493363acf463b 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESfilters/laplaceFilter/laplaceFilter.C @@ -53,7 +53,7 @@ Foam::laplaceFilter::laplaceFilter(const fvMesh& mesh, scalar widthCoeff) mesh ), mesh, - dimensionedScalar("zero", dimLength*dimLength, 0), + dimensionedScalar(dimLength*dimLength, Zero), calculatedFvPatchScalarField::typeName ) { @@ -77,7 +77,7 @@ Foam::laplaceFilter::laplaceFilter(const fvMesh& mesh, const dictionary& bd) mesh ), mesh, - dimensionedScalar("zero", dimLength*dimLength, 0), + dimensionedScalar(dimLength*dimLength, Zero), calculatedFvPatchScalarField::typeName ) { diff --git a/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C b/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C index dae06399ba2c9e3811afea709ec9f152d6bad3ea..4d3f38d9a854ceff52f9b4428732dc6f5bc14d46 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C +++ b/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C @@ -53,7 +53,7 @@ volScalarField dynamicKEqn<BasicTurbulenceModel>::Ck ( -2.0*this->delta()*sqrt ( - max(KK, dimensionedScalar("zero", KK.dimensions(), 0.0)) + max(KK, dimensionedScalar(KK.dimensions(), Zero)) )*filter_(D) ) ); diff --git a/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C index 7957fb04fbefb935864a0e67873931659f317f0c..42bcdb54d18ac6358cb40f2408a2c53d9492c4ad 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C @@ -307,20 +307,17 @@ tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::k() const << "Spalart-Allmaras model. Returning zero field" << endl; - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "k", - this->runTime_.timeName(), - this->mesh_ - ), - this->mesh_, - dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0), - zeroGradientFvPatchField<vector>::typeName - ) + "k", + this->runTime_.timeName(), + this->mesh_ + ), + this->mesh_, + dimensionedScalar(dimensionSet(0, 2, -2, 0, 0), Zero), + zeroGradientFvPatchField<scalar>::typeName ); } @@ -333,20 +330,17 @@ tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::epsilon() const << "Spalart-Allmaras model. Returning zero field" << endl; - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "epsilon", - this->runTime_.timeName(), - this->mesh_ - ), - this->mesh_, - dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0), - zeroGradientFvPatchField<vector>::typeName - ) + "epsilon", + this->runTime_.timeName(), + this->mesh_ + ), + this->mesh_, + dimensionedScalar(dimensionSet(0, 2, -3, 0, 0), Zero), + zeroGradientFvPatchField<scalar>::typeName ); } @@ -388,7 +382,7 @@ void SpalartAllmaras<BasicTurbulenceModel>::correct() fvOptions.constrain(nuTildaEqn.ref()); solve(nuTildaEqn); fvOptions.correct(nuTilda_); - bound(nuTilda_, dimensionedScalar("0", nuTilda_.dimensions(), 0.0)); + bound(nuTilda_, dimensionedScalar(nuTilda_.dimensions(), Zero)); nuTilda_.correctBoundaryConditions(); correctNut(fv1); diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C index 16bcccc5fded23905642f8e2da6156f23635e224..e7488ad9f4572f5a46951f3d159c326a2cea15b3 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C @@ -481,7 +481,7 @@ kOmegaSSTLM<BasicTurbulenceModel>::kOmegaSSTLM this->mesh_ ), this->mesh_, - dimensionedScalar("0", dimless, 0) + dimensionedScalar(dimless, Zero) ) { if (type == typeName) diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C index ed4791c2438654433d734511aeb793f9201d72ce..4957f063780d982f836a7174e9f3556501dacbc8 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C @@ -79,7 +79,7 @@ tmp<fvScalarMatrix> kOmegaSSTSAS<BasicTurbulenceModel>::Qsas magSqr(fvc::grad(this->omega_)()())/sqr(this->omega_()), magSqr(fvc::grad(this->k_)()())/sqr(this->k_()) ), - dimensionedScalar("0", dimensionSet(0, 0, -2, 0, 0), 0) + dimensionedScalar(dimensionSet(0, 0, -2, 0, 0), Zero) ), // Limit SAS production of omega for numerical stability, // particularly during start-up diff --git a/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C b/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C index 0c974ff84fddc1b33c20f211778cf339f7f32593..9a3fe9c2be950ca9234deed90e2cbf19745876c9 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C @@ -283,7 +283,7 @@ void realizableKE<BasicTurbulenceModel>::correct() max ( this->nu(), - dimensionedScalar("zero", this->nu()().dimensions(), 0.0) + dimensionedScalar(this->nu()().dimensions(), Zero) ) ); diff --git a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C index cbdbcd0b9b3ca926166da02852d846201e65567e..9798151e8964b1692983a49462dbf68292982fbe 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C @@ -50,7 +50,7 @@ tmp<volScalarField> v2f<BasicTurbulenceModel>::Ts() const max ( this->nu(), - dimensionedScalar("zero", this->nu()().dimensions(), 0.0) + dimensionedScalar(this->nu()().dimensions(), Zero) ) / epsilon_ ) @@ -75,12 +75,7 @@ tmp<volScalarField> v2f<BasicTurbulenceModel>::Ls() const max ( this->nu(), - dimensionedScalar - ( - "zero", - this->nu()().dimensions(), - 0.0 - ) + dimensionedScalar(this->nu()().dimensions(), Zero) ) )/epsilon_ ) diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index b508581123ab85da2b70d7535bed448c8b1e71cf..c50aab9cb4e14639b5cb2e08a02aefeffdb7d5b6 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -119,7 +119,7 @@ void Foam::epsilonWallFunctionFvPatchScalarField::createAveragingWeights() false // do not register ), mesh, - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ); DynamicList<label> epsilonPatches(bf.size()); diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index dbee78a9886d50bd2a01ad4bb9bd487f28cd42bd..89ab62e1ecaa1241b71bab32ce39b4359fd134c5 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -123,7 +123,7 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights() false // do not register ), mesh, - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ); DynamicList<label> omegaPatches(bf.size()); diff --git a/src/TurbulenceModels/turbulenceModels/laminar/Stokes/Stokes.C b/src/TurbulenceModels/turbulenceModels/laminar/Stokes/Stokes.C index 792e4c82a88a21be3978bc057ae8b471478ada9f..d0c214979db9171baad3c39d7fea53a67e978490 100644 --- a/src/TurbulenceModels/turbulenceModels/laminar/Stokes/Stokes.C +++ b/src/TurbulenceModels/turbulenceModels/laminar/Stokes/Stokes.C @@ -86,22 +86,19 @@ template<class BasicTurbulenceModel> tmp<volScalarField> Stokes<BasicTurbulenceModel>::nut() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("nut", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName("nut", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("nut", dimViscosity, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(dimViscosity, Zero) ); } @@ -149,22 +146,19 @@ template<class BasicTurbulenceModel> tmp<volScalarField> Stokes<BasicTurbulenceModel>::k() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("k", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName("k", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("k", sqr(this->U_.dimensions()), 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(sqr(this->U_.dimensions()), Zero) ); } @@ -173,25 +167,19 @@ template<class BasicTurbulenceModel> tmp<volScalarField> Stokes<BasicTurbulenceModel>::epsilon() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("epsilon", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName("epsilon", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar - ( - "epsilon", sqr(this->U_.dimensions())/dimTime, 0.0 - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(sqr(this->U_.dimensions())/dimTime, Zero) ); } @@ -200,25 +188,19 @@ template<class BasicTurbulenceModel> tmp<volSymmTensorField> Stokes<BasicTurbulenceModel>::R() const { - return tmp<volSymmTensorField> + return tmp<volSymmTensorField>::New ( - new volSymmTensorField + IOobject ( - IOobject - ( - IOobject::groupName("R", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName("R", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedSymmTensor - ( - "R", sqr(this->U_.dimensions()), Zero - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedSymmTensor(sqr(this->U_.dimensions()), Zero) ); } diff --git a/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C b/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C index 44e0556bc56412011183aa457878c04fc55249d1..52c69b43b9691c937cee58ecc2a6f65fcc19ac34 100644 --- a/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C +++ b/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C @@ -184,22 +184,19 @@ template<class BasicTurbulenceModel> Foam::tmp<Foam::volScalarField> Foam::laminarModel<BasicTurbulenceModel>::nut() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("nut", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName("nut", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("nut", dimViscosity, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(dimViscosity, Zero) ); } @@ -247,22 +244,19 @@ template<class BasicTurbulenceModel> Foam::tmp<Foam::volScalarField> Foam::laminarModel<BasicTurbulenceModel>::k() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("k", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName("k", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("k", sqr(this->U_.dimensions()), 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(sqr(this->U_.dimensions()), Zero) ); } @@ -271,25 +265,19 @@ template<class BasicTurbulenceModel> Foam::tmp<Foam::volScalarField> Foam::laminarModel<BasicTurbulenceModel>::epsilon() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("epsilon", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName("epsilon", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar - ( - "epsilon", sqr(this->U_.dimensions())/dimTime, 0.0 - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(sqr(this->U_.dimensions())/dimTime, Zero) ); } @@ -298,25 +286,19 @@ template<class BasicTurbulenceModel> Foam::tmp<Foam::volSymmTensorField> Foam::laminarModel<BasicTurbulenceModel>::R() const { - return tmp<volSymmTensorField> + return tmp<volSymmTensorField>::New ( - new volSymmTensorField + IOobject ( - IOobject - ( - IOobject::groupName("R", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName("R", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedSymmTensor - ( - "R", sqr(this->U_.dimensions()), Zero - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedSymmTensor(sqr(this->U_.dimensions()), Zero) ); } diff --git a/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.C b/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.C index c38f806e26b5d5e90ac3f40a970fa4d432f0c93a..fe62ba077fdf9f8ed84b239f7749623feee1af81 100644 --- a/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.C +++ b/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.C @@ -63,12 +63,7 @@ Foam::nonlinearEddyViscosity<BasicTurbulenceModel>::nonlinearEddyViscosity this->mesh_ ), this->mesh_, - dimensionedSymmTensor - ( - "nonlinearStress", - sqr(dimVelocity), - Zero - ) + dimensionedSymmTensor(sqr(dimVelocity), Zero) ) {} diff --git a/src/combustionModels/EDC/EDC.C b/src/combustionModels/EDC/EDC.C index c4b7e0b29f160a3e7cfb16e20382d2d73c8acc15..45d33a4523d913eb9fa7c87ba0cce101c923f19c 100644 --- a/src/combustionModels/EDC/EDC.C +++ b/src/combustionModels/EDC/EDC.C @@ -63,7 +63,7 @@ Foam::combustionModels::EDC<Type>::EDC IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("kappa", dimless, 0) + dimensionedScalar(dimless, Zero) ) {} @@ -198,7 +198,7 @@ Foam::combustionModels::EDC<Type>::Qdot() const false ), this->mesh(), - dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); diff --git a/src/combustionModels/FSD/FSD.C b/src/combustionModels/FSD/FSD.C index 1bc995bef7c1b151a45d7639e2be748bbae06ee8..965010bae3b83cc24ec9eadd4f12367b917fb321 100644 --- a/src/combustionModels/FSD/FSD.C +++ b/src/combustionModels/FSD/FSD.C @@ -72,7 +72,7 @@ FSD<CombThermoType, ThermoType>::FSD IOobject::AUTO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ), YFuelFuelStream_(dimensionedScalar("YFuelStream", dimless, 1.0)), YO2OxiStream_(dimensionedScalar("YOxiStream", dimless, 0.23)), @@ -159,7 +159,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm() IOobject::NO_WRITE ), U.mesh(), - dimensionedScalar("Pc", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); @@ -178,12 +178,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm() IOobject::NO_WRITE ), U.mesh(), - dimensionedScalar - ( - "omegaFuelBar", - omegaFuel.dimensions(), - 0 - ) + dimensionedScalar(omegaFuel.dimensions(), Zero) ) ); @@ -309,7 +304,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm() IOobject::NO_WRITE ), U.mesh(), - dimensionedScalar("products", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); @@ -338,8 +333,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm() template<class CombThermoType, class ThermoType> void FSD<CombThermoType, ThermoType>::correct() { - this->wFuel_ == - dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0); + this->wFuel_ == dimensionedScalar(dimMass/dimTime/dimVolume, Zero); if (this->active()) { diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C index 4e0e92ad5d94eb33b28604e3998a35d4c91972c8..e60293bd6fff2f3576fa99e05b2d9b6e778541bd 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C @@ -93,12 +93,7 @@ Foam::tmp<Foam::volScalarField> Foam::consumptionSpeed::omega0Sigma IOobject::NO_WRITE ), sigma.mesh(), - dimensionedScalar - ( - "omega0", - dimensionSet(1, -2, -1, 0, 0, 0, 0), - 0 - ) + dimensionedScalar(dimensionSet(1, -2, -1, 0, 0, 0, 0), Zero) ) ); diff --git a/src/combustionModels/PaSR/PaSR.C b/src/combustionModels/PaSR/PaSR.C index 6358104a9b764046799f62e298ffd81bcb823ee0..7063e84dd88e93275c8e66b1f170197d92cfe7a0 100644 --- a/src/combustionModels/PaSR/PaSR.C +++ b/src/combustionModels/PaSR/PaSR.C @@ -49,7 +49,7 @@ Foam::combustionModels::PaSR<Type>::PaSR IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("kappa", dimless, 0) + dimensionedScalar(dimless, Zero) ) {} diff --git a/src/combustionModels/diffusion/diffusion.C b/src/combustionModels/diffusion/diffusion.C index c5a3ee9ea5b9b6893074579ed58ba2ad8dd21228..2de2a82e84a9296f7c5d6c90e5acae7addda00ca 100644 --- a/src/combustionModels/diffusion/diffusion.C +++ b/src/combustionModels/diffusion/diffusion.C @@ -66,8 +66,7 @@ diffusion<CombThermoType, ThermoType>::~diffusion() template<class CombThermoType, class ThermoType> void diffusion<CombThermoType, ThermoType>::correct() { - this->wFuel_ == - dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0); + this->wFuel_ == dimensionedScalar(dimMass/dimVolume/dimTime, Zero); if (this->active()) { diff --git a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C index d05950c3926fecfe4ab295dbf0bc9c15e8dc3bbd..1c541431099d97afe776be840271512464c218b2 100644 --- a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C +++ b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C @@ -68,7 +68,7 @@ diffusionMulticomponent<CombThermoType, ThermoType>::init() false ), this->mesh_, - dimensionedScalar("Rij", dimMass/dimTime/dimVolume, 0.0), + dimensionedScalar(dimMass/dimTime/dimVolume, Zero), zeroGradientFvPatchScalarField::typeName ) ); @@ -200,7 +200,7 @@ diffusionMulticomponent<CombThermoType, ThermoType>::correct() false ), this->mesh_, - dimensionedScalar("Rijl", dimMass/dimTime/dimVolume, 0.0), + dimensionedScalar(dimMass/dimTime/dimVolume, Zero), zeroGradientFvPatchScalarField::typeName ) ); @@ -225,14 +225,14 @@ diffusionMulticomponent<CombThermoType, ThermoType>::correct() { const label lIndex = lhs[l].index; this->chemistryPtr_->RR(lIndex) = - dimensionedScalar("zero", dimMass/dimTime/dimVolume, 0.0); + dimensionedScalar(dimMass/dimTime/dimVolume, Zero); } forAll(rhs, l) { const label rIndex = rhs[l].index; this->chemistryPtr_->RR(rIndex) = - dimensionedScalar("zero", dimMass/dimTime/dimVolume, 0.0); + dimensionedScalar(dimMass/dimTime/dimVolume, Zero); } } @@ -401,7 +401,7 @@ Qdot() const false ), this->mesh(), - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0), + dimensionedScalar(dimEnergy/dimTime, Zero), zeroGradientFvPatchScalarField::typeName ) ); diff --git a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C index 6484cce9518881a57083997d58a8ef70bb094e6c..7845e65c1e308aecbd6797ca45f87d750f2a985f 100644 --- a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C +++ b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C @@ -88,7 +88,7 @@ eddyDissipationDiffusionModel<CombThermoType, ThermoType>::rtDiff() const IOobject::NO_WRITE ), this->mesh(), - dimensionedScalar("delta", dimLength, 0), + dimensionedScalar(dimLength, Zero), zeroGradientFvPatchScalarField::typeName ) ); diff --git a/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C b/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C index caf0b623b4231a6d73211941a05f092f6bfb6d62..2fd6ddca9aa9fb598e7796a70d0bb2b4e97924fd 100644 --- a/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C +++ b/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C @@ -79,8 +79,7 @@ eddyDissipationModelBase<CombThermoType, ThermoType>::rtTurb() const template<class CombThermoType, class ThermoType> void eddyDissipationModelBase<CombThermoType, ThermoType>::correct() { - this->wFuel_ == - dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0); + this->wFuel_ == dimensionedScalar(dimMass/dimVolume/dimTime, Zero); if (this->active()) { diff --git a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C index 49c0d60e353a57171d5e03be10cd06e715ba07eb..fb6def62f5eed11b143042d2018df5b06eb64770 100644 --- a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C +++ b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C @@ -64,8 +64,7 @@ infinitelyFastChemistry<CombThermoType, ThermoType>::~infinitelyFastChemistry() template<class CombThermoType, class ThermoType> void infinitelyFastChemistry<CombThermoType, ThermoType>::correct() { - this->wFuel_ == - dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0); + this->wFuel_ == dimensionedScalar(dimMass/dimVolume/dimTime, Zero); if (this->active()) { diff --git a/src/combustionModels/laminar/laminar.C b/src/combustionModels/laminar/laminar.C index b33f302b18cf7815ec58e9820b8aa6e3f3fafbec..b05013a98477dd3a1d86ec87ae4e3f6e61a360c0 100644 --- a/src/combustionModels/laminar/laminar.C +++ b/src/combustionModels/laminar/laminar.C @@ -152,7 +152,7 @@ Foam::combustionModels::laminar<Type>::Qdot() const false ), this->mesh(), - dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); diff --git a/src/combustionModels/noCombustion/noCombustion.C b/src/combustionModels/noCombustion/noCombustion.C index 4101ed61cae71c50ab6f0e8f880b89f026264bb2..d2f53c3f3fd2d534bf3a0e81a66e14545a198b5f 100644 --- a/src/combustionModels/noCombustion/noCombustion.C +++ b/src/combustionModels/noCombustion/noCombustion.C @@ -75,25 +75,20 @@ template<class CombThermoType> Foam::tmp<Foam::volScalarField> Foam::combustionModels::noCombustion<CombThermoType>::Qdot() const { - tmp<volScalarField> tQdot + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName(typeName + ":Qdot", this->phaseName_), - this->mesh().time().timeName(), - this->mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName(typeName + ":Qdot", this->phaseName_), + this->mesh().time().timeName(), this->mesh(), - dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh(), + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ); - - return tQdot; } diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.C b/src/combustionModels/singleStepCombustion/singleStepCombustion.C index f65cefb80e0f7115a4f1f0291b5daa302b445fe5..31cf624a26032a37e15a8ac43950057e3f40700e 100644 --- a/src/combustionModels/singleStepCombustion/singleStepCombustion.C +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.C @@ -55,7 +55,7 @@ singleStepCombustion<CombThermoType, ThermoType>::singleStepCombustion IOobject::NO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ), semiImplicit_(readBool(this->coeffs_.lookup("semiImplicit"))) { diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C index 88ff6d468f01c707ee90906ffda2b2c11a7d2753..c6a11ff7def39ea3b11b5d7e282ba4b6f2512195 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C @@ -1432,7 +1432,7 @@ bool Foam::dynamicRefineFvMesh::writeObject false ), *this, - dimensionedScalar("level", dimless, 0) + dimensionedScalar(dimless, Zero) ); const labelList& cellLevel = meshCutter_.cellLevel(); diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C index 36df8b2dd3adb1c0282753f73485f7107baf423c..a2b245ebeb3b1f04dda58495fd4809538e322c0c 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C @@ -404,7 +404,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::fvMeshDistribute::generateTestField IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); surfaceScalarField& fld = tfld.ref(); diff --git a/src/dynamicMesh/meshSubsetHelper/meshSubsetHelperTemplates.C b/src/dynamicMesh/meshSubsetHelper/meshSubsetHelperTemplates.C index 25a6d1301b7671324d1b63aacc9f0a5ecf0b98ff..9bc130e7d6897adb455e9c31a0572df2772f9a8d 100644 --- a/src/dynamicMesh/meshSubsetHelper/meshSubsetHelperTemplates.C +++ b/src/dynamicMesh/meshSubsetHelper/meshSubsetHelperTemplates.C @@ -55,7 +55,7 @@ Foam::meshSubsetHelper::zeroGradientField ( io, df.mesh(), - dimensioned<Type>("0", df.dimensions(), Zero), + dimensioned<Type>(df.dimensions(), Zero), zeroGradientFvPatchField<Type>::typeName ) ); diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C index fa48a7c10a526cb8ed80fb262c910f82f3896637..178574ee7bbf25676be1255fab8167068836e18f 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C @@ -155,7 +155,7 @@ Foam::motionSmootherAlgo::avg false ), fld.mesh(), - dimensioned<Type>("zero", fld.dimensions(), Zero) + dimensioned<Type>(fld.dimensions(), Zero) ) ); GeometricField<Type, pointPatchField, pointMesh>& res = tres.ref(); diff --git a/src/dynamicMesh/motionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C b/src/dynamicMesh/motionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C index 5865318818986e42f3935125485a2bee830c2877..81475856ae1b4058acc532c8599bbc1397ffd873 100644 --- a/src/dynamicMesh/motionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C +++ b/src/dynamicMesh/motionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C @@ -430,7 +430,7 @@ void Foam::displacementLayeredMotionMotionSolver::cellZoneSolve false ), pointMesh::New(mesh()), - dimensionedScalar("zero", dimLength, 0.0) + dimensionedScalar(dimLength, Zero) ); forAll(distance, pointi) diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C index e57fa3fd33efb1a3ef5e8c39d29914505b601815..e60c543f8d0a06c5f85f40b2775b69e5192f302f 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C @@ -1963,6 +1963,7 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh, const bool readHistory) IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), + // Needs name: dimensionedScalar("level0Edge", dimLength, getLevel0EdgeLength()) ), history_ @@ -2083,6 +2084,7 @@ Foam::hexRef8::hexRef8 IOobject::NO_READ, IOobject::NO_WRITE ), + // Needs name: dimensionedScalar ( "level0Edge", @@ -2191,6 +2193,7 @@ Foam::hexRef8::hexRef8 IOobject::NO_READ, IOobject::NO_WRITE ), + // Needs name: dimensionedScalar ( "level0Edge", @@ -3046,7 +3049,7 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 // false // ), // fMesh, - // dimensionedScalar("zero", dimless, 0) + // dimensionedScalar(dimless, Zero) // ); // // forAll(wantedLevel, celli) diff --git a/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtScheme.C b/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtScheme.C index 825d73b7dffee0d2eb89751a2e0edde0e5c01f8a..ad66eb6965c43ec04ba15e8b2acb324063963041 100644 --- a/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtScheme.C +++ b/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtScheme.C @@ -67,12 +67,7 @@ EulerFaDdtScheme<Type>::facDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - pTraits<Type>::zero - ) + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ) ); @@ -81,26 +76,18 @@ EulerFaDdtScheme<Type>::facDdt return tdtdt; } - else - { - return tmp<GeometricField<Type, faPatchField, areaMesh>> - ( - new GeometricField<Type, faPatchField, areaMesh> - ( - ddtIOobject, - mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - pTraits<Type>::zero - ), - calculatedFaPatchField<Type>::typeName - ) - ); - } + + + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New + ( + ddtIOobject, + mesh(), + dimensioned<Type>(dt.dimensions()/dimTime, Zero), + calculatedFaPatchField<Type>::typeName + ); } + template<class Type> tmp<GeometricField<Type, faPatchField, areaMesh>> EulerFaDdtScheme<Type>::facDdt0 diff --git a/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtScheme.C b/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtScheme.C index 21c9291d3af77706526dfd783e84098c9f18ac48..9ce18a368e392d98be4ed5697e7a7639e4d373c0 100644 --- a/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtScheme.C +++ b/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtScheme.C @@ -105,12 +105,7 @@ backwardFaDdtScheme<Type>::facDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - pTraits<Type>::zero - ) + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ) ); @@ -121,24 +116,14 @@ backwardFaDdtScheme<Type>::facDdt return tdtdt; } - else - { - return tmp<GeometricField<Type, faPatchField, areaMesh>> - ( - new GeometricField<Type, faPatchField, areaMesh> - ( - ddtIOobject, - mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - pTraits<Type>::zero - ), - calculatedFaPatchField<Type>::typeName - ) - ); - } + + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New + ( + ddtIOobject, + mesh(), + dimensioned<Type>(dt.dimensions()/dimTime, Zero), + calculatedFaPatchField<Type>::typeName + ); } diff --git a/src/finiteArea/finiteArea/ddtSchemes/boundedBackwardFaDdtScheme/boundedBackwardFaDdtScheme.C b/src/finiteArea/finiteArea/ddtSchemes/boundedBackwardFaDdtScheme/boundedBackwardFaDdtScheme.C index 09c48be31175bc444d97daf3cfeb3babc5d2684c..791b9140e6e2c062f1bb1af109a7ef6293c10272 100644 --- a/src/finiteArea/finiteArea/ddtSchemes/boundedBackwardFaDdtScheme/boundedBackwardFaDdtScheme.C +++ b/src/finiteArea/finiteArea/ddtSchemes/boundedBackwardFaDdtScheme/boundedBackwardFaDdtScheme.C @@ -88,12 +88,7 @@ tmp<areaScalarField> boundedBackwardFaDdtScheme::facDdt ( ddtIOobject, mesh(), - dimensionedScalar - ( - "0", - dt.dimensions()/dimTime, - 0.0 - ) + dimensionedScalar(dt.dimensions()/dimTime, Zero) ) ); @@ -104,24 +99,14 @@ tmp<areaScalarField> boundedBackwardFaDdtScheme::facDdt return tdtdt; } - else - { - return tmp<areaScalarField> - ( - new areaScalarField - ( - ddtIOobject, - mesh(), - dimensionedScalar - ( - "0", - dt.dimensions()/dimTime, - 0.0 - ), - calculatedFaPatchScalarField::typeName - ) - ); - } + + return tmp<areaScalarField>::New + ( + ddtIOobject, + mesh(), + dimensionedScalar(dt.dimensions()/dimTime, Zero), + calculatedFaPatchScalarField::typeName + ); } diff --git a/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtScheme.C b/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtScheme.C index ff945d97ee8767279614112d6cfb99b2b6648f55..6195b562ae669ee5ce39909b9dc7c7f694fdb5fb 100644 --- a/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtScheme.C +++ b/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtScheme.C @@ -48,24 +48,16 @@ steadyStateFaDdtScheme<Type>::facDdt const dimensioned<Type> dt ) { - return tmp<GeometricField<Type, faPatchField, areaMesh>> + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New ( - new GeometricField<Type, faPatchField, areaMesh> + IOobject ( - IOobject - ( - "ddt("+dt.name()+')', - mesh()().time().timeName(), - mesh()() - ), - mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - pTraits<Type>::zero - ) - ) + "ddt("+dt.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ); } @@ -77,24 +69,16 @@ steadyStateFaDdtScheme<Type>::facDdt0 const dimensioned<Type> dt ) { - return tmp<GeometricField<Type, faPatchField, areaMesh>> + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New ( - new GeometricField<Type, faPatchField, areaMesh> + IOobject ( - IOobject - ( - "ddt("+dt.name()+')', - mesh()().time().timeName(), - mesh()() - ), - mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - pTraits<Type>::zero - ) - ) + "ddt("+dt.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ); } @@ -106,24 +90,16 @@ steadyStateFaDdtScheme<Type>::facDdt const GeometricField<Type, faPatchField, areaMesh>& vf ) { - return tmp<GeometricField<Type, faPatchField, areaMesh>> + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New ( - new GeometricField<Type, faPatchField, areaMesh> + IOobject ( - IOobject - ( - "ddt("+vf.name()+')', - mesh()().time().timeName(), - mesh()() - ), - mesh(), - dimensioned<Type> - ( - "0", - vf.dimensions()/dimTime, - pTraits<Type>::zero - ) - ) + "ddt("+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type>(vf.dimensions()/dimTime, Zero) ); } @@ -135,24 +111,16 @@ steadyStateFaDdtScheme<Type>::facDdt0 const GeometricField<Type, faPatchField, areaMesh>& vf ) { - return tmp<GeometricField<Type, faPatchField, areaMesh>> + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New ( - new GeometricField<Type, faPatchField, areaMesh> + IOobject ( - IOobject - ( - "ddt0("+vf.name()+')', - mesh()().time().timeName(), - mesh()() - ), - mesh(), - dimensioned<Type> - ( - "0", - vf.dimensions()/dimTime, - pTraits<Type>::zero - ) - ) + "ddt0("+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type>(vf.dimensions()/dimTime, Zero) ); } @@ -165,24 +133,16 @@ steadyStateFaDdtScheme<Type>::facDdt const GeometricField<Type, faPatchField, areaMesh>& vf ) { - return tmp<GeometricField<Type, faPatchField, areaMesh>> + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New ( - new GeometricField<Type, faPatchField, areaMesh> + IOobject ( - IOobject - ( - "ddt("+rho.name()+','+vf.name()+')', - mesh()().time().timeName(), - mesh()() - ), - mesh(), - dimensioned<Type> - ( - "0", - rho.dimensions()*vf.dimensions()/dimTime, - pTraits<Type>::zero - ) - ) + "ddt("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero) ); } @@ -194,24 +154,16 @@ steadyStateFaDdtScheme<Type>::facDdt0 const GeometricField<Type, faPatchField, areaMesh>& vf ) { - return tmp<GeometricField<Type, faPatchField, areaMesh>> + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New ( - new GeometricField<Type, faPatchField, areaMesh> + IOobject ( - IOobject - ( - "ddt0("+rho.name()+','+vf.name()+')', - mesh()().time().timeName(), - mesh()() - ), - mesh(), - dimensioned<Type> - ( - "0", - rho.dimensions()*vf.dimensions()/dimTime, - pTraits<Type>::zero - ) - ) + "ddt0("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero) ); } @@ -224,24 +176,16 @@ steadyStateFaDdtScheme<Type>::facDdt const GeometricField<Type, faPatchField, areaMesh>& vf ) { - return tmp<GeometricField<Type, faPatchField, areaMesh>> + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New ( - new GeometricField<Type, faPatchField, areaMesh> + IOobject ( - IOobject - ( - "ddt("+rho.name()+','+vf.name()+')', - mesh()().time().timeName(), - mesh()() - ), - mesh(), - dimensioned<Type> - ( - "0", - rho.dimensions()*vf.dimensions()/dimTime, - pTraits<Type>::zero - ) - ) + "ddt("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero) ); } @@ -254,24 +198,16 @@ steadyStateFaDdtScheme<Type>::facDdt0 const GeometricField<Type, faPatchField, areaMesh>& vf ) { - return tmp<GeometricField<Type, faPatchField, areaMesh>> + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New ( - new GeometricField<Type, faPatchField, areaMesh> + IOobject ( - IOobject - ( - "ddt0("+rho.name()+','+vf.name()+')', - mesh()().time().timeName(), - mesh()() - ), - mesh(), - dimensioned<Type> - ( - "0", - rho.dimensions()*vf.dimensions()/dimTime, - pTraits<Type>::zero - ) - ) + "ddt0("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero) ); } diff --git a/src/finiteArea/finiteArea/fac/facEdgeIntegrate.C b/src/finiteArea/finiteArea/fac/facEdgeIntegrate.C index a99d58bd76855c72ece3299637ed99fb0a6065db..e3ffdc541cc1576b178f8681f96fef97ab3394d4 100644 --- a/src/finiteArea/finiteArea/fac/facEdgeIntegrate.C +++ b/src/finiteArea/finiteArea/fac/facEdgeIntegrate.C @@ -61,12 +61,7 @@ edgeIntegrate ssf.db() ), mesh, - dimensioned<Type> - ( - "0", - ssf.dimensions()/dimArea, - pTraits<Type>::zero - ), + dimensioned<Type>(ssf.dimensions()/dimArea, Zero), zeroGradientFaPatchField<Type>::typeName ) ); @@ -138,7 +133,7 @@ edgeSum ssf.db() ), mesh, - dimensioned<Type>("0", ssf.dimensions(), pTraits<Type>::zero), + dimensioned<Type>(ssf.dimensions(), Zero), zeroGradientFaPatchField<Type>::typeName ) ); diff --git a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.C b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.C index b21926d923f32d9a8b6e10b2de19d2e91cd8ec21..63104bb70120aceaa115d72dc2d2401c4e27cc8d 100644 --- a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.C +++ b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.C @@ -76,12 +76,7 @@ leastSquaresFaGrad<Type>::grad IOobject::NO_WRITE ), mesh, - dimensioned<GradType> - ( - "zero", - vsf.dimensions()/dimLength, - pTraits<GradType>::zero - ), + dimensioned<GradType>(vsf.dimensions()/dimLength, Zero), zeroGradientFaPatchField<GradType>::typeName ) ); diff --git a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C index 6dc0356be5ac6f9458193647719704c07f4a0f57..9f315615c2de40736d6ac8c03a83a68e25e0cb45 100644 --- a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C +++ b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C @@ -80,7 +80,7 @@ void Foam::leastSquaresFaVectors::makeLeastSquaresVectors() const false ), mesh(), - dimensionedVector("zero", dimless/dimLength, vector::zero) + dimensionedVector(dimless/dimLength, Zero) ); edgeVectorField& lsP = *pVectorsPtr_; @@ -96,7 +96,7 @@ void Foam::leastSquaresFaVectors::makeLeastSquaresVectors() const false ), mesh(), - dimensionedVector("zero", dimless/dimLength, vector::zero) + dimensionedVector(dimless/dimLength, Zero) ); edgeVectorField& lsN = *nVectorsPtr_; diff --git a/src/finiteVolume/cfdTools/compressible/createDpdt.H b/src/finiteVolume/cfdTools/compressible/createDpdt.H index b831c85a664b4b9335296e7de8a047b7cba3add0..0d74762fd05f4b882f11e6de13309b55bb215736 100644 --- a/src/finiteVolume/cfdTools/compressible/createDpdt.H +++ b/src/finiteVolume/cfdTools/compressible/createDpdt.H @@ -34,6 +34,6 @@ if (!thermo.dpdt()) { - dpdt == dimensionedScalar("0", dpdt.dimensions(), 0); + dpdt == dimensionedScalar(dpdt.dimensions(), Zero); dpdt.writeOpt() = IOobject::NO_WRITE; } diff --git a/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C b/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C index fa4164c1b349333e86e440b6d02876fb5340dba2..19dd9fb742f8b2997fb4228b4deba7f9a5bcd13d 100644 --- a/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C +++ b/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C @@ -79,7 +79,7 @@ void Foam::CorrectPhi mesh ), mesh, - dimensionedScalar("pcorr", p.dimensions(), 0.0), + dimensionedScalar(p.dimensions(), Zero), pcorrTypes ); @@ -159,7 +159,7 @@ void Foam::CorrectPhi mesh ), mesh, - dimensionedScalar("pcorr", p.dimensions(), 0.0), + dimensionedScalar(p.dimensions(), Zero), pcorrTypes ); diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C index 93fe6728beb96d67afee7948cbd0929b42acf759..c8b3ec22a248c1b0b48296ada1477d2331c55af9 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C @@ -177,7 +177,7 @@ Foam::tmp<Foam::volVectorField> Foam::MRFZoneList::DDt U.mesh() ), U.mesh(), - dimensionedVector("0", U.dimensions()/dimTime, Zero) + dimensionedVector(U.dimensions()/dimTime, Zero) ) ); volVectorField& acceleration = tacceleration.ref(); diff --git a/src/finiteVolume/cfdTools/general/include/readhRef.H b/src/finiteVolume/cfdTools/general/include/readhRef.H index d34c3e7dd9d121a6042298fd6bebdb919b087f22..e938cc8cc94c8707825aabd4cbf9c080633e82a9 100644 --- a/src/finiteVolume/cfdTools/general/include/readhRef.H +++ b/src/finiteVolume/cfdTools/general/include/readhRef.H @@ -9,5 +9,5 @@ IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), - dimensionedScalar("hRef", dimLength, 0) + dimensionedScalar(dimLength, Zero) ); diff --git a/src/finiteVolume/cfdTools/general/include/readpRef.H b/src/finiteVolume/cfdTools/general/include/readpRef.H index 78ae5886eeb0912f44b303bcbb9f0b3ff5fe0ecc..29aa46ac837b5aec198b55fc9732118686b895bf 100644 --- a/src/finiteVolume/cfdTools/general/include/readpRef.H +++ b/src/finiteVolume/cfdTools/general/include/readpRef.H @@ -9,5 +9,5 @@ IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), - dimensionedScalar("pRef", dimPressure, 0) + dimensionedScalar(dimPressure, Zero) ); diff --git a/src/finiteVolume/cfdTools/general/levelSet/levelSet.C b/src/finiteVolume/cfdTools/general/levelSet/levelSet.C index d4d55ca43169b25125d87f12b6d3c1587b827cf5..61baa44536e7c1d621cd6dcd6ece7efc4933c99b 100644 --- a/src/finiteVolume/cfdTools/general/levelSet/levelSet.C +++ b/src/finiteVolume/cfdTools/general/levelSet/levelSet.C @@ -50,7 +50,7 @@ Foam::levelSetFraction mesh ), mesh, - dimensionedScalar("0", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); DimensionedField<scalar, volMesh>& result = tResult.ref(); diff --git a/src/finiteVolume/cfdTools/general/levelSet/levelSetTemplates.C b/src/finiteVolume/cfdTools/general/levelSet/levelSetTemplates.C index de89bbb76d9f3be4fa5e9cba6b914c8541102993..a3e7972fdf63b5c920f4d54475972d6be9860e01 100644 --- a/src/finiteVolume/cfdTools/general/levelSet/levelSetTemplates.C +++ b/src/finiteVolume/cfdTools/general/levelSet/levelSetTemplates.C @@ -53,7 +53,7 @@ Foam::tmp<Foam::DimensionedField<Type, Foam::volMesh>> Foam::levelSetAverage mesh ), mesh, - dimensioned<Type>("0", positiveC.dimensions(), Zero) + dimensioned<Type>(positiveC.dimensions(), Zero) ) ); DimensionedField<Type, volMesh>& result = tResult.ref(); diff --git a/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C b/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C index 207b06ff6511c9b4d575cedd4635bfd2a667630f..35a9a246d1818af6e5905fedf77705905f96043e 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C @@ -143,7 +143,7 @@ void Foam::porosityModels::DarcyForchheimer::calcTransformModelData() IOobject::NO_WRITE ), mesh_, - dimensionedTensor("0", dXYZ_.dimensions(), Zero) + dimensionedTensor(dXYZ_.dimensions(), Zero) ); volTensorField Fout ( @@ -156,7 +156,7 @@ void Foam::porosityModels::DarcyForchheimer::calcTransformModelData() IOobject::NO_WRITE ), mesh_, - dimensionedTensor("0", fXYZ_.dimensions(), Zero) + dimensionedTensor(fXYZ_.dimensions(), Zero) ); UIndirectList<tensor>(Dout, mesh_.cellZones()[cellZoneIDs_[0]]) = D_[0]; diff --git a/src/finiteVolume/finiteVolume/d2dt2Schemes/steadyStateD2dt2Scheme/steadyStateD2dt2Scheme.C b/src/finiteVolume/finiteVolume/d2dt2Schemes/steadyStateD2dt2Scheme/steadyStateD2dt2Scheme.C index 2290d1735fe332de2bc0bacc92bad497876daa78..cbc88794313ab728e2bd883b7327f9b14e73a4b9 100644 --- a/src/finiteVolume/finiteVolume/d2dt2Schemes/steadyStateD2dt2Scheme/steadyStateD2dt2Scheme.C +++ b/src/finiteVolume/finiteVolume/d2dt2Schemes/steadyStateD2dt2Scheme/steadyStateD2dt2Scheme.C @@ -59,12 +59,7 @@ steadyStateD2dt2Scheme<Type>::fvcD2dt2 IOobject::NO_WRITE ), mesh(), - dimensioned<Type> - ( - "0", - vf.dimensions()/dimTime/dimTime, - Zero - ) + dimensioned<Type>(vf.dimensions()/dimTime/dimTime, Zero) ) ); } @@ -78,25 +73,21 @@ steadyStateD2dt2Scheme<Type>::fvcD2dt2 const GeometricField<Type, fvPatchField, volMesh>& vf ) { - return tmp<GeometricField<Type, fvPatchField, volMesh>> + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New ( - new GeometricField<Type, fvPatchField, volMesh> + IOobject ( - IOobject - ( - "d2dt2("+rho.name()+','+vf.name()+')', - mesh().time().timeName(), - mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "d2dt2("+rho.name()+','+vf.name()+')', + mesh().time().timeName(), mesh(), - dimensioned<Type> - ( - "0", - rho.dimensions()*vf.dimensions()/dimTime/dimTime, - Zero - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh(), + dimensioned<Type> + ( + rho.dimensions()*vf.dimensions()/dimTime/dimTime, + Zero ) ); } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C index 04600de1be640cc5676c5ecb7dfdb76a8fac8472..3b8d31be2d9865a81c0d92d7b9437b2d55da5bd6 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C @@ -56,7 +56,7 @@ tmp<volScalarField> CoEulerDdtScheme<Type>::CorDeltaT() const mesh() ), mesh(), - dimensionedScalar("CorDeltaT", cofrDeltaT.dimensions(), 0.0), + dimensionedScalar(cofrDeltaT.dimensions(), Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -168,12 +168,7 @@ CoEulerDdtScheme<Type>::fvcDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ) + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ) ); @@ -191,12 +186,7 @@ CoEulerDdtScheme<Type>::fvcDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ), + dimensioned<Type>(dt.dimensions()/dimTime, Zero), calculatedFvPatchField<Type>::typeName ) ); @@ -777,21 +767,18 @@ tmp<surfaceScalarField> CoEulerDdtScheme<Type>::meshPhi const GeometricField<Type, fvPatchField, volMesh>& ) { - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - "meshPhi", - mesh().time().timeName(), - mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "meshPhi", + mesh().time().timeName(), mesh(), - dimensionedScalar("0", dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh(), + dimensionedScalar(dimVolume/dimTime, Zero) ); } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C index f6e4482031f3131e073946c1582e6cdc19dd3abc..f84e5d5401a0527cb41b96f46c8624843ad65b16 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C @@ -161,7 +161,6 @@ CrankNicolsonDdtScheme<Type>::ddt0_ mesh(), dimensioned<typename GeoField::value_type> ( - "0", dims/dimTime, Zero ) @@ -370,12 +369,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ) + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ) ); diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C index 2fd8acaea7a6e69f3b3801f7b60b7ea469edf38a..49705716a1bd3c4387a3149c854d9a78cddc6bd1 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C @@ -64,12 +64,7 @@ EulerDdtScheme<Type>::fvcDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ) + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ) ); @@ -78,24 +73,14 @@ EulerDdtScheme<Type>::fvcDdt return tdtdt; } - else - { - return tmp<GeometricField<Type, fvPatchField, volMesh>> - ( - new GeometricField<Type, fvPatchField, volMesh> - ( - ddtIOobject, - mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ), - calculatedFvPatchField<Type>::typeName - ) - ); - } + + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New + ( + ddtIOobject, + mesh(), + dimensioned<Type>(dt.dimensions()/dimTime, Zero), + calculatedFvPatchField<Type>::typeName + ); } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C index 9aba9f0f679c9af931afbbbcdfa1a5b223879acc..9657e638788bb6fa20fb39b60197390a1cb84dd3 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C @@ -106,7 +106,7 @@ tmp<volScalarField> SLTSDdtScheme<Type>::SLrDeltaT() const mesh() ), mesh(), - dimensionedScalar("rDeltaT", dimless/dimTime, 0.0), + dimensionedScalar(dimless/dimTime, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -174,12 +174,7 @@ SLTSDdtScheme<Type>::fvcDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ) + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ) ); @@ -196,12 +191,7 @@ SLTSDdtScheme<Type>::fvcDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ), + dimensioned<Type>(dt.dimensions()/dimTime, Zero), calculatedFvPatchField<Type>::typeName ) ); @@ -782,22 +772,19 @@ tmp<surfaceScalarField> SLTSDdtScheme<Type>::meshPhi const GeometricField<Type, fvPatchField, volMesh>& ) { - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - "meshPhi", - mesh().time().timeName(), - mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "meshPhi", + mesh().time().timeName(), mesh(), - dimensionedScalar("0", dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh(), + dimensionedScalar(dimVolume/dimTime, Zero) ); } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C index 06676f037b0fe7e0ea693665e430c98a37b5f66e..8e2d5c70fea1d5413627f86cbe4eeef8eaa36456 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C @@ -102,12 +102,7 @@ backwardDdtScheme<Type>::fvcDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ) + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ) ); @@ -118,24 +113,14 @@ backwardDdtScheme<Type>::fvcDdt return tdtdt; } - else - { - return tmp<GeometricField<Type, fvPatchField, volMesh>> - ( - new GeometricField<Type, fvPatchField, volMesh> - ( - ddtIOobject, - mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ), - calculatedFvPatchField<Type>::typeName - ) - ); - } + + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New + ( + ddtIOobject, + mesh(), + dimensioned<Type>(dt.dimensions()/dimTime, Zero), + calculatedFvPatchField<Type>::typeName + ); } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C index 0e99dbd9f2d842b14ce108324d43ca4c1ca3600d..bef65188ef07e7492bb41993faa72b28da431e86 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C @@ -67,20 +67,12 @@ localEulerDdtScheme<Type>::fvcDdt mesh() ); - return tmp<GeometricField<Type, fvPatchField, volMesh>> + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New ( - new GeometricField<Type, fvPatchField, volMesh> - ( - ddtIOobject, - mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ), - calculatedFvPatchField<Type>::typeName - ) + ddtIOobject, + mesh(), + dimensioned<Type>(dt.dimensions()/dimTime, Zero), + calculatedFvPatchField<Type>::typeName ); } @@ -539,22 +531,19 @@ tmp<surfaceScalarField> localEulerDdtScheme<Type>::meshPhi const GeometricField<Type, fvPatchField, volMesh>& ) { - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - "meshPhi", - mesh().time().timeName(), - mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "meshPhi", + mesh().time().timeName(), mesh(), - dimensionedScalar("0", dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh(), + dimensionedScalar(dimVolume/dimTime, Zero) ); } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.C index b90b00aa7bb8df41c03cebc38b8a7872ceca4ba1..94fd62d2c2ddec5ded11541512c79ee1cbff3a35 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.C @@ -46,24 +46,16 @@ steadyStateDdtScheme<Type>::fvcDdt const dimensioned<Type>& dt ) { - return tmp<GeometricField<Type, fvPatchField, volMesh>> + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New ( - new GeometricField<Type, fvPatchField, volMesh> + IOobject ( - IOobject - ( - "ddt("+dt.name()+')', - mesh().time().timeName(), - mesh() - ), - mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ) - ) + "ddt("+dt.name()+')', + mesh().time().timeName(), + mesh() + ), + mesh(), + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ); } @@ -75,24 +67,16 @@ steadyStateDdtScheme<Type>::fvcDdt const GeometricField<Type, fvPatchField, volMesh>& vf ) { - return tmp<GeometricField<Type, fvPatchField, volMesh>> + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New ( - new GeometricField<Type, fvPatchField, volMesh> + IOobject ( - IOobject - ( - "ddt("+vf.name()+')', - mesh().time().timeName(), - mesh() - ), - mesh(), - dimensioned<Type> - ( - "0", - vf.dimensions()/dimTime, - Zero - ) - ) + "ddt("+vf.name()+')', + mesh().time().timeName(), + mesh() + ), + mesh(), + dimensioned<Type>(vf.dimensions()/dimTime, Zero) ); } @@ -105,24 +89,16 @@ steadyStateDdtScheme<Type>::fvcDdt const GeometricField<Type, fvPatchField, volMesh>& vf ) { - return tmp<GeometricField<Type, fvPatchField, volMesh>> + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New ( - new GeometricField<Type, fvPatchField, volMesh> + IOobject ( - IOobject - ( - "ddt("+rho.name()+','+vf.name()+')', - mesh().time().timeName(), - mesh() - ), - mesh(), - dimensioned<Type> - ( - "0", - rho.dimensions()*vf.dimensions()/dimTime, - Zero - ) - ) + "ddt("+rho.name()+','+vf.name()+')', + mesh().time().timeName(), + mesh() + ), + mesh(), + dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero) ); } @@ -135,24 +111,16 @@ steadyStateDdtScheme<Type>::fvcDdt const GeometricField<Type, fvPatchField, volMesh>& vf ) { - return tmp<GeometricField<Type, fvPatchField, volMesh>> + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New ( - new GeometricField<Type, fvPatchField, volMesh> + IOobject ( - IOobject - ( - "ddt("+rho.name()+','+vf.name()+')', - mesh().time().timeName(), - mesh() - ), - mesh(), - dimensioned<Type> - ( - "0", - rho.dimensions()*vf.dimensions()/dimTime, - Zero - ) - ) + "ddt("+rho.name()+','+vf.name()+')', + mesh().time().timeName(), + mesh() + ), + mesh(), + dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero) ); } @@ -166,24 +134,16 @@ steadyStateDdtScheme<Type>::fvcDdt const GeometricField<Type, fvPatchField, volMesh>& vf ) { - return tmp<GeometricField<Type, fvPatchField, volMesh>> + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New ( - new GeometricField<Type, fvPatchField, volMesh> + IOobject ( - IOobject - ( - "ddt("+alpha.name()+','+rho.name()+','+vf.name()+')', - mesh().time().timeName(), - mesh() - ), - mesh(), - dimensioned<Type> - ( - "0", - rho.dimensions()*vf.dimensions()/dimTime, - Zero - ) - ) + "ddt("+alpha.name()+','+rho.name()+','+vf.name()+')', + mesh().time().timeName(), + mesh() + ), + mesh(), + dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero) ); } @@ -293,9 +253,7 @@ steadyStateDdtScheme<Type>::fvcDdtUfCorr mesh(), dimensioned<typename flux<Type>::type> ( - "0", - Uf.dimensions()*dimArea/dimTime, - Zero + Uf.dimensions()*dimArea/dimTime, Zero ) ) ); @@ -327,9 +285,7 @@ steadyStateDdtScheme<Type>::fvcDdtPhiCorr mesh(), dimensioned<typename flux<Type>::type> ( - "0", - phi.dimensions()/dimTime, - Zero + phi.dimensions()/dimTime, Zero ) ) ); @@ -364,9 +320,7 @@ steadyStateDdtScheme<Type>::fvcDdtUfCorr mesh(), dimensioned<typename flux<Type>::type> ( - "0", - Uf.dimensions()*dimArea/dimTime, - Zero + Uf.dimensions()*dimArea/dimTime, Zero ) ) ); @@ -401,9 +355,7 @@ steadyStateDdtScheme<Type>::fvcDdtPhiCorr mesh(), dimensioned<typename flux<Type>::type> ( - "0", - phi.dimensions()/dimTime, - Zero + phi.dimensions()/dimTime, Zero ) ) ); @@ -420,22 +372,19 @@ tmp<surfaceScalarField> steadyStateDdtScheme<Type>::meshPhi const GeometricField<Type, fvPatchField, volMesh>& vf ) { - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - "meshPhi", - mesh().time().timeName(), - mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "meshPhi", + mesh().time().timeName(), mesh(), - dimensionedScalar("0", dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh(), + dimensionedScalar(dimVolume/dimTime, Zero) ); } diff --git a/src/finiteVolume/finiteVolume/fvc/fvcReconstructMag.C b/src/finiteVolume/finiteVolume/fvc/fvcReconstructMag.C index 654f72cf1f744b695459bfbffa5a9a98537f9e1c..2f1e780cee454f414cd8fbdd573c1359e061d907 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcReconstructMag.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcReconstructMag.C @@ -66,12 +66,7 @@ tmp<volScalarField> reconstructMag(const surfaceScalarField& ssf) IOobject::NO_WRITE ), mesh, - dimensionedScalar - ( - "0", - ssf.dimensions()/dimArea, - scalar(0) - ), + dimensionedScalar(ssf.dimensions()/dimArea, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSimpleReconstruct.C b/src/finiteVolume/finiteVolume/fvc/fvcSimpleReconstruct.C index bc4565fd3a918cbf634806aab87ab409d1a0f69a..04488d9b0c10a79ad315ed65956f9c95ddca7206 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSimpleReconstruct.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcSimpleReconstruct.C @@ -75,12 +75,7 @@ reconstruct IOobject::NO_WRITE ), mesh, - dimensioned<GradType> - ( - "0", - ssf.dimensions()/dimArea, - Zero - ), + dimensioned<GradType>(ssf.dimensions()/dimArea, Zero), extrapolatedCalculatedFvPatchField<GradType>::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.C b/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.C index bb38614e00a7ebfa8c0311d7d6483284724607aa..f1c827f2270c1e1bc528402a9f9effe773dd9f18 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.C @@ -98,12 +98,7 @@ surfaceIntegrate IOobject::NO_WRITE ), mesh, - dimensioned<Type> - ( - "0", - ssf.dimensions()/dimVol, - Zero - ), + dimensioned<Type>(ssf.dimensions()/dimVol, Zero), extrapolatedCalculatedFvPatchField<Type>::typeName ) ); @@ -154,7 +149,7 @@ surfaceSum IOobject::NO_WRITE ), mesh, - dimensioned<Type>("0", ssf.dimensions(), Zero), + dimensioned<Type>(ssf.dimensions(), Zero), extrapolatedCalculatedFvPatchField<Type>::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C index b8f0336226f1703a376106df6755da73d911d5c2..364ac6f31bce0a07ea779ea5bbfb4700a36191a9 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C @@ -71,12 +71,7 @@ Foam::fv::LeastSquaresGrad<Type, Stencil>::calcGrad IOobject::NO_WRITE ), mesh, - dimensioned<GradType> - ( - "zero", - vtf.dimensions()/dimLength, - Zero - ), + dimensioned<GradType>(vtf.dimensions()/dimLength, Zero), extrapolatedCalculatedFvPatchField<GradType>::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.C index 68e919ff5bc2433bf09d98e69b511bcc4ebd48d2..768d59e4b8f3ec08b9bce6a232cb3fa9b7f875fa 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.C @@ -61,12 +61,7 @@ Foam::fv::gaussGrad<Type>::gradf IOobject::NO_WRITE ), mesh, - dimensioned<GradType> - ( - "0", - ssf.dimensions()/dimLength, - Zero - ), + dimensioned<GradType>(ssf.dimensions()/dimLength, Zero), extrapolatedCalculatedFvPatchField<GradType>::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C index 7f8b4f26581f7fa575c2877edf125bfb973bb71b..9d4e1e228587241a95afe430da1ea6eb5845e89a 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C @@ -51,7 +51,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ), nVectors_ ( @@ -65,7 +65,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ) { calcLeastSquaresVectors(); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C index e25da6f1c9154936141e4ac983855ddb2df62a0a..5cd0fc61cbef283d9490376eb01a7c8d09b49767 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C @@ -67,12 +67,7 @@ Foam::fv::leastSquaresGrad<Type>::calcGrad IOobject::NO_WRITE ), mesh, - dimensioned<GradType> - ( - "zero", - vsf.dimensions()/dimLength, - Zero - ), + dimensioned<GradType>(vsf.dimensions()/dimLength, Zero), extrapolatedCalculatedFvPatchField<GradType>::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C index f679d67ed41fe5f7418b608de992ebf324665bb9..2c24af93e29bea450f54c711a3e2b4ade61f2f97 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C @@ -51,7 +51,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ), nVectors_ ( @@ -65,7 +65,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ) { calcLeastSquaresVectors(); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C index 60aaf10805c6df56e2c38821a9ed517f98ac9e43..54c1ea57984dad625c0a5ebc4a145ff88b864da1 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C @@ -51,7 +51,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ), nVectors_ ( @@ -65,7 +65,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ) { calcLeastSquaresVectors(); diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index c0c9b63da7ee14c2cd2ce441a9dd87353e72ec1b..a312cd97f9740c1e73a6d8d63fcfc3e1925fb049 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -865,7 +865,7 @@ Foam::fvMatrix<Type>::H() const Hphi.replace ( cmpt, - dimensionedScalar("0", Hphi.dimensions(), 0.0) + dimensionedScalar(Hphi.dimensions(), Zero) ); } } diff --git a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C index 57c19372a98e6d28fb4d5eaed82bed0e64bf4d80..2af783b1821c5fbe7af218c8bd9109d7e06628ae 100644 --- a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C +++ b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C @@ -71,7 +71,7 @@ Foam::isoAdvection::isoAdvection IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimVol, 0) + dimensionedScalar(dimVol, Zero) ), advectionTime_(0), diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencilTemplates.C index 77eead6d4839f2a3b684b3b14ffb54f999e5484b..4e6ee780989269a3643b315844c5488f5e80a115 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencilTemplates.C @@ -66,12 +66,7 @@ Foam::tmp mesh ), mesh, - dimensioned<WeightedType> - ( - fld.name(), - fld.dimensions(), - Zero - ) + dimensioned<WeightedType>(fld.dimensions(), Zero) ) ); WeightedFieldType& wf = twf(); diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C index b559afef6c33fa12bc6be5f26b89d78c00c27860..49b286ffa76df3b667117e89e5548917f560cedd 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C @@ -110,12 +110,7 @@ Foam::extendedCellToFaceStencil::weightedSum false ), mesh, - dimensioned<Type> - ( - fld.name(), - fld.dimensions(), - Zero - ) + dimensioned<Type>(fld.dimensions(), Zero) ) ); GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsfCorr.ref(); diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C index d51aa7e4c2d37328e97af9cd4f2e5a2488835202..6be79c032610b3c204289ccd5c1dddd3da420f37 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C @@ -59,12 +59,7 @@ Foam::extendedUpwindCellToFaceStencil::weightedSum false ), mesh, - dimensioned<Type> - ( - fld.name(), - fld.dimensions(), - Zero - ) + dimensioned<Type>(fld.dimensions(), Zero) ) ); GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsfCorr.ref(); diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C index f2d9edea8abca3f401c0ceb9ca7d3e1424746f9e..4ea767c08528e9307f4af479fc16300c017965d7 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C @@ -104,12 +104,7 @@ Foam::extendedFaceToCellStencil::weightedSum mesh ), mesh, - dimensioned<Type> - ( - fld.name(), - fld.dimensions(), - Zero - ) + dimensioned<Type>(fld.dimensions(), Zero) ) ); GeometricField<Type, fvPatchField, volMesh>& sf = tsfCorr.ref(); diff --git a/src/finiteVolume/fvMesh/fvMeshGeometry.C b/src/finiteVolume/fvMesh/fvMeshGeometry.C index 1fea4eb6104f2ba7dfac0f362c42f73c4c5d624d..110006a7afec04e2dbf3dc49070e658da3898604 100644 --- a/src/finiteVolume/fvMesh/fvMeshGeometry.C +++ b/src/finiteVolume/fvMesh/fvMeshGeometry.C @@ -436,7 +436,7 @@ const Foam::surfaceScalarField& Foam::fvMesh::phi() const // mesh motion fluxes if the time has been incremented if (!time().subCycling() && phiPtr_->timeIndex() != time().timeIndex()) { - (*phiPtr_) = dimensionedScalar("0", dimVolume/dimTime, 0.0); + (*phiPtr_) = dimensionedScalar(dimVolume/dimTime, Zero); } phiPtr_->setOriented(); diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/Poisson/PoissonPatchDistMethod.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/Poisson/PoissonPatchDistMethod.C index 542dc624cf7bdff18b3057d2c30b8424788f9428..0aa0bdb28fa552a85eac84d02f844e5951c0fb47 100644 --- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/Poisson/PoissonPatchDistMethod.C +++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/Poisson/PoissonPatchDistMethod.C @@ -89,7 +89,7 @@ bool Foam::patchDistMethods::Poisson::correct mesh_ ), mesh_, - dimensionedScalar("yPsi", sqr(dimLength), 0.0), + dimensionedScalar(sqr(dimLength), Zero), y.boundaryFieldRef().types() ) ); diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C index 99820db026f7ad94becc3d240b3c4b925fb930bc..7abf63225ada56cf7ebc6ac87a5551d995531325 100644 --- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C +++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C @@ -105,7 +105,7 @@ bool Foam::patchDistMethods::advectionDiffusion::correct false ), mesh_, - dimensionedVector("ny", dimless, Zero), + dimensionedVector(dimless, Zero), patchTypes<vector>(mesh_, patchIDs_) ); diff --git a/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C b/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C index 4a77fb85793ff8f93f53f028b7d4541cad89cb39..d566133d3c9707fd1910621b583cd8f5fb8539c0 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C +++ b/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C @@ -49,7 +49,7 @@ void Foam::wallDist::constructn() const mesh() ), mesh(), - dimensionedVector("n" & patchTypeName_, dimless, Zero), + dimensionedVector(dimless, Zero), patchDistMethod::patchTypes<vector>(mesh(), patchIDs_) ) ); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind/upwind.H b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind/upwind.H index aa71d183b992a85c66485fe1954f2640290fbf17..8d8b07f76f7d58d16f713bfcf0d94d512cca4855 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind/upwind.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind/upwind.H @@ -112,22 +112,19 @@ public: const GeometricField<Type, fvPatchField, volMesh>& ) const { - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - "upwindLimiter", - this->mesh().time().timeName(), - this->mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "upwindLimiter", + this->mesh().time().timeName(), this->mesh(), - dimensionedScalar("upwindLimiter", dimless, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh(), + dimensionedScalar(dimless, Zero) ); } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H index 38f47630a9ad6f2bcb1bad06f402af3954c4d9fb..c8982913b1745c50b51842d0b00b95222ec4596d 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H @@ -232,7 +232,7 @@ public: mesh ), mesh, - dimensionedScalar("Co", dimless, 0), + dimensionedScalar(dimless, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.C index 795d01d28eb6e68daba44f896a389633382fd572..a520b1548f5f106104c9a5b4bfe30254d165b4c9 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.C @@ -53,12 +53,7 @@ Foam::linearUpwindV<Type>::correction false ), mesh, - dimensioned<Type> - ( - vf.name(), - vf.dimensions(), - Zero - ) + dimensioned<Type>(vf.dimensions(), Zero) ) ); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrected.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrected.H index 6eef72d10c964f9d403a7e3c4320de3c52f3b3d8..5503048f59779c99127386866584d97e4364c8ca 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrected.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrected.H @@ -151,12 +151,7 @@ public: mesh ), mesh, - dimensioned<Type> - ( - vf.name(), - vf.dimensions(), - Zero - ) + dimensioned<Type>(vf.dimensions(), Zero) ) ); diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C index 6a4cb4df1eea221a86b42ea8685f4f5d20f00a2b..7b0ea37758eee67a9562e6e4e908d0fe01a2c1bb 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C @@ -263,7 +263,7 @@ void Foam::volPointInterpolation::makeWeights() mesh() ), pointMesh::New(mesh()), - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ); diff --git a/src/functionObjects/field/CourantNo/CourantNo.C b/src/functionObjects/field/CourantNo/CourantNo.C index 7e21b4ab4ee20c441a28b91c0ec7d2364db762ca..472f6ff26cce002893d7c06fad72e2f7c515b083 100644 --- a/src/functionObjects/field/CourantNo/CourantNo.C +++ b/src/functionObjects/field/CourantNo/CourantNo.C @@ -111,7 +111,7 @@ bool Foam::functionObjects::CourantNo::calc() IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ) ); diff --git a/src/functionObjects/field/Curle/Curle.C b/src/functionObjects/field/Curle/Curle.C index fcdcdd05cbbd4ea2c5067244e5e77f276e579905..67d6675093eb615af6df2d6661202757f564de25 100644 --- a/src/functionObjects/field/Curle/Curle.C +++ b/src/functionObjects/field/Curle/Curle.C @@ -61,12 +61,7 @@ bool Foam::functionObjects::Curle::calc() const volScalarField::Boundary& dpdtBf = dpdt.boundaryField(); const surfaceVectorField::Boundary& SfBf = mesh_.Sf().boundaryField(); - dimensionedVector dfdt - ( - "0", - p.dimensions()*dimArea/dimTime, - vector::zero - ); + dimensionedVector dfdt("dfdt", p.dimensions()*dimArea/dimTime, Zero); for (auto patchi : patchSet_) { @@ -93,7 +88,7 @@ bool Foam::functionObjects::Curle::calc() IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", p.dimensions(), 0) + dimensionedScalar(p.dimensions(), Zero) ) ); @@ -120,8 +115,8 @@ Foam::functionObjects::Curle::Curle : fieldExpression(name, runTime, dict, "p"), patchSet_(), - x0_("x0", dimLength, vector::zero), - c0_("c0", dimVelocity, 0) + x0_("x0", dimLength, Zero), + c0_("c0", dimVelocity, Zero) { read(dict); diff --git a/src/functionObjects/field/DESModelRegions/DESModelRegions.C b/src/functionObjects/field/DESModelRegions/DESModelRegions.C index ba30876431518dce609fff9a6565576e31e0fb2b..3a8e46251025b2b757dc181e4a67be9e221ebca5 100644 --- a/src/functionObjects/field/DESModelRegions/DESModelRegions.C +++ b/src/functionObjects/field/DESModelRegions/DESModelRegions.C @@ -89,7 +89,7 @@ Foam::functionObjects::DESModelRegions::DESModelRegions IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ) ); diff --git a/src/functionObjects/field/blendingFactor/blendingFactor.C b/src/functionObjects/field/blendingFactor/blendingFactor.C index c6627b1130255f1eafdaa356cbdc21c90ccec799..d46014e967a451b6e4bd0b227a4fd295e99ee232 100644 --- a/src/functionObjects/field/blendingFactor/blendingFactor.C +++ b/src/functionObjects/field/blendingFactor/blendingFactor.C @@ -94,7 +94,7 @@ Foam::functionObjects::blendingFactor::blendingFactor IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ) ); diff --git a/src/functionObjects/field/ddt2/ddt2Templates.C b/src/functionObjects/field/ddt2/ddt2Templates.C index 3514dbe3b64d7574ff0806bd476686941b797678..dc8cab344d830274e05fdf5ce16972754216bcdb 100644 --- a/src/functionObjects/field/ddt2/ddt2Templates.C +++ b/src/functionObjects/field/ddt2/ddt2Templates.C @@ -49,6 +49,13 @@ int Foam::functionObjects::ddt2::apply(const word& inputName, int& state) if (!foundObject<volScalarField>(outputName)) { + const dimensionSet dims = + ( + mag_ + ? mag(input.dimensions()/dimTime) + : magSqr(input.dimensions()/dimTime) + ); + tmp<volScalarField> tddt2 ( new volScalarField @@ -62,16 +69,7 @@ int Foam::functionObjects::ddt2::apply(const word& inputName, int& state) IOobject::NO_WRITE ), mesh_, - dimensionedScalar - ( - "0", - ( - mag_ - ? mag(input.dimensions()/dimTime) - : magSqr(input.dimensions()/dimTime) - ), - Zero - ) + dimensionedScalar(dims, Zero) ) ); diff --git a/src/functionObjects/field/heatTransferCoeff/heatTransferCoeff.C b/src/functionObjects/field/heatTransferCoeff/heatTransferCoeff.C index aff33118b4df0b727d9854c6abd483da406914b9..d5195e3eb52af98510c7cb3f8ba82c16d54d7364 100644 --- a/src/functionObjects/field/heatTransferCoeff/heatTransferCoeff.C +++ b/src/functionObjects/field/heatTransferCoeff/heatTransferCoeff.C @@ -80,7 +80,7 @@ Foam::functionObjects::heatTransferCoeff::heatTransferCoeff IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimPower/dimArea/dimTemperature, 0.0) + dimensionedScalar(dimPower/dimArea/dimTemperature, Zero) ) ); diff --git a/src/functionObjects/field/processorField/processorField.C b/src/functionObjects/field/processorField/processorField.C index e30ab4de92d83057cbf442fcc7c6845b6cb10644..e10b70cd4cd088d82cbaf48266347a19aebaae6f 100644 --- a/src/functionObjects/field/processorField/processorField.C +++ b/src/functionObjects/field/processorField/processorField.C @@ -65,7 +65,7 @@ Foam::functionObjects::processorField::processorField IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); diff --git a/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.C b/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.C index 2efc7fcf46c91ad2fb347736b2cb5a184b4a0900..47f4cf6a119b4321d081c0689e660b50299da8c6 100644 --- a/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.C +++ b/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.C @@ -91,7 +91,7 @@ calculateSpeciesRR IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); diff --git a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C index 5536b7b56f031789b72be194d265134b64f82642..d5c9e98f70034ce1c93f935ee88977199730a22f 100644 --- a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C +++ b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C @@ -502,7 +502,7 @@ bool Foam::functionObjects::regionSizeDistribution::write() IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ); Info<< " Dumping region as volScalarField to " << region.name() << endl; diff --git a/src/functionObjects/field/streamFunction/streamFunction.C b/src/functionObjects/field/streamFunction/streamFunction.C index 11ae3d05814d433ed676346b78273362d2c9c1f5..0838a07ecfb17bad0fdaf1032ab4b71e807531d8 100644 --- a/src/functionObjects/field/streamFunction/streamFunction.C +++ b/src/functionObjects/field/streamFunction/streamFunction.C @@ -82,7 +82,7 @@ Foam::tmp<Foam::pointScalarField> Foam::functionObjects::streamFunction::calc mesh_ ), pMesh, - dimensionedScalar("zero", phi.dimensions(), 0.0) + dimensionedScalar(phi.dimensions(), Zero) ) ); pointScalarField& streamFunction = tstreamFunction.ref(); diff --git a/src/functionObjects/field/wallHeatFlux/wallHeatFlux.C b/src/functionObjects/field/wallHeatFlux/wallHeatFlux.C index 59bee35c32e6afb674f150c6f15ac8f2edc882b0..20f74b8bd5b11963db3c47bc0bb6f7201ab9851d 100644 --- a/src/functionObjects/field/wallHeatFlux/wallHeatFlux.C +++ b/src/functionObjects/field/wallHeatFlux/wallHeatFlux.C @@ -118,7 +118,7 @@ Foam::functionObjects::wallHeatFlux::wallHeatFlux IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimMass/pow3(dimTime), 0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ) ); diff --git a/src/functionObjects/field/wallShearStress/wallShearStress.C b/src/functionObjects/field/wallShearStress/wallShearStress.C index ce8281fa10068c2b69342f1a9982c30d18048d23..4a33436615a00d0267bfc1887679cfae7d348493 100644 --- a/src/functionObjects/field/wallShearStress/wallShearStress.C +++ b/src/functionObjects/field/wallShearStress/wallShearStress.C @@ -109,12 +109,7 @@ Foam::functionObjects::wallShearStress::wallShearStress IOobject::NO_WRITE ), mesh_, - dimensionedVector - ( - "0", - sqr(dimLength)/sqr(dimTime), - Zero - ) + dimensionedVector(sqr(dimLength)/sqr(dimTime), Zero) ) ); diff --git a/src/functionObjects/field/writeCellVolumes/writeCellVolumes.C b/src/functionObjects/field/writeCellVolumes/writeCellVolumes.C index 3ff4de770f57be691273eea8d8d338ca037a4d45..ede00015457b6119561c5a89cd73ee90a0f80455 100644 --- a/src/functionObjects/field/writeCellVolumes/writeCellVolumes.C +++ b/src/functionObjects/field/writeCellVolumes/writeCellVolumes.C @@ -88,7 +88,7 @@ bool Foam::functionObjects::writeCellVolumes::write() false ), mesh_, - dimensionedScalar(mesh_.V().name(), mesh_.V().dimensions(), 0), + dimensionedScalar(mesh_.V().dimensions(), Zero), calculatedFvPatchField<scalar>::typeName ); diff --git a/src/functionObjects/field/yPlus/yPlus.C b/src/functionObjects/field/yPlus/yPlus.C index 9ee1931edb81f1a435218d38fc2700422ceb9e83..72740eb4cace6b06639c889a2a022b12bf799577 100644 --- a/src/functionObjects/field/yPlus/yPlus.C +++ b/src/functionObjects/field/yPlus/yPlus.C @@ -92,7 +92,7 @@ Foam::functionObjects::yPlus::yPlus IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("0", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); diff --git a/src/functionObjects/field/zeroGradient/zeroGradientTemplates.C b/src/functionObjects/field/zeroGradient/zeroGradientTemplates.C index c900f9575d04c14352e4c629c6dc49f285c87e8f..3f8074ab5a895aa0a01c298f017fd17d1df2e8d8 100644 --- a/src/functionObjects/field/zeroGradient/zeroGradientTemplates.C +++ b/src/functionObjects/field/zeroGradient/zeroGradientTemplates.C @@ -96,7 +96,7 @@ int Foam::functionObjects::zeroGradient::apply IOobject::NO_WRITE ), mesh_, - dimensioned<Type>("0", input.dimensions(), Zero), + dimensioned<Type>(input.dimensions(), Zero), zeroGradientFvPatchField<Type>::typeName ) ); diff --git a/src/functionObjects/forces/forceCoeffs/forceCoeffs.C b/src/functionObjects/forces/forceCoeffs/forceCoeffs.C index d886256e24943da36f2084cf291ee3be9b0267a9..39852bcc24fe72c77a92854781942f7ace0d9130 100644 --- a/src/functionObjects/forces/forceCoeffs/forceCoeffs.C +++ b/src/functionObjects/forces/forceCoeffs/forceCoeffs.C @@ -277,7 +277,7 @@ bool Foam::functionObjects::forceCoeffs::read(const dictionary& dict) IOobject::NO_WRITE ), mesh_, - dimensionedVector("0", dimless, Zero) + dimensionedVector(dimless, Zero) ) ); @@ -296,7 +296,7 @@ bool Foam::functionObjects::forceCoeffs::read(const dictionary& dict) IOobject::NO_WRITE ), mesh_, - dimensionedVector("0", dimless, Zero) + dimensionedVector(dimless, Zero) ) ); diff --git a/src/functionObjects/forces/forces/forces.C b/src/functionObjects/forces/forces/forces.C index fc6f21a9aee67d54abb17cabff2d45cc73d5070d..ac7dae98e4758d129f00911e4fda4b9ba59c7297 100644 --- a/src/functionObjects/forces/forces/forces.C +++ b/src/functionObjects/forces/forces/forces.C @@ -299,7 +299,7 @@ void Foam::functionObjects::forces::resetFields() lookupObject<volVectorField>(fieldName("force")) ); - force == dimensionedVector("0", force.dimensions(), Zero); + force == dimensionedVector(force.dimensions(), Zero); volVectorField& moment = const_cast<volVectorField&> @@ -307,7 +307,7 @@ void Foam::functionObjects::forces::resetFields() lookupObject<volVectorField>(fieldName("moment")) ); - moment == dimensionedVector("0", moment.dimensions(), Zero); + moment == dimensionedVector(moment.dimensions(), Zero); } } @@ -940,7 +940,7 @@ bool Foam::functionObjects::forces::read(const dictionary& dict) IOobject::NO_WRITE ), mesh_, - dimensionedVector("0", dimForce, Zero) + dimensionedVector(dimForce, Zero) ) ); @@ -959,7 +959,7 @@ bool Foam::functionObjects::forces::read(const dictionary& dict) IOobject::NO_WRITE ), mesh_, - dimensionedVector("0", dimForce*dimLength, Zero) + dimensionedVector(dimForce*dimLength, Zero) ) ); diff --git a/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.C b/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.C index 4cce300a4d0fd9ad8779de412c5c862956983b74..ccaf93b7e79537ddf6210e853d2337923ed1e7a4 100644 --- a/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.C +++ b/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.C @@ -64,7 +64,7 @@ Foam::functionObjects::icoUncoupledKinematicCloud::icoUncoupledKinematicCloud IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), - dimensionedVector("g", dimAcceleration, Zero) + dimensionedVector("g", dimAcceleration, Zero) // Needs name ), laminarTransport_ ( diff --git a/src/functionObjects/solvers/energyTransport/energyTransport.C b/src/functionObjects/solvers/energyTransport/energyTransport.C index a8870378807ba179b430fb1ce18b0c70aaec70b0..6562338cab9a25fda98e0ca11138c53217c3c087 100644 --- a/src/functionObjects/solvers/energyTransport/energyTransport.C +++ b/src/functionObjects/solvers/energyTransport/energyTransport.C @@ -260,7 +260,7 @@ Foam::functionObjects::energyTransport::energyTransport IOobject::NO_WRITE ), mesh_, - dimensionedScalar("rhoCp", dimEnergy/dimTemperature/dimVolume, 0.0) + dimensionedScalar(dimEnergy/dimTemperature/dimVolume, Zero) ) { read(dict); diff --git a/src/functionObjects/solvers/scalarTransport/scalarTransport.C b/src/functionObjects/solvers/scalarTransport/scalarTransport.C index 707bf2a134b9a80a5a83f78cbd961e7a0e44b9c6..0045bc6e285c018dc7173c2764692f89db2c0835 100644 --- a/src/functionObjects/solvers/scalarTransport/scalarTransport.C +++ b/src/functionObjects/solvers/scalarTransport/scalarTransport.C @@ -101,34 +101,26 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::scalarTransport::D if (constantD_) { - tmp<volScalarField> tD + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - Dname, - mesh_.time().timeName(), - mesh_.time(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar(Dname, phi.dimensions()/dimLength, D_) - ) + Dname, + mesh_.time().timeName(), + mesh_.time(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar(Dname, phi.dimensions()/dimLength, D_) ); - - return tD; } else if (nutName_ != "none") { const volScalarField& nutMean = mesh_.lookupObject<volScalarField>(nutName_); - return tmp<volScalarField> - ( - new volScalarField(Dname, nutMean) - ); + return tmp<volScalarField>::New(Dname, nutMean); } else if (foundObject<icoModel>(turbulenceModel::propertiesName)) { @@ -137,13 +129,10 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::scalarTransport::D turbulenceModel::propertiesName ); - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField - ( - Dname, - alphaD_*model.nu() + alphaDt_*model.nut() - ) + Dname, + alphaD_*model.nu() + alphaDt_*model.nut() ); } else if (foundObject<cmpModel>(turbulenceModel::propertiesName)) @@ -153,34 +142,27 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::scalarTransport::D turbulenceModel::propertiesName ); - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField - ( - Dname, - alphaD_*model.mu() + alphaDt_*model.mut() - ) + Dname, + alphaD_*model.mu() + alphaDt_*model.mut() ); } - else - { - return tmp<volScalarField> + + + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - Dname, - mesh_.time().timeName(), - mesh_.time(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar(Dname, phi.dimensions()/dimLength, 0.0) - ) - ); - } + Dname, + mesh_.time().timeName(), + mesh_.time(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar(phi.dimensions()/dimLength, Zero) + ); } @@ -219,7 +201,7 @@ Foam::functionObjects::scalarTransport::scalarTransport if (resetOnStartUp_) { - s == dimensionedScalar("zero", dimless, 0.0); + s == dimensionedScalar(dimless, Zero); } } diff --git a/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C index 1fdc8601312dbf4b703e53c4282c588d76814d1b..859ce93389f113c60eece7b2ead95b32f1b16c55 100644 --- a/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C @@ -68,12 +68,7 @@ displacementComponentLaplacianFvMotionSolver IOobject::AUTO_WRITE ), fvMesh_, - dimensionedScalar - ( - "cellDisplacement", - pointDisplacement_.dimensions(), - 0 - ), + dimensionedScalar(pointDisplacement_.dimensions(), Zero), cellMotionBoundaryTypes<scalar>(pointDisplacement_.boundaryField()) ), pointLocation_(nullptr), diff --git a/src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/velocityComponentLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/velocityComponentLaplacianFvMotionSolver.C index 6a61aee66a8f7d2d6ea6d4decc9efb36f0abfe1a..4eba4ac8a02f678eee1f07ff1b86e44d182431b0 100644 --- a/src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/velocityComponentLaplacianFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/velocityComponentLaplacianFvMotionSolver.C @@ -67,12 +67,7 @@ velocityComponentLaplacianFvMotionSolver IOobject::AUTO_WRITE ), fvMesh_, - dimensionedScalar - ( - "cellMotionU", - pointMotionU_.dimensions(), - 0 - ), + dimensionedScalar(pointMotionU_.dimensions(), Zero), cellMotionBoundaryTypes<scalar>(pointMotionU_.boundaryField()) ), interpolationPtr_ diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C index 390a60fb12027799badc7aaefad0a9dd79781438..f2d4c1a6c1e524620dad807996afb4b339cb9990 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C @@ -78,12 +78,7 @@ Foam::displacementSBRStressFvMotionSolver::displacementSBRStressFvMotionSolver IOobject::AUTO_WRITE ), fvMesh_, - dimensionedVector - ( - "cellDisplacement", - pointDisplacement().dimensions(), - Zero - ), + dimensionedVector(pointDisplacement().dimensions(), Zero), cellMotionBoundaryTypes<vector>(pointDisplacement().boundaryField()) ), interpolationPtr_ @@ -123,7 +118,6 @@ displacementSBRStressFvMotionSolver fvMesh_, dimensionedVector ( - "cellDisplacement", displacementMotionSolver::pointDisplacement().dimensions(), Zero ), diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C index 22d444062aad4418142703e80e6952c906ebcf55..59e83177a1da07a10fa9e8481576bbb84d98566f 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C @@ -76,12 +76,7 @@ Foam::displacementLaplacianFvMotionSolver::displacementLaplacianFvMotionSolver IOobject::AUTO_WRITE ), fvMesh_, - dimensionedVector - ( - "cellDisplacement", - pointDisplacement_.dimensions(), - Zero - ), + dimensionedVector(pointDisplacement_.dimensions(), Zero), cellMotionBoundaryTypes<vector>(pointDisplacement_.boundaryField()) ), pointLocation_(nullptr), @@ -166,12 +161,7 @@ displacementLaplacianFvMotionSolver IOobject::AUTO_WRITE ), fvMesh_, - dimensionedVector - ( - "cellDisplacement", - pointDisplacement_.dimensions(), - Zero - ), + dimensionedVector(pointDisplacement_.dimensions(), Zero), cellMotionBoundaryTypes<vector>(pointDisplacement_.boundaryField()) ), pointLocation_(nullptr), diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/solidBodyDisplacementLaplacian/solidBodyDisplacementLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/solidBodyDisplacementLaplacian/solidBodyDisplacementLaplacianFvMotionSolver.C index aefde7ac5da6b46b4179649a603cae69102a3a85..df0a060c00aaeccd15ff0da8a4d6cb3ce751f71f 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/solidBodyDisplacementLaplacian/solidBodyDisplacementLaplacianFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/solidBodyDisplacementLaplacian/solidBodyDisplacementLaplacianFvMotionSolver.C @@ -80,12 +80,7 @@ solidBodyDisplacementLaplacianFvMotionSolver IOobject::AUTO_WRITE ), fvMesh_, - dimensionedVector - ( - "cellDisplacement", - pointDisplacement_.dimensions(), - Zero - ), + dimensionedVector(pointDisplacement_.dimensions(), Zero), cellMotionBoundaryTypes<vector>(pointDisplacement_.boundaryField()) ), pointLocation_(nullptr), @@ -171,12 +166,7 @@ solidBodyDisplacementLaplacianFvMotionSolver IOobject::AUTO_WRITE ), fvMesh_, - dimensionedVector - ( - "cellDisplacement", - pointDisplacement_.dimensions(), - Zero - ), + dimensionedVector(pointDisplacement_.dimensions(), Zero), cellMotionBoundaryTypes<vector>(pointDisplacement_.boundaryField()) ), pointLocation_(nullptr), diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C index 9f9c2c27e250958c84a89c02675a74f4f08bbb13..4877ec684f5867a78850497d76925e1f412c1792 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C @@ -75,7 +75,7 @@ surfaceAlignedSBRStressFvMotionSolver IOobject::NO_WRITE ), fvMesh_, - dimensionedVector("zero", dimless, Zero) + dimensionedVector(dimless, Zero) ), maxAng_(coeffDict().lookupOrDefault<scalar>("maxAng", 80.0)), minAng_(coeffDict().lookupOrDefault<scalar>("minAng", 20.0)), @@ -94,7 +94,7 @@ surfaceAlignedSBRStressFvMotionSolver IOobject::NO_WRITE ), fvMesh_, - dimensionedSymmTensor("zero", dimless, Zero) + dimensionedSymmTensor(dimless, Zero) ), minSigmaDiff_(coeffDict().lookupOrDefault<scalar>("minSigmaDiff", 1e-4)) { @@ -310,7 +310,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve() IOobject::NO_WRITE ), fvMesh_, - dimensionedVector("zero", dimLength, Zero), + dimensionedVector(dimLength, Zero), cellMotionBoundaryTypes<vector> ( pointDisplacement().boundaryField() @@ -355,7 +355,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve() IOobject::NO_WRITE ), fvMesh_, - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); volScalarField& mu = tmu.ref(); diff --git a/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C index 8d450954bf3c27c11021470d714e52efa2246fde..572b16ce9d5b97c90dc491b7a228ebc80713b026 100644 --- a/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C @@ -66,12 +66,7 @@ Foam::velocityLaplacianFvMotionSolver::velocityLaplacianFvMotionSolver IOobject::AUTO_WRITE ), fvMesh_, - dimensionedVector - ( - "cellMotionU", - pointMotionU_.dimensions(), - Zero - ), + dimensionedVector(pointMotionU_.dimensions(), Zero), cellMotionBoundaryTypes<vector>(pointMotionU_.boundaryField()) ), interpolationPtr_ diff --git a/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C b/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C index 4f9cc95106ff69ec39ec2c6834e7fa34a1ec1664..bcb5ace0bc0908189a1127063977a8f43b947678 100644 --- a/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C +++ b/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C @@ -103,10 +103,10 @@ void Foam::patchCorrectedInterpolation::interpolateDataFromPatchGroups mesh() ), data.mesh(), - dimensionedScalar("zero", dimless, 0), + dimensionedScalar(dimless, Zero), zeroGradientPointPatchField<scalar>::typeName ); - data = dimensioned<Type>("zero", data.dimensions(), Type(Zero)); + data = dimensioned<Type>(data.dimensions(), Zero); forAll(patchGroups_, patchGroupI) { @@ -120,7 +120,7 @@ void Foam::patchCorrectedInterpolation::interpolateDataFromPatchGroups mesh() ), data.mesh(), - dimensionedScalar("zero", data.dimensions(), 0), + dimensionedScalar(data.dimensions(), Zero), zeroGradientPointPatchField<scalar>::typeName ); GeometricField<Type, pointPatchField, pointMesh> patchData(data); diff --git a/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C b/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C index c05736e3c6e07ae186f2393bf2b19fb5ee21975c..57f307d66d98e4893b2a054dcec3afeebfcf32b1 100644 --- a/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C +++ b/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C @@ -474,7 +474,7 @@ void Foam::fv::directionalPressureGradientExplicitSource::addSup IOobject::NO_WRITE ), mesh_, - dimensionedVector("zero", eqn.dimensions()/dimVolume, Zero) + dimensionedVector(eqn.dimensions()/dimVolume, Zero) ); UIndirectList<vector>(Su, cells_) = gradP0_ + dGradP_ + gradPporous_; diff --git a/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSource.C b/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSource.C index 963c0c72fee55f3c59aaeadf09629f995d9b8846..39cb29279d3c69f4b65c779e62b9ea13a3936089 100644 --- a/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSource.C +++ b/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSource.C @@ -87,7 +87,7 @@ Foam::fv::jouleHeatingSource::transformSigma false ), mesh_, - dimensionedSymmTensor("0", sigmaLocal.dimensions(), Zero), + dimensionedSymmTensor(sigmaLocal.dimensions(), Zero), zeroGradientFvPatchField<symmTensor>::typeName ) ); diff --git a/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSourceTemplates.C b/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSourceTemplates.C index 11d7eed98c6ef912f4422511220ff3208686ec42..0ed146d939d7f8c5a1bf20004ce8777f25ca3f46 100644 --- a/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSourceTemplates.C +++ b/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSourceTemplates.C @@ -52,12 +52,7 @@ void Foam::fv::jouleHeatingSource::initialiseSigma IOobject::AUTO_WRITE ), mesh_, - dimensioned<Type> - ( - "0", - sqr(dimCurrent)/dimPower/dimLength, - Zero - ) + dimensioned<Type>(sqr(dimCurrent)/dimPower/dimLength, Zero) ) ); diff --git a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C index 8581f53bb9b5a796fd8f71019d803665bd6ba2be..48920d1407b7f54cb7fe503828619bbe7374c292 100644 --- a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C +++ b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C @@ -204,7 +204,7 @@ void Foam::fv::meanVelocityForce::addSup IOobject::NO_WRITE ), mesh_, - dimensionedVector("zero", eqn.dimensions()/dimVolume, Zero) + dimensionedVector(eqn.dimensions()/dimVolume, Zero) ); scalar gradP = gradP0_ + dGradP_; diff --git a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C index ac8bcf0c378f53c7c72e0ac54abd8f705bead9b7..dbec4affc98c765065751b44445e2f9fa935ce42 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C +++ b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C @@ -249,7 +249,7 @@ void Foam::fv::rotorDiskSource::setFaceArea(vector& axis, const bool correct) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimArea, 0) + dimensionedScalar(dimArea, Zero) ); UIndirectList<scalar>(area.primitiveField(), cells_) = area_; @@ -519,12 +519,7 @@ void Foam::fv::rotorDiskSource::addSup mesh_ ), mesh_, - dimensionedVector - ( - "zero", - eqn.dimensions()/dimVolume, - Zero - ) + dimensionedVector(eqn.dimensions()/dimVolume, Zero) ); // Read the reference density for incompressible flow @@ -560,12 +555,7 @@ void Foam::fv::rotorDiskSource::addSup mesh_ ), mesh_, - dimensionedVector - ( - "zero", - eqn.dimensions()/dimVolume, - Zero - ) + dimensionedVector(eqn.dimensions()/dimVolume, Zero) ); const vectorField Uin(inflowVelocity(eqn.psi())); diff --git a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceTemplates.C b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceTemplates.C index 5c536e562497f768e57f8239988492ebd3350574..f305281d53f389500562c64917eaf72097df302e 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceTemplates.C +++ b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceTemplates.C @@ -182,7 +182,7 @@ void Foam::fv::rotorDiskSource::writeField IOobject::NO_WRITE ), mesh_, - dimensioned<Type>("zero", dimless, Zero) + dimensioned<Type>(dimless, Zero) ) ); diff --git a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C index 79eaa7d6e8b940bc4c141818c42ce35e7a436397..6272af6db9517a33f4873aa9fc4aa2e71f9f7eed 100644 --- a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C +++ b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C @@ -81,27 +81,24 @@ Foam::fv::solidificationMeltingSource::Cp() const { scalar CpRef = readScalar(coeffs_.lookup("CpRef")); - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - name_ + ":Cp", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + name_ + ":Cp", + mesh_.time().timeName(), mesh_, - dimensionedScalar - ( - "Cp", - dimEnergy/dimMass/dimTemperature, - CpRef - ), - extrapolatedCalculatedFvPatchScalarField::typeName - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar + ( + "Cp", + dimEnergy/dimMass/dimTemperature, + CpRef + ), + extrapolatedCalculatedFvPatchScalarField::typeName ); } else @@ -207,7 +204,7 @@ Foam::fv::solidificationMeltingSource::solidificationMeltingSource IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("alpha1", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ), curTimeIndex_(-1), diff --git a/src/fvOptions/sources/derived/viscousDissipation/viscousDissipation.C b/src/fvOptions/sources/derived/viscousDissipation/viscousDissipation.C index 9b4e9800890d55da659e34ed01b37ffda33f9d9e..7ac99f96f75d792555c515d4aa2bd990a551c70e 100644 --- a/src/fvOptions/sources/derived/viscousDissipation/viscousDissipation.C +++ b/src/fvOptions/sources/derived/viscousDissipation/viscousDissipation.C @@ -195,7 +195,7 @@ void Foam::fv::viscousDissipation::addSup IOobject::NO_WRITE ), mesh_, - dimensionedTensor("zero", inv(dimTime) , tensor::zero) + dimensionedTensor(inv(dimTime), Zero) ) ); diff --git a/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C b/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C index 3cf82a868cf5ce60bd19d4ff98651e67f3a401ef..f98c6dbd1a5e1610e74f809684dd51e761710cf9 100644 --- a/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C +++ b/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C @@ -152,12 +152,7 @@ void Foam::fv::SemiImplicitSource<Type>::addSup IOobject::NO_WRITE ), mesh_, - dimensioned<Type> - ( - "zero", - eqn.dimensions()/dimVolume, - Zero - ), + dimensioned<Type>(eqn.dimensions()/dimVolume, Zero), false ); @@ -174,12 +169,7 @@ void Foam::fv::SemiImplicitSource<Type>::addSup IOobject::NO_WRITE ), mesh_, - dimensioned<scalar> - ( - "zero", - Su.dimensions()/psi.dimensions(), - 0.0 - ), + dimensioned<scalar>(Su.dimensions()/psi.dimensions(), Zero), false ); diff --git a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C index 0adb2b5ee95af0d82e6e9ef6830c77e98245b832..5824ba316b4feea0ed76f5e11fc66c558b9fd589 100644 --- a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C +++ b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C @@ -154,7 +154,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup IOobject::NO_WRITE ), nbrMesh, - dimensionedVector("zero", U.dimensions(), Zero) + dimensionedVector(U.dimensions(), Zero) ); // Map local velocity onto neighbour region @@ -208,7 +208,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup IOobject::NO_WRITE ), nbrMesh, - dimensionedVector("zero", U.dimensions(), Zero) + dimensionedVector(U.dimensions(), Zero) ); // Map local velocity onto neighbour region @@ -232,7 +232,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup IOobject::NO_WRITE ), nbrMesh, - dimensionedScalar("zero", dimDensity, 0.0) + dimensionedScalar(dimDensity, Zero) ); volScalarField muNbr @@ -246,7 +246,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup IOobject::NO_WRITE ), nbrMesh, - dimensionedScalar("zero", dimViscosity, 0.0) + dimensionedScalar(dimViscosity, Zero) ); const volScalarField& mu = diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C index ecf9e8441045682cce2a496eaa4944b80d78a10d..257f3f21dea9fe274784f673f0fb6c62e3f7e61a 100644 --- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C @@ -134,12 +134,7 @@ Foam::fv::interRegionHeatTransferModel::interRegionHeatTransferModel IOobject::NO_WRITE ), mesh, - dimensionedScalar - ( - "htc", - dimEnergy/dimTime/dimTemperature/dimVolume, - 0.0 - ), + dimensionedScalar(dimEnergy/dimTime/dimTemperature/dimVolume, Zero), zeroGradientFvPatchScalarField::typeName ), semiImplicit_(false), diff --git a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C index 23394240f4ad8f7d4e967f4ea79164cd5cd4cddb..80ba38e4035ce5ea6432c5e743aee2e1368031df 100644 --- a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C +++ b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C @@ -514,7 +514,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud mesh_ ), mesh_, - dimensionedScalar("collisionSelectionRemainder", dimless, 0) + dimensionedScalar(dimless, Zero) ), q_ ( @@ -735,7 +735,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(0, 3, -1, 0, 0), 0.0), + dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero), zeroGradientFvPatchScalarField::typeName ), collisionSelectionRemainder_ @@ -747,7 +747,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud mesh_ ), mesh_, - dimensionedScalar("collisionSelectionRemainder", dimless, 0) + dimensionedScalar(dimless, Zero) ), q_ ( @@ -760,7 +760,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(1, 0, -3, 0, 0), 0.0) + dimensionedScalar(dimensionSet(1, 0, -3, 0, 0), Zero) ), fD_ ( @@ -773,12 +773,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedVector - ( - "zero", - dimensionSet(1, -1, -2, 0, 0), - Zero - ) + dimensionedVector(dimensionSet(1, -1, -2, 0, 0), Zero) ), rhoN_ ( @@ -791,7 +786,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(0, -3, 0, 0, 0), VSMALL) + dimensionedScalar("zero", dimensionSet(0, -3, 0, 0, 0), VSMALL) ), rhoM_ ( @@ -804,7 +799,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(1, -3, 0, 0, 0), VSMALL) + dimensionedScalar("zero", dimensionSet(1, -3, 0, 0, 0), VSMALL) ), dsmcRhoN_ ( @@ -817,7 +812,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(0, -3, 0, 0, 0), 0.0) + dimensionedScalar(dimensionSet(0, -3, 0, 0, 0), Zero) ), linearKE_ ( @@ -830,7 +825,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(1, -1, -2, 0, 0), 0.0) + dimensionedScalar(dimensionSet(1, -1, -2, 0, 0), Zero) ), internalE_ ( @@ -843,7 +838,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(1, -1, -2, 0, 0), 0.0) + dimensionedScalar(dimensionSet(1, -1, -2, 0, 0), Zero) ), iDof_ ( @@ -856,7 +851,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(0, -3, 0, 0, 0), VSMALL) + dimensionedScalar("zero", dimensionSet(0, -3, 0, 0, 0), VSMALL) ), momentum_ ( @@ -869,12 +864,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedVector - ( - "zero", - dimensionSet(1, -2, -1, 0, 0), - Zero - ) + dimensionedVector(dimensionSet(1, -2, -1, 0, 0), Zero) ), constProps_(), rndGen_(Pstream::myProcNo()), @@ -891,7 +881,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(0, 0, 0, 1, 0), 0.0) + dimensionedScalar(dimensionSet(0, 0, 0, 1, 0), Zero) ) ), boundaryU_ @@ -907,12 +897,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedVector - ( - "zero", - dimensionSet(0, 1, -1, 0, 0), - Zero - ) + dimensionedVector(dimensionSet(0, 1, -1, 0, 0), Zero) ) ), binaryCollisionModel_(), diff --git a/src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H b/src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H index 38883fb78b216284b4ec98cc0b6326ea34d4e0c0..b6d3c3dbb5409b16d75e70cffdad4cd392d5c4c7 100644 --- a/src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H +++ b/src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H @@ -43,7 +43,7 @@ Foam::coalCloudList::UTrans() const IOobject::NO_WRITE ), mesh_, - dimensionedVector("zero", dimMass*dimVelocity, Zero) + dimensionedVector(dimMass*dimVelocity, Zero) ) ); @@ -91,7 +91,7 @@ Foam::coalCloudList::hsTrans() const IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimEnergy, 0.0) + dimensionedScalar(dimEnergy, Zero) ) ); @@ -157,7 +157,7 @@ Foam::coalCloudList::rhoTrans() const IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimMass, 0.0) + dimensionedScalar(dimMass, Zero) ) ); @@ -193,7 +193,7 @@ Foam::coalCloudList::Srho() const IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimDensity/dimTime, 0.0) + dimensionedScalar(dimDensity/dimTime, Zero) ) ); @@ -227,7 +227,7 @@ Foam::coalCloudList::Srho IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimDensity/dimTime, 0.0) + dimensionedScalar(dimDensity/dimTime, Zero) ) ); diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index 84c7b8531524dcaafa44d5b4f30d3bf6e37202d9..1b1a8079825a9094e9d2fcb5c45a0d372baa5734 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -373,7 +373,7 @@ Foam::KinematicCloud<CloudType>::KinematicCloud IOobject::AUTO_WRITE ), mesh_, - dimensionedVector("zero", dimMass*dimVelocity, Zero) + dimensionedVector(dimMass*dimVelocity, Zero) ) ), UCoeff_ @@ -389,7 +389,7 @@ Foam::KinematicCloud<CloudType>::KinematicCloud IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("zero", dimMass, 0.0) + dimensionedScalar(dimMass, Zero) ) ) { diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H index 5d3d8d233f38f8aed9c8c8dbb5ceba763713bdf6..dc8e5fd67750c58ba93835a81a1c12c67f81e824 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H @@ -469,7 +469,7 @@ Foam::KinematicCloud<CloudType>::vDotSweep() const false ), mesh_, - dimensionedScalar("zero", dimless/dimTime, 0.0), + dimensionedScalar(dimless/dimTime, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -508,7 +508,7 @@ Foam::KinematicCloud<CloudType>::theta() const false ), mesh_, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -547,7 +547,7 @@ Foam::KinematicCloud<CloudType>::alpha() const false ), mesh_, - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); @@ -584,7 +584,7 @@ Foam::KinematicCloud<CloudType>::rhoEff() const false ), mesh_, - dimensionedScalar("zero", dimDensity, 0.0) + dimensionedScalar(dimDensity, Zero) ) ); diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C index ffb70989bcdb9baa6bc9cfb76c00c221e172f742..2526a5617c66704c37d723b6ce5d313957d965a2 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C @@ -133,7 +133,7 @@ Foam::ReactingCloud<CloudType>::ReactingCloud IOobject::AUTO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimMass, 0.0) + dimensionedScalar(dimMass, Zero) ) ); } diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H index 167c44cc00e0a046686e403182e9de378a66b48f..0b3177385a83f2f39e91c8b27d6e3dfbd382a9e0 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H @@ -123,7 +123,7 @@ inline Foam::tmp<Foam::fvScalarMatrix> Foam::ReactingCloud<CloudType>::SYi false ), this->mesh(), - dimensionedScalar("zero", dimMass/dimTime/dimVolume, 0.0) + dimensionedScalar(dimMass/dimTime/dimVolume, Zero) ) ); @@ -173,9 +173,7 @@ Foam::ReactingCloud<CloudType>::Srho(const label i) const this->mesh(), dimensionedScalar ( - "zero", - rhoTrans_[0].dimensions()/dimTime/dimVolume, - 0.0 + rhoTrans_[0].dimensions()/dimTime/dimVolume, Zero ) ) ); @@ -210,9 +208,7 @@ Foam::ReactingCloud<CloudType>::Srho() const this->mesh(), dimensionedScalar ( - "zero", - rhoTrans_[0].dimensions()/dimTime/dimVolume, - 0.0 + rhoTrans_[0].dimensions()/dimTime/dimVolume, Zero ) ) ); @@ -252,7 +248,7 @@ Foam::ReactingCloud<CloudType>::Srho(volScalarField& rho) const false ), this->mesh(), - dimensionedScalar("zero", dimMass/dimTime/dimVolume, 0.0) + dimensionedScalar(dimMass/dimTime/dimVolume, Zero) ) ); diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C index 85e26f49dbe9a6367d5be2f2425583f040c60c85..8a45c08ed241fc9bc7458d1e9e3df3afa54c6fc5 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C @@ -68,7 +68,7 @@ void Foam::ThermoCloud<CloudType>::setModels() IOobject::AUTO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimArea, 0.0) + dimensionedScalar(dimArea, Zero) ) ); @@ -85,7 +85,7 @@ void Foam::ThermoCloud<CloudType>::setModels() IOobject::AUTO_WRITE ), this->mesh(), - dimensionedScalar("zero", pow4(dimTemperature), 0.0) + dimensionedScalar(pow4(dimTemperature), Zero) ) ); @@ -102,12 +102,7 @@ void Foam::ThermoCloud<CloudType>::setModels() IOobject::AUTO_WRITE ), this->mesh(), - dimensionedScalar - ( - "zero", - sqr(dimLength)*pow4(dimTemperature), - 0.0 - ) + dimensionedScalar(sqr(dimLength)*pow4(dimTemperature), Zero) ) ); } @@ -173,7 +168,7 @@ Foam::ThermoCloud<CloudType>::ThermoCloud IOobject::AUTO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimEnergy, 0.0) + dimensionedScalar(dimEnergy, Zero) ) ), hsCoeff_ @@ -189,7 +184,7 @@ Foam::ThermoCloud<CloudType>::ThermoCloud IOobject::AUTO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimEnergy/dimTemperature, 0.0) + dimensionedScalar(dimEnergy/dimTemperature, Zero) ) ) { diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H index 66a9b2df9bf1b030726208384fdd0b618342fea6..d681fcf3e66dcec984d84072f6514e0a349e1cb7 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H @@ -276,7 +276,7 @@ inline Foam::tmp<Foam::volScalarField> Foam::ThermoCloud<CloudType>::Ep() const false ), this->mesh(), - dimensionedScalar("zero", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) ); @@ -312,7 +312,7 @@ inline Foam::tmp<Foam::volScalarField> Foam::ThermoCloud<CloudType>::ap() const false ), this->mesh(), - dimensionedScalar("zero", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); @@ -349,7 +349,7 @@ Foam::ThermoCloud<CloudType>::sigmap() const false ), this->mesh(), - dimensionedScalar("zero", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C index 4591d067f38c83560ddbf99b8c845a264b0762a5..dbe243e91a93934851be81262c68ce2aecefa3ad 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C @@ -143,7 +143,7 @@ void Foam::ParticleErosion<CloudType>::preEvolve() IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimVolume, 0.0) + dimensionedScalar(dimVolume, Zero) ) ); } diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.C index 60c9536341e55a94f138496fcf60d4c178e39dc2..08a7d68d8b720e394397489d2df38aeac63ee929 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.C @@ -101,7 +101,7 @@ void Foam::VoidFraction<CloudType>::preEvolve() IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C index 7d6af59b41f463955d028814f8e8d50594735f2a..83e0d7f9474a928e38f55031ce89b9466329eae1 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C @@ -147,7 +147,7 @@ Foam::volScalarField& Foam::LocalInteraction<CloudType>::massEscape() IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("zero", dimMass, 0.0) + dimensionedScalar(dimMass, Zero) ) ); } @@ -176,7 +176,7 @@ Foam::volScalarField& Foam::LocalInteraction<CloudType>::massStick() IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("zero", dimMass, 0.0) + dimensionedScalar(dimMass, Zero) ) ); } diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C index 906c89be7ce4bb25bc53f0564c446e750b92bbce..7f45192a44bde6e23a4d067a25b0fbc1e358e26e 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C @@ -151,7 +151,7 @@ bool Foam::AveragingMethod<Type>::write(const bool valid) const mesh_ ), mesh_, - dimensioned<Type>("zero", dimless, Zero) + dimensioned<Type>(dimless, Zero) ); GeometricField<TypeGrad, fvPatchField, volMesh> cellGrad ( @@ -162,7 +162,7 @@ bool Foam::AveragingMethod<Type>::write(const bool valid) const mesh_ ), mesh_, - dimensioned<TypeGrad>("zero", dimless, Zero) + dimensioned<TypeGrad>(dimless, Zero) ); GeometricField<Type, pointPatchField, pointMesh> pointValue ( @@ -173,7 +173,7 @@ bool Foam::AveragingMethod<Type>::write(const bool valid) const mesh_ ), pointMesh_, - dimensioned<Type>("zero", dimless, Zero) + dimensioned<Type>(dimless, Zero) ); GeometricField<TypeGrad, pointPatchField, pointMesh> pointGrad ( @@ -184,7 +184,7 @@ bool Foam::AveragingMethod<Type>::write(const bool valid) const mesh_ ), pointMesh_, - dimensioned<TypeGrad>("zero", dimless, Zero) + dimensioned<TypeGrad>(dimless, Zero) ); // Barycentric coordinates of the tet vertices diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C index 49258aeda08c065687e0fd22e23ff8fb59c3df57..3adfabb39bbfc953e3ac11a3ecce4ab9a4a72fba 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C @@ -77,7 +77,7 @@ void Foam::AveragingMethods::Basic<Type>::updateGrad() false ), this->mesh_, - dimensioned<Type>("zero", dimless, Zero), + dimensioned<Type>(dimless, Zero), zeroGradientFvPatchField<Type>::typeName ); tempData.primitiveFieldRef() = data_; diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C index 0f65a817d7f9047701052a5b4ad67fdc4d5a6fcf..e819c7fc9e9f4191d0bc81acae178eb5f7f809a7 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C @@ -53,7 +53,7 @@ Foam::PackingModels::Implicit<CloudType>::Implicit IOobject::NO_WRITE ), this->owner().mesh(), - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ), phiCorrect_(nullptr), @@ -147,7 +147,7 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store) IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimDensity, 0), + dimensionedScalar(dimDensity, Zero), zeroGradientFvPatchField<scalar>::typeName ); rho.primitiveFieldRef() = max(rhoAverage.primitiveField(), rhoMin_); @@ -168,7 +168,7 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store) IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimPressure, 0), + dimensionedScalar(dimPressure, Zero), zeroGradientFvPatchField<scalar>::typeName ); @@ -253,7 +253,7 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store) IOobject::NO_WRITE ), mesh, - dimensionedVector("zero", dimVelocity, Zero), + dimensionedVector(dimVelocity, Zero), fixedValueFvPatchField<vector>::typeName ); U.primitiveFieldRef() = uAverage.primitiveField(); diff --git a/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C b/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C index bf3a35272bd489105f436f38b01e1661bee706f0..5531ae9819ccaa8df5f230139b74dd4b52894ae3 100644 --- a/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C +++ b/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C @@ -84,7 +84,7 @@ Foam::radiation::cloudAbsorptionEmission::aDisp(const label) const false ), mesh_, - dimensionedScalar("a", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); @@ -105,25 +105,20 @@ Foam::radiation::cloudAbsorptionEmission::aDisp(const label) const Foam::tmp<Foam::volScalarField> Foam::radiation::cloudAbsorptionEmission::eDisp(const label bandI) const { - tmp<volScalarField> te + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "e", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "e", + mesh_.time().timeName(), mesh_, - dimensionedScalar("e", dimless/dimLength, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh_, + dimensionedScalar(dimless/dimLength, Zero) ); - - return te; } @@ -144,7 +139,7 @@ Foam::radiation::cloudAbsorptionEmission::EDisp(const label bandI) const false ), mesh_, - dimensionedScalar("E", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) ); diff --git a/src/lagrangian/intermediate/submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.C b/src/lagrangian/intermediate/submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.C index 0f88407b4e7b5cbd332e40e0426978a2200f9046..032ab359fe0c2fa9189b3c88121d953a92405748 100644 --- a/src/lagrangian/intermediate/submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.C +++ b/src/lagrangian/intermediate/submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.C @@ -84,7 +84,7 @@ Foam::radiation::cloudScatter::sigmaEff() const false ), mesh_, - dimensionedScalar("zero", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H index 590d7494fec06c8bf67e2c64b0bc4e7ebdbcd066..4078838e21d644d4cefb85a87f2c00811035e1ba 100644 --- a/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H +++ b/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H @@ -195,20 +195,17 @@ Info << " Creating total velocity field" << endl; volVectorField totalVelocity - ( IOobject ( - - "velocity_total", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - + "velocity_total", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE ), mesh, - dimensionedVector("zero", dimVelocity, Zero) + dimensionedVector(dimVelocity, Zero) ); /*---------------------------------------------------------------------------*\ diff --git a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C index f617d649d60c3d8f91fc9d529512b80f61660ee9..75ac38510f027e2c11921d1be1e446657859e01c 100644 --- a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C +++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C @@ -1224,7 +1224,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover false ), pMesh(), - dimensionedVector("dispVec", dimLength, Zero) + dimensionedVector(dimLength, Zero) ), medialRatio_ ( @@ -1238,7 +1238,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover false ), pMesh(), - dimensionedScalar("medialRatio", dimless, 0.0) + dimensionedScalar(dimless, Zero) ), medialDist_ ( @@ -1252,7 +1252,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover false ), pMesh(), - dimensionedScalar("pointMedialDist", dimLength, 0.0) + dimensionedScalar(dimLength, Zero) ), medialVec_ ( @@ -1266,7 +1266,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover false ), pMesh(), - dimensionedVector("medialVec", dimLength, Zero) + dimensionedVector(dimLength, Zero) ) { update(dict); diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C index d8393007db0cf0cbe58b331597b1908191c111a2..4d9804d53ad8b5e66c512def6c4c532fba0bf5e4 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C @@ -1693,24 +1693,20 @@ Foam::tmp<Foam::pointVectorField> Foam::meshRefinement::makeDisplacementField // Note: time().timeName() instead of meshRefinement::timeName() since // postprocessable field. - tmp<pointVectorField> tfld + return tmp<pointVectorField>::New ( - new pointVectorField + IOobject ( - IOobject - ( - "pointDisplacement", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - pMesh, - dimensionedVector("displacement", dimLength, Zero), - patchFieldTypes - ) + "pointDisplacement", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + pMesh, + dimensionedVector(dimLength, Zero), + patchFieldTypes ); - return tfld; } @@ -2878,7 +2874,7 @@ void Foam::meshRefinement::dumpRefinementLevel() const false ), mesh_, - dimensionedScalar("zero", dimless, 0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); @@ -2908,7 +2904,7 @@ void Foam::meshRefinement::dumpRefinementLevel() const false ), pMesh, - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ); const labelList& pointLevel = meshCutter_.pointLevel(); diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C index 16115116a664ff14721717ab9ba72cf9be02b14e..53a618a454a9926bb41bd29e89d724ebb5764a13 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C @@ -2725,7 +2725,7 @@ void Foam::meshRefinement::zonify false ), mesh_, - dimensionedScalar("zero", dimless, 0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C index 1f052776fe5abaf20d5879d9d607f858c708032e..116de1f724234e0a1d07e6a286bdb9dfd84ca72f 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C @@ -1153,25 +1153,22 @@ Foam::snappyLayerDriver::makeLayerDisplacementField // Note: time().timeName() instead of meshRefinement::timeName() since // postprocessable field. - tmp<pointVectorField> tfld + + return tmp<pointVectorField>::New ( - new pointVectorField + IOobject ( - IOobject - ( - "pointDisplacement", - mesh.time().timeName(), - mesh, + "pointDisplacement", + mesh.time().timeName(), + mesh, IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - pMesh, - dimensionedVector("displacement", dimLength, Zero), - patchFieldTypes, - actualPatchTypes - ) + IOobject::AUTO_WRITE + ), + pMesh, + dimensionedVector(dimLength, Zero), + patchFieldTypes, + actualPatchTypes ); - return tfld; } @@ -3038,7 +3035,7 @@ bool Foam::snappyLayerDriver::writeLayerData false ), mesh, - dimensionedScalar("zero", dimless, 0), + dimensionedScalar(dimless, Zero), fixedValueFvPatchScalarField::typeName ); forAll(fld, celli) @@ -3078,7 +3075,7 @@ bool Foam::snappyLayerDriver::writeLayerData false ), mesh, - dimensionedScalar("zero", dimless, 0), + dimensionedScalar(dimless, Zero), fixedValueFvPatchScalarField::typeName ); volScalarField::Boundary& fldBf = fld.boundaryFieldRef(); @@ -3106,7 +3103,7 @@ bool Foam::snappyLayerDriver::writeLayerData false ), mesh, - dimensionedScalar("zero", dimless, 0), + dimensionedScalar(dimless, Zero), fixedValueFvPatchScalarField::typeName ); volScalarField::Boundary& fldBf = fld.boundaryFieldRef(); diff --git a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C index 8d7db020fee77c04997add1609a110047e1dae71..552f43a00ad8e3086f08e6044a90bff7e2ce58d7 100644 --- a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C +++ b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C @@ -680,7 +680,7 @@ Foam::cellCellStencils::cellVolumeWeight::cellVolumeWeight false ), mesh_, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ) { @@ -987,7 +987,7 @@ bool Foam::cellCellStencils::cellVolumeWeight::update() false ), mesh_, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); @@ -1012,7 +1012,7 @@ bool Foam::cellCellStencils::cellVolumeWeight::update() false ), mesh_, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); diff --git a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C index eac6cc1fef4bf9bdf90f22db9a9f8a03a2dc9735..04d127c9c8558dde93446629d6e1621da52a5447 100644 --- a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C +++ b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C @@ -1607,7 +1607,7 @@ Foam::cellCellStencils::inverseDistance::inverseDistance false ), mesh_, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ) { @@ -1998,7 +1998,7 @@ bool Foam::cellCellStencils::inverseDistance::update() false ), mesh_, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); diff --git a/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C index b2e3efccd50b3fd5129fae3e263fd3775c79c586..815ab58e67c6387937476d95eed4a5f1ad2c75b5 100644 --- a/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C +++ b/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C @@ -842,7 +842,7 @@ bool Foam::cellCellStencils::trackingInverseDistance::update() false ), mesh_, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); diff --git a/src/overset/dynamicOversetFvMesh/dynamicOversetFvMesh.C b/src/overset/dynamicOversetFvMesh/dynamicOversetFvMesh.C index c06350e2550a4f55238fd59b3d3a8da55f71f392..0dfea244b77fc80c21b336d506f6a6d1433be7d2 100644 --- a/src/overset/dynamicOversetFvMesh/dynamicOversetFvMesh.C +++ b/src/overset/dynamicOversetFvMesh/dynamicOversetFvMesh.C @@ -313,7 +313,7 @@ bool Foam::dynamicOversetFvMesh::writeObject false ), *this, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); @@ -337,7 +337,7 @@ bool Foam::dynamicOversetFvMesh::writeObject false ), *this, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); diff --git a/src/overset/include/createCellMask.H b/src/overset/include/createCellMask.H index 1351e1738fa6099b8817af9e6363c6a7f3acbf1e..25269d0ae4e5df5f4840f0cce31d210377c3c2ab 100644 --- a/src/overset/include/createCellMask.H +++ b/src/overset/include/createCellMask.H @@ -44,7 +44,7 @@ volScalarField cellMask IOobject::NO_WRITE ), mesh, - dimensionedScalar("cellMask", dimless, 1.0), + dimensionedScalar("one", dimless, 1.0), zeroGradientFvPatchScalarField::typeName ); diff --git a/src/overset/include/createInterpolatedCells.H b/src/overset/include/createInterpolatedCells.H index 87b8ebbb4a0893848f93f9fcf7193d9a2e3cc7ea..121203cc718c30ce845977a4344e819d3567f380 100644 --- a/src/overset/include/createInterpolatedCells.H +++ b/src/overset/include/createInterpolatedCells.H @@ -44,7 +44,7 @@ volScalarField interpolatedCells IOobject::NO_WRITE ), mesh, - dimensionedScalar("interpolatedCells", dimless, 1.0), + dimensionedScalar("one", dimless, 1.0), zeroGradientFvPatchScalarField::typeName ); diff --git a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C index 38185bc6aabcf7dd06a493e95c6949c0126252be..b55b35771d031726c1d74b17a7b4632f95b7b131 100644 --- a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C +++ b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C @@ -93,7 +93,7 @@ bool reactingOneDim::read(const dictionary& dict) void reactingOneDim::updateqr() { // Update local qr from coupled qr field - qr_ == dimensionedScalar("zero", qr_.dimensions(), 0.0); + qr_ == dimensionedScalar(qr_.dimensions(), Zero); // Retrieve field from coupled region using mapped boundary conditions qr_.correctBoundaryConditions(); @@ -144,8 +144,8 @@ void reactingOneDim::updateqr() void reactingOneDim::updatePhiGas() { - phiHsGas_ == dimensionedScalar("zero", phiHsGas_.dimensions(), 0.0); - phiGas_ == dimensionedScalar("zero", phiGas_.dimensions(), 0.0); + phiHsGas_ == dimensionedScalar(phiHsGas_.dimensions(), Zero); + phiGas_ == dimensionedScalar(phiGas_.dimensions(), Zero); const speciesTable& gasTable = solidChemistry_->gasTable(); @@ -414,7 +414,7 @@ reactingOneDim::reactingOneDim IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimMass/dimTime, 0.0) + dimensionedScalar(dimMass/dimTime, Zero) ), phiHsGas_ @@ -428,7 +428,7 @@ reactingOneDim::reactingOneDim IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimEnergy/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimTime, Zero) ), chemistryQdot_ @@ -442,7 +442,7 @@ reactingOneDim::reactingOneDim IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0) + dimensionedScalar(dimEnergy/dimTime/dimVolume, Zero) ), qr_ @@ -458,10 +458,10 @@ reactingOneDim::reactingOneDim regionMesh() ), - lostSolidMass_(dimensionedScalar("zero", dimMass, 0.0)), - addedGasMass_(dimensionedScalar("zero", dimMass, 0.0)), + lostSolidMass_(dimensionedScalar(dimMass, Zero)), + addedGasMass_(dimensionedScalar(dimMass, Zero)), totalGasMassFlux_(0.0), - totalHeatRR_(dimensionedScalar("zero", dimEnergy/dimTime, 0.0)), + totalHeatRR_(dimensionedScalar(dimEnergy/dimTime, Zero)), gasHSource_(false), qrHSource_(false), useChemistrySolvers_(true) @@ -514,7 +514,7 @@ reactingOneDim::reactingOneDim IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimMass/dimTime, 0.0) + dimensionedScalar(dimMass/dimTime, Zero) ), phiHsGas_ @@ -528,7 +528,7 @@ reactingOneDim::reactingOneDim IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimEnergy/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimTime, Zero) ), chemistryQdot_ @@ -542,7 +542,7 @@ reactingOneDim::reactingOneDim IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0) + dimensionedScalar(dimEnergy/dimTime/dimVolume, Zero) ), qr_ @@ -558,10 +558,10 @@ reactingOneDim::reactingOneDim regionMesh() ), - lostSolidMass_(dimensionedScalar("zero", dimMass, 0.0)), - addedGasMass_(dimensionedScalar("zero", dimMass, 0.0)), + lostSolidMass_(dimensionedScalar(dimMass, Zero)), + addedGasMass_(dimensionedScalar(dimMass, Zero)), totalGasMassFlux_(0.0), - totalHeatRR_(dimensionedScalar("zero", dimEnergy/dimTime, 0.0)), + totalHeatRR_(dimensionedScalar(dimEnergy/dimTime, Zero)), gasHSource_(false), qrHSource_(false), useChemistrySolvers_(true) diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1D.C b/src/regionModels/regionModel/regionModel1D/regionModel1D.C index 2da4dde3e0d46a7bd21f5f4088b60949ac86aecb..961e62fb11939fd065ec5159ee99af8c77b90442 100644 --- a/src/regionModels/regionModel/regionModel1D/regionModel1D.C +++ b/src/regionModels/regionModel/regionModel1D/regionModel1D.C @@ -53,7 +53,7 @@ void Foam::regionModels::regionModel1D::constructMeshObjects() IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimArea, 0.0) + dimensionedScalar(dimArea, Zero) ) ); } diff --git a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C index 1d68751934077f730c4300bdb5daf3d67992621d..d3559b61f079194cd26878856983bc3104aef6d0 100644 --- a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C +++ b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C @@ -56,7 +56,7 @@ void Foam::regionModels::singleLayerRegion::constructMeshObjects() NO_WRITE ), regionMesh(), - dimensionedVector("zero", dimless, Zero), + dimensionedVector(dimless, Zero), zeroGradientFvPatchField<vector>::typeName ) ); @@ -75,7 +75,7 @@ void Foam::regionModels::singleLayerRegion::constructMeshObjects() NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimArea, 0.0), + dimensionedScalar(dimArea, Zero), zeroGradientFvPatchField<scalar>::typeName ) ); diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C index adf0bf366dbf56e71d79b3c11a3134da1223869c..ea7b5d3c393129c94d7da959f0fa9bdee8253094 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C @@ -87,9 +87,9 @@ void kinematicSingleLayer::resetPrimaryRegionSourceTerms() InfoInFunction << endl; } - rhoSpPrimary_ == dimensionedScalar("zero", rhoSp_.dimensions(), 0.0); - USpPrimary_ == dimensionedVector("zero", USp_.dimensions(), Zero); - pSpPrimary_ == dimensionedScalar("zero", pSp_.dimensions(), 0.0); + rhoSpPrimary_ == dimensionedScalar(rhoSp_.dimensions(), Zero); + USpPrimary_ == dimensionedVector(USp_.dimensions(), Zero); + pSpPrimary_ == dimensionedScalar(pSp_.dimensions(), Zero); } @@ -484,7 +484,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimDensity, 0.0), + dimensionedScalar(dimDensity, Zero), zeroGradientFvPatchScalarField::typeName ), mu_ @@ -498,7 +498,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimPressure*dimTime, 0.0), + dimensionedScalar(dimPressure*dimTime, Zero), zeroGradientFvPatchScalarField::typeName ), sigma_ @@ -512,7 +512,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimMass/sqr(dimTime), 0.0), + dimensionedScalar(dimMass/sqr(dimTime), Zero), zeroGradientFvPatchScalarField::typeName ), @@ -539,7 +539,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ), U_ @@ -591,7 +591,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", delta_.dimensions()*rho_.dimensions(), 0.0), + dimensionedScalar(delta_.dimensions()*rho_.dimensions(), Zero), zeroGradientFvPatchScalarField::typeName ), @@ -606,7 +606,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("0", dimLength*dimMass/dimTime, 0.0) + dimensionedScalar(dimLength*dimMass/dimTime, Zero) ), primaryMassTrans_ @@ -620,7 +620,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimMass, 0.0), + dimensionedScalar(dimMass, Zero), zeroGradientFvPatchScalarField::typeName ), cloudMassTrans_ @@ -634,7 +634,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimMass, 0.0), + dimensionedScalar(dimMass, Zero), zeroGradientFvPatchScalarField::typeName ), cloudDiameterTrans_ @@ -648,7 +648,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimLength, -1.0), + dimensionedScalar("minus1", dimLength, -1.0), zeroGradientFvPatchScalarField::typeName ), @@ -663,10 +663,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedVector - ( - "zero", dimMass*dimVelocity/dimArea/dimTime, Zero - ), + dimensionedVector(dimMass*dimVelocity/dimArea/dimTime, Zero), this->mappedPushedFieldPatchTypes<vector>() ), pSp_ @@ -680,7 +677,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimPressure, 0.0), + dimensionedScalar(dimPressure, Zero), this->mappedPushedFieldPatchTypes<scalar>() ), rhoSp_ @@ -694,7 +691,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimMass/dimTime/dimArea, 0.0), + dimensionedScalar(dimMass/dimTime/dimArea, Zero), this->mappedPushedFieldPatchTypes<scalar>() ), @@ -709,7 +706,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), primaryMesh(), - dimensionedVector("zero", USp_.dimensions(), Zero) + dimensionedVector(USp_.dimensions(), Zero) ), pSpPrimary_ ( @@ -722,7 +719,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), primaryMesh(), - dimensionedScalar("zero", pSp_.dimensions(), 0.0) + dimensionedScalar(pSp_.dimensions(), Zero) ), rhoSpPrimary_ ( @@ -735,7 +732,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), primaryMesh(), - dimensionedScalar("zero", rhoSp_.dimensions(), 0.0) + dimensionedScalar(rhoSp_.dimensions(), Zero) ), UPrimary_ @@ -749,7 +746,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedVector("zero", dimVelocity, Zero), + dimensionedVector(dimVelocity, Zero), this->mappedFieldAndInternalPatchTypes<vector>() ), pPrimary_ @@ -763,7 +760,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimPressure, 0.0), + dimensionedScalar(dimPressure, Zero), this->mappedFieldAndInternalPatchTypes<scalar>() ), rhoPrimary_ @@ -777,7 +774,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimDensity, 0.0), + dimensionedScalar(dimDensity, Zero), this->mappedFieldAndInternalPatchTypes<scalar>() ), muPrimary_ @@ -791,7 +788,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimPressure*dimTime, 0.0), + dimensionedScalar(dimPressure*dimTime, Zero), this->mappedFieldAndInternalPatchTypes<scalar>() ), @@ -895,9 +892,9 @@ void kinematicSingleLayer::preEvolveRegion() // Reset transfer fields //availableMass_ = mass(); availableMass_ = netMass(); - cloudMassTrans_ == dimensionedScalar("zero", dimMass, 0.0); - cloudDiameterTrans_ == dimensionedScalar("zero", dimLength, 0.0); - primaryMassTrans_ == dimensionedScalar("zero", dimMass, 0.0); + cloudMassTrans_ == dimensionedScalar(dimMass, Zero); + cloudDiameterTrans_ == dimensionedScalar(dimLength, Zero); + primaryMassTrans_ == dimensionedScalar(dimMass, Zero); } @@ -1116,22 +1113,19 @@ void kinematicSingleLayer::info() tmp<volScalarField::Internal> kinematicSingleLayer::Srho() const { - return tmp<volScalarField::Internal> + return tmp<volScalarField::Internal>::New ( - new volScalarField::Internal + IOobject ( - IOobject - ( - typeName + ":Srho", - time().timeName(), - primaryMesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + typeName + ":Srho", + time().timeName(), primaryMesh(), - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + primaryMesh(), + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ); } @@ -1141,44 +1135,38 @@ tmp<volScalarField::Internal> kinematicSingleLayer::Srho const label i ) const { - return tmp<volScalarField::Internal> + return tmp<volScalarField::Internal>::New ( - new volScalarField::Internal + IOobject ( - IOobject - ( - typeName + ":Srho(" + Foam::name(i) + ")", - time().timeName(), - primaryMesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + typeName + ":Srho(" + Foam::name(i) + ")", + time().timeName(), primaryMesh(), - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + primaryMesh(), + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ); } tmp<volScalarField::Internal> kinematicSingleLayer::Sh() const { - return tmp<volScalarField::Internal> + return tmp<volScalarField::Internal>::New ( - new volScalarField::Internal + IOobject ( - IOobject - ( - typeName + ":Sh", - time().timeName(), - primaryMesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + typeName + ":Sh", + time().timeName(), primaryMesh(), - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + primaryMesh(), + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ); } diff --git a/src/regionModels/surfaceFilmModels/noFilm/noFilm.C b/src/regionModels/surfaceFilmModels/noFilm/noFilm.C index 1669431b2da647665ff0a6353e68a5bf9d411e22..6844942c31468cbaef052a2eff6701faad37a085 100644 --- a/src/regionModels/surfaceFilmModels/noFilm/noFilm.C +++ b/src/regionModels/surfaceFilmModels/noFilm/noFilm.C @@ -72,66 +72,57 @@ Foam::scalar noFilm::CourantNumber() const tmp<volScalarField::Internal> noFilm::Srho() const { - return tmp<volScalarField::Internal> + return tmp<volScalarField::Internal>::New ( - new volScalarField::Internal + IOobject ( - IOobject - ( - "noFilm::Srho", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noFilm::Srho", + mesh_.time().timeName(), mesh_, - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh_, + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ); } tmp<volScalarField::Internal> noFilm::Srho(const label i) const { - return tmp<volScalarField::Internal> + return tmp<volScalarField::Internal>::New ( - new volScalarField::Internal + IOobject ( - IOobject - ( - "noFilm::Srho(" + Foam::name(i) + ")", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noFilm::Srho(" + Foam::name(i) + ")", + mesh_.time().timeName(), mesh_, - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh_, + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ); } tmp<volScalarField::Internal> noFilm::Sh() const { - return tmp<volScalarField::Internal> + return tmp<volScalarField::Internal>::New ( - new volScalarField::Internal + IOobject ( - IOobject - ( - "noFilm::Sh", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noFilm::Sh", + mesh_.time().timeName(), mesh_, - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh_, + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ); } diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/constantFilmThermo/constantFilmThermo.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/constantFilmThermo/constantFilmThermo.C index 05a6a92458d8176f6cd445ffad394876067a1271..ce5735a6e1522f8ba3ce5842781c080efbee64a9 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/constantFilmThermo/constantFilmThermo.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/constantFilmThermo/constantFilmThermo.C @@ -270,7 +270,7 @@ tmp<volScalarField> constantFilmThermo::rho() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimDensity, 0.0), + dimensionedScalar(dimDensity, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -297,7 +297,7 @@ tmp<volScalarField> constantFilmThermo::mu() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimPressure*dimTime, 0.0), + dimensionedScalar(dimPressure*dimTime, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -324,7 +324,7 @@ tmp<volScalarField> constantFilmThermo::sigma() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimMass/sqr(dimTime), 0.0), + dimensionedScalar(dimMass/sqr(dimTime), Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -351,7 +351,7 @@ tmp<volScalarField> constantFilmThermo::Cp() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimEnergy/dimMass/dimTemperature, 0.0), + dimensionedScalar(dimEnergy/dimMass/dimTemperature, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -378,7 +378,7 @@ tmp<volScalarField> constantFilmThermo::kappa() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimPower/dimLength/dimTemperature, 0.0), + dimensionedScalar(dimPower/dimLength/dimTemperature, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C index fd43ba81e9b81cf901f9dab163b4aa3ca1079a14..b210d1aa6db2ca70b2c4ee8c5e7316f748f25cb0 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C @@ -251,7 +251,7 @@ tmp<volScalarField> liquidFilmThermo::rho() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimDensity, 0.0), + dimensionedScalar(dimDensity, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -296,7 +296,7 @@ tmp<volScalarField> liquidFilmThermo::mu() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimPressure*dimTime, 0.0), + dimensionedScalar(dimPressure*dimTime, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -341,7 +341,7 @@ tmp<volScalarField> liquidFilmThermo::sigma() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimMass/sqr(dimTime), 0.0), + dimensionedScalar(dimMass/sqr(dimTime), Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -386,7 +386,7 @@ tmp<volScalarField> liquidFilmThermo::Cp() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimEnergy/dimMass/dimTemperature, 0.0), + dimensionedScalar(dimEnergy/dimMass/dimTemperature, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -431,7 +431,7 @@ tmp<volScalarField> liquidFilmThermo::kappa() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimPower/dimLength/dimTemperature, 0.0), + dimensionedScalar(dimPower/dimLength/dimTemperature, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C index 11168b00282763516a1a627f3874e81e30c911ec..d70b50c7102ad2f47f40e335b8fe72f6e02b8ab5 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C @@ -83,7 +83,7 @@ tmp<volVectorField> laminar::Us() const IOobject::NO_WRITE ), filmModel_.regionMesh(), - dimensionedVector("zero", dimVelocity, Zero), + dimensionedVector(dimVelocity, Zero), extrapolatedCalculatedFvPatchVectorField::typeName ) ); @@ -98,21 +98,18 @@ tmp<volVectorField> laminar::Us() const tmp<volScalarField> laminar::mut() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - typeName + ":mut", - filmModel_.regionMesh().time().timeName(), - filmModel_.regionMesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + typeName + ":mut", + filmModel_.regionMesh().time().timeName(), filmModel_.regionMesh(), - dimensionedScalar("zero", dimMass/dimLength/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + filmModel_.regionMesh(), + dimensionedScalar(dimMass/dimLength/dimTime, Zero) ); } diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C index 8750cfbd84bfcd5d8bbdecdf75e58cddbf201101..2d8f8e76f8e8c5d01ce49bedb8da765edda1bbd7 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C @@ -142,7 +142,7 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U) IOobject::NO_WRITE ), filmModel_.regionMesh(), - dimensionedVector("zero", dimForce/dimArea, Zero) + dimensionedVector(dimForce/dimArea, Zero) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/distribution/distributionContactAngleForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/distribution/distributionContactAngleForce.C index 842fb3a6bfff517efaefa953c4f7b217d55fc2d2..02b31643a608574441b1b27e9de2195014f99a6d 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/distribution/distributionContactAngleForce.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/distribution/distributionContactAngleForce.C @@ -83,7 +83,7 @@ tmp<volScalarField> distributionContactAngleForce::theta() const filmModel_.regionMesh() ), filmModel_.regionMesh(), - dimensionedScalar("0", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/perturbedTemperatureDependent/perturbedTemperatureDependentContactAngleForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/perturbedTemperatureDependent/perturbedTemperatureDependentContactAngleForce.C index 5aaf1d6886b8ee512f0cba43ed7035771a5e07a2..7e416b3a1c4c35fbe1c38d826c04c114b943e681 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/perturbedTemperatureDependent/perturbedTemperatureDependentContactAngleForce.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/perturbedTemperatureDependent/perturbedTemperatureDependentContactAngleForce.C @@ -92,7 +92,7 @@ perturbedTemperatureDependentContactAngleForce::theta() const filmModel_.regionMesh() ), filmModel_.regionMesh(), - dimensionedScalar("0", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.C index b3cc459a0ad8dd1e59162d89a33587dcebd7b12b..7a547947c5a3ad2a3d3da6fe100ed2a78aa40064 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.C @@ -80,7 +80,7 @@ tmp<volScalarField> temperatureDependentContactAngleForce::theta() const filmModel_.regionMesh() ), filmModel_.regionMesh(), - dimensionedScalar("0", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C index 5f8f6a86a07b04daa2554f916bc85ef24103479b..7ea255e4194cd03ecf05ef8a2710ef09857ba52c 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C @@ -204,7 +204,7 @@ tmp<scalarField> curvatureSeparation::calcCosAngle IOobject::NO_READ ), mesh, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); volCosAngle.primitiveFieldRef() = cosAngle; @@ -346,7 +346,7 @@ void curvatureSeparation::correct IOobject::NO_READ ), mesh, - dimensionedScalar("zero", dimForce, 0.0), + dimensionedScalar(dimForce, Zero), zeroGradientFvPatchScalarField::typeName ); volFnet.primitiveFieldRef() = Fnet; diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C index 1d76dad3c6834f57f40774d6a3e375287d6cd2eb..1dee50801d23aef9a3ce0d61d5bdc3a086703f84 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C @@ -116,7 +116,7 @@ tmp<volScalarField> constantRadiation::Shs() IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.C index 0c64201d1cd3073c8b946d2f9f95f80f7a1d67f3..49ecaad671d3e303daa897e53f32b739e6256668 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.C @@ -73,21 +73,18 @@ void noRadiation::correct() tmp<volScalarField> noRadiation::Shs() { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - typeName + ":Shs", - film().time().timeName(), - film().regionMesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + typeName + ":Shs", + film().time().timeName(), film().regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + film().regionMesh(), + dimensionedScalar(dimMass/pow3(dimTime), Zero) ); } diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C index fb1fdd6a8c7752d1299ce8f49c2eaf3bdfb888d3..11a0beb5fe9ebaa0b3dae2c65e7eb14b503e50dc 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C @@ -67,7 +67,7 @@ primaryRadiation::primaryRadiation IOobject::NO_WRITE ), film.regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0), + dimensionedScalar(dimMass/pow3(dimTime), Zero), film.mappedPushedFieldPatchTypes<scalar>() ) {} @@ -103,7 +103,7 @@ tmp<volScalarField> primaryRadiation::Shs() IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C index b8e8390d4ad21e87e9dad2bf0ddb8b0ff3f10d46..c64c2f5abebff9f2066bd0d21863fa191a95713b 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C @@ -68,7 +68,7 @@ standardRadiation::standardRadiation IOobject::NO_WRITE ), film.regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0), + dimensionedScalar(dimMass/pow3(dimTime), Zero), film.mappedPushedFieldPatchTypes<scalar>() ), qrNet_ @@ -82,7 +82,7 @@ standardRadiation::standardRadiation IOobject::NO_WRITE ), film.regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0), + dimensionedScalar(dimMass/pow3(dimTime), Zero), zeroGradientFvPatchScalarField::typeName ), beta_(readScalar(coeffDict_.lookup("beta"))), @@ -120,7 +120,7 @@ tmp<volScalarField> standardRadiation::Shs() IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmViscosityModel/thixotropicViscosity/thixotropicViscosity.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmViscosityModel/thixotropicViscosity/thixotropicViscosity.C index 4087f833f4f8f726ac435571de19fa9851aafdd2..d4c08e9b98e009da20af72b27746a8eada5a18fa 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmViscosityModel/thixotropicViscosity/thixotropicViscosity.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmViscosityModel/thixotropicViscosity/thixotropicViscosity.C @@ -141,7 +141,7 @@ void thixotropicViscosity::correct const volScalarField deltaMass ( "thixotropicViscosity:deltaMass", - max(dimensionedScalar("zero", dimMass, 0), film.deltaMass()) + max(dimensionedScalar(dimMass, Zero), film.deltaMass()) ); fvScalarMatrix lambdaEqn diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.C b/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.C index 5b2b7ab82ea6e4728b716012f4a9f261d7d3c597..8e9f8a074b4cf2f7636211aa8e2b1fea14bae02d 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.C @@ -80,7 +80,7 @@ mappedConvectiveHeatTransfer::mappedConvectiveHeatTransfer IOobject::NO_WRITE ), film.regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime)/dimTemperature, 0.0), + dimensionedScalar(dimMass/pow3(dimTime)/dimTemperature, Zero), film.mappedPushedFieldPatchTypes<scalar>() ) { diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C index b4ff36124bd72ba4c6a78edd549dd1fd473f4db3..46e9f4b77daf871c7f545747bdd091c26a63d3ed 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C @@ -82,7 +82,7 @@ solidification::solidification IOobject::AUTO_WRITE ), film.regionMesh(), - dimensionedScalar("zero", dimMass, 0.0), + dimensionedScalar(dimMass, Zero), zeroGradientFvPatchScalarField::typeName ), thickness_ @@ -96,7 +96,7 @@ solidification::solidification IOobject::AUTO_WRITE ), film.regionMesh(), - dimensionedScalar("zero", dimLength, 0.0), + dimensionedScalar(dimLength, Zero), zeroGradientFvPatchScalarField::typeName ) {} diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index 72d4e767814707db2a079509048cae0cfd6fdba2..fd9c58350f391b5dd2e12da1c002b342274cc497 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -96,7 +96,7 @@ void thermoSingleLayer::resetPrimaryRegionSourceTerms() kinematicSingleLayer::resetPrimaryRegionSourceTerms(); - hsSpPrimary_ == dimensionedScalar("zero", hsSp_.dimensions(), 0.0); + hsSpPrimary_ == dimensionedScalar(hsSp_.dimensions(), Zero); } @@ -341,7 +341,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("Cp", dimEnergy/dimMass/dimTemperature, 0.0), + dimensionedScalar(dimEnergy/dimMass/dimTemperature, Zero), zeroGradientFvPatchScalarField::typeName ), kappa_ @@ -355,12 +355,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar - ( - "kappa", - dimEnergy/dimTime/dimLength/dimTemperature, - 0.0 - ), + dimensionedScalar(dimEnergy/dimTime/dimLength/dimTemperature, Zero), zeroGradientFvPatchScalarField::typeName ), @@ -413,7 +408,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimEnergy/dimMass, 0.0), + dimensionedScalar(dimEnergy/dimMass, Zero), hsBoundaryTypes() ), @@ -428,7 +423,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimEnergy, 0), + dimensionedScalar(dimEnergy, Zero), zeroGradientFvPatchScalarField::typeName ), @@ -448,7 +443,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimEnergy/dimArea/dimTime, 0.0), + dimensionedScalar(dimEnergy/dimArea/dimTime, Zero), this->mappedPushedFieldPatchTypes<scalar>() ), @@ -463,7 +458,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::NO_WRITE ), primaryMesh(), - dimensionedScalar("zero", hsSp_.dimensions(), 0.0) + dimensionedScalar(hsSp_.dimensions(), Zero) ), TPrimary_ @@ -477,7 +472,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimTemperature, 0.0), + dimensionedScalar(dimTemperature, Zero), this->mappedFieldAndInternalPatchTypes<scalar>() ), @@ -527,7 +522,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), pSp_.boundaryField().types() ) ); @@ -620,7 +615,7 @@ void thermoSingleLayer::preEvolveRegion() } kinematicSingleLayer::preEvolveRegion(); - primaryEnergyTrans_ == dimensionedScalar("zero", dimEnergy, 0.0); + primaryEnergyTrans_ == dimensionedScalar(dimEnergy, Zero); } @@ -734,7 +729,7 @@ tmp<volScalarField::Internal> thermoSingleLayer::Srho() const false ), primaryMesh(), - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); @@ -786,7 +781,7 @@ tmp<volScalarField::Internal> thermoSingleLayer::Srho false ), primaryMesh(), - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); @@ -836,7 +831,7 @@ tmp<volScalarField::Internal> thermoSingleLayer::Sh() const false ), primaryMesh(), - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); diff --git a/src/regionModels/thermalBaffleModels/noThermo/noThermo.C b/src/regionModels/thermalBaffleModels/noThermo/noThermo.C index 5e982fb62c57b00715de84ed40475a41f5dba740..c877897ffedc040e093187c1e7cf5f820e7b0227 100644 --- a/src/regionModels/thermalBaffleModels/noThermo/noThermo.C +++ b/src/regionModels/thermalBaffleModels/noThermo/noThermo.C @@ -105,7 +105,7 @@ const tmp<volScalarField> noThermo::Cp() const false ), primaryMesh(), - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); } diff --git a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C index ec37bb8cf9305d1b35061d0e804902892adf6bee..fd18fe6ac919077a0b9413a8ec0396beb17c8578 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C @@ -87,7 +87,7 @@ void thermalBaffle::solveEnergy() false ), regionMesh(), - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); @@ -178,12 +178,7 @@ thermalBaffle::thermalBaffle IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar - ( - "zero", - dimEnergy/dimArea/dimTime, - Zero - ) + dimensionedScalar(dimEnergy/dimArea/dimTime, Zero) ), Q_ ( @@ -196,12 +191,7 @@ thermalBaffle::thermalBaffle IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar - ( - "zero", - dimEnergy/dimVolume/dimTime, - Zero - ) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ), radiation_ ( @@ -238,12 +228,7 @@ thermalBaffle::thermalBaffle IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar - ( - "zero", - dimEnergy/dimArea/dimTime, - Zero - ) + dimensionedScalar(dimEnergy/dimArea/dimTime, Zero) ), Q_ ( @@ -256,12 +241,7 @@ thermalBaffle::thermalBaffle IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar - ( - "zero", - dimEnergy/dimVolume/dimTime, - Zero - ) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ), radiation_ ( diff --git a/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C b/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C index 3acf80c9164f5253684ca676eb503a5c9d7096d5..c8f68330cb2b743b69b985f8098d232a4a18fa9c 100644 --- a/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C +++ b/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C @@ -76,7 +76,7 @@ Foam::rigidBodyMeshMotion::bodyMesh::bodyMesh false ), pointMesh::New(mesh), - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) {} diff --git a/src/sampling/sampledSurface/distanceSurface/distanceSurface.C b/src/sampling/sampledSurface/distanceSurface/distanceSurface.C index 242bce5982c4180501cc49b2b4755e9c387cd31c..f4df841a94b4ba5cc89200cff4e4244049ab2d4c 100644 --- a/src/sampling/sampledSurface/distanceSurface/distanceSurface.C +++ b/src/sampling/sampledSurface/distanceSurface/distanceSurface.C @@ -74,7 +74,7 @@ void Foam::distanceSurface::createGeometry() false ), fvm, - dimensionedScalar("zero", dimLength, 0) + dimensionedScalar(dimLength, Zero) ) ); volScalarField& cellDistance = cellDistancePtr_(); @@ -254,7 +254,7 @@ void Foam::distanceSurface::createGeometry() false ), pointMesh::New(fvm), - dimensionedScalar("zero", dimLength, 0) + dimensionedScalar(dimLength, Zero) ); pDist.primitiveFieldRef() = pointDistance_; diff --git a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C index 1d5eaaf38a37e79d9ff999ab36d1375692a55580..7badfa488522c91dfa946f770d02bbc1f8a8a17d 100644 --- a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C +++ b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C @@ -114,7 +114,7 @@ void Foam::sampledCuttingPlane::createGeometry() false ), mesh, - dimensionedScalar(dimLength) + dimensionedScalar(dimLength, Zero) ) ); volScalarField& cellDistance = cellDistancePtr_(); @@ -212,7 +212,7 @@ void Foam::sampledCuttingPlane::createGeometry() false ), pointMesh::New(mesh), - dimensionedScalar(dimLength) + dimensionedScalar(dimLength, Zero) ); pDist.primitiveFieldRef() = pointDistance_; diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C b/src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C index 1759583596aa050949cfcac7689eaa5fa4d32207..7fa74050097680ac0d396a3137847e65933b2d57 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C @@ -174,7 +174,7 @@ Foam::sampledSurface::pointAverage false ), mesh, - dimensioned<Type>("zero", dimless, Zero) + dimensioned<Type>(dimless, Zero) ) ); GeometricField<Type, fvPatchField, volMesh>& cellAvg = tcellAvg.ref(); diff --git a/src/sampling/surfMeshSampler/surfMeshSampler/surfMeshSamplerTemplates.C b/src/sampling/surfMeshSampler/surfMeshSampler/surfMeshSamplerTemplates.C index bde5add16a3517f7092d0ac8a3dbf8fb426bf733..deb77a8f273797963dcd0cc3e2eb585b098db470 100644 --- a/src/sampling/surfMeshSampler/surfMeshSampler/surfMeshSamplerTemplates.C +++ b/src/sampling/surfMeshSampler/surfMeshSampler/surfMeshSamplerTemplates.C @@ -54,7 +54,7 @@ Foam::surfMeshSampler::getOrCreateSurfField IOobject::NO_WRITE ), surf, - dimensioned<Type>("0", vField.dimensions(), Zero) + dimensioned<Type>(vField.dimensions(), Zero) ); ptr->writeOpt() = IOobject::NO_WRITE; diff --git a/src/sampling/surface/triSurfaceMesh/discreteSurfaceTemplates.C b/src/sampling/surface/triSurfaceMesh/discreteSurfaceTemplates.C index c046d1e4886c6ea34e8b0cf5091217f68ab687fe..2fed330e657f73a4c174a127132c6651f2a19c40 100644 --- a/src/sampling/surface/triSurfaceMesh/discreteSurfaceTemplates.C +++ b/src/sampling/surface/triSurfaceMesh/discreteSurfaceTemplates.C @@ -67,7 +67,7 @@ bool Foam::discreteSurface::sampleType IOobject::NO_WRITE ), surf, - dimensioned<Type>("0", fld.dimensions(), Zero) + dimensioned<Type>(fld.dimensions(), Zero) ); ptr->writeOpt() = IOobject::NO_WRITE; diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C index bdc81f1273059e51b22b28b9697ef91e970f81f6..76f65c6693c4b4d7a2cff0e0c13db9402857b53e 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C @@ -100,7 +100,7 @@ Foam::sixDoFRigidBodyMotionSolver::sixDoFRigidBodyMotionSolver false ), pointMesh::New(mesh), - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ), curTimeIndex_(-1) { diff --git a/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModel.C b/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModel.C index e6d61507e634842eacc019ebec108bd7ca200abf..f3ef1e69f66ba8900864173a52cbe2b7e3ca8112 100644 --- a/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModel.C +++ b/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModel.C @@ -55,7 +55,7 @@ Foam::barotropicCompressibilityModel::barotropicCompressibilityModel gamma.mesh() ), gamma.mesh(), - dimensionedScalar(psiName, dimensionSet(0, -2, 2, 0, 0), 0) + dimensionedScalar(dimensionSet(0, -2, 2, 0, 0), Zero) ), gamma_(gamma) {} diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C index 36492a072f0ff53f5f3c44ef1e99bfa6a41582ef..b7dd06710e1301f49fa0efb919646f724942e167 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C @@ -61,7 +61,7 @@ Foam::TDACChemistryModel<CompType, ThermoType>::TDACChemistryModel IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("0", dimless, 0) + dimensionedScalar(dimless, Zero) ) { basicMultiComponentMixture& composition = this->thermo().composition(); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C index fe401093c71d847623b850bbb18a256d46a571ec..e202aa2399a355ce05bae942ca4c7496d3370e2b 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C @@ -74,7 +74,7 @@ Foam::chemistryModel<CompType, ThermoType>::chemistryModel IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); } @@ -476,7 +476,7 @@ Foam::chemistryModel<CompType, ThermoType>::tc() const false ), this->mesh(), - dimensionedScalar("zero", dimTime, SMALL), + dimensionedScalar("small", dimTime, SMALL), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -550,7 +550,7 @@ Foam::chemistryModel<CompType, ThermoType>::Qdot() const false ), this->mesh_, - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); @@ -596,7 +596,7 @@ Foam::chemistryModel<CompType, ThermoType>::calculateRR IOobject::NO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); diff --git a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C index eb4c2c04a0e1fa6c57435ee86542fb375acb4b73..4decd9cf27337c65917b603a5862a9fcc9715a78 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C +++ b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C @@ -124,7 +124,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::Gulders::Su0pTphi false ), p.mesh(), - dimensionedScalar("Su0", dimVelocity, 0.0) + dimensionedScalar(dimVelocity, Zero) ) ); @@ -177,7 +177,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::Gulders::Su0pTphi false ), p.mesh(), - dimensionedScalar("Su0", dimVelocity, 0.0) + dimensionedScalar(dimVelocity, Zero) ) ); diff --git a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C index befd4d0973f6b208bd766bdecfafb6f6c8b6928f..48f9ff392d0c1b9e84e7293d8940a530913cfd45 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C +++ b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C @@ -124,7 +124,7 @@ Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi false ), p.mesh(), - dimensionedScalar("Su0", dimVelocity, 0.0) + dimensionedScalar(dimVelocity, Zero) ) ); @@ -179,7 +179,7 @@ Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi false ), p.mesh(), - dimensionedScalar("Su0", dimVelocity, 0.0) + dimensionedScalar(dimVelocity, Zero) ) ); diff --git a/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C b/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C index 1fff569d9cb929faa02a2a03a82edc975d04ce3e..ecd107189cbe8fc923cf33268dfb59f50aabe92b 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C +++ b/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C @@ -307,7 +307,7 @@ Foam::laminarFlameSpeedModels::RaviPetersen::operator()() const false ), p.mesh(), - dimensionedScalar("EqR", dimless, 0.0) + dimensionedScalar(dimless, Zero) ); if (psiuReactionThermo_.composition().contains("ft")) @@ -339,7 +339,7 @@ Foam::laminarFlameSpeedModels::RaviPetersen::operator()() const false ), p.mesh(), - dimensionedScalar("Su0", dimVelocity, 0.0) + dimensionedScalar(dimVelocity, Zero) ) ); diff --git a/src/thermophysicalModels/radiation/radiationModels/P1/P1.C b/src/thermophysicalModels/radiation/radiationModels/P1/P1.C index edb306e321ac509cb2bf372f4efd6454b8e9086d..62dbcf22e24cefc476ba17a34ceb54d671b931f6 100644 --- a/src/thermophysicalModels/radiation/radiationModels/P1/P1.C +++ b/src/thermophysicalModels/radiation/radiationModels/P1/P1.C @@ -73,7 +73,7 @@ Foam::radiation::P1::P1(const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), a_ ( @@ -86,7 +86,7 @@ Foam::radiation::P1::P1(const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("a", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ), e_ ( @@ -99,7 +99,7 @@ Foam::radiation::P1::P1(const volScalarField& T) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("a", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ), E_ ( @@ -112,7 +112,7 @@ Foam::radiation::P1::P1(const volScalarField& T) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("E", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) {} @@ -143,7 +143,7 @@ Foam::radiation::P1::P1(const dictionary& dict, const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), a_ ( @@ -156,7 +156,7 @@ Foam::radiation::P1::P1(const dictionary& dict, const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("a", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ), e_ ( @@ -169,7 +169,7 @@ Foam::radiation::P1::P1(const dictionary& dict, const volScalarField& T) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("a", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ), E_ ( @@ -182,7 +182,7 @@ Foam::radiation::P1::P1(const dictionary& dict, const volScalarField& T) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("E", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) {} @@ -217,7 +217,7 @@ void Foam::radiation::P1::calculate() E_ = absorptionEmission_->E(); const volScalarField sigmaEff(scatter_->sigmaEff()); - const dimensionedScalar a0 ("a0", a_.dimensions(), ROOTVSMALL); + const dimensionedScalar a0("a0", a_.dimensions(), ROOTVSMALL); // Construct diffusion const volScalarField gamma diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C index fcd820e25210f33a20ec48d69c81b924574107e8..9e746ba18720136366b900802cdbcd7950138783 100644 --- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C +++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C @@ -228,7 +228,7 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("G", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qr_ ( @@ -241,7 +241,7 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qem_ ( @@ -254,7 +254,7 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("qem", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qin_ ( @@ -267,7 +267,7 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qin", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), a_ ( @@ -280,7 +280,7 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("a", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ), nTheta_(readLabel(coeffs_.lookup("nTheta"))), nPhi_(readLabel(coeffs_.lookup("nPhi"))), @@ -321,7 +321,7 @@ Foam::radiation::fvDOM::fvDOM IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("G", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qr_ ( @@ -334,7 +334,7 @@ Foam::radiation::fvDOM::fvDOM IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qem_ ( @@ -347,7 +347,7 @@ Foam::radiation::fvDOM::fvDOM IOobject::NO_WRITE ), mesh_, - dimensionedScalar("qem", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qin_ ( @@ -360,7 +360,7 @@ Foam::radiation::fvDOM::fvDOM IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qin", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), a_ ( @@ -373,7 +373,7 @@ Foam::radiation::fvDOM::fvDOM IOobject::NO_WRITE ), mesh_, - dimensionedScalar("a", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ), nTheta_(readLabel(coeffs_.lookup("nTheta"))), nPhi_(readLabel(coeffs_.lookup("nPhi"))), @@ -507,10 +507,10 @@ void Foam::radiation::fvDOM::updateBlackBodyEmission() void Foam::radiation::fvDOM::updateG() { - G_ = dimensionedScalar("zero",dimMass/pow3(dimTime), 0.0); - qr_ = dimensionedScalar("zero",dimMass/pow3(dimTime), 0.0); - qem_ = dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0); - qin_ = dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0); + G_ = dimensionedScalar(dimMass/pow3(dimTime), Zero); + qr_ = dimensionedScalar(dimMass/pow3(dimTime), Zero); + qem_ = dimensionedScalar(dimMass/pow3(dimTime), Zero); + qin_ = dimensionedScalar(dimMass/pow3(dimTime), Zero); forAll(IRay_, rayI) { diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C b/src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C index 84a70d45e897da379063d732efd99ac2e868d488..813ce53c47fb9d3c1987f38380fbd9d7fa41d7d0 100644 --- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C +++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C @@ -65,7 +65,7 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay IOobject::NO_WRITE ), mesh_, - dimensionedScalar("I", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qr_ ( @@ -78,7 +78,7 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay IOobject::NO_WRITE ), mesh_, - dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qin_ ( @@ -91,7 +91,7 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay IOobject::NO_WRITE ), mesh_, - dimensionedScalar("qin", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qem_ ( @@ -104,7 +104,7 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay IOobject::NO_WRITE ), mesh_, - dimensionedScalar("qem", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), d_(Zero), dAve_(Zero), @@ -295,7 +295,7 @@ Foam::scalar Foam::radiation::radiativeIntensityRay::correct() void Foam::radiation::radiativeIntensityRay::addIntensity() { - I_ = dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0); + I_ = dimensionedScalar(dimMass/pow3(dimTime), Zero); forAll(ILambda_, lambdaI) { diff --git a/src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.C b/src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.C index ccfe900a46370d39e8e204df85141d3418d53e84..b2195ee7bef83defe73a3ffb13086e458fa3ed23 100644 --- a/src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.C +++ b/src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.C @@ -80,25 +80,20 @@ void Foam::radiation::noRadiation::calculate() Foam::tmp<Foam::volScalarField> Foam::radiation::noRadiation::Rp() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "Rp", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "Rp", + mesh_.time().timeName(), mesh_, - dimensionedScalar - ( - "Rp", - constant::physicoChemical::sigma.dimensions()/dimLength, - 0.0 - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar + ( + constant::physicoChemical::sigma.dimensions()/dimLength, Zero ) ); } @@ -107,24 +102,18 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::noRadiation::Rp() const Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>> Foam::radiation::noRadiation::Ru() const { - return tmp<volScalarField::Internal> + return tmp<volScalarField::Internal>::New ( - new volScalarField::Internal + IOobject ( - IOobject - ( - "Ru", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "Ru", + mesh_.time().timeName(), mesh_, - dimensionedScalar - ( - "Ru", dimMass/dimLength/pow3(dimTime), 0.0 - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ); } diff --git a/src/thermophysicalModels/radiation/radiationModels/opaqueSolid/opaqueSolid.C b/src/thermophysicalModels/radiation/radiationModels/opaqueSolid/opaqueSolid.C index 37c0f0e44070938895dabe4349a51ebeeede65c9..c9370409c510a824cbcdbf8bd2b76c37d7a95237 100644 --- a/src/thermophysicalModels/radiation/radiationModels/opaqueSolid/opaqueSolid.C +++ b/src/thermophysicalModels/radiation/radiationModels/opaqueSolid/opaqueSolid.C @@ -81,25 +81,20 @@ void Foam::radiation::opaqueSolid::calculate() Foam::tmp<Foam::volScalarField> Foam::radiation::opaqueSolid::Rp() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "Rp", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "Rp", + mesh_.time().timeName(), mesh_, - dimensionedScalar - ( - "Rp", - constant::physicoChemical::sigma.dimensions()/dimLength, - 0.0 - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar + ( + constant::physicoChemical::sigma.dimensions()/dimLength, Zero ) ); } @@ -108,24 +103,18 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::opaqueSolid::Rp() const Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>> Foam::radiation::opaqueSolid::Ru() const { - return tmp<volScalarField::Internal> + return tmp<volScalarField::Internal>::New ( - new volScalarField::Internal + IOobject ( - IOobject - ( - "Ru", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "Ru", + mesh_.time().timeName(), mesh_, - dimensionedScalar - ( - "Ru", dimMass/dimLength/pow3(dimTime), 0.0 - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ); } diff --git a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C index 4480ea67dde74bab43dff9131d141fc33abf220e..ef90e016bbc77a160e1b7bd983ec93f424a354a2 100644 --- a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C +++ b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C @@ -377,7 +377,7 @@ void Foam::faceShading::calculate() IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); diff --git a/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C b/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C index 0afa37611330eea9672097cb75024c07cfb9cb88..be8ecf3a69c57ffd589c00002d0cba9c87aca749 100644 --- a/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C +++ b/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C @@ -641,7 +641,7 @@ Foam::radiation::solarLoad::solarLoad(const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qsecondRad_ ( @@ -654,7 +654,7 @@ Foam::radiation::solarLoad::solarLoad(const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qsecondRad", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), hitFaces_(), Ru_ @@ -668,7 +668,7 @@ Foam::radiation::solarLoad::solarLoad(const volScalarField& T) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("Ru", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ), solarCalc_(this->subDict(typeName + "Coeffs"), mesh_), verticalDir_(Zero), @@ -731,7 +731,7 @@ Foam::radiation::solarLoad::solarLoad IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qsecondRad_ ( @@ -744,7 +744,7 @@ Foam::radiation::solarLoad::solarLoad IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qsecondRad", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), hitFaces_(), Ru_ @@ -758,7 +758,7 @@ Foam::radiation::solarLoad::solarLoad IOobject::NO_WRITE ), mesh_, - dimensionedScalar("Ru", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ), solarCalc_(coeffs_, mesh_), verticalDir_(Zero), @@ -823,7 +823,7 @@ Foam::radiation::solarLoad::solarLoad IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qsecondRad_ ( @@ -836,7 +836,7 @@ Foam::radiation::solarLoad::solarLoad IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qsecondRad", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), hitFaces_(), Ru_ @@ -850,7 +850,7 @@ Foam::radiation::solarLoad::solarLoad IOobject::NO_WRITE ), mesh_, - dimensionedScalar("Ru", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ), solarCalc_(dict, mesh_), verticalDir_(Zero), @@ -982,26 +982,22 @@ void Foam::radiation::solarLoad::calculate() Foam::tmp<Foam::volScalarField> Foam::radiation::solarLoad::Rp() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "Rp", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "Rp", + mesh_.time().timeName(), mesh_, - dimensionedScalar - ( - "zero", - dimMass/pow3(dimTime)/dimLength/pow4(dimTemperature), - 0.0 - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh_, + dimensionedScalar + ( + dimMass/pow3(dimTime)/dimLength/pow4(dimTemperature), + Zero ) ); } diff --git a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C index 0164ce0aa157667ba372e757e51ce637a0ca7d61..debb639ae4d5a79059e001a577a5df41004d3bdd 100644 --- a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C +++ b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C @@ -675,26 +675,21 @@ void Foam::radiation::viewFactor::calculate() Foam::tmp<Foam::volScalarField> Foam::radiation::viewFactor::Rp() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "Rp", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "Rp", + mesh_.time().timeName(), mesh_, - dimensionedScalar - ( - "zero", - dimMass/pow3(dimTime)/dimLength/pow4(dimTemperature), - 0.0 - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh_, + dimensionedScalar + ( + dimMass/dimLength/pow3(dimTime)/pow4(dimTemperature), Zero ) ); } @@ -703,22 +698,19 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::viewFactor::Rp() const Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>> Foam::radiation::viewFactor::Ru() const { - return tmp<DimensionedField<scalar, volMesh>> + return tmp<DimensionedField<scalar, volMesh>>::New ( - new DimensionedField<scalar, volMesh> + IOobject ( - IOobject - ( - "Ru", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "Ru", + mesh_.time().timeName(), mesh_, - dimensionedScalar("zero", dimMass/dimLength/pow3(dimTime), 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh_, + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ); } diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModel.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModel.C index 57da0d1dcb444d6425e62c1099570df4026f3c78..d7dbe75b33c5f5cb72b2e176ec2e6faf66b1d82f 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModel.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModel.C @@ -81,7 +81,7 @@ Foam::radiation::absorptionEmissionModel::aCont(const label bandI) const false ), mesh_, - dimensionedScalar("zero", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); } @@ -104,7 +104,7 @@ Foam::radiation::absorptionEmissionModel::aDisp(const label bandI) const false ), mesh_, - dimensionedScalar("zero", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); } @@ -134,7 +134,7 @@ Foam::radiation::absorptionEmissionModel::eCont(const label bandI) const false ), mesh_, - dimensionedScalar("zero", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); } @@ -157,7 +157,7 @@ Foam::radiation::absorptionEmissionModel::eDisp(const label bandI) const false ), mesh_, - dimensionedScalar("zero", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); } @@ -187,7 +187,7 @@ Foam::radiation::absorptionEmissionModel::ECont(const label bandI) const false ), mesh_, - dimensionedScalar("zero", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) ); } @@ -210,7 +210,7 @@ Foam::radiation::absorptionEmissionModel::EDisp(const label bandI) const false ), mesh_, - dimensionedScalar("zero", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) ); } diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C index e8a4321db86798b7349462d02be7520784525715..221fbfa4f2ff7fd5ae29d9ae8d983bcbe0d06f96 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C @@ -207,7 +207,7 @@ Foam::radiation::greyMeanAbsorptionEmission::aCont(const label bandI) const IOobject::NO_WRITE ), mesh(), - dimensionedScalar("a", dimless/dimLength, 0.0), + dimensionedScalar(dimless/dimLength, Zero), extrapolatedCalculatedFvPatchVectorField::typeName ) ); @@ -288,7 +288,7 @@ Foam::radiation::greyMeanAbsorptionEmission::ECont(const label bandI) const IOobject::NO_WRITE ), mesh_, - dimensionedScalar("E", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) ); diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C index aef799dfecb2798cdca0fc5d254d226991adfc18..7317d02a213fe8cf3e32e096f6905953e5ba198d 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C @@ -156,7 +156,7 @@ calc(const label propertyId) const IOobject::NO_WRITE ), mesh(), - dimensionedScalar("a", dimless/dimLength, 0.0), + dimensionedScalar(dimless/dimLength, Zero), extrapolatedCalculatedFvPatchVectorField::typeName ) ); diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/multiBandSolidAbsorptionEmission/multiBandSolidAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/multiBandSolidAbsorptionEmission/multiBandSolidAbsorptionEmission.C index c63354266ba4e9684ce2c6a4d888bd162c60f583..bb713ec3162d632095b4d83fc855b1ff80cdb504 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/multiBandSolidAbsorptionEmission/multiBandSolidAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/multiBandSolidAbsorptionEmission/multiBandSolidAbsorptionEmission.C @@ -147,7 +147,7 @@ Foam::radiation::multiBandSolidAbsorptionEmission::ECont IOobject::NO_WRITE ), mesh(), - dimensionedScalar("E", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) ); diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C index cb900d1a2680f0625a636da019353d9d639cc34a..f37c3fc01065667e43b7fadc8fa941459e25b559 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C @@ -172,7 +172,7 @@ Foam::radiation::wideBandAbsorptionEmission::aCont(const label bandi) const IOobject::NO_WRITE ), mesh(), - dimensionedScalar("a", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); @@ -244,7 +244,7 @@ Foam::radiation::wideBandAbsorptionEmission::ECont(const label bandi) const IOobject::NO_WRITE ), mesh(), - dimensionedScalar("E", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) ); @@ -287,7 +287,7 @@ void Foam::radiation::wideBandAbsorptionEmission::correct PtrList<volScalarField>& aLambda ) const { - a = dimensionedScalar("zero", dimless/dimLength, 0.0); + a = dimensionedScalar(dimless/dimLength, Zero); for (label j=0; j<nBands_; j++) { diff --git a/src/thermophysicalModels/radiation/submodels/scatterModel/noScatter/noScatter.C b/src/thermophysicalModels/radiation/submodels/scatterModel/noScatter/noScatter.C index b0c94607923f4df2e7e537bba6e565f383453241..999b09866bff49022727bf62b3636b0d7f14b426 100644 --- a/src/thermophysicalModels/radiation/submodels/scatterModel/noScatter/noScatter.C +++ b/src/thermophysicalModels/radiation/submodels/scatterModel/noScatter/noScatter.C @@ -74,7 +74,7 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::noScatter::sigmaEff() const false ), mesh_, - dimensionedScalar("zero", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); } diff --git a/src/thermophysicalModels/radiation/submodels/transmissivityModel/noTransmissivity/noTransmissivity.C b/src/thermophysicalModels/radiation/submodels/transmissivityModel/noTransmissivity/noTransmissivity.C index a76818e03e8d21077ba0813747978126696c4caf..9de0d0f8f0d692177ae44e659e6397c9b0a8ccbd 100644 --- a/src/thermophysicalModels/radiation/submodels/transmissivityModel/noTransmissivity/noTransmissivity.C +++ b/src/thermophysicalModels/radiation/submodels/transmissivityModel/noTransmissivity/noTransmissivity.C @@ -82,7 +82,7 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::noTransmissivity::tauEff false ), mesh_, - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); } diff --git a/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractions.C b/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractions.C index e7daabe79ffb9b509bf8c86e512678a0c03fe247..5cfcde4a339085e086a7e6e3a48bfcecb9eeda7c 100644 --- a/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractions.C +++ b/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractions.C @@ -82,7 +82,7 @@ Foam::moleFractions<ThermoType>::moleFractions IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("X", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); } diff --git a/src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C index a3643c0d30b0dab0da6dbeacde183afadbb5d939..7772c6a1da6fce8f2a6dfba9ec0c5c36bd7b8228 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C @@ -64,7 +64,7 @@ Foam::tmp<Foam::volScalarField> Foam::basicSpecieMixture::W() const Y[0].mesh() ), Y[0].mesh(), - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); diff --git a/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C index cd5421507169b1419df2a5ebdfefb5ba7e30792d..6f6c43de49bbca48dde268e78501f955d8334b4c 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C @@ -196,11 +196,11 @@ Foam::singleStepReactingMixture<ThermoType>::singleStepReactingMixture ) : reactingMixture<ThermoType>(thermoDict, mesh, phaseName), - stoicRatio_(dimensionedScalar("stoicRatio", dimless, 0.0)), - s_(dimensionedScalar("s", dimless, 0.0)), - qFuel_(dimensionedScalar("qFuel", sqr(dimVelocity), 0.0)), - specieStoichCoeffs_(this->species_.size(), 0.0), - Yprod0_(this->species_.size(), 0.0), + stoicRatio_(dimensionedScalar("stoicRatio", dimless, Zero)), + s_(dimensionedScalar("s", dimless, Zero), + qFuel_(dimensionedScalar("qFuel", sqr(dimVelocity), Zero)), + specieStoichCoeffs_(this->species_.size(), Zero), + Yprod0_(this->species_.size(), Zero), fres_(Yprod0_.size()), inertIndex_(this->species()[thermoDict.lookup("inertSpecie")]), fuelIndex_(this->species()[thermoDict.lookup("fuel")]), @@ -226,7 +226,7 @@ Foam::singleStepReactingMixture<ThermoType>::singleStepReactingMixture ( header, mesh, - dimensionedScalar("fres" + name(fresI), dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); } diff --git a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C index 7f18977b716abe01fda604a51e23dfd9907ef5f4..f57c68be7281062e0876bf94b94b0f6d1b5aff8f 100644 --- a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C +++ b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C @@ -132,7 +132,7 @@ pyrolysisChemistryModel IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); } @@ -633,7 +633,7 @@ Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::gasHs false ), this->mesh_, - dimensionedScalar("zero", dimEnergy/dimMass, 0.0) + dimensionedScalar(dimEnergy/dimMass, Zero) ) ); diff --git a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModelI.H b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModelI.H index 0132bc258527b7c6042a67ec3f29ae618c8ccdf8..b6b8eebb1d319fa53d2901d4f20b1b509b6fd31b 100644 --- a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModelI.H +++ b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModelI.H @@ -92,7 +92,7 @@ RRg() const IOobject::NO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C index 4a8d094133057677ba460442fb4e61b5161f6aee..2502c50f522b3c95548f0db58cf832a21f9c5ed2 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C @@ -75,7 +75,7 @@ solidChemistryModel IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); } @@ -130,7 +130,7 @@ Foam::solidChemistryModel<CompType, SolidThermo>::Qdot() const false ), this->mesh_, - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H index 74cf06d7dd973f7e8c17b8157c18bd5cf16a852b..30dbe855af1ba66b3270de5f8f20701fbf7864a6 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H @@ -80,7 +80,7 @@ Foam::solidChemistryModel<CompType, SolidThermo>::RRs() const IOobject::NO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); @@ -113,7 +113,7 @@ Foam::solidChemistryModel<CompType, SolidThermo>::RRsHs() const IOobject::NO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); diff --git a/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C index bfcf0d4368472890b054fa7dc07cf70fdec83265..cab53b7688fe87424702af955d3ac676e39ca1b9 100644 --- a/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C @@ -108,7 +108,7 @@ Foam::humidityTemperatureCoupledMixedFvPatchScalarField::thicknessField IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("zero", dimLength, 0.0) + dimensionedScalar(dimLength, Zero) ) ); diff --git a/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C b/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C index fbad1eed48bea80fe84d4ce6eb84603c25716db6..e88c55d8a49a5c534a0574869f12e1c18a93de62 100644 --- a/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C +++ b/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C @@ -96,7 +96,7 @@ void Foam::rawTopoChangerFvMesh::zeroUnmappedValues false ), *this, - dimensioned<Type>("0", fld.dimensions(), Zero) + dimensioned<Type>(fld.dimensions(), Zero) ) ); } diff --git a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C index 061feda8ab44312203d63c3386547be118e3edef..c6a2d14de06cbc71a8417a94093b9f386f045b56 100644 --- a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C +++ b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C @@ -111,7 +111,7 @@ Foam::incompressibleTwoPhaseMixture::incompressibleTwoPhaseMixture U_.db() ), U_.mesh(), - dimensionedScalar("nu", dimViscosity, 0), + dimensionedScalar(dimViscosity, Zero), calculatedFvPatchScalarField::typeName ) { diff --git a/src/transportModels/incompressible/viscosityModels/strainRateFunction/strainRateFunction.C b/src/transportModels/incompressible/viscosityModels/strainRateFunction/strainRateFunction.C index 22f117c55bba4561f82b86a0d27bbfc750e4d480..714090eb69a5f2cfeddaec94e81c312416a29fd8 100644 --- a/src/transportModels/incompressible/viscosityModels/strainRateFunction/strainRateFunction.C +++ b/src/transportModels/incompressible/viscosityModels/strainRateFunction/strainRateFunction.C @@ -75,7 +75,7 @@ Foam::viscosityModels::strainRateFunction::strainRateFunction IOobject::AUTO_WRITE ), U_.mesh(), - dimensionedScalar(name, dimViscosity, 0) + dimensionedScalar(dimViscosity, Zero) ) { correct(); diff --git a/src/transportModels/interfaceProperties/interfaceProperties.C b/src/transportModels/interfaceProperties/interfaceProperties.C index 978ecef4caf47401cb6c296ab334d182fc7da81a..aec4481f9b24e19bd1fe560cb0c60b6bca235827 100644 --- a/src/transportModels/interfaceProperties/interfaceProperties.C +++ b/src/transportModels/interfaceProperties/interfaceProperties.C @@ -183,7 +183,7 @@ Foam::interfaceProperties::interfaceProperties alpha1_.mesh() ), alpha1_.mesh(), - dimensionedScalar("nHatf", dimArea, 0.0) + dimensionedScalar(dimArea, Zero) ), K_ @@ -195,7 +195,7 @@ Foam::interfaceProperties::interfaceProperties alpha1_.mesh() ), alpha1_.mesh(), - dimensionedScalar("K", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) { calculateK();