Merged Overset Mesh tutorials from separate repository

This commit is contained in:
Vuko Vukcevic 2018-02-28 13:32:00 +01:00
parent 76b48b2fb4
commit 4c1b53f313
457 changed files with 395826 additions and 0 deletions

6
tutorials/overset/Allclean Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
( cd simpleTests ; ./Allclean )
( cd flowTests ; ./Allclean )
( cd movingMeshTests ; ./Allclean )
( cd freeSurfaceTests ; ./Allclean )

6
tutorials/overset/Allrun Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
( cd simpleTests ; ./Allrun )
( cd flowTests ; ./Allrun )
( cd movingMeshTests ; ./Allrun )
( cd freeSurfaceTests ; ./Allrun )

View file

@ -0,0 +1,7 @@
#!/bin/sh
( cd channelSimpleOverlapicoOversetFoam ; ./Allclean )
( cd cylinderInChannelicoOversetFoam ; ./Allclean )
( cd staticCylinderSheddingTest ; ./Allclean )
( cd navyCylinderSheddingTest ; ./Allclean )

View file

@ -0,0 +1,7 @@
#!/bin/sh
( cd channelSimpleOverlapicoOversetFoam ; ./Allrun )
( cd cylinderInChannelicoOversetFoam ; ./Allrun )
( cd staticCylinderSheddingTest ; ./Allrun )
( cd navyCylinderSheddingTest ; ./Allrun )

View file

@ -0,0 +1,56 @@
# git-ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# editor and misc backup files - anywhere
*~
.*~
*.bak
*.bak[0-9][0-9]
*.orig
*.orig[0-9][0-9]
\#*\#
# file-browser settings - anywhere
.directory
# data files
*.dat
# CVS recovered versions - anywhere
.#*
# SVN directories - anywhere
.svn/
# OpenFOAM results
[0-9]*/
!/0/
processor*
*/polyMesh/*
!*/polyMesh/blockMeshDict
cellToRegion*
log*
VTK
# packages - anywhere
*.tar.bz2
*.tar.gz
*.tar
*.tgz
*.gtgz
# Pictures and movies
*.png
*.jpg
*.jpeg
*.bmp
*.png
*.avi
*.mp4
*.mpg
#end-of-file

View file

@ -0,0 +1,67 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 0;
boundaryField
{
oversetFaces
{
type overset;
value uniform 0;
coupledFringe yes;
setHoleCellValue yes;
holeCellValue 0;
}
left
{
type fixedValue;
value uniform 1;
}
leftEnd
{
type zeroGradient;
}
rightStart
{
type zeroGradient;
}
right
{
type zeroGradient;
}
top
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,67 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
oversetFaces
{
type overset;
value uniform (0 0 0);
coupledFringe yes;
setHoleCellValue yes;
holeCellValue (0 0 0);
}
left
{
type fixedValue;
value uniform (1 0 0);
}
leftEnd
{
type zeroGradient;
}
rightStart
{
type zeroGradient;
}
right
{
type zeroGradient;
}
top
{
type fixedValue;
value uniform (0 0 0);
}
bottom
{
type fixedValue;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,69 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
oversetFaces
{
type overset;
value uniform 0;
coupledFringe yes;
conservativeCorrection yes;
setHoleCellValue yes;
holeCellValue 0;
}
left
{
type zeroGradient;
}
leftEnd
{
type zeroGradient;
}
rightStart
{
type zeroGradient;
}
right
{
// type zeroGradient;
type fixedValue;
value uniform 0;
}
top
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,9 @@
#!/bin/sh
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
\rm -rf constant/polyMesh/
\rm -rf 0
cp -r save 0

View file

@ -0,0 +1,13 @@
#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application="icoOversetFoam"
mkdir constant/polyMesh
\cp -f blockMeshDict constant/polyMesh/blockMeshDict
runApplication blockMesh
\cp -f boundary constant/polyMesh/boundary
runApplication $application

View file

@ -0,0 +1,93 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 0.1;
vertices
(
(0 0 0)
(6.1 0 0)
(6.1 5 0)
(0 5 0)
(0 0 1)
(6.1 0 1)
(6.1 5 1)
( 0 5 1)
(3.9 0 0)
(10 0 0)
(10 5 0)
(3.9 5 0)
(3.9 0 1)
(10 0 1)
(10 5 1)
(3.9 5 1)
);
blocks
(
hex (0 1 2 3 4 5 6 7) left (6 5 1) simpleGrading (1 1 1)
hex (8 9 10 11 12 13 14 15) right (6 5 1) simpleGrading (1 1 1)
);
edges
(
);
patches
(
patch left
(
(0 4 7 3)
)
patch leftEnd
(
(2 6 5 1)
)
patch rightStart
(
(8 12 15 11)
)
patch right
(
(9 10 14 13)
)
wall top
(
(3 7 6 2)
(11 15 14 10)
)
wall bottom
(
(1 5 4 0)
(9 13 12 8)
)
empty frontAndBack
(
(0 3 2 1)
(4 5 6 7)
(8 11 10 9)
(12 13 14 15)
)
);
mergePatchPairs
(
);
// ************************************************************************* //

View file

@ -0,0 +1,70 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
8
(
oversetFaces
{
type overset;
nFaces 0;
startFace 98;
}
left
{
type patch;
nFaces 5;
startFace 98;
}
leftEnd
{
type patch;
nFaces 5;
startFace 103;
}
rightStart
{
type patch;
nFaces 5;
startFace 108;
}
right
{
type patch;
nFaces 5;
startFace 113;
}
top
{
type wall;
nFaces 12;
startFace 118;
}
bottom
{
type wall;
nFaces 12;
startFace 130;
}
frontAndBack
{
type empty;
nFaces 120;
startFace 142;
}
)
// ************************************************************************* //

View file

@ -0,0 +1,57 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object oversetMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
interpolation
{
interpolationSchemes (injection);
default injection;
}
holePatches ();
regions
(
left
{
index 0;
// Donor regions
donorRegions ( right );
fringe
{
type faceCells;
patches ( leftEnd );
}
}
right
{
index 1;
donorRegions ( left );
fringe
{
type faceCells;
patches ( rightStart );
}
}
);
// ************************************************************************* //

View file

@ -0,0 +1,19 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
nu nu [0 2 -1 0 0 0 0] 1;
// ************************************************************************* //

View file

@ -0,0 +1,67 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 1 0 0 0];
internalField uniform 0;
boundaryField
{
oversetFaces
{
type overset;
value uniform 0;
coupledFringe yes;
setHoleCellValue yes;
holeCellValue 0;
}
left
{
type fixedValue;
value uniform 1;
}
leftEnd
{
type zeroGradient;
}
rightStart
{
type zeroGradient;
}
right
{
type zeroGradient;
}
top
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,67 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
oversetFaces
{
type overset;
value uniform (0 0 0);
coupledFringe yes;
setHoleCellValue yes;
holeCellValue (0 0 0);
}
left
{
type fixedValue;
value uniform (1 0 0);
}
leftEnd
{
type zeroGradient;
}
rightStart
{
type zeroGradient;
}
right
{
type zeroGradient;
}
top
{
type fixedValue;
value uniform (0 0 0);
}
bottom
{
type fixedValue;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,69 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
oversetFaces
{
type overset;
value uniform 0;
coupledFringe yes;
conservativeCorrection yes;
setHoleCellValue yes;
holeCellValue 0;
}
left
{
type zeroGradient;
}
leftEnd
{
type zeroGradient;
}
rightStart
{
type zeroGradient;
}
right
{
// type zeroGradient;
type fixedValue;
value uniform 0;
}
top
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,59 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoOversetFoam;
startFrom startTime;
// startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 2;
deltaT 0.1;
writeControl timeStep;
writeInterval 1;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
libs
(
"libfoam.so"
"libmeshTools.so"
"libsurfMesh.so"
"libsampling.so"
"libdynamicMesh.so"
"liboversetMesh.so"
);
// ************************************************************************* //

View file

@ -0,0 +1,49 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss upwind;
}
laplacianSchemes
{
default Gauss linear uncorrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
// ************************************************************************* //

View file

@ -0,0 +1,71 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
// solver smoothSolver;
// smoother GaussSeidel;
// nSweeps 1;
solver CG;
// solver BiCGStab;
// preconditioner DILU;
preconditioner diagonal;
// solver CG;
// preconditioner DIC;
minIter 1;
maxIter 1000;
tolerance 1e-10;
relTol 0;
}
U
{
solver smoothSolver;
smoother GaussSeidel;
nSweeps 1;
// solver BiCGStab;
// preconditioner DILU;
minIter 1;
maxIter 1000;
tolerance 1e-7;
relTol 0;
}
}
SIMPLE
{
pRefCell 0;
pRefValue 0;
}
PISO
{
pRefCell 0;
pRefValue 0;
nCorrectors 4;
}
// ************************************************************************* //

View file

@ -0,0 +1,56 @@
# git-ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# editor and misc backup files - anywhere
*~
.*~
*.bak
*.bak[0-9][0-9]
*.orig
*.orig[0-9][0-9]
\#*\#
# file-browser settings - anywhere
.directory
# data files
*.dat
# CVS recovered versions - anywhere
.#*
# SVN directories - anywhere
.svn/
# OpenFOAM results
[0-9]*/
!/0/
processor*
*/polyMesh/*
!*/polyMesh/blockMeshDict
cellToRegion*
log*
VTK
# packages - anywhere
*.tar.bz2
*.tar.gz
*.tar
*.tgz
*.gtgz
# Pictures and movies
*.png
*.jpg
*.jpeg
*.bmp
*.png
*.avi
*.mp4
*.mpg
#end-of-file

View file

@ -0,0 +1,68 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
oversetFaces
{
type overset;
value uniform (0 0 0);
coupledFringe yes;
setHoleCellValue yes;
holeCellValue (0 0 0);
}
in
{
type fixedValue;
value uniform (1 0 0);
}
out
{
type zeroGradient;
}
top
{
type fixedValue;
value uniform (0 0 0);
}
bottom
{
type fixedValue;
value uniform (0 0 0);
}
cylinder
{
type fixedValue;
value uniform (0 0 0);
}
outerCylinder
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,69 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
oversetFaces
{
type overset;
value uniform 0;
coupledFringe yes;
conservativeCorrection yes;
setHoleCellValue yes;
holeCellValue 0;
}
in
{
type zeroGradient;
}
out
{
// type zeroGradient;
type fixedValue;
value uniform 0;
}
top
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
cylinder
{
type zeroGradient;
}
outerCylinder
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,10 @@
#!/bin/sh
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
\rm -f .setSet constant/cellDecomposition constant/cellDecomposition.gz
\rm -rf constant/polyMesh/
\rm -rf 0 holeTri*
cp -r save 0

View file

@ -0,0 +1,19 @@
#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application="icoOversetFoam"
mkdir constant/polyMesh
\cp -f blockMeshDict constant/polyMesh/blockMeshDict
runApplication blockMesh
\cp -f boundary constant/polyMesh/boundary
runApplication setSet -batch setBatch.batch
\rm -f constant/polyMesh/sets/*_old constant/polyMesh/sets/*_old.gz
runApplication $application
#runApplication decomposePar -cellDist
#runApplication decomposeSets -writeEmptySets
#runParallel $application 3

View file

@ -0,0 +1,148 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 0.1;
vertices
(
// Background mesh
(-10 -5 0)
(20 -5 0)
(20 5.01 0)
(-10 5.01 0)
(-10 -5 0.5)
(20 -5 0.5)
(20 5.01 0.5) // Note: point in cell issue
(-10 5.01 0.5)
// Cylinder, back
( 0 -2.5 0)
( 2.5 0 0)
( 0 2.5 0)
(-2.5 0 0)
( 0 -4 0)
( 4 0 0)
( 0 4 0)
(-4 0 0)
// Cylinder, front
( 0 -2.5 0.5)
( 2.5 0 0.5)
( 0 2.5 0.5)
(-2.5 0 0.5)
( 0 -4 0.5)
( 4 0 0.5)
( 0 4 0.5)
(-4 0 0.5)
);
blocks
(
// Background
hex (0 1 2 3 4 5 6 7) background (75 25 1) simpleGrading (1 1 1)
// Front
hex (8 12 13 9 16 20 21 17) front (10 20 1) simpleGrading (1 1 1)
hex (9 13 14 10 17 21 22 18) front (10 20 1) simpleGrading (1 1 1)
hex (10 14 15 11 18 22 23 19) front (10 20 1) simpleGrading (1 1 1)
hex (11 15 12 8 19 23 20 16) front (10 20 1) simpleGrading (1 1 1)
);
edges
(
// Inner arc, back
arc 8 9 ( 1.767767 -1.767767 0)
arc 9 10 ( 1.767767 1.767767 0)
arc 10 11 (-1.767767 1.767767 0)
arc 11 8 (-1.767767 -1.767767 0)
// Inner arc, front
arc 16 17 ( 1.767767 -1.767767 0.5)
arc 17 18 ( 1.767767 1.767767 0.5)
arc 18 19 (-1.767767 1.767767 0.5)
arc 19 16 (-1.767767 -1.767767 0.5)
// Outer arc, back
arc 12 13 ( 2.828427 -2.828427 0)
arc 13 14 ( 2.828427 2.828427 0)
arc 14 15 (-2.828427 2.828427 0)
arc 15 12 (-2.828427 -2.828427 0)
// Outer arc, front
arc 20 21 ( 2.828427 -2.828427 0.5)
arc 21 22 ( 2.828427 2.828427 0.5)
arc 22 23 (-2.828427 2.828427 0.5)
arc 23 20 (-2.828427 -2.828427 0.5)
);
patches
(
patch in
(
(0 4 7 3)
)
patch out
(
(2 6 5 1)
)
wall top
(
(3 7 6 2)
)
wall bottom
(
(1 5 4 0)
)
wall cylinder
(
(8 16 17 9)
(9 17 18 10)
(10 18 19 11)
(11 19 16 8)
)
patch outerCylinder
(
(12 13 21 20)
(13 14 22 21)
(14 15 23 22)
(15 12 20 23)
)
empty frontAndBack
(
(0 3 2 1)
(4 5 6 7)
(8 9 13 12)
(9 10 14 13)
(10 11 15 14)
(11 8 12 15)
(16 20 21 17)
(17 21 22 18)
(18 22 23 19)
(19 23 20 16)
)
);
mergePatchPairs
(
);
// ************************************************************************* //

View file

@ -0,0 +1,70 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format binary;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
8
(
oversetFaces
{
type overset;
nFaces 0;
startFace 5170;
}
in
{
type patch;
nFaces 25;
startFace 5170;
}
out
{
type patch;
nFaces 25;
startFace 5195;
}
top
{
type wall;
nFaces 75;
startFace 5220;
}
bottom
{
type wall;
nFaces 75;
startFace 5295;
}
cylinder
{
type wall;
nFaces 80;
startFace 5370;
}
outerCylinder
{
type patch;
nFaces 80;
startFace 5450;
}
frontAndBack
{
type empty;
nFaces 5350;
startFace 5530;
}
)
// ************************************************************************* //

View file

@ -0,0 +1,71 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object oversetMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
interpolation
{
interpolationSchemes (injection);
default injection;
}
// Names or patches that determine hole cells
holePatches ( cylinder );
regions
(
background
{
// Donor regions
donorRegions ( front );
// fringe
// {
// type manual;
// holes "backHole";
// acceptors "backFringe";
// }
fringe
{
type overlap;
suitablePairFraction 0.5;
cacheFringe no;
donorSuitability
{
type noSuitability;
threshold 1;
}
}
}
front
{
donorRegions ( background );
fringe
{
type faceCells;
patches ( outerCylinder );
}
}
);
// ************************************************************************* //

View file

@ -0,0 +1,22 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
nu nu [0 2 -1 0 0 0 0] 0.001;
// ************************************************************************* //

View file

@ -0,0 +1,68 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
oversetFaces
{
type overset;
value uniform (0 0 0);
coupledFringe yes;
setHoleCellValue yes;
holeCellValue (0 0 0);
}
in
{
type fixedValue;
value uniform (1 0 0);
}
out
{
type zeroGradient;
}
top
{
type fixedValue;
value uniform (0 0 0);
}
bottom
{
type fixedValue;
value uniform (0 0 0);
}
cylinder
{
type fixedValue;
value uniform (0 0 0);
}
outerCylinder
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,69 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
oversetFaces
{
type overset;
value uniform 0;
coupledFringe yes;
conservativeCorrection yes;
setHoleCellValue yes;
holeCellValue 0;
}
in
{
type zeroGradient;
}
out
{
// type zeroGradient;
type fixedValue;
value uniform 0;
}
top
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
cylinder
{
type zeroGradient;
}
outerCylinder
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,8 @@
cellSet backFringe new cellToCell background
cellSet backFringe subset sphereToCell (0 0 0) 0.36
cellSet backHole new cellToCell background
cellSet backHole subset sphereToCell (0 0 0) 0.3
cellSet backFringe delete cellToCell backHole
cellSet empty new labelToCell 0 ()
quit

View file

@ -0,0 +1,59 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoOversetFoam;
// startFrom startTime;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 30;
deltaT 0.01;
writeControl runTime;
writeInterval 0.2;
purgeWrite 0;
writeFormat ascii;
writePrecision 10;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
libs
(
"libfoam.so"
"libmeshTools.so"
"libsurfMesh.so"
"libsampling.so"
"libdynamicMesh.so"
"liboversetMesh.so"
);
// ************************************************************************* //

View file

@ -0,0 +1,50 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 3;
method simple;
simpleCoeffs
{
n (1 3 1);
delta 0.001;
}
hierarchicalCoeffs
{
n (1 1 1);
delta 0.001;
order xyz;
}
metisCoeffs
{
processorWeights 4(1 1 1 1);
}
manualCoeffs
{
dataFile "cellDecomposition";
}
distributed no;
roots
(
);
// ************************************************************************* //

View file

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss upwind;
}
laplacianSchemes
{
default Gauss linear uncorrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
// ************************************************************************* //

View file

@ -0,0 +1,70 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
// solver smoothSolver;
// smoother GaussSeidel;
// nSweeps 1;
solver BiCGStab;
preconditioner DILU;
// solver CG;
// preconditioner DIC;
minIter 1;
maxIter 1000;
tolerance 1e-10;
relTol 0;
}
U
{
solver smoothSolver;
smoother GaussSeidel;
nSweeps 1;
// solver BiCGStab;
// preconditioner DILU;
minIter 1;
maxIter 1000;
tolerance 1e-7;
relTol 0;
}
}
SIMPLE
{
pRefCell 0;
pRefValue 0;
}
PISO
{
pRefCell 0;
pRefValue 0;
nCorrectors 4;
}
// ************************************************************************* //

View file

@ -0,0 +1,5 @@
#!/bin/sh
( cd bodyFittedCylinderCircular ; ./Allclean )
( cd oversetCylinderTwoLevels ; ./Allclean )
( cd oversetCylinderThreeLevels ; ./Allclean )

View file

@ -0,0 +1,5 @@
#!/bin/sh
( cd bodyFittedCylinderCircular ; ./Allrun )
( cd oversetCylinderTwoLevels ; ./Allrun )
( cd oversetCylinderThreeLevels ; ./Allrun )

View file

@ -0,0 +1,56 @@
# git-ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# editor and misc backup files - anywhere
*~
.*~
*.bak
*.bak[0-9][0-9]
*.orig
*.orig[0-9][0-9]
\#*\#
# file-browser settings - anywhere
.directory
# data files
*.dat
# CVS recovered versions - anywhere
.#*
# SVN directories - anywhere
.svn/
# OpenFOAM results
[0-9]*/
!/0/
processor*
*/polyMesh/*
!*/polyMesh/blockMeshDict
cellToRegion*
log*
VTK
# packages - anywhere
*.tar.bz2
*.tar.gz
*.tar
*.tgz
*.gtgz
# Pictures and movies
*.png
*.jpg
*.jpeg
*.bmp
*.png
*.avi
*.mp4
*.mpg
#end-of-file

View file

@ -0,0 +1,16 @@
cellSet backFringe new cellToCell background
cellSet backFringe subset sphereToCell (0 0 0) 7.8
cellSet backHole new cellToCell background
cellSet backHole subset sphereToCell (0 0 0) 7.2
cellSet backFringe delete cellToCell backHole
cellSet backFringe new cellToCell background
cellSet backFringe subset sphereToCell (0 0 0) 7.6
cellSet backHole new cellToCell background
cellSet backHole subset sphereToCell (0 0 0) 7.0
cellSet backFringe delete cellToCell backHole
quit
cellSet backFringe new cellToCell background
cellSet backFringe subset sphereToCell (0 0 0) 7.4
cellSet backHole new cellToCell background
cellSet backHole subset sphereToCell (0 0 0) 6.8
cellSet backFringe delete cellToCell backHole

View file

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (1 0 0);
boundaryField
{
farField
{
type inletOutlet;
inletValue uniform (1 0 0);
value uniform (1 0 0);
phi phi;
}
cylinder
{
type fixedValue;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
farField
{
type zeroGradient;
}
cylinder
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,9 @@
#!/bin/sh
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanTimeDirectories
\rm -rf 0
\cp -r save 0
\rm -rf *.dat probes forces

View file

@ -0,0 +1,9 @@
#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application="icoFoam"
runApplication potentialFoam -writep
runApplication $application

View file

@ -0,0 +1,62 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object oversetMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
interpolation
{
type injection;
}
regions
(
// Background
{
index 0;
// Donor regions
donorRegions ( 1 );
// Names or patches that determine hole cells
holePatches ();
fringe
{
type manual;
holes "backHole";
acceptors "backFringe";
}
}
// Cylinder
{
index 1;
donorRegions ( 0 );
holePatches ( cylinder );
fringe
{
type faceCells;
patches ( outerCylinder );
}
}
);
// ************************************************************************* //

View file

@ -0,0 +1,146 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 10;
vertices
(
// Cylinder, back
( 0 -0.05 0)
( 0.05 0 0)
( 0 0.05 0)
(-0.05 0 0)
( 0 -0.8 0)
( 0.8 0 0)
( 0 0.8 0)
(-0.8 0 0)
( 0 -2 0)
( 2 0 0)
( 0 2 0)
( -2 0 0)
// Cylinder, front
( 0 -0.05 0.05)
( 0.05 0 0.05)
( 0 0.05 0.05)
(-0.05 0 0.05)
( 0 -0.8 0.05)
( 0.8 0 0.05)
( 0 0.8 0.05)
(-0.8 0 0.05)
( 0 -2 0.05)
( 2 0 0.05)
( 0 2 0.05)
( -2 0 0.05)
);
blocks
(
// Inner, with grading
hex (0 4 5 1 12 16 17 13) (78 30 1) simpleGrading (34.8 1 1)
hex (1 5 6 2 13 17 18 14) (78 30 1) simpleGrading (34.8 1 1)
hex (2 6 7 3 14 18 19 15) (78 30 1) simpleGrading (34.8 1 1)
hex (3 7 4 0 15 19 16 12) (78 30 1) simpleGrading (34.8 1 1)
// Outer, uniform
hex (0 4 5 1 12 16 17 13) (78 30 1) simpleGrading (34.8 1 1)
hex (1 5 6 2 13 17 18 14) (78 30 1) simpleGrading (34.8 1 1)
hex (2 6 7 3 14 18 19 15) (78 30 1) simpleGrading (34.8 1 1)
hex (3 7 4 0 15 19 16 12) (78 30 1) simpleGrading (34.8 1 1)
);
edges
(
// Inner arc, back
arc 0 1 ( 0.035355 -0.035355 0)
arc 1 2 ( 0.035355 0.035355 0)
arc 2 3 (-0.035355 0.035355 0)
arc 3 0 (-0.035355 -0.035355 0)
// Inner arc, front
arc 12 13 ( 0.035355 -0.035355 0.05)
arc 13 14 ( 0.035355 0.035355 0.05)
arc 14 15 (-0.035355 0.035355 0.05)
arc 15 12 (-0.035355 -0.035355 0.05)
// Middle arc, back
arc 4 5 ( 0.565685 -0.565685 0)
arc 5 6 ( 0.565685 0.565685 0)
arc 6 7 (-0.565685 0.565685 0)
arc 7 4 (-0.565685 -0.565685 0)
// Middle arc, front
arc 16 17 ( 0.565685 -0.565685 0.05)
arc 17 18 ( 0.565685 0.565685 0.05)
arc 18 19 (-0.565685 0.565685 0.05)
arc 19 16 (-0.565685 -0.565685 0.05)
// Outer arc, back
arc 8 9 ( 1.4142125 -1.4.142125 0)
arc 9 10 ( 1.4142125 1.4.142125 0)
arc 10 11 (-1.4142125 1.4.142125 0)
arc 11 8 (-1.4142125 -1.4.142125 0)
// Outer arc, front
arc 20 21 ( 1.4142125 -1.4142125 0.05)
arc 21 22 ( 1.4142125 1.4142125 0.05)
arc 22 23 (-1.4142125 1.4142125 0.05)
arc 23 20 (-1.4142125 -1.4142125 0.05)
);
patches
(
wall cylinder
(
( 0 12 13 1)
( 1 13 14 2)
( 2 14 15 3)
( 3 15 12 0)
)
// patch outerCylinder
// (
// ( 4 5 13 12)
// ( 5 6 14 13)
// ( 6 7 15 14)
// ( 7 4 12 15)
// )
// empty frontAndBack
// (
// (8 9 13 12)
// (9 10 14 13)
// (10 11 15 14)
// (11 8 12 15)
// (16 20 21 17)
// (17 21 22 18)
// (18 22 23 19)
// (19 23 20 16)
// )
);
mergePatchPairs
(
);
// ************************************************************************* //

View file

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
nu nu [0 2 -1 0 0 0 0] 5.0e-05;
// ************************************************************************* //

View file

@ -0,0 +1,53 @@
#!/usr/bin/python
import pylab
import re
import pickle
forceRegex=r"([0-9.Ee\-+]+)\s+\(+([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\)\s\(([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\s([0-9 .Ee\-+]+)\)+\s\(+([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\)\s\(([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\)+"
t = []
fpx = []; fpy = []; fpz = []
fvx = []; fvy = []; fvz = []
mpx = []; mpy = []; mpz = []
mvx = []; mvy = []; mvz = []
pipefile=open('forces/0/forces.dat','r')
lines = pipefile.readlines()
for line in lines:
match=re.search(forceRegex,line)
if match:
t.append(float(match.group(1)))
fpx.append(float(match.group(2)))
fpy.append(float(match.group(3)))
fpz.append(float(match.group(4)))
fvx.append(float(match.group(5)))
fvy.append(float(match.group(6)))
fvz.append(float(match.group(7)))
mpx.append(float(match.group(8)))
mpy.append(float(match.group(9)))
mpz.append(float(match.group(10)))
mvx.append(float(match.group(11)))
mvy.append(float(match.group(12)))
mvz.append(float(match.group(13)))
# Calculate total forces
fx = [x + y for x, y in zip(fpx, fvx)]
fy = [x + y for x, y in zip(fpy, fvy)]
fz = [x + y for x, y in zip(fpz, fvz)]
for i in range(len(t)):
fx[i] = fpx[i] + fvx[i]
for i in range(len(t)):
fx[i] = fpx[i] + fvx[i]
with open('pressureForces.dat', 'w') as f:
for f1, f2, f3 in zip(t, fpx, fpy):
print >> f, f1, f2, f3
with open('viscousForces.dat', 'w') as f:
for f1, f2, f3 in zip(t, fvx, fvy):
print >> f, f1, f2, f3
with open('totalForces.dat', 'w') as f:
for f1, f2, f3 in zip(t, fx, fy):
print >> f, f1, f2, f3

View file

@ -0,0 +1,43 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (1 0 0);
boundaryField
{
farField
{
type inletOutlet;
inletValue uniform (1 0 0);
value uniform (1 0 0);
phi phi;
}
cylinder
{
type fixedValue;
value uniform (0 0 0);
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
farField
{
type zeroGradient;
}
cylinder
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,101 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoOversetFoam;
// startFrom startTime;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 100;
deltaT 0.02;
writeControl runTime;
writeInterval 2;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression compressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
libs
(
"libfoam.so"
"libmeshTools.so"
"libsurfMesh.so"
"libsampling.so"
"libdynamicMesh.so"
"liboversetMesh.so"
);
functions
(
forces
{
type forces;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;
patches ( cylinder );
pName p;
UName U;
rhoName rhoInf;
log true;
rhoInf 1;
CofR (0 0 0);
}
probes
{
type probes;
functionObjectLibs ("libsampling.so");
enabled true;
outputControl timeStep;
outputInterval 1;
probeLocations
(
( 1 0 0 )
( 3 0 0 )
( 5 0 0 )
);
fields
(
p
);
}
);
// ************************************************************************* //

View file

@ -0,0 +1,50 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
method simple;
simpleCoeffs
{
n (4 1 1);
delta 0.001;
}
hierarchicalCoeffs
{
n (1 1 1);
delta 0.001;
order xyz;
}
metisCoeffs
{
processorWeights 4(1 1 1 1);
}
manualCoeffs
{
dataFile "cellDecomposition";
}
distributed no;
roots
(
);
// ************************************************************************* //

View file

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss upwind;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
// ************************************************************************* //

View file

@ -0,0 +1,63 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver CG;
preconditioner DIC;
minIter 1;
maxIter 1000;
tolerance 1e-7;
relTol 0;
}
U
{
solver smoothSolver;
smoother GaussSeidel;
nSweeps 1;
// solver BiCGStab;
// preconditioner DILU;
// minIter 1;
maxIter 1000;
tolerance 1e-7;
relTol 0;
}
}
SIMPLE
{
pRefCell 0;
pRefValue 0;
}
PISO
{
pRefCell 0;
pRefValue 0;
nCorrectors 4;
}
// ************************************************************************* //

View file

@ -0,0 +1,56 @@
# git-ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# editor and misc backup files - anywhere
*~
.*~
*.bak
*.bak[0-9][0-9]
*.orig
*.orig[0-9][0-9]
\#*\#
# file-browser settings - anywhere
.directory
# data files
*.dat
# CVS recovered versions - anywhere
.#*
# SVN directories - anywhere
.svn/
# OpenFOAM results
[0-9]*/
!/0/
processor*
*/polyMesh/*
!*/polyMesh/blockMeshDict
cellToRegion*
log*
VTK
# packages - anywhere
*.tar.bz2
*.tar.gz
*.tar
*.tgz
*.gtgz
# Pictures and movies
*.png
*.jpg
*.jpeg
*.bmp
*.png
*.avi
*.mp4
*.mpg
#end-of-file

View file

@ -0,0 +1,73 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (1 0 0);
boundaryField
{
oversetFaces
{
type overset;
value uniform (0 0 0);
coupledFringe yes;
setHoleCellValue yes;
holeCellValue (0 0 0);
}
in
{
type fixedValue;
value uniform (1 0 0);
}
out
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (1 0 0);
phi phi;
}
top
{
type slip;
}
bottom
{
type slip;
}
cylinder
{
type fixedValue;
value uniform (0 0 0);
}
outerCylinder
{
type zeroGradient;
}
refine
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,74 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
oversetFaces
{
type overset;
value uniform 0;
coupledFringe yes;
conservativeCorrection yes;
setHoleCellValue yes;
holeCellValue 0;
}
in
{
type zeroGradient;
}
out
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho none;
psi none;
gamma 1;
value uniform 0;
}
top
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
cylinder
{
type zeroGradient;
}
outerCylinder
{
type zeroGradient;
}
refine
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,13 @@
#!/bin/sh
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -rf constant/polyMesh/
mkdir constant/polyMesh
\rm -rf 0
\cp -r save 0
\rm -f *.dat
\rm -f *vtk

View file

@ -0,0 +1,16 @@
#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application="icoOversetFoam"
\cp -f blockMeshDict constant/polyMesh/blockMeshDict
runApplication blockMesh
\cp -f boundary constant/polyMesh/boundary
runApplication setSet -batch setBatch.batch
\rm -f constant/polyMesh/sets/*_old constant/polyMesh/sets/*_old.gz
runApplication setsToZones
runApplication potentialOversetFoam -writep
runApplication $application

View file

@ -0,0 +1,175 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 10;
vertices
(
// Background mesh
(-2.5 -2.5 0)
( 2.5 -2.5 0)
( 2.5 2.5 0)
(-2.5 2.5 0)
(-2.5 -2.5 0.5)
( 2.5 -2.5 0.5)
( 2.5 2.5 0.5)
(-2.5 2.5 0.5)
// Cylinder, back
( 0 -0.05 0)
( 0.05 0 0)
( 0 0.05 0)
(-0.05 0 0)
( 0 -0.8 0)
( 0.8 0 0)
( 0 0.8 0)
(-0.8 0 0)
// Cylinder, front
( 0 -0.05 0.5)
( 0.05 0 0.5)
( 0 0.05 0.5)
(-0.05 0 0.5)
( 0 -0.8 0.5)
( 0.8 0 0.5)
( 0 0.8 0.5)
(-0.8 0 0.5)
// Refine box
(-1.5 -1.5 0)
( 1.5 -1.5 0)
( 1.5 1.5 0)
(-1.5 1.5 0)
(-1.5 -1.5 0.5)
( 1.5 -1.5 0.5)
( 1.5 1.5 0.5)
(-1.5 1.5 0.5)
);
blocks
(
// Background
hex (0 1 2 3 4 5 6 7) background (82 82 1) simpleGrading (1 1 1)
// Refine box
hex (24 25 26 27 28 29 30 31) refine (70 70 1) simpleGrading (1 1 1)
// Front
hex (8 12 13 9 16 20 21 17) front (78 30 1) simpleGrading (34.8 1 1)
hex (9 13 14 10 17 21 22 18) front (78 30 1) simpleGrading (34.8 1 1)
hex (10 14 15 11 18 22 23 19) front (78 30 1) simpleGrading (34.8 1 1)
hex (11 15 12 8 19 23 20 16) front (78 30 1) simpleGrading (34.8 1 1)
);
edges
(
// Inner arc, back
arc 8 9 ( 0.035355 -0.035355 0)
arc 9 10 ( 0.035355 0.035355 0)
arc 10 11 (-0.035355 0.035355 0)
arc 11 8 (-0.035355 -0.035355 0)
// Inner arc, front
arc 16 17 ( 0.035355 -0.035355 0.5)
arc 17 18 ( 0.035355 0.035355 0.5)
arc 18 19 (-0.035355 0.035355 0.5)
arc 19 16 (-0.035355 -0.035355 0.5)
// Outer arc, back
arc 12 13 ( 0.565685 -0.565685 0)
arc 13 14 ( 0.565685 0.565685 0)
arc 14 15 (-0.565685 0.565685 0)
arc 15 12 (-0.565685 -0.565685 0)
// Outer arc, front
arc 20 21 ( 0.565685 -0.565685 0.5)
arc 21 22 ( 0.565685 0.565685 0.5)
arc 22 23 (-0.565685 0.565685 0.5)
arc 23 20 (-0.565685 -0.565685 0.5)
);
patches
(
patch in
(
(0 4 7 3)
)
patch out
(
(2 6 5 1)
)
wall top
(
(3 7 6 2)
)
wall bottom
(
(1 5 4 0)
)
wall cylinder
(
(8 16 17 9)
(9 17 18 10)
(10 18 19 11)
(11 19 16 8)
)
patch outerCylinder
(
(12 13 21 20)
(13 14 22 21)
(14 15 23 22)
(15 12 20 23)
)
patch refine
(
(24 28 31 27)
(26 30 29 25)
(27 31 30 26)
(25 29 28 24)
)
empty frontAndBack
(
(0 3 2 1)
(4 5 6 7)
(8 9 13 12)
(9 10 14 13)
(10 11 15 14)
(11 8 12 15)
(16 20 21 17)
(17 21 22 18)
(18 22 23 19)
(19 23 20 16)
(24 27 26 25)
(28 29 30 31)
)
);
mergePatchPairs
(
);
// ************************************************************************* //

View file

@ -0,0 +1,76 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
9
(
oversetFaces
{
type overset;
nFaces 0;
startFace 41544;
}
in
{
type patch;
nFaces 82;
startFace 41544;
}
out
{
type patch;
nFaces 82;
startFace 41626;
}
top
{
type wall;
nFaces 82;
startFace 41708;
}
bottom
{
type wall;
nFaces 82;
startFace 41790;
}
cylinder
{
type wall;
nFaces 120;
startFace 41872;
}
outerCylinder
{
type patch;
nFaces 120;
startFace 41992;
}
refine
{
type patch;
nFaces 280;
startFace 42112;
}
frontAndBack
{
type empty;
nFaces 41968;
startFace 42392;
}
)
// ************************************************************************* //

View file

@ -0,0 +1,83 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object oversetMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
interpolation
{
interpolationSchemes (injection);
default injection;
}
holePatches ( cylinder );
regions
(
background
{
// Donor regions
donorRegions ( refine );
fringe
{
type manual;
holes "backHole";
acceptors "backFringe";
}
}
refine
{
// Donor regions
donorRegions ( background front );
fringe
{
type composite;
baseFringes
(
inner
{
type manual;
holes "refineHole";
acceptors "refineFringe";
}
outer
{
type faceCells;
patches ( refine );
}
);
}
}
front
{
donorRegions ( refine );
fringe
{
type faceCells;
patches ( outerCylinder );
}
}
);
// ************************************************************************* //

View file

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
nu nu [0 2 -1 0 0 0 0] 5.0e-05;
// ************************************************************************* //

View file

@ -0,0 +1,53 @@
#!/usr/bin/python
import pylab
import re
import pickle
forceRegex=r"([0-9.Ee\-+]+)\s+\(+([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\)\s\(([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\s([0-9 .Ee\-+]+)\)+\s\(+([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\)\s\(([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\)+"
t = []
fpx = []; fpy = []; fpz = []
fvx = []; fvy = []; fvz = []
mpx = []; mpy = []; mpz = []
mvx = []; mvy = []; mvz = []
pipefile=open('forces/0/forces.dat','r')
lines = pipefile.readlines()
for line in lines:
match=re.search(forceRegex,line)
if match:
t.append(float(match.group(1)))
fpx.append(float(match.group(2)))
fpy.append(float(match.group(3)))
fpz.append(float(match.group(4)))
fvx.append(float(match.group(5)))
fvy.append(float(match.group(6)))
fvz.append(float(match.group(7)))
mpx.append(float(match.group(8)))
mpy.append(float(match.group(9)))
mpz.append(float(match.group(10)))
mvx.append(float(match.group(11)))
mvy.append(float(match.group(12)))
mvz.append(float(match.group(13)))
# Calculate total forces
fx = [x + y for x, y in zip(fpx, fvx)]
fy = [x + y for x, y in zip(fpy, fvy)]
fz = [x + y for x, y in zip(fpz, fvz)]
for i in range(len(t)):
fx[i] = fpx[i] + fvx[i]
for i in range(len(t)):
fx[i] = fpx[i] + fvx[i]
with open('pressureForces.dat', 'w') as f:
for f1, f2, f3 in zip(t, fpx, fpy):
print >> f, f1, f2, f3
with open('viscousForces.dat', 'w') as f:
for f1, f2, f3 in zip(t, fvx, fvy):
print >> f, f1, f2, f3
with open('totalForces.dat', 'w') as f:
for f1, f2, f3 in zip(t, fx, fy):
print >> f, f1, f2, f3

View file

@ -0,0 +1,73 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (1 0 0);
boundaryField
{
oversetFaces
{
type overset;
value uniform (0 0 0);
coupledFringe yes;
setHoleCellValue yes;
holeCellValue (0 0 0);
}
in
{
type fixedValue;
value uniform (1 0 0);
}
out
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (1 0 0);
phi phi;
}
top
{
type slip;
}
bottom
{
type slip;
}
cylinder
{
type fixedValue;
value uniform (0 0 0);
}
outerCylinder
{
type zeroGradient;
}
refine
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,74 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
oversetFaces
{
type overset;
value uniform 0;
coupledFringe yes;
conservativeCorrection yes;
setHoleCellValue yes;
holeCellValue 0;
}
in
{
type zeroGradient;
}
out
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho none;
psi none;
gamma 1;
value uniform 0;
}
top
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
cylinder
{
type zeroGradient;
}
outerCylinder
{
type zeroGradient;
}
refine
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,16 @@
cellSet backFringe new cellToCell background
cellSet backFringe subset boxToCell (-14 -14 0) (14 14 5)
cellSet backHole new cellToCell background
cellSet backHole subset boxToCell (-13 -13 0) (13 13 5)
cellSet backFringe delete cellToCell backHole
cellSet refineFringe new cellToCell refine
cellSet refineFringe subset sphereToCell (0 0 0) 7.8
cellSet refineHole new cellToCell refine
cellSet refineHole subset sphereToCell (0 0 0) 7.2
cellSet refineFringe delete cellToCell refineHole
cellSet empty new labelToCell 0 ()
quit

View file

@ -0,0 +1,102 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application icoOversetFoam;
// startFrom startTime;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 100;
deltaT 0.02;
writeControl runTime;
writeInterval 2;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression compressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
libs
(
"libfoam.so"
"libmeshTools.so"
"libsurfMesh.so"
"libsampling.so"
"libdynamicMesh.so"
"liboversetMesh.so"
);
functions
(
forces
{
type forces;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;
patches ( cylinder );
pName p;
UName U;
rhoName rhoInf;
log true;
rhoInf 1;
CofR (0 0 0);
}
probes
{
type probes;
functionObjectLibs ("libsampling.so");
enabled true;
outputControl timeStep;
outputInterval 1;
probeLocations
(
( 1 0 0 )
( 3 0 0 )
( 5 0 0 )
(15 0 0 )
);
fields
(
p
);
}
);
// ************************************************************************* //

View file

@ -0,0 +1,50 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
method simple;
simpleCoeffs
{
n (4 1 1);
delta 0.001;
}
hierarchicalCoeffs
{
n (1 1 1);
delta 0.001;
order xyz;
}
metisCoeffs
{
processorWeights 4(1 1 1 1);
}
manualCoeffs
{
dataFile "cellDecomposition";
}
distributed no;
roots
(
);
// ************************************************************************* //

View file

@ -0,0 +1,49 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss upwind;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
// ************************************************************************* //

View file

@ -0,0 +1,66 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver BiCGStab;
preconditioner DILU;
// solver CG;
// preconditioner DIC;
// minIter 1;
maxIter 1000;
tolerance 1e-7;
relTol 0;
}
U
{
solver smoothSolver;
smoother GaussSeidel;
nSweeps 1;
// solver BiCGStab;
// preconditioner DILU;
// minIter 1;
maxIter 1000;
tolerance 1e-7;
relTol 0;
}
}
SIMPLE
{
pRefCell 0;
pRefValue 0;
}
PISO
{
pRefCell 0;
pRefValue 0;
nCorrectors 4;
}
// ************************************************************************* //

View file

@ -0,0 +1,56 @@
# git-ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# editor and misc backup files - anywhere
*~
.*~
*.bak
*.bak[0-9][0-9]
*.orig
*.orig[0-9][0-9]
\#*\#
# file-browser settings - anywhere
.directory
# data files
*.dat
# CVS recovered versions - anywhere
.#*
# SVN directories - anywhere
.svn/
# OpenFOAM results
[0-9]*/
!/0/
processor*
*/polyMesh/*
!*/polyMesh/blockMeshDict
cellToRegion*
log*
VTK
# packages - anywhere
*.tar.bz2
*.tar.gz
*.tar
*.tgz
*.gtgz
# Pictures and movies
*.png
*.jpg
*.jpeg
*.bmp
*.png
*.avi
*.mp4
*.mpg
#end-of-file

View file

@ -0,0 +1,73 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (1 0 0);
boundaryField
{
oversetFaces
{
type overset;
value uniform (0 0 0);
coupledFringe yes;
setHoleCellValue yes;
holeCellValue (0 0 0);
}
in
{
type fixedValue;
value uniform (1 0 0);
}
out
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (1 0 0);
phi phi;
}
top
{
type slip;
}
bottom
{
type slip;
}
cylinder
{
type fixedValue;
value uniform (0 0 0);
}
outerCylinder
{
type zeroGradient;
}
refine
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,74 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
oversetFaces
{
type overset;
value uniform 0;
coupledFringe yes;
conservativeCorrection yes;
setHoleCellValue yes;
holeCellValue 0;
}
in
{
type zeroGradient;
}
out
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho none;
psi none;
gamma 1;
value uniform 0;
}
top
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
cylinder
{
type zeroGradient;
}
outerCylinder
{
type zeroGradient;
}
refine
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,13 @@
#!/bin/sh
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -rf constant/polyMesh/
mkdir constant/polyMesh
\rm -rf 0
\cp -r save 0
\rm -f *.dat
\rm -f *vtk

View file

@ -0,0 +1,16 @@
#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application="simpleOversetFoam"
\cp -f blockMeshDict constant/polyMesh/blockMeshDict
runApplication blockMesh
\cp -f boundary constant/polyMesh/boundary
runApplication setSet -batch setBatch.batch
\rm -f constant/polyMesh/sets/*_old constant/polyMesh/sets/*_old.gz
runApplication setsToZones
runApplication potentialOversetFoam -writep
runApplication $application

View file

@ -0,0 +1,175 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 10;
vertices
(
// Background mesh
(-2.5 -2.5 0)
( 2.5 -2.5 0)
( 2.5 2.5 0)
(-2.5 2.5 0)
(-2.5 -2.5 0.5)
( 2.5 -2.5 0.5)
( 2.5 2.5 0.5)
(-2.5 2.5 0.5)
// Cylinder, back
( 0 -0.05 0)
( 0.05 0 0)
( 0 0.05 0)
(-0.05 0 0)
( 0 -0.8 0)
( 0.8 0 0)
( 0 0.8 0)
(-0.8 0 0)
// Cylinder, front
( 0 -0.05 0.5)
( 0.05 0 0.5)
( 0 0.05 0.5)
(-0.05 0 0.5)
( 0 -0.8 0.5)
( 0.8 0 0.5)
( 0 0.8 0.5)
(-0.8 0 0.5)
// Refine box
(-1.5 -1.5 0)
( 1.5 -1.5 0)
( 1.5 1.5 0)
(-1.5 1.5 0)
(-1.5 -1.5 0.5)
( 1.5 -1.5 0.5)
( 1.5 1.5 0.5)
(-1.5 1.5 0.5)
);
blocks
(
// Background
hex (0 1 2 3 4 5 6 7) background (82 82 1) simpleGrading (1 1 1)
// Refine box
hex (24 25 26 27 28 29 30 31) refine (70 70 1) simpleGrading (1 1 1)
// Front
hex (8 12 13 9 16 20 21 17) front (78 30 1) simpleGrading (34.8 1 1)
hex (9 13 14 10 17 21 22 18) front (78 30 1) simpleGrading (34.8 1 1)
hex (10 14 15 11 18 22 23 19) front (78 30 1) simpleGrading (34.8 1 1)
hex (11 15 12 8 19 23 20 16) front (78 30 1) simpleGrading (34.8 1 1)
);
edges
(
// Inner arc, back
arc 8 9 ( 0.035355 -0.035355 0)
arc 9 10 ( 0.035355 0.035355 0)
arc 10 11 (-0.035355 0.035355 0)
arc 11 8 (-0.035355 -0.035355 0)
// Inner arc, front
arc 16 17 ( 0.035355 -0.035355 0.5)
arc 17 18 ( 0.035355 0.035355 0.5)
arc 18 19 (-0.035355 0.035355 0.5)
arc 19 16 (-0.035355 -0.035355 0.5)
// Outer arc, back
arc 12 13 ( 0.565685 -0.565685 0)
arc 13 14 ( 0.565685 0.565685 0)
arc 14 15 (-0.565685 0.565685 0)
arc 15 12 (-0.565685 -0.565685 0)
// Outer arc, front
arc 20 21 ( 0.565685 -0.565685 0.5)
arc 21 22 ( 0.565685 0.565685 0.5)
arc 22 23 (-0.565685 0.565685 0.5)
arc 23 20 (-0.565685 -0.565685 0.5)
);
patches
(
patch in
(
(0 4 7 3)
)
patch out
(
(2 6 5 1)
)
wall top
(
(3 7 6 2)
)
wall bottom
(
(1 5 4 0)
)
wall cylinder
(
(8 16 17 9)
(9 17 18 10)
(10 18 19 11)
(11 19 16 8)
)
patch outerCylinder
(
(12 13 21 20)
(13 14 22 21)
(14 15 23 22)
(15 12 20 23)
)
patch refine
(
(24 28 31 27)
(26 30 29 25)
(27 31 30 26)
(25 29 28 24)
)
empty frontAndBack
(
(0 3 2 1)
(4 5 6 7)
(8 9 13 12)
(9 10 14 13)
(10 11 15 14)
(11 8 12 15)
(16 20 21 17)
(17 21 22 18)
(18 22 23 19)
(19 23 20 16)
(24 27 26 25)
(28 29 30 31)
)
);
mergePatchPairs
(
);
// ************************************************************************* //

View file

@ -0,0 +1,76 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
9
(
oversetFaces
{
type overset;
nFaces 0;
startFace 41544;
}
in
{
type patch;
nFaces 82;
startFace 41544;
}
out
{
type patch;
nFaces 82;
startFace 41626;
}
top
{
type wall;
nFaces 82;
startFace 41708;
}
bottom
{
type wall;
nFaces 82;
startFace 41790;
}
cylinder
{
type wall;
nFaces 120;
startFace 41872;
}
outerCylinder
{
type patch;
nFaces 120;
startFace 41992;
}
refine
{
type patch;
nFaces 280;
startFace 42112;
}
frontAndBack
{
type empty;
nFaces 41968;
startFace 42392;
}
)
// ************************************************************************* //

View file

@ -0,0 +1,25 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object RASProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel laminar;
// RASModel kEpsilon;
turbulence on;
printCoeffs on;
// ************************************************************************* //

View file

@ -0,0 +1,83 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object oversetMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
interpolation
{
interpolationSchemes (injection);
default injection;
}
holePatches ( cylinder );
regions
(
background
{
// Donor regions
donorRegions ( refine );
fringe
{
type manual;
holes "backHole";
acceptors "backFringe";
}
}
refine
{
// Donor regions
donorRegions ( background front );
fringe
{
type composite;
baseFringes
(
inner
{
type manual;
holes "refineHole";
acceptors "refineFringe";
}
outer
{
type faceCells;
patches ( refine );
}
);
}
}
front
{
donorRegions ( refine );
fringe
{
type faceCells;
patches ( outerCylinder );
}
}
);
// ************************************************************************* //

View file

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu nu [0 2 -1 0 0 0 0] 5.0e-05;
// ************************************************************************* //

View file

@ -0,0 +1,53 @@
#!/usr/bin/python
import pylab
import re
import pickle
forceRegex=r"([0-9.Ee\-+]+)\s+\(+([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\)\s\(([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\s([0-9 .Ee\-+]+)\)+\s\(+([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\)\s\(([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\s([0-9.Ee\-+]+)\)+"
t = []
fpx = []; fpy = []; fpz = []
fvx = []; fvy = []; fvz = []
mpx = []; mpy = []; mpz = []
mvx = []; mvy = []; mvz = []
pipefile=open('forces/0/forces.dat','r')
lines = pipefile.readlines()
for line in lines:
match=re.search(forceRegex,line)
if match:
t.append(float(match.group(1)))
fpx.append(float(match.group(2)))
fpy.append(float(match.group(3)))
fpz.append(float(match.group(4)))
fvx.append(float(match.group(5)))
fvy.append(float(match.group(6)))
fvz.append(float(match.group(7)))
mpx.append(float(match.group(8)))
mpy.append(float(match.group(9)))
mpz.append(float(match.group(10)))
mvx.append(float(match.group(11)))
mvy.append(float(match.group(12)))
mvz.append(float(match.group(13)))
# Calculate total forces
fx = [x + y for x, y in zip(fpx, fvx)]
fy = [x + y for x, y in zip(fpy, fvy)]
fz = [x + y for x, y in zip(fpz, fvz)]
for i in range(len(t)):
fx[i] = fpx[i] + fvx[i]
for i in range(len(t)):
fx[i] = fpx[i] + fvx[i]
with open('pressureForces.dat', 'w') as f:
for f1, f2, f3 in zip(t, fpx, fpy):
print >> f, f1, f2, f3
with open('viscousForces.dat', 'w') as f:
for f1, f2, f3 in zip(t, fvx, fvy):
print >> f, f1, f2, f3
with open('totalForces.dat', 'w') as f:
for f1, f2, f3 in zip(t, fx, fy):
print >> f, f1, f2, f3

View file

@ -0,0 +1,73 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (1 0 0);
boundaryField
{
oversetFaces
{
type overset;
value uniform (0 0 0);
coupledFringe yes;
setHoleCellValue yes;
holeCellValue (0 0 0);
}
in
{
type fixedValue;
value uniform (1 0 0);
}
out
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (1 0 0);
phi phi;
}
top
{
type slip;
}
bottom
{
type slip;
}
cylinder
{
type fixedValue;
value uniform (0 0 0);
}
outerCylinder
{
type zeroGradient;
}
refine
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,74 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
oversetFaces
{
type overset;
value uniform 0;
coupledFringe yes;
conservativeCorrection yes;
setHoleCellValue yes;
holeCellValue 0;
}
in
{
type zeroGradient;
}
out
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho none;
psi none;
gamma 1;
value uniform 0;
}
top
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
cylinder
{
type zeroGradient;
}
outerCylinder
{
type zeroGradient;
}
refine
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,16 @@
cellSet backFringe new cellToCell background
cellSet backFringe subset boxToCell (-14 -14 0) (14 14 5)
cellSet backHole new cellToCell background
cellSet backHole subset boxToCell (-13 -13 0) (13 13 5)
cellSet backFringe delete cellToCell backHole
cellSet refineFringe new cellToCell refine
cellSet refineFringe subset sphereToCell (0 0 0) 7.8
cellSet refineHole new cellToCell refine
cellSet refineHole subset sphereToCell (0 0 0) 7.2
cellSet refineFringe delete cellToCell refineHole
cellSet empty new labelToCell 0 ()
quit

View file

@ -0,0 +1,104 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application simpleOversetFoam;
// startFrom startTime;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 1000;
deltaT 1;
// writeControl runTime;
// writeInterval 2;
writeControl timeStep;
writeInterval 5;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression compressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
libs
(
"libfoam.so"
"libmeshTools.so"
"libsurfMesh.so"
"libsampling.so"
"libdynamicMesh.so"
"liboversetMesh.so"
);
functions
(
forces
{
type forces;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;
patches ( cylinder );
pName p;
UName U;
rhoName rhoInf;
log true;
rhoInf 1;
CofR (0 0 0);
}
probes
{
type probes;
functionObjectLibs ("libsampling.so");
enabled true;
outputControl timeStep;
outputInterval 1;
probeLocations
(
( 1 0 0 )
( 3 0 0 )
( 5 0 0 )
(15 0 0 )
);
fields
(
p
);
}
);
// ************************************************************************* //

View file

@ -0,0 +1,50 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
method simple;
simpleCoeffs
{
n (4 1 1);
delta 0.001;
}
hierarchicalCoeffs
{
n (1 1 1);
delta 0.001;
order xyz;
}
metisCoeffs
{
processorWeights 4(1 1 1 1);
}
manualCoeffs
{
dataFile "cellDecomposition";
}
distributed no;
roots
(
);
// ************************************************************************* //

View file

@ -0,0 +1,50 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss upwind;
div((nuEff*dev(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
// ************************************************************************* //

View file

@ -0,0 +1,70 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver BiCGStab;
preconditioner DILU;
// solver CG;
// preconditioner DIC;
minIter 1;
maxIter 1000;
tolerance 1e-7;
relTol 0;
}
U
{
solver smoothSolver;
smoother GaussSeidel;
nSweeps 1;
// solver BiCGStab;
// preconditioner DILU;
minIter 1;
maxIter 1000;
tolerance 1e-7;
relTol 0;
}
}
SIMPLE
{
pRefCell 0;
pRefValue 0;
}
relaxationFactors
{
fields
{
p 0.3;
}
equations
{
U 0.5;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,56 @@
# git-ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# editor and misc backup files - anywhere
*~
.*~
*.bak
*.bak[0-9][0-9]
*.orig
*.orig[0-9][0-9]
\#*\#
# file-browser settings - anywhere
.directory
# data files
*.dat
# CVS recovered versions - anywhere
.#*
# SVN directories - anywhere
.svn/
# OpenFOAM results
[0-9]*/
!/0/
processor*
*/polyMesh/*
!*/polyMesh/blockMeshDict
cellToRegion*
log*
VTK
# packages - anywhere
*.tar.bz2
*.tar.gz
*.tar
*.tgz
*.gtgz
# Pictures and movies
*.png
*.jpg
*.jpeg
*.bmp
*.png
*.avi
*.mp4
*.mpg
#end-of-file

View file

@ -0,0 +1,16 @@
cellSet backFringe new cellToCell background
cellSet backFringe subset sphereToCell (0 0 0) 7.8
cellSet backHole new cellToCell background
cellSet backHole subset sphereToCell (0 0 0) 7.2
cellSet backFringe delete cellToCell backHole
cellSet backFringe new cellToCell background
cellSet backFringe subset sphereToCell (0 0 0) 7.6
cellSet backHole new cellToCell background
cellSet backHole subset sphereToCell (0 0 0) 7.0
cellSet backFringe delete cellToCell backHole
quit
cellSet backFringe new cellToCell background
cellSet backFringe subset sphereToCell (0 0 0) 7.4
cellSet backHole new cellToCell background
cellSet backHole subset sphereToCell (0 0 0) 6.8
cellSet backFringe delete cellToCell backHole

View file

@ -0,0 +1,69 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (1 0 0);
boundaryField
{
oversetFaces
{
type overset;
value uniform (0 0 0);
coupledFringe yes;
setHoleCellValue yes;
holeCellValue (0 0 0);
}
in
{
type fixedValue;
value uniform (1 0 0);
}
out
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (1 0 0);
phi phi;
}
top
{
type slip;
}
bottom
{
type slip;
}
cylinder
{
type fixedValue;
value uniform (0 0 0);
}
outerCylinder
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,73 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
oversetFaces
{
type overset;
value uniform 0;
coupledFringe yes;
conservativeCorrection yes;
setHoleCellValue yes;
holeCellValue 0;
}
in
{
type zeroGradient;
}
out
{
type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho none;
psi none;
gamma 1;
value uniform 0;
}
top
{
type zeroGradient;
}
bottom
{
type zeroGradient;
}
cylinder
{
type zeroGradient;
}
outerCylinder
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //

View file

@ -0,0 +1,13 @@
#!/bin/sh
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -rf constant/polyMesh/
mkdir constant/polyMesh
\rm -rf 0
\cp -r save 0
\rm -f *.dat
\rm -f *vtk

View file

@ -0,0 +1,16 @@
#!/bin/sh
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
# Get application name
application="icoOversetFoam"
\cp -f blockMeshDict constant/polyMesh/blockMeshDict
runApplication blockMesh
\cp -f boundary constant/polyMesh/boundary
runApplication setSet -batch setBatch.batch
\rm -f constant/polyMesh/sets/*_old constant/polyMesh/sets/*_old.gz
runApplication setsToZones -batch
runApplication potentialOversetFoam -writep
runApplication $application

View file

@ -0,0 +1,150 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 10;
vertices
(
// Background mesh
(-2.5 -2.5 0)
( 2.5 -2.5 0)
( 2.5 2.5 0)
(-2.5 2.5 0)
(-2.5 -2.5 0.5)
( 2.5 -2.5 0.5)
( 2.5 2.5 0.5)
(-2.5 2.5 0.5)
// Cylinder, back
( 0 -0.05 0)
( 0.05 0 0)
( 0 0.05 0)
(-0.05 0 0)
( 0 -0.8 0)
( 0.8 0 0)
( 0 0.8 0)
(-0.8 0 0)
// Cylinder, front
( 0 -0.05 0.5)
( 0.05 0 0.5)
( 0 0.05 0.5)
(-0.05 0 0.5)
( 0 -0.8 0.5)
( 0.8 0 0.5)
( 0 0.8 0.5)
(-0.8 0 0.5)
);
blocks
(
// Background
hex (0 1 2 3 4 5 6 7) background (82 82 1) simpleGrading (1 1 1)
// Front
hex (8 12 13 9 16 20 21 17) front (78 30 1) simpleGrading (34.8 1 1)
hex (9 13 14 10 17 21 22 18) front (78 30 1) simpleGrading (34.8 1 1)
hex (10 14 15 11 18 22 23 19) front (78 30 1) simpleGrading (34.8 1 1)
hex (11 15 12 8 19 23 20 16) front (78 30 1) simpleGrading (34.8 1 1)
);
edges
(
// Inner arc, back
arc 8 9 ( 0.035355 -0.035355 0)
arc 9 10 ( 0.035355 0.035355 0)
arc 10 11 (-0.035355 0.035355 0)
arc 11 8 (-0.035355 -0.035355 0)
// Inner arc, front
arc 16 17 ( 0.035355 -0.035355 0.5)
arc 17 18 ( 0.035355 0.035355 0.5)
arc 18 19 (-0.035355 0.035355 0.5)
arc 19 16 (-0.035355 -0.035355 0.5)
// Outer arc, back
arc 12 13 ( 0.565685 -0.565685 0)
arc 13 14 ( 0.565685 0.565685 0)
arc 14 15 (-0.565685 0.565685 0)
arc 15 12 (-0.565685 -0.565685 0)
// Outer arc, front
arc 20 21 ( 0.565685 -0.565685 0.5)
arc 21 22 ( 0.565685 0.565685 0.5)
arc 22 23 (-0.565685 0.565685 0.5)
arc 23 20 (-0.565685 -0.565685 0.5)
);
patches
(
patch in
(
(0 4 7 3)
)
patch out
(
(2 6 5 1)
)
wall top
(
(3 7 6 2)
)
wall bottom
(
(1 5 4 0)
)
wall cylinder
(
(8 16 17 9)
(9 17 18 10)
(10 18 19 11)
(11 19 16 8)
)
patch outerCylinder
(
(12 13 21 20)
(13 14 22 21)
(14 15 23 22)
(15 12 20 23)
)
empty frontAndBack
(
(0 3 2 1)
(4 5 6 7)
(8 9 13 12)
(9 10 14 13)
(10 11 15 14)
(11 8 12 15)
(16 20 21 17)
(17 21 22 18)
(18 22 23 19)
(19 23 20 16)
)
);
mergePatchPairs
(
);
// ************************************************************************* //

View file

@ -0,0 +1,70 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.foam-extend.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class polyBoundaryMesh;
location "constant/polyMesh";
object boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
8
(
oversetFaces
{
type overset;
nFaces 0;
startFace 31884;
}
in
{
type patch;
nFaces 82;
startFace 31884;
}
out
{
type patch;
nFaces 82;
startFace 31966;
}
top
{
type wall;
nFaces 82;
startFace 32048;
}
bottom
{
type wall;
nFaces 82;
startFace 32130;
}
cylinder
{
type wall;
nFaces 120;
startFace 32212;
}
outerCylinder
{
type patch;
nFaces 120;
startFace 32332;
}
frontAndBack
{
type empty;
nFaces 32168;
startFace 32452;
}
)
// ************************************************************************* //

View file

@ -0,0 +1,56 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object oversetMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
interpolation
{
interpolationSchemes (injection);
default injection;
}
holePatches ( cylinder );
regions
(
background
{
donorRegions ( front );
fringe
{
type manual;
holes "backHole";
acceptors "backFringe";
}
}
front
{
donorRegions ( background );
fringe
{
type faceCells;
patches ( outerCylinder );
}
}
);
// ************************************************************************* //

View file

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | foam-extend: Open Source CFD |
| \\ / O peration | Version: 3.2 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | For copyright notice see file Copyright |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
nu nu [0 2 -1 0 0 0 0] 5.0e-05;
// ************************************************************************* //

Some files were not shown because too many files have changed in this diff Show more