Skip to content
GitLab
Menu
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
f94be1be
Commit
f94be1be
authored
Jul 16, 2019
by
Mark OLESEN
Committed by
Andrew Heather
Jul 16, 2019
Browse files
ENH: use FatalIOErrorInLookup instead of FatalErrorInLookup
parent
5d0f1788
Changes
221
Hide whitespace changes
Inline
Side-by-side
applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C
View file @
f94be1be
...
...
@@ -31,14 +31,14 @@ License
Foam
::
autoPtr
<
Foam
::
PDRDragModel
>
Foam
::
PDRDragModel
::
New
(
const
dictionary
&
PDRProperties
,
const
dictionary
&
dict
,
const
compressible
::
RASModel
&
turbulence
,
const
volScalarField
&
rho
,
const
volVectorField
&
U
,
const
surfaceScalarField
&
phi
)
{
const
word
modelType
(
PDRProperties
.
get
<
word
>
(
"PDRDragModel"
));
const
word
modelType
(
dict
.
get
<
word
>
(
"PDRDragModel"
));
Info
<<
"Selecting drag model "
<<
modelType
<<
endl
;
...
...
@@ -46,16 +46,17 @@ Foam::autoPtr<Foam::PDRDragModel> Foam::PDRDragModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"PDRDragModel"
,
modelType
,
*
dictionaryConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
autoPtr
<
PDRDragModel
>
(
cstrIter
()(
PDRProperties
,
turbulence
,
rho
,
U
,
phi
));
(
cstrIter
()(
dict
,
turbulence
,
rho
,
U
,
phi
));
}
...
...
applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C
View file @
f94be1be
...
...
@@ -31,13 +31,13 @@ License
Foam
::
autoPtr
<
Foam
::
XiEqModel
>
Foam
::
XiEqModel
::
New
(
const
dictionary
&
propD
ict
,
const
dictionary
&
d
ict
,
const
psiuReactionThermo
&
thermo
,
const
compressible
::
RASModel
&
turbulence
,
const
volScalarField
&
Su
)
{
const
word
modelType
(
propD
ict
.
get
<
word
>
(
"XiEqModel"
));
const
word
modelType
(
d
ict
.
get
<
word
>
(
"XiEqModel"
));
Info
<<
"Selecting flame-wrinkling model "
<<
modelType
<<
endl
;
...
...
@@ -45,15 +45,16 @@ Foam::autoPtr<Foam::XiEqModel> Foam::XiEqModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"XiEqModel"
,
modelType
,
*
dictionaryConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
autoPtr
<
XiEqModel
>
(
cstrIter
()(
propD
ict
,
thermo
,
turbulence
,
Su
));
return
autoPtr
<
XiEqModel
>
(
cstrIter
()(
d
ict
,
thermo
,
turbulence
,
Su
));
}
...
...
applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C
View file @
f94be1be
...
...
@@ -31,13 +31,13 @@ License
Foam
::
autoPtr
<
Foam
::
XiGModel
>
Foam
::
XiGModel
::
New
(
const
dictionary
&
propD
ict
,
const
dictionary
&
d
ict
,
const
psiuReactionThermo
&
thermo
,
const
compressible
::
RASModel
&
turbulence
,
const
volScalarField
&
Su
)
{
const
word
modelType
(
propD
ict
.
get
<
word
>
(
"XiGModel"
));
const
word
modelType
(
d
ict
.
get
<
word
>
(
"XiGModel"
));
Info
<<
"Selecting flame-wrinkling model "
<<
modelType
<<
endl
;
...
...
@@ -45,15 +45,16 @@ Foam::autoPtr<Foam::XiGModel> Foam::XiGModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"XiGModel"
,
modelType
,
*
dictionaryConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
autoPtr
<
XiGModel
>
(
cstrIter
()(
propD
ict
,
thermo
,
turbulence
,
Su
));
return
autoPtr
<
XiGModel
>
(
cstrIter
()(
d
ict
,
thermo
,
turbulence
,
Su
));
}
...
...
applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C
View file @
f94be1be
...
...
@@ -31,7 +31,7 @@ License
Foam
::
autoPtr
<
Foam
::
XiModel
>
Foam
::
XiModel
::
New
(
const
dictionary
&
propD
ict
,
const
dictionary
&
d
ict
,
const
psiuReactionThermo
&
thermo
,
const
compressible
::
RASModel
&
turbulence
,
const
volScalarField
&
Su
,
...
...
@@ -40,7 +40,7 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
const
surfaceScalarField
&
phi
)
{
const
word
modelType
(
propD
ict
.
get
<
word
>
(
"XiModel"
));
const
word
modelType
(
d
ict
.
get
<
word
>
(
"XiModel"
));
Info
<<
"Selecting flame-wrinkling model "
<<
modelType
<<
endl
;
...
...
@@ -48,16 +48,17 @@ Foam::autoPtr<Foam::XiModel> Foam::XiModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"XiModel"
,
modelType
,
*
dictionaryConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
autoPtr
<
XiModel
>
(
cstrIter
()(
propD
ict
,
thermo
,
turbulence
,
Su
,
rho
,
b
,
phi
));
(
cstrIter
()(
d
ict
,
thermo
,
turbulence
,
Su
,
rho
,
b
,
phi
));
}
...
...
applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/mixtureViscosityModel/mixtureViscosityModelNew.C
View file @
f94be1be
...
...
@@ -34,12 +34,12 @@ License
Foam
::
autoPtr
<
Foam
::
mixtureViscosityModel
>
Foam
::
mixtureViscosityModel
::
New
(
const
word
&
name
,
const
dictionary
&
viscosityProperties
,
const
dictionary
&
dict
,
const
volVectorField
&
U
,
const
surfaceScalarField
&
phi
)
{
const
word
modelType
(
viscosityProperties
.
get
<
word
>
(
"transportModel"
));
const
word
modelType
(
dict
.
get
<
word
>
(
"transportModel"
));
Info
<<
"Selecting incompressible transport model "
<<
modelType
<<
endl
;
...
...
@@ -47,16 +47,17 @@ Foam::autoPtr<Foam::mixtureViscosityModel> Foam::mixtureViscosityModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"mixtureViscosityModel"
,
modelType
,
*
dictionaryConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
autoPtr
<
mixtureViscosityModel
>
(
cstrIter
()(
name
,
viscosityProperties
,
U
,
phi
));
(
cstrIter
()(
name
,
dict
,
U
,
phi
));
}
...
...
applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C
View file @
f94be1be
...
...
@@ -114,12 +114,13 @@ Foam::autoPtr<Foam::relativeVelocityModel> Foam::relativeVelocityModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"relative velocity"
,
modelType
,
*
dictionaryConstructorTablePtr_
)
<<
abort
(
FatalError
);
)
<<
abort
(
Fatal
IO
Error
);
}
return
...
...
applications/solvers/multiphase/icoReactingMultiphaseInterFoam/massTransferModels/interfaceCompositionModel/interfaceCompositionModelNew.C
View file @
f94be1be
...
...
@@ -55,12 +55,13 @@ Foam::interfaceCompositionModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"interfaceCompositionModel"
,
modelType
,
*
dictionaryConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
cstrIter
()(
dict
,
pair
);
...
...
applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/interfaceModels/porousModels/porousModel/porousModelNew.C
View file @
f94be1be
...
...
@@ -43,12 +43,13 @@ Foam::autoPtr<Foam::porousModel> Foam::porousModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"porousModel"
,
modelType
,
*
dictionaryConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
cstrIter
()(
dict
,
mesh
);
...
...
applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/interfaceModels/surfaceTensionModels/surfaceTensionModel/surfaceTensionModelNew.C
View file @
f94be1be
...
...
@@ -43,12 +43,13 @@ Foam::autoPtr<Foam::surfaceTensionModel> Foam::surfaceTensionModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"surfaceTensionModel"
,
modelType
,
*
dictionaryConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
cstrIter
()(
dict
,
pair
,
true
);
...
...
applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseModel/phaseModel/phaseModelNew.C
View file @
f94be1be
...
...
@@ -34,7 +34,9 @@ Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::New
const
word
&
phaseName
)
{
const
word
modelType
(
fluid
.
subDict
(
phaseName
).
get
<
word
>
(
"type"
));
const
dictionary
&
dict
=
fluid
.
subDict
(
phaseName
);
const
word
modelType
(
dict
.
get
<
word
>
(
"type"
));
Info
<<
"Selecting phaseModel for "
<<
phaseName
<<
": "
<<
modelType
<<
endl
;
...
...
@@ -43,12 +45,13 @@ Foam::autoPtr<Foam::phaseModel> Foam::phaseModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"phaseModel"
,
modelType
,
*
phaseSystemConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
cstrIter
()(
fluid
,
phaseName
);
...
...
applications/solvers/multiphase/icoReactingMultiphaseInterFoam/phasesSystem/phaseSystem/multiphaseSystem/multiphaseSystemNew.C
View file @
f94be1be
...
...
@@ -32,34 +32,34 @@ Foam::autoPtr<Foam::multiphaseSystem> Foam::multiphaseSystem::New
const
fvMesh
&
mesh
)
{
const
word
systemType
const
IOdictionary
dict
(
IO
dictionary
IO
object
(
IOobject
(
phasePropertiesName
,
mesh
.
time
().
constant
(),
mesh
,
IOobject
::
MUST_READ_IF_MODIFIED
,
IOobject
::
NO_WRITE
,
false
)
).
get
<
word
>
(
"type"
)
phasePropertiesName
,
mesh
.
time
().
constant
(),
mesh
,
IOobject
::
MUST_READ_IF_MODIFIED
,
IOobject
::
NO_WRITE
,
false
// Do not register
)
);
const
word
systemType
(
dict
.
get
<
word
>
(
"type"
));
Info
<<
"Selecting multiphaseSystem "
<<
systemType
<<
endl
;
const
auto
cstrIter
=
dictionaryConstructorTablePtr_
->
cfind
(
systemType
);
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"multiphaseSystem"
,
systemType
,
*
dictionaryConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
autoPtr
<
multiphaseSystem
>
(
cstrIter
()(
mesh
));
...
...
applications/solvers/multiphase/interCondensatingEvaporatingFoam/temperaturePhaseChangeTwoPhaseMixtures/temperaturePhaseChangeTwoPhaseMixtures/newtemperaturePhaseChangeTwoPhaseMixture.C
View file @
f94be1be
...
...
@@ -35,34 +35,34 @@ Foam::temperaturePhaseChangeTwoPhaseMixture::New
const
fvMesh
&
mesh
)
{
const
word
modelType
const
IOdictionary
dict
(
IO
dictionary
IO
object
(
IOobject
(
"phaseChangeProperties"
,
mesh
.
time
().
constant
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
NO_WRITE
,
false
// Do not register
)
).
get
<
word
>
(
"phaseChangeTwoPhaseModel"
)
"phaseChangeProperties"
,
mesh
.
time
().
constant
(),
mesh
,
IOobject
::
MUST_READ
,
IOobject
::
NO_WRITE
,
false
// Do not register
)
);
const
word
modelType
(
dict
.
get
<
word
>
(
"phaseChangeTwoPhaseModel"
));
Info
<<
"Selecting phaseChange model "
<<
modelType
<<
endl
;
auto
cstrIter
=
componentsConstructorTablePtr_
->
cfind
(
modelType
);
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"temperaturePhaseChangeTwoPhaseMixture"
,
modelType
,
*
componentsConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
...
...
applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C
View file @
f94be1be
...
...
@@ -37,34 +37,34 @@ Foam::phaseChangeTwoPhaseMixture::New
const
surfaceScalarField
&
phi
)
{
const
word
modelType
const
IOdictionary
dict
(
IO
dictionary
IO
object
(
IOobject
(
"transportProperties"
,
U
.
time
().
constant
(),
U
.
db
(),
IOobject
::
MUST_READ
,
IOobject
::
NO_WRITE
,
false
// Do not register
)
).
get
<
word
>
(
"phaseChangeTwoPhaseMixture"
)
"transportProperties"
,
U
.
time
().
constant
(),
U
.
db
(),
IOobject
::
MUST_READ
,
IOobject
::
NO_WRITE
,
false
// Do not register
)
);
const
word
modelType
(
dict
.
get
<
word
>
(
"phaseChangeTwoPhaseMixture"
));
Info
<<
"Selecting phaseChange model "
<<
modelType
<<
endl
;
auto
cstrIter
=
componentsConstructorTablePtr_
->
cfind
(
modelType
);
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"phaseChangeTwoPhaseMixture"
,
modelType
,
*
componentsConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
autoPtr
<
phaseChangeTwoPhaseMixture
>
(
cstrIter
()(
U
,
phi
));
...
...
applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C
View file @
f94be1be
...
...
@@ -47,12 +47,13 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
interfaceDict
,
"dragModel"
,
modelType
,
*
dictionaryConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
cstrIter
()(
interfaceDict
,
phase1
,
phase2
);
...
...
applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C
View file @
f94be1be
...
...
@@ -51,12 +51,13 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
interfaceDict
,
"heatTransferModel"
,
modelType
,
*
dictionaryConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
cstrIter
()(
interfaceDict
,
alpha1
,
phase1
,
phase2
);
...
...
applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/diameterModels/diameterModel/newDiameterModel.C
View file @
f94be1be
...
...
@@ -46,12 +46,13 @@ Foam::autoPtr<Foam::diameterModel> Foam::diameterModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"diameterModel"
,
modelType
,
*
dictionaryConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
cstrIter
()
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/aspectRatioModels/aspectRatioModel/newAspectRatioModel.C
View file @
f94be1be
...
...
@@ -46,12 +46,13 @@ Foam::aspectRatioModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"aspectRatioModel"
,
modelType
,
*
dictionaryConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
cstrIter
()(
dict
,
pair
);
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C
View file @
f94be1be
...
...
@@ -45,12 +45,13 @@ Foam::autoPtr<Foam::dragModel> Foam::dragModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"dragModel"
,
modelType
,
*
dictionaryConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
cstrIter
()(
dict
,
pair
,
true
);
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C
View file @
f94be1be
...
...
@@ -45,12 +45,13 @@ Foam::autoPtr<Foam::heatTransferModel> Foam::heatTransferModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"heatTransferModel"
,
modelType
,
*
dictionaryConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
cstrIter
()(
dict
,
pair
);
...
...
applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/liftModels/liftModel/newLiftModel.C
View file @
f94be1be
...
...
@@ -45,12 +45,13 @@ Foam::autoPtr<Foam::liftModel> Foam::liftModel::New
if
(
!
cstrIter
.
found
())
{
FatalErrorInLookup
Fatal
IO
ErrorInLookup
(
dict
,
"liftModel"
,
modelType
,
*
dictionaryConstructorTablePtr_
)
<<
exit
(
FatalError
);
)
<<
exit
(
Fatal
IO
Error
);
}
return
cstrIter
()(
dict
,
pair
);
...
...
Prev
1
2
3
4
5
…
12
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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