diff --git a/applications/solvers/DNS/dnsFoam/readTurbulenceProperties.H b/applications/solvers/DNS/dnsFoam/readTurbulenceProperties.H index 9f4d8368a8..20fd654cef 100644 --- a/applications/solvers/DNS/dnsFoam/readTurbulenceProperties.H +++ b/applications/solvers/DNS/dnsFoam/readTurbulenceProperties.H @@ -13,7 +13,7 @@ ); volVectorField force = - U/dimensionedScalar("dt", dimTime, runTime.deltaT().value()); + U/dimensionedScalar("dt", dimTime, runTime.deltaTValue()); Kmesh K(mesh); - UOprocess forceGen(K, runTime.deltaT().value(), turbulenceProperties); + UOprocess forceGen(K, runTime.deltaTValue(), turbulenceProperties); diff --git a/applications/solvers/combustion/PDRFoam/StCourantNo.H b/applications/solvers/combustion/PDRFoam/StCourantNo.H index 18d6e86a94..5f3f3359fb 100644 --- a/applications/solvers/combustion/PDRFoam/StCourantNo.H +++ b/applications/solvers/combustion/PDRFoam/StCourantNo.H @@ -41,11 +41,11 @@ Description StCoNum = max(SfUfbyDelta/mesh.magSf()).value() - *runTime.deltaT().value(); + *runTime.deltaTValue(); meanStCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())).value() - *runTime.deltaT().value(); + *runTime.deltaTValue(); } Info<< "St courant Number mean: " << meanStCoNum diff --git a/applications/solvers/combustion/PDRFoam/setDeltaT.H b/applications/solvers/combustion/PDRFoam/setDeltaT.H index 7092e9779a..c40bc4a1d7 100644 --- a/applications/solvers/combustion/PDRFoam/setDeltaT.H +++ b/applications/solvers/combustion/PDRFoam/setDeltaT.H @@ -41,12 +41,12 @@ if (adjustTimeStep) ( min ( - deltaTFact*runTime.deltaT().value(), + deltaTFact*runTime.deltaTValue(), maxDeltaT ) ); - Info<< "deltaT = " << runTime.deltaT().value() << endl; + Info<< "deltaT = " << runTime.deltaTValue() << endl; } // ************************************************************************* // diff --git a/applications/solvers/combustion/XiFoam/bEqn.H b/applications/solvers/combustion/XiFoam/bEqn.H index d06ec2e5f0..2b9b50d124 100644 --- a/applications/solvers/combustion/XiFoam/bEqn.H +++ b/applications/solvers/combustion/XiFoam/bEqn.H @@ -40,7 +40,7 @@ if (ign.ignited()) ( mesh.surfaceInterpolation::deltaCoeffs() *mag(phiSt)/(fvc::interpolate(rho)*mesh.magSf()) - ).value()*runTime.deltaT().value(); + ).value()*runTime.deltaTValue(); Info<< "Max St-Courant Number = " << StCoNum << endl; diff --git a/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C b/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C index eaf3219445..ce80690224 100644 --- a/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C +++ b/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C @@ -89,8 +89,8 @@ int main(int argc, char *argv[]) chemistry.solve ( - runTime.value() - runTime.deltaT().value(), - runTime.deltaT().value() + runTime.value() - runTime.deltaTValue(), + runTime.deltaTValue() ); // turbulent time scale diff --git a/applications/solvers/combustion/dieselFoam/dieselFoam.C b/applications/solvers/combustion/dieselFoam/dieselFoam.C index 63549b99a5..42d9534654 100644 --- a/applications/solvers/combustion/dieselFoam/dieselFoam.C +++ b/applications/solvers/combustion/dieselFoam/dieselFoam.C @@ -80,8 +80,8 @@ int main(int argc, char *argv[]) chemistry.solve ( - runTime.value() - runTime.deltaT().value(), - runTime.deltaT().value() + runTime.value() - runTime.deltaTValue(), + runTime.deltaTValue() ); // turbulent time scale diff --git a/applications/solvers/combustion/reactingFoam/chemistry.H b/applications/solvers/combustion/reactingFoam/chemistry.H index d059bd9ed3..691b6dcb92 100644 --- a/applications/solvers/combustion/reactingFoam/chemistry.H +++ b/applications/solvers/combustion/reactingFoam/chemistry.H @@ -3,8 +3,8 @@ chemistry.solve ( - runTime.value() - runTime.deltaT().value(), - runTime.deltaT().value() + runTime.value() - runTime.deltaTValue(), + runTime.deltaTValue() ); // turbulent time scale diff --git a/applications/solvers/combustion/rhoReactingFoam/chemistry.H b/applications/solvers/combustion/rhoReactingFoam/chemistry.H index d059bd9ed3..691b6dcb92 100644 --- a/applications/solvers/combustion/rhoReactingFoam/chemistry.H +++ b/applications/solvers/combustion/rhoReactingFoam/chemistry.H @@ -3,8 +3,8 @@ chemistry.solve ( - runTime.value() - runTime.deltaT().value(), - runTime.deltaT().value() + runTime.value() - runTime.deltaTValue(), + runTime.deltaTValue() ); // turbulent time scale diff --git a/applications/solvers/compressible/rhoCentralFoam/compressibleCourantNo.H b/applications/solvers/compressible/rhoCentralFoam/compressibleCourantNo.H index 33b4edc8a7..a0601fc1de 100644 --- a/applications/solvers/compressible/rhoCentralFoam/compressibleCourantNo.H +++ b/applications/solvers/compressible/rhoCentralFoam/compressibleCourantNo.H @@ -38,11 +38,11 @@ if (mesh.nInternalFaces()) surfaceScalarField amaxSfbyDelta = mesh.surfaceInterpolation::deltaCoeffs()*amaxSf; - CoNum = max(amaxSfbyDelta/mesh.magSf()).value()*runTime.deltaT().value(); + CoNum = max(amaxSfbyDelta/mesh.magSf()).value()*runTime.deltaTValue(); meanCoNum = (sum(amaxSfbyDelta)/sum(mesh.magSf())).value() - *runTime.deltaT().value(); + *runTime.deltaTValue(); } Info<< "Mean and max Courant Numbers = " diff --git a/applications/solvers/compressible/rhoSonicFoam/rhoSonicFoam.C b/applications/solvers/compressible/rhoSonicFoam/rhoSonicFoam.C index 0571ee5082..f06b13e5de 100644 --- a/applications/solvers/compressible/rhoSonicFoam/rhoSonicFoam.C +++ b/applications/solvers/compressible/rhoSonicFoam/rhoSonicFoam.C @@ -68,7 +68,7 @@ int main(int argc, char *argv[]) ( mesh.surfaceInterpolation::deltaCoeffs() *mag(phiv)/mesh.magSf() - ).value()*runTime.deltaT().value(); + ).value()*runTime.deltaTValue(); Info<< "\nMax Courant Number = " << CoNum << endl; diff --git a/applications/solvers/compressible/rhopSonicFoam/rhopSonicFoam.C b/applications/solvers/compressible/rhopSonicFoam/rhopSonicFoam.C index 3d71de6324..def72f426b 100644 --- a/applications/solvers/compressible/rhopSonicFoam/rhopSonicFoam.C +++ b/applications/solvers/compressible/rhopSonicFoam/rhopSonicFoam.C @@ -65,7 +65,7 @@ int main(int argc, char *argv[]) ( mesh.surfaceInterpolation::deltaCoeffs() *mag(phiv)/mesh.magSf() - ).value()*runTime.deltaT().value(); + ).value()*runTime.deltaTValue(); Info<< "Max Courant Number = " << CoNum << endl; diff --git a/applications/solvers/electromagnetics/mhdFoam/magneticFieldErr.H b/applications/solvers/electromagnetics/mhdFoam/magneticFieldErr.H index a25c31e683..a9db2ea585 100644 --- a/applications/solvers/electromagnetics/mhdFoam/magneticFieldErr.H +++ b/applications/solvers/electromagnetics/mhdFoam/magneticFieldErr.H @@ -1,4 +1,4 @@ Info<< "magnetic flux divergence error = " - << runTime.deltaT().value() + << runTime.deltaTValue() *mag(fvc::div(phiB))().weightedAverage(mesh.V()).value() << endl; diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/compressibleCourantNo.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/compressibleCourantNo.C index a3d68f55ca..93e42ee0d5 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/compressibleCourantNo.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/compressibleCourantNo.C @@ -47,10 +47,10 @@ Foam::scalar Foam::compressibleCourantNo / fvc::interpolate(rho); CoNum = max(SfUfbyDelta/mesh.magSf()) - .value()*runTime.deltaT().value(); + .value()*runTime.deltaTValue(); meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())) - .value()*runTime.deltaT().value(); + .value()*runTime.deltaTValue(); } Info<< "Region: " << mesh.name() << " Courant Number mean: " << meanCoNum diff --git a/applications/solvers/incompressible/shallowWaterFoam/CourantNo.H b/applications/solvers/incompressible/shallowWaterFoam/CourantNo.H index 125f1b23b5..570a8b0993 100644 --- a/applications/solvers/incompressible/shallowWaterFoam/CourantNo.H +++ b/applications/solvers/incompressible/shallowWaterFoam/CourantNo.H @@ -42,10 +42,10 @@ if (mesh.nInternalFaces()) *mag(phi)/fvc::interpolate(h); CoNum = max(SfUfbyDelta/mesh.magSf()) - .value()*runTime.deltaT().value(); + .value()*runTime.deltaTValue(); meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())) - .value()*runTime.deltaT().value(); + .value()*runTime.deltaTValue(); // Gravity wave Courant number waveCoNum = @@ -53,7 +53,7 @@ if (mesh.nInternalFaces()) ( mesh.surfaceInterpolation::deltaCoeffs() *sqrt(fvc::interpolate(h)) - ).value()*sqrt(magg).value()*runTime.deltaT().value(); + ).value()*sqrt(magg).value()*runTime.deltaTValue(); } Info<< "Courant number mean: " << meanCoNum diff --git a/applications/solvers/lagrangian/coalChemistryFoam/chemistry.H b/applications/solvers/lagrangian/coalChemistryFoam/chemistry.H index 07b1e9953b..3a8a5c20f1 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/chemistry.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/chemistry.H @@ -3,8 +3,8 @@ chemistry.solve ( - runTime.value() - runTime.deltaT().value(), - runTime.deltaT().value() + runTime.value() - runTime.deltaTValue(), + runTime.deltaTValue() ); // turbulent time scale diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/chemistry.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/chemistry.H index 07b1e9953b..3a8a5c20f1 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/chemistry.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/chemistry.H @@ -3,8 +3,8 @@ chemistry.solve ( - runTime.value() - runTime.deltaT().value(), - runTime.deltaT().value() + runTime.value() - runTime.deltaTValue(), + runTime.deltaTValue() ); // turbulent time scale diff --git a/applications/solvers/lagrangian/reactingParcelFoam/chemistry.H b/applications/solvers/lagrangian/reactingParcelFoam/chemistry.H index 07b1e9953b..3a8a5c20f1 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/chemistry.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/chemistry.H @@ -3,8 +3,8 @@ chemistry.solve ( - runTime.value() - runTime.deltaT().value(), - runTime.deltaT().value() + runTime.value() - runTime.deltaTValue(), + runTime.deltaTValue() ); // turbulent time scale diff --git a/applications/solvers/multiphase/cavitatingFoam/CourantNo.H b/applications/solvers/multiphase/cavitatingFoam/CourantNo.H index ee96a897b4..a9d43535ec 100644 --- a/applications/solvers/multiphase/cavitatingFoam/CourantNo.H +++ b/applications/solvers/multiphase/cavitatingFoam/CourantNo.H @@ -40,15 +40,15 @@ if (mesh.nInternalFaces()) mesh.surfaceInterpolation::deltaCoeffs()*mag(phiv); CoNum = max(SfUfbyDelta/mesh.magSf()) - .value()*runTime.deltaT().value(); + .value()*runTime.deltaTValue(); meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())) - .value()*runTime.deltaT().value(); + .value()*runTime.deltaTValue(); acousticCoNum = max ( mesh.surfaceInterpolation::deltaCoeffs()/sqrt(fvc::interpolate(psi)) - ).value()*runTime.deltaT().value(); + ).value()*runTime.deltaTValue(); } Info<< "phiv Courant Number mean: " << meanCoNum diff --git a/applications/solvers/multiphase/cavitatingFoam/setDeltaT.H b/applications/solvers/multiphase/cavitatingFoam/setDeltaT.H index e531649a91..dd8f23464a 100644 --- a/applications/solvers/multiphase/cavitatingFoam/setDeltaT.H +++ b/applications/solvers/multiphase/cavitatingFoam/setDeltaT.H @@ -43,12 +43,12 @@ if (adjustTimeStep) ( min ( - deltaTFact*runTime.deltaT().value(), + deltaTFact*runTime.deltaTValue(), maxDeltaT ) ); - Info<< "deltaT = " << runTime.deltaT().value() << endl; + Info<< "deltaT = " << runTime.deltaTValue() << endl; } // ************************************************************************* // diff --git a/applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H b/applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H index 7ba881c45b..500c53b6f1 100644 --- a/applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H +++ b/applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H @@ -44,7 +44,7 @@ if (adjustTimeStep) ( min ( - maxDeltaTFact*runTime.deltaT().value(), + maxDeltaTFact*runTime.deltaTValue(), maxDeltaT ) ); diff --git a/applications/solvers/multiphase/settlingFoam/compressibleContinuityErrs.H b/applications/solvers/multiphase/settlingFoam/compressibleContinuityErrs.H index 428465ddd9..96e37e95fb 100644 --- a/applications/solvers/multiphase/settlingFoam/compressibleContinuityErrs.H +++ b/applications/solvers/multiphase/settlingFoam/compressibleContinuityErrs.H @@ -1,5 +1,5 @@ scalar sumLocalContErr = - runTime.deltaT().value()* + runTime.deltaTValue()* mag ( fvc::ddt(rho) @@ -7,7 +7,7 @@ )().weightedAverage(rho*mesh.V()).value(); scalar globalContErr = - runTime.deltaT().value()* + runTime.deltaTValue()* ( fvc::ddt(rho) + fvc::div(phi) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/CourantNos.H b/applications/solvers/multiphase/twoPhaseEulerFoam/CourantNos.H index 75dcd68c7f..f18461d66a 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/CourantNos.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/CourantNos.H @@ -5,7 +5,7 @@ ( mesh.surfaceInterpolation::deltaCoeffs()*mag(phia - phib) /mesh.magSf() - ).value()*runTime.deltaT().value(); + ).value()*runTime.deltaTValue(); Info<< "Max Ur Courant Number = " << UrCoNum << endl; diff --git a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C index 2ce7f8ba80..51ae42fb25 100644 --- a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C +++ b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C @@ -50,6 +50,7 @@ Description #include "mathematicalConstants.H" #include "PackedBoolList.H" #include "SortableList.H" +#include "unitConversion.H" using namespace Foam; @@ -467,7 +468,7 @@ int main(int argc, char *argv[]) scalar angle(readScalar(IStringStream(args.additionalArgs()[1])())); bool overwrite = args.optionFound("overwrite"); - scalar maxCos = Foam::cos(angle*180/constant::mathematical::pi); + scalar maxCos = Foam::cos(degToRad(angle)); Info<< "Merging:" << nl << " edges with length less than " << minLen << " meters" << nl diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C index 6a9d85ba30..1776285e46 100644 --- a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C +++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C @@ -208,12 +208,13 @@ void readPoints { hasWarned = true; - WarningIn + IOWarningIn ( "readPoints(IFstream&, label&, DynamicList" - ", DynamicList