From 5632ef2dd71c5df264d26135c9eee6596eb1ad59 Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Fri, 16 Mar 2018 10:24:03 +0100 Subject: [PATCH] STYLE: more consistent use of dimensioned Zero - when constructing dimensioned fields that are to be zero-initialized, it is preferrable to use a form such as dimensionedScalar(dims, Zero) dimensionedVector(dims, Zero) rather than dimensionedScalar("0", dims, 0) dimensionedVector("zero", dims, vector::zero) This reduces clutter and also avoids any suggestion that the name of the dimensioned quantity has any influence on the field's name. An even shorter version is possible. Eg, dimensionedScalar(dims) but reduces the clarity of meaning. - NB: UniformDimensionedField is an exception to these style changes since it does use the name of the dimensioned type (instead of the regIOobject). --- .../basic/potentialFoam/createFields.H | 6 +- .../overPotentialFoam/createFields.H | 6 +- .../basicXiSubXiEq/basicXiSubXiEq.C | 9 +- .../PDRModels/dragModels/basic/basic.C | 9 +- .../XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C | 2 +- .../XiModels/XiEqModels/XiEqModel/XiEqModel.C | 9 +- .../SCOPE/SCOPELaminarFlameSpeed.C | 6 +- applications/solvers/combustion/XiFoam/bEqn.H | 2 +- .../combustion/chemFoam/createFields.H | 9 +- .../combustion/fireFoam/createFields.H | 2 +- .../combustion/reactingFoam/createFields.H | 2 +- .../rhoReactingBuoyantFoam/createFields.H | 2 +- .../rhoReactingFoam/createFields.H | 2 +- .../combustion/reactingFoam/setRDeltaT.H | 2 +- .../rhoCentralDyMFoam/rhoCentralDyMFoam.C | 2 +- .../rhoCentralFoam/rhoCentralFoam.C | 2 +- .../rhoPimpleAdiabaticFoam/createFields.H | 2 +- .../overRhoPimpleDyMFoam/createFields.H | 2 +- .../magneticFoam/createFields.H | 2 +- .../financial/financialFoam/createFields.H | 2 +- .../liquidFilmFoam/createFaFields.H | 6 +- .../liquidFilmFoam/createFvFields.H | 4 +- .../sphereSurfactantFoam/createFaFields.H | 2 +- .../sphereSurfactantFoam/createVolFields.H | 4 +- .../surfactantFoam/createVolFields.H | 4 +- .../fluid/createFluidFields.H | 2 +- .../fluid/createFluidFields.H | 9 +- .../solid/createSolidFields.H | 7 +- .../createFields.H | 4 +- .../boundaryFoam/createFields.H | 2 +- .../pimpleFoam/overPimpleDyMFoam/correctPhi.H | 2 +- .../shallowWaterFoam/createFields.H | 2 +- .../DPMFoam/DPMDyMFoam/DPMDyMFoam.C | 7 +- .../solvers/lagrangian/DPMFoam/DPMFoam.C | 7 +- .../solvers/lagrangian/DPMFoam/createFields.H | 2 +- .../coalChemistryFoam/createFields.H | 6 +- .../reactingParcelFoam/createFields.H | 2 +- .../simpleReactingParcelFoam/createFields.H | 2 +- .../simpleCoalParcelFoam/createFields.H | 2 +- .../lagrangian/sprayFoam/createFields.H | 2 +- .../MPPICInterFoam/MPPICInterFoam.C | 7 +- .../MPPICInterFoam/alphaEqnSubCycle.H | 2 +- .../multiphase/MPPICInterFoam/createFields.H | 2 +- .../solvers/multiphase/VoF/alphaEqnSubCycle.H | 2 +- .../cavitatingDyMFoam/correctPhi.H | 2 +- .../compressibleInterFoam/alphaSuSp.H | 4 +- .../compressibleAlphaEqnSubCycle.H | 4 +- .../compressibleInterDyMFoam/alphaSuSp.H | 4 +- .../VoFSolidificationMeltingSource.C | 2 +- .../multiphaseMixtureThermo.C | 19 +- .../phaseModel/phaseModel.C | 2 +- .../driftFluxFoam/alphaEqnSubCycle.H | 4 +- ...incompressibleTwoPhaseInteractingMixture.C | 2 +- .../relativeVelocityModel.C | 2 +- .../createFields.H | 2 +- .../interCondensatingEvaporatingFoam.C | 2 +- .../constant/constant.C | 11 +- .../twoPhaseMixtureEThermo.C | 23 +-- .../multiphase/interFoam/createFields.H | 2 +- .../interMixingFoam/alphaEqnSubCycle.H | 2 +- .../incompressibleThreePhaseMixture.C | 2 +- .../threePhaseInterfaceProperties.C | 4 +- .../interFoam/overInterDyMFoam/correctPhi.H | 2 +- .../interFoam/overInterDyMFoam/createFields.H | 2 +- .../interIsoFoam/alphaEqnSubCycle.H | 2 +- .../interPhaseChangeDyMFoam.C | 2 +- .../interPhaseChangeFoam.C | 2 +- .../phaseChangeTwoPhaseMixtures/Kunz/Kunz.C | 2 +- .../Merkle/Merkle.C | 2 +- .../SchnerrSauer/SchnerrSauer.C | 2 +- .../multiphaseEulerFoam/createFields.H | 4 +- .../dragModels/interface/interface.C | 23 +-- .../multiphaseSystem/multiphaseSystem.C | 36 +--- .../multiphaseSystem/phaseModel/phaseModel.C | 4 +- .../multiphase/multiphaseEulerFoam/pEqn.H | 4 +- .../multiphaseMixture/multiphaseMixture.C | 19 +- .../potentialFreeSurfaceFoam/createFields.H | 2 +- .../interfaceCompositionModels/Henry/Henry.C | 19 +- .../InterfaceCompositionModel.C | 4 +- .../Raoult/Raoult.C | 2 +- .../constantSaturationConditions.C | 92 ++++----- .../saturationModels/function1/function1.C | 2 +- .../saturationModels/polynomial/polynomial.C | 2 +- .../dragModels/segregated/segregated.C | 2 +- .../constantLiftCoefficient.C | 24 +-- .../liftModels/noLift/noLift.C | 69 +++---- .../noTurbulentDispersion.C | 47 ++--- .../noVirtualMass/noVirtualMass.C | 26 +-- .../wallLubricationModels/Antal/Antal.C | 2 +- .../wallLubricationModels/Frank/Frank.C | 2 +- .../noWallLubrication/noWallLubrication.C | 46 ++--- .../BlendedInterfacialModel.C | 12 +- .../HeatAndMassTransferPhaseSystem.C | 6 +- .../HeatTransferPhaseSystem.C | 23 +-- ...terfaceCompositionPhaseChangePhaseSystem.C | 6 +- .../MomentumTransferPhaseSystem.C | 146 ++++++------- .../ThermalPhaseChangePhaseSystem.C | 10 +- .../AnisothermalPhaseModel.C | 2 +- .../InertPhaseModel/InertPhaseModel.C | 19 +- .../MovingPhaseModel/MovingPhaseModel.C | 8 +- .../MultiComponentPhaseModel.C | 2 +- .../phaseModel/phaseModel/phaseModel.C | 2 +- .../phaseSystems/phaseSystem/phaseSystem.C | 68 +++---- .../multiphaseSystem/multiphaseSystem.C | 17 +- .../reactingMultiphaseEulerFoam/pU/pEqn.H | 4 +- .../IATEsource/wallBoiling.C | 4 +- .../JohnsonJacksonSchaefferFrictionalStress.C | 2 +- .../Schaeffer/SchaefferFrictionalStress.C | 2 +- .../kineticTheoryModel/kineticTheoryModel.C | 8 +- .../viscosityModel/none/noneViscosity.C | 7 +- .../phasePressureModel/phasePressureModel.C | 55 ++--- .../IATE/IATEsources/dummy/dummy.C | 2 +- .../randomCoalescence/randomCoalescence.C | 2 +- .../turbulentBreakUp/turbulentBreakUp.C | 2 +- .../twoPhaseSystem/twoPhaseSystem.C | 2 +- .../twoLiquidMixingFoam/alphaEqnSubCycle.H | 2 +- .../twoPhaseEulerFoam/createFields.H | 2 +- .../constantAspectRatio/constantAspectRatio.C | 24 +-- .../dragModels/segregated/segregated.C | 2 +- .../constantLiftCoefficient.C | 24 +-- .../liftModels/noLift/noLift.C | 69 +++---- .../noTurbulentDispersion.C | 47 ++--- .../noVirtualMass/noVirtualMass.C | 26 +-- .../wallLubricationModels/Antal/Antal.C | 2 +- .../wallLubricationModels/Frank/Frank.C | 2 +- .../noWallLubrication/noWallLubrication.C | 46 ++--- .../JohnsonJacksonSchaefferFrictionalStress.C | 2 +- .../Schaeffer/SchaefferFrictionalStress.C | 2 +- .../kineticTheoryModel/kineticTheoryModel.C | 8 +- .../viscosityModel/none/noneViscosity.C | 7 +- .../phasePressureModel/phasePressureModel.C | 55 ++--- .../BlendedInterfacialModel.C | 10 +- .../IATE/IATEsources/dummy/dummy.C | 19 +- .../randomCoalescence/randomCoalescence.C | 2 +- .../turbulentBreakUp/turbulentBreakUp.C | 2 +- .../twoPhaseSystem/phaseModel/phaseModel.C | 6 +- .../twoPhaseSystem/twoPhaseSystem.C | 4 +- .../readThermalProperties.H | 4 +- .../kineticEnergyLimiter.H | 2 +- .../Test-GAMGAgglomeration.C | 4 +- .../Test-PatchEdgeFaceWave.C | 4 +- .../test/PointEdgeWave/Test-PointEdgeWave.C | 2 +- .../fieldDependency/Test-fieldDependency.C | 4 +- .../cavity/system/processorField | 2 +- .../test/mappedPatch/Test-MappedPatch.C | 2 +- .../test/pointField/Test-PointField.C | 2 +- .../refinementLevel/refinementLevel.C | 2 +- .../cellShapeControlMesh.C | 2 +- .../conformalVoronoiMeshIO.C | 10 +- .../foamyHexMeshBackgroundMesh.C | 4 +- .../mesh/manipulation/checkMesh/writeFields.C | 18 +- .../manipulation/renumberMesh/renumberMesh.C | 2 +- .../splitMeshRegions/splitMeshRegions.C | 2 +- .../helpBoundary/helpBoundaryTemplates.C | 2 +- .../reconstructParMesh/reconstructParMesh.C | 2 +- .../foamToTetDualMesh/foamToTetDualMesh.C | 7 +- .../applyBoundaryLayer/createFields.H | 4 +- .../faceAgglomerate/faceAgglomerate.C | 2 +- .../viewFactorsGen/viewFactorsGen.C | 2 +- src/OpenFOAM/dimensionSet/dimensionSet.H | 2 +- .../dimensionedScalar/dimensionedScalar.C | 1 - .../dimensionedType/dimensionedType.C | 79 +++---- .../dimensionedType/dimensionedType.H | 106 ++++++---- .../DimensionedField/DimensionedField.H | 29 +-- .../GeometricField/GeometricField.C | 1 - .../GeometricField/GeometricField.H | 101 ++++----- .../UniformDimensionedField.H | 19 +- .../ThermalDiffusivity/ThermalDiffusivity.C | 21 +- .../PhaseCompressibleTurbulenceModel.C | 42 ++-- .../PhaseIncompressibleTurbulenceModel.C | 42 ++-- .../SpalartAllmarasDDES/SpalartAllmarasDDES.C | 2 +- .../SpalartAllmarasDES/SpalartAllmarasDES.C | 4 +- .../DES/kOmegaSSTDDES/kOmegaSSTDDES.C | 2 +- .../LES/LESdeltas/IDDESDelta/IDDESDelta.C | 2 +- .../anisotropicFilter/anisotropicFilter.C | 4 +- .../LESfilters/laplaceFilter/laplaceFilter.C | 4 +- .../LES/dynamicKEqn/dynamicKEqn.C | 2 +- .../RAS/SpalartAllmaras/SpalartAllmaras.C | 44 ++-- .../RAS/kOmegaSSTLM/kOmegaSSTLM.C | 2 +- .../RAS/kOmegaSSTSAS/kOmegaSSTSAS.C | 2 +- .../RAS/realizableKE/realizableKE.C | 2 +- .../turbulenceModels/RAS/v2f/v2f.C | 9 +- .../epsilonWallFunctionFvPatchScalarField.C | 2 +- .../omegaWallFunctionFvPatchScalarField.C | 2 +- .../turbulenceModels/laminar/Stokes/Stokes.C | 98 ++++----- .../laminar/laminarModel/laminarModel.C | 98 ++++----- .../nonlinearEddyViscosity.C | 7 +- src/combustionModels/EDC/EDC.C | 4 +- src/combustionModels/FSD/FSD.C | 16 +- .../consumptionSpeed/consumptionSpeed.C | 7 +- src/combustionModels/PaSR/PaSR.C | 2 +- src/combustionModels/diffusion/diffusion.C | 3 +- .../diffusionMulticomponent.C | 10 +- .../eddyDissipationDiffusionModel.C | 2 +- .../eddyDissipationModelBase.C | 3 +- .../infinitelyFastChemistry.C | 3 +- src/combustionModels/laminar/laminar.C | 2 +- .../noCombustion/noCombustion.C | 25 +-- .../singleStepCombustion.C | 2 +- .../dynamicRefineFvMesh/dynamicRefineFvMesh.C | 2 +- .../fvMeshDistribute/fvMeshDistribute.C | 2 +- .../meshSubsetHelperTemplates.C | 2 +- .../motionSmootherAlgoTemplates.C | 2 +- .../displacementLayeredMotionMotionSolver.C | 2 +- .../polyTopoChange/hexRef8/hexRef8.C | 5 +- .../EulerFaDdtScheme/EulerFaDdtScheme.C | 35 +--- .../backwardFaDdtScheme/backwardFaDdtScheme.C | 33 +-- .../boundedBackwardFaDdtScheme.C | 33 +-- .../steadyStateFaDdtScheme.C | 192 ++++++------------ .../finiteArea/fac/facEdgeIntegrate.C | 9 +- .../leastSquaresFaGrad/leastSquaresFaGrad.C | 7 +- .../leastSquaresFaVectors.C | 4 +- .../cfdTools/compressible/createDpdt.H | 2 +- .../cfdTools/general/CorrectPhi/CorrectPhi.C | 4 +- .../cfdTools/general/MRF/MRFZoneList.C | 2 +- .../cfdTools/general/include/readhRef.H | 2 +- .../cfdTools/general/include/readpRef.H | 2 +- .../cfdTools/general/levelSet/levelSet.C | 2 +- .../general/levelSet/levelSetTemplates.C | 2 +- .../DarcyForchheimer/DarcyForchheimer.C | 4 +- .../steadyStateD2dt2Scheme.C | 35 ++-- .../CoEulerDdtScheme/CoEulerDdtScheme.C | 37 ++-- .../CrankNicolsonDdtScheme.C | 8 +- .../EulerDdtScheme/EulerDdtScheme.C | 33 +-- .../ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C | 39 ++-- .../backwardDdtScheme/backwardDdtScheme.C | 33 +-- .../localEulerDdtScheme/localEulerDdtScheme.C | 41 ++-- .../steadyStateDdtScheme.C | 159 +++++---------- .../finiteVolume/fvc/fvcReconstructMag.C | 7 +- .../finiteVolume/fvc/fvcSimpleReconstruct.C | 7 +- .../finiteVolume/fvc/fvcSurfaceIntegrate.C | 9 +- .../LeastSquaresGrad/LeastSquaresGrad.C | 7 +- .../gradSchemes/gaussGrad/gaussGrad.C | 7 +- .../invDistLeastSquaresVectors.C | 4 +- .../leastSquaresGrad/leastSquaresGrad.C | 7 +- .../leastSquaresGrad/leastSquaresVectors.C | 4 +- .../unweightedLeastSquaresVectors.C | 4 +- .../fvMatrices/fvMatrix/fvMatrix.C | 2 +- .../isoAdvection/isoAdvection/isoAdvection.C | 2 +- .../extendedCellToCellStencilTemplates.C | 7 +- .../extendedCellToFaceStencilTemplates.C | 7 +- ...extendedUpwindCellToFaceStencilTemplates.C | 7 +- .../extendedFaceToCellStencilTemplates.C | 7 +- src/finiteVolume/fvMesh/fvMeshGeometry.C | 2 +- .../Poisson/PoissonPatchDistMethod.C | 2 +- .../advectionDiffusionPatchDistMethod.C | 2 +- .../fvMesh/wallDist/wallDist/wallDist.C | 2 +- .../limitedSchemes/upwind/upwind.H | 23 +-- .../schemes/cellCoBlended/cellCoBlended.H | 2 +- .../schemes/linearUpwind/linearUpwindV.C | 7 +- .../schemes/skewCorrected/skewCorrected.H | 7 +- .../volPointInterpolation.C | 2 +- .../field/CourantNo/CourantNo.C | 2 +- src/functionObjects/field/Curle/Curle.C | 13 +- .../field/DESModelRegions/DESModelRegions.C | 2 +- .../field/blendingFactor/blendingFactor.C | 2 +- .../field/ddt2/ddt2Templates.C | 18 +- .../heatTransferCoeff/heatTransferCoeff.C | 2 +- .../field/processorField/processorField.C | 2 +- .../reactionsSensitivityAnalysis.C | 2 +- .../regionSizeDistribution.C | 2 +- .../field/streamFunction/streamFunction.C | 2 +- .../field/wallHeatFlux/wallHeatFlux.C | 2 +- .../field/wallShearStress/wallShearStress.C | 7 +- .../field/writeCellVolumes/writeCellVolumes.C | 2 +- src/functionObjects/field/yPlus/yPlus.C | 2 +- .../zeroGradient/zeroGradientTemplates.C | 2 +- .../forces/forceCoeffs/forceCoeffs.C | 4 +- src/functionObjects/forces/forces/forces.C | 8 +- .../icoUncoupledKinematicCloud.C | 2 +- .../solvers/energyTransport/energyTransport.C | 2 +- .../solvers/scalarTransport/scalarTransport.C | 82 +++----- ...lacementComponentLaplacianFvMotionSolver.C | 7 +- ...velocityComponentLaplacianFvMotionSolver.C | 7 +- .../displacementSBRStressFvMotionSolver.C | 8 +- .../displacementLaplacianFvMotionSolver.C | 14 +- ...dBodyDisplacementLaplacianFvMotionSolver.C | 14 +- .../surfaceAlignedSBRStressFvMotionSolver.C | 8 +- .../velocityLaplacianFvMotionSolver.C | 7 +- .../patchCorrectedInterpolationTemplates.C | 6 +- ...irectionalPressureGradientExplicitSource.C | 2 +- .../jouleHeatingSource/jouleHeatingSource.C | 2 +- .../jouleHeatingSourceTemplates.C | 7 +- .../meanVelocityForce/meanVelocityForce.C | 2 +- .../derived/rotorDiskSource/rotorDiskSource.C | 16 +- .../rotorDiskSourceTemplates.C | 2 +- .../solidificationMeltingSource.C | 35 ++-- .../viscousDissipation/viscousDissipation.C | 2 +- .../semiImplicitSource/SemiImplicitSource.C | 14 +- .../interRegionExplicitPorositySource.C | 8 +- .../interRegionHeatTransferModel.C | 7 +- .../clouds/Templates/DSMCCloud/DSMCCloud.C | 43 ++-- .../coalCloudList/coalCloudListI.H | 10 +- .../Templates/KinematicCloud/KinematicCloud.C | 4 +- .../KinematicCloud/KinematicCloudI.H | 8 +- .../Templates/ReactingCloud/ReactingCloud.C | 2 +- .../Templates/ReactingCloud/ReactingCloudI.H | 12 +- .../Templates/ThermoCloud/ThermoCloud.C | 15 +- .../Templates/ThermoCloud/ThermoCloudI.H | 6 +- .../ParticleErosion/ParticleErosion.C | 2 +- .../VoidFraction/VoidFraction.C | 2 +- .../LocalInteraction/LocalInteraction.C | 4 +- .../AveragingMethod/AveragingMethod.C | 8 +- .../MPPIC/AveragingMethods/Basic/Basic.C | 2 +- .../MPPIC/PackingModels/Implicit/Implicit.C | 8 +- .../cloudAbsorptionEmission.C | 29 ++- .../scatter/cloudScatter/cloudScatter.C | 2 +- .../molecule/mdTools/createMDFields.H | 15 +- .../medialAxisMeshMover.C | 8 +- .../meshRefinement/meshRefinement.C | 30 ++- .../meshRefinement/meshRefinementBaffles.C | 2 +- .../snappyHexMeshDriver/snappyLayerDriver.C | 33 ++- .../cellVolumeWeightCellCellStencil.C | 6 +- .../inverseDistanceCellCellStencil.C | 4 +- .../trackingInverseDistanceCellCellStencil.C | 2 +- .../dynamicOversetFvMesh.C | 4 +- src/overset/include/createCellMask.H | 2 +- src/overset/include/createInterpolatedCells.H | 2 +- .../reactingOneDim/reactingOneDim.C | 30 +-- .../regionModel/regionModel1D/regionModel1D.C | 2 +- .../singleLayerRegion/singleLayerRegion.C | 4 +- .../kinematicSingleLayer.C | 122 +++++------ .../surfaceFilmModels/noFilm/noFilm.C | 69 +++---- .../constantFilmThermo/constantFilmThermo.C | 10 +- .../liquidFilmThermo/liquidFilmThermo.C | 10 +- .../filmTurbulenceModel/laminar/laminar.C | 23 +-- .../contactAngleForce/contactAngleForce.C | 2 +- .../distributionContactAngleForce.C | 2 +- ...bedTemperatureDependentContactAngleForce.C | 2 +- .../temperatureDependentContactAngleForce.C | 2 +- .../curvatureSeparation/curvatureSeparation.C | 4 +- .../constantRadiation/constantRadiation.C | 2 +- .../noRadiation/noRadiation.C | 21 +- .../primaryRadiation/primaryRadiation.C | 4 +- .../standardRadiation/standardRadiation.C | 6 +- .../thixotropicViscosity.C | 2 +- .../mappedConvectiveHeatTransfer.C | 2 +- .../solidification/solidification.C | 4 +- .../thermoSingleLayer/thermoSingleLayer.C | 31 ++- .../thermalBaffleModels/noThermo/noThermo.C | 2 +- .../thermalBaffle/thermalBaffle.C | 30 +-- .../rigidBodyMeshMotion/rigidBodyMeshMotion.C | 2 +- .../distanceSurface/distanceSurface.C | 4 +- .../sampledCuttingPlane/sampledCuttingPlane.C | 4 +- .../sampledSurface/sampledSurfaceTemplates.C | 2 +- .../surfMeshSamplerTemplates.C | 2 +- .../triSurfaceMesh/discreteSurfaceTemplates.C | 2 +- .../sixDoFRigidBodyMotionSolver.C | 2 +- .../barotropicCompressibilityModel.C | 2 +- .../TDACChemistryModel/TDACChemistryModel.C | 2 +- .../chemistryModel/chemistryModel.C | 8 +- .../laminarFlameSpeed/Gulders/Gulders.C | 4 +- .../laminarFlameSpeed/GuldersEGR/GuldersEGR.C | 4 +- .../RaviPetersen/RaviPetersen.C | 4 +- .../radiation/radiationModels/P1/P1.C | 18 +- .../radiationModels/fvDOM/fvDOM/fvDOM.C | 28 +-- .../radiativeIntensityRay.C | 10 +- .../radiationModels/noRadiation/noRadiation.C | 51 ++--- .../radiationModels/opaqueSolid/opaqueSolid.C | 51 ++--- .../solarLoad/faceShading/faceShading.C | 2 +- .../radiationModels/solarLoad/solarLoad.C | 48 ++--- .../radiationModels/viewFactor/viewFactor.C | 52 ++--- .../absorptionEmissionModel.C | 12 +- .../greyMeanAbsorptionEmission.C | 4 +- .../greyMeanSolidAbsorptionEmission.C | 2 +- .../multiBandSolidAbsorptionEmission.C | 2 +- .../wideBandAbsorptionEmission.C | 6 +- .../scatterModel/noScatter/noScatter.C | 2 +- .../noTransmissivity/noTransmissivity.C | 2 +- .../moleFractions/moleFractions.C | 2 +- .../basicSpecieMixture/basicSpecieMixture.C | 2 +- .../singleStepReactingMixture.C | 12 +- .../pyrolysisChemistryModel.C | 4 +- .../pyrolysisChemistryModelI.H | 2 +- .../solidChemistryModel/solidChemistryModel.C | 4 +- .../solidChemistryModelI.H | 4 +- ...emperatureCoupledMixedFvPatchScalarField.C | 2 +- .../rawTopoChangerFvMeshTemplates.C | 2 +- .../incompressibleTwoPhaseMixture.C | 2 +- .../strainRateFunction/strainRateFunction.C | 2 +- .../interfaceProperties/interfaceProperties.C | 4 +- 381 files changed, 1881 insertions(+), 2720 deletions(-) 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::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", Nv.dimensions(), 0.0) + dimensionedScalar(Nv.dimensions(), Zero) ); N.primitiveFieldRef() = Nv.primitiveField()*Cw; @@ -118,12 +118,7 @@ Foam::tmp<Foam::volScalarField> Foam::XiEqModels::basicSubGrid::XiEq() const IOobject::NO_WRITE ), U.mesh(), - dimensionedSymmTensor - ( - "zero", - nsv.dimensions(), - Zero - ) + dimensionedSymmTensor(nsv.dimensions(), Zero) ); ns.primitiveFieldRef() = nsv.primitiveField()*Cw; diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/basic/basic.C index 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::volSymmTensorField> Foam::PDRDragModels::basic::Dcu() const IOobject::NO_WRITE ), U_.mesh(), - dimensionedSymmTensor - ( - "zero", - dimMass/dimTime/pow(dimLength, 3), - Zero - ) + dimensionedSymmTensor(dimMass/dimTime/dimVolume, Zero) ) ); @@ -143,7 +138,7 @@ Foam::tmp<Foam::volScalarField> Foam::PDRDragModels::basic::Gk() const IOobject::NO_WRITE ), U_.mesh(), - dimensionedScalar("zero", dimMass/dimLength/pow(dimTime, 3), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) ); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C index 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::volScalarField> Foam::XiEqModels::SCOPEXiEq::XiEq() const IOobject::NO_WRITE ), epsilon.mesh(), - dimensionedScalar("XiEq", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); volScalarField& xieq = tXiEq.ref(); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C index 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::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi IOobject::NO_WRITE ), p.mesh(), - dimensionedScalar("Su0", dimVelocity, 0.0) + dimensionedScalar(dimVelocity, Zero) ) ); @@ -304,7 +304,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi IOobject::NO_WRITE ), p.mesh(), - dimensionedScalar("Su0", dimVelocity, 0.0) + dimensionedScalar(dimVelocity, Zero) ) ); @@ -358,7 +358,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Ma IOobject::NO_WRITE ), phi.mesh(), - dimensionedScalar("Ma", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); diff --git a/applications/solvers/combustion/XiFoam/bEqn.H b/applications/solvers/combustion/XiFoam/bEqn.H index 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<vector>("Us", dimVelocity, vector::zero) + dimensionedVector(dimVelocity, Zero) ); dimensioned<scalar> Uinf("Uinf", dimVelocity, 1.0); diff --git a/applications/solvers/finiteArea/sphereSurfactantFoam/createVolFields.H b/applications/solvers/finiteArea/sphereSurfactantFoam/createVolFields.H index 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<incompressible::turbulenceModel> turbulence ); -dimensionedScalar zeroSensitivity("0", dimVelocity*dimVelocity, 0.0); -dimensionedScalar zeroAlpha("0", dimless/dimTime, 0.0); +dimensionedScalar zeroSensitivity(dimVelocity*dimVelocity, Zero); +dimensionedScalar zeroAlpha(dimless/dimTime, Zero); dimensionedScalar lambda ( diff --git a/applications/solvers/incompressible/boundaryFoam/createFields.H b/applications/solvers/incompressible/boundaryFoam/createFields.H index 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<volScalarField> 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<volScalarField> 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<volScalarField> 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>(basicThermo::dictName) ); - const dimensionedScalar& TSat = thermo.TSat(); + const dimensionedScalar& TSat = thermo.TSat(); - dimensionedScalar T0("0", dimTemperature, 0.0); + const dimensionedScalar T0(dimTemperature, Zero); return Pair<tmp<volScalarField>> ( @@ -106,9 +106,9 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDot() const mesh_.lookupObject<basicThermo>(basicThermo::dictName) ); - const dimensionedScalar& TSat = thermo.TSat(); + const dimensionedScalar& TSat = thermo.TSat(); - dimensionedScalar T0("0", dimTemperature, 0.0); + const dimensionedScalar T0(dimTemperature, Zero); return Pair<tmp<volScalarField>> ( @@ -139,8 +139,7 @@ Foam::temperaturePhaseChangeTwoPhaseMixtures::constant::mDotDeltaT() const mesh_.lookupObject<basicThermo>(basicThermo::dictName) ); - const dimensionedScalar& TSat = thermo.TSat(); - + const dimensionedScalar& TSat = thermo.TSat(); return Pair<tmp<volScalarField>> ( diff --git a/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C b/applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C index 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::volScalarField> Foam::twoPhaseMixtureEThermo::hc() const { const fvMesh& mesh = this->T_.mesh(); - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "hc", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), + "hc", + mesh.time().timeName(), mesh, - dimensionedScalar("hc",Hf2() - Hf1()) - ) + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("hc", Hf2() - Hf1()) ); } diff --git a/applications/solvers/multiphase/interFoam/createFields.H b/applications/solvers/multiphase/interFoam/createFields.H index 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<volScalarField> 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::volScalarField> Foam::dragModels::interface::K const volScalarField& Ur ) const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "K", - Ur.mesh().time().timeName(), - Ur.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "K", + Ur.mesh().time().timeName(), Ur.mesh(), - dimensionedScalar("K", dimDensity/dimTime, 0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + Ur.mesh(), + dimensionedScalar(dimDensity/dimTime, Zero) ); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index 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::volScalarField> Foam::multiphaseSystem::Cvm mesh_ ), mesh_, - dimensionedScalar - ( - "Cvm", - dimensionSet(1, -3, 0, 0, 0), - 0 - ) + dimensionedScalar(dimensionSet(1, -3, 0, 0, 0), Zero) ) ); @@ -613,12 +608,7 @@ Foam::tmp<Foam::volVectorField> Foam::multiphaseSystem::Svm mesh_ ), mesh_, - dimensionedVector - ( - "Svm", - dimensionSet(1, -2, -2, 0, 0), - Zero - ) + dimensionedVector(dimensionSet(1, -2, -2, 0, 0), Zero) ) ); @@ -740,12 +730,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseSystem::dragCoeff mesh_ ), mesh_, - dimensionedScalar - ( - "dragCoeff", - dimensionSet(1, -3, -1, 0, 0), - 0 - ) + dimensionedScalar(dimensionSet(1, -3, -1, 0, 0), Zero) ) ); @@ -788,12 +773,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseSystem::surfaceTension mesh_ ), mesh_, - dimensionedScalar - ( - "surfaceTension", - dimensionSet(1, -2, -2, 0, 0), - 0 - ) + dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), Zero) ) ); tSurfaceTension.ref().setOriented(); @@ -840,7 +820,7 @@ Foam::multiphaseSystem::nearInterface() const mesh_ ), mesh_, - dimensionedScalar("nearInterface", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); @@ -897,7 +877,7 @@ void Foam::multiphaseSystem::solve() mesh_ ), mesh_, - dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0) + dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero) ) ); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/phaseModel/phaseModel.C index 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<Thermo, OtherThermo>::YfPrime const volScalarField& Tf ) const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("YfPrime", this->pair_.name()), - this->pair_.phase1().mesh().time().timeName(), - this->pair_.phase1().mesh() - ), - this->pair_.phase1().mesh(), - dimensionedScalar("zero", dimless/dimTemperature, 0) - ) + IOobject::groupName("YfPrime", this->pair_.name()), + this->pair_.phase1().mesh().time().timeName(), + this->pair_.phase1().mesh() + ), + this->pair_.phase1().mesh(), + dimensionedScalar(dimless/dimTemperature, Zero) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C index 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<Thermo, OtherThermo>::D p.mesh() ), p.mesh(), - dimensionedScalar("zero", dimArea/dimTime, 0) + dimensionedScalar(dimArea/dimTime, Zero) ) ); @@ -203,7 +203,7 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::L p.mesh() ), p.mesh(), - dimensionedScalar("zero", dimEnergy/dimMass, 0) + dimensionedScalar(dimEnergy/dimMass, Zero) ) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Raoult/Raoult.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/Raoult/Raoult.C index 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<Thermo, OtherThermo>::Raoult pair.phase1().mesh() ), pair.phase1().mesh(), - dimensionedScalar("zero", dimless/dimTemperature, 0) + dimensionedScalar(dimless/dimTemperature, Zero) ) { forAllConstIter(hashedWordList, this->speciesNames_, iter) diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/constantSaturationConditions/constantSaturationConditions.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/constantSaturationConditions/constantSaturationConditions.C index 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<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "pSat", - T.mesh().time().timeName(), - T.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "pSat", + T.mesh().time().timeName(), T.mesh(), - pSat_ - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + T.mesh(), + pSat_ ); } @@ -95,22 +92,19 @@ Foam::saturationModels::constantSaturationConditions::pSatPrime const volScalarField& T ) const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "pSatPrime", - T.mesh().time().timeName(), - T.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "pSatPrime", + T.mesh().time().timeName(), T.mesh(), - dimensionedScalar("zero", dimPressure/dimTemperature, 0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + T.mesh(), + dimensionedScalar(dimPressure/dimTemperature, Zero) ); } @@ -121,22 +115,19 @@ Foam::saturationModels::constantSaturationConditions::lnPSat const volScalarField& T ) const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "lnPSat", - T.mesh().time().timeName(), - T.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "lnPSat", + T.mesh().time().timeName(), T.mesh(), - dimensionedScalar("lnPSat", dimless, log(pSat_.value())) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + T.mesh(), + dimensionedScalar("lnPSat", dimless, log(pSat_.value())) ); } @@ -147,22 +138,19 @@ Foam::saturationModels::constantSaturationConditions::Tsat const volScalarField& p ) const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "Tsat", - p.mesh().time().timeName(), - p.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "Tsat", + p.mesh().time().timeName(), p.mesh(), - Tsat_ - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + p.mesh(), + Tsat_ ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/function1/function1.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/saturationModels/function1/function1.C index 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::volScalarField> Foam::dragModels::segregated::K() const mesh ), mesh, - dimensionedScalar("L", dimLength, 0), + dimensionedScalar(dimLength, Zero), zeroGradientFvPatchField<scalar>::typeName ); L.primitiveFieldRef() = cbrt(mesh.V()); diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C index 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<volScalarField> + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - Cl_ - ) - ); + "zero", + mesh.time().timeName(), + mesh + ), + mesh, + Cl_ + ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/noLift/noLift.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/liftModels/noLift/noLift.C index 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::volScalarField> Foam::liftModels::noLift::Cl() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "Cl", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "Cl", + mesh.time().timeName(), mesh, - dimensionedScalar("Cl", dimless, 0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedScalar(dimless, Zero) ); } @@ -87,22 +84,19 @@ Foam::tmp<Foam::volVectorField> Foam::liftModels::noLift::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<volVectorField> + return tmp<volVectorField>::New ( - new volVectorField + IOobject ( - IOobject - ( - "noLift:F", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noLift:F", + mesh.time().timeName(), mesh, - dimensionedVector("zero", dimF, Zero) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedVector(dimF, Zero) ); } @@ -111,22 +105,19 @@ Foam::tmp<Foam::surfaceScalarField> Foam::liftModels::noLift::Ff() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - "noLift:Ff", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noLift:Ff", + mesh.time().timeName(), mesh, - dimensionedScalar("zero", dimF*dimArea, 0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedScalar(dimF*dimArea, Zero) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C index 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<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "zero", + mesh.time().timeName(), mesh, - dimensionedScalar("zero", dimD, 0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedScalar(dimD, Zero) ); } @@ -95,21 +92,17 @@ Foam::turbulentDispersionModels::noTurbulentDispersion::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp<volVectorField> + return tmp<volVectorField>::New + ( + IOobject ( - new volVectorField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedVector("zero", dimF, Zero) - ) - ); + "zero", + mesh.time().timeName(), + mesh + ), + mesh, + dimensionedVector(dimF, Zero) + ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C index 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<volScalarField> + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedScalar("zero", dimless, 0) - ) - ); + "zero", + mesh.time().timeName(), + mesh + ), + mesh, + dimensionedScalar(dimless, Zero) + ); } Foam::tmp<Foam::volScalarField> Foam::virtualMassModels::noVirtualMass::K() const { - return Cvm()*dimensionedScalar("zero", dimDensity, 0); + return Cvm()*dimensionedScalar("zero", dimDensity, Zero); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Antal/Antal.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Antal/Antal.C index 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::volVectorField> Foam::wallLubricationModels::Antal::Fi() const ( max ( - dimensionedScalar("zero", dimless/dimLength, 0), + dimensionedScalar(dimless/dimLength, Zero), Cw1_/pair_.dispersed().d() + Cw2_/yWall() ) *pair_.continuous().rho() diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C index 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::volVectorField> Foam::wallLubricationModels::Frank::Fi() const ) *max ( - dimensionedScalar("zero", dimless/dimLength, 0.0), + dimensionedScalar(dimless/dimLength, Zero), (1.0 - yTilde)/(Cwd_*y*pow(yTilde, p_ - 1.0)) ) *pair_.continuous().rho() diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C index 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<volVectorField> + return tmp<volVectorField>::New ( - new volVectorField + IOobject ( - IOobject - ( - "noWallLubrication:Fi", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noWallLubrication:Fi", + mesh.time().timeName(), mesh, - dimensionedVector("zero", dimF, Zero) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedVector(dimF, Zero) ); } @@ -94,22 +91,19 @@ Foam::wallLubricationModels::noWallLubrication::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<volVectorField> + return tmp<volVectorField>::New ( - new volVectorField + IOobject ( - IOobject - ( - "noWallLubrication:F", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noWallLubrication:F", + mesh.time().timeName(), mesh, - dimensionedVector("zero", dimF, Zero) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedVector(dimF, Zero) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C index 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<ModelType>::K() const false ), phase1_.mesh(), - dimensionedScalar("zero", ModelType::dimK, 0) + dimensionedScalar(ModelType::dimK, Zero) ) ); @@ -255,7 +255,7 @@ Foam::BlendedInterfacialModel<ModelType>::K(const scalar residualAlpha) const false ), phase1_.mesh(), - dimensionedScalar("zero", ModelType::dimK, 0) + dimensionedScalar(ModelType::dimK, Zero) ) ); @@ -321,7 +321,7 @@ Foam::BlendedInterfacialModel<ModelType>::Kf() const false ), phase1_.mesh(), - dimensionedScalar("zero", ModelType::dimK, 0) + dimensionedScalar(ModelType::dimK, Zero) ) ); @@ -384,7 +384,7 @@ Foam::BlendedInterfacialModel<ModelType>::F() const false ), phase1_.mesh(), - dimensioned<Type>("zero", ModelType::dimF, Zero) + dimensioned<Type>(ModelType::dimF, Zero) ) ); @@ -452,7 +452,7 @@ Foam::BlendedInterfacialModel<ModelType>::Ff() const false ), phase1_.mesh(), - dimensionedScalar("zero", ModelType::dimF*dimArea, 0) + dimensionedScalar(ModelType::dimF*dimArea, Zero) ) ); x.ref().setOriented(); @@ -515,7 +515,7 @@ Foam::BlendedInterfacialModel<ModelType>::D() const false ), phase1_.mesh(), - dimensionedScalar("zero", ModelType::dimD, 0) + dimensionedScalar(ModelType::dimD, Zero) ) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatAndMassTransferPhaseSystem/HeatAndMassTransferPhaseSystem.C index 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<BasePhaseSystem>::dmdt this->mesh_ ), this->mesh_, - dimensionedScalar("zero", dimDensity/dimTime, 0) + dimensionedScalar(dimDensity/dimTime, Zero) ) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/HeatTransferPhaseSystem/HeatTransferPhaseSystem.C index 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<BasePhaseSystem>::dmdt const phasePairKey& key ) const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject + IOobject::groupName ( - IOobject::groupName - ( - "dmdt", - this->phasePairs_[key]->name() + "dmdt", + this->phasePairs_[key]->name() ), - this->mesh().time().timeName(), - this->mesh().time() - ), - this->mesh(), - dimensionedScalar("zero", dimDensity/dimTime, 0) - ) + this->mesh().time().timeName(), + this->mesh().time() + ), + this->mesh(), + dimensionedScalar(dimDensity/dimTime, Zero) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/InterfaceCompositionPhaseChangePhaseSystem/InterfaceCompositionPhaseChangePhaseSystem.C index 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<BasePhaseSystem>::Kd this->mesh_ ), this->mesh_, - dimensionedScalar - ( - IOobject::groupName("Kd", phase.name()), - dimensionSet(1, -3, -1, 0, 0), - 0 - ) + dimensionedScalar(dimensionSet(1, -3, -1, 0, 0), Zero) ) ); @@ -210,26 +205,21 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Vm { return virtualMassModels_[key]->K(); } - else - { - return tmp<volScalarField> + + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - virtualMassModel::typeName + ":K", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedScalar("zero", virtualMassModel::dimK, 0) - ) - ); - } + virtualMassModel::typeName + ":K", + this->mesh_.time().timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(virtualMassModel::dimK, Zero) + ); } @@ -244,26 +234,21 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Vmf { return virtualMassModels_[key]->Kf(); } - else - { - return tmp<surfaceScalarField> + + return tmp<surfaceScalarField>::New + ( + IOobject ( - new surfaceScalarField - ( - IOobject - ( - virtualMassModel::typeName + ":Kf", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedScalar("zero", virtualMassModel::dimK, 0) - ) - ); - } + virtualMassModel::typeName + ":Kf", + this->mesh_.time().timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(virtualMassModel::dimK, Zero) + ); } @@ -288,26 +273,21 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::F { return wallLubricationModels_[key]->template F<vector>(); } - else - { - return tmp<volVectorField> + + return tmp<volVectorField>::New + ( + IOobject ( - new volVectorField - ( - IOobject - ( - liftModel::typeName + ":F", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedVector("zero", liftModel::dimF, Zero) - ) - ); - } + liftModel::typeName + ":F", + this->mesh_.time().timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedVector(liftModel::dimF, Zero) + ); } @@ -348,7 +328,7 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::Ff false ), this->mesh_, - dimensionedScalar("zero", liftModel::dimF*dimArea, 0) + dimensionedScalar(liftModel::dimF*dimArea, Zero) ) ); @@ -370,26 +350,21 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::D { return turbulentDispersionModels_[key]->D(); } - else - { - return tmp<volScalarField> + + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - turbulentDispersionModel::typeName + ":D", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedScalar("zero", turbulentDispersionModel::dimD, 0) - ) - ); - } + turbulentDispersionModel::typeName + ":D", + this->mesh_.time().timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(turbulentDispersionModel::dimD, Zero) + ); } @@ -504,7 +479,7 @@ Foam::volVectorField& Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::setF false ), this->mesh_, - dimensionedVector("zero", liftModel::dimF, Zero) + dimensionedVector(liftModel::dimF, Zero) ) ); } @@ -575,9 +550,8 @@ Foam::MomentumTransferPhaseSystem<BasePhaseSystem>::setPhiD this->mesh_, dimensionedScalar ( - "zero", dimTime*dimArea*turbulentDispersionModel::dimF/dimDensity, - 0 + Zero ) ) ); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/PhaseSystems/ThermalPhaseChangePhaseSystem/ThermalPhaseChangePhaseSystem.C index 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<BasePhaseSystem>::heatTransfer() const false ), phase.mesh(), - dimensionedScalar("",dimensionSet(1,-1,-3,0,0),0.0) + dimensionedScalar(dimensionSet(1,-1,-3,0,0), Zero) ); if @@ -274,7 +274,7 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::iDmdt this->mesh_ ), this->mesh_, - dimensionedScalar("zero", dimDensity/dimTime, 0) + dimensionedScalar(dimDensity/dimTime, Zero) ) ); @@ -383,7 +383,7 @@ void Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctThermo() } else { - iDmdtNew == dimensionedScalar("0",dmdt.dimensions(), 0); + iDmdtNew == dimensionedScalar(dmdt.dimensions(), Zero); } volScalarField H1(this->heatTransferModels_[pair][pair.first()]->K()); @@ -430,7 +430,7 @@ void Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctThermo() false ), this->mesh(), - dimensionedScalar("zero", dimDensity/dimTime, 0) + dimensionedScalar(dimDensity/dimTime, Zero) ); if diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C index 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<BasePhaseModel>::AnisothermalPhaseModel fluid.mesh() ), fluid.mesh(), - dimensionedScalar("K", sqr(dimVelocity), scalar(0)) + dimensionedScalar(sqr(dimVelocity), Zero) ) {} diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/InertPhaseModel/InertPhaseModel.C index 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<class BasePhaseModel> Foam::tmp<Foam::volScalarField> Foam::InertPhaseModel<BasePhaseModel>::Qdot() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("Qdot", this->name()), - this->mesh().time().timeName(), - this->mesh() - ), - this->mesh(), - dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0) - ) + IOobject::groupName("Qdot", this->name()), + this->mesh().time().timeName(), + this->mesh() + ), + this->mesh(), + dimensionedScalar(dimEnergy/dimTime/dimVolume, Zero) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C index 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<BasePhaseModel>::MovingPhaseModel fluid.mesh() ), fluid.mesh(), - dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0) + dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero) ), alphaRhoPhi_ ( @@ -162,7 +162,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel fluid.mesh() ), fluid.mesh(), - dimensionedScalar("0", dimensionSet(1, 0, -1, 0, 0), 0) + dimensionedScalar(dimensionSet(1, 0, -1, 0, 0), Zero) ), DUDt_ ( @@ -173,7 +173,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel fluid.mesh() ), fluid.mesh(), - dimensionedVector("0", dimAcceleration, Zero) + dimensionedVector(dimAcceleration, Zero) ), divU_(nullptr), turbulence_ @@ -197,7 +197,7 @@ Foam::MovingPhaseModel<BasePhaseModel>::MovingPhaseModel fluid.mesh() ), fluid.mesh(), - dimensionedScalar("0", dimDensity/dimTime, 0) + dimensionedScalar(dimDensity/dimTime, Zero) ) { alphaPhi_.setOriented(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/MultiComponentPhaseModel/MultiComponentPhaseModel.C index 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<BasePhaseModel>::correctThermo() this->fluid().mesh() ), this->fluid().mesh(), - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ); PtrList<volScalarField>& Yi = Y(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C index 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<volScalarField> + + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - aspectRatioModel::typeName + ":E", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedScalar("zero", dimless, 1) - ) - ); - } + aspectRatioModel::typeName + ":E", + this->mesh_.time().timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar("one", dimless, 1) + ); } @@ -255,26 +250,21 @@ Foam::phaseSystem::sigma(const phasePairKey& key) const { return surfaceTensionModels_[key]->sigma(); } - else - { - return tmp<volScalarField> + + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - surfaceTensionModel::typeName + ":sigma", - this->mesh_.time().timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - this->mesh_, - dimensionedScalar("zero", surfaceTensionModel::dimSigma, 0) - ) - ); - } + surfaceTensionModel::typeName + ":sigma", + this->mesh_.time().timeName(), + this->mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(surfaceTensionModel::dimSigma, Zero) + ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index 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::surfaceScalarField> Foam::multiphaseSystem::surfaceTension mesh_ ), mesh_, - dimensionedScalar - ( - "surfaceTension", - dimensionSet(1, -2, -2, 0, 0), - 0 - ) + dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), Zero) ) ); @@ -589,7 +584,7 @@ Foam::multiphaseSystem::nearInterface() const mesh_ ), mesh_, - dimensionedScalar("nearInterface", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); @@ -651,7 +646,7 @@ void Foam::multiphaseSystem::solve() mesh_ ), mesh_, - dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0) + dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero) ) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/pU/pEqn.H index 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::volScalarField> Foam::kineticTheoryModels::noneViscosity::nu const dimensionedScalar& e ) const { - return dimensionedScalar - ( - "0", - dimensionSet(0, 2, -1, 0, 0, 0, 0), - 0.0 - )*alpha1; + return dimensionedScalar(dimViscosity, Zero)*alpha1; } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C index 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::volSymmTensorField> Foam::RASModels::phasePressureModel::R() const { - return tmp<volSymmTensorField> + return tmp<volSymmTensorField>::New ( - new volSymmTensorField + IOobject ( - IOobject - ( - IOobject::groupName("R", U_.group()), - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("R", U_.group()), + runTime_.timeName(), mesh_, - dimensioned<symmTensor> - ( - "R", - dimensionSet(0, 2, -2, 0, 0), - Zero - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensioned<symmTensor>(dimensionSet(0, 2, -2, 0, 0)) //Zero ); } @@ -210,25 +202,20 @@ Foam::RASModels::phasePressureModel::pPrimef() const Foam::tmp<Foam::volSymmTensorField> Foam::RASModels::phasePressureModel::devRhoReff() const { - return tmp<volSymmTensorField> + return tmp<volSymmTensorField>::New ( - new volSymmTensorField + IOobject ( - IOobject - ( - IOobject::groupName("devRhoReff", U_.group()), - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("devRhoReff", U_.group()), + runTime_.timeName(), mesh_, - dimensioned<symmTensor> - ( - "R", - rho_.dimensions()*dimensionSet(0, 2, -2, 0, 0), - Zero - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensioned<symmTensor> + ( + rho_.dimensions()*dimensionSet(0, 2, -2, 0, 0), Zero ) ); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/dummy/dummy.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/dummy/dummy.C index 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<volScalarField> + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - E0_ - ) - ); + "zero", + mesh.time().timeName(), + mesh + ), + mesh, + E0_ + ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/segregated/segregated.C index 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::volScalarField> Foam::dragModels::segregated::K() const mesh ), mesh, - dimensionedScalar("L", dimLength, 0), + dimensionedScalar(dimLength, Zero), zeroGradientFvPatchField<scalar>::typeName ); L.primitiveFieldRef() = cbrt(mesh.V()); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/constantLiftCoefficient/constantLiftCoefficient.C index 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<volScalarField> + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - Cl_ - ) - ); + "zero", + mesh.time().timeName(), + mesh + ), + mesh, + Cl_ + ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/noLift/noLift.C index 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::volScalarField> Foam::liftModels::noLift::Cl() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "Cl", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "Cl", + mesh.time().timeName(), mesh, - dimensionedScalar("Cl", dimless, 0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedScalar(dimless, Zero) ); } @@ -87,22 +84,19 @@ Foam::tmp<Foam::volVectorField> Foam::liftModels::noLift::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<volVectorField> + return tmp<volVectorField>::New ( - new volVectorField + IOobject ( - IOobject - ( - "noLift:F", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noLift:F", + mesh.time().timeName(), mesh, - dimensionedVector("zero", dimF, Zero) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedVector(dimF, Zero) ); } @@ -111,22 +105,19 @@ Foam::tmp<Foam::surfaceScalarField> Foam::liftModels::noLift::Ff() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - "noLift:Ff", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noLift:Ff", + mesh.time().timeName(), mesh, - dimensionedScalar("zero", dimF*dimArea, 0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedScalar(dimF*dimArea, Zero) ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/turbulentDispersionModels/noTurbulentDispersion/noTurbulentDispersion.C index 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<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "zero", + mesh.time().timeName(), mesh, - dimensionedScalar("zero", dimD, 0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedScalar(dimD, Zero) ); } @@ -95,21 +92,17 @@ Foam::turbulentDispersionModels::noTurbulentDispersion::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return - tmp<volVectorField> + return tmp<volVectorField>::New + ( + IOobject ( - new volVectorField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedVector("zero", dimF, Zero) - ) - ); + "zero", + mesh.time().timeName(), + mesh + ), + mesh, + dimensionedVector(dimF, Zero) + ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/virtualMassModels/noVirtualMass/noVirtualMass.C index 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<volScalarField> + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - "zero", - mesh.time().timeName(), - mesh - ), - mesh, - dimensionedScalar("zero", dimless, 0) - ) - ); + "zero", + mesh.time().timeName(), + mesh + ), + mesh, + dimensionedScalar(dimless, Zero) + ); } Foam::tmp<Foam::volScalarField> Foam::virtualMassModels::noVirtualMass::K() const { - return Cvm()*dimensionedScalar("zero", dimDensity, 0); + return Cvm()*dimensionedScalar("zero", dimDensity, Zero); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Antal/Antal.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Antal/Antal.C index 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::volVectorField> Foam::wallLubricationModels::Antal::Fi() const return max ( - dimensionedScalar("zero", dimless/dimLength, 0), + dimensionedScalar(dimless/dimLength, Zero), Cw1_/pair_.dispersed().d() + Cw2_/yWall() ) *pair_.continuous().rho() diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/Frank/Frank.C index 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::volVectorField> Foam::wallLubricationModels::Frank::Fi() const ) *max ( - dimensionedScalar("zero", dimless/dimLength, 0.0), + dimensionedScalar(dimless/dimLength, Zero), (1.0 - yTilde)/(Cwd_*y*pow(yTilde, p_ - 1.0)) ) *pair_.continuous().rho() diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/wallLubricationModels/noWallLubrication/noWallLubrication.C index 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<volVectorField> + return tmp<volVectorField>::New ( - new volVectorField + IOobject ( - IOobject - ( - "noWallLubrication:Fi", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noWallLubrication:Fi", + mesh.time().timeName(), mesh, - dimensionedVector("zero", dimF, Zero) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedVector(dimF, Zero) ); } @@ -94,22 +91,19 @@ Foam::wallLubricationModels::noWallLubrication::F() const { const fvMesh& mesh(this->pair_.phase1().mesh()); - return tmp<volVectorField> + return tmp<volVectorField>::New ( - new volVectorField + IOobject ( - IOobject - ( - "noWallLubrication:F", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noWallLubrication:F", + mesh.time().timeName(), mesh, - dimensionedVector("zero", dimF, Zero) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh, + dimensionedVector(dimF, Zero) ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/kineticTheoryModels/frictionalStressModel/JohnsonJacksonSchaeffer/JohnsonJacksonSchaefferFrictionalStress.C index 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::volScalarField> Foam::kineticTheoryModels::noneViscosity::nu const dimensionedScalar& e ) const { - return dimensionedScalar - ( - "0", - dimensionSet(0, 2, -1, 0, 0, 0, 0), - 0.0 - )*alpha1; + return dimensionedScalar(dimViscosity, Zero)*alpha1; } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phasePressureModel/phasePressureModel.C index 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::volSymmTensorField> Foam::RASModels::phasePressureModel::R() const { - return tmp<volSymmTensorField> + return tmp<volSymmTensorField>::New ( - new volSymmTensorField + IOobject ( - IOobject - ( - IOobject::groupName("R", U_.group()), - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("R", U_.group()), + runTime_.timeName(), mesh_, - dimensioned<symmTensor> - ( - "R", - dimensionSet(0, 2, -2, 0, 0), - Zero - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensioned<symmTensor>(dimensionSet(0, 2, -2, 0, 0), Zero) ); } @@ -216,25 +208,20 @@ Foam::RASModels::phasePressureModel::pPrimef() const Foam::tmp<Foam::volSymmTensorField> Foam::RASModels::phasePressureModel::devRhoReff() const { - return tmp<volSymmTensorField> + return tmp<volSymmTensorField>::New ( - new volSymmTensorField + IOobject ( - IOobject - ( - IOobject::groupName("devRhoReff", U_.group()), - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("devRhoReff", U_.group()), + runTime_.timeName(), mesh_, - dimensioned<symmTensor> - ( - "R", - rho_.dimensions()*dimensionSet(0, 2, -2, 0, 0), - Zero - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensioned<symmTensor> + ( + rho_.dimensions()*dimensionSet(0, 2, -2, 0, 0), Zero ) ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C index 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<modelType>::K() const false ), pair_.phase1().mesh(), - dimensionedScalar("zero", modelType::dimK, 0) + dimensionedScalar(modelType::dimK, Zero) ) ); @@ -219,7 +219,7 @@ Foam::BlendedInterfacialModel<modelType>::Kf() const false ), pair_.phase1().mesh(), - dimensionedScalar("zero", modelType::dimK, 0) + dimensionedScalar(modelType::dimK, Zero) ) ); @@ -282,7 +282,7 @@ Foam::BlendedInterfacialModel<modelType>::F() const false ), pair_.phase1().mesh(), - dimensioned<Type>("zero", modelType::dimF, Zero) + dimensioned<Type>(modelType::dimF, Zero) ) ); @@ -350,7 +350,7 @@ Foam::BlendedInterfacialModel<modelType>::Ff() const false ), pair_.phase1().mesh(), - dimensionedScalar("zero", modelType::dimF*dimArea, 0) + dimensionedScalar(modelType::dimF*dimArea, Zero) ) ); @@ -412,7 +412,7 @@ Foam::BlendedInterfacialModel<modelType>::D() const false ), pair_.phase1().mesh(), - dimensionedScalar("zero", modelType::dimD, 0) + dimensionedScalar(modelType::dimD, Zero) ) ); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/dummy/dummy.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/dummy/dummy.C index 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::volScalarField> Foam::diameterModels::IATEsources::dummy::R() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "R", - iate_.phase().U().time().timeName(), - iate_.phase().mesh() - ), - iate_.phase().U().mesh(), - dimensionedScalar("R", dimless/dimTime, 0) - ) + "R", + iate_.phase().U().time().timeName(), + iate_.phase().mesh() + ), + iate_.phase().U().mesh(), + dimensionedScalar(dimless/dimTime, Zero) ); } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/IATE/IATEsources/randomCoalescence/randomCoalescence.C index 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<volScalarField> createScalarField false ), mesh, - dimensionedScalar("zero", dimless, 0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ) ); diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index 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<Type>("zero", dimless, Zero) + dimensioned<Type>(dimless, Zero) ); diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C index 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<Type> - ( - "zero", - readField.dimensions(), - Zero - ) + dimensioned<Type>(readField.dimensions(), Zero) ) ); diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H b/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H index 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. @@ -71,17 +71,43 @@ void Foam::dimensioned<Type>::initialize(Istream& is) // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // +template<class Type> +Foam::dimensioned<Type>::dimensioned() +: + name_("0"), + dimensions_(dimless), + value_(Zero) +{} + + +template<class Type> +Foam::dimensioned<Type>::dimensioned(const dimensionSet& dims) +: + name_("0"), + dimensions_(dims), + value_(Zero) +{} + + +template<class Type> +Foam::dimensioned<Type>::dimensioned(const dimensionSet& dims, const zero) +: + name_("0"), + dimensions_(dims), + value_(Zero) +{} + + template<class Type> Foam::dimensioned<Type>::dimensioned ( const word& name, - const dimensionSet& dimSet, - const Type t + const dimensioned<Type>& dt ) : name_(name), - dimensions_(dimSet), - value_(t) + dimensions_(dt.dimensions_), + value_(dt.value_) {} @@ -89,12 +115,13 @@ template<class Type> Foam::dimensioned<Type>::dimensioned ( const word& name, - const dimensioned<Type>& dt + const dimensionSet& dims, + const Type& val ) : name_(name), - dimensions_(dt.dimensions_), - value_(dt.value_) + dimensions_(dims), + value_(val) {} @@ -131,12 +158,12 @@ template<class Type> Foam::dimensioned<Type>::dimensioned ( const word& name, - const dimensionSet& dimSet, + const dimensionSet& dims, Istream& is ) : name_(name), - dimensions_(dimSet), + dimensions_(dims), value_(Zero) { initialize(is); @@ -147,40 +174,18 @@ template<class Type> Foam::dimensioned<Type>::dimensioned ( const word& name, - const dimensionSet& dimSet, + const dimensionSet& dims, const dictionary& dict ) : name_(name), - dimensions_(dimSet), + dimensions_(dims), value_(Zero) { initialize(dict.lookup(name)); } -template<class Type> -Foam::dimensioned<Type>::dimensioned -() -: - name_("undefined"), - dimensions_(dimless), - value_(Zero) -{} - - -template<class Type> -Foam::dimensioned<Type>::dimensioned -( - const dimensionSet& dimSet -) -: - name_("0"), - dimensions_(dimSet), - value_(Zero) -{} - - // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * // template<class Type> @@ -196,10 +201,8 @@ Foam::dimensioned<Type> Foam::dimensioned<Type>::lookupOrDefault { return dimensioned<Type>(name, dims, dict.lookup(name)); } - else - { - return dimensioned<Type>(name, dims, defaultValue); - } + + return dimensioned<Type>(name, dims, defaultValue); } diff --git a/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.H b/src/OpenFOAM/dimensionedTypes/dimensionedType/dimensionedType.H index 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 Type> class dimensioned; @@ -55,7 +57,6 @@ Istream& operator>>(Istream&, dimensioned<Type>&); template<class Type> Ostream& operator<<(Ostream&, const dimensioned<Type>&); -class dictionary; /*---------------------------------------------------------------------------*\ Class dimensioned Declaration @@ -91,37 +92,50 @@ public: // Constructors - //- Construct given a name, a value and its dimensionSet. - dimensioned(const word&, const dimensionSet&, const Type); + //- Null constructor: a dimensionless Zero, named "0" + dimensioned(); + + //- A dimensioned Zero, named "0" + explicit dimensioned(const dimensionSet& dims); - //- Construct from a dimensioned<Type> changing the name. - dimensioned(const word&, const dimensioned<Type>&); + //- A dimensioned Zero, named "0" + explicit dimensioned(const dimensionSet& dims, const zero); - //- Construct given a value (creates dimensionless value). - dimensioned(const Type& t) + //- Construct dimensionless from given value. + dimensioned(const Type& val) : - name_(::Foam::name(t)), + name_(::Foam::name(val)), dimensions_(dimless), - value_(t) + value_(val) {} - //- Construct from Istream. - dimensioned(Istream&); + //- Copy construct a dimensioned Type with a new name + dimensioned(const word& name, const dimensioned<Type>& dt); - //- Construct from an Istream with a given name - dimensioned(const word&, Istream&); + //- Construct from components: name, dimensionSet and a value. + dimensioned + ( + const word& name, + const dimensionSet& dims, + const Type& val + ); - //- Construct from an Istream with a given name and dimensions - dimensioned(const word&, const dimensionSet&, Istream&); + //- Construct from Istream. + dimensioned(Istream& is); - //- Construct from dictionary lookup with a given name and dimensions - dimensioned(const word&, const dimensionSet&, const dictionary&); + //- Construct from Istream with a given name + dimensioned(const word& name, Istream& is); - //- Null constructor - a dimensionless Zero, named "undefined" - dimensioned(); + //- Construct from Istream with a given name and dimensions + dimensioned(const word& name, const dimensionSet& dims, Istream& is); - //- A dimensioned Zero, named "0" - explicit dimensioned(const dimensionSet&); + //- Construct from dictionary lookup with a given name and dimensions + dimensioned + ( + const word& name, + const dimensionSet& dims, + const dictionary& dict + ); // Static member functions @@ -129,8 +143,8 @@ public: //- Construct from dictionary, with default dimensions and value. static dimensioned<Type> lookupOrDefault ( - const word&, - const dictionary&, + const word& name, + const dictionary& dict, const dimensionSet& dims = dimless, const Type& defaultValue = Type(Zero) ); @@ -138,8 +152,8 @@ public: //- Construct from dictionary dimensionless with value. static dimensioned<Type> lookupOrDefault ( - const word&, - const dictionary&, + const word& name, + const dictionary& dict, const Type& defaultValue = Type(Zero) ); @@ -147,8 +161,8 @@ public: // If the value is not found, it is added into the dictionary. static dimensioned<Type> lookupOrAddToDict ( - const word&, - dictionary&, + const word& name, + dictionary& dict, const dimensionSet& dims = dimless, const Type& defaultValue = Type(Zero) ); @@ -157,8 +171,8 @@ public: // If the value is not found, it is added into the dictionary. static dimensioned<Type> lookupOrAddToDict ( - const word&, - dictionary&, + const word& name, + dictionary& dict, const Type& defaultValue = Type(Zero) ); @@ -184,28 +198,28 @@ public: Type& value(); //- Return a component as a dimensioned<cmptType> - dimensioned<cmptType> component(const direction) const; + dimensioned<cmptType> component(const direction d) const; //- Return a component with a dimensioned<cmptType> - void replace(const direction, const dimensioned<cmptType>&); + void replace(const direction d, const dimensioned<cmptType>& dc); //- Return transpose. dimensioned<Type> T() const; //- Update the value of dimensioned<Type> - void read(const dictionary&); + void read(const dictionary& dict); //- Update the value of dimensioned<Type> if found in the dictionary. - bool readIfPresent(const dictionary&); + bool readIfPresent(const dictionary& dict); // I/O //- Read value from stream and units from dictionary - Istream& read(Istream& is, const dictionary&); + Istream& read(Istream& is, const dictionary& readSet); //- Read value from stream and units from table - Istream& read(Istream& is, const HashTable<dimensionedScalar>&); + Istream& read(Istream& is, const HashTable<dimensionedScalar>& readSet); //- Read value from stream and units from system table Istream& read(Istream& is); @@ -214,21 +228,27 @@ public: // Member operators //- Return a component as a dimensioned<cmptType> - dimensioned<cmptType> operator[](const direction) const; + dimensioned<cmptType> operator[](const direction d) const; - void operator+=(const dimensioned<Type>&); - void operator-=(const dimensioned<Type>&); - void operator*=(const scalar); - void operator/=(const scalar); + void operator+=(const dimensioned<Type>& dt); + void operator-=(const dimensioned<Type>& dt); + void operator*=(const scalar s); + void operator/=(const scalar s); // IOstream operators friend Istream& operator>> <Type> - (Istream&, dimensioned<Type>&); + ( + Istream& is, + dimensioned<Type>& dt + ); friend Ostream& operator<< <Type> - (Ostream&, const dimensioned<Type>&); + ( + Ostream& os, + const dimensioned<Type>& dt + ); }; diff --git a/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H b/src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedField.H index 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<Type>&& field ); - //- Construct from components + //- Construct from components, setting the initial size and assigning + //- the dimensions, but not initialising any field values. // Used for temporary fields which are initialised after construction DimensionedField ( @@ -154,7 +155,9 @@ public: const bool checkIOFlags = true ); - //- Construct from components + //- Construct from components, setting the initial size and assigning + //- both dimensions and values. + // The internal name for the dimensioned\<Type\> has no influence. DimensionedField ( const IOobject& io, @@ -163,7 +166,7 @@ public: const bool checkIOFlags = true ); - //- Construct from Istream + //- Construct from Istream. DimensionedField ( const IOobject& io, @@ -180,20 +183,20 @@ public: const word& fieldDictEntry = "value" ); - //- Construct as copy + //- Copy construct DimensionedField ( const DimensionedField<Type, GeoMesh>& df ); - //- Construct as copy or re-use as specified. + //- Copy construct or reuse (move) as specified. DimensionedField ( DimensionedField<Type, GeoMesh>& df, bool reuse ); - //- Construct by transferring the DimensionedField + //- Move construct explicit DimensionedField ( DimensionedField<Type, GeoMesh>&& df @@ -207,14 +210,14 @@ public: ); #endif - //- Construct as copy resetting IO parameters + //- Copy construct, resetting IO parameters DimensionedField ( const IOobject& io, const DimensionedField<Type, GeoMesh>& df ); - //- Construct as copy resetting IO parameters and re-use as specified. + //- Copy or move construct, resetting IO parameters. DimensionedField ( const IOobject& io, @@ -222,14 +225,14 @@ public: bool reuse ); - //- Construct as copy resetting name + //- Copy construct, resetting name DimensionedField ( const word& newName, const DimensionedField<Type, GeoMesh>& df ); - //- Construct as copy resetting name and re-use as specified. + //- Copy or move construct, resetting name. DimensionedField ( const word& newName, @@ -237,7 +240,7 @@ public: bool reuse ); - //- Construct by transferring the DimensionedField with a new name + //- Move construct with a new name DimensionedField ( const word& newName, @@ -343,6 +346,8 @@ public: void operator=(const DimensionedField<Type, GeoMesh>& df); void operator=(const tmp<DimensionedField<Type, GeoMesh>>& tdf); + + //- Assign dimensions and value. void operator=(const dimensioned<Type>& dt); void operator+=(const DimensionedField<Type, GeoMesh>& df); diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.C index 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<Type, PatchField, GeoMesh>::GeometricField const GeometricField<Type, PatchField, GeoMesh>& gf, const wordList& patchFieldTypes, const wordList& actualPatchTypes - ) : Internal(io, gf), diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricField.H index 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 Type, template<class> class PatchField, class GeoMesh> class GeometricField; @@ -291,44 +290,48 @@ public: // Constructors - //- Constructor given IOobject, mesh, dimensions and patch type. - // This allocates storage for the field but not values. + //- Construct given IOobject, mesh, dimensions and patch type. + // This allocates storage for the field but does not set values. // Used only within this class to create TEMPORARY variables GeometricField ( - const IOobject&, - const Mesh&, - const dimensionSet&, + const IOobject& io, + const Mesh& mesh, + const dimensionSet& ds, const word& patchFieldType=PatchField<Type>::calculatedType() ); - //- Constructor given IOobject, mesh, dimensions and patch types. - // This allocates storage for the field but not values. + //- Construct given IOobject, mesh, dimensions and patch types. + // This allocates storage for the field but does not set values. // Used only within this class to create TEMPORARY variables GeometricField ( - const IOobject&, - const Mesh&, - const dimensionSet&, + const IOobject& io, + const Mesh& mesh, + const dimensionSet& ds, const wordList& wantedPatchTypes, const wordList& actualPatchTypes = wordList() ); - //- Constructor given IOobject, mesh, dimensioned<Type> and patch type. + //- Construct given IOobject, mesh, dimensioned<Type> and patch type. + // This assigns both dimensions and values. + // The internal name for the dimensioned\<Type\> has no influence. GeometricField ( - const IOobject&, - const Mesh&, - const dimensioned<Type>&, + const IOobject& io, + const Mesh& mesh, + const dimensioned<Type>& dt, const word& patchFieldType=PatchField<Type>::calculatedType() ); - //- Constructor given IOobject, mesh, dimensioned<Type> and patch types. + //- Construct given IOobject, mesh, dimensioned<Type> and patch types. + // This assigns both dimensions and values. + // The internal name for the dimensioned\<Type\> has no influence. GeometricField ( - const IOobject&, - const Mesh&, - const dimensioned<Type>&, + const IOobject& io, + const Mesh& mesh, + const dimensioned<Type>& dt, const wordList& wantedPatchTypes, const wordList& actualPatchTypes = wordList() ); @@ -336,64 +339,64 @@ public: //- Constructor from components GeometricField ( - const IOobject&, - const Internal&, - const PtrList<PatchField<Type>>& + const IOobject& io, + const Internal& diField, + const PtrList<PatchField<Type>>& ptfl ); //- Constructor from components GeometricField ( - const IOobject&, - const Mesh&, - const dimensionSet&, - const Field<Type>&, - const PtrList<PatchField<Type>>& + const IOobject& io, + const Mesh& mesh, + const dimensionSet& ds, + const Field<Type>& iField, + const PtrList<PatchField<Type>>& ptfl ); //- Construct and read given IOobject GeometricField ( - const IOobject&, - const Mesh&, + const IOobject& io, + const Mesh& mesh, const bool readOldTime = true ); //- Construct from dictionary GeometricField ( - const IOobject&, - const Mesh&, - const dictionary& + const IOobject& io, + const Mesh& mesh, + const dictionary& dict ); - //- Construct as copy + //- Copy construct GeometricField ( - const GeometricField<Type, PatchField, GeoMesh>& + const GeometricField<Type, PatchField, GeoMesh>& gf ); //- Construct as copy of tmp<GeometricField> deleting argument #ifndef NoConstructFromTmp GeometricField ( - const tmp<GeometricField<Type, PatchField, GeoMesh>>& + const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf ); #endif //- Construct as copy resetting IO parameters GeometricField ( - const IOobject&, - const GeometricField<Type, PatchField, GeoMesh>& + const IOobject& io, + const GeometricField<Type, PatchField, GeoMesh>& gf ); //- Construct as copy of tmp<GeometricField> resetting IO parameters #ifndef NoConstructFromTmp GeometricField ( - const IOobject&, - const tmp<GeometricField<Type, PatchField, GeoMesh>>& + const IOobject& io, + const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf ); #endif @@ -401,7 +404,7 @@ public: GeometricField ( const word& newName, - const GeometricField<Type, PatchField, GeoMesh>& + const GeometricField<Type, PatchField, GeoMesh>& gf ); //- Construct as copy resetting name @@ -409,23 +412,23 @@ public: GeometricField ( const word& newName, - const tmp<GeometricField<Type, PatchField, GeoMesh>>& + const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf ); #endif //- Construct as copy resetting IO parameters and patch type GeometricField ( - const IOobject&, - const GeometricField<Type, PatchField, GeoMesh>&, + const IOobject& io, + const GeometricField<Type, PatchField, GeoMesh>& gf, const word& patchFieldType ); //- Construct as copy resetting IO parameters and boundary types GeometricField ( - const IOobject&, - const GeometricField<Type, PatchField, GeoMesh>&, + const IOobject& io, + const GeometricField<Type, PatchField, GeoMesh>& gf, const wordList& patchFieldTypes, const wordList& actualPatchTypes = wordList() ); @@ -434,8 +437,8 @@ public: #ifndef NoConstructFromTmp GeometricField ( - const IOobject&, - const tmp<GeometricField<Type, PatchField, GeoMesh>>&, + const IOobject& io, + const tmp<GeometricField<Type, PatchField, GeoMesh>>& tgf, const wordList& patchFieldTypes, const wordList& actualPatchTypes = wordList() ); diff --git a/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.H b/src/OpenFOAM/fields/UniformDimensionedFields/UniformDimensionedField.H index 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<Type>&); + // The name of the dimensioned\<Type\> defines the name of the + // field. + UniformDimensionedField + ( + const IOobject& io, + const dimensioned<Type>& dt + ); //- Construct as copy - UniformDimensionedField(const UniformDimensionedField<Type>&); + UniformDimensionedField(const UniformDimensionedField<Type>& rdt); //- Construct from Istream - UniformDimensionedField(const IOobject&); + UniformDimensionedField(const IOobject& io); //- Destructor @@ -111,8 +117,11 @@ public: // Member Operators - void operator=(const UniformDimensionedField<Type>&); - void operator=(const dimensioned<Type>&); + //- Assign name, dimensions and value. + void operator=(const UniformDimensionedField<Type>& rhs); + + //- Assign name, dimensions and value. + void operator=(const dimensioned<Type>& rhs); Type operator[](const label) const { diff --git a/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C b/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C index baaa6070ff..f0f04409c6 100644 --- a/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C +++ b/src/TurbulenceModels/compressible/ThermalDiffusivity/ThermalDiffusivity.C @@ -118,21 +118,18 @@ template<class BasicTurbulenceModel> Foam::tmp<Foam::volScalarField> Foam::ThermalDiffusivity<BasicTurbulenceModel>::alphat() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("alphat", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("alphat", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("alphat", dimDensity*dimViscosity, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + this->mesh_, + dimensionedScalar(dimDensity*dimViscosity, Zero) ); } diff --git a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C index b78cdb4f5e..62bc1b5963 100644 --- a/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C +++ b/src/TurbulenceModels/phaseCompressible/PhaseCompressibleTurbulenceModel/PhaseCompressibleTurbulenceModel.C @@ -104,21 +104,18 @@ template<class TransportModel> Foam::tmp<Foam::volScalarField> Foam::PhaseCompressibleTurbulenceModel<TransportModel>::pPrime() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("pPrime", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("pPrime", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("pPrimef", dimPressure, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + this->mesh_, + dimensionedScalar(dimPressure, Zero) ); } @@ -127,21 +124,18 @@ template<class TransportModel> Foam::tmp<Foam::surfaceScalarField> Foam::PhaseCompressibleTurbulenceModel<TransportModel>::pPrimef() const { - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - IOobject::groupName("pPrimef", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("pPrimef", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("pPrimef", dimPressure, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + this->mesh_, + dimensionedScalar(dimPressure, Zero) ); } diff --git a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C index aadd2aac26..472d2cae7d 100644 --- a/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C +++ b/src/TurbulenceModels/phaseIncompressible/PhaseIncompressibleTurbulenceModel/PhaseIncompressibleTurbulenceModel.C @@ -103,21 +103,18 @@ template<class TransportModel> Foam::tmp<Foam::volScalarField> Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::pPrime() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("pPrime", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("pPrime", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("pPrimef", dimPressure, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + this->mesh_, + dimensionedScalar(dimPressure, Zero) ); } @@ -126,21 +123,18 @@ template<class TransportModel> Foam::tmp<Foam::surfaceScalarField> Foam::PhaseIncompressibleTurbulenceModel<TransportModel>::pPrimef() const { - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - IOobject::groupName("pPrimef", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + IOobject::groupName("pPrimef", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("pPrimef", dimPressure, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + this->mesh_, + dimensionedScalar(dimPressure, Zero) ); } diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C index 2d7f5c904f..0b94f9e954 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDDES/SpalartAllmarasDDES.C @@ -92,7 +92,7 @@ tmp<volScalarField> SpalartAllmarasDDES<BasicTurbulenceModel>::dTilda *max ( lRAS - lLES, - dimensionedScalar("zero", dimLength, 0) + dimensionedScalar(dimLength, Zero) ), dimensionedScalar("small", dimLength, SMALL) ); diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C index 7ed9800463..e28aa15795 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C @@ -473,7 +473,7 @@ tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::k() const IOobject::NO_WRITE ), this->mesh_, - dimensionedScalar("0", dimLength, 0.0), + dimensionedScalar(dimLength, Zero), zeroGradientFvPatchField<vector>::typeName ) ); @@ -558,7 +558,7 @@ void SpalartAllmarasDES<BasicTurbulenceModel>::correct() fvOptions.constrain(nuTildaEqn.ref()); solve(nuTildaEqn); fvOptions.correct(nuTilda_); - bound(nuTilda_, dimensionedScalar("0", nuTilda_.dimensions(), 0.0)); + bound(nuTilda_, dimensionedScalar(nuTilda_.dimensions(), Zero)); nuTilda_.correctBoundaryConditions(); correctNut(); diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C index b0b4c8d1a0..3c6c97770c 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDDES/kOmegaSSTDDES.C @@ -94,7 +94,7 @@ tmp<volScalarField> kOmegaSSTDDES<BasicTurbulenceModel>::dTilda *max ( lRAS - lLES, - dimensionedScalar("zero", dimLength, 0) + dimensionedScalar(dimLength, Zero) ), dimensionedScalar("small", dimLength, SMALL) ); diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/IDDESDelta/IDDESDelta.C index 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<BasicTurbulenceModel>::Ck ( -2.0*this->delta()*sqrt ( - max(KK, dimensionedScalar("zero", KK.dimensions(), 0.0)) + max(KK, dimensionedScalar(KK.dimensions(), Zero)) )*filter_(D) ) ); diff --git a/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C index 7957fb04fb..42bcdb54d1 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C @@ -307,20 +307,17 @@ tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::k() const << "Spalart-Allmaras model. Returning zero field" << endl; - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "k", - this->runTime_.timeName(), - this->mesh_ - ), - this->mesh_, - dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 0), - zeroGradientFvPatchField<vector>::typeName - ) + "k", + this->runTime_.timeName(), + this->mesh_ + ), + this->mesh_, + dimensionedScalar(dimensionSet(0, 2, -2, 0, 0), Zero), + zeroGradientFvPatchField<scalar>::typeName ); } @@ -333,20 +330,17 @@ tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::epsilon() const << "Spalart-Allmaras model. Returning zero field" << endl; - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "epsilon", - this->runTime_.timeName(), - this->mesh_ - ), - this->mesh_, - dimensionedScalar("0", dimensionSet(0, 2, -3, 0, 0), 0), - zeroGradientFvPatchField<vector>::typeName - ) + "epsilon", + this->runTime_.timeName(), + this->mesh_ + ), + this->mesh_, + dimensionedScalar(dimensionSet(0, 2, -3, 0, 0), Zero), + zeroGradientFvPatchField<scalar>::typeName ); } @@ -388,7 +382,7 @@ void SpalartAllmaras<BasicTurbulenceModel>::correct() fvOptions.constrain(nuTildaEqn.ref()); solve(nuTildaEqn); fvOptions.correct(nuTilda_); - bound(nuTilda_, dimensionedScalar("0", nuTilda_.dimensions(), 0.0)); + bound(nuTilda_, dimensionedScalar(nuTilda_.dimensions(), Zero)); nuTilda_.correctBoundaryConditions(); correctNut(fv1); diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C index 16bcccc5fd..e7488ad9f4 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C @@ -481,7 +481,7 @@ kOmegaSSTLM<BasicTurbulenceModel>::kOmegaSSTLM this->mesh_ ), this->mesh_, - dimensionedScalar("0", dimless, 0) + dimensionedScalar(dimless, Zero) ) { if (type == typeName) diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C index ed4791c243..4957f06378 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTSAS/kOmegaSSTSAS.C @@ -79,7 +79,7 @@ tmp<fvScalarMatrix> kOmegaSSTSAS<BasicTurbulenceModel>::Qsas magSqr(fvc::grad(this->omega_)()())/sqr(this->omega_()), magSqr(fvc::grad(this->k_)()())/sqr(this->k_()) ), - dimensionedScalar("0", dimensionSet(0, 0, -2, 0, 0), 0) + dimensionedScalar(dimensionSet(0, 0, -2, 0, 0), Zero) ), // Limit SAS production of omega for numerical stability, // particularly during start-up diff --git a/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C b/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C index 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<BasicTurbulenceModel>::correct() max ( this->nu(), - dimensionedScalar("zero", this->nu()().dimensions(), 0.0) + dimensionedScalar(this->nu()().dimensions(), Zero) ) ); diff --git a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C index cbdbcd0b9b..9798151e89 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C @@ -50,7 +50,7 @@ tmp<volScalarField> v2f<BasicTurbulenceModel>::Ts() const max ( this->nu(), - dimensionedScalar("zero", this->nu()().dimensions(), 0.0) + dimensionedScalar(this->nu()().dimensions(), Zero) ) / epsilon_ ) @@ -75,12 +75,7 @@ tmp<volScalarField> v2f<BasicTurbulenceModel>::Ls() const max ( this->nu(), - dimensionedScalar - ( - "zero", - this->nu()().dimensions(), - 0.0 - ) + dimensionedScalar(this->nu()().dimensions(), Zero) ) )/epsilon_ ) diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index 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<label> epsilonPatches(bf.size()); diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index dbee78a988..89ab62e1ec 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -123,7 +123,7 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights() false // do not register ), mesh, - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ); DynamicList<label> omegaPatches(bf.size()); diff --git a/src/TurbulenceModels/turbulenceModels/laminar/Stokes/Stokes.C b/src/TurbulenceModels/turbulenceModels/laminar/Stokes/Stokes.C index 792e4c82a8..d0c214979d 100644 --- a/src/TurbulenceModels/turbulenceModels/laminar/Stokes/Stokes.C +++ b/src/TurbulenceModels/turbulenceModels/laminar/Stokes/Stokes.C @@ -86,22 +86,19 @@ template<class BasicTurbulenceModel> tmp<volScalarField> Stokes<BasicTurbulenceModel>::nut() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("nut", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName("nut", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("nut", dimViscosity, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(dimViscosity, Zero) ); } @@ -149,22 +146,19 @@ template<class BasicTurbulenceModel> tmp<volScalarField> Stokes<BasicTurbulenceModel>::k() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("k", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName("k", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("k", sqr(this->U_.dimensions()), 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(sqr(this->U_.dimensions()), Zero) ); } @@ -173,25 +167,19 @@ template<class BasicTurbulenceModel> tmp<volScalarField> Stokes<BasicTurbulenceModel>::epsilon() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("epsilon", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName("epsilon", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar - ( - "epsilon", sqr(this->U_.dimensions())/dimTime, 0.0 - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(sqr(this->U_.dimensions())/dimTime, Zero) ); } @@ -200,25 +188,19 @@ template<class BasicTurbulenceModel> tmp<volSymmTensorField> Stokes<BasicTurbulenceModel>::R() const { - return tmp<volSymmTensorField> + return tmp<volSymmTensorField>::New ( - new volSymmTensorField + IOobject ( - IOobject - ( - IOobject::groupName("R", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName("R", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedSymmTensor - ( - "R", sqr(this->U_.dimensions()), Zero - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedSymmTensor(sqr(this->U_.dimensions()), Zero) ); } diff --git a/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C b/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C index 44e0556bc5..52c69b43b9 100644 --- a/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C +++ b/src/TurbulenceModels/turbulenceModels/laminar/laminarModel/laminarModel.C @@ -184,22 +184,19 @@ template<class BasicTurbulenceModel> Foam::tmp<Foam::volScalarField> Foam::laminarModel<BasicTurbulenceModel>::nut() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("nut", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName("nut", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("nut", dimViscosity, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(dimViscosity, Zero) ); } @@ -247,22 +244,19 @@ template<class BasicTurbulenceModel> Foam::tmp<Foam::volScalarField> Foam::laminarModel<BasicTurbulenceModel>::k() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("k", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName("k", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar("k", sqr(this->U_.dimensions()), 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(sqr(this->U_.dimensions()), Zero) ); } @@ -271,25 +265,19 @@ template<class BasicTurbulenceModel> Foam::tmp<Foam::volScalarField> Foam::laminarModel<BasicTurbulenceModel>::epsilon() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName("epsilon", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName("epsilon", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedScalar - ( - "epsilon", sqr(this->U_.dimensions())/dimTime, 0.0 - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedScalar(sqr(this->U_.dimensions())/dimTime, Zero) ); } @@ -298,25 +286,19 @@ template<class BasicTurbulenceModel> Foam::tmp<Foam::volSymmTensorField> Foam::laminarModel<BasicTurbulenceModel>::R() const { - return tmp<volSymmTensorField> + return tmp<volSymmTensorField>::New ( - new volSymmTensorField + IOobject ( - IOobject - ( - IOobject::groupName("R", this->U_.group()), - this->runTime_.timeName(), - this->mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName("R", this->U_.group()), + this->runTime_.timeName(), this->mesh_, - dimensionedSymmTensor - ( - "R", sqr(this->U_.dimensions()), Zero - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh_, + dimensionedSymmTensor(sqr(this->U_.dimensions()), Zero) ); } diff --git a/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.C b/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.C index c38f806e26..fe62ba077f 100644 --- a/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.C +++ b/src/TurbulenceModels/turbulenceModels/nonlinearEddyViscosity/nonlinearEddyViscosity.C @@ -63,12 +63,7 @@ Foam::nonlinearEddyViscosity<BasicTurbulenceModel>::nonlinearEddyViscosity this->mesh_ ), this->mesh_, - dimensionedSymmTensor - ( - "nonlinearStress", - sqr(dimVelocity), - Zero - ) + dimensionedSymmTensor(sqr(dimVelocity), Zero) ) {} diff --git a/src/combustionModels/EDC/EDC.C b/src/combustionModels/EDC/EDC.C index c4b7e0b29f..45d33a4523 100644 --- a/src/combustionModels/EDC/EDC.C +++ b/src/combustionModels/EDC/EDC.C @@ -63,7 +63,7 @@ Foam::combustionModels::EDC<Type>::EDC IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("kappa", dimless, 0) + dimensionedScalar(dimless, Zero) ) {} @@ -198,7 +198,7 @@ Foam::combustionModels::EDC<Type>::Qdot() const false ), this->mesh(), - dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); diff --git a/src/combustionModels/FSD/FSD.C b/src/combustionModels/FSD/FSD.C index 1bc995bef7..965010bae3 100644 --- a/src/combustionModels/FSD/FSD.C +++ b/src/combustionModels/FSD/FSD.C @@ -72,7 +72,7 @@ FSD<CombThermoType, ThermoType>::FSD IOobject::AUTO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ), YFuelFuelStream_(dimensionedScalar("YFuelStream", dimless, 1.0)), YO2OxiStream_(dimensionedScalar("YOxiStream", dimless, 0.23)), @@ -159,7 +159,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm() IOobject::NO_WRITE ), U.mesh(), - dimensionedScalar("Pc", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); @@ -178,12 +178,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm() IOobject::NO_WRITE ), U.mesh(), - dimensionedScalar - ( - "omegaFuelBar", - omegaFuel.dimensions(), - 0 - ) + dimensionedScalar(omegaFuel.dimensions(), Zero) ) ); @@ -309,7 +304,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm() IOobject::NO_WRITE ), U.mesh(), - dimensionedScalar("products", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); @@ -338,8 +333,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm() template<class CombThermoType, class ThermoType> void FSD<CombThermoType, ThermoType>::correct() { - this->wFuel_ == - dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0); + this->wFuel_ == dimensionedScalar(dimMass/dimTime/dimVolume, Zero); if (this->active()) { diff --git a/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C b/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C index 4e0e92ad5d..e60293bd6f 100644 --- a/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C +++ b/src/combustionModels/FSD/reactionRateFlameAreaModels/consumptionSpeed/consumptionSpeed.C @@ -93,12 +93,7 @@ Foam::tmp<Foam::volScalarField> Foam::consumptionSpeed::omega0Sigma IOobject::NO_WRITE ), sigma.mesh(), - dimensionedScalar - ( - "omega0", - dimensionSet(1, -2, -1, 0, 0, 0, 0), - 0 - ) + dimensionedScalar(dimensionSet(1, -2, -1, 0, 0, 0, 0), Zero) ) ); diff --git a/src/combustionModels/PaSR/PaSR.C b/src/combustionModels/PaSR/PaSR.C index 6358104a9b..7063e84dd8 100644 --- a/src/combustionModels/PaSR/PaSR.C +++ b/src/combustionModels/PaSR/PaSR.C @@ -49,7 +49,7 @@ Foam::combustionModels::PaSR<Type>::PaSR IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("kappa", dimless, 0) + dimensionedScalar(dimless, Zero) ) {} diff --git a/src/combustionModels/diffusion/diffusion.C b/src/combustionModels/diffusion/diffusion.C index c5a3ee9ea5..2de2a82e84 100644 --- a/src/combustionModels/diffusion/diffusion.C +++ b/src/combustionModels/diffusion/diffusion.C @@ -66,8 +66,7 @@ diffusion<CombThermoType, ThermoType>::~diffusion() template<class CombThermoType, class ThermoType> void diffusion<CombThermoType, ThermoType>::correct() { - this->wFuel_ == - dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0); + this->wFuel_ == dimensionedScalar(dimMass/dimVolume/dimTime, Zero); if (this->active()) { diff --git a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C index d05950c392..1c54143109 100644 --- a/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C +++ b/src/combustionModels/diffusionMulticomponent/diffusionMulticomponent.C @@ -68,7 +68,7 @@ diffusionMulticomponent<CombThermoType, ThermoType>::init() false ), this->mesh_, - dimensionedScalar("Rij", dimMass/dimTime/dimVolume, 0.0), + dimensionedScalar(dimMass/dimTime/dimVolume, Zero), zeroGradientFvPatchScalarField::typeName ) ); @@ -200,7 +200,7 @@ diffusionMulticomponent<CombThermoType, ThermoType>::correct() false ), this->mesh_, - dimensionedScalar("Rijl", dimMass/dimTime/dimVolume, 0.0), + dimensionedScalar(dimMass/dimTime/dimVolume, Zero), zeroGradientFvPatchScalarField::typeName ) ); @@ -225,14 +225,14 @@ diffusionMulticomponent<CombThermoType, ThermoType>::correct() { const label lIndex = lhs[l].index; this->chemistryPtr_->RR(lIndex) = - dimensionedScalar("zero", dimMass/dimTime/dimVolume, 0.0); + dimensionedScalar(dimMass/dimTime/dimVolume, Zero); } forAll(rhs, l) { const label rIndex = rhs[l].index; this->chemistryPtr_->RR(rIndex) = - dimensionedScalar("zero", dimMass/dimTime/dimVolume, 0.0); + dimensionedScalar(dimMass/dimTime/dimVolume, Zero); } } @@ -401,7 +401,7 @@ Qdot() const false ), this->mesh(), - dimensionedScalar("dQ", dimEnergy/dimTime, 0.0), + dimensionedScalar(dimEnergy/dimTime, Zero), zeroGradientFvPatchScalarField::typeName ) ); diff --git a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C index 6484cce951..7845e65c1e 100644 --- a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C +++ b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C @@ -88,7 +88,7 @@ eddyDissipationDiffusionModel<CombThermoType, ThermoType>::rtDiff() const IOobject::NO_WRITE ), this->mesh(), - dimensionedScalar("delta", dimLength, 0), + dimensionedScalar(dimLength, Zero), zeroGradientFvPatchScalarField::typeName ) ); diff --git a/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C b/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C index caf0b623b4..2fd6ddca9a 100644 --- a/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C +++ b/src/combustionModels/eddyDissipationModelBase/eddyDissipationModelBase.C @@ -79,8 +79,7 @@ eddyDissipationModelBase<CombThermoType, ThermoType>::rtTurb() const template<class CombThermoType, class ThermoType> void eddyDissipationModelBase<CombThermoType, ThermoType>::correct() { - this->wFuel_ == - dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0); + this->wFuel_ == dimensionedScalar(dimMass/dimVolume/dimTime, Zero); if (this->active()) { diff --git a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C index 49c0d60e35..fb6def62f5 100644 --- a/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C +++ b/src/combustionModels/infinitelyFastChemistry/infinitelyFastChemistry.C @@ -64,8 +64,7 @@ infinitelyFastChemistry<CombThermoType, ThermoType>::~infinitelyFastChemistry() template<class CombThermoType, class ThermoType> void infinitelyFastChemistry<CombThermoType, ThermoType>::correct() { - this->wFuel_ == - dimensionedScalar("zero", dimMass/pow3(dimLength)/dimTime, 0.0); + this->wFuel_ == dimensionedScalar(dimMass/dimVolume/dimTime, Zero); if (this->active()) { diff --git a/src/combustionModels/laminar/laminar.C b/src/combustionModels/laminar/laminar.C index b33f302b18..b05013a984 100644 --- a/src/combustionModels/laminar/laminar.C +++ b/src/combustionModels/laminar/laminar.C @@ -152,7 +152,7 @@ Foam::combustionModels::laminar<Type>::Qdot() const false ), this->mesh(), - dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); diff --git a/src/combustionModels/noCombustion/noCombustion.C b/src/combustionModels/noCombustion/noCombustion.C index 4101ed61ca..d2f53c3f3f 100644 --- a/src/combustionModels/noCombustion/noCombustion.C +++ b/src/combustionModels/noCombustion/noCombustion.C @@ -75,25 +75,20 @@ template<class CombThermoType> Foam::tmp<Foam::volScalarField> Foam::combustionModels::noCombustion<CombThermoType>::Qdot() const { - tmp<volScalarField> tQdot + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - IOobject::groupName(typeName + ":Qdot", this->phaseName_), - this->mesh().time().timeName(), - this->mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + IOobject::groupName(typeName + ":Qdot", this->phaseName_), + this->mesh().time().timeName(), this->mesh(), - dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh(), + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ); - - return tQdot; } diff --git a/src/combustionModels/singleStepCombustion/singleStepCombustion.C b/src/combustionModels/singleStepCombustion/singleStepCombustion.C index f65cefb80e..31cf624a26 100644 --- a/src/combustionModels/singleStepCombustion/singleStepCombustion.C +++ b/src/combustionModels/singleStepCombustion/singleStepCombustion.C @@ -55,7 +55,7 @@ singleStepCombustion<CombThermoType, ThermoType>::singleStepCombustion IOobject::NO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ), semiImplicit_(readBool(this->coeffs_.lookup("semiImplicit"))) { diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C index 88ff6d468f..c6a11ff7de 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C @@ -1432,7 +1432,7 @@ bool Foam::dynamicRefineFvMesh::writeObject false ), *this, - dimensionedScalar("level", dimless, 0) + dimensionedScalar(dimless, Zero) ); const labelList& cellLevel = meshCutter_.cellLevel(); diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C index 36df8b2dd3..a2b245ebeb 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C @@ -404,7 +404,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::fvMeshDistribute::generateTestField IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); surfaceScalarField& fld = tfld.ref(); diff --git a/src/dynamicMesh/meshSubsetHelper/meshSubsetHelperTemplates.C b/src/dynamicMesh/meshSubsetHelper/meshSubsetHelperTemplates.C index 25a6d1301b..9bc130e7d6 100644 --- a/src/dynamicMesh/meshSubsetHelper/meshSubsetHelperTemplates.C +++ b/src/dynamicMesh/meshSubsetHelper/meshSubsetHelperTemplates.C @@ -55,7 +55,7 @@ Foam::meshSubsetHelper::zeroGradientField ( io, df.mesh(), - dimensioned<Type>("0", df.dimensions(), Zero), + dimensioned<Type>(df.dimensions(), Zero), zeroGradientFvPatchField<Type>::typeName ) ); diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C index fa48a7c10a..178574ee7b 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgoTemplates.C @@ -155,7 +155,7 @@ Foam::motionSmootherAlgo::avg false ), fld.mesh(), - dimensioned<Type>("zero", fld.dimensions(), Zero) + dimensioned<Type>(fld.dimensions(), Zero) ) ); GeometricField<Type, pointPatchField, pointMesh>& res = tres.ref(); diff --git a/src/dynamicMesh/motionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C b/src/dynamicMesh/motionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C index 5865318818..81475856ae 100644 --- a/src/dynamicMesh/motionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C +++ b/src/dynamicMesh/motionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C @@ -430,7 +430,7 @@ void Foam::displacementLayeredMotionMotionSolver::cellZoneSolve false ), pointMesh::New(mesh()), - dimensionedScalar("zero", dimLength, 0.0) + dimensionedScalar(dimLength, Zero) ); forAll(distance, pointi) diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C index e57fa3fd33..e60c543f8d 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8/hexRef8.C @@ -1963,6 +1963,7 @@ Foam::hexRef8::hexRef8(const polyMesh& mesh, const bool readHistory) IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), + // Needs name: dimensionedScalar("level0Edge", dimLength, getLevel0EdgeLength()) ), history_ @@ -2083,6 +2084,7 @@ Foam::hexRef8::hexRef8 IOobject::NO_READ, IOobject::NO_WRITE ), + // Needs name: dimensionedScalar ( "level0Edge", @@ -2191,6 +2193,7 @@ Foam::hexRef8::hexRef8 IOobject::NO_READ, IOobject::NO_WRITE ), + // Needs name: dimensionedScalar ( "level0Edge", @@ -3046,7 +3049,7 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 // false // ), // fMesh, - // dimensionedScalar("zero", dimless, 0) + // dimensionedScalar(dimless, Zero) // ); // // forAll(wantedLevel, celli) diff --git a/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtScheme.C b/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtScheme.C index 825d73b7df..ad66eb6965 100644 --- a/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtScheme.C +++ b/src/finiteArea/finiteArea/ddtSchemes/EulerFaDdtScheme/EulerFaDdtScheme.C @@ -67,12 +67,7 @@ EulerFaDdtScheme<Type>::facDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - pTraits<Type>::zero - ) + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ) ); @@ -81,26 +76,18 @@ EulerFaDdtScheme<Type>::facDdt return tdtdt; } - else - { - return tmp<GeometricField<Type, faPatchField, areaMesh>> - ( - new GeometricField<Type, faPatchField, areaMesh> - ( - ddtIOobject, - mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - pTraits<Type>::zero - ), - calculatedFaPatchField<Type>::typeName - ) - ); - } + + + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New + ( + ddtIOobject, + mesh(), + dimensioned<Type>(dt.dimensions()/dimTime, Zero), + calculatedFaPatchField<Type>::typeName + ); } + template<class Type> tmp<GeometricField<Type, faPatchField, areaMesh>> EulerFaDdtScheme<Type>::facDdt0 diff --git a/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtScheme.C b/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtScheme.C index 21c9291d3a..9ce18a368e 100644 --- a/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtScheme.C +++ b/src/finiteArea/finiteArea/ddtSchemes/backwardFaDdtScheme/backwardFaDdtScheme.C @@ -105,12 +105,7 @@ backwardFaDdtScheme<Type>::facDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - pTraits<Type>::zero - ) + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ) ); @@ -121,24 +116,14 @@ backwardFaDdtScheme<Type>::facDdt return tdtdt; } - else - { - return tmp<GeometricField<Type, faPatchField, areaMesh>> - ( - new GeometricField<Type, faPatchField, areaMesh> - ( - ddtIOobject, - mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - pTraits<Type>::zero - ), - calculatedFaPatchField<Type>::typeName - ) - ); - } + + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New + ( + ddtIOobject, + mesh(), + dimensioned<Type>(dt.dimensions()/dimTime, Zero), + calculatedFaPatchField<Type>::typeName + ); } diff --git a/src/finiteArea/finiteArea/ddtSchemes/boundedBackwardFaDdtScheme/boundedBackwardFaDdtScheme.C b/src/finiteArea/finiteArea/ddtSchemes/boundedBackwardFaDdtScheme/boundedBackwardFaDdtScheme.C index 09c48be311..791b9140e6 100644 --- a/src/finiteArea/finiteArea/ddtSchemes/boundedBackwardFaDdtScheme/boundedBackwardFaDdtScheme.C +++ b/src/finiteArea/finiteArea/ddtSchemes/boundedBackwardFaDdtScheme/boundedBackwardFaDdtScheme.C @@ -88,12 +88,7 @@ tmp<areaScalarField> boundedBackwardFaDdtScheme::facDdt ( ddtIOobject, mesh(), - dimensionedScalar - ( - "0", - dt.dimensions()/dimTime, - 0.0 - ) + dimensionedScalar(dt.dimensions()/dimTime, Zero) ) ); @@ -104,24 +99,14 @@ tmp<areaScalarField> boundedBackwardFaDdtScheme::facDdt return tdtdt; } - else - { - return tmp<areaScalarField> - ( - new areaScalarField - ( - ddtIOobject, - mesh(), - dimensionedScalar - ( - "0", - dt.dimensions()/dimTime, - 0.0 - ), - calculatedFaPatchScalarField::typeName - ) - ); - } + + return tmp<areaScalarField>::New + ( + ddtIOobject, + mesh(), + dimensionedScalar(dt.dimensions()/dimTime, Zero), + calculatedFaPatchScalarField::typeName + ); } diff --git a/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtScheme.C b/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtScheme.C index ff945d97ee..6195b562ae 100644 --- a/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtScheme.C +++ b/src/finiteArea/finiteArea/ddtSchemes/steadyStateFaDdtScheme/steadyStateFaDdtScheme.C @@ -48,24 +48,16 @@ steadyStateFaDdtScheme<Type>::facDdt const dimensioned<Type> dt ) { - return tmp<GeometricField<Type, faPatchField, areaMesh>> + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New ( - new GeometricField<Type, faPatchField, areaMesh> + IOobject ( - IOobject - ( - "ddt("+dt.name()+')', - mesh()().time().timeName(), - mesh()() - ), - mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - pTraits<Type>::zero - ) - ) + "ddt("+dt.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ); } @@ -77,24 +69,16 @@ steadyStateFaDdtScheme<Type>::facDdt0 const dimensioned<Type> dt ) { - return tmp<GeometricField<Type, faPatchField, areaMesh>> + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New ( - new GeometricField<Type, faPatchField, areaMesh> + IOobject ( - IOobject - ( - "ddt("+dt.name()+')', - mesh()().time().timeName(), - mesh()() - ), - mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - pTraits<Type>::zero - ) - ) + "ddt("+dt.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ); } @@ -106,24 +90,16 @@ steadyStateFaDdtScheme<Type>::facDdt const GeometricField<Type, faPatchField, areaMesh>& vf ) { - return tmp<GeometricField<Type, faPatchField, areaMesh>> + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New ( - new GeometricField<Type, faPatchField, areaMesh> + IOobject ( - IOobject - ( - "ddt("+vf.name()+')', - mesh()().time().timeName(), - mesh()() - ), - mesh(), - dimensioned<Type> - ( - "0", - vf.dimensions()/dimTime, - pTraits<Type>::zero - ) - ) + "ddt("+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type>(vf.dimensions()/dimTime, Zero) ); } @@ -135,24 +111,16 @@ steadyStateFaDdtScheme<Type>::facDdt0 const GeometricField<Type, faPatchField, areaMesh>& vf ) { - return tmp<GeometricField<Type, faPatchField, areaMesh>> + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New ( - new GeometricField<Type, faPatchField, areaMesh> + IOobject ( - IOobject - ( - "ddt0("+vf.name()+')', - mesh()().time().timeName(), - mesh()() - ), - mesh(), - dimensioned<Type> - ( - "0", - vf.dimensions()/dimTime, - pTraits<Type>::zero - ) - ) + "ddt0("+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type>(vf.dimensions()/dimTime, Zero) ); } @@ -165,24 +133,16 @@ steadyStateFaDdtScheme<Type>::facDdt const GeometricField<Type, faPatchField, areaMesh>& vf ) { - return tmp<GeometricField<Type, faPatchField, areaMesh>> + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New ( - new GeometricField<Type, faPatchField, areaMesh> + IOobject ( - IOobject - ( - "ddt("+rho.name()+','+vf.name()+')', - mesh()().time().timeName(), - mesh()() - ), - mesh(), - dimensioned<Type> - ( - "0", - rho.dimensions()*vf.dimensions()/dimTime, - pTraits<Type>::zero - ) - ) + "ddt("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero) ); } @@ -194,24 +154,16 @@ steadyStateFaDdtScheme<Type>::facDdt0 const GeometricField<Type, faPatchField, areaMesh>& vf ) { - return tmp<GeometricField<Type, faPatchField, areaMesh>> + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New ( - new GeometricField<Type, faPatchField, areaMesh> + IOobject ( - IOobject - ( - "ddt0("+rho.name()+','+vf.name()+')', - mesh()().time().timeName(), - mesh()() - ), - mesh(), - dimensioned<Type> - ( - "0", - rho.dimensions()*vf.dimensions()/dimTime, - pTraits<Type>::zero - ) - ) + "ddt0("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero) ); } @@ -224,24 +176,16 @@ steadyStateFaDdtScheme<Type>::facDdt const GeometricField<Type, faPatchField, areaMesh>& vf ) { - return tmp<GeometricField<Type, faPatchField, areaMesh>> + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New ( - new GeometricField<Type, faPatchField, areaMesh> + IOobject ( - IOobject - ( - "ddt("+rho.name()+','+vf.name()+')', - mesh()().time().timeName(), - mesh()() - ), - mesh(), - dimensioned<Type> - ( - "0", - rho.dimensions()*vf.dimensions()/dimTime, - pTraits<Type>::zero - ) - ) + "ddt("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero) ); } @@ -254,24 +198,16 @@ steadyStateFaDdtScheme<Type>::facDdt0 const GeometricField<Type, faPatchField, areaMesh>& vf ) { - return tmp<GeometricField<Type, faPatchField, areaMesh>> + return tmp<GeometricField<Type, faPatchField, areaMesh>>::New ( - new GeometricField<Type, faPatchField, areaMesh> + IOobject ( - IOobject - ( - "ddt0("+rho.name()+','+vf.name()+')', - mesh()().time().timeName(), - mesh()() - ), - mesh(), - dimensioned<Type> - ( - "0", - rho.dimensions()*vf.dimensions()/dimTime, - pTraits<Type>::zero - ) - ) + "ddt0("+rho.name()+','+vf.name()+')', + mesh()().time().timeName(), + mesh()() + ), + mesh(), + dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero) ); } diff --git a/src/finiteArea/finiteArea/fac/facEdgeIntegrate.C b/src/finiteArea/finiteArea/fac/facEdgeIntegrate.C index a99d58bd76..e3ffdc541c 100644 --- a/src/finiteArea/finiteArea/fac/facEdgeIntegrate.C +++ b/src/finiteArea/finiteArea/fac/facEdgeIntegrate.C @@ -61,12 +61,7 @@ edgeIntegrate ssf.db() ), mesh, - dimensioned<Type> - ( - "0", - ssf.dimensions()/dimArea, - pTraits<Type>::zero - ), + dimensioned<Type>(ssf.dimensions()/dimArea, Zero), zeroGradientFaPatchField<Type>::typeName ) ); @@ -138,7 +133,7 @@ edgeSum ssf.db() ), mesh, - dimensioned<Type>("0", ssf.dimensions(), pTraits<Type>::zero), + dimensioned<Type>(ssf.dimensions(), Zero), zeroGradientFaPatchField<Type>::typeName ) ); diff --git a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.C b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.C index b21926d923..63104bb701 100644 --- a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.C +++ b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaGrad.C @@ -76,12 +76,7 @@ leastSquaresFaGrad<Type>::grad IOobject::NO_WRITE ), mesh, - dimensioned<GradType> - ( - "zero", - vsf.dimensions()/dimLength, - pTraits<GradType>::zero - ), + dimensioned<GradType>(vsf.dimensions()/dimLength, Zero), zeroGradientFaPatchField<GradType>::typeName ) ); diff --git a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C index 6dc0356be5..9f315615c2 100644 --- a/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C +++ b/src/finiteArea/finiteArea/gradSchemes/leastSquaresFaGrad/leastSquaresFaVectors.C @@ -80,7 +80,7 @@ void Foam::leastSquaresFaVectors::makeLeastSquaresVectors() const false ), mesh(), - dimensionedVector("zero", dimless/dimLength, vector::zero) + dimensionedVector(dimless/dimLength, Zero) ); edgeVectorField& lsP = *pVectorsPtr_; @@ -96,7 +96,7 @@ void Foam::leastSquaresFaVectors::makeLeastSquaresVectors() const false ), mesh(), - dimensionedVector("zero", dimless/dimLength, vector::zero) + dimensionedVector(dimless/dimLength, Zero) ); edgeVectorField& lsN = *nVectorsPtr_; diff --git a/src/finiteVolume/cfdTools/compressible/createDpdt.H b/src/finiteVolume/cfdTools/compressible/createDpdt.H index b831c85a66..0d74762fd0 100644 --- a/src/finiteVolume/cfdTools/compressible/createDpdt.H +++ b/src/finiteVolume/cfdTools/compressible/createDpdt.H @@ -34,6 +34,6 @@ if (!thermo.dpdt()) { - dpdt == dimensionedScalar("0", dpdt.dimensions(), 0); + dpdt == dimensionedScalar(dpdt.dimensions(), Zero); dpdt.writeOpt() = IOobject::NO_WRITE; } diff --git a/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C b/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C index fa4164c1b3..19dd9fb742 100644 --- a/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C +++ b/src/finiteVolume/cfdTools/general/CorrectPhi/CorrectPhi.C @@ -79,7 +79,7 @@ void Foam::CorrectPhi mesh ), mesh, - dimensionedScalar("pcorr", p.dimensions(), 0.0), + dimensionedScalar(p.dimensions(), Zero), pcorrTypes ); @@ -159,7 +159,7 @@ void Foam::CorrectPhi mesh ), mesh, - dimensionedScalar("pcorr", p.dimensions(), 0.0), + dimensionedScalar(p.dimensions(), Zero), pcorrTypes ); diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C index 93fe6728be..c8b3ec22a2 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C @@ -177,7 +177,7 @@ Foam::tmp<Foam::volVectorField> Foam::MRFZoneList::DDt U.mesh() ), U.mesh(), - dimensionedVector("0", U.dimensions()/dimTime, Zero) + dimensionedVector(U.dimensions()/dimTime, Zero) ) ); volVectorField& acceleration = tacceleration.ref(); diff --git a/src/finiteVolume/cfdTools/general/include/readhRef.H b/src/finiteVolume/cfdTools/general/include/readhRef.H index d34c3e7dd9..e938cc8cc9 100644 --- a/src/finiteVolume/cfdTools/general/include/readhRef.H +++ b/src/finiteVolume/cfdTools/general/include/readhRef.H @@ -9,5 +9,5 @@ IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), - dimensionedScalar("hRef", dimLength, 0) + dimensionedScalar(dimLength, Zero) ); diff --git a/src/finiteVolume/cfdTools/general/include/readpRef.H b/src/finiteVolume/cfdTools/general/include/readpRef.H index 78ae5886ee..29aa46ac83 100644 --- a/src/finiteVolume/cfdTools/general/include/readpRef.H +++ b/src/finiteVolume/cfdTools/general/include/readpRef.H @@ -9,5 +9,5 @@ IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), - dimensionedScalar("pRef", dimPressure, 0) + dimensionedScalar(dimPressure, Zero) ); diff --git a/src/finiteVolume/cfdTools/general/levelSet/levelSet.C b/src/finiteVolume/cfdTools/general/levelSet/levelSet.C index d4d55ca431..61baa44536 100644 --- a/src/finiteVolume/cfdTools/general/levelSet/levelSet.C +++ b/src/finiteVolume/cfdTools/general/levelSet/levelSet.C @@ -50,7 +50,7 @@ Foam::levelSetFraction mesh ), mesh, - dimensionedScalar("0", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); DimensionedField<scalar, volMesh>& result = tResult.ref(); diff --git a/src/finiteVolume/cfdTools/general/levelSet/levelSetTemplates.C b/src/finiteVolume/cfdTools/general/levelSet/levelSetTemplates.C index de89bbb76d..a3e7972fdf 100644 --- a/src/finiteVolume/cfdTools/general/levelSet/levelSetTemplates.C +++ b/src/finiteVolume/cfdTools/general/levelSet/levelSetTemplates.C @@ -53,7 +53,7 @@ Foam::tmp<Foam::DimensionedField<Type, Foam::volMesh>> Foam::levelSetAverage mesh ), mesh, - dimensioned<Type>("0", positiveC.dimensions(), Zero) + dimensioned<Type>(positiveC.dimensions(), Zero) ) ); DimensionedField<Type, volMesh>& result = tResult.ref(); diff --git a/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C b/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C index 207b06ff65..35a9a246d1 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimer.C @@ -143,7 +143,7 @@ void Foam::porosityModels::DarcyForchheimer::calcTransformModelData() IOobject::NO_WRITE ), mesh_, - dimensionedTensor("0", dXYZ_.dimensions(), Zero) + dimensionedTensor(dXYZ_.dimensions(), Zero) ); volTensorField Fout ( @@ -156,7 +156,7 @@ void Foam::porosityModels::DarcyForchheimer::calcTransformModelData() IOobject::NO_WRITE ), mesh_, - dimensionedTensor("0", fXYZ_.dimensions(), Zero) + dimensionedTensor(fXYZ_.dimensions(), Zero) ); UIndirectList<tensor>(Dout, mesh_.cellZones()[cellZoneIDs_[0]]) = D_[0]; diff --git a/src/finiteVolume/finiteVolume/d2dt2Schemes/steadyStateD2dt2Scheme/steadyStateD2dt2Scheme.C b/src/finiteVolume/finiteVolume/d2dt2Schemes/steadyStateD2dt2Scheme/steadyStateD2dt2Scheme.C index 2290d1735f..cbc8879431 100644 --- a/src/finiteVolume/finiteVolume/d2dt2Schemes/steadyStateD2dt2Scheme/steadyStateD2dt2Scheme.C +++ b/src/finiteVolume/finiteVolume/d2dt2Schemes/steadyStateD2dt2Scheme/steadyStateD2dt2Scheme.C @@ -59,12 +59,7 @@ steadyStateD2dt2Scheme<Type>::fvcD2dt2 IOobject::NO_WRITE ), mesh(), - dimensioned<Type> - ( - "0", - vf.dimensions()/dimTime/dimTime, - Zero - ) + dimensioned<Type>(vf.dimensions()/dimTime/dimTime, Zero) ) ); } @@ -78,25 +73,21 @@ steadyStateD2dt2Scheme<Type>::fvcD2dt2 const GeometricField<Type, fvPatchField, volMesh>& vf ) { - return tmp<GeometricField<Type, fvPatchField, volMesh>> + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New ( - new GeometricField<Type, fvPatchField, volMesh> + IOobject ( - IOobject - ( - "d2dt2("+rho.name()+','+vf.name()+')', - mesh().time().timeName(), - mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "d2dt2("+rho.name()+','+vf.name()+')', + mesh().time().timeName(), mesh(), - dimensioned<Type> - ( - "0", - rho.dimensions()*vf.dimensions()/dimTime/dimTime, - Zero - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh(), + dimensioned<Type> + ( + rho.dimensions()*vf.dimensions()/dimTime/dimTime, + Zero ) ); } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C index 04600de1be..3b8d31be2d 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C @@ -56,7 +56,7 @@ tmp<volScalarField> CoEulerDdtScheme<Type>::CorDeltaT() const mesh() ), mesh(), - dimensionedScalar("CorDeltaT", cofrDeltaT.dimensions(), 0.0), + dimensionedScalar(cofrDeltaT.dimensions(), Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -168,12 +168,7 @@ CoEulerDdtScheme<Type>::fvcDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ) + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ) ); @@ -191,12 +186,7 @@ CoEulerDdtScheme<Type>::fvcDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ), + dimensioned<Type>(dt.dimensions()/dimTime, Zero), calculatedFvPatchField<Type>::typeName ) ); @@ -777,21 +767,18 @@ tmp<surfaceScalarField> CoEulerDdtScheme<Type>::meshPhi const GeometricField<Type, fvPatchField, volMesh>& ) { - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - "meshPhi", - mesh().time().timeName(), - mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "meshPhi", + mesh().time().timeName(), mesh(), - dimensionedScalar("0", dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh(), + dimensionedScalar(dimVolume/dimTime, Zero) ); } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C index f6e4482031..f84e5d5401 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicolsonDdtScheme/CrankNicolsonDdtScheme.C @@ -161,7 +161,6 @@ CrankNicolsonDdtScheme<Type>::ddt0_ mesh(), dimensioned<typename GeoField::value_type> ( - "0", dims/dimTime, Zero ) @@ -370,12 +369,7 @@ CrankNicolsonDdtScheme<Type>::fvcDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ) + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ) ); diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C index 2fd8acaea7..49705716a1 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/EulerDdtScheme/EulerDdtScheme.C @@ -64,12 +64,7 @@ EulerDdtScheme<Type>::fvcDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ) + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ) ); @@ -78,24 +73,14 @@ EulerDdtScheme<Type>::fvcDdt return tdtdt; } - else - { - return tmp<GeometricField<Type, fvPatchField, volMesh>> - ( - new GeometricField<Type, fvPatchField, volMesh> - ( - ddtIOobject, - mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ), - calculatedFvPatchField<Type>::typeName - ) - ); - } + + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New + ( + ddtIOobject, + mesh(), + dimensioned<Type>(dt.dimensions()/dimTime, Zero), + calculatedFvPatchField<Type>::typeName + ); } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C index 9aba9f0f67..9657e63878 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C @@ -106,7 +106,7 @@ tmp<volScalarField> SLTSDdtScheme<Type>::SLrDeltaT() const mesh() ), mesh(), - dimensionedScalar("rDeltaT", dimless/dimTime, 0.0), + dimensionedScalar(dimless/dimTime, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -174,12 +174,7 @@ SLTSDdtScheme<Type>::fvcDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ) + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ) ); @@ -196,12 +191,7 @@ SLTSDdtScheme<Type>::fvcDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ), + dimensioned<Type>(dt.dimensions()/dimTime, Zero), calculatedFvPatchField<Type>::typeName ) ); @@ -782,22 +772,19 @@ tmp<surfaceScalarField> SLTSDdtScheme<Type>::meshPhi const GeometricField<Type, fvPatchField, volMesh>& ) { - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - "meshPhi", - mesh().time().timeName(), - mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "meshPhi", + mesh().time().timeName(), mesh(), - dimensionedScalar("0", dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh(), + dimensionedScalar(dimVolume/dimTime, Zero) ); } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C index 06676f037b..8e2d5c70fe 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/backwardDdtScheme/backwardDdtScheme.C @@ -102,12 +102,7 @@ backwardDdtScheme<Type>::fvcDdt ( ddtIOobject, mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ) + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ) ); @@ -118,24 +113,14 @@ backwardDdtScheme<Type>::fvcDdt return tdtdt; } - else - { - return tmp<GeometricField<Type, fvPatchField, volMesh>> - ( - new GeometricField<Type, fvPatchField, volMesh> - ( - ddtIOobject, - mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ), - calculatedFvPatchField<Type>::typeName - ) - ); - } + + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New + ( + ddtIOobject, + mesh(), + dimensioned<Type>(dt.dimensions()/dimTime, Zero), + calculatedFvPatchField<Type>::typeName + ); } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C index 0e99dbd9f2..bef65188ef 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/localEulerDdtScheme/localEulerDdtScheme.C @@ -67,20 +67,12 @@ localEulerDdtScheme<Type>::fvcDdt mesh() ); - return tmp<GeometricField<Type, fvPatchField, volMesh>> + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New ( - new GeometricField<Type, fvPatchField, volMesh> - ( - ddtIOobject, - mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ), - calculatedFvPatchField<Type>::typeName - ) + ddtIOobject, + mesh(), + dimensioned<Type>(dt.dimensions()/dimTime, Zero), + calculatedFvPatchField<Type>::typeName ); } @@ -539,22 +531,19 @@ tmp<surfaceScalarField> localEulerDdtScheme<Type>::meshPhi const GeometricField<Type, fvPatchField, volMesh>& ) { - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - "meshPhi", - mesh().time().timeName(), - mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "meshPhi", + mesh().time().timeName(), mesh(), - dimensionedScalar("0", dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh(), + dimensionedScalar(dimVolume/dimTime, Zero) ); } diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.C index b90b00aa7b..94fd62d2c2 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/steadyStateDdtScheme/steadyStateDdtScheme.C @@ -46,24 +46,16 @@ steadyStateDdtScheme<Type>::fvcDdt const dimensioned<Type>& dt ) { - return tmp<GeometricField<Type, fvPatchField, volMesh>> + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New ( - new GeometricField<Type, fvPatchField, volMesh> + IOobject ( - IOobject - ( - "ddt("+dt.name()+')', - mesh().time().timeName(), - mesh() - ), - mesh(), - dimensioned<Type> - ( - "0", - dt.dimensions()/dimTime, - Zero - ) - ) + "ddt("+dt.name()+')', + mesh().time().timeName(), + mesh() + ), + mesh(), + dimensioned<Type>(dt.dimensions()/dimTime, Zero) ); } @@ -75,24 +67,16 @@ steadyStateDdtScheme<Type>::fvcDdt const GeometricField<Type, fvPatchField, volMesh>& vf ) { - return tmp<GeometricField<Type, fvPatchField, volMesh>> + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New ( - new GeometricField<Type, fvPatchField, volMesh> + IOobject ( - IOobject - ( - "ddt("+vf.name()+')', - mesh().time().timeName(), - mesh() - ), - mesh(), - dimensioned<Type> - ( - "0", - vf.dimensions()/dimTime, - Zero - ) - ) + "ddt("+vf.name()+')', + mesh().time().timeName(), + mesh() + ), + mesh(), + dimensioned<Type>(vf.dimensions()/dimTime, Zero) ); } @@ -105,24 +89,16 @@ steadyStateDdtScheme<Type>::fvcDdt const GeometricField<Type, fvPatchField, volMesh>& vf ) { - return tmp<GeometricField<Type, fvPatchField, volMesh>> + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New ( - new GeometricField<Type, fvPatchField, volMesh> + IOobject ( - IOobject - ( - "ddt("+rho.name()+','+vf.name()+')', - mesh().time().timeName(), - mesh() - ), - mesh(), - dimensioned<Type> - ( - "0", - rho.dimensions()*vf.dimensions()/dimTime, - Zero - ) - ) + "ddt("+rho.name()+','+vf.name()+')', + mesh().time().timeName(), + mesh() + ), + mesh(), + dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero) ); } @@ -135,24 +111,16 @@ steadyStateDdtScheme<Type>::fvcDdt const GeometricField<Type, fvPatchField, volMesh>& vf ) { - return tmp<GeometricField<Type, fvPatchField, volMesh>> + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New ( - new GeometricField<Type, fvPatchField, volMesh> + IOobject ( - IOobject - ( - "ddt("+rho.name()+','+vf.name()+')', - mesh().time().timeName(), - mesh() - ), - mesh(), - dimensioned<Type> - ( - "0", - rho.dimensions()*vf.dimensions()/dimTime, - Zero - ) - ) + "ddt("+rho.name()+','+vf.name()+')', + mesh().time().timeName(), + mesh() + ), + mesh(), + dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero) ); } @@ -166,24 +134,16 @@ steadyStateDdtScheme<Type>::fvcDdt const GeometricField<Type, fvPatchField, volMesh>& vf ) { - return tmp<GeometricField<Type, fvPatchField, volMesh>> + return tmp<GeometricField<Type, fvPatchField, volMesh>>::New ( - new GeometricField<Type, fvPatchField, volMesh> + IOobject ( - IOobject - ( - "ddt("+alpha.name()+','+rho.name()+','+vf.name()+')', - mesh().time().timeName(), - mesh() - ), - mesh(), - dimensioned<Type> - ( - "0", - rho.dimensions()*vf.dimensions()/dimTime, - Zero - ) - ) + "ddt("+alpha.name()+','+rho.name()+','+vf.name()+')', + mesh().time().timeName(), + mesh() + ), + mesh(), + dimensioned<Type>(rho.dimensions()*vf.dimensions()/dimTime, Zero) ); } @@ -293,9 +253,7 @@ steadyStateDdtScheme<Type>::fvcDdtUfCorr mesh(), dimensioned<typename flux<Type>::type> ( - "0", - Uf.dimensions()*dimArea/dimTime, - Zero + Uf.dimensions()*dimArea/dimTime, Zero ) ) ); @@ -327,9 +285,7 @@ steadyStateDdtScheme<Type>::fvcDdtPhiCorr mesh(), dimensioned<typename flux<Type>::type> ( - "0", - phi.dimensions()/dimTime, - Zero + phi.dimensions()/dimTime, Zero ) ) ); @@ -364,9 +320,7 @@ steadyStateDdtScheme<Type>::fvcDdtUfCorr mesh(), dimensioned<typename flux<Type>::type> ( - "0", - Uf.dimensions()*dimArea/dimTime, - Zero + Uf.dimensions()*dimArea/dimTime, Zero ) ) ); @@ -401,9 +355,7 @@ steadyStateDdtScheme<Type>::fvcDdtPhiCorr mesh(), dimensioned<typename flux<Type>::type> ( - "0", - phi.dimensions()/dimTime, - Zero + phi.dimensions()/dimTime, Zero ) ) ); @@ -420,22 +372,19 @@ tmp<surfaceScalarField> steadyStateDdtScheme<Type>::meshPhi const GeometricField<Type, fvPatchField, volMesh>& vf ) { - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - "meshPhi", - mesh().time().timeName(), - mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "meshPhi", + mesh().time().timeName(), mesh(), - dimensionedScalar("0", dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh(), + dimensionedScalar(dimVolume/dimTime, Zero) ); } diff --git a/src/finiteVolume/finiteVolume/fvc/fvcReconstructMag.C b/src/finiteVolume/finiteVolume/fvc/fvcReconstructMag.C index 654f72cf1f..2f1e780cee 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcReconstructMag.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcReconstructMag.C @@ -66,12 +66,7 @@ tmp<volScalarField> reconstructMag(const surfaceScalarField& ssf) IOobject::NO_WRITE ), mesh, - dimensionedScalar - ( - "0", - ssf.dimensions()/dimArea, - scalar(0) - ), + dimensionedScalar(ssf.dimensions()/dimArea, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSimpleReconstruct.C b/src/finiteVolume/finiteVolume/fvc/fvcSimpleReconstruct.C index bc4565fd3a..04488d9b0c 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSimpleReconstruct.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcSimpleReconstruct.C @@ -75,12 +75,7 @@ reconstruct IOobject::NO_WRITE ), mesh, - dimensioned<GradType> - ( - "0", - ssf.dimensions()/dimArea, - Zero - ), + dimensioned<GradType>(ssf.dimensions()/dimArea, Zero), extrapolatedCalculatedFvPatchField<GradType>::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.C b/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.C index bb38614e00..f1c827f227 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcSurfaceIntegrate.C @@ -98,12 +98,7 @@ surfaceIntegrate IOobject::NO_WRITE ), mesh, - dimensioned<Type> - ( - "0", - ssf.dimensions()/dimVol, - Zero - ), + dimensioned<Type>(ssf.dimensions()/dimVol, Zero), extrapolatedCalculatedFvPatchField<Type>::typeName ) ); @@ -154,7 +149,7 @@ surfaceSum IOobject::NO_WRITE ), mesh, - dimensioned<Type>("0", ssf.dimensions(), Zero), + dimensioned<Type>(ssf.dimensions(), Zero), extrapolatedCalculatedFvPatchField<Type>::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C index b8f0336226..364ac6f31b 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/LeastSquaresGrad/LeastSquaresGrad.C @@ -71,12 +71,7 @@ Foam::fv::LeastSquaresGrad<Type, Stencil>::calcGrad IOobject::NO_WRITE ), mesh, - dimensioned<GradType> - ( - "zero", - vtf.dimensions()/dimLength, - Zero - ), + dimensioned<GradType>(vtf.dimensions()/dimLength, Zero), extrapolatedCalculatedFvPatchField<GradType>::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.C index 68e919ff5b..768d59e4b8 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/gaussGrad/gaussGrad.C @@ -61,12 +61,7 @@ Foam::fv::gaussGrad<Type>::gradf IOobject::NO_WRITE ), mesh, - dimensioned<GradType> - ( - "0", - ssf.dimensions()/dimLength, - Zero - ), + dimensioned<GradType>(ssf.dimensions()/dimLength, Zero), extrapolatedCalculatedFvPatchField<GradType>::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C index 7f8b4f2658..9d4e1e2285 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/invDistLeastSquaresVectors.C @@ -51,7 +51,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ), nVectors_ ( @@ -65,7 +65,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ) { calcLeastSquaresVectors(); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C index e25da6f1c9..5cd0fc61cb 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C @@ -67,12 +67,7 @@ Foam::fv::leastSquaresGrad<Type>::calcGrad IOobject::NO_WRITE ), mesh, - dimensioned<GradType> - ( - "zero", - vsf.dimensions()/dimLength, - Zero - ), + dimensioned<GradType>(vsf.dimensions()/dimLength, Zero), extrapolatedCalculatedFvPatchField<GradType>::typeName ) ); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C index f679d67ed4..2c24af93e2 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresVectors.C @@ -51,7 +51,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ), nVectors_ ( @@ -65,7 +65,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ) { calcLeastSquaresVectors(); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C index 60aaf10805..54c1ea5798 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/unweightedLeastSquaresVectors.C @@ -51,7 +51,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ), nVectors_ ( @@ -65,7 +65,7 @@ Foam::leastSquaresVectors::leastSquaresVectors(const fvMesh& mesh) false ), mesh_, - dimensionedVector("zero", dimless/dimLength, Zero) + dimensionedVector(dimless/dimLength, Zero) ) { calcLeastSquaresVectors(); diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index c0c9b63da7..a312cd97f9 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -865,7 +865,7 @@ Foam::fvMatrix<Type>::H() const Hphi.replace ( cmpt, - dimensionedScalar("0", Hphi.dimensions(), 0.0) + dimensionedScalar(Hphi.dimensions(), Zero) ); } } diff --git a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C index 57c19372a9..2af783b182 100644 --- a/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C +++ b/src/finiteVolume/fvMatrices/solvers/isoAdvection/isoAdvection/isoAdvection.C @@ -71,7 +71,7 @@ Foam::isoAdvection::isoAdvection IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimVol, 0) + dimensionedScalar(dimVol, Zero) ), advectionTime_(0), diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencilTemplates.C index 77eead6d48..4e6ee78098 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencilTemplates.C @@ -66,12 +66,7 @@ Foam::tmp mesh ), mesh, - dimensioned<WeightedType> - ( - fld.name(), - fld.dimensions(), - Zero - ) + dimensioned<WeightedType>(fld.dimensions(), Zero) ) ); WeightedFieldType& wf = twf(); diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C index b559afef6c..49b286ffa7 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C @@ -110,12 +110,7 @@ Foam::extendedCellToFaceStencil::weightedSum false ), mesh, - dimensioned<Type> - ( - fld.name(), - fld.dimensions(), - Zero - ) + dimensioned<Type>(fld.dimensions(), Zero) ) ); GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsfCorr.ref(); diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C index d51aa7e4c2..6be79c0326 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C @@ -59,12 +59,7 @@ Foam::extendedUpwindCellToFaceStencil::weightedSum false ), mesh, - dimensioned<Type> - ( - fld.name(), - fld.dimensions(), - Zero - ) + dimensioned<Type>(fld.dimensions(), Zero) ) ); GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsfCorr.ref(); diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C index f2d9edea8a..4ea767c085 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C @@ -104,12 +104,7 @@ Foam::extendedFaceToCellStencil::weightedSum mesh ), mesh, - dimensioned<Type> - ( - fld.name(), - fld.dimensions(), - Zero - ) + dimensioned<Type>(fld.dimensions(), Zero) ) ); GeometricField<Type, fvPatchField, volMesh>& sf = tsfCorr.ref(); diff --git a/src/finiteVolume/fvMesh/fvMeshGeometry.C b/src/finiteVolume/fvMesh/fvMeshGeometry.C index 1fea4eb610..110006a7af 100644 --- a/src/finiteVolume/fvMesh/fvMeshGeometry.C +++ b/src/finiteVolume/fvMesh/fvMeshGeometry.C @@ -436,7 +436,7 @@ const Foam::surfaceScalarField& Foam::fvMesh::phi() const // mesh motion fluxes if the time has been incremented if (!time().subCycling() && phiPtr_->timeIndex() != time().timeIndex()) { - (*phiPtr_) = dimensionedScalar("0", dimVolume/dimTime, 0.0); + (*phiPtr_) = dimensionedScalar(dimVolume/dimTime, Zero); } phiPtr_->setOriented(); diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/Poisson/PoissonPatchDistMethod.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/Poisson/PoissonPatchDistMethod.C index 542dc624cf..0aa0bdb28f 100644 --- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/Poisson/PoissonPatchDistMethod.C +++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/Poisson/PoissonPatchDistMethod.C @@ -89,7 +89,7 @@ bool Foam::patchDistMethods::Poisson::correct mesh_ ), mesh_, - dimensionedScalar("yPsi", sqr(dimLength), 0.0), + dimensionedScalar(sqr(dimLength), Zero), y.boundaryFieldRef().types() ) ); diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C index 99820db026..7abf63225a 100644 --- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C +++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/advectionDiffusion/advectionDiffusionPatchDistMethod.C @@ -105,7 +105,7 @@ bool Foam::patchDistMethods::advectionDiffusion::correct false ), mesh_, - dimensionedVector("ny", dimless, Zero), + dimensionedVector(dimless, Zero), patchTypes<vector>(mesh_, patchIDs_) ); diff --git a/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C b/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C index 4a77fb8579..d566133d3c 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C +++ b/src/finiteVolume/fvMesh/wallDist/wallDist/wallDist.C @@ -49,7 +49,7 @@ void Foam::wallDist::constructn() const mesh() ), mesh(), - dimensionedVector("n" & patchTypeName_, dimless, Zero), + dimensionedVector(dimless, Zero), patchDistMethod::patchTypes<vector>(mesh(), patchIDs_) ) ); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind/upwind.H b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind/upwind.H index aa71d183b9..8d8b07f76f 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind/upwind.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/upwind/upwind.H @@ -112,22 +112,19 @@ public: const GeometricField<Type, fvPatchField, volMesh>& ) const { - return tmp<surfaceScalarField> + return tmp<surfaceScalarField>::New ( - new surfaceScalarField + IOobject ( - IOobject - ( - "upwindLimiter", - this->mesh().time().timeName(), - this->mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "upwindLimiter", + this->mesh().time().timeName(), this->mesh(), - dimensionedScalar("upwindLimiter", dimless, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + this->mesh(), + dimensionedScalar(dimless, Zero) ); } diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H index 38f47630a9..c8982913b1 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/cellCoBlended/cellCoBlended.H @@ -232,7 +232,7 @@ public: mesh ), mesh, - dimensionedScalar("Co", dimless, 0), + dimensionedScalar(dimless, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.C index 795d01d28e..a520b1548f 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/linearUpwind/linearUpwindV.C @@ -53,12 +53,7 @@ Foam::linearUpwindV<Type>::correction false ), mesh, - dimensioned<Type> - ( - vf.name(), - vf.dimensions(), - Zero - ) + dimensioned<Type>(vf.dimensions(), Zero) ) ); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrected.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrected.H index 6eef72d10c..5503048f59 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrected.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrected.H @@ -151,12 +151,7 @@ public: mesh ), mesh, - dimensioned<Type> - ( - vf.name(), - vf.dimensions(), - Zero - ) + dimensioned<Type>(vf.dimensions(), Zero) ) ); diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C index 6a4cb4df1e..7b0ea37758 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C @@ -263,7 +263,7 @@ void Foam::volPointInterpolation::makeWeights() mesh() ), pointMesh::New(mesh()), - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ); diff --git a/src/functionObjects/field/CourantNo/CourantNo.C b/src/functionObjects/field/CourantNo/CourantNo.C index 7e21b4ab4e..472f6ff26c 100644 --- a/src/functionObjects/field/CourantNo/CourantNo.C +++ b/src/functionObjects/field/CourantNo/CourantNo.C @@ -111,7 +111,7 @@ bool Foam::functionObjects::CourantNo::calc() IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ) ); diff --git a/src/functionObjects/field/Curle/Curle.C b/src/functionObjects/field/Curle/Curle.C index fcdcdd05cb..67d6675093 100644 --- a/src/functionObjects/field/Curle/Curle.C +++ b/src/functionObjects/field/Curle/Curle.C @@ -61,12 +61,7 @@ bool Foam::functionObjects::Curle::calc() const volScalarField::Boundary& dpdtBf = dpdt.boundaryField(); const surfaceVectorField::Boundary& SfBf = mesh_.Sf().boundaryField(); - dimensionedVector dfdt - ( - "0", - p.dimensions()*dimArea/dimTime, - vector::zero - ); + dimensionedVector dfdt("dfdt", p.dimensions()*dimArea/dimTime, Zero); for (auto patchi : patchSet_) { @@ -93,7 +88,7 @@ bool Foam::functionObjects::Curle::calc() IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", p.dimensions(), 0) + dimensionedScalar(p.dimensions(), Zero) ) ); @@ -120,8 +115,8 @@ Foam::functionObjects::Curle::Curle : fieldExpression(name, runTime, dict, "p"), patchSet_(), - x0_("x0", dimLength, vector::zero), - c0_("c0", dimVelocity, 0) + x0_("x0", dimLength, Zero), + c0_("c0", dimVelocity, Zero) { read(dict); diff --git a/src/functionObjects/field/DESModelRegions/DESModelRegions.C b/src/functionObjects/field/DESModelRegions/DESModelRegions.C index ba30876431..3a8e462510 100644 --- a/src/functionObjects/field/DESModelRegions/DESModelRegions.C +++ b/src/functionObjects/field/DESModelRegions/DESModelRegions.C @@ -89,7 +89,7 @@ Foam::functionObjects::DESModelRegions::DESModelRegions IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ) ); diff --git a/src/functionObjects/field/blendingFactor/blendingFactor.C b/src/functionObjects/field/blendingFactor/blendingFactor.C index c6627b1130..d46014e967 100644 --- a/src/functionObjects/field/blendingFactor/blendingFactor.C +++ b/src/functionObjects/field/blendingFactor/blendingFactor.C @@ -94,7 +94,7 @@ Foam::functionObjects::blendingFactor::blendingFactor IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ) ); diff --git a/src/functionObjects/field/ddt2/ddt2Templates.C b/src/functionObjects/field/ddt2/ddt2Templates.C index 3514dbe3b6..dc8cab344d 100644 --- a/src/functionObjects/field/ddt2/ddt2Templates.C +++ b/src/functionObjects/field/ddt2/ddt2Templates.C @@ -49,6 +49,13 @@ int Foam::functionObjects::ddt2::apply(const word& inputName, int& state) if (!foundObject<volScalarField>(outputName)) { + const dimensionSet dims = + ( + mag_ + ? mag(input.dimensions()/dimTime) + : magSqr(input.dimensions()/dimTime) + ); + tmp<volScalarField> tddt2 ( new volScalarField @@ -62,16 +69,7 @@ int Foam::functionObjects::ddt2::apply(const word& inputName, int& state) IOobject::NO_WRITE ), mesh_, - dimensionedScalar - ( - "0", - ( - mag_ - ? mag(input.dimensions()/dimTime) - : magSqr(input.dimensions()/dimTime) - ), - Zero - ) + dimensionedScalar(dims, Zero) ) ); diff --git a/src/functionObjects/field/heatTransferCoeff/heatTransferCoeff.C b/src/functionObjects/field/heatTransferCoeff/heatTransferCoeff.C index aff33118b4..d5195e3eb5 100644 --- a/src/functionObjects/field/heatTransferCoeff/heatTransferCoeff.C +++ b/src/functionObjects/field/heatTransferCoeff/heatTransferCoeff.C @@ -80,7 +80,7 @@ Foam::functionObjects::heatTransferCoeff::heatTransferCoeff IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimPower/dimArea/dimTemperature, 0.0) + dimensionedScalar(dimPower/dimArea/dimTemperature, Zero) ) ); diff --git a/src/functionObjects/field/processorField/processorField.C b/src/functionObjects/field/processorField/processorField.C index e30ab4de92..e10b70cd4c 100644 --- a/src/functionObjects/field/processorField/processorField.C +++ b/src/functionObjects/field/processorField/processorField.C @@ -65,7 +65,7 @@ Foam::functionObjects::processorField::processorField IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); diff --git a/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.C b/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.C index 2efc7fcf46..47f4cf6a11 100644 --- a/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.C +++ b/src/functionObjects/field/reactionSensitivityAnalysis/reactionsSensitivityAnalysis.C @@ -91,7 +91,7 @@ calculateSpeciesRR IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); diff --git a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C index 5536b7b56f..d5c9e98f70 100644 --- a/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C +++ b/src/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C @@ -502,7 +502,7 @@ bool Foam::functionObjects::regionSizeDistribution::write() IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ); Info<< " Dumping region as volScalarField to " << region.name() << endl; diff --git a/src/functionObjects/field/streamFunction/streamFunction.C b/src/functionObjects/field/streamFunction/streamFunction.C index 11ae3d0581..0838a07ecf 100644 --- a/src/functionObjects/field/streamFunction/streamFunction.C +++ b/src/functionObjects/field/streamFunction/streamFunction.C @@ -82,7 +82,7 @@ Foam::tmp<Foam::pointScalarField> Foam::functionObjects::streamFunction::calc mesh_ ), pMesh, - dimensionedScalar("zero", phi.dimensions(), 0.0) + dimensionedScalar(phi.dimensions(), Zero) ) ); pointScalarField& streamFunction = tstreamFunction.ref(); diff --git a/src/functionObjects/field/wallHeatFlux/wallHeatFlux.C b/src/functionObjects/field/wallHeatFlux/wallHeatFlux.C index 59bee35c32..20f74b8bd5 100644 --- a/src/functionObjects/field/wallHeatFlux/wallHeatFlux.C +++ b/src/functionObjects/field/wallHeatFlux/wallHeatFlux.C @@ -118,7 +118,7 @@ Foam::functionObjects::wallHeatFlux::wallHeatFlux IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimMass/pow3(dimTime), 0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ) ); diff --git a/src/functionObjects/field/wallShearStress/wallShearStress.C b/src/functionObjects/field/wallShearStress/wallShearStress.C index ce8281fa10..4a33436615 100644 --- a/src/functionObjects/field/wallShearStress/wallShearStress.C +++ b/src/functionObjects/field/wallShearStress/wallShearStress.C @@ -109,12 +109,7 @@ Foam::functionObjects::wallShearStress::wallShearStress IOobject::NO_WRITE ), mesh_, - dimensionedVector - ( - "0", - sqr(dimLength)/sqr(dimTime), - Zero - ) + dimensionedVector(sqr(dimLength)/sqr(dimTime), Zero) ) ); diff --git a/src/functionObjects/field/writeCellVolumes/writeCellVolumes.C b/src/functionObjects/field/writeCellVolumes/writeCellVolumes.C index 3ff4de770f..ede0001545 100644 --- a/src/functionObjects/field/writeCellVolumes/writeCellVolumes.C +++ b/src/functionObjects/field/writeCellVolumes/writeCellVolumes.C @@ -88,7 +88,7 @@ bool Foam::functionObjects::writeCellVolumes::write() false ), mesh_, - dimensionedScalar(mesh_.V().name(), mesh_.V().dimensions(), 0), + dimensionedScalar(mesh_.V().dimensions(), Zero), calculatedFvPatchField<scalar>::typeName ); diff --git a/src/functionObjects/field/yPlus/yPlus.C b/src/functionObjects/field/yPlus/yPlus.C index 9ee1931edb..72740eb4ca 100644 --- a/src/functionObjects/field/yPlus/yPlus.C +++ b/src/functionObjects/field/yPlus/yPlus.C @@ -92,7 +92,7 @@ Foam::functionObjects::yPlus::yPlus IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("0", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); diff --git a/src/functionObjects/field/zeroGradient/zeroGradientTemplates.C b/src/functionObjects/field/zeroGradient/zeroGradientTemplates.C index c900f9575d..3f8074ab5a 100644 --- a/src/functionObjects/field/zeroGradient/zeroGradientTemplates.C +++ b/src/functionObjects/field/zeroGradient/zeroGradientTemplates.C @@ -96,7 +96,7 @@ int Foam::functionObjects::zeroGradient::apply IOobject::NO_WRITE ), mesh_, - dimensioned<Type>("0", input.dimensions(), Zero), + dimensioned<Type>(input.dimensions(), Zero), zeroGradientFvPatchField<Type>::typeName ) ); diff --git a/src/functionObjects/forces/forceCoeffs/forceCoeffs.C b/src/functionObjects/forces/forceCoeffs/forceCoeffs.C index d886256e24..39852bcc24 100644 --- a/src/functionObjects/forces/forceCoeffs/forceCoeffs.C +++ b/src/functionObjects/forces/forceCoeffs/forceCoeffs.C @@ -277,7 +277,7 @@ bool Foam::functionObjects::forceCoeffs::read(const dictionary& dict) IOobject::NO_WRITE ), mesh_, - dimensionedVector("0", dimless, Zero) + dimensionedVector(dimless, Zero) ) ); @@ -296,7 +296,7 @@ bool Foam::functionObjects::forceCoeffs::read(const dictionary& dict) IOobject::NO_WRITE ), mesh_, - dimensionedVector("0", dimless, Zero) + dimensionedVector(dimless, Zero) ) ); diff --git a/src/functionObjects/forces/forces/forces.C b/src/functionObjects/forces/forces/forces.C index fc6f21a9ae..ac7dae98e4 100644 --- a/src/functionObjects/forces/forces/forces.C +++ b/src/functionObjects/forces/forces/forces.C @@ -299,7 +299,7 @@ void Foam::functionObjects::forces::resetFields() lookupObject<volVectorField>(fieldName("force")) ); - force == dimensionedVector("0", force.dimensions(), Zero); + force == dimensionedVector(force.dimensions(), Zero); volVectorField& moment = const_cast<volVectorField&> @@ -307,7 +307,7 @@ void Foam::functionObjects::forces::resetFields() lookupObject<volVectorField>(fieldName("moment")) ); - moment == dimensionedVector("0", moment.dimensions(), Zero); + moment == dimensionedVector(moment.dimensions(), Zero); } } @@ -940,7 +940,7 @@ bool Foam::functionObjects::forces::read(const dictionary& dict) IOobject::NO_WRITE ), mesh_, - dimensionedVector("0", dimForce, Zero) + dimensionedVector(dimForce, Zero) ) ); @@ -959,7 +959,7 @@ bool Foam::functionObjects::forces::read(const dictionary& dict) IOobject::NO_WRITE ), mesh_, - dimensionedVector("0", dimForce*dimLength, Zero) + dimensionedVector(dimForce*dimLength, Zero) ) ); diff --git a/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.C b/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.C index 4cce300a4d..ccaf93b7e7 100644 --- a/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.C +++ b/src/functionObjects/lagrangian/icoUncoupledKinematicCloud/icoUncoupledKinematicCloud.C @@ -64,7 +64,7 @@ Foam::functionObjects::icoUncoupledKinematicCloud::icoUncoupledKinematicCloud IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), - dimensionedVector("g", dimAcceleration, Zero) + dimensionedVector("g", dimAcceleration, Zero) // Needs name ), laminarTransport_ ( diff --git a/src/functionObjects/solvers/energyTransport/energyTransport.C b/src/functionObjects/solvers/energyTransport/energyTransport.C index a887037880..6562338cab 100644 --- a/src/functionObjects/solvers/energyTransport/energyTransport.C +++ b/src/functionObjects/solvers/energyTransport/energyTransport.C @@ -260,7 +260,7 @@ Foam::functionObjects::energyTransport::energyTransport IOobject::NO_WRITE ), mesh_, - dimensionedScalar("rhoCp", dimEnergy/dimTemperature/dimVolume, 0.0) + dimensionedScalar(dimEnergy/dimTemperature/dimVolume, Zero) ) { read(dict); diff --git a/src/functionObjects/solvers/scalarTransport/scalarTransport.C b/src/functionObjects/solvers/scalarTransport/scalarTransport.C index 707bf2a134..0045bc6e28 100644 --- a/src/functionObjects/solvers/scalarTransport/scalarTransport.C +++ b/src/functionObjects/solvers/scalarTransport/scalarTransport.C @@ -101,34 +101,26 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::scalarTransport::D if (constantD_) { - tmp<volScalarField> tD + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - Dname, - mesh_.time().timeName(), - mesh_.time(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar(Dname, phi.dimensions()/dimLength, D_) - ) + Dname, + mesh_.time().timeName(), + mesh_.time(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar(Dname, phi.dimensions()/dimLength, D_) ); - - return tD; } else if (nutName_ != "none") { const volScalarField& nutMean = mesh_.lookupObject<volScalarField>(nutName_); - return tmp<volScalarField> - ( - new volScalarField(Dname, nutMean) - ); + return tmp<volScalarField>::New(Dname, nutMean); } else if (foundObject<icoModel>(turbulenceModel::propertiesName)) { @@ -137,13 +129,10 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::scalarTransport::D turbulenceModel::propertiesName ); - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField - ( - Dname, - alphaD_*model.nu() + alphaDt_*model.nut() - ) + Dname, + alphaD_*model.nu() + alphaDt_*model.nut() ); } else if (foundObject<cmpModel>(turbulenceModel::propertiesName)) @@ -153,34 +142,27 @@ Foam::tmp<Foam::volScalarField> Foam::functionObjects::scalarTransport::D turbulenceModel::propertiesName ); - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField - ( - Dname, - alphaD_*model.mu() + alphaDt_*model.mut() - ) + Dname, + alphaD_*model.mu() + alphaDt_*model.mut() ); } - else - { - return tmp<volScalarField> + + + return tmp<volScalarField>::New + ( + IOobject ( - new volScalarField - ( - IOobject - ( - Dname, - mesh_.time().timeName(), - mesh_.time(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar(Dname, phi.dimensions()/dimLength, 0.0) - ) - ); - } + Dname, + mesh_.time().timeName(), + mesh_.time(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar(phi.dimensions()/dimLength, Zero) + ); } @@ -219,7 +201,7 @@ Foam::functionObjects::scalarTransport::scalarTransport if (resetOnStartUp_) { - s == dimensionedScalar("zero", dimless, 0.0); + s == dimensionedScalar(dimless, Zero); } } diff --git a/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C index 1fdc860131..859ce93389 100644 --- a/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/componentDisplacement/componentLaplacian/displacementComponentLaplacianFvMotionSolver.C @@ -68,12 +68,7 @@ displacementComponentLaplacianFvMotionSolver IOobject::AUTO_WRITE ), fvMesh_, - dimensionedScalar - ( - "cellDisplacement", - pointDisplacement_.dimensions(), - 0 - ), + dimensionedScalar(pointDisplacement_.dimensions(), Zero), cellMotionBoundaryTypes<scalar>(pointDisplacement_.boundaryField()) ), pointLocation_(nullptr), diff --git a/src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/velocityComponentLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/velocityComponentLaplacianFvMotionSolver.C index 6a61aee66a..4eba4ac8a0 100644 --- a/src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/velocityComponentLaplacianFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/componentVelocity/componentLaplacian/velocityComponentLaplacianFvMotionSolver.C @@ -67,12 +67,7 @@ velocityComponentLaplacianFvMotionSolver IOobject::AUTO_WRITE ), fvMesh_, - dimensionedScalar - ( - "cellMotionU", - pointMotionU_.dimensions(), - 0 - ), + dimensionedScalar(pointMotionU_.dimensions(), Zero), cellMotionBoundaryTypes<scalar>(pointMotionU_.boundaryField()) ), interpolationPtr_ diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C index 390a60fb12..f2d4c1a6c1 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/SBRStress/displacementSBRStressFvMotionSolver.C @@ -78,12 +78,7 @@ Foam::displacementSBRStressFvMotionSolver::displacementSBRStressFvMotionSolver IOobject::AUTO_WRITE ), fvMesh_, - dimensionedVector - ( - "cellDisplacement", - pointDisplacement().dimensions(), - Zero - ), + dimensionedVector(pointDisplacement().dimensions(), Zero), cellMotionBoundaryTypes<vector>(pointDisplacement().boundaryField()) ), interpolationPtr_ @@ -123,7 +118,6 @@ displacementSBRStressFvMotionSolver fvMesh_, dimensionedVector ( - "cellDisplacement", displacementMotionSolver::pointDisplacement().dimensions(), Zero ), diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C index 22d444062a..59e83177a1 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/laplacian/displacementLaplacianFvMotionSolver.C @@ -76,12 +76,7 @@ Foam::displacementLaplacianFvMotionSolver::displacementLaplacianFvMotionSolver IOobject::AUTO_WRITE ), fvMesh_, - dimensionedVector - ( - "cellDisplacement", - pointDisplacement_.dimensions(), - Zero - ), + dimensionedVector(pointDisplacement_.dimensions(), Zero), cellMotionBoundaryTypes<vector>(pointDisplacement_.boundaryField()) ), pointLocation_(nullptr), @@ -166,12 +161,7 @@ displacementLaplacianFvMotionSolver IOobject::AUTO_WRITE ), fvMesh_, - dimensionedVector - ( - "cellDisplacement", - pointDisplacement_.dimensions(), - Zero - ), + dimensionedVector(pointDisplacement_.dimensions(), Zero), cellMotionBoundaryTypes<vector>(pointDisplacement_.boundaryField()) ), pointLocation_(nullptr), diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/solidBodyDisplacementLaplacian/solidBodyDisplacementLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/solidBodyDisplacementLaplacian/solidBodyDisplacementLaplacianFvMotionSolver.C index aefde7ac5d..df0a060c00 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/solidBodyDisplacementLaplacian/solidBodyDisplacementLaplacianFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/solidBodyDisplacementLaplacian/solidBodyDisplacementLaplacianFvMotionSolver.C @@ -80,12 +80,7 @@ solidBodyDisplacementLaplacianFvMotionSolver IOobject::AUTO_WRITE ), fvMesh_, - dimensionedVector - ( - "cellDisplacement", - pointDisplacement_.dimensions(), - Zero - ), + dimensionedVector(pointDisplacement_.dimensions(), Zero), cellMotionBoundaryTypes<vector>(pointDisplacement_.boundaryField()) ), pointLocation_(nullptr), @@ -171,12 +166,7 @@ solidBodyDisplacementLaplacianFvMotionSolver IOobject::AUTO_WRITE ), fvMesh_, - dimensionedVector - ( - "cellDisplacement", - pointDisplacement_.dimensions(), - Zero - ), + dimensionedVector(pointDisplacement_.dimensions(), Zero), cellMotionBoundaryTypes<vector>(pointDisplacement_.boundaryField()) ), pointLocation_(nullptr), diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C index 9f9c2c27e2..4877ec684f 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/surfaceAlignedSBRStress/surfaceAlignedSBRStressFvMotionSolver.C @@ -75,7 +75,7 @@ surfaceAlignedSBRStressFvMotionSolver IOobject::NO_WRITE ), fvMesh_, - dimensionedVector("zero", dimless, Zero) + dimensionedVector(dimless, Zero) ), maxAng_(coeffDict().lookupOrDefault<scalar>("maxAng", 80.0)), minAng_(coeffDict().lookupOrDefault<scalar>("minAng", 20.0)), @@ -94,7 +94,7 @@ surfaceAlignedSBRStressFvMotionSolver IOobject::NO_WRITE ), fvMesh_, - dimensionedSymmTensor("zero", dimless, Zero) + dimensionedSymmTensor(dimless, Zero) ), minSigmaDiff_(coeffDict().lookupOrDefault<scalar>("minSigmaDiff", 1e-4)) { @@ -310,7 +310,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve() IOobject::NO_WRITE ), fvMesh_, - dimensionedVector("zero", dimLength, Zero), + dimensionedVector(dimLength, Zero), cellMotionBoundaryTypes<vector> ( pointDisplacement().boundaryField() @@ -355,7 +355,7 @@ void Foam::surfaceAlignedSBRStressFvMotionSolver::solve() IOobject::NO_WRITE ), fvMesh_, - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); volScalarField& mu = tmu.ref(); diff --git a/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C index 8d450954bf..572b16ce9d 100644 --- a/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/velocity/laplacian/velocityLaplacianFvMotionSolver.C @@ -66,12 +66,7 @@ Foam::velocityLaplacianFvMotionSolver::velocityLaplacianFvMotionSolver IOobject::AUTO_WRITE ), fvMesh_, - dimensionedVector - ( - "cellMotionU", - pointMotionU_.dimensions(), - Zero - ), + dimensionedVector(pointMotionU_.dimensions(), Zero), cellMotionBoundaryTypes<vector>(pointMotionU_.boundaryField()) ), interpolationPtr_ diff --git a/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C b/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C index 4f9cc95106..bcb5ace0bc 100644 --- a/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C +++ b/src/fvMotionSolver/motionInterpolation/patchCorrected/patchCorrectedInterpolationTemplates.C @@ -103,10 +103,10 @@ void Foam::patchCorrectedInterpolation::interpolateDataFromPatchGroups mesh() ), data.mesh(), - dimensionedScalar("zero", dimless, 0), + dimensionedScalar(dimless, Zero), zeroGradientPointPatchField<scalar>::typeName ); - data = dimensioned<Type>("zero", data.dimensions(), Type(Zero)); + data = dimensioned<Type>(data.dimensions(), Zero); forAll(patchGroups_, patchGroupI) { @@ -120,7 +120,7 @@ void Foam::patchCorrectedInterpolation::interpolateDataFromPatchGroups mesh() ), data.mesh(), - dimensionedScalar("zero", data.dimensions(), 0), + dimensionedScalar(data.dimensions(), Zero), zeroGradientPointPatchField<scalar>::typeName ); GeometricField<Type, pointPatchField, pointMesh> patchData(data); diff --git a/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C b/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C index c05736e3c6..57f307d66d 100644 --- a/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C +++ b/src/fvOptions/sources/derived/directionalPressureGradientExplicitSource/directionalPressureGradientExplicitSource.C @@ -474,7 +474,7 @@ void Foam::fv::directionalPressureGradientExplicitSource::addSup IOobject::NO_WRITE ), mesh_, - dimensionedVector("zero", eqn.dimensions()/dimVolume, Zero) + dimensionedVector(eqn.dimensions()/dimVolume, Zero) ); UIndirectList<vector>(Su, cells_) = gradP0_ + dGradP_ + gradPporous_; diff --git a/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSource.C b/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSource.C index 963c0c72fe..39cb29279d 100644 --- a/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSource.C +++ b/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSource.C @@ -87,7 +87,7 @@ Foam::fv::jouleHeatingSource::transformSigma false ), mesh_, - dimensionedSymmTensor("0", sigmaLocal.dimensions(), Zero), + dimensionedSymmTensor(sigmaLocal.dimensions(), Zero), zeroGradientFvPatchField<symmTensor>::typeName ) ); diff --git a/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSourceTemplates.C b/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSourceTemplates.C index 11d7eed98c..0ed146d939 100644 --- a/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSourceTemplates.C +++ b/src/fvOptions/sources/derived/jouleHeatingSource/jouleHeatingSourceTemplates.C @@ -52,12 +52,7 @@ void Foam::fv::jouleHeatingSource::initialiseSigma IOobject::AUTO_WRITE ), mesh_, - dimensioned<Type> - ( - "0", - sqr(dimCurrent)/dimPower/dimLength, - Zero - ) + dimensioned<Type>(sqr(dimCurrent)/dimPower/dimLength, Zero) ) ); diff --git a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C index 8581f53bb9..48920d1407 100644 --- a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C +++ b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C @@ -204,7 +204,7 @@ void Foam::fv::meanVelocityForce::addSup IOobject::NO_WRITE ), mesh_, - dimensionedVector("zero", eqn.dimensions()/dimVolume, Zero) + dimensionedVector(eqn.dimensions()/dimVolume, Zero) ); scalar gradP = gradP0_ + dGradP_; diff --git a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C index ac8bcf0c37..dbec4affc9 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C +++ b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C @@ -249,7 +249,7 @@ void Foam::fv::rotorDiskSource::setFaceArea(vector& axis, const bool correct) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("0", dimArea, 0) + dimensionedScalar(dimArea, Zero) ); UIndirectList<scalar>(area.primitiveField(), cells_) = area_; @@ -519,12 +519,7 @@ void Foam::fv::rotorDiskSource::addSup mesh_ ), mesh_, - dimensionedVector - ( - "zero", - eqn.dimensions()/dimVolume, - Zero - ) + dimensionedVector(eqn.dimensions()/dimVolume, Zero) ); // Read the reference density for incompressible flow @@ -560,12 +555,7 @@ void Foam::fv::rotorDiskSource::addSup mesh_ ), mesh_, - dimensionedVector - ( - "zero", - eqn.dimensions()/dimVolume, - Zero - ) + dimensionedVector(eqn.dimensions()/dimVolume, Zero) ); const vectorField Uin(inflowVelocity(eqn.psi())); diff --git a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceTemplates.C b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceTemplates.C index 5c536e5624..f305281d53 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceTemplates.C +++ b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceTemplates.C @@ -182,7 +182,7 @@ void Foam::fv::rotorDiskSource::writeField IOobject::NO_WRITE ), mesh_, - dimensioned<Type>("zero", dimless, Zero) + dimensioned<Type>(dimless, Zero) ) ); diff --git a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C index 79eaa7d6e8..6272af6db9 100644 --- a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C +++ b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C @@ -81,27 +81,24 @@ Foam::fv::solidificationMeltingSource::Cp() const { scalar CpRef = readScalar(coeffs_.lookup("CpRef")); - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - name_ + ":Cp", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + name_ + ":Cp", + mesh_.time().timeName(), mesh_, - dimensionedScalar - ( - "Cp", - dimEnergy/dimMass/dimTemperature, - CpRef - ), - extrapolatedCalculatedFvPatchScalarField::typeName - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar + ( + "Cp", + dimEnergy/dimMass/dimTemperature, + CpRef + ), + extrapolatedCalculatedFvPatchScalarField::typeName ); } else @@ -207,7 +204,7 @@ Foam::fv::solidificationMeltingSource::solidificationMeltingSource IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("alpha1", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ), curTimeIndex_(-1), diff --git a/src/fvOptions/sources/derived/viscousDissipation/viscousDissipation.C b/src/fvOptions/sources/derived/viscousDissipation/viscousDissipation.C index 9b4e980089..7ac99f96f7 100644 --- a/src/fvOptions/sources/derived/viscousDissipation/viscousDissipation.C +++ b/src/fvOptions/sources/derived/viscousDissipation/viscousDissipation.C @@ -195,7 +195,7 @@ void Foam::fv::viscousDissipation::addSup IOobject::NO_WRITE ), mesh_, - dimensionedTensor("zero", inv(dimTime) , tensor::zero) + dimensionedTensor(inv(dimTime), Zero) ) ); diff --git a/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C b/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C index 3cf82a868c..f98c6dbd1a 100644 --- a/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C +++ b/src/fvOptions/sources/general/semiImplicitSource/SemiImplicitSource.C @@ -152,12 +152,7 @@ void Foam::fv::SemiImplicitSource<Type>::addSup IOobject::NO_WRITE ), mesh_, - dimensioned<Type> - ( - "zero", - eqn.dimensions()/dimVolume, - Zero - ), + dimensioned<Type>(eqn.dimensions()/dimVolume, Zero), false ); @@ -174,12 +169,7 @@ void Foam::fv::SemiImplicitSource<Type>::addSup IOobject::NO_WRITE ), mesh_, - dimensioned<scalar> - ( - "zero", - Su.dimensions()/psi.dimensions(), - 0.0 - ), + dimensioned<scalar>(Su.dimensions()/psi.dimensions(), Zero), false ); diff --git a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C index 0adb2b5ee9..5824ba316b 100644 --- a/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C +++ b/src/fvOptions/sources/interRegion/interRegionExplicitPorositySource/interRegionExplicitPorositySource.C @@ -154,7 +154,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup IOobject::NO_WRITE ), nbrMesh, - dimensionedVector("zero", U.dimensions(), Zero) + dimensionedVector(U.dimensions(), Zero) ); // Map local velocity onto neighbour region @@ -208,7 +208,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup IOobject::NO_WRITE ), nbrMesh, - dimensionedVector("zero", U.dimensions(), Zero) + dimensionedVector(U.dimensions(), Zero) ); // Map local velocity onto neighbour region @@ -232,7 +232,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup IOobject::NO_WRITE ), nbrMesh, - dimensionedScalar("zero", dimDensity, 0.0) + dimensionedScalar(dimDensity, Zero) ); volScalarField muNbr @@ -246,7 +246,7 @@ void Foam::fv::interRegionExplicitPorositySource::addSup IOobject::NO_WRITE ), nbrMesh, - dimensionedScalar("zero", dimViscosity, 0.0) + dimensionedScalar(dimViscosity, Zero) ); const volScalarField& mu = diff --git a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C index ecf9e84410..257f3f21de 100644 --- a/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C +++ b/src/fvOptions/sources/interRegion/interRegionHeatTransfer/interRegionHeatTransferModel/interRegionHeatTransferModel.C @@ -134,12 +134,7 @@ Foam::fv::interRegionHeatTransferModel::interRegionHeatTransferModel IOobject::NO_WRITE ), mesh, - dimensionedScalar - ( - "htc", - dimEnergy/dimTime/dimTemperature/dimVolume, - 0.0 - ), + dimensionedScalar(dimEnergy/dimTime/dimTemperature/dimVolume, Zero), zeroGradientFvPatchScalarField::typeName ), semiImplicit_(false), diff --git a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C index 23394240f4..80ba38e403 100644 --- a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C +++ b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C @@ -514,7 +514,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud mesh_ ), mesh_, - dimensionedScalar("collisionSelectionRemainder", dimless, 0) + dimensionedScalar(dimless, Zero) ), q_ ( @@ -735,7 +735,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(0, 3, -1, 0, 0), 0.0), + dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero), zeroGradientFvPatchScalarField::typeName ), collisionSelectionRemainder_ @@ -747,7 +747,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud mesh_ ), mesh_, - dimensionedScalar("collisionSelectionRemainder", dimless, 0) + dimensionedScalar(dimless, Zero) ), q_ ( @@ -760,7 +760,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(1, 0, -3, 0, 0), 0.0) + dimensionedScalar(dimensionSet(1, 0, -3, 0, 0), Zero) ), fD_ ( @@ -773,12 +773,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedVector - ( - "zero", - dimensionSet(1, -1, -2, 0, 0), - Zero - ) + dimensionedVector(dimensionSet(1, -1, -2, 0, 0), Zero) ), rhoN_ ( @@ -791,7 +786,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(0, -3, 0, 0, 0), VSMALL) + dimensionedScalar("zero", dimensionSet(0, -3, 0, 0, 0), VSMALL) ), rhoM_ ( @@ -804,7 +799,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(1, -3, 0, 0, 0), VSMALL) + dimensionedScalar("zero", dimensionSet(1, -3, 0, 0, 0), VSMALL) ), dsmcRhoN_ ( @@ -817,7 +812,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(0, -3, 0, 0, 0), 0.0) + dimensionedScalar(dimensionSet(0, -3, 0, 0, 0), Zero) ), linearKE_ ( @@ -830,7 +825,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(1, -1, -2, 0, 0), 0.0) + dimensionedScalar(dimensionSet(1, -1, -2, 0, 0), Zero) ), internalE_ ( @@ -843,7 +838,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(1, -1, -2, 0, 0), 0.0) + dimensionedScalar(dimensionSet(1, -1, -2, 0, 0), Zero) ), iDof_ ( @@ -856,7 +851,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(0, -3, 0, 0, 0), VSMALL) + dimensionedScalar("zero", dimensionSet(0, -3, 0, 0, 0), VSMALL) ), momentum_ ( @@ -869,12 +864,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedVector - ( - "zero", - dimensionSet(1, -2, -1, 0, 0), - Zero - ) + dimensionedVector(dimensionSet(1, -2, -1, 0, 0), Zero) ), constProps_(), rndGen_(Pstream::myProcNo()), @@ -891,7 +881,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimensionSet(0, 0, 0, 1, 0), 0.0) + dimensionedScalar(dimensionSet(0, 0, 0, 1, 0), Zero) ) ), boundaryU_ @@ -907,12 +897,7 @@ Foam::DSMCCloud<ParcelType>::DSMCCloud IOobject::NO_WRITE ), mesh_, - dimensionedVector - ( - "zero", - dimensionSet(0, 1, -1, 0, 0), - Zero - ) + dimensionedVector(dimensionSet(0, 1, -1, 0, 0), Zero) ) ), binaryCollisionModel_(), diff --git a/src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H b/src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H index 38883fb78b..b6d3c3dbb5 100644 --- a/src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H +++ b/src/lagrangian/coalCombustion/coalCloudList/coalCloudListI.H @@ -43,7 +43,7 @@ Foam::coalCloudList::UTrans() const IOobject::NO_WRITE ), mesh_, - dimensionedVector("zero", dimMass*dimVelocity, Zero) + dimensionedVector(dimMass*dimVelocity, Zero) ) ); @@ -91,7 +91,7 @@ Foam::coalCloudList::hsTrans() const IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimEnergy, 0.0) + dimensionedScalar(dimEnergy, Zero) ) ); @@ -157,7 +157,7 @@ Foam::coalCloudList::rhoTrans() const IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimMass, 0.0) + dimensionedScalar(dimMass, Zero) ) ); @@ -193,7 +193,7 @@ Foam::coalCloudList::Srho() const IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimDensity/dimTime, 0.0) + dimensionedScalar(dimDensity/dimTime, Zero) ) ); @@ -227,7 +227,7 @@ Foam::coalCloudList::Srho IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimDensity/dimTime, 0.0) + dimensionedScalar(dimDensity/dimTime, Zero) ) ); diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index 84c7b85315..1b1a807982 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -373,7 +373,7 @@ Foam::KinematicCloud<CloudType>::KinematicCloud IOobject::AUTO_WRITE ), mesh_, - dimensionedVector("zero", dimMass*dimVelocity, Zero) + dimensionedVector(dimMass*dimVelocity, Zero) ) ), UCoeff_ @@ -389,7 +389,7 @@ Foam::KinematicCloud<CloudType>::KinematicCloud IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("zero", dimMass, 0.0) + dimensionedScalar(dimMass, Zero) ) ) { diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H index 5d3d8d233f..dc8e5fd677 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H @@ -469,7 +469,7 @@ Foam::KinematicCloud<CloudType>::vDotSweep() const false ), mesh_, - dimensionedScalar("zero", dimless/dimTime, 0.0), + dimensionedScalar(dimless/dimTime, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -508,7 +508,7 @@ Foam::KinematicCloud<CloudType>::theta() const false ), mesh_, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -547,7 +547,7 @@ Foam::KinematicCloud<CloudType>::alpha() const false ), mesh_, - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); @@ -584,7 +584,7 @@ Foam::KinematicCloud<CloudType>::rhoEff() const false ), mesh_, - dimensionedScalar("zero", dimDensity, 0.0) + dimensionedScalar(dimDensity, Zero) ) ); diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C index ffb70989bc..2526a5617c 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C @@ -133,7 +133,7 @@ Foam::ReactingCloud<CloudType>::ReactingCloud IOobject::AUTO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimMass, 0.0) + dimensionedScalar(dimMass, Zero) ) ); } diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H index 167c44cc00..0b3177385a 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloudI.H @@ -123,7 +123,7 @@ inline Foam::tmp<Foam::fvScalarMatrix> Foam::ReactingCloud<CloudType>::SYi false ), this->mesh(), - dimensionedScalar("zero", dimMass/dimTime/dimVolume, 0.0) + dimensionedScalar(dimMass/dimTime/dimVolume, Zero) ) ); @@ -173,9 +173,7 @@ Foam::ReactingCloud<CloudType>::Srho(const label i) const this->mesh(), dimensionedScalar ( - "zero", - rhoTrans_[0].dimensions()/dimTime/dimVolume, - 0.0 + rhoTrans_[0].dimensions()/dimTime/dimVolume, Zero ) ) ); @@ -210,9 +208,7 @@ Foam::ReactingCloud<CloudType>::Srho() const this->mesh(), dimensionedScalar ( - "zero", - rhoTrans_[0].dimensions()/dimTime/dimVolume, - 0.0 + rhoTrans_[0].dimensions()/dimTime/dimVolume, Zero ) ) ); @@ -252,7 +248,7 @@ Foam::ReactingCloud<CloudType>::Srho(volScalarField& rho) const false ), this->mesh(), - dimensionedScalar("zero", dimMass/dimTime/dimVolume, 0.0) + dimensionedScalar(dimMass/dimTime/dimVolume, Zero) ) ); diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C index 85e26f49db..8a45c08ed2 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C @@ -68,7 +68,7 @@ void Foam::ThermoCloud<CloudType>::setModels() IOobject::AUTO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimArea, 0.0) + dimensionedScalar(dimArea, Zero) ) ); @@ -85,7 +85,7 @@ void Foam::ThermoCloud<CloudType>::setModels() IOobject::AUTO_WRITE ), this->mesh(), - dimensionedScalar("zero", pow4(dimTemperature), 0.0) + dimensionedScalar(pow4(dimTemperature), Zero) ) ); @@ -102,12 +102,7 @@ void Foam::ThermoCloud<CloudType>::setModels() IOobject::AUTO_WRITE ), this->mesh(), - dimensionedScalar - ( - "zero", - sqr(dimLength)*pow4(dimTemperature), - 0.0 - ) + dimensionedScalar(sqr(dimLength)*pow4(dimTemperature), Zero) ) ); } @@ -173,7 +168,7 @@ Foam::ThermoCloud<CloudType>::ThermoCloud IOobject::AUTO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimEnergy, 0.0) + dimensionedScalar(dimEnergy, Zero) ) ), hsCoeff_ @@ -189,7 +184,7 @@ Foam::ThermoCloud<CloudType>::ThermoCloud IOobject::AUTO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimEnergy/dimTemperature, 0.0) + dimensionedScalar(dimEnergy/dimTemperature, Zero) ) ) { diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H index 66a9b2df9b..d681fcf3e6 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloudI.H @@ -276,7 +276,7 @@ inline Foam::tmp<Foam::volScalarField> Foam::ThermoCloud<CloudType>::Ep() const false ), this->mesh(), - dimensionedScalar("zero", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) ); @@ -312,7 +312,7 @@ inline Foam::tmp<Foam::volScalarField> Foam::ThermoCloud<CloudType>::ap() const false ), this->mesh(), - dimensionedScalar("zero", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); @@ -349,7 +349,7 @@ Foam::ThermoCloud<CloudType>::sigmap() const false ), this->mesh(), - dimensionedScalar("zero", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C index 4591d067f3..dbe243e91a 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C @@ -143,7 +143,7 @@ void Foam::ParticleErosion<CloudType>::preEvolve() IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimVolume, 0.0) + dimensionedScalar(dimVolume, Zero) ) ); } diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.C index 60c9536341..08a7d68d8b 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.C @@ -101,7 +101,7 @@ void Foam::VoidFraction<CloudType>::preEvolve() IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C index 7d6af59b41..83e0d7f947 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C @@ -147,7 +147,7 @@ Foam::volScalarField& Foam::LocalInteraction<CloudType>::massEscape() IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("zero", dimMass, 0.0) + dimensionedScalar(dimMass, Zero) ) ); } @@ -176,7 +176,7 @@ Foam::volScalarField& Foam::LocalInteraction<CloudType>::massStick() IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("zero", dimMass, 0.0) + dimensionedScalar(dimMass, Zero) ) ); } diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C index 906c89be7c..7f45192a44 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C @@ -151,7 +151,7 @@ bool Foam::AveragingMethod<Type>::write(const bool valid) const mesh_ ), mesh_, - dimensioned<Type>("zero", dimless, Zero) + dimensioned<Type>(dimless, Zero) ); GeometricField<TypeGrad, fvPatchField, volMesh> cellGrad ( @@ -162,7 +162,7 @@ bool Foam::AveragingMethod<Type>::write(const bool valid) const mesh_ ), mesh_, - dimensioned<TypeGrad>("zero", dimless, Zero) + dimensioned<TypeGrad>(dimless, Zero) ); GeometricField<Type, pointPatchField, pointMesh> pointValue ( @@ -173,7 +173,7 @@ bool Foam::AveragingMethod<Type>::write(const bool valid) const mesh_ ), pointMesh_, - dimensioned<Type>("zero", dimless, Zero) + dimensioned<Type>(dimless, Zero) ); GeometricField<TypeGrad, pointPatchField, pointMesh> pointGrad ( @@ -184,7 +184,7 @@ bool Foam::AveragingMethod<Type>::write(const bool valid) const mesh_ ), pointMesh_, - dimensioned<TypeGrad>("zero", dimless, Zero) + dimensioned<TypeGrad>(dimless, Zero) ); // Barycentric coordinates of the tet vertices diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C index 49258aeda0..3adfabb39b 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Basic/Basic.C @@ -77,7 +77,7 @@ void Foam::AveragingMethods::Basic<Type>::updateGrad() false ), this->mesh_, - dimensioned<Type>("zero", dimless, Zero), + dimensioned<Type>(dimless, Zero), zeroGradientFvPatchField<Type>::typeName ); tempData.primitiveFieldRef() = data_; diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C index 0f65a817d7..e819c7fc9e 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C @@ -53,7 +53,7 @@ Foam::PackingModels::Implicit<CloudType>::Implicit IOobject::NO_WRITE ), this->owner().mesh(), - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ), phiCorrect_(nullptr), @@ -147,7 +147,7 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store) IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimDensity, 0), + dimensionedScalar(dimDensity, Zero), zeroGradientFvPatchField<scalar>::typeName ); rho.primitiveFieldRef() = max(rhoAverage.primitiveField(), rhoMin_); @@ -168,7 +168,7 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store) IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimPressure, 0), + dimensionedScalar(dimPressure, Zero), zeroGradientFvPatchField<scalar>::typeName ); @@ -253,7 +253,7 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store) IOobject::NO_WRITE ), mesh, - dimensionedVector("zero", dimVelocity, Zero), + dimensionedVector(dimVelocity, Zero), fixedValueFvPatchField<vector>::typeName ); U.primitiveFieldRef() = uAverage.primitiveField(); diff --git a/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C b/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C index bf3a35272b..5531ae9819 100644 --- a/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C +++ b/src/lagrangian/intermediate/submodels/addOns/radiation/absorptionEmission/cloudAbsorptionEmission/cloudAbsorptionEmission.C @@ -84,7 +84,7 @@ Foam::radiation::cloudAbsorptionEmission::aDisp(const label) const false ), mesh_, - dimensionedScalar("a", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); @@ -105,25 +105,20 @@ Foam::radiation::cloudAbsorptionEmission::aDisp(const label) const Foam::tmp<Foam::volScalarField> Foam::radiation::cloudAbsorptionEmission::eDisp(const label bandI) const { - tmp<volScalarField> te + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "e", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "e", + mesh_.time().timeName(), mesh_, - dimensionedScalar("e", dimless/dimLength, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh_, + dimensionedScalar(dimless/dimLength, Zero) ); - - return te; } @@ -144,7 +139,7 @@ Foam::radiation::cloudAbsorptionEmission::EDisp(const label bandI) const false ), mesh_, - dimensionedScalar("E", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) ); diff --git a/src/lagrangian/intermediate/submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.C b/src/lagrangian/intermediate/submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.C index 0f88407b4e..032ab359fe 100644 --- a/src/lagrangian/intermediate/submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.C +++ b/src/lagrangian/intermediate/submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.C @@ -84,7 +84,7 @@ Foam::radiation::cloudScatter::sigmaEff() const false ), mesh_, - dimensionedScalar("zero", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H index 590d7494fe..4078838e21 100644 --- a/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H +++ b/src/lagrangian/molecularDynamics/molecule/mdTools/createMDFields.H @@ -195,20 +195,17 @@ Info << " Creating total velocity field" << endl; volVectorField totalVelocity - ( IOobject ( - - "velocity_total", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - + "velocity_total", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE ), mesh, - dimensionedVector("zero", dimVelocity, Zero) + dimensionedVector(dimVelocity, Zero) ); /*---------------------------------------------------------------------------*\ diff --git a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C index f617d649d6..75ac38510f 100644 --- a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C +++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C @@ -1224,7 +1224,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover false ), pMesh(), - dimensionedVector("dispVec", dimLength, Zero) + dimensionedVector(dimLength, Zero) ), medialRatio_ ( @@ -1238,7 +1238,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover false ), pMesh(), - dimensionedScalar("medialRatio", dimless, 0.0) + dimensionedScalar(dimless, Zero) ), medialDist_ ( @@ -1252,7 +1252,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover false ), pMesh(), - dimensionedScalar("pointMedialDist", dimLength, 0.0) + dimensionedScalar(dimLength, Zero) ), medialVec_ ( @@ -1266,7 +1266,7 @@ Foam::medialAxisMeshMover::medialAxisMeshMover false ), pMesh(), - dimensionedVector("medialVec", dimLength, Zero) + dimensionedVector(dimLength, Zero) ) { update(dict); diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C index d8393007db..4d9804d53a 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C @@ -1693,24 +1693,20 @@ Foam::tmp<Foam::pointVectorField> Foam::meshRefinement::makeDisplacementField // Note: time().timeName() instead of meshRefinement::timeName() since // postprocessable field. - tmp<pointVectorField> tfld + return tmp<pointVectorField>::New ( - new pointVectorField + IOobject ( - IOobject - ( - "pointDisplacement", - mesh.time().timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - pMesh, - dimensionedVector("displacement", dimLength, Zero), - patchFieldTypes - ) + "pointDisplacement", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + pMesh, + dimensionedVector(dimLength, Zero), + patchFieldTypes ); - return tfld; } @@ -2878,7 +2874,7 @@ void Foam::meshRefinement::dumpRefinementLevel() const false ), mesh_, - dimensionedScalar("zero", dimless, 0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); @@ -2908,7 +2904,7 @@ void Foam::meshRefinement::dumpRefinementLevel() const false ), pMesh, - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ); const labelList& pointLevel = meshCutter_.pointLevel(); diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C index 16115116a6..53a618a454 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C @@ -2725,7 +2725,7 @@ void Foam::meshRefinement::zonify false ), mesh_, - dimensionedScalar("zero", dimless, 0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C index 1f052776fe..116de1f724 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C @@ -1153,25 +1153,22 @@ Foam::snappyLayerDriver::makeLayerDisplacementField // Note: time().timeName() instead of meshRefinement::timeName() since // postprocessable field. - tmp<pointVectorField> tfld + + return tmp<pointVectorField>::New ( - new pointVectorField + IOobject ( - IOobject - ( - "pointDisplacement", - mesh.time().timeName(), - mesh, + "pointDisplacement", + mesh.time().timeName(), + mesh, IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - pMesh, - dimensionedVector("displacement", dimLength, Zero), - patchFieldTypes, - actualPatchTypes - ) + IOobject::AUTO_WRITE + ), + pMesh, + dimensionedVector(dimLength, Zero), + patchFieldTypes, + actualPatchTypes ); - return tfld; } @@ -3038,7 +3035,7 @@ bool Foam::snappyLayerDriver::writeLayerData false ), mesh, - dimensionedScalar("zero", dimless, 0), + dimensionedScalar(dimless, Zero), fixedValueFvPatchScalarField::typeName ); forAll(fld, celli) @@ -3078,7 +3075,7 @@ bool Foam::snappyLayerDriver::writeLayerData false ), mesh, - dimensionedScalar("zero", dimless, 0), + dimensionedScalar(dimless, Zero), fixedValueFvPatchScalarField::typeName ); volScalarField::Boundary& fldBf = fld.boundaryFieldRef(); @@ -3106,7 +3103,7 @@ bool Foam::snappyLayerDriver::writeLayerData false ), mesh, - dimensionedScalar("zero", dimless, 0), + dimensionedScalar(dimless, Zero), fixedValueFvPatchScalarField::typeName ); volScalarField::Boundary& fldBf = fld.boundaryFieldRef(); diff --git a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C index 8d7db020fe..552f43a00a 100644 --- a/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C +++ b/src/overset/cellCellStencil/cellVolumeWeight/cellVolumeWeightCellCellStencil.C @@ -680,7 +680,7 @@ Foam::cellCellStencils::cellVolumeWeight::cellVolumeWeight false ), mesh_, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ) { @@ -987,7 +987,7 @@ bool Foam::cellCellStencils::cellVolumeWeight::update() false ), mesh_, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); @@ -1012,7 +1012,7 @@ bool Foam::cellCellStencils::cellVolumeWeight::update() false ), mesh_, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); diff --git a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C index eac6cc1fef..04d127c9c8 100644 --- a/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C +++ b/src/overset/cellCellStencil/inverseDistance/inverseDistanceCellCellStencil.C @@ -1607,7 +1607,7 @@ Foam::cellCellStencils::inverseDistance::inverseDistance false ), mesh_, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ) { @@ -1998,7 +1998,7 @@ bool Foam::cellCellStencils::inverseDistance::update() false ), mesh_, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); diff --git a/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C b/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C index b2e3efccd5..815ab58e67 100644 --- a/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C +++ b/src/overset/cellCellStencil/trackingInverseDistance/trackingInverseDistanceCellCellStencil.C @@ -842,7 +842,7 @@ bool Foam::cellCellStencils::trackingInverseDistance::update() false ), mesh_, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); diff --git a/src/overset/dynamicOversetFvMesh/dynamicOversetFvMesh.C b/src/overset/dynamicOversetFvMesh/dynamicOversetFvMesh.C index c06350e255..0dfea244b7 100644 --- a/src/overset/dynamicOversetFvMesh/dynamicOversetFvMesh.C +++ b/src/overset/dynamicOversetFvMesh/dynamicOversetFvMesh.C @@ -313,7 +313,7 @@ bool Foam::dynamicOversetFvMesh::writeObject false ), *this, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); @@ -337,7 +337,7 @@ bool Foam::dynamicOversetFvMesh::writeObject false ), *this, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); diff --git a/src/overset/include/createCellMask.H b/src/overset/include/createCellMask.H index 1351e1738f..25269d0ae4 100644 --- a/src/overset/include/createCellMask.H +++ b/src/overset/include/createCellMask.H @@ -44,7 +44,7 @@ volScalarField cellMask IOobject::NO_WRITE ), mesh, - dimensionedScalar("cellMask", dimless, 1.0), + dimensionedScalar("one", dimless, 1.0), zeroGradientFvPatchScalarField::typeName ); diff --git a/src/overset/include/createInterpolatedCells.H b/src/overset/include/createInterpolatedCells.H index 87b8ebbb4a..121203cc71 100644 --- a/src/overset/include/createInterpolatedCells.H +++ b/src/overset/include/createInterpolatedCells.H @@ -44,7 +44,7 @@ volScalarField interpolatedCells IOobject::NO_WRITE ), mesh, - dimensionedScalar("interpolatedCells", dimless, 1.0), + dimensionedScalar("one", dimless, 1.0), zeroGradientFvPatchScalarField::typeName ); diff --git a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C index 38185bc6aa..b55b35771d 100644 --- a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C +++ b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C @@ -93,7 +93,7 @@ bool reactingOneDim::read(const dictionary& dict) void reactingOneDim::updateqr() { // Update local qr from coupled qr field - qr_ == dimensionedScalar("zero", qr_.dimensions(), 0.0); + qr_ == dimensionedScalar(qr_.dimensions(), Zero); // Retrieve field from coupled region using mapped boundary conditions qr_.correctBoundaryConditions(); @@ -144,8 +144,8 @@ void reactingOneDim::updateqr() void reactingOneDim::updatePhiGas() { - phiHsGas_ == dimensionedScalar("zero", phiHsGas_.dimensions(), 0.0); - phiGas_ == dimensionedScalar("zero", phiGas_.dimensions(), 0.0); + phiHsGas_ == dimensionedScalar(phiHsGas_.dimensions(), Zero); + phiGas_ == dimensionedScalar(phiGas_.dimensions(), Zero); const speciesTable& gasTable = solidChemistry_->gasTable(); @@ -414,7 +414,7 @@ reactingOneDim::reactingOneDim IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimMass/dimTime, 0.0) + dimensionedScalar(dimMass/dimTime, Zero) ), phiHsGas_ @@ -428,7 +428,7 @@ reactingOneDim::reactingOneDim IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimEnergy/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimTime, Zero) ), chemistryQdot_ @@ -442,7 +442,7 @@ reactingOneDim::reactingOneDim IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0) + dimensionedScalar(dimEnergy/dimTime/dimVolume, Zero) ), qr_ @@ -458,10 +458,10 @@ reactingOneDim::reactingOneDim regionMesh() ), - lostSolidMass_(dimensionedScalar("zero", dimMass, 0.0)), - addedGasMass_(dimensionedScalar("zero", dimMass, 0.0)), + lostSolidMass_(dimensionedScalar(dimMass, Zero)), + addedGasMass_(dimensionedScalar(dimMass, Zero)), totalGasMassFlux_(0.0), - totalHeatRR_(dimensionedScalar("zero", dimEnergy/dimTime, 0.0)), + totalHeatRR_(dimensionedScalar(dimEnergy/dimTime, Zero)), gasHSource_(false), qrHSource_(false), useChemistrySolvers_(true) @@ -514,7 +514,7 @@ reactingOneDim::reactingOneDim IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimMass/dimTime, 0.0) + dimensionedScalar(dimMass/dimTime, Zero) ), phiHsGas_ @@ -528,7 +528,7 @@ reactingOneDim::reactingOneDim IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimEnergy/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimTime, Zero) ), chemistryQdot_ @@ -542,7 +542,7 @@ reactingOneDim::reactingOneDim IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimEnergy/dimTime/dimVolume, 0.0) + dimensionedScalar(dimEnergy/dimTime/dimVolume, Zero) ), qr_ @@ -558,10 +558,10 @@ reactingOneDim::reactingOneDim regionMesh() ), - lostSolidMass_(dimensionedScalar("zero", dimMass, 0.0)), - addedGasMass_(dimensionedScalar("zero", dimMass, 0.0)), + lostSolidMass_(dimensionedScalar(dimMass, Zero)), + addedGasMass_(dimensionedScalar(dimMass, Zero)), totalGasMassFlux_(0.0), - totalHeatRR_(dimensionedScalar("zero", dimEnergy/dimTime, 0.0)), + totalHeatRR_(dimensionedScalar(dimEnergy/dimTime, Zero)), gasHSource_(false), qrHSource_(false), useChemistrySolvers_(true) diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1D.C b/src/regionModels/regionModel/regionModel1D/regionModel1D.C index 2da4dde3e0..961e62fb11 100644 --- a/src/regionModels/regionModel/regionModel1D/regionModel1D.C +++ b/src/regionModels/regionModel/regionModel1D/regionModel1D.C @@ -53,7 +53,7 @@ void Foam::regionModels::regionModel1D::constructMeshObjects() IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimArea, 0.0) + dimensionedScalar(dimArea, Zero) ) ); } diff --git a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C index 1d68751934..d3559b61f0 100644 --- a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C +++ b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C @@ -56,7 +56,7 @@ void Foam::regionModels::singleLayerRegion::constructMeshObjects() NO_WRITE ), regionMesh(), - dimensionedVector("zero", dimless, Zero), + dimensionedVector(dimless, Zero), zeroGradientFvPatchField<vector>::typeName ) ); @@ -75,7 +75,7 @@ void Foam::regionModels::singleLayerRegion::constructMeshObjects() NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimArea, 0.0), + dimensionedScalar(dimArea, Zero), zeroGradientFvPatchField<scalar>::typeName ) ); diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C index adf0bf366d..ea7b5d3c39 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C @@ -87,9 +87,9 @@ void kinematicSingleLayer::resetPrimaryRegionSourceTerms() InfoInFunction << endl; } - rhoSpPrimary_ == dimensionedScalar("zero", rhoSp_.dimensions(), 0.0); - USpPrimary_ == dimensionedVector("zero", USp_.dimensions(), Zero); - pSpPrimary_ == dimensionedScalar("zero", pSp_.dimensions(), 0.0); + rhoSpPrimary_ == dimensionedScalar(rhoSp_.dimensions(), Zero); + USpPrimary_ == dimensionedVector(USp_.dimensions(), Zero); + pSpPrimary_ == dimensionedScalar(pSp_.dimensions(), Zero); } @@ -484,7 +484,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimDensity, 0.0), + dimensionedScalar(dimDensity, Zero), zeroGradientFvPatchScalarField::typeName ), mu_ @@ -498,7 +498,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimPressure*dimTime, 0.0), + dimensionedScalar(dimPressure*dimTime, Zero), zeroGradientFvPatchScalarField::typeName ), sigma_ @@ -512,7 +512,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimMass/sqr(dimTime), 0.0), + dimensionedScalar(dimMass/sqr(dimTime), Zero), zeroGradientFvPatchScalarField::typeName ), @@ -539,7 +539,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ), U_ @@ -591,7 +591,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", delta_.dimensions()*rho_.dimensions(), 0.0), + dimensionedScalar(delta_.dimensions()*rho_.dimensions(), Zero), zeroGradientFvPatchScalarField::typeName ), @@ -606,7 +606,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("0", dimLength*dimMass/dimTime, 0.0) + dimensionedScalar(dimLength*dimMass/dimTime, Zero) ), primaryMassTrans_ @@ -620,7 +620,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimMass, 0.0), + dimensionedScalar(dimMass, Zero), zeroGradientFvPatchScalarField::typeName ), cloudMassTrans_ @@ -634,7 +634,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimMass, 0.0), + dimensionedScalar(dimMass, Zero), zeroGradientFvPatchScalarField::typeName ), cloudDiameterTrans_ @@ -648,7 +648,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimLength, -1.0), + dimensionedScalar("minus1", dimLength, -1.0), zeroGradientFvPatchScalarField::typeName ), @@ -663,10 +663,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedVector - ( - "zero", dimMass*dimVelocity/dimArea/dimTime, Zero - ), + dimensionedVector(dimMass*dimVelocity/dimArea/dimTime, Zero), this->mappedPushedFieldPatchTypes<vector>() ), pSp_ @@ -680,7 +677,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimPressure, 0.0), + dimensionedScalar(dimPressure, Zero), this->mappedPushedFieldPatchTypes<scalar>() ), rhoSp_ @@ -694,7 +691,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimMass/dimTime/dimArea, 0.0), + dimensionedScalar(dimMass/dimTime/dimArea, Zero), this->mappedPushedFieldPatchTypes<scalar>() ), @@ -709,7 +706,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), primaryMesh(), - dimensionedVector("zero", USp_.dimensions(), Zero) + dimensionedVector(USp_.dimensions(), Zero) ), pSpPrimary_ ( @@ -722,7 +719,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), primaryMesh(), - dimensionedScalar("zero", pSp_.dimensions(), 0.0) + dimensionedScalar(pSp_.dimensions(), Zero) ), rhoSpPrimary_ ( @@ -735,7 +732,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), primaryMesh(), - dimensionedScalar("zero", rhoSp_.dimensions(), 0.0) + dimensionedScalar(rhoSp_.dimensions(), Zero) ), UPrimary_ @@ -749,7 +746,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedVector("zero", dimVelocity, Zero), + dimensionedVector(dimVelocity, Zero), this->mappedFieldAndInternalPatchTypes<vector>() ), pPrimary_ @@ -763,7 +760,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimPressure, 0.0), + dimensionedScalar(dimPressure, Zero), this->mappedFieldAndInternalPatchTypes<scalar>() ), rhoPrimary_ @@ -777,7 +774,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimDensity, 0.0), + dimensionedScalar(dimDensity, Zero), this->mappedFieldAndInternalPatchTypes<scalar>() ), muPrimary_ @@ -791,7 +788,7 @@ kinematicSingleLayer::kinematicSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimPressure*dimTime, 0.0), + dimensionedScalar(dimPressure*dimTime, Zero), this->mappedFieldAndInternalPatchTypes<scalar>() ), @@ -895,9 +892,9 @@ void kinematicSingleLayer::preEvolveRegion() // Reset transfer fields //availableMass_ = mass(); availableMass_ = netMass(); - cloudMassTrans_ == dimensionedScalar("zero", dimMass, 0.0); - cloudDiameterTrans_ == dimensionedScalar("zero", dimLength, 0.0); - primaryMassTrans_ == dimensionedScalar("zero", dimMass, 0.0); + cloudMassTrans_ == dimensionedScalar(dimMass, Zero); + cloudDiameterTrans_ == dimensionedScalar(dimLength, Zero); + primaryMassTrans_ == dimensionedScalar(dimMass, Zero); } @@ -1116,22 +1113,19 @@ void kinematicSingleLayer::info() tmp<volScalarField::Internal> kinematicSingleLayer::Srho() const { - return tmp<volScalarField::Internal> + return tmp<volScalarField::Internal>::New ( - new volScalarField::Internal + IOobject ( - IOobject - ( - typeName + ":Srho", - time().timeName(), - primaryMesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + typeName + ":Srho", + time().timeName(), primaryMesh(), - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + primaryMesh(), + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ); } @@ -1141,44 +1135,38 @@ tmp<volScalarField::Internal> kinematicSingleLayer::Srho const label i ) const { - return tmp<volScalarField::Internal> + return tmp<volScalarField::Internal>::New ( - new volScalarField::Internal + IOobject ( - IOobject - ( - typeName + ":Srho(" + Foam::name(i) + ")", - time().timeName(), - primaryMesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + typeName + ":Srho(" + Foam::name(i) + ")", + time().timeName(), primaryMesh(), - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + primaryMesh(), + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ); } tmp<volScalarField::Internal> kinematicSingleLayer::Sh() const { - return tmp<volScalarField::Internal> + return tmp<volScalarField::Internal>::New ( - new volScalarField::Internal + IOobject ( - IOobject - ( - typeName + ":Sh", - time().timeName(), - primaryMesh(), - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + typeName + ":Sh", + time().timeName(), primaryMesh(), - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + primaryMesh(), + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ); } diff --git a/src/regionModels/surfaceFilmModels/noFilm/noFilm.C b/src/regionModels/surfaceFilmModels/noFilm/noFilm.C index 1669431b2d..6844942c31 100644 --- a/src/regionModels/surfaceFilmModels/noFilm/noFilm.C +++ b/src/regionModels/surfaceFilmModels/noFilm/noFilm.C @@ -72,66 +72,57 @@ Foam::scalar noFilm::CourantNumber() const tmp<volScalarField::Internal> noFilm::Srho() const { - return tmp<volScalarField::Internal> + return tmp<volScalarField::Internal>::New ( - new volScalarField::Internal + IOobject ( - IOobject - ( - "noFilm::Srho", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noFilm::Srho", + mesh_.time().timeName(), mesh_, - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh_, + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ); } tmp<volScalarField::Internal> noFilm::Srho(const label i) const { - return tmp<volScalarField::Internal> + return tmp<volScalarField::Internal>::New ( - new volScalarField::Internal + IOobject ( - IOobject - ( - "noFilm::Srho(" + Foam::name(i) + ")", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noFilm::Srho(" + Foam::name(i) + ")", + mesh_.time().timeName(), mesh_, - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh_, + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ); } tmp<volScalarField::Internal> noFilm::Sh() const { - return tmp<volScalarField::Internal> + return tmp<volScalarField::Internal>::New ( - new volScalarField::Internal + IOobject ( - IOobject - ( - "noFilm::Sh", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "noFilm::Sh", + mesh_.time().timeName(), mesh_, - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh_, + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ); } diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/constantFilmThermo/constantFilmThermo.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/constantFilmThermo/constantFilmThermo.C index 05a6a92458..ce5735a6e1 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/constantFilmThermo/constantFilmThermo.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/constantFilmThermo/constantFilmThermo.C @@ -270,7 +270,7 @@ tmp<volScalarField> constantFilmThermo::rho() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimDensity, 0.0), + dimensionedScalar(dimDensity, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -297,7 +297,7 @@ tmp<volScalarField> constantFilmThermo::mu() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimPressure*dimTime, 0.0), + dimensionedScalar(dimPressure*dimTime, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -324,7 +324,7 @@ tmp<volScalarField> constantFilmThermo::sigma() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimMass/sqr(dimTime), 0.0), + dimensionedScalar(dimMass/sqr(dimTime), Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -351,7 +351,7 @@ tmp<volScalarField> constantFilmThermo::Cp() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimEnergy/dimMass/dimTemperature, 0.0), + dimensionedScalar(dimEnergy/dimMass/dimTemperature, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -378,7 +378,7 @@ tmp<volScalarField> constantFilmThermo::kappa() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimPower/dimLength/dimTemperature, 0.0), + dimensionedScalar(dimPower/dimLength/dimTemperature, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C index fd43ba81e9..b210d1aa6d 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C @@ -251,7 +251,7 @@ tmp<volScalarField> liquidFilmThermo::rho() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimDensity, 0.0), + dimensionedScalar(dimDensity, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -296,7 +296,7 @@ tmp<volScalarField> liquidFilmThermo::mu() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimPressure*dimTime, 0.0), + dimensionedScalar(dimPressure*dimTime, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -341,7 +341,7 @@ tmp<volScalarField> liquidFilmThermo::sigma() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimMass/sqr(dimTime), 0.0), + dimensionedScalar(dimMass/sqr(dimTime), Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -386,7 +386,7 @@ tmp<volScalarField> liquidFilmThermo::Cp() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimEnergy/dimMass/dimTemperature, 0.0), + dimensionedScalar(dimEnergy/dimMass/dimTemperature, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -431,7 +431,7 @@ tmp<volScalarField> liquidFilmThermo::kappa() const IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("0", dimPower/dimLength/dimTemperature, 0.0), + dimensionedScalar(dimPower/dimLength/dimTemperature, Zero), extrapolatedCalculatedFvPatchScalarField::typeName ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C index 11168b0028..d70b50c710 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C @@ -83,7 +83,7 @@ tmp<volVectorField> laminar::Us() const IOobject::NO_WRITE ), filmModel_.regionMesh(), - dimensionedVector("zero", dimVelocity, Zero), + dimensionedVector(dimVelocity, Zero), extrapolatedCalculatedFvPatchVectorField::typeName ) ); @@ -98,21 +98,18 @@ tmp<volVectorField> laminar::Us() const tmp<volScalarField> laminar::mut() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - typeName + ":mut", - filmModel_.regionMesh().time().timeName(), - filmModel_.regionMesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + typeName + ":mut", + filmModel_.regionMesh().time().timeName(), filmModel_.regionMesh(), - dimensionedScalar("zero", dimMass/dimLength/dimTime, 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + filmModel_.regionMesh(), + dimensionedScalar(dimMass/dimLength/dimTime, Zero) ); } diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C index 8750cfbd84..2d8f8e76f8 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/contactAngleForce/contactAngleForce.C @@ -142,7 +142,7 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U) IOobject::NO_WRITE ), filmModel_.regionMesh(), - dimensionedVector("zero", dimForce/dimArea, Zero) + dimensionedVector(dimForce/dimArea, Zero) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/distribution/distributionContactAngleForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/distribution/distributionContactAngleForce.C index 842fb3a6bf..02b31643a6 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/distribution/distributionContactAngleForce.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/distribution/distributionContactAngleForce.C @@ -83,7 +83,7 @@ tmp<volScalarField> distributionContactAngleForce::theta() const filmModel_.regionMesh() ), filmModel_.regionMesh(), - dimensionedScalar("0", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/perturbedTemperatureDependent/perturbedTemperatureDependentContactAngleForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/perturbedTemperatureDependent/perturbedTemperatureDependentContactAngleForce.C index 5aaf1d6886..7e416b3a1c 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/perturbedTemperatureDependent/perturbedTemperatureDependentContactAngleForce.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/perturbedTemperatureDependent/perturbedTemperatureDependentContactAngleForce.C @@ -92,7 +92,7 @@ perturbedTemperatureDependentContactAngleForce::theta() const filmModel_.regionMesh() ), filmModel_.regionMesh(), - dimensionedScalar("0", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.C index b3cc459a0a..7a547947c5 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForces/temperatureDependent/temperatureDependentContactAngleForce.C @@ -80,7 +80,7 @@ tmp<volScalarField> temperatureDependentContactAngleForce::theta() const filmModel_.regionMesh() ), filmModel_.regionMesh(), - dimensionedScalar("0", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C index 5f8f6a86a0..7ea255e419 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C @@ -204,7 +204,7 @@ tmp<scalarField> curvatureSeparation::calcCosAngle IOobject::NO_READ ), mesh, - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), zeroGradientFvPatchScalarField::typeName ); volCosAngle.primitiveFieldRef() = cosAngle; @@ -346,7 +346,7 @@ void curvatureSeparation::correct IOobject::NO_READ ), mesh, - dimensionedScalar("zero", dimForce, 0.0), + dimensionedScalar(dimForce, Zero), zeroGradientFvPatchScalarField::typeName ); volFnet.primitiveFieldRef() = Fnet; diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C index 1d76dad3c6..1dee50801d 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/constantRadiation/constantRadiation.C @@ -116,7 +116,7 @@ tmp<volScalarField> constantRadiation::Shs() IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.C index 0c64201d1c..49ecaad671 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/noRadiation/noRadiation.C @@ -73,21 +73,18 @@ void noRadiation::correct() tmp<volScalarField> noRadiation::Shs() { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - typeName + ":Shs", - film().time().timeName(), - film().regionMesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), + typeName + ":Shs", + film().time().timeName(), film().regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + film().regionMesh(), + dimensionedScalar(dimMass/pow3(dimTime), Zero) ); } diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C index fb1fdd6a8c..11a0beb5fe 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/primaryRadiation/primaryRadiation.C @@ -67,7 +67,7 @@ primaryRadiation::primaryRadiation IOobject::NO_WRITE ), film.regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0), + dimensionedScalar(dimMass/pow3(dimTime), Zero), film.mappedPushedFieldPatchTypes<scalar>() ) {} @@ -103,7 +103,7 @@ tmp<volScalarField> primaryRadiation::Shs() IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C index b8e8390d4a..c64c2f5abe 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmRadiationModel/standardRadiation/standardRadiation.C @@ -68,7 +68,7 @@ standardRadiation::standardRadiation IOobject::NO_WRITE ), film.regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0), + dimensionedScalar(dimMass/pow3(dimTime), Zero), film.mappedPushedFieldPatchTypes<scalar>() ), qrNet_ @@ -82,7 +82,7 @@ standardRadiation::standardRadiation IOobject::NO_WRITE ), film.regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0), + dimensionedScalar(dimMass/pow3(dimTime), Zero), zeroGradientFvPatchScalarField::typeName ), beta_(readScalar(coeffDict_.lookup("beta"))), @@ -120,7 +120,7 @@ tmp<volScalarField> standardRadiation::Shs() IOobject::NO_WRITE ), film().regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ) ); diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/filmViscosityModel/thixotropicViscosity/thixotropicViscosity.C b/src/regionModels/surfaceFilmModels/submodels/thermo/filmViscosityModel/thixotropicViscosity/thixotropicViscosity.C index 4087f833f4..d4c08e9b98 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/filmViscosityModel/thixotropicViscosity/thixotropicViscosity.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/filmViscosityModel/thixotropicViscosity/thixotropicViscosity.C @@ -141,7 +141,7 @@ void thixotropicViscosity::correct const volScalarField deltaMass ( "thixotropicViscosity:deltaMass", - max(dimensionedScalar("zero", dimMass, 0), film.deltaMass()) + max(dimensionedScalar(dimMass, Zero), film.deltaMass()) ); fvScalarMatrix lambdaEqn diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.C b/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.C index 5b2b7ab82e..8e9f8a074b 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/heatTransferModel/mappedConvectiveHeatTransfer/mappedConvectiveHeatTransfer.C @@ -80,7 +80,7 @@ mappedConvectiveHeatTransfer::mappedConvectiveHeatTransfer IOobject::NO_WRITE ), film.regionMesh(), - dimensionedScalar("zero", dimMass/pow3(dimTime)/dimTemperature, 0.0), + dimensionedScalar(dimMass/pow3(dimTime)/dimTemperature, Zero), film.mappedPushedFieldPatchTypes<scalar>() ) { diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C index b4ff36124b..46e9f4b77d 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/solidification/solidification.C @@ -82,7 +82,7 @@ solidification::solidification IOobject::AUTO_WRITE ), film.regionMesh(), - dimensionedScalar("zero", dimMass, 0.0), + dimensionedScalar(dimMass, Zero), zeroGradientFvPatchScalarField::typeName ), thickness_ @@ -96,7 +96,7 @@ solidification::solidification IOobject::AUTO_WRITE ), film.regionMesh(), - dimensionedScalar("zero", dimLength, 0.0), + dimensionedScalar(dimLength, Zero), zeroGradientFvPatchScalarField::typeName ) {} diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index 72d4e76781..fd9c58350f 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -96,7 +96,7 @@ void thermoSingleLayer::resetPrimaryRegionSourceTerms() kinematicSingleLayer::resetPrimaryRegionSourceTerms(); - hsSpPrimary_ == dimensionedScalar("zero", hsSp_.dimensions(), 0.0); + hsSpPrimary_ == dimensionedScalar(hsSp_.dimensions(), Zero); } @@ -341,7 +341,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar("Cp", dimEnergy/dimMass/dimTemperature, 0.0), + dimensionedScalar(dimEnergy/dimMass/dimTemperature, Zero), zeroGradientFvPatchScalarField::typeName ), kappa_ @@ -355,12 +355,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::AUTO_WRITE ), regionMesh(), - dimensionedScalar - ( - "kappa", - dimEnergy/dimTime/dimLength/dimTemperature, - 0.0 - ), + dimensionedScalar(dimEnergy/dimTime/dimLength/dimTemperature, Zero), zeroGradientFvPatchScalarField::typeName ), @@ -413,7 +408,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimEnergy/dimMass, 0.0), + dimensionedScalar(dimEnergy/dimMass, Zero), hsBoundaryTypes() ), @@ -428,7 +423,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimEnergy, 0), + dimensionedScalar(dimEnergy, Zero), zeroGradientFvPatchScalarField::typeName ), @@ -448,7 +443,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimEnergy/dimArea/dimTime, 0.0), + dimensionedScalar(dimEnergy/dimArea/dimTime, Zero), this->mappedPushedFieldPatchTypes<scalar>() ), @@ -463,7 +458,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::NO_WRITE ), primaryMesh(), - dimensionedScalar("zero", hsSp_.dimensions(), 0.0) + dimensionedScalar(hsSp_.dimensions(), Zero) ), TPrimary_ @@ -477,7 +472,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimTemperature, 0.0), + dimensionedScalar(dimTemperature, Zero), this->mappedFieldAndInternalPatchTypes<scalar>() ), @@ -527,7 +522,7 @@ thermoSingleLayer::thermoSingleLayer IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar("zero", dimless, 0.0), + dimensionedScalar(dimless, Zero), pSp_.boundaryField().types() ) ); @@ -620,7 +615,7 @@ void thermoSingleLayer::preEvolveRegion() } kinematicSingleLayer::preEvolveRegion(); - primaryEnergyTrans_ == dimensionedScalar("zero", dimEnergy, 0.0); + primaryEnergyTrans_ == dimensionedScalar(dimEnergy, Zero); } @@ -734,7 +729,7 @@ tmp<volScalarField::Internal> thermoSingleLayer::Srho() const false ), primaryMesh(), - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); @@ -786,7 +781,7 @@ tmp<volScalarField::Internal> thermoSingleLayer::Srho false ), primaryMesh(), - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); @@ -836,7 +831,7 @@ tmp<volScalarField::Internal> thermoSingleLayer::Sh() const false ), primaryMesh(), - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); diff --git a/src/regionModels/thermalBaffleModels/noThermo/noThermo.C b/src/regionModels/thermalBaffleModels/noThermo/noThermo.C index 5e982fb62c..c877897ffe 100644 --- a/src/regionModels/thermalBaffleModels/noThermo/noThermo.C +++ b/src/regionModels/thermalBaffleModels/noThermo/noThermo.C @@ -105,7 +105,7 @@ const tmp<volScalarField> noThermo::Cp() const false ), primaryMesh(), - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); } diff --git a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C index ec37bb8cf9..fd18fe6ac9 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C @@ -87,7 +87,7 @@ void thermalBaffle::solveEnergy() false ), regionMesh(), - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); @@ -178,12 +178,7 @@ thermalBaffle::thermalBaffle IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar - ( - "zero", - dimEnergy/dimArea/dimTime, - Zero - ) + dimensionedScalar(dimEnergy/dimArea/dimTime, Zero) ), Q_ ( @@ -196,12 +191,7 @@ thermalBaffle::thermalBaffle IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar - ( - "zero", - dimEnergy/dimVolume/dimTime, - Zero - ) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ), radiation_ ( @@ -238,12 +228,7 @@ thermalBaffle::thermalBaffle IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar - ( - "zero", - dimEnergy/dimArea/dimTime, - Zero - ) + dimensionedScalar(dimEnergy/dimArea/dimTime, Zero) ), Q_ ( @@ -256,12 +241,7 @@ thermalBaffle::thermalBaffle IOobject::NO_WRITE ), regionMesh(), - dimensionedScalar - ( - "zero", - dimEnergy/dimVolume/dimTime, - Zero - ) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ), radiation_ ( diff --git a/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C b/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C index 3acf80c916..c8f68330cb 100644 --- a/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C +++ b/src/rigidBodyMeshMotion/rigidBodyMeshMotion/rigidBodyMeshMotion.C @@ -76,7 +76,7 @@ Foam::rigidBodyMeshMotion::bodyMesh::bodyMesh false ), pointMesh::New(mesh), - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) {} diff --git a/src/sampling/sampledSurface/distanceSurface/distanceSurface.C b/src/sampling/sampledSurface/distanceSurface/distanceSurface.C index 242bce5982..f4df841a94 100644 --- a/src/sampling/sampledSurface/distanceSurface/distanceSurface.C +++ b/src/sampling/sampledSurface/distanceSurface/distanceSurface.C @@ -74,7 +74,7 @@ void Foam::distanceSurface::createGeometry() false ), fvm, - dimensionedScalar("zero", dimLength, 0) + dimensionedScalar(dimLength, Zero) ) ); volScalarField& cellDistance = cellDistancePtr_(); @@ -254,7 +254,7 @@ void Foam::distanceSurface::createGeometry() false ), pointMesh::New(fvm), - dimensionedScalar("zero", dimLength, 0) + dimensionedScalar(dimLength, Zero) ); pDist.primitiveFieldRef() = pointDistance_; diff --git a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C index 1d5eaaf38a..7badfa4885 100644 --- a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C +++ b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C @@ -114,7 +114,7 @@ void Foam::sampledCuttingPlane::createGeometry() false ), mesh, - dimensionedScalar(dimLength) + dimensionedScalar(dimLength, Zero) ) ); volScalarField& cellDistance = cellDistancePtr_(); @@ -212,7 +212,7 @@ void Foam::sampledCuttingPlane::createGeometry() false ), pointMesh::New(mesh), - dimensionedScalar(dimLength) + dimensionedScalar(dimLength, Zero) ); pDist.primitiveFieldRef() = pointDistance_; diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C b/src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C index 1759583596..7fa7405009 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C @@ -174,7 +174,7 @@ Foam::sampledSurface::pointAverage false ), mesh, - dimensioned<Type>("zero", dimless, Zero) + dimensioned<Type>(dimless, Zero) ) ); GeometricField<Type, fvPatchField, volMesh>& cellAvg = tcellAvg.ref(); diff --git a/src/sampling/surfMeshSampler/surfMeshSampler/surfMeshSamplerTemplates.C b/src/sampling/surfMeshSampler/surfMeshSampler/surfMeshSamplerTemplates.C index bde5add16a..deb77a8f27 100644 --- a/src/sampling/surfMeshSampler/surfMeshSampler/surfMeshSamplerTemplates.C +++ b/src/sampling/surfMeshSampler/surfMeshSampler/surfMeshSamplerTemplates.C @@ -54,7 +54,7 @@ Foam::surfMeshSampler::getOrCreateSurfField IOobject::NO_WRITE ), surf, - dimensioned<Type>("0", vField.dimensions(), Zero) + dimensioned<Type>(vField.dimensions(), Zero) ); ptr->writeOpt() = IOobject::NO_WRITE; diff --git a/src/sampling/surface/triSurfaceMesh/discreteSurfaceTemplates.C b/src/sampling/surface/triSurfaceMesh/discreteSurfaceTemplates.C index c046d1e488..2fed330e65 100644 --- a/src/sampling/surface/triSurfaceMesh/discreteSurfaceTemplates.C +++ b/src/sampling/surface/triSurfaceMesh/discreteSurfaceTemplates.C @@ -67,7 +67,7 @@ bool Foam::discreteSurface::sampleType IOobject::NO_WRITE ), surf, - dimensioned<Type>("0", fld.dimensions(), Zero) + dimensioned<Type>(fld.dimensions(), Zero) ); ptr->writeOpt() = IOobject::NO_WRITE; diff --git a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C index bdc81f1273..76f65c6693 100644 --- a/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C +++ b/src/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionSolver/sixDoFRigidBodyMotionSolver.C @@ -100,7 +100,7 @@ Foam::sixDoFRigidBodyMotionSolver::sixDoFRigidBodyMotionSolver false ), pointMesh::New(mesh), - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ), curTimeIndex_(-1) { diff --git a/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModel.C b/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModel.C index e6d61507e6..f3ef1e69f6 100644 --- a/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModel.C +++ b/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModel.C @@ -55,7 +55,7 @@ Foam::barotropicCompressibilityModel::barotropicCompressibilityModel gamma.mesh() ), gamma.mesh(), - dimensionedScalar(psiName, dimensionSet(0, -2, 2, 0, 0), 0) + dimensionedScalar(dimensionSet(0, -2, 2, 0, 0), Zero) ), gamma_(gamma) {} diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C index 36492a072f..b7dd06710e 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/TDACChemistryModel/TDACChemistryModel.C @@ -61,7 +61,7 @@ Foam::TDACChemistryModel<CompType, ThermoType>::TDACChemistryModel IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("0", dimless, 0) + dimensionedScalar(dimless, Zero) ) { basicMultiComponentMixture& composition = this->thermo().composition(); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C index fe401093c7..e202aa2399 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C @@ -74,7 +74,7 @@ Foam::chemistryModel<CompType, ThermoType>::chemistryModel IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); } @@ -476,7 +476,7 @@ Foam::chemistryModel<CompType, ThermoType>::tc() const false ), this->mesh(), - dimensionedScalar("zero", dimTime, SMALL), + dimensionedScalar("small", dimTime, SMALL), extrapolatedCalculatedFvPatchScalarField::typeName ) ); @@ -550,7 +550,7 @@ Foam::chemistryModel<CompType, ThermoType>::Qdot() const false ), this->mesh_, - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); @@ -596,7 +596,7 @@ Foam::chemistryModel<CompType, ThermoType>::calculateRR IOobject::NO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); diff --git a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C index eb4c2c04a0..4decd9cf27 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C +++ b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C @@ -124,7 +124,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::Gulders::Su0pTphi false ), p.mesh(), - dimensionedScalar("Su0", dimVelocity, 0.0) + dimensionedScalar(dimVelocity, Zero) ) ); @@ -177,7 +177,7 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::Gulders::Su0pTphi false ), p.mesh(), - dimensionedScalar("Su0", dimVelocity, 0.0) + dimensionedScalar(dimVelocity, Zero) ) ); diff --git a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C index befd4d0973..48f9ff392d 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C +++ b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C @@ -124,7 +124,7 @@ Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi false ), p.mesh(), - dimensionedScalar("Su0", dimVelocity, 0.0) + dimensionedScalar(dimVelocity, Zero) ) ); @@ -179,7 +179,7 @@ Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi false ), p.mesh(), - dimensionedScalar("Su0", dimVelocity, 0.0) + dimensionedScalar(dimVelocity, Zero) ) ); diff --git a/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C b/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C index 1fff569d9c..ecd107189c 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C +++ b/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C @@ -307,7 +307,7 @@ Foam::laminarFlameSpeedModels::RaviPetersen::operator()() const false ), p.mesh(), - dimensionedScalar("EqR", dimless, 0.0) + dimensionedScalar(dimless, Zero) ); if (psiuReactionThermo_.composition().contains("ft")) @@ -339,7 +339,7 @@ Foam::laminarFlameSpeedModels::RaviPetersen::operator()() const false ), p.mesh(), - dimensionedScalar("Su0", dimVelocity, 0.0) + dimensionedScalar(dimVelocity, Zero) ) ); diff --git a/src/thermophysicalModels/radiation/radiationModels/P1/P1.C b/src/thermophysicalModels/radiation/radiationModels/P1/P1.C index edb306e321..62dbcf22e2 100644 --- a/src/thermophysicalModels/radiation/radiationModels/P1/P1.C +++ b/src/thermophysicalModels/radiation/radiationModels/P1/P1.C @@ -73,7 +73,7 @@ Foam::radiation::P1::P1(const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), a_ ( @@ -86,7 +86,7 @@ Foam::radiation::P1::P1(const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("a", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ), e_ ( @@ -99,7 +99,7 @@ Foam::radiation::P1::P1(const volScalarField& T) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("a", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ), E_ ( @@ -112,7 +112,7 @@ Foam::radiation::P1::P1(const volScalarField& T) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("E", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) {} @@ -143,7 +143,7 @@ Foam::radiation::P1::P1(const dictionary& dict, const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), a_ ( @@ -156,7 +156,7 @@ Foam::radiation::P1::P1(const dictionary& dict, const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("a", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ), e_ ( @@ -169,7 +169,7 @@ Foam::radiation::P1::P1(const dictionary& dict, const volScalarField& T) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("a", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ), E_ ( @@ -182,7 +182,7 @@ Foam::radiation::P1::P1(const dictionary& dict, const volScalarField& T) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("E", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) {} @@ -217,7 +217,7 @@ void Foam::radiation::P1::calculate() E_ = absorptionEmission_->E(); const volScalarField sigmaEff(scatter_->sigmaEff()); - const dimensionedScalar a0 ("a0", a_.dimensions(), ROOTVSMALL); + const dimensionedScalar a0("a0", a_.dimensions(), ROOTVSMALL); // Construct diffusion const volScalarField gamma diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C index fcd820e252..9e746ba187 100644 --- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C +++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C @@ -228,7 +228,7 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("G", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qr_ ( @@ -241,7 +241,7 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qem_ ( @@ -254,7 +254,7 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("qem", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qin_ ( @@ -267,7 +267,7 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qin", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), a_ ( @@ -280,7 +280,7 @@ Foam::radiation::fvDOM::fvDOM(const volScalarField& T) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("a", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ), nTheta_(readLabel(coeffs_.lookup("nTheta"))), nPhi_(readLabel(coeffs_.lookup("nPhi"))), @@ -321,7 +321,7 @@ Foam::radiation::fvDOM::fvDOM IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("G", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qr_ ( @@ -334,7 +334,7 @@ Foam::radiation::fvDOM::fvDOM IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qem_ ( @@ -347,7 +347,7 @@ Foam::radiation::fvDOM::fvDOM IOobject::NO_WRITE ), mesh_, - dimensionedScalar("qem", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qin_ ( @@ -360,7 +360,7 @@ Foam::radiation::fvDOM::fvDOM IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qin", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), a_ ( @@ -373,7 +373,7 @@ Foam::radiation::fvDOM::fvDOM IOobject::NO_WRITE ), mesh_, - dimensionedScalar("a", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ), nTheta_(readLabel(coeffs_.lookup("nTheta"))), nPhi_(readLabel(coeffs_.lookup("nPhi"))), @@ -507,10 +507,10 @@ void Foam::radiation::fvDOM::updateBlackBodyEmission() void Foam::radiation::fvDOM::updateG() { - G_ = dimensionedScalar("zero",dimMass/pow3(dimTime), 0.0); - qr_ = dimensionedScalar("zero",dimMass/pow3(dimTime), 0.0); - qem_ = dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0); - qin_ = dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0); + G_ = dimensionedScalar(dimMass/pow3(dimTime), Zero); + qr_ = dimensionedScalar(dimMass/pow3(dimTime), Zero); + qem_ = dimensionedScalar(dimMass/pow3(dimTime), Zero); + qin_ = dimensionedScalar(dimMass/pow3(dimTime), Zero); forAll(IRay_, rayI) { diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C b/src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C index 84a70d45e8..813ce53c47 100644 --- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C +++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C @@ -65,7 +65,7 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay IOobject::NO_WRITE ), mesh_, - dimensionedScalar("I", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qr_ ( @@ -78,7 +78,7 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay IOobject::NO_WRITE ), mesh_, - dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qin_ ( @@ -91,7 +91,7 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay IOobject::NO_WRITE ), mesh_, - dimensionedScalar("qin", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qem_ ( @@ -104,7 +104,7 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay IOobject::NO_WRITE ), mesh_, - dimensionedScalar("qem", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), d_(Zero), dAve_(Zero), @@ -295,7 +295,7 @@ Foam::scalar Foam::radiation::radiativeIntensityRay::correct() void Foam::radiation::radiativeIntensityRay::addIntensity() { - I_ = dimensionedScalar("zero", dimMass/pow3(dimTime), 0.0); + I_ = dimensionedScalar(dimMass/pow3(dimTime), Zero); forAll(ILambda_, lambdaI) { diff --git a/src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.C b/src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.C index ccfe900a46..b2195ee7be 100644 --- a/src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.C +++ b/src/thermophysicalModels/radiation/radiationModels/noRadiation/noRadiation.C @@ -80,25 +80,20 @@ void Foam::radiation::noRadiation::calculate() Foam::tmp<Foam::volScalarField> Foam::radiation::noRadiation::Rp() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "Rp", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "Rp", + mesh_.time().timeName(), mesh_, - dimensionedScalar - ( - "Rp", - constant::physicoChemical::sigma.dimensions()/dimLength, - 0.0 - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar + ( + constant::physicoChemical::sigma.dimensions()/dimLength, Zero ) ); } @@ -107,24 +102,18 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::noRadiation::Rp() const Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>> Foam::radiation::noRadiation::Ru() const { - return tmp<volScalarField::Internal> + return tmp<volScalarField::Internal>::New ( - new volScalarField::Internal + IOobject ( - IOobject - ( - "Ru", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "Ru", + mesh_.time().timeName(), mesh_, - dimensionedScalar - ( - "Ru", dimMass/dimLength/pow3(dimTime), 0.0 - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ); } diff --git a/src/thermophysicalModels/radiation/radiationModels/opaqueSolid/opaqueSolid.C b/src/thermophysicalModels/radiation/radiationModels/opaqueSolid/opaqueSolid.C index 37c0f0e440..c9370409c5 100644 --- a/src/thermophysicalModels/radiation/radiationModels/opaqueSolid/opaqueSolid.C +++ b/src/thermophysicalModels/radiation/radiationModels/opaqueSolid/opaqueSolid.C @@ -81,25 +81,20 @@ void Foam::radiation::opaqueSolid::calculate() Foam::tmp<Foam::volScalarField> Foam::radiation::opaqueSolid::Rp() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "Rp", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "Rp", + mesh_.time().timeName(), mesh_, - dimensionedScalar - ( - "Rp", - constant::physicoChemical::sigma.dimensions()/dimLength, - 0.0 - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar + ( + constant::physicoChemical::sigma.dimensions()/dimLength, Zero ) ); } @@ -108,24 +103,18 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::opaqueSolid::Rp() const Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>> Foam::radiation::opaqueSolid::Ru() const { - return tmp<volScalarField::Internal> + return tmp<volScalarField::Internal>::New ( - new volScalarField::Internal + IOobject ( - IOobject - ( - "Ru", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), + "Ru", + mesh_.time().timeName(), mesh_, - dimensionedScalar - ( - "Ru", dimMass/dimLength/pow3(dimTime), 0.0 - ) - ) + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ); } diff --git a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C index 4480ea67dd..ef90e016bb 100644 --- a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C +++ b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceShading/faceShading.C @@ -377,7 +377,7 @@ void Foam::faceShading::calculate() IOobject::NO_WRITE ), mesh_, - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); diff --git a/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C b/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C index 0afa376113..be8ecf3a69 100644 --- a/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C +++ b/src/thermophysicalModels/radiation/radiationModels/solarLoad/solarLoad.C @@ -641,7 +641,7 @@ Foam::radiation::solarLoad::solarLoad(const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qsecondRad_ ( @@ -654,7 +654,7 @@ Foam::radiation::solarLoad::solarLoad(const volScalarField& T) IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qsecondRad", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), hitFaces_(), Ru_ @@ -668,7 +668,7 @@ Foam::radiation::solarLoad::solarLoad(const volScalarField& T) IOobject::NO_WRITE ), mesh_, - dimensionedScalar("Ru", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ), solarCalc_(this->subDict(typeName + "Coeffs"), mesh_), verticalDir_(Zero), @@ -731,7 +731,7 @@ Foam::radiation::solarLoad::solarLoad IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qsecondRad_ ( @@ -744,7 +744,7 @@ Foam::radiation::solarLoad::solarLoad IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qsecondRad", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), hitFaces_(), Ru_ @@ -758,7 +758,7 @@ Foam::radiation::solarLoad::solarLoad IOobject::NO_WRITE ), mesh_, - dimensionedScalar("Ru", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ), solarCalc_(coeffs_, mesh_), verticalDir_(Zero), @@ -823,7 +823,7 @@ Foam::radiation::solarLoad::solarLoad IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qr", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), qsecondRad_ ( @@ -836,7 +836,7 @@ Foam::radiation::solarLoad::solarLoad IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("qsecondRad", dimMass/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/pow3(dimTime), Zero) ), hitFaces_(), Ru_ @@ -850,7 +850,7 @@ Foam::radiation::solarLoad::solarLoad IOobject::NO_WRITE ), mesh_, - dimensionedScalar("Ru", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ), solarCalc_(dict, mesh_), verticalDir_(Zero), @@ -982,26 +982,22 @@ void Foam::radiation::solarLoad::calculate() Foam::tmp<Foam::volScalarField> Foam::radiation::solarLoad::Rp() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "Rp", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "Rp", + mesh_.time().timeName(), mesh_, - dimensionedScalar - ( - "zero", - dimMass/pow3(dimTime)/dimLength/pow4(dimTemperature), - 0.0 - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh_, + dimensionedScalar + ( + dimMass/pow3(dimTime)/dimLength/pow4(dimTemperature), + Zero ) ); } diff --git a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C index 0164ce0aa1..debb639ae4 100644 --- a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C +++ b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C @@ -675,26 +675,21 @@ void Foam::radiation::viewFactor::calculate() Foam::tmp<Foam::volScalarField> Foam::radiation::viewFactor::Rp() const { - return tmp<volScalarField> + return tmp<volScalarField>::New ( - new volScalarField + IOobject ( - IOobject - ( - "Rp", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "Rp", + mesh_.time().timeName(), mesh_, - dimensionedScalar - ( - "zero", - dimMass/pow3(dimTime)/dimLength/pow4(dimTemperature), - 0.0 - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh_, + dimensionedScalar + ( + dimMass/dimLength/pow3(dimTime)/pow4(dimTemperature), Zero ) ); } @@ -703,22 +698,19 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::viewFactor::Rp() const Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>> Foam::radiation::viewFactor::Ru() const { - return tmp<DimensionedField<scalar, volMesh>> + return tmp<DimensionedField<scalar, volMesh>>::New ( - new DimensionedField<scalar, volMesh> + IOobject ( - IOobject - ( - "Ru", - mesh_.time().timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), + "Ru", + mesh_.time().timeName(), mesh_, - dimensionedScalar("zero", dimMass/dimLength/pow3(dimTime), 0.0) - ) + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + mesh_, + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ); } diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModel.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModel.C index 57da0d1dcb..d7dbe75b33 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModel.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModel.C @@ -81,7 +81,7 @@ Foam::radiation::absorptionEmissionModel::aCont(const label bandI) const false ), mesh_, - dimensionedScalar("zero", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); } @@ -104,7 +104,7 @@ Foam::radiation::absorptionEmissionModel::aDisp(const label bandI) const false ), mesh_, - dimensionedScalar("zero", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); } @@ -134,7 +134,7 @@ Foam::radiation::absorptionEmissionModel::eCont(const label bandI) const false ), mesh_, - dimensionedScalar("zero", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); } @@ -157,7 +157,7 @@ Foam::radiation::absorptionEmissionModel::eDisp(const label bandI) const false ), mesh_, - dimensionedScalar("zero", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); } @@ -187,7 +187,7 @@ Foam::radiation::absorptionEmissionModel::ECont(const label bandI) const false ), mesh_, - dimensionedScalar("zero", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) ); } @@ -210,7 +210,7 @@ Foam::radiation::absorptionEmissionModel::EDisp(const label bandI) const false ), mesh_, - dimensionedScalar("zero", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) ); } diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C index e8a4321db8..221fbfa4f2 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C @@ -207,7 +207,7 @@ Foam::radiation::greyMeanAbsorptionEmission::aCont(const label bandI) const IOobject::NO_WRITE ), mesh(), - dimensionedScalar("a", dimless/dimLength, 0.0), + dimensionedScalar(dimless/dimLength, Zero), extrapolatedCalculatedFvPatchVectorField::typeName ) ); @@ -288,7 +288,7 @@ Foam::radiation::greyMeanAbsorptionEmission::ECont(const label bandI) const IOobject::NO_WRITE ), mesh_, - dimensionedScalar("E", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) ); diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C index aef799dfec..7317d02a21 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C @@ -156,7 +156,7 @@ calc(const label propertyId) const IOobject::NO_WRITE ), mesh(), - dimensionedScalar("a", dimless/dimLength, 0.0), + dimensionedScalar(dimless/dimLength, Zero), extrapolatedCalculatedFvPatchVectorField::typeName ) ); diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/multiBandSolidAbsorptionEmission/multiBandSolidAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/multiBandSolidAbsorptionEmission/multiBandSolidAbsorptionEmission.C index c63354266b..bb713ec316 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/multiBandSolidAbsorptionEmission/multiBandSolidAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/multiBandSolidAbsorptionEmission/multiBandSolidAbsorptionEmission.C @@ -147,7 +147,7 @@ Foam::radiation::multiBandSolidAbsorptionEmission::ECont IOobject::NO_WRITE ), mesh(), - dimensionedScalar("E", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) ); diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C index cb900d1a26..f37c3fc010 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionEmission.C @@ -172,7 +172,7 @@ Foam::radiation::wideBandAbsorptionEmission::aCont(const label bandi) const IOobject::NO_WRITE ), mesh(), - dimensionedScalar("a", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); @@ -244,7 +244,7 @@ Foam::radiation::wideBandAbsorptionEmission::ECont(const label bandi) const IOobject::NO_WRITE ), mesh(), - dimensionedScalar("E", dimMass/dimLength/pow3(dimTime), 0.0) + dimensionedScalar(dimMass/dimLength/pow3(dimTime), Zero) ) ); @@ -287,7 +287,7 @@ void Foam::radiation::wideBandAbsorptionEmission::correct PtrList<volScalarField>& aLambda ) const { - a = dimensionedScalar("zero", dimless/dimLength, 0.0); + a = dimensionedScalar(dimless/dimLength, Zero); for (label j=0; j<nBands_; j++) { diff --git a/src/thermophysicalModels/radiation/submodels/scatterModel/noScatter/noScatter.C b/src/thermophysicalModels/radiation/submodels/scatterModel/noScatter/noScatter.C index b0c9460792..999b09866b 100644 --- a/src/thermophysicalModels/radiation/submodels/scatterModel/noScatter/noScatter.C +++ b/src/thermophysicalModels/radiation/submodels/scatterModel/noScatter/noScatter.C @@ -74,7 +74,7 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::noScatter::sigmaEff() const false ), mesh_, - dimensionedScalar("zero", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) ); } diff --git a/src/thermophysicalModels/radiation/submodels/transmissivityModel/noTransmissivity/noTransmissivity.C b/src/thermophysicalModels/radiation/submodels/transmissivityModel/noTransmissivity/noTransmissivity.C index a76818e03e..9de0d0f8f0 100644 --- a/src/thermophysicalModels/radiation/submodels/transmissivityModel/noTransmissivity/noTransmissivity.C +++ b/src/thermophysicalModels/radiation/submodels/transmissivityModel/noTransmissivity/noTransmissivity.C @@ -82,7 +82,7 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::noTransmissivity::tauEff false ), mesh_, - dimensionedScalar("zero", dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); } diff --git a/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractions.C b/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractions.C index e7daabe79f..5cfcde4a33 100644 --- a/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractions.C +++ b/src/thermophysicalModels/reactionThermo/functionObjects/moleFractions/moleFractions.C @@ -82,7 +82,7 @@ Foam::moleFractions<ThermoType>::moleFractions IOobject::AUTO_WRITE ), mesh_, - dimensionedScalar("X", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); } diff --git a/src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C index a3643c0d30..7772c6a1da 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C @@ -64,7 +64,7 @@ Foam::tmp<Foam::volScalarField> Foam::basicSpecieMixture::W() const Y[0].mesh() ), Y[0].mesh(), - dimensionedScalar("zero", dimless, 0) + dimensionedScalar(dimless, Zero) ) ); diff --git a/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C index cd54215071..6f6c43de49 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C @@ -196,11 +196,11 @@ Foam::singleStepReactingMixture<ThermoType>::singleStepReactingMixture ) : reactingMixture<ThermoType>(thermoDict, mesh, phaseName), - stoicRatio_(dimensionedScalar("stoicRatio", dimless, 0.0)), - s_(dimensionedScalar("s", dimless, 0.0)), - qFuel_(dimensionedScalar("qFuel", sqr(dimVelocity), 0.0)), - specieStoichCoeffs_(this->species_.size(), 0.0), - Yprod0_(this->species_.size(), 0.0), + stoicRatio_(dimensionedScalar("stoicRatio", dimless, Zero)), + s_(dimensionedScalar("s", dimless, Zero), + qFuel_(dimensionedScalar("qFuel", sqr(dimVelocity), Zero)), + specieStoichCoeffs_(this->species_.size(), Zero), + Yprod0_(this->species_.size(), Zero), fres_(Yprod0_.size()), inertIndex_(this->species()[thermoDict.lookup("inertSpecie")]), fuelIndex_(this->species()[thermoDict.lookup("fuel")]), @@ -226,7 +226,7 @@ Foam::singleStepReactingMixture<ThermoType>::singleStepReactingMixture ( header, mesh, - dimensionedScalar("fres" + name(fresI), dimless, 0.0) + dimensionedScalar(dimless, Zero) ) ); } diff --git a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C index 7f18977b71..f57c68be72 100644 --- a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C +++ b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C @@ -132,7 +132,7 @@ pyrolysisChemistryModel IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); } @@ -633,7 +633,7 @@ Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::gasHs false ), this->mesh_, - dimensionedScalar("zero", dimEnergy/dimMass, 0.0) + dimensionedScalar(dimEnergy/dimMass, Zero) ) ); diff --git a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModelI.H b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModelI.H index 0132bc2585..b6b8eebb1d 100644 --- a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModelI.H +++ b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModelI.H @@ -92,7 +92,7 @@ RRg() const IOobject::NO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C index 4a8d094133..2502c50f52 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C @@ -75,7 +75,7 @@ solidChemistryModel IOobject::NO_WRITE ), mesh, - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); } @@ -130,7 +130,7 @@ Foam::solidChemistryModel<CompType, SolidThermo>::Qdot() const false ), this->mesh_, - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H index 74cf06d7dd..30dbe855af 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModelI.H @@ -80,7 +80,7 @@ Foam::solidChemistryModel<CompType, SolidThermo>::RRs() const IOobject::NO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimMass/dimVolume/dimTime, 0.0) + dimensionedScalar(dimMass/dimVolume/dimTime, Zero) ) ); @@ -113,7 +113,7 @@ Foam::solidChemistryModel<CompType, SolidThermo>::RRsHs() const IOobject::NO_WRITE ), this->mesh(), - dimensionedScalar("zero", dimEnergy/dimVolume/dimTime, 0.0) + dimensionedScalar(dimEnergy/dimVolume/dimTime, Zero) ) ); diff --git a/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C index bfcf0d4368..cab53b7688 100644 --- a/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/thermophysicalPropertiesFvPatchFields/liquidProperties/humidityTemperatureCoupledMixed/humidityTemperatureCoupledMixedFvPatchScalarField.C @@ -108,7 +108,7 @@ Foam::humidityTemperatureCoupledMixedFvPatchScalarField::thicknessField IOobject::AUTO_WRITE ), mesh, - dimensionedScalar("zero", dimLength, 0.0) + dimensionedScalar(dimLength, Zero) ) ); diff --git a/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C b/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C index fbad1eed48..e88c55d8a4 100644 --- a/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C +++ b/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C @@ -96,7 +96,7 @@ void Foam::rawTopoChangerFvMesh::zeroUnmappedValues false ), *this, - dimensioned<Type>("0", fld.dimensions(), Zero) + dimensioned<Type>(fld.dimensions(), Zero) ) ); } diff --git a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C index 061feda8ab..c6a2d14de0 100644 --- a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C +++ b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/incompressibleTwoPhaseMixture.C @@ -111,7 +111,7 @@ Foam::incompressibleTwoPhaseMixture::incompressibleTwoPhaseMixture U_.db() ), U_.mesh(), - dimensionedScalar("nu", dimViscosity, 0), + dimensionedScalar(dimViscosity, Zero), calculatedFvPatchScalarField::typeName ) { diff --git a/src/transportModels/incompressible/viscosityModels/strainRateFunction/strainRateFunction.C b/src/transportModels/incompressible/viscosityModels/strainRateFunction/strainRateFunction.C index 22f117c55b..714090eb69 100644 --- a/src/transportModels/incompressible/viscosityModels/strainRateFunction/strainRateFunction.C +++ b/src/transportModels/incompressible/viscosityModels/strainRateFunction/strainRateFunction.C @@ -75,7 +75,7 @@ Foam::viscosityModels::strainRateFunction::strainRateFunction IOobject::AUTO_WRITE ), U_.mesh(), - dimensionedScalar(name, dimViscosity, 0) + dimensionedScalar(dimViscosity, Zero) ) { correct(); diff --git a/src/transportModels/interfaceProperties/interfaceProperties.C b/src/transportModels/interfaceProperties/interfaceProperties.C index 978ecef4ca..aec4481f9b 100644 --- a/src/transportModels/interfaceProperties/interfaceProperties.C +++ b/src/transportModels/interfaceProperties/interfaceProperties.C @@ -183,7 +183,7 @@ Foam::interfaceProperties::interfaceProperties alpha1_.mesh() ), alpha1_.mesh(), - dimensionedScalar("nHatf", dimArea, 0.0) + dimensionedScalar(dimArea, Zero) ), K_ @@ -195,7 +195,7 @@ Foam::interfaceProperties::interfaceProperties alpha1_.mesh() ), alpha1_.mesh(), - dimensionedScalar("K", dimless/dimLength, 0.0) + dimensionedScalar(dimless/dimLength, Zero) ) { calculateK(); -- GitLab