diff --git a/applications/solvers/finiteArea/liquidFilmFoam/calcFrictionFactor.H b/applications/solvers/finiteArea/liquidFilmFoam/calcFrictionFactor.H index 701b4635a1..792559c4a1 100644 --- a/applications/solvers/finiteArea/liquidFilmFoam/calcFrictionFactor.H +++ b/applications/solvers/finiteArea/liquidFilmFoam/calcFrictionFactor.H @@ -3,5 +3,5 @@ // Friction factor is defined with standard gravity frictionFactor.primitiveFieldRef() = mag(2*9.81*sqr(manningField.primitiveField())/ - pow(mag(h.primitiveField()) + 1e-7, 1.0/3.0)); + cbrt(mag(h.primitiveField()) + 1e-7)); } diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C index 0a0ab0f4e7..78c75b9348 100644 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/multiphaseMixtureThermo/multiphaseMixtureThermo.C @@ -107,7 +107,7 @@ Foam::multiphaseMixtureThermo::multiphaseMixtureThermo deltaN_ ( "deltaN", - 1e-8/pow(average(mesh_.V()), 1.0/3.0) + 1e-8/cbrt(average(mesh_.V())) ) { rhoPhi_.setOriented(); diff --git a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.C b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.C index b3a007d224..21b29248fa 100644 --- a/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.C +++ b/applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.C @@ -1145,7 +1145,7 @@ Foam::tmp Foam::phaseSystem::nHatfv const dimensionedScalar deltaN ( "deltaN", - 1e-8/pow(average(mesh_.V()), 1.0/3.0) + 1e-8/cbrt(average(mesh_.V())) ); // Face unit interface normal diff --git a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C index 9de37d62b8..31797c56a5 100644 --- a/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C +++ b/applications/solvers/multiphase/interFoam/interMixingFoam/threePhaseInterfaceProperties/threePhaseInterfaceProperties.C @@ -166,7 +166,7 @@ Foam::threePhaseInterfaceProperties::threePhaseInterfaceProperties deltaN_ ( "deltaN", - 1e-8/pow(average(mixture.U().mesh().V()), 1.0/3.0) + 1e-8/cbrt(average(mixture.U().mesh().V())) ), nHatf_ diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H b/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H index 76f47f8270..6c6da05f7a 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H @@ -44,9 +44,9 @@ forAllIter(PtrDictionary, fluid.phases(), iter) *max ( mag(U()) - maxSlamVelocity, - dimensionedScalar("U0", dimVelocity, 0) + dimensionedScalar("U0", dimVelocity, Zero) ) - /pow(mesh.V(), 1.0/3.0), + /cbrt(mesh.V()), U ) ) diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.C index 3375f228b9..37018d0f6f 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.C @@ -73,7 +73,7 @@ Foam::tmp Foam::diameterModels::isothermal::d() const "p" ); - return d0_*pow(p0_/p, 1.0/3.0); + return d0_*cbrt(p0_/p); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index df770b3f0f..30e47c042d 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -408,7 +408,7 @@ Foam::multiphaseSystem::multiphaseSystem deltaN_ ( "deltaN", - 1e-8/pow(average(mesh_.V()), 1.0/3.0) + 1e-8/cbrt(average(mesh_.V())) ) { calcAlphas(); diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C index 93ff2ee04b..fa49d98ad2 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C @@ -120,7 +120,7 @@ Foam::multiphaseMixture::multiphaseMixture deltaN_ ( "deltaN", - 1e-8/pow(average(mesh_.V()), 1.0/3.0) + 1e-8/cbrt(average(mesh_.V())) ) { rhoPhi_.setOriented(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/Tenneti/Tenneti.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/Tenneti/Tenneti.C index fb59b70b0d..9cb5874fd0 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/Tenneti/Tenneti.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialModels/dragModels/Tenneti/Tenneti.C @@ -84,7 +84,7 @@ Foam::tmp Foam::dragModels::Tenneti::CdRe() const volScalarField F0 ( - 5.81*alpha1/pow3(alpha2) + 0.48*pow(alpha1, 1.0/3.0)/pow4(alpha2) + 5.81*alpha1/pow3(alpha2) + 0.48*cbrt(alpha1)/pow4(alpha2) ); volScalarField F1 diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/isothermalDiameter/isothermalDiameter.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/isothermalDiameter/isothermalDiameter.C index 845e8b0d25..1dd704faa5 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/isothermalDiameter/isothermalDiameter.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/diameterModels/isothermalDiameter/isothermalDiameter.C @@ -73,7 +73,7 @@ Foam::tmp Foam::diameterModels::isothermal::d() const "p" ); - return d0_*pow(p0_/p, 1.0/3.0); + return d0_*cbrt(p0_/p); } diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C index 70c75214c0..40f8edfd4b 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -503,7 +503,7 @@ Foam::multiphaseSystem::multiphaseSystem deltaN_ ( "deltaN", - 1e-8/pow(average(mesh_.V()), 1.0/3.0) + 1e-8/cbrt(average(mesh_.V())) ) { forAll(phases(), phasei) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.C index ec349b7f18..04134ded3f 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/diameterModels/isothermalDiameter/isothermalDiameter.C @@ -73,7 +73,7 @@ Foam::tmp Foam::diameterModels::isothermal::d() const "p" ); - return d0_*pow(p0_/p, 1.0/3.0); + return d0_*cbrt(p0_/p); } diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C index 49e58e0447..86e4573e61 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/cubeRootVolDelta/cubeRootVolDelta.C @@ -48,7 +48,7 @@ void Foam::LESModels::cubeRootVolDelta::calcDelta() if (nD == 3) { - delta_.primitiveFieldRef() = deltaCoeff_*pow(mesh.V(), 1.0/3.0); + delta_.primitiveFieldRef() = deltaCoeff_ * cbrt(mesh.V()); } else if (nD == 2) { diff --git a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C index ed63f0f246..8de136c82d 100644 --- a/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C +++ b/src/combustionModels/eddyDissipationDiffusionModel/eddyDissipationDiffusionModel.C @@ -94,7 +94,7 @@ eddyDissipationDiffusionModel::rtDiff() const ); volScalarField& delta = tdelta.ref(); - delta.ref() = pow(this->mesh().V(), 1.0/3.0); + delta.ref() = cbrt(this->mesh().V()); delta.correctBoundaryConditions(); // NOTE: Assume Prt = 1 diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C index dae24bc067..a78c9a9c24 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C @@ -470,8 +470,8 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const const scalar cellOwnerVol = max(0.0, V[cellOwner[intFacei]]); const scalar cellNeighbourVol = max(0.0, V[cellNeighbour[intFacei]]); - scalar targetFaceSizeA = Foam::pow(cellOwnerVol, 1.0/3.0); - scalar targetFaceSizeB = Foam::pow(cellNeighbourVol, 1.0/3.0); + scalar targetFaceSizeA = Foam::cbrt(cellOwnerVol); + scalar targetFaceSizeB = Foam::cbrt(cellNeighbourVol); targetFaceSizes[intFacei] = 0.5*(targetFaceSizeA + targetFaceSizeB); } @@ -505,7 +505,7 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const const label extFacei = patchFacei + patch.start(); const scalar cellOwnerVol = max(0.0, V[cellOwner[extFacei]]); - targetFaceSizes[extFacei] = Foam::pow(cellOwnerVol, 1.0/3.0); + targetFaceSizes[extFacei] = Foam::cbrt(cellOwnerVol); } } } @@ -526,8 +526,8 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const const scalar cellOwnerVol = max(0.0, V[cellOwner[localFacei]]); const scalar cellNeighbourVol = neiCellVolumes[bFacei++]; - scalar targetFaceSizeA = Foam::pow(cellOwnerVol, 1.0/3.0); - scalar targetFaceSizeB = Foam::pow(cellNeighbourVol, 1.0/3.0); + scalar targetFaceSizeA = Foam::cbrt(cellOwnerVol); + scalar targetFaceSizeB = Foam::cbrt(cellNeighbourVol); targetFaceSizes[localFacei] = 0.5*(targetFaceSizeA + targetFaceSizeB); diff --git a/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C b/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C index e1f8360180..6d9f334fe3 100644 --- a/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C +++ b/src/functionObjects/field/stabilityBlendingFactor/stabilityBlendingFactor.C @@ -370,7 +370,7 @@ bool Foam::functionObjects::stabilityBlendingFactor::init(bool first) auto& Co = CoPtr.ref(); Co.primitiveFieldRef() = - mesh_.time().deltaT()*mag(*UNamePtr)/pow(mesh_.V(), 1.0/3.0); + mesh_.time().deltaT()*mag(*UNamePtr)/cbrt(mesh_.V()); indicator_ = max diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.C index 94ef60aa89..15a8b3d9bb 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.C @@ -42,7 +42,7 @@ Foam::AveragingMethods::Moment::Moment dataY_(FieldField::operator[](2)), dataZ_(FieldField::operator[](3)), transform_(mesh.nCells(), Zero), - scale_(0.5*pow(mesh.V(), 1.0/3.0)) + scale_(0.5*cbrt(mesh.V())) { scalar a = 1.0/24.0; scalar b = 0.5854101966249685; diff --git a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.C b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.C index 841dedef30..2892219a74 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/ParticleStressModels/Lun/Lun.C @@ -89,7 +89,7 @@ Foam::ParticleStressModels::Lun::tau 0.6 / max ( - 1.0 - pow(alpha/alphaPacked_,1.0/3.0), + 1.0 - cbrt(alpha/alphaPacked_), max(eps_*(1.0 - alpha), SMALL) ) ); diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C index 15512eb9e1..89acf57aad 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C @@ -179,7 +179,7 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs() operator== ( - pow(3*sqr(mup/rhop)/(gTan + ROOTVSMALL), 1.0/3.0)*pow(Re, 1.0/3.0) + cbrt(3*sqr(mup/rhop)/(gTan + ROOTVSMALL))*cbrt(Re) ); fixedValueFvPatchScalarField::updateCoeffs(); diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C index 6bbf834e4e..be7a860929 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C @@ -179,7 +179,7 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs() const scalarField Re(max(G, scalar(0))/mup); - operator==(n*pow(gTan*mup/(3*rhop), 1.0/3.0)*pow(Re, 2.0/3.0)); + operator==(n*cbrt(gTan*mup/(3*rhop))*pow(Re, 2.0/3.0)); fixedValueFvPatchVectorField::updateCoeffs(); } diff --git a/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGasI.H b/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGasI.H index 747f512e67..264b2c4579 100644 --- a/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGasI.H +++ b/src/thermophysicalModels/specie/equationOfState/PengRobinsonGas/PengRobinsonGasI.H @@ -236,15 +236,15 @@ inline Foam::scalar Foam::PengRobinsonGas::Z { // One root is real const scalar D05 = sqrt(D); - const scalar S = pow(Rl + D05, 1.0/3.0); + const scalar S = cbrt(Rl + D05); scalar Tl = 0; if (D05 > Rl) { - Tl = -pow(mag(Rl - D05), 1.0/3.0); + Tl = -cbrt(mag(Rl - D05)); } else { - Tl = pow(Rl - D05, 1.0/3.0); + Tl = cbrt(Rl - D05); } root = S + Tl - a2/3.0; diff --git a/src/transportModels/interfaceProperties/interfaceProperties.C b/src/transportModels/interfaceProperties/interfaceProperties.C index 4aab32d136..d806710ef5 100644 --- a/src/transportModels/interfaceProperties/interfaceProperties.C +++ b/src/transportModels/interfaceProperties/interfaceProperties.C @@ -165,7 +165,7 @@ Foam::interfaceProperties::interfaceProperties deltaN_ ( "deltaN", - 1e-8/pow(average(alpha1.mesh().V()), 1.0/3.0) + 1e-8/cbrt(average(alpha1.mesh().V())) ), alpha1_(alpha1),