Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
OpenFOAM-plus
Commits
7a624425
Commit
7a624425
authored
Jun 24, 2015
by
Henry Weller
Browse files
utilities/postProcessing: Automate the selection of incompressible/compressible modes
parent
0b5082b8
Changes
3
Hide whitespace changes
Inline
Side-by-side
applications/utilities/postProcessing/turbulence/R/R.C
View file @
7a624425
...
...
@@ -27,6 +27,10 @@ Application
Description
Calculates and writes the Reynolds stress R for the current time step.
Compressible modes is automatically selected based on the existence of the
"thermophysicalProperties" dictionary required to construct the
thermodynamics package.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
...
...
@@ -108,22 +112,12 @@ void calcCompressibleR
int
main
(
int
argc
,
char
*
argv
[])
{
timeSelector
::
addOptions
();
#include "addRegionOption.H"
argList
::
addBoolOption
(
"compressible"
,
"calculate compressible R"
);
#include "setRootCase.H"
#include "createTime.H"
instantList
timeDirs
=
timeSelector
::
select0
(
runTime
,
args
);
#include "createNamedMesh.H"
const
bool
compressible
=
args
.
optionFound
(
"compressible"
);
forAll
(
timeDirs
,
timeI
)
{
runTime
.
setTime
(
timeDirs
[
timeI
],
timeI
);
...
...
@@ -143,7 +137,15 @@ int main(int argc, char *argv[])
Info
<<
"Reading field "
<<
UHeader
.
name
()
<<
nl
<<
endl
;
volVectorField
U
(
UHeader
,
mesh
);
if
(
compressible
)
if
(
IOobject
(
basicThermo
::
dictName
,
runTime
.
constant
(),
mesh
).
headerOk
()
)
{
calcCompressibleR
(
mesh
,
runTime
,
U
);
}
...
...
applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C
View file @
7a624425
...
...
@@ -28,8 +28,9 @@ Description
Calculates and reports wall shear stress for all patches, for the
specified times when using RAS turbulence models.
Default behaviour assumes operating in incompressible mode.
Use the -compressible option for compressible RAS cases.
Compressible modes is automatically selected based on the existence of the
"thermophysicalProperties" dictionary required to construct the
thermodynamics package.
\*---------------------------------------------------------------------------*/
...
...
@@ -128,22 +129,12 @@ void calcCompressible
int
main
(
int
argc
,
char
*
argv
[])
{
timeSelector
::
addOptions
();
#include "addRegionOption.H"
argList
::
addBoolOption
(
"compressible"
,
"calculate compressible wall shear stress"
);
#include "setRootCase.H"
#include "createTime.H"
instantList
timeDirs
=
timeSelector
::
select0
(
runTime
,
args
);
#include "createNamedMesh.H"
const
bool
compressible
=
args
.
optionFound
(
"compressible"
);
forAll
(
timeDirs
,
timeI
)
{
runTime
.
setTime
(
timeDirs
[
timeI
],
timeI
);
...
...
@@ -183,7 +174,15 @@ int main(int argc, char *argv[])
Info
<<
"Reading field U
\n
"
<<
endl
;
volVectorField
U
(
UHeader
,
mesh
);
if
(
compressible
)
if
(
IOobject
(
basicThermo
::
dictName
,
runTime
.
constant
(),
mesh
).
headerOk
()
)
{
calcCompressible
(
mesh
,
runTime
,
U
,
wallShearStress
);
}
...
...
applications/utilities/postProcessing/wall/yPlus/yPlus.C
View file @
7a624425
...
...
@@ -32,8 +32,9 @@ Description
the y+ values otherwise they are obtained directly from the near-wall
velocity gradient and effective and laminar viscosities.
Default behaviour assumes operating in incompressible mode.
Use the -compressible option for compressible cases.
Compressible modes is automatically selected based on the existence of the
"thermophysicalProperties" dictionary required to construct the
thermodynamics package.
\*---------------------------------------------------------------------------*/
...
...
@@ -180,22 +181,12 @@ void calcCompressibleYPlus
int
main
(
int
argc
,
char
*
argv
[])
{
timeSelector
::
addOptions
();
#include "addRegionOption.H"
argList
::
addBoolOption
(
"compressible"
,
"calculate compressible y+"
);
#include "setRootCase.H"
#include "createTime.H"
instantList
timeDirs
=
timeSelector
::
select
(
runTime
,
args
,
"yPlus"
);
#include "createNamedMesh.H"
const
bool
compressible
=
args
.
optionFound
(
"compressible"
);
forAll
(
timeDirs
,
timeI
)
{
runTime
.
setTime
(
timeDirs
[
timeI
],
timeI
);
...
...
@@ -230,7 +221,15 @@ int main(int argc, char *argv[])
Info
<<
"Reading field U
\n
"
<<
endl
;
volVectorField
U
(
UHeader
,
mesh
);
if
(
compressible
)
if
(
IOobject
(
basicThermo
::
dictName
,
runTime
.
constant
(),
mesh
).
headerOk
()
)
{
calcCompressibleYPlus
(
mesh
,
runTime
,
U
,
yPlus
);
}
...
...
Write
Preview
Markdown
is supported
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