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
65c2ec29
Commit
65c2ec29
authored
Jun 03, 2020
by
Andrew Heather
Browse files
Merge branch 'style-dictionary-methods' into 'develop'
ENH: unify use of dictionary method names See merge request
!362
parents
f721b534
3e43edf0
Changes
624
Hide whitespace changes
Inline
Side-by-side
applications/solvers/basic/potentialFoam/createControls.H
View file @
65c2ec29
...
...
@@ -5,5 +5,5 @@ const dictionary& potentialFlow
const
int
nNonOrthCorr
(
potentialFlow
.
lookup
OrDefault
<
int
>
(
"nNonOrthogonalCorrectors"
,
0
)
potentialFlow
.
get
OrDefault
<
int
>
(
"nNonOrthogonalCorrectors"
,
0
)
);
applications/solvers/basic/potentialFoam/overPotentialFoam/createControls.H
View file @
65c2ec29
...
...
@@ -5,5 +5,5 @@ const dictionary& potentialFlow
const
int
nNonOrthCorr
(
potentialFlow
.
lookup
OrDefault
<
int
>
(
"nNonOrthogonalCorrectors"
,
0
)
potentialFlow
.
get
OrDefault
<
int
>
(
"nNonOrthogonalCorrectors"
,
0
)
);
applications/solvers/combustion/PDRFoam/PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C
View file @
65c2ec29
...
...
@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019
-2020
OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -72,7 +72,7 @@ PDRkEpsilon::PDRkEpsilon
C4_
(
dimensioned
<
scalar
>::
lookup
OrAddToDict
dimensioned
<
scalar
>::
get
OrAddToDict
(
"C4"
,
coeffDict_
,
...
...
applications/solvers/combustion/XiFoam/XiDyMFoam/createControls.H
View file @
65c2ec29
...
...
@@ -2,10 +2,10 @@
bool
correctPhi
(
pimple
.
dict
().
lookup
OrDefault
(
"correctPhi"
,
true
)
pimple
.
dict
().
get
OrDefault
(
"correctPhi"
,
true
)
);
bool
checkMeshCourantNo
(
pimple
.
dict
().
lookup
OrDefault
(
"checkMeshCourantNo"
,
false
)
pimple
.
dict
().
get
OrDefault
(
"checkMeshCourantNo"
,
false
)
);
applications/solvers/combustion/XiFoam/XiDyMFoam/readControls.H
View file @
65c2ec29
#include
"readTimeControls.H"
correctPhi
=
pimple
.
dict
().
lookup
OrDefault
(
"correctPhi"
,
true
);
correctPhi
=
pimple
.
dict
().
get
OrDefault
(
"correctPhi"
,
true
);
checkMeshCourantNo
=
pimple
.
dict
().
lookup
OrDefault
(
"checkMeshCourantNo"
,
false
);
pimple
.
dict
().
get
OrDefault
(
"checkMeshCourantNo"
,
false
);
applications/solvers/combustion/fireFoam/createRegionControls.H
View file @
65c2ec29
...
...
@@ -12,12 +12,12 @@ IOdictionary additionalControlsDict
bool
solvePrimaryRegion
(
additionalControlsDict
.
lookup
OrDefault
(
"solvePrimaryRegion"
,
true
)
additionalControlsDict
.
get
OrDefault
(
"solvePrimaryRegion"
,
true
)
);
bool
solvePyrolysisRegion
(
additionalControlsDict
.
lookup
OrDefault
(
"solvePyrolysisRegion"
,
true
)
additionalControlsDict
.
get
OrDefault
(
"solvePyrolysisRegion"
,
true
)
);
scalar
maxDi
=
pyrolysis
.
maxDiff
();
applications/solvers/combustion/fireFoam/phrghEqn.H
View file @
65c2ec29
if
(
pimple
.
dict
().
lookup
OrDefault
(
"hydrostaticInitialization"
,
false
))
if
(
pimple
.
dict
().
get
OrDefault
(
"hydrostaticInitialization"
,
false
))
{
volScalarField
&
ph_rgh
=
regIOobject
::
store
(
...
...
@@ -24,7 +24,7 @@ if (pimple.dict().lookupOrDefault("hydrostaticInitialization", false))
label
nCorr
(
pimple
.
dict
().
lookup
OrDefault
<
label
>
(
"nHydrostaticCorrectors"
,
5
)
pimple
.
dict
().
get
OrDefault
<
label
>
(
"nHydrostaticCorrectors"
,
5
)
);
for
(
label
i
=
0
;
i
<
nCorr
;
i
++
)
...
...
applications/solvers/combustion/reactingFoam/setRDeltaT.H
View file @
65c2ec29
...
...
@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2016 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -34,27 +35,27 @@ License
scalar
maxCo
(
pimpleDict
.
get
<
scalar
>
(
"maxCo"
));
// Maximum time scale
scalar
maxDeltaT
(
pimpleDict
.
lookup
OrDefault
<
scalar
>
(
"maxDeltaT"
,
GREAT
));
scalar
maxDeltaT
(
pimpleDict
.
get
OrDefault
<
scalar
>
(
"maxDeltaT"
,
GREAT
));
// Smoothing parameter (0-1) when smoothing iterations > 0
scalar
rDeltaTSmoothingCoeff
(
pimpleDict
.
lookup
OrDefault
<
scalar
>
(
"rDeltaTSmoothingCoeff"
,
0
.
1
)
pimpleDict
.
get
OrDefault
<
scalar
>
(
"rDeltaTSmoothingCoeff"
,
0
.
1
)
);
// Damping coefficient (1-0)
scalar
rDeltaTDampingCoeff
(
pimpleDict
.
lookup
OrDefault
<
scalar
>
(
"rDeltaTDampingCoeff"
,
1
.
0
)
pimpleDict
.
get
OrDefault
<
scalar
>
(
"rDeltaTDampingCoeff"
,
1
.
0
)
);
// Maximum change in cell temperature per iteration
// (relative to previous value)
scalar
alphaTemp
(
pimpleDict
.
lookup
OrDefault
(
"alphaTemp"
,
0
.
05
));
scalar
alphaTemp
(
pimpleDict
.
get
OrDefault
<
scalar
>
(
"alphaTemp"
,
0
.
05
));
// Maximum change in cell concentration per iteration
// (relative to reference value)
scalar
alphaY
(
pimpleDict
.
lookup
OrDefault
(
"alphaY"
,
1
.
0
));
scalar
alphaY
(
pimpleDict
.
get
OrDefault
<
scalar
>
(
"alphaY"
,
1
.
0
));
Info
<<
"Time scales min/max:"
<<
endl
;
...
...
applications/solvers/compressible/rhoCentralFoam/BCs/T/smoluchowskiJumpTFvPatchScalarField.C
View file @
65c2ec29
...
...
@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -82,13 +83,13 @@ Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
)
:
mixedFvPatchScalarField
(
p
,
iF
),
UName_
(
dict
.
lookup
OrDefault
<
word
>
(
"U"
,
"U"
)),
rhoName_
(
dict
.
lookup
OrDefault
<
word
>
(
"rho"
,
"rho"
)),
psiName_
(
dict
.
lookup
OrDefault
<
word
>
(
"psi"
,
"thermo:psi"
)),
muName_
(
dict
.
lookup
OrDefault
<
word
>
(
"mu"
,
"thermo:mu"
)),
UName_
(
dict
.
get
OrDefault
<
word
>
(
"U"
,
"U"
)),
rhoName_
(
dict
.
get
OrDefault
<
word
>
(
"rho"
,
"rho"
)),
psiName_
(
dict
.
get
OrDefault
<
word
>
(
"psi"
,
"thermo:psi"
)),
muName_
(
dict
.
get
OrDefault
<
word
>
(
"mu"
,
"thermo:mu"
)),
accommodationCoeff_
(
dict
.
get
<
scalar
>
(
"accommodationCoeff"
)),
Twall_
(
"Twall"
,
dict
,
p
.
size
()),
gamma_
(
dict
.
lookup
OrDefault
<
scalar
>
(
"gamma"
,
1
.
4
))
gamma_
(
dict
.
get
OrDefault
<
scalar
>
(
"gamma"
,
1
.
4
))
{
if
(
...
...
applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C
View file @
65c2ec29
...
...
@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -82,15 +83,15 @@ Foam::maxwellSlipUFvPatchVectorField::maxwellSlipUFvPatchVectorField
)
:
partialSlipFvPatchVectorField
(
p
,
iF
),
TName_
(
dict
.
lookup
OrDefault
<
word
>
(
"T"
,
"T"
)),
rhoName_
(
dict
.
lookup
OrDefault
<
word
>
(
"rho"
,
"rho"
)),
psiName_
(
dict
.
lookup
OrDefault
<
word
>
(
"psi"
,
"thermo:psi"
)),
muName_
(
dict
.
lookup
OrDefault
<
word
>
(
"mu"
,
"thermo:mu"
)),
tauMCName_
(
dict
.
lookup
OrDefault
<
word
>
(
"tauMC"
,
"tauMC"
)),
TName_
(
dict
.
get
OrDefault
<
word
>
(
"T"
,
"T"
)),
rhoName_
(
dict
.
get
OrDefault
<
word
>
(
"rho"
,
"rho"
)),
psiName_
(
dict
.
get
OrDefault
<
word
>
(
"psi"
,
"thermo:psi"
)),
muName_
(
dict
.
get
OrDefault
<
word
>
(
"mu"
,
"thermo:mu"
)),
tauMCName_
(
dict
.
get
OrDefault
<
word
>
(
"tauMC"
,
"tauMC"
)),
accommodationCoeff_
(
dict
.
get
<
scalar
>
(
"accommodationCoeff"
)),
Uwall_
(
"Uwall"
,
dict
,
p
.
size
()),
thermalCreep_
(
dict
.
lookup
OrDefault
(
"thermalCreep"
,
true
)),
curvature_
(
dict
.
lookup
OrDefault
(
"curvature"
,
true
))
thermalCreep_
(
dict
.
get
OrDefault
(
"thermalCreep"
,
true
)),
curvature_
(
dict
.
get
OrDefault
(
"curvature"
,
true
))
{
if
(
...
...
applications/solvers/compressible/rhoCentralFoam/BCs/rho/fixedRhoFvPatchScalarField.C
View file @
65c2ec29
...
...
@@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2012 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
...
...
@@ -66,8 +67,8 @@ Foam::fixedRhoFvPatchScalarField::fixedRhoFvPatchScalarField
)
:
fixedValueFvPatchScalarField
(
p
,
iF
,
dict
),
pName_
(
dict
.
lookup
OrDefault
<
word
>
(
"p"
,
"p"
)),
psiName_
(
dict
.
lookup
OrDefault
<
word
>
(
"psi"
,
"thermo:psi"
))
pName_
(
dict
.
get
OrDefault
<
word
>
(
"p"
,
"p"
)),
psiName_
(
dict
.
get
OrDefault
<
word
>
(
"psi"
,
"thermo:psi"
))
{}
...
...
applications/solvers/compressible/rhoCentralFoam/setRDeltaT.H
View file @
65c2ec29
...
...
@@ -3,7 +3,7 @@
scalar
rDeltaTSmoothingCoeff
(
runTime
.
controlDict
().
lookup
OrDefault
<
scalar
>
runTime
.
controlDict
().
get
OrDefault
<
scalar
>
(
"rDeltaTSmoothingCoeff"
,
0
.
02
...
...
applications/solvers/compressible/rhoPimpleAdiabaticFoam/EEqn.H
View file @
65c2ec29
...
...
@@ -17,7 +17,7 @@
const
dictionary
&
eosDict
=
thermoDict
.
subDict
(
"equationOfState"
);
bool
local
=
eosDict
.
lookup
OrDefault
(
"local"
,
false
);
bool
local
=
eosDict
.
get
OrDefault
(
"local"
,
false
);
// Evolve T as:
//
...
...
applications/solvers/compressible/rhoPimpleFoam/overRhoPimpleDyMFoam/createControls.H
View file @
65c2ec29
bool
ddtCorr
(
pimple
.
dict
().
lookup
OrDefault
(
"ddtCorr"
,
true
)
pimple
.
dict
().
get
OrDefault
(
"ddtCorr"
,
true
)
);
applications/solvers/compressible/rhoPimpleFoam/overRhoPimpleDyMFoam/readControls.H
View file @
65c2ec29
#include
"readTimeControls.H"
correctPhi
=
pimple
.
dict
().
lookup
OrDefault
(
"correctPhi"
,
false
);
correctPhi
=
pimple
.
dict
().
get
OrDefault
(
"correctPhi"
,
false
);
checkMeshCourantNo
=
pimple
.
dict
().
lookup
OrDefault
(
"checkMeshCourantNo"
,
false
);
pimple
.
dict
().
get
OrDefault
(
"checkMeshCourantNo"
,
false
);
ddtCorr
=
pimple
.
dict
().
lookup
OrDefault
(
"ddtCorr"
,
true
);
ddtCorr
=
pimple
.
dict
().
get
OrDefault
(
"ddtCorr"
,
true
);
applications/solvers/compressible/rhoPimpleFoam/setRDeltaT.H
View file @
65c2ec29
...
...
@@ -5,22 +5,22 @@
scalar
maxCo
(
pimpleDict
.
lookup
OrDefault
<
scalar
>
(
"maxCo"
,
0
.
8
)
pimpleDict
.
get
OrDefault
<
scalar
>
(
"maxCo"
,
0
.
8
)
);
scalar
rDeltaTSmoothingCoeff
(
pimpleDict
.
lookup
OrDefault
<
scalar
>
(
"rDeltaTSmoothingCoeff"
,
0
.
02
)
pimpleDict
.
get
OrDefault
<
scalar
>
(
"rDeltaTSmoothingCoeff"
,
0
.
02
)
);
scalar
rDeltaTDampingCoeff
(
pimpleDict
.
lookup
OrDefault
<
scalar
>
(
"rDeltaTDampingCoeff"
,
1
.
0
)
pimpleDict
.
get
OrDefault
<
scalar
>
(
"rDeltaTDampingCoeff"
,
1
.
0
)
);
scalar
maxDeltaT
(
pimpleDict
.
lookup
OrDefault
<
scalar
>
(
"maxDeltaT"
,
GREAT
)
pimpleDict
.
get
OrDefault
<
scalar
>
(
"maxDeltaT"
,
GREAT
)
);
volScalarField
rDeltaT0
(
"rDeltaT0"
,
rDeltaT
);
...
...
applications/solvers/compressible/rhoSimpleFoam/overRhoSimpleFoam/createFields.H
View file @
65c2ec29
...
...
@@ -82,5 +82,5 @@ dimensionedScalar initialMass = fvc::domainIntegrate(rho);
bool
adjustFringe
(
simple
.
dict
().
lookup
OrDefault
(
"oversetAdjustPhi"
,
false
)
simple
.
dict
().
get
OrDefault
(
"oversetAdjustPhi"
,
false
)
);
applications/solvers/electromagnetics/mhdFoam/readBPISOControls.H
View file @
65c2ec29
const
dictionary
&
Bpiso
=
mesh
.
solutionDict
().
subDict
(
"BPISO"
);
const
int
nBcorr
=
Bpiso
.
lookup
OrDefault
<
int
>
(
"nCorrectors"
,
1
);
const
int
nBcorr
=
Bpiso
.
get
OrDefault
<
int
>
(
"nCorrectors"
,
1
);
applications/solvers/heatTransfer/buoyantPimpleFoam/overBuoyantPimpleDyMFoam/readControls.H
View file @
65c2ec29
#include
"readTimeControls.H"
correctPhi
=
pimple
.
dict
().
lookup
OrDefault
(
"correctPhi"
,
false
);
correctPhi
=
pimple
.
dict
().
get
OrDefault
(
"correctPhi"
,
false
);
checkMeshCourantNo
=
pimple
.
dict
().
lookup
OrDefault
(
"checkMeshCourantNo"
,
false
);
pimple
.
dict
().
get
OrDefault
(
"checkMeshCourantNo"
,
false
);
ddtCorr
=
pimple
.
dict
().
lookup
OrDefault
(
"ddtCorr"
,
true
);
ddtCorr
=
pimple
.
dict
().
get
OrDefault
(
"ddtCorr"
,
true
);
applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/fluid/readFluidMultiRegionSIMPLEControls.H
View file @
65c2ec29
const
dictionary
&
simple
=
fluidRegions
[
i
].
solutionDict
().
subDict
(
"SIMPLE"
);
const
int
nNonOrthCorr
=
simple
.
lookup
OrDefault
<
int
>
(
"nNonOrthogonalCorrectors"
,
0
);
simple
.
get
OrDefault
<
int
>
(
"nNonOrthogonalCorrectors"
,
0
);
const
bool
momentumPredictor
=
simple
.
lookup
OrDefault
(
"momentumPredictor"
,
true
);
simple
.
get
OrDefault
(
"momentumPredictor"
,
true
);
Prev
1
2
3
4
5
…
32
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