diff --git a/applications/solvers/basic/potentialFoam/createFields.H b/applications/solvers/basic/potentialFoam/createFields.H index fb699bddf0..5152727b1d 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 0dae19a0de..67c1c67e59 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 befc3f3b59..c0d9079a8e 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::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::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 7e3d2bb7aa..5f3e6f1bc5 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::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::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 d91f1b9e31..c7b55925ca 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::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 7e3b2536b1..64ddded3f4 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 afdebbd2c6..cd6d99dae8 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::laminarFlameSpeedModels::SCOPE::Su0pTphi IOobject::NO_WRITE ), p.mesh(), - dimensionedScalar("Su0", dimVelocity, 0.0) + dimensionedScalar(dimVelocity, Zero) ) ); @@ -304,7 +304,7 @@ Foam::tmp Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi IOobject::NO_WRITE ), p.mesh(), - dimensionedScalar("Su0", dimVelocity, 0.0) + dimensionedScalar(dimVelocity, Zero) ) ); @@ -358,7 +358,7 @@ Foam::tmp 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 6e66e8014f..fda39d3f51 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 8b35089fc8..ada27f69a8 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 35781d27d5..2938f97f12 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 708cab0b42..e989a03a20 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 8e56e940fb..330c6fbb18 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 6f0c93cc5d..9f5b4c899b 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 b0f9c02b65..129e749fe8 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 5d76f3deab..47047c702f 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 a975275925..cd6fb827dd 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 322ec36712..245406c54c 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 41c1cd5635..adb9fa1b61 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 189ef5d105..4db509c043 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 d9a8769d77..a64337e794 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 5c760788c9..f269ea0e65 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 788b155588..d422eaef3a 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 4ec416f95b..49e783e199 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("Us", dimVelocity, vector::zero) + dimensionedVector(dimVelocity, Zero) ); dimensioned Uinf("Uinf", dimVelocity, 1.0); diff --git a/applications/solvers/finiteArea/sphereSurfactantFoam/createVolFields.H b/applications/solvers/finiteArea/sphereSurfactantFoam/createVolFields.H index fed56e0409..2f42dae83d 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 fed56e0409..2f42dae83d 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 aabee1cd37..c46ac5021b 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 15aba4cb27..5bcd4b4999 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 b6957ee790..6b67f0c730 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 bba352e71c..d7545b7900 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H @@ -86,8 +86,8 @@ autoPtr 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 dff4b701f5..4402b3af68 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 1d8b670811..9eb96b281e 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 2e987664ec..7e323166dd 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 ded2af139b..a282ef19a9 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 85bba58da3..174e165f49 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 218388f5c5..f135bc791c 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 f97d5af51e..3df6eefa27 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 66c70f5e39..bd223a81ce 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 328fc67224..47ffa16e50 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 983ecf2597..6c758048c7 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 df9df8fbf3..6b5bda6b2f 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 62b6b0e186..d6fce4ef55 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 6820b2e596..740e314f96 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 trSubDeltaT; diff --git a/applications/solvers/multiphase/MPPICInterFoam/createFields.H b/applications/solvers/multiphase/MPPICInterFoam/createFields.H index bcf4252b5b..95746f2f6d 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 772de0b97a..c53d6e106b 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 trSubDeltaT; diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/correctPhi.H b/applications/solvers/multiphase/cavitatingFoam/cavitatingDyMFoam/correctPhi.H index 62f83226bc..4bde1b55f1 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 12d2bcfbd7..ce2e552001 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 006b26317e..51dd6ea56c 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 trSubDeltaT; diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/alphaSuSp.H b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/alphaSuSp.H index 81309cd091..e580b4620d 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 efcee3dca1..ca6c5ae4fd 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 5532f7a3d6..afaf713ef2 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 007b8206ae..ac37bac4ae 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 e77f66b880..115f9c6738 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 4ee639f30b..5058b55eaf 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 f497b3c988..26019f439e 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 c6bde4234f..6414b371e9 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 d9981659b8..566f074b58 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 c215b3d21c..6a79460da6 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::dictName) ); - const dimensionedScalar& TSat = thermo.TSat(); + const dimensionedScalar& TSat = thermo.TSat(); - dimensionedScalar T0("0", dimTemperature, 0.0); + const dimensionedScalar T0(dimTemperature, Zero); return Pair> ( @@ -106,9 +106,9 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDot() const mesh_.lookupObject(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> ( @@ -139,8 +139,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDotDeltaT() const mesh_.lookupObject(basicThermo::dictName) ); - const dimensionedScalar& TSat = thermo.TSat(); - + const dimensionedScalar& TSat = thermo.TSat(); return Pair> ( diff --git a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C index 0c443f2c14..751df5fcb7 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::twoPhaseMixtureEThermo::hc() const { const fvMesh& mesh = this->T_.mesh(); - return tmp + return tmp::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 23bdacf6b2..c0c23c3b1e 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 2f117f2cd4..117e593c69 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 b5eae6b98c..e68661b678 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 99b26c4a83..70cc298fe9 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 cfd0353622..a7fe042a8b 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 4a83ab5850..9f0ff19da7 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 8f0af80e0d..8fd965e312 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 trSubDeltaT; diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C b/applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeDyMFoam/interPhaseChangeDyMFoam.C index 17b66fa024..8465100138 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 3ef77d362f..2998d3a78c 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 0f0cfac210..0a172e764a 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 e9b1b93588..f682ed5725 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 cc21a86a4f..7d02a651fe 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 a4b9838335..fa5ff76981 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 0ef07da220..de9318246d 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::dragModels::interface::K const volScalarField& Ur ) const { - return tmp + return tmp::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 2f923c38a6..3d51ee57cd 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::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::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::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::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 b57058d61f..cc6790499f 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 c81f20db76..ad92a79718 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 825022dee9..27f1e937d4 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 e20b5aea2c..61c2b37136 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 03b21be490..8ed6e4a0cd 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::YfPrime const volScalarField& Tf ) const { - return tmp + return tmp::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 c33df3cf5c..f58cdbc562 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::D p.mesh() ), p.mesh(), - dimensionedScalar("zero", dimArea/dimTime, 0) + dimensionedScalar(dimArea/dimTime, Zero) ) ); @@ -203,7 +203,7 @@ Foam::InterfaceCompositionModel::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 0cc976c042..b178253db5 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::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 241cf8d4b4..2e8afb99df 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 + return tmp::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 + return tmp::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 + return tmp::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 + return tmp::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 f165c24d29..d21dd563db 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 a629c46375..8236b94c46 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 fa2bccdcf4..823b5c4a9b 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::dragModels::segregated::K() const mesh ), mesh, - dimensionedScalar("L", dimLength, 0), + dimensionedScalar(dimLength, Zero), zeroGradientFvPatchField::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 b85199d86a..abff0d30d0 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 + return tmp::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 f8480dc69b..66d99da740 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::liftModels::noLift::Cl() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return tmp::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::liftModels::noLift::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return tmp::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::liftModels::noLift::Ff() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return tmp::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 2a65c1e1c6..e1a0b46d3b 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 + return tmp::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 + return tmp::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 20378a0ad1..50f9ea24ec 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 + return tmp::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::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 80cdae42c7..be615f34f3 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::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 f549142810..8c068653f8 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::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 b35bd0ef8f..d074c5b02e 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 + return tmp::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 + return tmp::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 2213f1a725..b4865e1f78 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::K() const false ), phase1_.mesh(), - dimensionedScalar("zero", ModelType::dimK, 0) + dimensionedScalar(ModelType::dimK, Zero) ) ); @@ -255,7 +255,7 @@ Foam::BlendedInterfacialModel::K(const scalar residualAlpha) const false ), phase1_.mesh(), - dimensionedScalar("zero", ModelType::dimK, 0) + dimensionedScalar(ModelType::dimK, Zero) ) ); @@ -321,7 +321,7 @@ Foam::BlendedInterfacialModel::Kf() const false ), phase1_.mesh(), - dimensionedScalar("zero", ModelType::dimK, 0) + dimensionedScalar(ModelType::dimK, Zero) ) ); @@ -384,7 +384,7 @@ Foam::BlendedInterfacialModel::F() const false ), phase1_.mesh(), - dimensioned("zero", ModelType::dimF, Zero) + dimensioned(ModelType::dimF, Zero) ) ); @@ -452,7 +452,7 @@ Foam::BlendedInterfacialModel::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::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 bb493847b0..4da0bb0cc1 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::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 465d0b3af9..2654fce6f9 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::dmdt const phasePairKey& key ) const { - return tmp + return tmp::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 53f724680b..54fec2f8ec 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 43d5881fed..812fbce2ac 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::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::Vm { return virtualMassModels_[key]->K(); } - else - { - return tmp + + return tmp::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::Vmf { return virtualMassModels_[key]->Kf(); } - else - { - return tmp + + return tmp::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::F { return wallLubricationModels_[key]->template F(); } - else - { - return tmp + + return tmp::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::Ff false ), this->mesh_, - dimensionedScalar("zero", liftModel::dimF*dimArea, 0) + dimensionedScalar(liftModel::dimF*dimArea, Zero) ) ); @@ -370,26 +350,21 @@ Foam::MomentumTransferPhaseSystem::D { return turbulentDispersionModels_[key]->D(); } - else - { - return tmp + + return tmp::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::setF false ), this->mesh_, - dimensionedVector("zero", liftModel::dimF, Zero) + dimensionedVector(liftModel::dimF, Zero) ) ); } @@ -575,9 +550,8 @@ Foam::MomentumTransferPhaseSystem::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 bb5c2462c3..9ffa4a882f 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::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::iDmdt this->mesh_ ), this->mesh_, - dimensionedScalar("zero", dimDensity/dimTime, 0) + dimensionedScalar(dimDensity/dimTime, Zero) ) ); @@ -383,7 +383,7 @@ void Foam::ThermalPhaseChangePhaseSystem::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::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 e7c8f0f8f9..01038b5200 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::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 e92cae4c9f..dd93d29a72 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 Foam::tmp Foam::InertPhaseModel::Qdot() const { - return tmp + return tmp::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 460e21ce85..768e015e51 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::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::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::MovingPhaseModel fluid.mesh() ), fluid.mesh(), - dimensionedVector("0", dimAcceleration, Zero) + dimensionedVector(dimAcceleration, Zero) ), divU_(nullptr), turbulence_ @@ -197,7 +197,7 @@ Foam::MovingPhaseModel::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 279b3bb64a..171f2f3878 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::correctThermo() this->fluid().mesh() ), this->fluid().mesh(), - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ); PtrList& 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 26be4e1bc7..4d183cd0a2 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 19e768416f..816140df2f 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 + + return tmp::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 + + return tmp::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 d9aeeded84..e7b7121d45 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::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 758c411968..2b0c178f14 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 c21e38a0a2..0b9a40f6bc 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 67517beb07..3d9dc99376 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 eeabe622e1..76d194aa9d 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 9f96dd7492..5e09566569 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 4b3c97d69a..34141a9f5e 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::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 89c6c8bbea..9176b7a1c8 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::RASModels::phasePressureModel::R() const { - return tmp + return tmp::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 - ( - "R", - dimensionSet(0, 2, -2, 0, 0), - Zero - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensioned(dimensionSet(0, 2, -2, 0, 0)) //Zero ); } @@ -210,25 +202,20 @@ Foam::RASModels::phasePressureModel::pPrimef() const Foam::tmp Foam::RASModels::phasePressureModel::devRhoReff() const { - return tmp + return tmp::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 - ( - "R", - rho_.dimensions()*dimensionSet(0, 2, -2, 0, 0), - Zero - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensioned + ( + 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 c086f1f5d0..fde7e36915 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 10739955e8..fd3a666e62 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 f1135bd51a..22485f5740 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 1ab0d22780..bbe3c41925 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 81c65c1caf..0347512d28 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 b8192fa2ba..d82e79ee54 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 386b06d6aa..31b523e8b3 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 + return tmp::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 a538ba6364..92cb4f1dda 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::dragModels::segregated::K() const mesh ), mesh, - dimensionedScalar("L", dimLength, 0), + dimensionedScalar(dimLength, Zero), zeroGradientFvPatchField::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 b85199d86a..abff0d30d0 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 + return tmp::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 f8480dc69b..927ccc47c0 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::liftModels::noLift::Cl() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return tmp::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::liftModels::noLift::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return tmp::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::liftModels::noLift::Ff() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp + return tmp::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 2a65c1e1c6..e1a0b46d3b 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 + return tmp::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 + return tmp::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 56d69ec77f..f9d25643f0 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 + return tmp::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::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 0b2c7b5012..3b546e9018 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::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 024e5ef2df..033aaa82aa 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::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 b35bd0ef8f..d074c5b02e 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 + return tmp::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 + return tmp::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 67517beb07..3d9dc99376 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 eeabe622e1..76d194aa9d 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 9f96dd7492..5e09566569 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 4b3c97d69a..34141a9f5e 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::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 62808f99a7..4c272f8d57 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::RASModels::phasePressureModel::R() const { - return tmp + return tmp::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 - ( - "R", - dimensionSet(0, 2, -2, 0, 0), - Zero - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensioned(dimensionSet(0, 2, -2, 0, 0), Zero) ); } @@ -216,25 +208,20 @@ Foam::RASModels::phasePressureModel::pPrimef() const Foam::tmp Foam::RASModels::phasePressureModel::devRhoReff() const { - return tmp + return tmp::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 - ( - "R", - rho_.dimensions()*dimensionSet(0, 2, -2, 0, 0), - Zero - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensioned + ( + 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 289054982d..2559e56078 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::K() const false ), pair_.phase1().mesh(), - dimensionedScalar("zero", modelType::dimK, 0) + dimensionedScalar(modelType::dimK, Zero) ) ); @@ -219,7 +219,7 @@ Foam::BlendedInterfacialModel::Kf() const false ), pair_.phase1().mesh(), - dimensionedScalar("zero", modelType::dimK, 0) + dimensionedScalar(modelType::dimK, Zero) ) ); @@ -282,7 +282,7 @@ Foam::BlendedInterfacialModel::F() const false ), pair_.phase1().mesh(), - dimensioned("zero", modelType::dimF, Zero) + dimensioned(modelType::dimF, Zero) ) ); @@ -350,7 +350,7 @@ Foam::BlendedInterfacialModel::Ff() const false ), pair_.phase1().mesh(), - dimensionedScalar("zero", modelType::dimF*dimArea, 0) + dimensionedScalar(modelType::dimF*dimArea, Zero) ) ); @@ -412,7 +412,7 @@ Foam::BlendedInterfacialModel::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 d442373b0c..ac942feea3 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::diameterModels::IATEsources::dummy::R() const { - return tmp + return tmp::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 480937663b..cf6a2d5841 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 8c0be0f232..50cca9b657 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 139826e885..9d96736585 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 4750293fe8..ec5b76485a 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 0c90a88532..ef7a53028c 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 589566e3a1..60a89e8ace 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 434dd05986..0b867156c4 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 7613773733..1438e3b32c 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 ea2419c772..ff422a2943 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 edcca1d668..17364b7026 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 19c72f5418..a350fc3092 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 f0c05f9644..0657729226 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 020fdb0e60..cbb4a3f0d5 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 468ede3453..0b3db1f187 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 d383b4a889..6e52cf0028 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 63d7542cee..a65d513772 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 0f07a35197..7103362970 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 6a79030852..d3341b5b9e 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 1974ed569c..cea85ffa20 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -85,7 +85,7 @@ tmp 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 c67b886914..defed945be 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 d552c294f7..ed4243197d 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("zero", dimless, Zero) + dimensioned(dimless, Zero) ); diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C index 267dce6a9b..a61b582980 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 8412be157f..3ba6940575 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 - ( - "zero", - readField.dimensions(), - Zero - ) + dimensioned(readField.dimensions(), Zero) ) ); diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H b/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H index 8f8de88d4c..d82d9ffbf5 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 eff776563f..fcf87634e3 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 dae63600ab..59f869d1a0 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 fa07827382..c84e8c6830 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 be7cf05115..489fd0ca96 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 014c1e543f..855d3e900e 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. @@ -72,16 +72,29 @@ void Foam::dimensioned::initialize(Istream& is) // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::dimensioned::dimensioned -( - const word& name, - const dimensionSet& dimSet, - const Type t -) +Foam::dimensioned::dimensioned() : - name_(name), - dimensions_(dimSet), - value_(t) + name_("0"), + dimensions_(dimless), + value_(Zero) +{} + + +template +Foam::dimensioned::dimensioned(const dimensionSet& dims) +: + name_("0"), + dimensions_(dims), + value_(Zero) +{} + + +template +Foam::dimensioned::dimensioned(const dimensionSet& dims, const zero) +: + name_("0"), + dimensions_(dims), + value_(Zero) {} @@ -98,6 +111,20 @@ Foam::dimensioned::dimensioned {} +template +Foam::dimensioned::dimensioned +( + const word& name, + const dimensionSet& dims, + const Type& val +) +: + name_(name), + dimensions_(dims), + value_(val) +{} + + template Foam::dimensioned::dimensioned ( @@ -131,12 +158,12 @@ template Foam::dimensioned::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 Foam::dimensioned::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 -Foam::dimensioned::dimensioned -() -: - name_("undefined"), - dimensions_(dimless), - value_(Zero) -{} - - -template -Foam::dimensioned::dimensioned -( - const dimensionSet& dimSet -) -: - name_("0"), - dimensions_(dimSet), - value_(Zero) -{} - - // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // template @@ -196,10 +201,8 @@ Foam::dimensioned Foam::dimensioned::lookupOrDefault { return dimensioned(name, dims, dict.lookup(name)); } - else - { - return dimensioned(name, dims, defaultValue); - } + + return dimensioned(name, dims, defaultValue); } diff --git a/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.H b/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.H index 888426003a..65e8aa1d6f 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 dimensioned; @@ -55,7 +57,6 @@ Istream& operator>>(Istream&, dimensioned&); template Ostream& operator<<(Ostream&, const dimensioned&); -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); - - //- Construct from a dimensioned changing the name. - dimensioned(const word&, const dimensioned&); - - //- Construct given a value (creates dimensionless value). - dimensioned(const Type& t) - : - name_(::Foam::name(t)), - dimensions_(dimless), - value_(t) - {} - - //- Construct from Istream. - dimensioned(Istream&); - - //- Construct from an Istream with a given name - dimensioned(const word&, Istream&); - - //- Construct from an Istream with a given name and dimensions - dimensioned(const word&, const dimensionSet&, Istream&); - - //- Construct from dictionary lookup with a given name and dimensions - dimensioned(const word&, const dimensionSet&, const dictionary&); - - //- Null constructor - a dimensionless Zero, named "undefined" + //- Null constructor: a dimensionless Zero, named "0" dimensioned(); //- A dimensioned Zero, named "0" - explicit dimensioned(const dimensionSet&); + explicit dimensioned(const dimensionSet& dims); + + //- A dimensioned Zero, named "0" + explicit dimensioned(const dimensionSet& dims, const zero); + + //- Construct dimensionless from given value. + dimensioned(const Type& val) + : + name_(::Foam::name(val)), + dimensions_(dimless), + value_(val) + {} + + //- Copy construct a dimensioned Type with a new name + dimensioned(const word& name, const dimensioned& dt); + + //- Construct from components: name, dimensionSet and a value. + dimensioned + ( + const word& name, + const dimensionSet& dims, + const Type& val + ); + + //- Construct from Istream. + dimensioned(Istream& is); + + //- Construct from Istream with a given name + dimensioned(const word& name, Istream& is); + + //- Construct from Istream with a given name and dimensions + dimensioned(const word& name, const dimensionSet& dims, Istream& is); + + //- 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 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 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 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 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 - dimensioned component(const direction) const; + dimensioned component(const direction d) const; //- Return a component with a dimensioned - void replace(const direction, const dimensioned&); + void replace(const direction d, const dimensioned& dc); //- Return transpose. dimensioned T() const; //- Update the value of dimensioned - void read(const dictionary&); + void read(const dictionary& dict); //- Update the value of dimensioned 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&); + Istream& read(Istream& is, const HashTable& 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 - dimensioned operator[](const direction) const; + dimensioned operator[](const direction d) const; - void operator+=(const dimensioned&); - void operator-=(const dimensioned&); - void operator*=(const scalar); - void operator/=(const scalar); + void operator+=(const dimensioned& dt); + void operator-=(const dimensioned& dt); + void operator*=(const scalar s); + void operator/=(const scalar s); // IOstream operators friend Istream& operator>> - (Istream&, dimensioned&); + ( + Istream& is, + dimensioned& dt + ); friend Ostream& operator<< - (Ostream&, const dimensioned&); + ( + Ostream& os, + const dimensioned& dt + ); }; diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H index 8abae114e7..6fbeeb80ac 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&& 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\ 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& df ); - //- Construct as copy or re-use as specified. + //- Copy construct or reuse (move) as specified. DimensionedField ( DimensionedField& df, bool reuse ); - //- Construct by transferring the DimensionedField + //- Move construct explicit DimensionedField ( DimensionedField&& df @@ -207,14 +210,14 @@ public: ); #endif - //- Construct as copy resetting IO parameters + //- Copy construct, resetting IO parameters DimensionedField ( const IOobject& io, const DimensionedField& 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& 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& df); void operator=(const tmp>& tdf); + + //- Assign dimensions and value. void operator=(const dimensioned& dt); void operator+=(const DimensionedField& df); diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index 6fd5a97ce5..ea2091d26b 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C @@ -631,7 +631,6 @@ Foam::GeometricField::GeometricField const GeometricField& 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 0b13a145b2..202065d2a8 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 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::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 and patch type. + //- Construct given IOobject, mesh, dimensioned and patch type. + // This assigns both dimensions and values. + // The internal name for the dimensioned\ has no influence. GeometricField ( - const IOobject&, - const Mesh&, - const dimensioned&, + const IOobject& io, + const Mesh& mesh, + const dimensioned& dt, const word& patchFieldType=PatchField::calculatedType() ); - //- Constructor given IOobject, mesh, dimensioned and patch types. + //- Construct given IOobject, mesh, dimensioned and patch types. + // This assigns both dimensions and values. + // The internal name for the dimensioned\ has no influence. GeometricField ( - const IOobject&, - const Mesh&, - const dimensioned&, + const IOobject& io, + const Mesh& mesh, + const dimensioned& dt, const wordList& wantedPatchTypes, const wordList& actualPatchTypes = wordList() ); @@ -336,64 +339,64 @@ public: //- Constructor from components GeometricField ( - const IOobject&, - const Internal&, - const PtrList>& + const IOobject& io, + const Internal& diField, + const PtrList>& ptfl ); //- Constructor from components GeometricField ( - const IOobject&, - const Mesh&, - const dimensionSet&, - const Field&, - const PtrList>& + const IOobject& io, + const Mesh& mesh, + const dimensionSet& ds, + const Field& iField, + const PtrList>& 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& + const GeometricField& gf ); //- Construct as copy of tmp deleting argument #ifndef NoConstructFromTmp GeometricField ( - const tmp>& + const tmp>& tgf ); #endif //- Construct as copy resetting IO parameters GeometricField ( - const IOobject&, - const GeometricField& + const IOobject& io, + const GeometricField& gf ); //- Construct as copy of tmp resetting IO parameters #ifndef NoConstructFromTmp GeometricField ( - const IOobject&, - const tmp>& + const IOobject& io, + const tmp>& tgf ); #endif @@ -401,7 +404,7 @@ public: GeometricField ( const word& newName, - const GeometricField& + const GeometricField& gf ); //- Construct as copy resetting name @@ -409,23 +412,23 @@ public: GeometricField ( const word& newName, - const tmp>& + const tmp>& tgf ); #endif //- Construct as copy resetting IO parameters and patch type GeometricField ( - const IOobject&, - const GeometricField&, + const IOobject& io, + const GeometricField& gf, const word& patchFieldType ); //- Construct as copy resetting IO parameters and boundary types GeometricField ( - const IOobject&, - const GeometricField&, + const IOobject& io, + const GeometricField& gf, const wordList& patchFieldTypes, const wordList& actualPatchTypes = wordList() ); @@ -434,8 +437,8 @@ public: #ifndef NoConstructFromTmp GeometricField ( - const IOobject&, - const tmp>&, + const IOobject& io, + const tmp>& 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 dec729bf59..2116b52fbb 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&); + // The name of the dimensioned\ defines the name of the + // field. + UniformDimensionedField + ( + const IOobject& io, + const dimensioned& dt + ); //- Construct as copy - UniformDimensionedField(const UniformDimensionedField&); + UniformDimensionedField(const UniformDimensionedField& rdt); //- Construct from Istream - UniformDimensionedField(const IOobject&); + UniformDimensionedField(const IOobject& io); //- Destructor @@ -111,8 +117,11 @@ public: // Member Operators - void operator=(const UniformDimensionedField&); - void operator=(const dimensioned&); + //- Assign name, dimensions and value. + void operator=(const UniformDimensionedField& rhs); + + //- Assign name, dimensions and value. + void operator=(const dimensioned& rhs); Type operator[](const label) const { diff --git a/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C b/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C index baaa6070ff..f0f04409c6 100644 --- a/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C +++ b/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C @@ -118,21 +118,18 @@ template Foam::tmp Foam::ThermalDiffusivity::alphat() const { - return tmp + return tmp::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 b78cdb4f5e..62bc1b5963 100644 --- a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C +++ b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C @@ -104,21 +104,18 @@ template Foam::tmp Foam::PhaseCompressibleTurbulenceModel::pPrime() const { - return tmp + return tmp::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 Foam::tmp Foam::PhaseCompressibleTurbulenceModel::pPrimef() const { - return tmp + return tmp::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 aadd2aac26..472d2cae7d 100644 --- a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C +++ b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C @@ -103,21 +103,18 @@ template Foam::tmp Foam::PhaseIncompressibleTurbulenceModel::pPrime() const { - return tmp + return tmp::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 Foam::tmp Foam::PhaseIncompressibleTurbulenceModel::pPrimef() const { - return tmp + return tmp::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 2d7f5c904f..0b94f9e954 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C @@ -92,7 +92,7 @@ tmp SpalartAllmarasDDES::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 7ed9800463..e28aa15795 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C @@ -473,7 +473,7 @@ tmp SpalartAllmarasDES::k() const IOobject::NO_WRITE ), this->mesh_, - dimensionedScalar("0", dimLength, 0.0), + dimensionedScalar(dimLength, Zero), zeroGradientFvPatchField::typeName ) ); @@ -558,7 +558,7 @@ void SpalartAllmarasDES::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 b0b4c8d1a0..3c6c97770c 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C @@ -94,7 +94,7 @@ tmp kOmegaSSTDDES::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 575434e8f2..2657b8e8b7 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 f988138fe3..052183a1ae 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 61934975af..3b3490f5d7 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 dae06399ba..4d3f38d9a8 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C +++ b/src/TurbulenceModels/turbulenceModels/LES/dynamicKEqn/dynamicKEqn.C @@ -53,7 +53,7 @@ volScalarField dynamicKEqn::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 7957fb04fb..42bcdb54d1 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C @@ -307,20 +307,17 @@ tmp SpalartAllmaras::k() const << "Spalart-Allmaras model. Returning zero field" << endl; - return tmp + return tmp::New ( - new volScalarField + IOobject ( - IOobject - ( - "k", - this->runTime_.timeName(), - this->mesh_ - ), - this->mesh_, - dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0), - zeroGradientFvPatchField::typeName - ) + "k", + this->runTime_.timeName(), + this->mesh_ + ), + this->mesh_, + dimensionedScalar(dimensionSet(0, 2, -2, 0, 0), Zero), + zeroGradientFvPatchField::typeName ); } @@ -333,20 +330,17 @@ tmp SpalartAllmaras::epsilon() const << "Spalart-Allmaras model. Returning zero field" << endl; - return tmp + return tmp::New ( - new volScalarField + IOobject ( - IOobject - ( - "epsilon", - this->runTime_.timeName(), - this->mesh_ - ), - this->mesh_, - dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0), - zeroGradientFvPatchField::typeName - ) + "epsilon", + this->runTime_.timeName(), + this->mesh_ + ), + this->mesh_, + dimensionedScalar(dimensionSet(0, 2, -3, 0, 0), Zero), + zeroGradientFvPatchField::typeName ); } @@ -388,7 +382,7 @@ void SpalartAllmaras::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 16bcccc5fd..e7488ad9f4 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C @@ -481,7 +481,7 @@ kOmegaSSTLM::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 ed4791c243..4957f06378 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C @@ -79,7 +79,7 @@ tmp kOmegaSSTSAS::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 0c974ff84f..9a3fe9c2be 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C @@ -283,7 +283,7 @@ void realizableKE::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 cbdbcd0b9b..9798151e89 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C @@ -50,7 +50,7 @@ tmp v2f::Ts() const max ( this->nu(), - dimensionedScalar("zero", this->nu()().dimensions(), 0.0) + dimensionedScalar(this->nu()().dimensions(), Zero) ) / epsilon_ ) @@ -75,12 +75,7 @@ tmp v2f::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 b508581123..c50aab9cb4 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