STYLE: more consistent use of dimensioned Zero, scalar decimal points

- use scalar(0) instead of scalar(0.0) etc
This commit is contained in:
Mark Olesen 2018-07-13 10:28:48 +02:00
parent e9f0ebc730
commit 0304911921
54 changed files with 103 additions and 128 deletions

View File

@ -142,10 +142,10 @@ Foam::XiEqModel::calculateSchelkinEffect(const scalar uPrimeCoef) const
const scalarField upLocal(uPrimeCoef*sqrt((U & CT & U)*cellWidth));
const scalarField deltaUp(upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0));
const scalarField deltaUp(upLocal*(max(scalar(1), pow(nr, 0.5)) - 1.0));
// Re use tN
N.primitiveFieldRef() = upLocal*(max(scalar(1.0), pow(nr, 0.5)) - 1.0);
N.primitiveFieldRef() = upLocal*(max(scalar(1), pow(nr, 0.5)) - 1.0);
return tN;
}

View File

@ -170,7 +170,7 @@ License
rDeltaT = max
(
rDeltaT,
(scalar(1.0) - rDeltaTDampingCoeff)*rDeltaT0
(scalar(1) - rDeltaTDampingCoeff)*rDeltaT0
);
}

View File

@ -120,7 +120,7 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
else
{
this->refValue() = *this;
this->valueFraction() = scalar(1.0);
this->valueFraction() = scalar(1);
}
}
}

View File

@ -95,7 +95,7 @@
IOobject::NO_WRITE
),
solidRegions[i],
dimensionedScalar("1", dimless, scalar(1.0))
dimensionedScalar("1", dimless, scalar(1))
)
);
}

View File

@ -101,7 +101,7 @@ if (mesh.changing())
pcorrEqn.setReferences
(
validCells,
scalar(0.0),
scalar(0),
true
);
}

View File

@ -122,7 +122,7 @@ License
rDeltaT = max
(
rDeltaT,
(scalar(1.0) - rDeltaTDampingCoeff)*rDeltaT0
(scalar(1) - rDeltaTDampingCoeff)*rDeltaT0
);
}

View File

@ -121,7 +121,7 @@ License
rDeltaT = max
(
rDeltaT,
(scalar(1.0) - rDeltaTDampingCoeff)*rDeltaT0
(scalar(1) - rDeltaTDampingCoeff)*rDeltaT0
);
}

View File

@ -126,7 +126,7 @@
rDeltaT = max
(
rDeltaT,
(scalar(1.0) - rDeltaTDampingCoeff)*rDeltaT0
(scalar(1) - rDeltaTDampingCoeff)*rDeltaT0
);
Info<< "Damped flow time scale min/max = "

View File

@ -25,7 +25,7 @@
mesh
),
mesh,
dimensionedScalar("zero", dimless/dimTime, 0.0)
dimensionedScalar(dimless/dimTime, Zero)
)
);
Sps.set
@ -40,7 +40,7 @@
mesh
),
mesh,
dimensionedScalar("zero", dimless/dimTime, 0.0)
dimensionedScalar(dimless/dimTime, Zero)
)
);
}

View File

@ -90,7 +90,7 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::getSpecieMassFraction
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("zero", dimless, 0),
dimensionedScalar(dimless, Zero),
zeroGradientFvPatchScalarField::typeName
)
);
@ -126,7 +126,7 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::getSpecieMassFraction
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("zero", dimless, 1),
dimensionedScalar("one", dimless, 1),
zeroGradientFvPatchScalarField::typeName
)
);
@ -251,7 +251,7 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::D
p.mesh()
),
p.mesh(),
dimensionedScalar("zero", dimArea/dimTime, 0)
dimensionedScalar(dimArea/dimTime, Zero)
)
);
@ -297,7 +297,7 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::L
p.mesh()
),
p.mesh(),
dimensionedScalar("zero", dimEnergy/dimMass, 0),
dimensionedScalar(dimEnergy/dimMass, Zero),
zeroGradientFvPatchScalarField::typeName
)
);

View File

@ -166,7 +166,7 @@ Foam::meltingEvaporationModels::kineticGasEvaporation<Thermo, OtherThermo>
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("zero", dimDensity, 0)
dimensionedScalar(dimDensity, Zero)
)
);
volScalarField& rhom = tRhom.ref();
@ -184,7 +184,7 @@ Foam::meltingEvaporationModels::kineticGasEvaporation<Thermo, OtherThermo>
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("zero", dimTemperature, 0)
dimensionedScalar(dimTemperature, Zero)
)
);
volScalarField& tDelta = tTdelta.ref();
@ -198,7 +198,7 @@ Foam::meltingEvaporationModels::kineticGasEvaporation<Thermo, OtherThermo>
tDelta = max
(
(T*Tmask - Tactivate_),
dimensionedScalar("T0", dimTemperature, 0.0)
dimensionedScalar("T0", dimTemperature, Zero)
);
}
else
@ -210,7 +210,7 @@ Foam::meltingEvaporationModels::kineticGasEvaporation<Thermo, OtherThermo>
tDelta = max
(
Tmask*(Tactivate_ - T),
dimensionedScalar("T0", dimTemperature, 0.0)
dimensionedScalar("T0", dimTemperature, Zero)
);
}

View File

@ -62,7 +62,7 @@ Foam::MassTransferPhaseSystem<BasePhaseSystem>::MassTransferPhaseSystem
IOobject::AUTO_WRITE
),
this->mesh(),
dimensionedScalar("zero", dimDensity/dimTime, 0)
dimensionedScalar(dimDensity/dimTime, Zero)
)
);
}
@ -95,7 +95,7 @@ Foam::MassTransferPhaseSystem<BasePhaseSystem>::calculateL
IOobject::NO_WRITE
),
this->mesh(),
dimensionedScalar("zero", dimEnergy/dimMass, 0)
dimensionedScalar(dimEnergy/dimMass, Zero)
)
);
volScalarField& L = tL.ref();
@ -155,7 +155,7 @@ Foam::MassTransferPhaseSystem<BasePhaseSystem>::dmdt
IOobject::NO_WRITE
),
this->mesh(),
dimensionedScalar("zero", dimDensity/dimTime, 0)
dimensionedScalar(dimDensity/dimTime, Zero)
)
);
@ -221,12 +221,7 @@ Foam::MassTransferPhaseSystem<BasePhaseSystem>::heatTransfer
IOobject::NO_WRITE
),
this->mesh(),
dimensionedScalar
(
"zero",
dimDensity/dimTime,
0
)
dimensionedScalar(dimDensity/dimTime, Zero)
)
);
volScalarField& dmdtNetki = tdmdtNetki.ref();

View File

@ -60,7 +60,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)
)
{}
@ -127,7 +127,7 @@ diffNo() const
U_.mesh()
),
U_.mesh(),
dimensionedScalar("0", dimless, 0.0)
dimensionedScalar(dimless, Zero)
);
}

View File

@ -52,7 +52,7 @@ Foam::StaticPhaseModel<BasePhaseModel>::StaticPhaseModel
fluid.mesh()
),
fluid.mesh(),
dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0)
dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero)
),
alphaPhi_
(
@ -63,7 +63,7 @@ Foam::StaticPhaseModel<BasePhaseModel>::StaticPhaseModel
fluid.mesh()
),
fluid.mesh(),
dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0)
dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero)
)
{}
@ -90,7 +90,7 @@ Foam::StaticPhaseModel<BasePhaseModel>::phi() const
U_.mesh()
),
U_.mesh(),
dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0)
dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero)
);
}
@ -99,7 +99,7 @@ template<class BasePhaseModel>
const Foam::surfaceScalarField&
Foam::StaticPhaseModel<BasePhaseModel>::phi()
{
phi_ = dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0);
phi_ = dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero);
return phi_;
}
@ -119,7 +119,7 @@ Foam::StaticPhaseModel<BasePhaseModel>::alphaPhi() const
U_.mesh()
),
U_.mesh(),
dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0)
dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero)
)
);
}
@ -129,7 +129,7 @@ template<class BasePhaseModel>
Foam::surfaceScalarField&
Foam::StaticPhaseModel<BasePhaseModel>::alphaPhi()
{
alphaPhi_ = dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0);
alphaPhi_ = dimensionedScalar(dimensionSet(0, 3, -1, 0, 0), Zero);
return alphaPhi_;
}
@ -149,7 +149,7 @@ Foam::StaticPhaseModel<BasePhaseModel>::U() const
U_.mesh()
),
U_.mesh(),
dimensionedVector("zero", dimVelocity, vector::zero)
dimensionedVector(dimVelocity, Zero)
)
);
}

View File

@ -221,7 +221,7 @@ Foam::phaseSystem::phaseSystem
IOobject::AUTO_WRITE
),
mesh_,
dimensionedScalar("zero", dimVolume/dimTime, 0.0)
dimensionedScalar(dimVolume/dimTime, Zero)
),
rhoPhi_
(
@ -234,7 +234,7 @@ Foam::phaseSystem::phaseSystem
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar("zero", dimMass/dimTime, 0.0)
dimensionedScalar(dimMass/dimTime, Zero)
),
phaseModels_(generatePhaseModels(phaseNames_)),
phasePairs_(),
@ -945,12 +945,7 @@ Foam::phaseSystem::surfaceTensionForce() const
mesh_
),
mesh_,
dimensionedScalar
(
"surfaceTensionForce",
dimensionSet(1, -2, -2, 0, 0),
0.0
)
dimensionedScalar(dimensionSet(1, -2, -2, 0, 0), Zero)
)
);
@ -1118,7 +1113,7 @@ Foam::tmp<Foam::volScalarField> Foam::phaseSystem::nearInterface() const
mesh_
),
mesh_,
dimensionedScalar("zero", dimless, 0.0)
dimensionedScalar(dimless, Zero)
)
);

View File

@ -355,7 +355,7 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::rho
return
(
alpha1p*rho1().value() + (scalar(1.0) - alpha1p)*rho2().value()
alpha1p*rho1().value() + (scalar(1) - alpha1p)*rho2().value()
);
}

View File

@ -110,7 +110,7 @@
pcorrEqn.setReferences
(
validCells,
scalar(0.0),
scalar(0),
true
);
}

View File

@ -129,9 +129,9 @@ Foam::tmp<Foam::volScalarField> Foam::blendingMethods::linear::f1
(
(phase1 - maxFullAlpha)
/(maxPartAlpha - maxFullAlpha + SMALL),
scalar(0.0)
scalar(0)
),
scalar(1.0)
scalar(1)
);
}
@ -154,9 +154,9 @@ Foam::tmp<Foam::volScalarField> Foam::blendingMethods::linear::f2
(
(maxPartAlpha - phase2)
/(maxPartAlpha - maxFullAlpha + SMALL),
scalar(0.0)
scalar(0)
),
scalar(1.0)
scalar(1)
);
}

View File

@ -65,7 +65,7 @@ scalar getMergeDistance
args.readIfPresent("mergeTol", mergeTol);
scalar writeTol =
Foam::pow(scalar(10.0), -scalar(IOstream::defaultPrecision()));
Foam::pow(scalar(10), -scalar(IOstream::defaultPrecision()));
Info<< "Merge tolerance : " << mergeTol << nl
<< "Write tolerance : " << writeTol << endl;

View File

@ -554,7 +554,7 @@ scalar getMergeDistance(const polyMesh& mesh, const scalar mergeTol)
{
const scalar writeTol = std::pow
(
scalar(10.0),
scalar(10),
-scalar(IOstream::defaultPrecision())
);

View File

@ -99,7 +99,7 @@ void Foam::writeFields
(
radToDeg
(
Foam::acos(min(scalar(1.0), faceOrthogonality))
Foam::acos(min(scalar(1), faceOrthogonality))
)
);

View File

@ -106,7 +106,7 @@ scalar getMergeDistance
args.readIfPresent("mergeTol", mergeTol);
const scalar writeTol =
Foam::pow(scalar(10.0), -scalar(IOstream::defaultPrecision()));
Foam::pow(scalar(10), -scalar(IOstream::defaultPrecision()));
Info<< "Merge tolerance : " << mergeTol << nl
<< "Write tolerance : " << writeTol << endl;

View File

@ -174,7 +174,7 @@ tmp<volScalarField> kkLOmega::phiBP(const volScalarField& Omega) const
- CbpCrit_,
scalar(0)
),
scalar(50.0)
scalar(50)
)
);
}

View File

@ -48,7 +48,7 @@ tmp<volScalarField> LaunderSharmaKE<BasicTurbulenceModel>::f2() const
{
return
scalar(1)
- 0.3*exp(-min(sqr(sqr(k_)/(this->nu()*epsilon_)), scalar(50.0)));
- 0.3*exp(-min(sqr(sqr(k_)/(this->nu()*epsilon_)), scalar(50)));
}

View File

@ -106,7 +106,7 @@ tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::fw
)
*sqr(kappa_*y_)
),
scalar(10.0)
scalar(10)
)
);
r.boundaryFieldRef() == 0.0;

View File

@ -341,7 +341,7 @@ void v2f<BasicTurbulenceModel>::correct()
const volScalarField Ceps1
(
"Ceps1",
1.4*(1.0 + 0.05*min(sqrt(k_/v2_), scalar(100.0)))
1.4*(1.0 + 0.05*min(sqrt(k_/v2_), scalar(100)))
);
// Update epsilon (and possibly G) at the wall

View File

@ -578,7 +578,7 @@ void Foam::polyMeshFilter::checkMeshEdgesAndRelaxEdges
}
}
syncTools::syncEdgeList(mesh_, minEdgeLen_, minEqOp<scalar>(), scalar(0.0));
syncTools::syncEdgeList(mesh_, minEdgeLen_, minEqOp<scalar>(), scalar(0));
for (label smoothIter = 0; smoothIter < maxSmoothIters(); ++smoothIter)
{
@ -614,7 +614,7 @@ void Foam::polyMeshFilter::checkMeshEdgesAndRelaxEdges
mesh_,
minEdgeLen_,
minEqOp<scalar>(),
scalar(0.0)
scalar(0)
);
}
}
@ -824,7 +824,7 @@ void Foam::polyMeshFilter::mapOldMeshEdgeFieldToNewMesh
newMesh,
newMeshMinEdgeLen,
maxEqOp<scalar>(),
scalar(0.0)
scalar(0)
);
}

View File

@ -169,7 +169,7 @@ void Foam::flowRateInletVelocityFvPatchVectorField::updateValues
Up -= nUp*n;
// Remove any reverse flow
nUp = min(nUp, scalar(0.0));
nUp = min(nUp, scalar(0));
const scalar flowRate = flowRate_->value(t);
const scalar estimatedFlowRate = -gSum(rho*(this->patch().magSf()*nUp));

View File

@ -160,7 +160,7 @@ void Foam::flowRateOutletVelocityFvPatchVectorField::updateValues
Up -= nUp*n;
// Remove any reverse flow
nUp = max(nUp, scalar(0.0));
nUp = max(nUp, scalar(0));
const scalar flowRate = flowRate_->value(t);
const scalar estimatedFlowRate = gSum(rho*(this->patch().magSf()*nUp));

View File

@ -148,9 +148,9 @@ void Foam::phaseHydrostaticPressureFvPatchScalarField::updateCoeffs()
db().lookupObject<uniformDimensionedVectorField>("g");
// scalar rhor = 1000;
// scalarField alphap1 = max(min(alphap, 1.0), 0.0);
// scalarField alphap1 = max(min(alphap, scalar(1)), scalar(0));
// valueFraction() = alphap1/(alphap1 + rhor*(1.0 - alphap1));
valueFraction() = max(min(alphap, scalar(1.0)), scalar(0.0));
valueFraction() = max(min(alphap, scalar(1)), scalar(0));
refValue() =
pRefValue_

View File

@ -897,7 +897,7 @@ void Foam::isoAdvection::applyBruteForceBounding()
if (dict_.lookupOrDefault("clip", true))
{
alpha1_ = min(scalar(1.0), max(scalar(0.0), alpha1_));
alpha1_ = min(scalar(1), max(scalar(0), alpha1_));
alpha1Changed = true;
}

View File

@ -249,7 +249,7 @@ public:
return
bf*tScheme1_().weights(vf)
+ (scalar(1.0) - bf)*tScheme2_().weights(vf);
+ (scalar(1) - bf)*tScheme2_().weights(vf);
}
@ -265,7 +265,7 @@ public:
return
bf*tScheme1_().interpolate(vf)
+ (scalar(1.0) - bf)*tScheme2_().interpolate(vf);
+ (scalar(1) - bf)*tScheme2_().interpolate(vf);
}
@ -294,7 +294,7 @@ public:
(
bf
* tScheme1_().correction(vf)
+ (scalar(1.0) - bf)
+ (scalar(1) - bf)
* tScheme2_().correction(vf)
);
}
@ -311,7 +311,7 @@ public:
{
return
(
(scalar(1.0) - bf)
(scalar(1) - bf)
* tScheme2_().correction(vf)
);
}

View File

@ -276,7 +276,7 @@ public:
return
bf*tScheme1_().weights(vf)
+ (scalar(1.0) - bf)*tScheme2_().weights(vf);
+ (scalar(1) - bf)*tScheme2_().weights(vf);
}
@ -292,7 +292,7 @@ public:
return
bf*tScheme1_().interpolate(vf)
+ (scalar(1.0) - bf)*tScheme2_().interpolate(vf);
+ (scalar(1) - bf)*tScheme2_().interpolate(vf);
}
@ -321,7 +321,7 @@ public:
(
bf
* tScheme1_().correction(vf)
+ (scalar(1.0) - bf)
+ (scalar(1) - bf)
* tScheme2_().correction(vf)
);
}
@ -338,7 +338,7 @@ public:
{
return
(
(scalar(1.0) - bf)
(scalar(1) - bf)
* tScheme2_().correction(vf)
);
}

View File

@ -176,7 +176,7 @@ public:
{
return
blendingFactor_*tScheme1_().weights(vf)
+ (scalar(1.0) - blendingFactor_)*tScheme2_().weights(vf);
+ (scalar(1) - blendingFactor_)*tScheme2_().weights(vf);
}
@ -190,7 +190,7 @@ public:
{
return
blendingFactor_*tScheme1_().interpolate(vf)
+ (scalar(1.0) - blendingFactor_)*tScheme2_().interpolate(vf);
+ (scalar(1) - blendingFactor_)*tScheme2_().interpolate(vf);
}
@ -217,7 +217,7 @@ public:
(
blendingFactor_
* tScheme1_().correction(vf)
+ (scalar(1.0) - blendingFactor_)
+ (scalar(1) - blendingFactor_)
* tScheme2_().correction(vf)
);
}
@ -234,7 +234,7 @@ public:
{
return
(
(scalar(1.0) - blendingFactor_)
(scalar(1) - blendingFactor_)
* tScheme2_().correction(vf)
);
}

View File

@ -197,7 +197,7 @@ public:
(
blendingFactor
* tScheme1_().correction(vf)
+ (scalar(1.0) - blendingFactor)
+ (scalar(1) - blendingFactor)
* tScheme2_().correction(vf)
);
}
@ -214,7 +214,7 @@ public:
{
return
(
(scalar(1.0) - blendingFactor)
(scalar(1) - blendingFactor)
* tScheme2_().correction(vf)
);
}

View File

@ -209,7 +209,7 @@ public:
(
blendingFactor
* tScheme1_().correction(vf)
+ (scalar(1.0) - blendingFactor)
+ (scalar(1) - blendingFactor)
* tScheme2_().correction(vf)
);
}
@ -226,7 +226,7 @@ public:
{
return
(
(scalar(1.0) - blendingFactor)
(scalar(1) - blendingFactor)
* tScheme2_().correction(vf)
);
}

View File

@ -130,7 +130,7 @@ void Foam::functionObjects::residuals::writeField(const word& fieldName) const
false
),
mesh_,
dimensionedScalar("0", dimless, 0),
dimensionedScalar(dimless, Zero),
zeroGradientFvPatchField<scalar>::typeName
);

View File

@ -106,7 +106,7 @@ void reactingOneDim::updateqr()
// qr is positive going in the solid
// If the surface is emitting the radiative flux is set to zero
qrBf[patchi] = max(qrBf[patchi], scalar(0.0));
qrBf[patchi] = max(qrBf[patchi], scalar(0));
}
const vectorField& cellC = regionMesh().cellCentres();

View File

@ -336,9 +336,9 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs()
max
(
(filmDelta - filmDeltaDry_)/(filmDeltaWet_ - filmDeltaDry_),
scalar(0.0)
scalar(0)
),
scalar(1.0)
scalar(1)
)
);

View File

@ -212,7 +212,7 @@ tmp<scalarField> curvatureSeparation::calcCosAngle
volCosAngle.write();
}
return max(min(cosAngle, scalar(1.0)), scalar(-1.0));
return max(min(cosAngle, scalar(1)), scalar(-1));
}

View File

@ -155,7 +155,7 @@ void thixotropicViscosity::correct
max
(
-film.rhoSp(),
dimensionedScalar("zero", film.rhoSp().dimensions(), 0)
dimensionedScalar(film.rhoSp().dimensions(), Zero)
)/(deltaRho + deltaRho0),
lambda_
)

View File

@ -123,7 +123,7 @@ waxSolventViscosity::waxSolventViscosity
IOobject::AUTO_WRITE
),
film.regionMesh(),
dimensionedScalar("zero", dimDynamicViscosity, 0),
dimensionedScalar(dimDynamicViscosity, Zero),
zeroGradientFvPatchScalarField::typeName
),
muWaxModel_
@ -146,7 +146,7 @@ waxSolventViscosity::waxSolventViscosity
IOobject::AUTO_WRITE
),
film.regionMesh(),
dimensionedScalar("zero", dimDynamicViscosity, 0),
dimensionedScalar(dimDynamicViscosity, Zero),
zeroGradientFvPatchScalarField::typeName
),
muSolventModel_

View File

@ -196,7 +196,7 @@ void waxSolventEvaporation::correctModel
false
),
film.regionMesh(),
dimensionedScalar("zero", dimDensity*dimVelocity, 0)
dimensionedScalar(dimDensity*dimVelocity, Zero)
);
volScalarField::Internal evapRateInf
@ -211,7 +211,7 @@ void waxSolventEvaporation::correctModel
false
),
film.regionMesh(),
dimensionedScalar("zero", dimDensity*dimVelocity, 0)
dimensionedScalar(dimDensity*dimVelocity, Zero)
);
bool filmPresent = false;
@ -321,7 +321,7 @@ void waxSolventEvaporation::correctModel
max
(
-film.rhoSp()(),
dimensionedScalar("zero", film.rhoSp().dimensions(), 0)
dimensionedScalar(film.rhoSp().dimensions(), Zero)
)
);

View File

@ -209,12 +209,7 @@ Foam::basicThermo::basicThermo
IOobject::NO_WRITE
),
mesh,
dimensionedScalar
(
"zero",
dimensionSet(1, -1, -1, 0, 0),
Zero
)
dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), Zero)
),
dpdt_(lookupOrDefault<Switch>("dpdt", true))
@ -259,12 +254,7 @@ Foam::basicThermo::basicThermo
IOobject::NO_WRITE
),
mesh,
dimensionedScalar
(
"zero",
dimensionSet(1, -1, -1, 0, 0),
Zero
)
dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), Zero)
)
{}
@ -306,12 +296,7 @@ Foam::basicThermo::basicThermo
IOobject::NO_WRITE
),
mesh,
dimensionedScalar
(
"zero",
dimensionSet(1, -1, -1, 0, 0),
Zero
)
dimensionedScalar(dimensionSet(1, -1, -1, 0, 0), Zero)
),
dpdt_(lookupOrDefault<Switch>("dpdt", true))

View File

@ -169,7 +169,7 @@ void Foam::radiation::MarshakRadiationFvPatchScalarField::updateCoeffs()
const scalarField& emissivity = temissivity();
const scalarField Ep(emissivity/(2.0*(scalar(2.0) - emissivity)));
const scalarField Ep(emissivity/(2.0*(scalar(2) - emissivity)));
// Set value fraction
valueFraction() = 1.0/(1.0 + gamma*patch().deltaCoeffs()/Ep);

View File

@ -168,7 +168,7 @@ updateCoeffs()
const scalarField& emissivity = temissivity();
const scalarField Ep(emissivity/(2.0*(scalar(2.0) - emissivity)));
const scalarField Ep(emissivity/(2.0*(scalar(2) - emissivity)));
// Set value fraction
valueFraction() = 1.0/(1.0 + gamma*patch().deltaCoeffs()/Ep);

View File

@ -212,7 +212,7 @@ updateCoeffs()
valueFraction()[faceI] = 1.0;
refValue()[faceI] =
(
Ir[faceI]*(scalar(1.0) - emissivity[faceI])
Ir[faceI]*(scalar(1) - emissivity[faceI])
+ emissivity[faceI]*physicoChemical::sigma.value()
* pow4(Tp[faceI])
)/pi;

View File

@ -532,7 +532,7 @@ Foam::radiation::fvDOM::Ru() const
false
),
mesh_,
dimensionedScalar("zero", dimensionSet(1, -1, -3, 0, 0), 0)
dimensionedScalar(dimensionSet(1, -1, -3, 0, 0), Zero)
)
);

View File

@ -144,11 +144,11 @@ void Foam::singleStepReactingMixture<ThermoType>::fresCorrect()
const label speciei = reaction.lhs()[i].index;
if (speciei == fuelIndex_)
{
fres_[speciei] = max(YFuel - YO2/s_, scalar(0.0));
fres_[speciei] = max(YFuel - YO2/s_, scalar(0));
}
else if (speciei == O2Index)
{
fres_[speciei] = max(YO2 - YFuel*s_, scalar(0.0));
fres_[speciei] = max(YO2 - YFuel*s_, scalar(0));
}
}

View File

@ -194,8 +194,8 @@ heSolidThermo
// TBD. initialise psi, mu (at heThermo level) since these do not
// get initialised. Move to heThermo constructor?
this->mu_ == dimensionedScalar("zero", this->mu_.dimensions(), 0.0);
this->psi_ == dimensionedScalar("zero", this->psi_.dimensions(), 0.0);
this->mu_ == dimensionedScalar(this->mu_.dimensions(), Zero);
this->psi_ == dimensionedScalar(this->psi_.dimensions(), Zero);
}

View File

@ -63,7 +63,7 @@ Foam::viscosityModels::powerLaw::calcNu() const
dimensionedScalar("one", dimTime, 1.0)*strainRate(),
dimensionedScalar("SMALL", dimless, SMALL)
),
n_.value() - scalar(1.0)
n_.value() - scalar(1)
)
)
);

View File

@ -64,7 +64,7 @@ Foam::fv::multiphaseMangrovesSource::dragCoeff(const volVectorField& U) const
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar("0", dimless/dimTime, 0)
dimensionedScalar(dimless/dimTime, Zero)
);
volScalarField& dragCoeff = tdragCoeff.ref();
@ -110,7 +110,7 @@ Foam::fv::multiphaseMangrovesSource::inertiaCoeff() const
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar("0", dimless, 0)
dimensionedScalar(dimless, Zero)
);
volScalarField& inertiaCoeff = tinertiaCoeff.ref();

View File

@ -66,7 +66,7 @@ Foam::fv::multiphaseMangrovesTurbulenceModel::kCoeff
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar("0", dimless/dimTime, 0)
dimensionedScalar(dimless/dimTime, Zero)
);
volScalarField& kCoeff = tkCoeff.ref();
@ -112,7 +112,7 @@ Foam::fv::multiphaseMangrovesTurbulenceModel::epsilonCoeff
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar("0", dimless/dimTime, 0)
dimensionedScalar(dimless/dimTime, Zero)
);
volScalarField& epsilonCoeff = tepsilonCoeff.ref();

View File

@ -112,7 +112,7 @@ int main(int argc, char *argv[])
),
mesh.C()/magSqr(mesh.C())
);
radialDirection.replace(vector::Z, scalar(0.0));
radialDirection.replace(vector::Z, scalar(0));
radialDirection /= sqrt(magSqr(radialDirection));
radialDirection.write();
@ -135,7 +135,7 @@ int main(int argc, char *argv[])
),
transform2Tangencial & mesh.C()
);
angularDirection.replace(vector::Z, scalar(0.0));
angularDirection.replace(vector::Z, scalar(0));
angularDirection /= sqrt(magSqr(angularDirection));
angularDirection.write();