Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
03049119
Commit
03049119
authored
Jul 13, 2018
by
Mark OLESEN
Browse files
STYLE: more consistent use of dimensioned Zero, scalar decimal points
- use scalar(0) instead of scalar(0.0) etc
parent
e9f0ebc7
Changes
54
Hide whitespace changes
Inline
Side-by-side
applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModel.C
View file @
03049119
...
...
@@ -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
;
}
...
...
applications/solvers/combustion/reactingFoam/setRDeltaT.H
View file @
03049119
...
...
@@ -170,7 +170,7 @@ License
rDeltaT
=
max
(
rDeltaT
,
(
scalar
(
1
.
0
)
-
rDeltaTDampingCoeff
)
*
rDeltaT0
(
scalar
(
1
)
-
rDeltaTDampingCoeff
)
*
rDeltaT0
);
}
...
...
applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C
View file @
03049119
...
...
@@ -120,7 +120,7 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
else
{
this
->
refValue
()
=
*
this
;
this
->
valueFraction
()
=
scalar
(
1
.
0
);
this
->
valueFraction
()
=
scalar
(
1
);
}
}
}
...
...
applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H
View file @
03049119
...
...
@@ -95,7 +95,7 @@
IOobject
::
NO_WRITE
),
solidRegions
[
i
],
dimensionedScalar
(
"1"
,
dimless
,
scalar
(
1
.
0
))
dimensionedScalar
(
"1"
,
dimless
,
scalar
(
1
))
)
);
}
...
...
applications/solvers/incompressible/pimpleFoam/overPimpleDyMFoam/correctPhi.H
View file @
03049119
...
...
@@ -101,7 +101,7 @@ if (mesh.changing())
pcorrEqn
.
setReferences
(
validCells
,
scalar
(
0
.
0
),
scalar
(
0
),
true
);
}
...
...
applications/solvers/lagrangian/coalChemistryFoam/setRDeltaT.H
View file @
03049119
...
...
@@ -122,7 +122,7 @@ License
rDeltaT
=
max
(
rDeltaT
,
(
scalar
(
1
.
0
)
-
rDeltaTDampingCoeff
)
*
rDeltaT0
(
scalar
(
1
)
-
rDeltaTDampingCoeff
)
*
rDeltaT0
);
}
...
...
applications/solvers/lagrangian/reactingParcelFoam/setRDeltaT.H
View file @
03049119
...
...
@@ -121,7 +121,7 @@ License
rDeltaT
=
max
(
rDeltaT
,
(
scalar
(
1
.
0
)
-
rDeltaTDampingCoeff
)
*
rDeltaT0
(
scalar
(
1
)
-
rDeltaTDampingCoeff
)
*
rDeltaT0
);
}
...
...
applications/solvers/multiphase/VoF/setRDeltaT.H
View file @
03049119
...
...
@@ -126,7 +126,7 @@
rDeltaT
=
max
(
rDeltaT
,
(
scalar
(
1
.
0
)
-
rDeltaTDampingCoeff
)
*
rDeltaT0
(
scalar
(
1
)
-
rDeltaTDampingCoeff
)
*
rDeltaT0
);
Info
<<
"Damped flow time scale min/max = "
...
...
applications/solvers/multiphase/icoReactingMultiphaseInterFoam/YEqns.H
View file @
03049119
...
...
@@ -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
)
)
);
}
...
...
applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/InterfaceCompositionModel/InterfaceCompositionModel.C
View file @
03049119
...
...
@@ -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
)
);
...
...
applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/kineticGasEvaporation/kineticGasEvaporation.C
View file @
03049119
...
...
@@ -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
)
);
}
...
...
applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/MassTransferPhaseSystem/MassTransferPhaseSystem.C
View file @
03049119
...
...
@@ -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
();
...
...
applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseModel/MovingPhaseModel/MovingPhaseModel.C
View file @
03049119
...
...
@@ -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
)
);
}
...
...
applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseModel/StaticPhaseModel/StaticPhaseModel.C
View file @
03049119
...
...
@@ -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
::
z
ero
)
dimensionedVector
(
dimVelocity
,
Z
ero
)
)
);
}
...
...
applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/phaseSystem.C
View file @
03049119
...
...
@@ -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
)
)
);
...
...
applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/twoPhaseMixtureEThermo/twoPhaseMixtureEThermo.C
View file @
03049119
...
...
@@ -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
()
);
}
...
...
applications/solvers/multiphase/interFoam/overInterDyMFoam/correctPhi.H
View file @
03049119
...
...
@@ -110,7 +110,7 @@
pcorrEqn
.
setReferences
(
validCells
,
scalar
(
0
.
0
),
scalar
(
0
),
true
);
}
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/blendingMethods/linear/linear.C
View file @
03049119
...
...
@@ -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
)
);
}
...
...
applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C
View file @
03049119
...
...
@@ -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
;
...
...
applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
View file @
03049119
...
...
@@ -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
())
);
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment