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
Commits
11dab784
Commit
11dab784
authored
May 27, 2011
by
andy
Browse files
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
parents
592a0c2a
8596a86a
Changes
247
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
11dab784
...
...
@@ -60,8 +60,8 @@ doc/[Dd]oxygen/man
# untracked configuration files
/etc/prefs.csh
/etc/prefs.sh
/etc/config/
*
.csh
/etc/config/
*
.sh
/etc/config/
prefs
.csh
/etc/config/
prefs
.sh
# source packages - anywhere
*.tar.bz2
...
...
ReleaseNotes-dev
View file @
11dab784
...
...
@@ -126,7 +126,9 @@
globalPointPatch. Moving mesh cases can now be run non-parallel and
continued in parallel and reconstructed without any limitation.
*** *New* compact binary I/O for faces and cells.
This speeds up reading/writing meshes in binary.
This speeds up reading/writing meshes in binary. Binary mesh reading
is backwards (but not forwards) compatible. Use ascii mesh format or
foamFormatConvert.
*** *Updated* runTimeModifiable
+ user selectable model to use for checking run-time modifiable
dictionaries (see also doc/changes/inotify.txt):
...
...
@@ -139,8 +141,9 @@
+ on linux optionally uses inotify instead of time stamps - more efficient
for large numbers of monitored files. No more fileModificationSkew needed.
+ single integer reduction instead of one reduction per monitored file.
+ only files that can be re-read are being checked. Drastic reduction of
number of files to check.
+ only files that can be re-read are being checked by specifying
in the IOobject constructor MUST_READ_IF_MODIFIED instead of
MUST_READ. Drastic reduction of number of files to check.
*** *New* #codeStream dictionary entry
Uses dynamic compilation of OpenFOAM C++ code to construct dictionary.
E.g. in blockMeshDict:
...
...
@@ -241,9 +244,11 @@
- works in parallel
+ =snappyHexMesh=:
+ extrude across multi-processor boundaries
+ preserve faceZones during layering
+ combining
patch faces
after snapping
+ preserve faceZones
shape
during layering
+ combining
coincident patch faces is now default
after snapping
+ *Warning*:
- snapControls::tolerance setting fixed w.r.t. 17x. Is the
multiplication to calculate the local search distance for nearest.
- minMedianAxisAngle angle fixed w.r.t. 17x. Set to
90 to get same behaviour as 130 in 17x.
- nGrow did not work in 17x. Set to 0
...
...
@@ -308,6 +313,8 @@
+ multipleBoxes, hotBoxes, panel, evaporationTest
+ =interDyMFoam= tutorials:
+ testTubeMixer: showcases =solidBodyMotionFunction=
+ =snappyHexMesh= tutorials:
+ flange: demonstration of feature lines in snappyHexMesh
* Other
+ compilable with =clang=
...
...
applications/solvers/basic/potentialFoam/potentialFoam.C
View file @
11dab784
...
...
@@ -49,6 +49,10 @@ int main(int argc, char *argv[])
Info
<<
nl
<<
"Calculating potential flow"
<<
endl
;
// Since solver contains no time loop it would never execute
// function objects so do it ourselves.
runTime
.
functionObjects
().
start
();
adjustPhi
(
phi
,
U
,
p
);
for
(
int
nonOrth
=
0
;
nonOrth
<=
nNonOrthCorr
;
nonOrth
++
)
...
...
@@ -99,6 +103,9 @@ int main(int argc, char *argv[])
p
.
write
();
}
runTime
.
functionObjects
().
end
();
Info
<<
"ExecutionTime = "
<<
runTime
.
elapsedCpuTime
()
<<
" s"
<<
" ClockTime = "
<<
runTime
.
elapsedClockTime
()
<<
" s"
<<
nl
<<
endl
;
...
...
applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict
View file @
11dab784
...
...
@@ -220,7 +220,7 @@ snapControls
//- Maximum relative distance for points to be attracted by surface.
// True distance is this factor times local maximum edge length.
// Note: changed(corrected) w.r.t 17x! (17x used 2* tolerance)
tolerance
2
.0;
tolerance
1
.0;
//- Number of mesh displacement relaxation iterations.
nSolveIter 30;
...
...
@@ -228,6 +228,10 @@ snapControls
//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;
//- Highly experimental and wip: number of feature edge snapping
// iterations. Leave out altogether to disable.
//nFeatureSnapIter 10;
}
...
...
@@ -258,6 +262,9 @@ addLayersControls
//- Wanted thickness of final added cell layer. If multiple layers
// is the
// thickness of the layer furthest away from the wall.
// Relative to undistorted size of cell outside layer.
// is the thickness of the layer furthest away from the wall.
// See relativeSizes parameter.
finalLayerThickness 0.3;
...
...
@@ -410,7 +417,7 @@ debug 0;
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1
E
-6;
mergeTolerance 1
e
-6;
// ************************************************************************* //
applications/utilities/miscellaneous/foamFormatConvert/foamFormatConvert.C
View file @
11dab784
...
...
@@ -144,10 +144,30 @@ bool writeZones(const word& name, const fileName& meshDir, Time& runTime)
int
main
(
int
argc
,
char
*
argv
[])
{
timeSelector
::
addOptions
();
argList
::
addBoolOption
(
"noConstant"
,
"exclude the 'constant/' dir in the times list"
);
# include "addRegionOption.H"
# include "setRootCase.H"
// enable noConstant by switching
if
(
!
args
.
optionFound
(
"noConstant"
))
{
args
.
setOption
(
"constant"
,
""
);
}
else
{
args
.
unsetOption
(
"constant"
);
Info
<<
"Excluding the constant directory."
<<
nl
<<
endl
;
}
# include "createTime.H"
// Make sure we do not use the master-only reading since we read
// fields (different per processor) as dictionaries.
regIOobject
::
fileModificationChecking
=
regIOobject
::
timeStamp
;
...
...
applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C
View file @
11dab784
...
...
@@ -98,6 +98,44 @@ autoPtr<fvMesh> createMesh
xferCopy
(
labelList
()),
false
);
// Add some dummy zones so upon reading it does not read them
// from the undecomposed case. Should be done as extra argument to
// regIOobject::readStream?
List
<
pointZone
*>
pz
(
1
,
new
pointZone
(
"dummyPointZone"
,
labelList
(
0
),
0
,
dummyMesh
.
pointZones
()
)
);
List
<
faceZone
*>
fz
(
1
,
new
faceZone
(
"dummyFaceZone"
,
labelList
(
0
),
boolList
(
0
),
0
,
dummyMesh
.
faceZones
()
)
);
List
<
cellZone
*>
cz
(
1
,
new
cellZone
(
"dummyCellZone"
,
labelList
(
0
),
0
,
dummyMesh
.
cellZones
()
)
);
dummyMesh
.
addZones
(
pz
,
fz
,
cz
);
//Pout<< "Writing dummy mesh to " << dummyMesh.polyMesh::objectPath()
// << endl;
dummyMesh
.
write
();
...
...
@@ -239,7 +277,11 @@ autoPtr<fvMesh> createMesh
if
(
!
haveMesh
)
{
// Add the zones
// Add the zones. Make sure to remove the old dummy ones first
mesh
.
pointZones
().
clear
();
mesh
.
faceZones
().
clear
();
mesh
.
cellZones
().
clear
();
List
<
pointZone
*>
pz
(
pointZoneNames
.
size
());
forAll
(
pointZoneNames
,
i
)
{
...
...
@@ -389,6 +431,12 @@ void printMeshData(const polyMesh& mesh)
globalIndex
globalBoundaryFaces
(
mesh
.
nFaces
()
-
mesh
.
nInternalFaces
());
label
maxProcCells
=
0
;
label
totProcFaces
=
0
;
label
maxProcPatches
=
0
;
label
totProcPatches
=
0
;
label
maxProcFaces
=
0
;
for
(
label
procI
=
0
;
procI
<
Pstream
::
nProcs
();
procI
++
)
{
Info
<<
endl
...
...
@@ -413,7 +461,32 @@ void printMeshData(const polyMesh& mesh)
<<
" Number of processor faces = "
<<
nProcFaces
<<
nl
<<
" Number of boundary faces = "
<<
globalBoundaryFaces
.
localSize
(
procI
)
<<
endl
;
maxProcCells
=
max
(
maxProcCells
,
globalCells
.
localSize
(
procI
));
totProcFaces
+=
nProcFaces
;
totProcPatches
+=
nei
.
size
();
maxProcPatches
=
max
(
maxProcPatches
,
nei
.
size
());
maxProcFaces
=
max
(
maxProcFaces
,
nProcFaces
);
}
// Stats
scalar
avgProcCells
=
scalar
(
globalCells
.
size
())
/
Pstream
::
nProcs
();
scalar
avgProcPatches
=
scalar
(
totProcPatches
)
/
Pstream
::
nProcs
();
scalar
avgProcFaces
=
scalar
(
totProcFaces
)
/
Pstream
::
nProcs
();
Info
<<
nl
<<
"Number of processor faces = "
<<
totProcFaces
/
2
<<
nl
<<
"Max number of cells = "
<<
maxProcCells
<<
" ("
<<
100
.
0
*
(
maxProcCells
-
avgProcCells
)
/
avgProcCells
<<
"% above average "
<<
avgProcCells
<<
")"
<<
nl
<<
"Max number of processor patches = "
<<
maxProcPatches
<<
" ("
<<
100
.
0
*
(
maxProcPatches
-
avgProcPatches
)
/
avgProcPatches
<<
"% above average "
<<
avgProcPatches
<<
")"
<<
nl
<<
"Max number of faces between processors = "
<<
maxProcFaces
<<
" ("
<<
100
.
0
*
(
maxProcFaces
-
avgProcFaces
)
/
avgProcFaces
<<
"% above average "
<<
avgProcFaces
<<
")"
<<
nl
<<
endl
;
}
...
...
@@ -641,6 +714,16 @@ int main(int argc, char *argv[])
);
# include "setRootCase.H"
if
(
env
(
"FOAM_SIGFPE"
))
{
WarningIn
(
args
.
executable
())
<<
"Detected floating point exception trapping (FOAM_SIGFPE)."
<<
" This might give"
<<
nl
<<
" problems when mapping fields. Switch it off in case"
<<
" of problems."
<<
endl
;
}
// Create processor directory if non-existing
if
(
!
Pstream
::
master
()
&&
!
isDir
(
args
.
path
()))
{
...
...
@@ -906,7 +989,7 @@ int main(int argc, char *argv[])
// Debugging: Create additional volField that will be mapped.
// Used to test correctness of mapping
volVectorField
mapCc
(
"mapCc"
,
1
*
mesh
.
C
());
//
volVectorField mapCc("mapCc", 1*mesh.C());
// Global matching tolerance
const
scalar
tolDim
=
getMergeDistance
...
...
@@ -948,7 +1031,7 @@ int main(int argc, char *argv[])
// Debugging: test mapped cellcentre field.
compareFields
(
tolDim
,
mesh
.
C
(),
mapCc
);
//
compareFields(tolDim, mesh.C(), mapCc);
// Print nice message
// ~~~~~~~~~~~~~~~~~~
...
...
applications/utilities/preProcessing/viewFactorGen/Make/files
→
applications/utilities/preProcessing/viewFactor
s
Gen/Make/files
View file @
11dab784
File moved
applications/utilities/preProcessing/viewFactorGen/Make/options
→
applications/utilities/preProcessing/viewFactor
s
Gen/Make/options
View file @
11dab784
File moved
applications/utilities/preProcessing/viewFactorGen/searchingEngine.H
→
applications/utilities/preProcessing/viewFactor
s
Gen/searchingEngine.H
View file @
11dab784
File moved
applications/utilities/preProcessing/viewFactorGen/shootRays.H
→
applications/utilities/preProcessing/viewFactor
s
Gen/shootRays.H
View file @
11dab784
File moved
applications/utilities/preProcessing/viewFactorGen/viewFactorsGen.C
→
applications/utilities/preProcessing/viewFactor
s
Gen/viewFactorsGen.C
View file @
11dab784
File moved
bin/foamRunTutorials
View file @
11dab784
...
...
@@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2004-201
0
OpenCFD Ltd.
# \\ / A nd | Copyright (C) 2004-201
1
OpenCFD Ltd.
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
...
...
@@ -31,6 +31,39 @@
#
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Select the version of make to be used
#------------------------------------------------------------------------------
# normally use "make"
make
=
"make"
# set WM_NCOMPPROCS automatically when both WM_HOSTS and WM_SCHEDULER are set
if
[
-z
"
$WM_NCOMPPROCS
"
-a
-n
"
$WM_HOSTS
"
-a
-n
"
$WM_SCHEDULER
"
]
then
WM_NCOMPPROCS
=
$(
wmakeScheduler
-count
)
[
$?
-eq
0
]
||
unset
WM_NCOMPPROCS
fi
if
[
"
$WM_NCOMPPROCS
"
]
then
if
[
"
$WM_NCOMPPROCS
"
-gt
1
-a
!
"
$MAKEFLAGS
"
]
then
lockDir
=
$HOME
/.
$WM_PROJECT
/.wmake
if
[
-d
$lockDir
]
then
rm
-f
$lockDir
/
*
else
mkdir
-p
$lockDir
fi
make
=
"make --no-print-directory -j "
$WM_NCOMPPROCS
fi
fi
# Source tutorial functions
.
$WM_PROJECT_DIR
/bin/tools/RunFunctions
...
...
@@ -62,13 +95,15 @@ else
fi
done
# Recurse to subdirectories
for
caseName
in
*
do
if
[
-d
$caseName
]
then
(
cd
$caseName
&&
$thisScript
)
fi
done
#for caseName in *
#do
# if [ -d $caseName ]
# then
# ( cd $caseName && $thisScript )
# fi
#done
FOAM_TARGETS
=
$(
for
d
in
*
;
do
[
-d
"
$d
"
]
&&
echo
"
$d
"
;
done
| xargs
)
$make
-k
-f
$WM_PROJECT_DIR
/bin/tools/MakefileDirs
FOAM_TARGETS
=
"
$FOAM_TARGETS
"
FOAM_APP
=
$thisScript
fi
#------------------------------------------------------------------------------
bin/paraFoam
View file @
11dab784
...
...
@@ -37,7 +37,7 @@ usage() {
while
[
"$#"
-ge
1
]
;
do
echo
"
$1
"
;
shift
;
done
cat
<<
USAGE
Usage:
${
0
##*/
}
[OPTION]
Usage:
${
0
##*/
}
[OPTION]
[PARAVIEW_OPTION]
options:
-block use blockMesh reader (uses .blockMesh extension)
-builtin use VTK builtin OpenFOAM reader (uses .foam extension)
...
...
@@ -47,6 +47,9 @@ options:
-touchAll create .blockMesh, .OpenFOAM files (and for all regions)
-help print the usage
paraview options start with a double dashes
* start paraview
$ParaView_VERSION
with the OpenFOAM libraries
USAGE
...
...
@@ -57,7 +60,7 @@ USAGE
# to clean up
unset
FOAM_ABORT
unset
regionName
t
ouch
Opt
unset
regionName
optT
ouch
# reader extension
extension
=
OpenFOAM
...
...
@@ -88,12 +91,19 @@ do
shift
2
;;
-touch
)
t
ouch
Opt
=
true
optT
ouch
=
true
shift
;;
-touchAll
)
touchOpt
=
all
optTouch
=
all
shift
;;
--
)
shift
break
# stop here, treat balance as paraview options
;;
--
*
)
break
# stop here, treat this and balance as paraview options
;;
*
)
usage
"unknown option/argument: '
$*
'"
...
...
@@ -101,6 +111,28 @@ do
esac
done
#
# check for --data=... argument
#
hasDataArg
()
{
hasData
=
false
while
[
"$#"
-gt
0
]
do
case
"
$1
"
in
(
--data
=
*
)
hasData
=
true
break
;;
esac
shift
done
}
hasDataArg
$@
# get a sensible caseName from the directory name
caseName
=
${
PWD
##*/
}
caseFile
=
"
$caseName
.
$extension
"
...
...
@@ -112,7 +144,7 @@ then
fvControls
=
"
$fvControls
/
$regionName
"
fi
case
"
${
t
ouch
Opt
:-
false
}
"
in
case
"
${
optT
ouch
:-
false
}
"
in
all
)
extension
=
OpenFOAM
if
[
-f
constant/polyMesh/blockMeshDict
]
...
...
@@ -149,33 +181,56 @@ case "$caseName" in
esac
#
# check existence of essential files
#
case
$extension
in
blockMesh
)
for
check
in
system/controlDict constant/polyMesh/blockMeshDict
do
[
-s
"
$parentDir
/
$check
"
]
||
usage
"file does not exist: '
$parentDir
/
$check
'"
done
;;
if
[
"
${
hasData
:-
false
}
"
=
true
]
then
builtin
|
OpenFOAM
)
for
check
in
system/controlDict
$fvControls
/fvSchemes
$fvControls
/fvSolution
do
[
-s
"
$parentDir
/
$check
"
]
||
usage
"file does not exist: '
$parentDir
/
$check
'"
done
;;
esac
# has --data=.., send directly to paraview
exec
paraview
"
$@
"
else
# check existence of essential files
warn
=
"WARN file does not exist:"
case
$extension
in
blockMesh
)
for
check
in
\
system/controlDict
\
constant/polyMesh/blockMeshDict
\
;
do
[
-s
"
$parentDir
/
$check
"
]
||
{
[
-n
"
$warn
"
]
&&
echo
"
$warn
"
1>&2
echo
"
$parentDir
/
$check
"
1>&2
unset
warn
}
done
;;
builtin
|
OpenFOAM
)
for
check
in
\
system/controlDict
\
$fvControls
/fvSchemes
\
$fvControls
/fvSolution
\
;
do
[
-s
"
$parentDir
/
$check
"
]
||
{
[
-n
"
$warn
"
]
&&
echo
"
$warn
"
1>&2
echo
"
$parentDir
/
$check
"
1>&2
unset
warn
}
done
;;
esac
# only create/remove caseFile if it didn't already exist
[
-e
$caseFile
]
||
{
trap
"rm -f
$caseFile
2>/dev/null; exit 0"
EXIT TERM INT
touch
"
$caseFile
"
echo
"created temporary '
$caseFile
'"
}
# only create/remove caseFile if it didn't already exist
[
-e
$caseFile
]
||
{
trap
"rm -f
$caseFile
2>/dev/null; exit 0"
EXIT TERM INT
touch
"
$caseFile
"
echo
"created temporary '
$caseFile
'"
}
paraview
--data
=
"
$caseFile
"
"
$@
"
fi
paraview
--data
=
"
$caseFile
"
#------------------------------------------------------------------------------
bin/tools/MakefileDirs
0 → 100644
View file @
11dab784
#-------------------------------*- makefile -*---------------------------------
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
# \\ / A nd | Copyright (C) 2004-2011 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 3 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, see <http://www.gnu.org/licenses/>.
#
# File
# MakefileDirs
#
# Description
# Makefile used by
# foamRunTutorials
# to call some script in subdirectories.
#
#------------------------------------------------------------------------------
.PHONY
:
application $(FOAM_TARGETS)
application
:
$(FOAM_TARGETS)
$(FOAM_TARGETS)
:
@
(
cd
$@
&&
$(FOAM_APP)
)
#------------------------------------------------------------------------------
bin/tools/foamConfigurePaths
View file @
11dab784
...
...
@@ -131,7 +131,7 @@ do
paraviewInstall
=
"
$2
"
# replace ParaView_DIR=...
_inlineSed
\
etc/
apps
/paraview
3/bashrc
\
etc/
config
/paraview
.sh
\
'/^[^#]/s@ParaView_DIR=.*@ParaView_DIR='
"
$paraviewInstall
@"
\
"Replacing ParaView_DIR setting by '
$paraviewInstall
'"
shift
2
...
...
etc/bashrc
View file @
11dab784
...
...
@@ -120,7 +120,12 @@ export WM_THIRD_PARTY_DIR=$WM_PROJECT_INST_DIR/ThirdParty-$WM_PROJECT_VERSION
# Location of site-specific templates etc
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# unset is equivalent to $WM_PROJECT_INST_DIR/site
unset
WM_PROJECT_SITE
if
[
-d
"
$WM_PROJECT_SITE
"
]
then
export
WM_PROJECT_SITE
else
unset
WM_PROJECT_SITE
fi
# Location of user files
# ~~~~~~~~~~~~~~~~~~~~~~
...
...
@@ -177,7 +182,7 @@ _foamEval()
_foamSource
`
$WM_PROJECT_DIR
/bin/foamEtcFile prefs.sh
`
# Evaluate command-line parameters and record settings for later
# these can be used to set/unset values, or specify pref
s
files
# these can be used to set/unset values, or specify
alternative
pref files
export
FOAM_SETTINGS
=
"
$@
"
_foamEval
$@
...
...
@@ -200,14 +205,14 @@ export PATH LD_LIBRARY_PATH MANPATH
# Source project setup files
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource
$WM_PROJECT_DIR
/etc/settings.sh
_foamSource
$WM_PROJECT_DIR
/etc/aliases.sh
_foamSource
$WM_PROJECT_DIR
/etc/
config/
settings.sh
_foamSource
$WM_PROJECT_DIR
/etc/
config/
aliases.sh
# Source user setup files for optional packages
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_foamSource
`
$WM_PROJECT_DIR
/bin/foamEtcFile
apps
/paraview
3/bashrc
`
_foamSource
`
$WM_PROJECT_DIR
/bin/foamEtcFile
apps
/ensight
/bashrc
`
_foamSource
`
$WM_PROJECT_DIR
/bin/foamEtcFile
config
/paraview
.sh
`
_foamSource
`
$WM_PROJECT_DIR
/bin/foamEtcFile
config
/ensight
.sh
`
# Clean environment paths again. Only remove duplicates
...
...
etc/config/README
0 → 100644
View file @
11dab784
The main OpenFOAM settings are located in the parent etc/ directory