mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@ -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
|
||||
|
||||
@ -241,9 +241,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 +310,8 @@
|
||||
+ multipleBoxes, hotBoxes, panel, evaporationTest
|
||||
+ =interDyMFoam= tutorials:
|
||||
+ testTubeMixer: showcases =solidBodyMotionFunction=
|
||||
+ =snappyHexMesh= tutorials:
|
||||
+ flange: demonstration of feature lines in snappyHexMesh
|
||||
|
||||
* Other
|
||||
+ compilable with =clang=
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 1E-6;
|
||||
mergeTolerance 1e-6;
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -131,7 +131,7 @@ do
|
||||
paraviewInstall="$2"
|
||||
# replace ParaView_DIR=...
|
||||
_inlineSed \
|
||||
etc/apps/paraview3/bashrc \
|
||||
etc/config/paraview.sh \
|
||||
'/^[^#]/s@ParaView_DIR=.*@ParaView_DIR='"$paraviewInstall@" \
|
||||
"Replacing ParaView_DIR setting by '$paraviewInstall'"
|
||||
shift 2
|
||||
|
||||
@ -177,7 +177,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 prefs files
|
||||
# these can be used to set/unset values, or specify alternative pref files
|
||||
export FOAM_SETTINGS="$@"
|
||||
_foamEval $@
|
||||
|
||||
@ -201,13 +201,13 @@ 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/aliases.sh
|
||||
|
||||
|
||||
# Source user setup files for optional packages
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/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
|
||||
|
||||
51
etc/config/README
Normal file
51
etc/config/README
Normal file
@ -0,0 +1,51 @@
|
||||
The main OpenFOAM settings are located in the parent etc/ directory
|
||||
|
||||
* bashrc, cshrc
|
||||
entry point for sourcing
|
||||
|
||||
* settings.csh, settings.sh
|
||||
core settings
|
||||
|
||||
* prefs.csh, prefs.sh
|
||||
these files are untracked and can be used for some site-defined
|
||||
settings
|
||||
|
||||
|
||||
The etc/config/ directory contains various configuration files in
|
||||
sh/csh variants:
|
||||
|
||||
* aliases.csh, aliases.sh
|
||||
aliases for interactive shells
|
||||
|
||||
* unset.csh, unset.sh
|
||||
sourced to clear as many OpenFOAM environment settings as possible
|
||||
|
||||
|
||||
* ensight.csh, ensight.sh
|
||||
application settings for EnSight
|
||||
|
||||
* paraview.csh, paraview.sh
|
||||
application settings for ParaView
|
||||
|
||||
* scotch.sh
|
||||
application settings for compiling against scotch
|
||||
|
||||
---
|
||||
|
||||
The config/example directory contains various example configuration files
|
||||
in sh/csh variants
|
||||
|
||||
* compiler.csh, compiler.sh
|
||||
an example of fine tuning ThirdParty compiler settings for OpenFOAM
|
||||
|
||||
* openmpi.csh, openmpi.sh
|
||||
an example of fine tuning openmpi settings for OpenFOAM
|
||||
|
||||
* paraview.csh, paraview.sh
|
||||
an example of chaining to the standard config/paraview.sh with a
|
||||
different ParaView_VERSION
|
||||
|
||||
* prefs.csh, prefs.sh
|
||||
an example of supplying alternative site-defined settings
|
||||
|
||||
---
|
||||
@ -22,7 +22,7 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# etc/aliases.csh
|
||||
# etc/config/aliases.csh
|
||||
#
|
||||
# Description
|
||||
# Aliases for working with OpenFOAM
|
||||
@ -39,7 +39,7 @@ alias wmSP 'wmSET WM_PRECISION_OPTION=SP'
|
||||
alias wmDP 'wmSET WM_PRECISION_OPTION=DP'
|
||||
|
||||
# clear env
|
||||
alias wmUNSET='source $WM_PROJECT_DIR/etc/unset.csh'
|
||||
alias wmUNSET='source $WM_PROJECT_DIR/etc/config/unset.csh'
|
||||
|
||||
# Toggle wmakeScheduler on/off
|
||||
# - also need to set WM_HOSTS
|
||||
@ -49,7 +49,7 @@ alias wmSchedOFF 'unsetenv WM_SCHEDULER'
|
||||
|
||||
# Change ParaView version
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~
|
||||
alias foamPV 'source `$WM_PROJECT_DIR/etc/apps/paraview3/cshrc` ParaView_VERSION=\!*; echo paraview-$ParaView_VERSION'
|
||||
alias foamPV 'source `$WM_PROJECT_DIR/etc/config/paraview.csh` ParaView_VERSION=\!*; echo paraview-$ParaView_VERSION'
|
||||
|
||||
|
||||
# Change directory aliases
|
||||
@ -22,7 +22,7 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# etc/aliases.sh
|
||||
# etc/config/aliases.sh
|
||||
#
|
||||
# Description
|
||||
# Aliases for working with OpenFOAM
|
||||
@ -39,7 +39,7 @@ alias wmSP='wmSET WM_PRECISION_OPTION=SP'
|
||||
alias wmDP='wmSET WM_PRECISION_OPTION=DP'
|
||||
|
||||
# clear env
|
||||
alias wmUNSET='. $WM_PROJECT_DIR/etc/unset.sh'
|
||||
alias wmUNSET='. $WM_PROJECT_DIR/etc/config/unset.sh'
|
||||
|
||||
# Toggle wmakeScheduler on/off
|
||||
# - also need to set WM_HOSTS
|
||||
@ -52,7 +52,7 @@ alias wmSchedOFF='unset WM_SCHEDULER'
|
||||
unset foamPV
|
||||
foamPV()
|
||||
{
|
||||
. $WM_PROJECT_DIR/etc/apps/paraview3/bashrc ParaView_VERSION=$1
|
||||
. $WM_PROJECT_DIR/etc/config/paraview.sh ParaView_VERSION=$1
|
||||
echo "paraview-$ParaView_VERSION (major: $ParaView_MAJOR)"
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -22,7 +22,7 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# ensight/cshrc
|
||||
# config/ensight.csh
|
||||
#
|
||||
# Description
|
||||
# Setup file for Ensight
|
||||
@ -2,7 +2,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -22,7 +22,7 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# ensight/bashrc
|
||||
# config/ensight.sh
|
||||
#
|
||||
# Description
|
||||
# Setup file for Ensight
|
||||
@ -22,10 +22,10 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# config/compiler.csh
|
||||
# config/example/compiler.csh
|
||||
#
|
||||
# Description
|
||||
# Fine tuning of ThirdParty compiler settings for OpenFOAM
|
||||
# Example of fine tuning ThirdParty compiler settings for OpenFOAM
|
||||
# Sourced from OpenFOAM-<VERSION>/etc/settings.csh
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
@ -22,10 +22,10 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# config/compiler.sh
|
||||
# config/example/compiler.sh
|
||||
#
|
||||
# Description
|
||||
# Fine tuning of ThirdParty compiler settings for OpenFOAM
|
||||
# Example of fine tuning ThirdParty compiler settings for OpenFOAM
|
||||
# Sourced from OpenFOAM-<VERSION>/etc/settings.sh
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
@ -22,10 +22,10 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# config/openmpi.csh
|
||||
# config/example/openmpi.csh
|
||||
#
|
||||
# Description
|
||||
# Fine tuning of openmpi settings for OpenFOAM
|
||||
# Example of fine tuning openmpi settings for OpenFOAM
|
||||
# Sourced from OpenFOAM-<VERSION>/etc/settings.csh
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
@ -22,10 +22,10 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# config/openmpi.sh
|
||||
# config/example/openmpi.sh
|
||||
#
|
||||
# Description
|
||||
# Fine tuning of openmpi settings for OpenFOAM
|
||||
# Example of fine tuning openmpi settings for OpenFOAM
|
||||
# Sourced from OpenFOAM-<VERSION>/etc/settings.sh
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
@ -22,10 +22,10 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# paraview3/cshrc-EXAMPLE
|
||||
# config/example/paraview.csh
|
||||
#
|
||||
# Description
|
||||
# Example of chaining to the standard paraview3/cshrc with a
|
||||
# Example of chaining to the standard config/paraview.csh with a
|
||||
# different ParaView_VERSION
|
||||
#
|
||||
# Note
|
||||
@ -35,10 +35,10 @@
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Use other (shipped) cshrc with a different ParaView_VERSION
|
||||
# Use other (shipped) paraview.csh with a different ParaView_VERSION
|
||||
#
|
||||
|
||||
set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode o apps/paraview3/cshrc`
|
||||
set foamFile=`$WM_PROJECT_DIR/bin/foamEtcFile -mode o config/paraview.csh`
|
||||
if ( $status == 0 ) source $foamFile ParaView_VERSION=3.9.0
|
||||
|
||||
unset foamFile
|
||||
@ -22,10 +22,10 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# paraview3/bashrc-EXAMPLE
|
||||
# config/example/paraview.sh
|
||||
#
|
||||
# Description
|
||||
# Example of chaining to the standard paraview3/bashrc with a
|
||||
# Example of chaining to the standard config/paraview.sh with a
|
||||
# different ParaView_VERSION
|
||||
#
|
||||
# Note
|
||||
@ -35,10 +35,10 @@
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Use other (shipped) bashrc with a different ParaView_VERSION
|
||||
# Use other (shipped) paraview.sh with a different ParaView_VERSION
|
||||
#
|
||||
|
||||
foamFile=$($WM_PROJECT_DIR/bin/foamEtcFile -mode o apps/paraview3/bashrc 2>/dev/null)
|
||||
foamFile=$($WM_PROJECT_DIR/bin/foamEtcFile -mode o config/paraview.sh 2>/dev/null)
|
||||
[ $? -eq 0 ] && . $foamFile ParaView_VERSION=3.9.0
|
||||
|
||||
unset foamFile
|
||||
@ -22,7 +22,7 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# etc/prefs.csh
|
||||
# config/example/prefs.csh
|
||||
#
|
||||
# Description
|
||||
# Preset variables for the OpenFOAM configuration - C-Shell shell syntax.
|
||||
@ -22,7 +22,7 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# etc/prefs.sh
|
||||
# config/example/prefs.sh
|
||||
#
|
||||
# Description
|
||||
# Preset variables for the OpenFOAM configuration - POSIX shell syntax.
|
||||
@ -22,7 +22,7 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# paraview3/cshrc
|
||||
# config/paraview.csh
|
||||
#
|
||||
# Description
|
||||
# Setup file for paraview-3.x
|
||||
@ -22,7 +22,7 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# paraview3/bashrc
|
||||
# config/paraview.sh
|
||||
#
|
||||
# Description
|
||||
# Setup file for paraview-3.x
|
||||
@ -113,7 +113,6 @@ else
|
||||
unset PV_PLUGIN_PATH
|
||||
fi
|
||||
|
||||
|
||||
unset _foamParaviewEval
|
||||
unset cleaned cmake paraviewInstDir paraviewPython
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# scotch/bashrc
|
||||
# config/scotch.sh
|
||||
#
|
||||
# Description
|
||||
# Setup file for scotch include/libraries.
|
||||
@ -36,5 +36,4 @@
|
||||
export SCOTCH_VERSION=scotch_5.1.11
|
||||
export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$SCOTCH_VERSION
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@ -22,7 +22,7 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# etc/unset.csh
|
||||
# etc/config/unset.csh
|
||||
#
|
||||
# Description
|
||||
# Clear as many OpenFOAM environment settings as possible
|
||||
@ -22,7 +22,7 @@
|
||||
# along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# File
|
||||
# etc/unset.sh
|
||||
# etc/config/unset.sh
|
||||
#
|
||||
# Description
|
||||
# Clear as many OpenFOAM environment settings as possible
|
||||
@ -492,6 +492,7 @@ DebugSwitches
|
||||
geomCellLooper 0;
|
||||
geometricSurfacePatch 0;
|
||||
global 0;
|
||||
globalIndexAndTransform 0;
|
||||
globalMeshData 0;
|
||||
globalPoints 0;
|
||||
gnuplot 0;
|
||||
|
||||
@ -138,7 +138,7 @@ alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; if (\!*
|
||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh`
|
||||
|
||||
# Evaluate command-line parameters and record settings for later
|
||||
# these can be used to set/unset values, or specify prefs files
|
||||
# these can be used to set/unset values, or specify alternative pref files
|
||||
setenv FOAM_SETTINGS "${*}"
|
||||
while ( $#argv > 0 )
|
||||
switch ($argv[1])
|
||||
@ -195,12 +195,12 @@ if ( $status == 0 ) setenv MANPATH $cleaned
|
||||
# Source project setup files
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
_foamSource $WM_PROJECT_DIR/etc/settings.csh
|
||||
_foamSource $WM_PROJECT_DIR/etc/aliases.csh
|
||||
_foamSource $WM_PROJECT_DIR/etc/config/aliases.csh
|
||||
|
||||
# Source user setup files for optional packages
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/paraview3/cshrc`
|
||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile apps/ensight/cshrc`
|
||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/paraview.csh`
|
||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile config/ensight.csh`
|
||||
|
||||
|
||||
# Clean environment paths again. Only remove duplicates
|
||||
|
||||
@ -613,80 +613,83 @@ void Foam::globalPoints::receivePatchPoints
|
||||
label meshPointA = meshPoints[i];
|
||||
label meshPointB = coupledMeshPoints[i];
|
||||
|
||||
//Pout<< "Connection between point " << meshPointA
|
||||
// << " at " << mesh_.points()[meshPointA]
|
||||
// << " and " << meshPointB
|
||||
// << " at " << mesh_.points()[meshPointB] << endl;
|
||||
|
||||
label localA = meshToLocalPoint
|
||||
(
|
||||
meshToPatchPoint,
|
||||
meshPointA
|
||||
);
|
||||
label localB = meshToLocalPoint
|
||||
(
|
||||
meshToPatchPoint,
|
||||
meshPointB
|
||||
);
|
||||
|
||||
|
||||
// Do we have information on pointA?
|
||||
Map<label>::iterator procPointA =
|
||||
meshToProcPoint_.find(localA);
|
||||
|
||||
labelPairList infoA;
|
||||
if (procPointA != meshToProcPoint_.end())
|
||||
if (meshPointA != meshPointB)
|
||||
{
|
||||
infoA = addSendTransform
|
||||
//Pout<< "Connection between point " << meshPointA
|
||||
// << " at " << mesh_.points()[meshPointA]
|
||||
// << " and " << meshPointB
|
||||
// << " at " << mesh_.points()[meshPointB] << endl;
|
||||
|
||||
label localA = meshToLocalPoint
|
||||
(
|
||||
cycPatch.index(),
|
||||
procPoints_[procPointA()]
|
||||
meshToPatchPoint,
|
||||
meshPointA
|
||||
);
|
||||
}
|
||||
|
||||
// Same for info on pointB
|
||||
Map<label>::iterator procPointB =
|
||||
meshToProcPoint_.find(localB);
|
||||
|
||||
labelPairList infoB;
|
||||
if (procPointB != meshToProcPoint_.end())
|
||||
{
|
||||
infoB = addSendTransform
|
||||
label localB = meshToLocalPoint
|
||||
(
|
||||
cycPatch.neighbPatchID(),
|
||||
procPoints_[procPointB()]
|
||||
meshToPatchPoint,
|
||||
meshPointB
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if (infoA.size())
|
||||
{
|
||||
if (mergeInfo(infoA, localB))
|
||||
// Do we have information on pointA?
|
||||
Map<label>::iterator procPointA =
|
||||
meshToProcPoint_.find(localA);
|
||||
|
||||
labelPairList infoA;
|
||||
if (procPointA != meshToProcPoint_.end())
|
||||
{
|
||||
//Pout<< " Combined info at point "
|
||||
// << mesh_.points()[meshPointB]
|
||||
// << " now " << endl;
|
||||
//printProcPoints
|
||||
//(
|
||||
// patchToMeshPoint,
|
||||
// procPoints_[meshToProcPoint_[localB]]
|
||||
//);
|
||||
changedPoints.insert(localB);
|
||||
infoA = addSendTransform
|
||||
(
|
||||
cycPatch.index(),
|
||||
procPoints_[procPointA()]
|
||||
);
|
||||
}
|
||||
}
|
||||
if (infoB.size())
|
||||
{
|
||||
if (mergeInfo(infoB, localA))
|
||||
|
||||
// Same for info on pointB
|
||||
Map<label>::iterator procPointB =
|
||||
meshToProcPoint_.find(localB);
|
||||
|
||||
labelPairList infoB;
|
||||
if (procPointB != meshToProcPoint_.end())
|
||||
{
|
||||
//Pout<< " Combined info at point "
|
||||
// << mesh_.points()[meshPointA]
|
||||
// << " now " << endl;
|
||||
//printProcPoints
|
||||
//(
|
||||
// patchToMeshPoint,
|
||||
// procPoints_[meshToProcPoint_[localA]]
|
||||
//);
|
||||
changedPoints.insert(localA);
|
||||
infoB = addSendTransform
|
||||
(
|
||||
cycPatch.neighbPatchID(),
|
||||
procPoints_[procPointB()]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if (infoA.size())
|
||||
{
|
||||
if (mergeInfo(infoA, localB))
|
||||
{
|
||||
//Pout<< " Combined info at point "
|
||||
// << mesh_.points()[meshPointB]
|
||||
// << " now " << endl;
|
||||
//printProcPoints
|
||||
//(
|
||||
// patchToMeshPoint,
|
||||
// procPoints_[meshToProcPoint_[localB]]
|
||||
//);
|
||||
changedPoints.insert(localB);
|
||||
}
|
||||
}
|
||||
if (infoB.size())
|
||||
{
|
||||
if (mergeInfo(infoB, localA))
|
||||
{
|
||||
//Pout<< " Combined info at point "
|
||||
// << mesh_.points()[meshPointA]
|
||||
// << " now " << endl;
|
||||
//printProcPoints
|
||||
//(
|
||||
// patchToMeshPoint,
|
||||
// procPoints_[meshToProcPoint_[localA]]
|
||||
//);
|
||||
changedPoints.insert(localA);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -480,26 +480,28 @@ Foam::globalIndexAndTransform::globalIndexAndTransform
|
||||
|
||||
determinePatchTransformSign();
|
||||
|
||||
if (debug && transforms_.size() > 1)
|
||||
if (debug && transforms_.size() > 0)
|
||||
{
|
||||
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||
|
||||
Info<< "Determined global transforms :" << endl;
|
||||
Info<< "\t\ttranslation\trotation" << endl;
|
||||
forAll(transforms_, i)
|
||||
{
|
||||
Info<< '\t' << i << '\t';
|
||||
if (transforms_[i].hasR())
|
||||
const vectorTensorTransform& trafo = transforms_[i];
|
||||
if (trafo.hasR())
|
||||
{
|
||||
Info<< transforms_[i].t() << '\t' << transforms_[i].R();
|
||||
Info<< trafo.t() << '\t' << trafo.R();
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< transforms_[i].t() << '\t' << "---";
|
||||
Info<< trafo.t() << '\t' << "---";
|
||||
}
|
||||
Info<< endl;
|
||||
}
|
||||
Info<< endl;
|
||||
|
||||
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||
|
||||
Info<< "\tpatch\ttransform\tsign" << endl;
|
||||
forAll(patchTransformSign_, patchI)
|
||||
@ -513,6 +515,26 @@ Foam::globalIndexAndTransform::globalIndexAndTransform
|
||||
}
|
||||
}
|
||||
Info<< endl;
|
||||
|
||||
|
||||
Info<< "Permutations of transformations:" << endl
|
||||
<< "\t\ttranslation\trotation" << endl;
|
||||
forAll(transformPermutations_, i)
|
||||
{
|
||||
Info<< '\t' << i << '\t';
|
||||
const vectorTensorTransform& trafo = transformPermutations_[i];
|
||||
if (trafo.hasR())
|
||||
{
|
||||
Info<< trafo.t() << '\t' << trafo.R();
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< trafo.t() << '\t' << "---";
|
||||
}
|
||||
Info<< endl;
|
||||
}
|
||||
Info<< "nullTransformIndex:" << nullTransformIndex() << endl
|
||||
<< endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -149,6 +149,7 @@ Foam::octree<Type>::octree
|
||||
// - has some guaranteed maximum size (maxShapeRatio)
|
||||
|
||||
label oldNLeaves = -1; // make test below pass first time.
|
||||
label oldNNodes = -1;
|
||||
deepestLevel_ = 1;
|
||||
while
|
||||
(
|
||||
@ -169,11 +170,11 @@ Foam::octree<Type>::octree
|
||||
break;
|
||||
}
|
||||
|
||||
if (oldNLeaves == nLeaves())
|
||||
if ((oldNLeaves == nLeaves()) && (oldNNodes == nNodes()))
|
||||
{
|
||||
if (debug & 1)
|
||||
{
|
||||
Pout<< "octree : exiting since nLeaves does not change"
|
||||
Pout<< "octree : exiting since nLeaves and nNodes do not change"
|
||||
<< endl;
|
||||
}
|
||||
break;
|
||||
@ -185,6 +186,7 @@ Foam::octree<Type>::octree
|
||||
}
|
||||
|
||||
oldNLeaves = nLeaves();
|
||||
oldNNodes = nNodes();
|
||||
|
||||
topNode_->redistribute
|
||||
(
|
||||
|
||||
@ -3,13 +3,13 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
makeType=${1:-libso}
|
||||
|
||||
# get SCOTCH_VERSION, SCOTCH_ARCH_PATH
|
||||
if settings=`$WM_PROJECT_DIR/bin/foamEtcFile apps/scotch/bashrc`
|
||||
if settings=`$WM_PROJECT_DIR/bin/foamEtcFile config/scotch.sh`
|
||||
then
|
||||
. $settings
|
||||
echo "using SCOTCH_ARCH_PATH=$SCOTCH_ARCH_PATH"
|
||||
else
|
||||
echo
|
||||
echo "Error: no apps/scotch/bashrc settings"
|
||||
echo "Error: no config/scotch.sh settings"
|
||||
echo
|
||||
fi
|
||||
|
||||
|
||||
@ -1,55 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volVectorField;
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
down
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
up
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
|
||||
left
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (1 0 0);
|
||||
}
|
||||
|
||||
cylinder
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,55 +0,0 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
down
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
|
||||
right
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
up
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
|
||||
left
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
|
||||
cylinder
|
||||
{
|
||||
type symmetryPlane;
|
||||
}
|
||||
|
||||
defaultFaces
|
||||
{
|
||||
type empty;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
11
tutorials/basic/potentialFoam/cylinder/Allclean
Executable file
11
tutorials/basic/potentialFoam/cylinder/Allclean
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
rm -rf 0 > /dev/null 2>&1
|
||||
|
||||
cleanCase
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -6,10 +6,9 @@ cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
application=`getApplication`
|
||||
|
||||
cp -r 0.org 0 > /dev/null 2>&1
|
||||
runApplication blockMesh
|
||||
runApplication $application
|
||||
compileApplication analyticalCylinder
|
||||
runApplication analyticalCylinder
|
||||
runApplication streamFunction
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
analyticalCylinder.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/analyticalCylinder
|
||||
@ -1,5 +0,0 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume
|
||||
@ -1,70 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 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/>.
|
||||
|
||||
Application
|
||||
analyticalCylinder
|
||||
|
||||
Description
|
||||
Generates an analytical solution for potential flow around a cylinder.
|
||||
Can be compared with the solution from the potentialFlow/cylinder example.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
# include "setRootCase.H"
|
||||
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
# include "createFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nEvaluating analytical solution" << endl;
|
||||
|
||||
volVectorField centres = UA.mesh().C();
|
||||
volScalarField magCentres = mag(centres);
|
||||
volScalarField theta = acos((centres & vector(1,0,0))/magCentres);
|
||||
|
||||
volVectorField cs2theta =
|
||||
cos(2*theta)*vector(1,0,0)
|
||||
+ sin(2*theta)*vector(0,1,0);
|
||||
|
||||
UA = uInfX*(dimensionedVector(vector(1,0,0))
|
||||
- pow((radius/magCentres),2)*cs2theta);
|
||||
|
||||
// Force writing of UA (since time has not changed)
|
||||
UA.write();
|
||||
|
||||
Info<< "end" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,45 +0,0 @@
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading inlet velocity uInfX\n" << endl;
|
||||
|
||||
dimensionedScalar uInfX
|
||||
(
|
||||
"uInfx",
|
||||
dimensionSet(0, 1, -1, 0, 0),
|
||||
U.boundaryField()[3][0].x()
|
||||
);
|
||||
Info << "U at inlet = " << uInfX.value() << " m/s" << endl;
|
||||
|
||||
dimensionedScalar radius
|
||||
(
|
||||
"radius",
|
||||
dimensionSet(0, 1, 0, 0, 0),
|
||||
mag(U.mesh().boundary()[4].Cf()[0])
|
||||
);
|
||||
|
||||
Info << "Cylinder radius = " << radius.value() << " m" << endl;
|
||||
|
||||
volVectorField UA
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"UA",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
U
|
||||
);
|
||||
@ -45,5 +45,74 @@ timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
functions
|
||||
{
|
||||
difference
|
||||
{
|
||||
functionObjectLibs ("libutilityFunctionObjects.so");
|
||||
type coded;
|
||||
redirectType error;
|
||||
code
|
||||
#{
|
||||
// Lookup U
|
||||
Info<< "Looking up field U\n" << endl;
|
||||
const volVectorField& U = mesh().lookupObject<volVectorField>("U");
|
||||
|
||||
Info<< "Reading inlet velocity uInfX\n" << endl;
|
||||
|
||||
dimensionedScalar uInfX
|
||||
(
|
||||
"uInfx",
|
||||
dimensionSet(0, 1, -1, 0, 0),
|
||||
U.boundaryField()[3][0].x()
|
||||
);
|
||||
Info << "U at inlet = " << uInfX.value() << " m/s" << endl;
|
||||
|
||||
dimensionedScalar radius
|
||||
(
|
||||
"radius",
|
||||
dimensionSet(0, 1, 0, 0, 0),
|
||||
mag(U.mesh().boundary()[4].Cf()[0])
|
||||
);
|
||||
|
||||
Info << "Cylinder radius = " << radius.value() << " m" << endl;
|
||||
|
||||
volVectorField UA
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"UA",
|
||||
mesh().time().timeName(),
|
||||
U.mesh(),
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
U
|
||||
);
|
||||
|
||||
Info<< "\nEvaluating analytical solution" << endl;
|
||||
|
||||
volVectorField centres = UA.mesh().C();
|
||||
volScalarField magCentres = mag(centres);
|
||||
volScalarField theta = acos((centres & vector(1,0,0))/magCentres);
|
||||
|
||||
volVectorField cs2theta =
|
||||
cos(2*theta)*vector(1,0,0)
|
||||
+ sin(2*theta)*vector(0,1,0);
|
||||
|
||||
UA = uInfX*(dimensionedVector(vector(1,0,0))
|
||||
- pow((radius/magCentres),2)*cs2theta);
|
||||
|
||||
// Force writing of UA (since time has not changed)
|
||||
UA.write();
|
||||
|
||||
volScalarField error("error", mag(U-UA)/mag(UA));
|
||||
Info<<"Writing relative error in U to " << error.objectPath()
|
||||
<< endl;
|
||||
error.write();
|
||||
#};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -180,6 +180,11 @@ 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.
|
||||
// Do not use here since mesh resolution too low and baffles present
|
||||
//nFeatureSnapIter 10;
|
||||
}
|
||||
|
||||
|
||||
@ -249,14 +254,17 @@ addLayersControls
|
||||
maxThicknessToMedialRatio 0.3;
|
||||
|
||||
// Angle used to pick up medial axis points
|
||||
// Note: changed(corrected) w.r.t 16x! 90 degrees corresponds to 130 in 16x.
|
||||
// Note: changed(corrected) w.r.t 17x! 90 degrees corresponds to 130 in 17x.
|
||||
minMedianAxisAngle 90;
|
||||
|
||||
|
||||
// Create buffer region for new layer terminations
|
||||
nBufferCellsNoExtrude 0;
|
||||
|
||||
// Overall max number of layer addition iterations
|
||||
|
||||
// Overall max number of layer addition iterations. The mesher will exit
|
||||
// if it reaches this number of iterations; possibly with an illegal
|
||||
// mesh.
|
||||
nLayerIter 50;
|
||||
}
|
||||
|
||||
@ -285,7 +293,8 @@ meshQualityControls
|
||||
|
||||
//- Minimum quality of the tet formed by the face-centre
|
||||
// and variable base point minimum decomposition triangles and
|
||||
// the cell centre. Set to very negative number (e.g. -1E30) to
|
||||
// the cell centre. This has to be a positive number for tracking
|
||||
// to work. Set to very negative number (e.g. -1E30) to
|
||||
// disable.
|
||||
// <0 = inside out tet,
|
||||
// 0 = flat tet
|
||||
|
||||
Reference in New Issue
Block a user