mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
GIT: Initial commit after latest foundation merge
This commit is contained in:
@ -1,29 +1,32 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Any cases that are links to solver test cases and are run when the Allrun
|
||||
# scripts of those solvers are run. This script avoids meshing these cases
|
||||
# twice.
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
(
|
||||
cd blob || exit
|
||||
./Allrun
|
||||
)
|
||||
(
|
||||
cd flange || exit
|
||||
./Allrun
|
||||
./Allrun $*
|
||||
)
|
||||
(
|
||||
cd simpleShapes || exit
|
||||
./Allrun
|
||||
)
|
||||
(
|
||||
cd mixerVessel || exit
|
||||
./Allrun
|
||||
./Allrun $*
|
||||
)
|
||||
|
||||
exit 0
|
||||
if ! isTest $@
|
||||
then
|
||||
(
|
||||
cd flange || exit
|
||||
./Allrun $*
|
||||
)
|
||||
(
|
||||
cd mixerVessel || exit
|
||||
./Allrun $*
|
||||
)
|
||||
fi
|
||||
|
||||
# Any cases that are links to solver test cases and are run when the Allrun
|
||||
# scripts of those solvers are run.
|
||||
|
||||
# This dummy Allrun script avoids meshing these cases twice.
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -24,4 +24,4 @@ rm -rf snapToSurface?.obj > /dev/null 2>&1
|
||||
rm -rf tetsToSnapTo.obj > /dev/null 2>&1
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -9,13 +9,13 @@ cp $FOAM_TUTORIALS/resources/geometry/blob.stl.gz constant/triSurface/
|
||||
|
||||
runApplication foamyHexMesh
|
||||
|
||||
runApplication collapseEdges -latestTime -collapseFaces
|
||||
mv log.collapseEdges log.collapseFaces
|
||||
runApplication -s collapseFaces \
|
||||
collapseEdges -latestTime -collapseFaces
|
||||
|
||||
runApplication collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
|
||||
mv log.collapseEdges log.collapseFaceSet
|
||||
runApplication -s collapseFaceSet \
|
||||
collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
|
||||
|
||||
runApplication checkMesh -latestTime -allGeometry -allTopology
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -4,26 +4,23 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get the number of processors to run on from system/decomposeParDict
|
||||
nProc=$(getNumberOfProcessors)
|
||||
|
||||
# copy flange surface from resources directory
|
||||
cp $FOAM_TUTORIALS/resources/geometry/blob.stl.gz constant/triSurface/
|
||||
|
||||
runApplication blockMesh -region backgroundMeshDecomposition
|
||||
runApplication decomposePar -region backgroundMeshDecomposition
|
||||
|
||||
runParallel foamyHexMesh $nProc
|
||||
runParallel foamyHexMesh
|
||||
|
||||
runParallel collapseEdges $nProc -latestTime -collapseFaces
|
||||
mv log.collapseEdges log.collapseFaces
|
||||
runParallel -s collapseFaces \
|
||||
collapseEdges -latestTime -collapseFaces
|
||||
|
||||
runParallel collapseEdges $nProc -latestTime -collapseFaceSet indirectPatchFaces
|
||||
mv log.collapseEdges log.collapseFaceSet
|
||||
runParallel -s collapseFaceSet \
|
||||
collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
|
||||
|
||||
runParallel checkMesh $nProc -latestTime -allTopology -allGeometry
|
||||
runParallel checkMesh -latestTime -allTopology -allGeometry
|
||||
|
||||
runApplication reconstructParMesh -latestTime
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -21,4 +21,4 @@ rm -r *.obj > /dev/null 2>&1
|
||||
|
||||
cleanCase
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -9,13 +9,13 @@ cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/
|
||||
|
||||
runApplication foamyHexMesh
|
||||
|
||||
runApplication collapseEdges -latestTime -collapseFaces
|
||||
mv log.collapseEdges log.collapseFaces
|
||||
runApplication -s collapseFaces \
|
||||
collapseEdges -latestTime -collapseFaces
|
||||
|
||||
runApplication collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
|
||||
mv log.collapseEdges log.collapseFaceSet
|
||||
runApplication -s collapseFaceSet \
|
||||
collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
|
||||
|
||||
runApplication checkMesh -latestTime -allGeometry -allTopology
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -4,9 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get the number of processors to run on from system/decomposeParDict
|
||||
nProc=$(getNumberOfProcessors)
|
||||
|
||||
# copy flange surface from resources directory
|
||||
cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/
|
||||
|
||||
@ -14,17 +11,17 @@ cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/
|
||||
runApplication blockMesh -region backgroundMeshDecomposition
|
||||
runApplication decomposePar -region backgroundMeshDecomposition
|
||||
|
||||
runParallel foamyHexMesh $nProc
|
||||
runParallel foamyHexMesh
|
||||
|
||||
runParallel collapseEdges $nProc -latestTime -collapseFaces
|
||||
mv log.collapseEdges log.collapseFaces
|
||||
runParallel -s collapseFaces \
|
||||
collapseEdges -latestTime -collapseFaces
|
||||
|
||||
runParallel collapseEdges $nProc -latestTime -collapseFaceSet indirectPatchFaces
|
||||
mv log.collapseEdges log.collapseFaceSet
|
||||
runParallel -s collapseFaceSet \
|
||||
collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
|
||||
|
||||
runParallel checkMesh $nProc -latestTime -allTopology -allGeometry
|
||||
runParallel checkMesh -latestTime -allTopology -allGeometry
|
||||
|
||||
runApplication reconstructParMesh -latestTime
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# copy flange surface from resources directory
|
||||
cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/
|
||||
|
||||
cp system/controlDict system/controlDict.org
|
||||
|
||||
sed -e s/"\(endTime[ \t]*\)\([0-9]*\);"/"\1 10;"/g \
|
||||
-e s/"\(writeInterval[ \t]*\)\([0-9]*\);"/"\1 10;"/g \
|
||||
system/controlDict.org > system/controlDict
|
||||
|
||||
runApplication foamyHexMesh
|
||||
|
||||
# Change collapseEdges to only do one iteration
|
||||
cp system/collapseDict system/collapseDict.org
|
||||
|
||||
sed -e s/"\(maximumIterations[ \t]*\)\([0-9]*\);"/"\1 1;"/g \
|
||||
system/collapseDict.org > system/collapseDict
|
||||
|
||||
runApplication collapseEdges -latestTime -collapseFaces
|
||||
|
||||
cp system/controlDict.org system/controlDict
|
||||
cp system/collapseDict.org system/collapseDict
|
||||
|
||||
rm -f system/controlDict.org system/collapseDict.org
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -21,4 +21,4 @@ cleanCase
|
||||
\rm -f constant/backgroundMeshDecomposition/polyMesh/points
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -10,4 +10,4 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Run simulation
|
||||
./Allrun-simulation
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -6,27 +6,19 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
intersectSurfaces()
|
||||
{
|
||||
runApplication \
|
||||
surfaceBooleanFeatures \
|
||||
intersection \
|
||||
"$@"
|
||||
|
||||
outputName1=$(basename $1)
|
||||
outputName1=${outputName1%.*}
|
||||
|
||||
outputName2=$(basename $2)
|
||||
outputName2=${outputName2%.*}
|
||||
|
||||
mv log.surfaceBooleanFeatures \
|
||||
log.surfaceBooleanFeatures.$outputName1:$outputName2
|
||||
runApplication -s $outputName1:$outputName2 \
|
||||
surfaceBooleanFeatures intersection "$@"
|
||||
}
|
||||
|
||||
# Set application name
|
||||
application=$(getApplication)
|
||||
|
||||
# Get number of processors to run on
|
||||
nProcs=$(getNumberOfProcessors)
|
||||
|
||||
\rm -rf 0
|
||||
|
||||
|
||||
@ -59,25 +51,28 @@ done
|
||||
|
||||
# Meshing
|
||||
\cp system/controlDict.mesh system/controlDict
|
||||
\cp system/collapseDict.collapseFaces system/collapseDict
|
||||
|
||||
runApplication blockMesh -region backgroundMeshDecomposition
|
||||
|
||||
runApplication decomposePar -region backgroundMeshDecomposition
|
||||
runApplication -s backgroundMeshDecomposition \
|
||||
decomposePar -region backgroundMeshDecomposition
|
||||
|
||||
runApplication surfaceFeatureExtract
|
||||
|
||||
runParallel foamyHexMesh $nProcs
|
||||
runParallel foamyHexMesh
|
||||
|
||||
runParallel -log log.collapseFaces collapseEdges $nProcs -collapseFaces -latestTime
|
||||
runParallel -s faces \
|
||||
collapseEdges -collapseFaces -latestTime \
|
||||
-dict system/collapseDict.collapseFaces
|
||||
|
||||
#\cp system/collapseDict.indirectPatchFaces system/collapseDict
|
||||
#runParallel collapseEdges $nProcs -collapseFaceSet indirectPatchFaces -latestTime
|
||||
#mv log.collapseEdges log.collapseFaceSet
|
||||
#runParallel -s faceSet \
|
||||
# collapseEdges -collapseFaceSet indirectPatchFaces -latestTime \
|
||||
# -dict system/collapseDict.indirectPatchFaces
|
||||
|
||||
runParallel checkMesh $nProcs -allTopology -allGeometry -latestTime
|
||||
runParallel checkMesh -allTopology -allGeometry -latestTime
|
||||
|
||||
# Copy the mesh into polyMesh and delete the latest time directory
|
||||
# Copy the mesh from the latest time folder into polyMesh and delete that
|
||||
# latest time folder
|
||||
latestTime=$(foamInfoExec -case processor0 -latestTime)
|
||||
if [ "$latestTime" != "constant" ] && [ -d processor0/$latestTime/polyMesh ]
|
||||
then
|
||||
@ -88,4 +83,4 @@ then
|
||||
fi
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -9,9 +9,6 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Set application name
|
||||
application=$(getApplication)
|
||||
|
||||
# Get number of processors to run on
|
||||
nProcs=$(getNumberOfProcessors)
|
||||
|
||||
\rm -rf 0
|
||||
|
||||
runApplication createBaffles -overwrite
|
||||
@ -27,14 +24,14 @@ runApplication createPatch -overwrite
|
||||
runApplication setFields
|
||||
|
||||
# Decompose
|
||||
\rm log.decomposePar
|
||||
runApplication decomposePar -force
|
||||
runApplication -s main \
|
||||
decomposePar -force
|
||||
|
||||
# Run
|
||||
runParallel $application $nProcs
|
||||
runParallel $application
|
||||
|
||||
# Reconstruct
|
||||
runApplication reconstructPar -noFunctionObjects
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Do nothing for now.
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -31,4 +31,4 @@ surfaceCheck stirrer_baffles.stl
|
||||
\mv stirrer_baffles_0.obj stirrer_baffles_plate.obj
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -19,4 +19,4 @@ rm -rf 0/
|
||||
|
||||
cleanCase
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -4,23 +4,28 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication -log log.surfaceOrient.cone surfaceOrient \
|
||||
constant/triSurface/cone.stl \
|
||||
-inside '(0 -0.5 0)' \
|
||||
constant/triSurface/cone_orient.stl
|
||||
runApplication -s cone \
|
||||
surfaceOrient constant/triSurface/cone.stl \
|
||||
-inside '(0 -0.5 0)' \
|
||||
constant/triSurface/cone_orient.stl
|
||||
|
||||
runApplication -log log.surfaceOrient.sphere surfaceOrient \
|
||||
constant/triSurface/sphere.stl \
|
||||
-inside '(0 -0.5 0)' \
|
||||
constant/triSurface/sphere_orient.stl
|
||||
runApplication -s sphere \
|
||||
surfaceOrient constant/triSurface/sphere.stl \
|
||||
-inside '(0 -0.5 0)' \
|
||||
constant/triSurface/sphere_orient.stl
|
||||
|
||||
runApplication surfaceBooleanFeatures intersection cone_orient.stl sphere_orient.stl
|
||||
runApplication \
|
||||
surfaceBooleanFeatures intersection \
|
||||
constant/triSurface/cone_orient.stl \
|
||||
constant/triSurface/sphere_orient.stl
|
||||
|
||||
runApplication foamyHexMesh
|
||||
|
||||
runApplication -log log.collapseFaceSet collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
|
||||
runApplication -s collapseFaceSet \
|
||||
collapseEdges -latestTime -collapseFaceSet indirectPatchFaces
|
||||
|
||||
runApplication collapseEdges -latestTime -collapseFaces
|
||||
runApplication -s collapseFaces \
|
||||
collapseEdges -latestTime -collapseFaces
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -51,8 +51,7 @@ boundaryField
|
||||
|
||||
letters
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
type noSlip;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -12,4 +12,4 @@ rm -rf MeshedSurface.obj > /dev/null 2>&1
|
||||
cleanCase
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -17,4 +17,4 @@ runApplication extrude2DMesh -overwrite polyMesh2D
|
||||
runApplication checkMesh -allGeometry -allTopology -constant -noZero
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -4,15 +4,12 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
# Get the number of processors to run on from system/decomposeParDict
|
||||
nProcs=$(getNumberOfProcessors)
|
||||
|
||||
cp system/controlDict.rhoCentralFoam system/controlDict
|
||||
cp -r 0.org 0
|
||||
|
||||
runApplication decomposePar
|
||||
runParallel rhoCentralFoam $nProcs
|
||||
runParallel rhoCentralFoam
|
||||
runApplication reconstructPar
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -13,4 +13,4 @@ rm -rf MeshedSurface.obj > /dev/null 2>&1
|
||||
cleanCase
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -10,4 +10,4 @@ runApplication extrude2DMesh -overwrite MeshedSurface
|
||||
runApplication checkMesh -allGeometry -allTopology -constant -noZero
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -13,4 +13,4 @@ rm -rf MeshedSurface*.obj > /dev/null 2>&1
|
||||
cleanCase
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -10,4 +10,4 @@ runApplication extrude2DMesh -overwrite polyMesh2D
|
||||
runApplication checkMesh -allGeometry -allTopology -constant -noZero
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -12,4 +12,4 @@ rm -rf 0
|
||||
# remove post-processing directory
|
||||
rm -rf postProcessing
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
11
tutorials/mesh/refineMesh/refineFieldDirs/Allclean
Executable file
11
tutorials/mesh/refineMesh/refineFieldDirs/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
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
51
tutorials/mesh/refineMesh/refineFieldDirs/Allrun
Executable file
51
tutorials/mesh/refineMesh/refineFieldDirs/Allrun
Executable file
@ -0,0 +1,51 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
wmake calcRadiusField
|
||||
wclean calcRadiusField
|
||||
|
||||
runApplication blockMesh
|
||||
|
||||
##### Procedure for special refinement over Z
|
||||
|
||||
# We need the 0 folder to exist for these steps
|
||||
mkdir 0
|
||||
|
||||
# Refine over Z, in 6 passes
|
||||
for index in 1 2 3 4 5 6; do
|
||||
|
||||
runApplication -s tier$index calcRadiusField
|
||||
|
||||
runApplication -s tier$index \
|
||||
topoSet -dict system/topoSetDict.tier$index
|
||||
|
||||
## foamToVTK -cellSet tier$index
|
||||
|
||||
runApplication -s tier$index \
|
||||
refineMesh -dict system/refineMeshDict.tier$index -overwrite
|
||||
|
||||
rm -r 0/*
|
||||
|
||||
done
|
||||
|
||||
# Refine over cylindrical coordinates, in 3 passes
|
||||
for index in 1 2 3; do
|
||||
|
||||
runApplication -s range$index calcRadiusField -calcDirections
|
||||
|
||||
runApplication -s range$index \
|
||||
topoSet -dict system/topoSetDict.range$index
|
||||
|
||||
## foamToVTK -cellSet tier$index
|
||||
|
||||
runApplication -s range$index \
|
||||
refineMesh -dict system/refineMeshDict.range$index -overwrite
|
||||
|
||||
rm -r 0/*
|
||||
|
||||
done
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
@ -0,0 +1,3 @@
|
||||
calcRadiusField.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/calcRadiusField
|
||||
@ -0,0 +1,5 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume
|
||||
@ -0,0 +1,164 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is derived from 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/>.
|
||||
|
||||
Description
|
||||
Write the volScalarField "radiusFieldXY" that has the distance to the
|
||||
origin over X,Y.
|
||||
|
||||
And also write the direction fields based on the option "-calcDirections".
|
||||
The resulting fields are:
|
||||
- radialDirection
|
||||
- angularDirection
|
||||
- heightDirection
|
||||
|
||||
Derived from:
|
||||
$FOAM_UTILITIES/postProcessing/miscellaneous/writeCellCentres
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "argList.H"
|
||||
#include "timeSelector.H"
|
||||
#include "Time.H"
|
||||
#include "fvMesh.H"
|
||||
#include "vectorIOField.H"
|
||||
#include "volFields.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
timeSelector::addOptions();
|
||||
#include "addRegionOption.H"
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"calcDirections",
|
||||
"calculate the direction fields as well"
|
||||
);
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
|
||||
instantList timeDirs = timeSelector::select0(runTime, args);
|
||||
const bool calcDirections = args.optionFound("calcDirections");
|
||||
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
runTime.setTime(timeDirs[timeI], timeI);
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << endl;
|
||||
|
||||
// Check for new mesh
|
||||
mesh.readUpdate();
|
||||
|
||||
Info<< "Writing radius field over X,Y in "
|
||||
<< runTime.timeName() << endl;
|
||||
|
||||
volScalarField radiusFieldXY
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"radiusFieldXY",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
sqrt
|
||||
(
|
||||
mesh.C().component(0)*mesh.C().component(0)
|
||||
+ mesh.C().component(1)*mesh.C().component(1)
|
||||
)
|
||||
);
|
||||
radiusFieldXY.write();
|
||||
|
||||
|
||||
if(calcDirections)
|
||||
{
|
||||
|
||||
vectorIOField radialDirection
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"radialDirection",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh.C()/magSqr(mesh.C())
|
||||
);
|
||||
radialDirection.replace(vector::Z, scalar(0.0));
|
||||
radialDirection /= sqrt(magSqr(radialDirection));
|
||||
radialDirection.write();
|
||||
|
||||
|
||||
const tensor transform2Tangencial
|
||||
(
|
||||
0, -1, 0,
|
||||
1, 0, 0,
|
||||
0, 0, 1
|
||||
);
|
||||
vectorIOField angularDirection
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"angularDirection",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
transform2Tangencial & mesh.C()
|
||||
);
|
||||
angularDirection.replace(vector::Z, scalar(0.0));
|
||||
angularDirection /= sqrt(magSqr(angularDirection));
|
||||
angularDirection.write();
|
||||
|
||||
vectorIOField heightDirection
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"heightDirection",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
radialDirection ^ angularDirection
|
||||
);
|
||||
heightDirection.write();
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "\nEnd\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,98 @@
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant/polyMesh";
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
/*
|
||||
|
||||
A ------------------------------- B
|
||||
/ H /
|
||||
C\ /
|
||||
\ /
|
||||
\ /
|
||||
\ / G
|
||||
\ /
|
||||
\ /
|
||||
\ /
|
||||
\/
|
||||
D
|
||||
*/
|
||||
|
||||
Ax 0.438912; Ay 0.000000;
|
||||
Bx 18.28800; By 0.000000;
|
||||
Cx 0.310358; Cy -0.310358;
|
||||
Dx 12.931569; Dy -12.931569;
|
||||
|
||||
Hx 0.405502; Hy -0.167964;
|
||||
Gx 16.895909; Gy -6.998515;
|
||||
|
||||
Z_DB_low -0.88706;
|
||||
Z_AC_low -1.07;
|
||||
Z_high 4.39208;
|
||||
|
||||
vertices
|
||||
(
|
||||
($Cx $Cy $Z_AC_low) //0
|
||||
($Dx $Dy $Z_DB_low) //1
|
||||
($Bx $By $Z_DB_low) //2
|
||||
($Ax $Ay $Z_AC_low) //3
|
||||
($Cx $Cy $Z_high) //4
|
||||
($Dx $Dy $Z_high) //5
|
||||
($Bx $By $Z_high) //6
|
||||
($Ax $Ay $Z_high) //7
|
||||
);
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (0 1 2 3 4 5 6 7) (47 10 4) simpleGrading (41.6669 1 1)
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
arc 0 3 ($Hx $Hy $Z_AC_low)
|
||||
arc 4 7 ($Hx $Hy $Z_high)
|
||||
|
||||
arc 1 2 ($Gx $Gy $Z_DB_low)
|
||||
arc 5 6 ($Gx $Gy $Z_high)
|
||||
);
|
||||
|
||||
patches
|
||||
(
|
||||
patch maxX
|
||||
(
|
||||
(1 2 6 5)
|
||||
)
|
||||
patch minX
|
||||
(
|
||||
(0 4 7 3)
|
||||
)
|
||||
patch maxY
|
||||
(
|
||||
(3 7 6 2)
|
||||
)
|
||||
patch minY
|
||||
(
|
||||
(1 5 4 0)
|
||||
)
|
||||
patch maxZ
|
||||
(
|
||||
(4 5 6 7)
|
||||
)
|
||||
patch minZ
|
||||
(
|
||||
(0 3 2 1)
|
||||
)
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
55
tutorials/mesh/refineMesh/refineFieldDirs/system/controlDict
Normal file
55
tutorials/mesh/refineMesh/refineFieldDirs/system/controlDict
Normal file
@ -0,0 +1,55 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object controlDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
application potentialFoam;
|
||||
|
||||
startFrom latestTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 1000;
|
||||
|
||||
deltaT 1.0;
|
||||
|
||||
writeControl runTime;
|
||||
|
||||
writeInterval 1;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
|
||||
//- Uncomment to have regular (every 2 hours of run time) restart files
|
||||
//secondaryWriteControl cpuTime; // runtime
|
||||
//secondaryWriteInterval 7200; // seconds
|
||||
//secondaryPurgeWrite 1; // keep all but last dump
|
||||
|
||||
|
||||
writeFormat binary;
|
||||
|
||||
writePrecision 8;
|
||||
|
||||
writeCompression uncompressed;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 8;
|
||||
|
||||
runTimeModifiable yes;
|
||||
|
||||
// ************************************************************************* //
|
||||
48
tutorials/mesh/refineMesh/refineFieldDirs/system/fvSchemes
Normal file
48
tutorials/mesh/refineMesh/refineFieldDirs/system/fvSchemes
Normal file
@ -0,0 +1,48 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSchemes;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
ddtSchemes
|
||||
{
|
||||
default none;
|
||||
}
|
||||
|
||||
gradSchemes
|
||||
{
|
||||
default none;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default none;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default none;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default none;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
23
tutorials/mesh/refineMesh/refineFieldDirs/system/fvSolution
Normal file
23
tutorials/mesh/refineMesh/refineFieldDirs/system/fvSolution
Normal file
@ -0,0 +1,23 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "system";
|
||||
object fvSolution;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
solvers
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,63 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object refineMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Cells to refine; name of cell set
|
||||
set range1;
|
||||
|
||||
// Type of coordinate system:
|
||||
// - global : coordinate system same for every cell. Usually aligned with
|
||||
// x,y,z axis. Specify in globalCoeffs section below.
|
||||
// - patchLocal : coordinate system different for every cell. Specify in
|
||||
// patchLocalCoeffs section below.
|
||||
//coordinateSystem global;
|
||||
//coordinateSystem patchLocal;
|
||||
coordinateSystem fieldBased;
|
||||
|
||||
// .. and its coefficients. x,y in this case. (normal direction is calculated
|
||||
// as tan1^tan2)
|
||||
globalCoeffs
|
||||
{
|
||||
tan1 (1 0 0);
|
||||
tan2 (0 1 0);
|
||||
}
|
||||
|
||||
patchLocalCoeffs
|
||||
{
|
||||
patch maxX; // Normal direction is facenormal of zero'th face of patch
|
||||
tan1 (1 -1 0);
|
||||
}
|
||||
|
||||
// List of directions to refine
|
||||
directions
|
||||
(
|
||||
radialDirection
|
||||
angularDirection
|
||||
heightDirection
|
||||
);
|
||||
|
||||
// Whether to use hex topology. This will
|
||||
// - if patchLocal: all cells on selected patch should be hex
|
||||
// - split all hexes in 2x2x2 through the middle of edges.
|
||||
useHexTopology false;
|
||||
|
||||
// Cut purely geometric (will cut hexes through vertices) or take topology
|
||||
// into account. Incompatible with useHexTopology
|
||||
geometricCut true;
|
||||
|
||||
// Write meshes from intermediate steps
|
||||
writeMesh false;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,63 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object refineMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Cells to refine; name of cell set
|
||||
set range1;
|
||||
|
||||
// Type of coordinate system:
|
||||
// - global : coordinate system same for every cell. Usually aligned with
|
||||
// x,y,z axis. Specify in globalCoeffs section below.
|
||||
// - patchLocal : coordinate system different for every cell. Specify in
|
||||
// patchLocalCoeffs section below.
|
||||
//coordinateSystem global;
|
||||
//coordinateSystem patchLocal;
|
||||
coordinateSystem fieldBased;
|
||||
|
||||
// .. and its coefficients. x,y in this case. (normal direction is calculated
|
||||
// as tan1^tan2)
|
||||
globalCoeffs
|
||||
{
|
||||
tan1 (1 0 0);
|
||||
tan2 (0 1 0);
|
||||
}
|
||||
|
||||
patchLocalCoeffs
|
||||
{
|
||||
patch maxX; // Normal direction is facenormal of zero'th face of patch
|
||||
tan1 (1 -1 0);
|
||||
}
|
||||
|
||||
// List of directions to refine
|
||||
directions
|
||||
(
|
||||
radialDirection
|
||||
angularDirection
|
||||
heightDirection
|
||||
);
|
||||
|
||||
// Whether to use hex topology. This will
|
||||
// - if patchLocal: all cells on selected patch should be hex
|
||||
// - split all hexes in 2x2x2 through the middle of edges.
|
||||
useHexTopology false;
|
||||
|
||||
// Cut purely geometric (will cut hexes through vertices) or take topology
|
||||
// into account. Incompatible with useHexTopology
|
||||
geometricCut true;
|
||||
|
||||
// Write meshes from intermediate steps
|
||||
writeMesh false;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,63 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object refineMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Cells to refine; name of cell set
|
||||
set range1;
|
||||
|
||||
// Type of coordinate system:
|
||||
// - global : coordinate system same for every cell. Usually aligned with
|
||||
// x,y,z axis. Specify in globalCoeffs section below.
|
||||
// - patchLocal : coordinate system different for every cell. Specify in
|
||||
// patchLocalCoeffs section below.
|
||||
//coordinateSystem global;
|
||||
//coordinateSystem patchLocal;
|
||||
coordinateSystem fieldBased;
|
||||
|
||||
// .. and its coefficients. x,y in this case. (normal direction is calculated
|
||||
// as tan1^tan2)
|
||||
globalCoeffs
|
||||
{
|
||||
tan1 (1 0 0);
|
||||
tan2 (0 1 0);
|
||||
}
|
||||
|
||||
patchLocalCoeffs
|
||||
{
|
||||
patch maxX; // Normal direction is facenormal of zero'th face of patch
|
||||
tan1 (1 -1 0);
|
||||
}
|
||||
|
||||
// List of directions to refine
|
||||
directions
|
||||
(
|
||||
radialDirection
|
||||
angularDirection
|
||||
heightDirection
|
||||
);
|
||||
|
||||
// Whether to use hex topology. This will
|
||||
// - if patchLocal: all cells on selected patch should be hex
|
||||
// - split all hexes in 2x2x2 through the middle of edges.
|
||||
useHexTopology false;
|
||||
|
||||
// Cut purely geometric (will cut hexes through vertices) or take topology
|
||||
// into account. Incompatible with useHexTopology
|
||||
geometricCut true;
|
||||
|
||||
// Write meshes from intermediate steps
|
||||
writeMesh false;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object refineMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Cells to refine; name of cell set
|
||||
set tier1;
|
||||
|
||||
// Type of coordinate system:
|
||||
// - global : coordinate system same for every cell. Usually aligned with
|
||||
// x,y,z axis. Specify in globalCoeffs section below.
|
||||
// - patchLocal : coordinate system different for every cell. Specify in
|
||||
// patchLocalCoeffs section below.
|
||||
coordinateSystem global;
|
||||
//coordinateSystem patchLocal;
|
||||
|
||||
// .. and its coefficients. x,y in this case. (normal direction is calculated
|
||||
// as tan1^tan2)
|
||||
globalCoeffs
|
||||
{
|
||||
tan1 (1 0 0);
|
||||
tan2 (0 1 0);
|
||||
}
|
||||
|
||||
patchLocalCoeffs
|
||||
{
|
||||
patch outside; // Normal direction is facenormal of zero'th face of patch
|
||||
tan1 (1 0 0);
|
||||
}
|
||||
|
||||
// List of directions to refine
|
||||
directions
|
||||
(
|
||||
normal
|
||||
);
|
||||
|
||||
// Whether to use hex topology. This will
|
||||
// - if patchLocal: all cells on selected patch should be hex
|
||||
// - split all hexes in 2x2x2 through the middle of edges.
|
||||
useHexTopology false;
|
||||
|
||||
// Cut purely geometric (will cut hexes through vertices) or take topology
|
||||
// into account. Incompatible with useHexTopology
|
||||
geometricCut true;
|
||||
|
||||
// Write meshes from intermediate steps
|
||||
writeMesh false;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object refineMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Cells to refine; name of cell set
|
||||
set tier2;
|
||||
|
||||
// Type of coordinate system:
|
||||
// - global : coordinate system same for every cell. Usually aligned with
|
||||
// x,y,z axis. Specify in globalCoeffs section below.
|
||||
// - patchLocal : coordinate system different for every cell. Specify in
|
||||
// patchLocalCoeffs section below.
|
||||
coordinateSystem global;
|
||||
//coordinateSystem patchLocal;
|
||||
|
||||
// .. and its coefficients. x,y in this case. (normal direction is calculated
|
||||
// as tan1^tan2)
|
||||
globalCoeffs
|
||||
{
|
||||
tan1 (1 0 0);
|
||||
tan2 (0 1 0);
|
||||
}
|
||||
|
||||
patchLocalCoeffs
|
||||
{
|
||||
patch outside; // Normal direction is facenormal of zero'th face of patch
|
||||
tan1 (1 0 0);
|
||||
}
|
||||
|
||||
// List of directions to refine
|
||||
directions
|
||||
(
|
||||
normal
|
||||
);
|
||||
|
||||
// Whether to use hex topology. This will
|
||||
// - if patchLocal: all cells on selected patch should be hex
|
||||
// - split all hexes in 2x2x2 through the middle of edges.
|
||||
useHexTopology false;
|
||||
|
||||
// Cut purely geometric (will cut hexes through vertices) or take topology
|
||||
// into account. Incompatible with useHexTopology
|
||||
geometricCut true;
|
||||
|
||||
// Write meshes from intermediate steps
|
||||
writeMesh false;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object refineMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Cells to refine; name of cell set
|
||||
set tier3;
|
||||
|
||||
// Type of coordinate system:
|
||||
// - global : coordinate system same for every cell. Usually aligned with
|
||||
// x,y,z axis. Specify in globalCoeffs section below.
|
||||
// - patchLocal : coordinate system different for every cell. Specify in
|
||||
// patchLocalCoeffs section below.
|
||||
coordinateSystem global;
|
||||
//coordinateSystem patchLocal;
|
||||
|
||||
// .. and its coefficients. x,y in this case. (normal direction is calculated
|
||||
// as tan1^tan2)
|
||||
globalCoeffs
|
||||
{
|
||||
tan1 (1 0 0);
|
||||
tan2 (0 1 0);
|
||||
}
|
||||
|
||||
patchLocalCoeffs
|
||||
{
|
||||
patch outside; // Normal direction is facenormal of zero'th face of patch
|
||||
tan1 (1 0 0);
|
||||
}
|
||||
|
||||
// List of directions to refine
|
||||
directions
|
||||
(
|
||||
normal
|
||||
);
|
||||
|
||||
// Whether to use hex topology. This will
|
||||
// - if patchLocal: all cells on selected patch should be hex
|
||||
// - split all hexes in 2x2x2 through the middle of edges.
|
||||
useHexTopology false;
|
||||
|
||||
// Cut purely geometric (will cut hexes through vertices) or take topology
|
||||
// into account. Incompatible with useHexTopology
|
||||
geometricCut true;
|
||||
|
||||
// Write meshes from intermediate steps
|
||||
writeMesh false;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object refineMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Cells to refine; name of cell set
|
||||
set tier4;
|
||||
|
||||
// Type of coordinate system:
|
||||
// - global : coordinate system same for every cell. Usually aligned with
|
||||
// x,y,z axis. Specify in globalCoeffs section below.
|
||||
// - patchLocal : coordinate system different for every cell. Specify in
|
||||
// patchLocalCoeffs section below.
|
||||
coordinateSystem global;
|
||||
//coordinateSystem patchLocal;
|
||||
|
||||
// .. and its coefficients. x,y in this case. (normal direction is calculated
|
||||
// as tan1^tan2)
|
||||
globalCoeffs
|
||||
{
|
||||
tan1 (1 0 0);
|
||||
tan2 (0 1 0);
|
||||
}
|
||||
|
||||
patchLocalCoeffs
|
||||
{
|
||||
patch outside; // Normal direction is facenormal of zero'th face of patch
|
||||
tan1 (1 0 0);
|
||||
}
|
||||
|
||||
// List of directions to refine
|
||||
directions
|
||||
(
|
||||
normal
|
||||
);
|
||||
|
||||
// Whether to use hex topology. This will
|
||||
// - if patchLocal: all cells on selected patch should be hex
|
||||
// - split all hexes in 2x2x2 through the middle of edges.
|
||||
useHexTopology false;
|
||||
|
||||
// Cut purely geometric (will cut hexes through vertices) or take topology
|
||||
// into account. Incompatible with useHexTopology
|
||||
geometricCut true;
|
||||
|
||||
// Write meshes from intermediate steps
|
||||
writeMesh false;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object refineMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Cells to refine; name of cell set
|
||||
set tier5;
|
||||
|
||||
// Type of coordinate system:
|
||||
// - global : coordinate system same for every cell. Usually aligned with
|
||||
// x,y,z axis. Specify in globalCoeffs section below.
|
||||
// - patchLocal : coordinate system different for every cell. Specify in
|
||||
// patchLocalCoeffs section below.
|
||||
coordinateSystem global;
|
||||
//coordinateSystem patchLocal;
|
||||
|
||||
// .. and its coefficients. x,y in this case. (normal direction is calculated
|
||||
// as tan1^tan2)
|
||||
globalCoeffs
|
||||
{
|
||||
tan1 (1 0 0);
|
||||
tan2 (0 1 0);
|
||||
}
|
||||
|
||||
patchLocalCoeffs
|
||||
{
|
||||
patch outside; // Normal direction is facenormal of zero'th face of patch
|
||||
tan1 (1 0 0);
|
||||
}
|
||||
|
||||
// List of directions to refine
|
||||
directions
|
||||
(
|
||||
normal
|
||||
);
|
||||
|
||||
// Whether to use hex topology. This will
|
||||
// - if patchLocal: all cells on selected patch should be hex
|
||||
// - split all hexes in 2x2x2 through the middle of edges.
|
||||
useHexTopology false;
|
||||
|
||||
// Cut purely geometric (will cut hexes through vertices) or take topology
|
||||
// into account. Incompatible with useHexTopology
|
||||
geometricCut true;
|
||||
|
||||
// Write meshes from intermediate steps
|
||||
writeMesh false;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,60 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object refineMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Cells to refine; name of cell set
|
||||
set tier6;
|
||||
|
||||
// Type of coordinate system:
|
||||
// - global : coordinate system same for every cell. Usually aligned with
|
||||
// x,y,z axis. Specify in globalCoeffs section below.
|
||||
// - patchLocal : coordinate system different for every cell. Specify in
|
||||
// patchLocalCoeffs section below.
|
||||
coordinateSystem global;
|
||||
//coordinateSystem patchLocal;
|
||||
|
||||
// .. and its coefficients. x,y in this case. (normal direction is calculated
|
||||
// as tan1^tan2)
|
||||
globalCoeffs
|
||||
{
|
||||
tan1 (1 0 0);
|
||||
tan2 (0 1 0);
|
||||
}
|
||||
|
||||
patchLocalCoeffs
|
||||
{
|
||||
patch outside; // Normal direction is facenormal of zero'th face of patch
|
||||
tan1 (1 0 0);
|
||||
}
|
||||
|
||||
// List of directions to refine
|
||||
directions
|
||||
(
|
||||
normal
|
||||
);
|
||||
|
||||
// Whether to use hex topology. This will
|
||||
// - if patchLocal: all cells on selected patch should be hex
|
||||
// - split all hexes in 2x2x2 through the middle of edges.
|
||||
useHexTopology false;
|
||||
|
||||
// Cut purely geometric (will cut hexes through vertices) or take topology
|
||||
// into account. Incompatible with useHexTopology
|
||||
geometricCut true;
|
||||
|
||||
// Write meshes from intermediate steps
|
||||
writeMesh false;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,34 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name range1;
|
||||
type cellSet;
|
||||
action new;
|
||||
source fieldToCell;
|
||||
sourceInfo
|
||||
{
|
||||
fieldName radiusFieldXY;
|
||||
min 13.36;
|
||||
max 18.47;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,34 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name range1;
|
||||
type cellSet;
|
||||
action new;
|
||||
source fieldToCell;
|
||||
sourceInfo
|
||||
{
|
||||
fieldName radiusFieldXY;
|
||||
min 7.00;
|
||||
max 18.47;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,34 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name range1;
|
||||
type cellSet;
|
||||
action new;
|
||||
source fieldToCell;
|
||||
sourceInfo
|
||||
{
|
||||
fieldName radiusFieldXY;
|
||||
min 3.67;
|
||||
max 18.47;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,34 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name tier1;
|
||||
type cellSet;
|
||||
action new;
|
||||
source fieldToCell;
|
||||
sourceInfo
|
||||
{
|
||||
fieldName radiusFieldXY;
|
||||
min 0.0;
|
||||
max 0.64;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,34 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name tier2;
|
||||
type cellSet;
|
||||
action new;
|
||||
source fieldToCell;
|
||||
sourceInfo
|
||||
{
|
||||
fieldName radiusFieldXY;
|
||||
min 0.0;
|
||||
max 1.03;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,34 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name tier3;
|
||||
type cellSet;
|
||||
action new;
|
||||
source fieldToCell;
|
||||
sourceInfo
|
||||
{
|
||||
fieldName radiusFieldXY;
|
||||
min 0.0;
|
||||
max 1.94;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,34 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name tier4;
|
||||
type cellSet;
|
||||
action new;
|
||||
source fieldToCell;
|
||||
sourceInfo
|
||||
{
|
||||
fieldName radiusFieldXY;
|
||||
min 0.0;
|
||||
max 3.67;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,34 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name tier5;
|
||||
type cellSet;
|
||||
action new;
|
||||
source fieldToCell;
|
||||
sourceInfo
|
||||
{
|
||||
fieldName radiusFieldXY;
|
||||
min 0.0;
|
||||
max 7.00;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,34 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.0 |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object topoSetDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
actions
|
||||
(
|
||||
{
|
||||
name tier6;
|
||||
type cellSet;
|
||||
action new;
|
||||
source fieldToCell;
|
||||
sourceInfo
|
||||
{
|
||||
fieldName radiusFieldXY;
|
||||
min 0.0;
|
||||
max 13.36;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
(
|
||||
cd flange || exit
|
||||
./Allrun
|
||||
./Allrun $*
|
||||
)
|
||||
|
||||
(
|
||||
@ -24,4 +24,4 @@ exit 0
|
||||
|
||||
# This dummy Allrun script avoids meshing these cases twice.
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -15,4 +15,4 @@ runApplication checkMesh
|
||||
|
||||
runApplication simpleFoam
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -15,4 +15,4 @@ rm -f constant/polyMesh/boundary
|
||||
|
||||
cleanCase
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -12,4 +12,4 @@ runParallel snappyHexMesh 8 -overwrite
|
||||
|
||||
runApplication reconstructParMesh -constant
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user