mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use cbrt() instead of pow(..,1.0/3.0) in a few more places
This commit is contained in:
@ -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));
|
||||
}
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -1145,7 +1145,7 @@ Foam::tmp<Foam::surfaceVectorField> 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
|
||||
|
||||
@ -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_
|
||||
|
||||
@ -44,9 +44,9 @@ forAllIter(PtrDictionary<phaseModel>, 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
|
||||
)
|
||||
)
|
||||
|
||||
@ -73,7 +73,7 @@ Foam::tmp<Foam::volScalarField> Foam::diameterModels::isothermal::d() const
|
||||
"p"
|
||||
);
|
||||
|
||||
return d0_*pow(p0_/p, 1.0/3.0);
|
||||
return d0_*cbrt(p0_/p);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -84,7 +84,7 @@ Foam::tmp<Foam::volScalarField> 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
|
||||
|
||||
@ -73,7 +73,7 @@ Foam::tmp<Foam::volScalarField> Foam::diameterModels::isothermal::d() const
|
||||
"p"
|
||||
);
|
||||
|
||||
return d0_*pow(p0_/p, 1.0/3.0);
|
||||
return d0_*cbrt(p0_/p);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -73,7 +73,7 @@ Foam::tmp<Foam::volScalarField> Foam::diameterModels::isothermal::d() const
|
||||
"p"
|
||||
);
|
||||
|
||||
return d0_*pow(p0_/p, 1.0/3.0);
|
||||
return d0_*cbrt(p0_/p);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user