Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Commits
7fdaaa69
Commit
7fdaaa69
authored
16 years ago
by
Mark Olesen
Browse files
Options
Downloads
Plain Diff
Merge commit 'origin/master' into olesenm
parents
2c2be499
88b2915f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/upgradeTurbulenceProperties
+85
-0
85 additions, 0 deletions
bin/upgradeTurbulenceProperties
src/postProcessing/foamCalcFunctions/field/components/components.C
+2
-7
2 additions, 7 deletions
...rocessing/foamCalcFunctions/field/components/components.C
with
87 additions
and
7 deletions
bin/upgradeTurbulenceProperties
0 → 100755
+
85
−
0
View file @
7fdaaa69
#!/bin/sh
#------------------------------------------------------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM.
#
# OpenFOAM is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenFOAM; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# Script
# upgradeTurbulenceProperties
#
# Description
# Upgrade the turbulenceProperties dictionary to the new format employed
# in OpenFOAM version 1.5
# - RAS turbulence models now defined by the RASProperties dictionary,
# and RASModel keyword, and
# - LES turbulence models now defined by the LESProperties dictionary,
# and LESModel keyword.
#
#------------------------------------------------------------------------------
printUsage
()
{
echo
"Usage:
`
basename
$0
`
<turbulenceProperties>"
echo
" Where <turbulenceProperties> is the full path to the"
echo
" turbulenceProperties dictionary"
}
convertDict
()
{
echo
" Identified
$1
turbulence model"
sed
-e
"s/turbulenceProperties/
$1Properties
/"
\
-e
"s/
$2
/
$1Model
/"
\
-e
"s/[a-zA-Z0-9]* [ ]*
\[
[0-9 ]*
\]
//"
\
$3
>
"
$outputPath
/
$1Properties
"
echo
" written
$1Properties
to
$outputPath
/"
}
outputPath
=
`
dirname
$1
`
if
[
$#
-ne
1
]
;
then
printUsage
exit
1
elif
[
!
-e
$1
]
;
then
echo
" Error: file
$1
does not exist"
echo
""
printUsage
exit
1
fi
# Identify type of turbulence model
RAS
=
`
grep
turbulenceModel
$1
`
LES
=
`
grep
LESmodel
$1
`
if
[
-n
"
$RAS
"
]
;
then
convertDict
"RAS"
"turbulenceModel"
$1
elif
[
-n
"
$LES
"
]
;
then
convertDict
"LES"
"LESmodel"
$1
else
echo
"Unable to determine turbulence model type - nothing changed"
exit
1
fi
echo
"done."
exit
0
This diff is collapsed.
Click to expand it.
src/postProcessing/foamCalcFunctions/field/components/components.C
+
2
−
7
View file @
7fdaaa69
...
...
@@ -111,13 +111,8 @@ void Foam::calcTypes::components::calc
mesh
,
processed
);
writeComponentFields
<
symmTensor
>
(
fieldHeader
,
mesh
,
processed
);
writeComponentFields
<
symmTensor
>
(
fieldHeader
,
mesh
,
processed
);
writeComponentFields
<
tensor
>
(
fieldHeader
,
mesh
,
processed
);
if
(
!
processed
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment