ENH: pimpleDyMFoam: Improved efficiency and consistency when running on a static mesh

Now pimpleDyMFoam is exactly equivalent to pimpleFoam when running on a
staticFvMesh.  Also when the constant/dynamicMeshDict is not present a
staticFvMesh is automatically constructed so that the pimpleDyMFoam solver can
run any pimpleFoam case without change.

pimpleDyMFoam: Store Uf as an autoPtr for better error handling

pimpleFoam: Set initial deltaT from the Courant number

for improved stability on start-up and compatibility with pimpleDyMFoam

ENH: pimpleFoam: Merged dynamic mesh functionality of pimpleDyMFoam into pimpleFoam

and replaced pimpleDyMFoam with a script which reports this change.

The pimpleDyMFoam tutorials have been moved into the pimpleFoam directory.

This change is the first of a set of developments to merge dynamic mesh
functionality into the standard solvers to improve consistency, usability,
flexibility and maintainability of these solvers.

Henry G. Weller
CFD Direct Ltd.

tutorials/incompressible/pimpleFoam: Updated pimpleDyMFoam tutorials to run pimpleFoam

Renamed tutorials/incompressible/pimpleFoam/RAS/wingMotion/wingMotion2D_pimpleDyMFoam

-> tutorials/incompressible/pimpleFoam/RAS/wingMotion/wingMotion2D_pimpleFoam
This commit is contained in:
Henry Weller
2017-11-18 01:13:48 +00:00
committed by Andrew Heather
parent be9d388a68
commit 81cea09983
139 changed files with 503 additions and 299 deletions

View File

@ -0,0 +1,65 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
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
{
inlet
{
type fixedValue;
value uniform (1 0 0);
}
outlet
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
walls
{
// type fixedValue;
type movingWallVelocity;
value uniform (0 0 0);
}
defaultFaces
{
type empty;
}
ACMI1_blockage
{
type noSlip;
}
ACMI1_couple
{
type cyclicACMI;
value uniform (0 0 0);
}
ACMI2_blockage
{
type noSlip;
}
ACMI2_couple
{
type cyclicACMI;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,67 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 1.8e-3;
boundaryField
{
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
walls
{
type epsilonWallFunction;
value $internalField;
}
defaultFaces
{
type empty;
}
ACMI1_blockage
{
type epsilonWallFunction;
value $internalField;
}
ACMI1_couple
{
type cyclicACMI;
value $internalField;
}
ACMI2_blockage
{
type epsilonWallFunction;
value $internalField;
}
ACMI2_couple
{
type cyclicACMI;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,67 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 3.75e-3;
boundaryField
{
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
walls
{
type kqRWallFunction;
value $internalField;
}
defaultFaces
{
type empty;
}
ACMI1_blockage
{
type kqRWallFunction;
value $internalField;
}
ACMI1_couple
{
type cyclicACMI;
value $internalField;
}
ACMI2_blockage
{
type kqRWallFunction;
value $internalField;
}
ACMI2_couple
{
type cyclicACMI;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,67 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
walls
{
type nutkWallFunction;
value $internalField;
}
defaultFaces
{
type empty;
}
ACMI1_blockage
{
type nutkWallFunction;
value $internalField;
}
ACMI1_couple
{
type cyclicACMI;
value $internalField;
}
ACMI2_blockage
{
type nutkWallFunction;
value $internalField;
}
ACMI2_couple
{
type cyclicACMI;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,70 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform 0;
}
walls
{
type zeroGradient;
}
couple1
{
type zeroGradient;
}
couple2
{
type zeroGradient;
}
defaultFaces
{
type empty;
}
ACMI1_blockage
{
type zeroGradient;
}
ACMI1_couple
{
type cyclicACMI;
value uniform 0;
}
ACMI2_blockage
{
type zeroGradient;
}
ACMI2_couple
{
type cyclicACMI;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
cleanCase0
#------------------------------------------------------------------------------

View File

@ -0,0 +1,9 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
./Allrun.pre
runApplication $(getApplication)
#------------------------------------------------------------------------------

View File

@ -0,0 +1,11 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
./Allrun.pre
runApplication decomposePar
runParallel $(getApplication)
runApplication reconstructPar
#------------------------------------------------------------------------------

View File

@ -0,0 +1,14 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
runApplication blockMesh
runApplication topoSet -constant
# Split the mesh to generate the ACMI coupled patches
runApplication createBaffles -overwrite
restore0Dir
#------------------------------------------------------------------------------

View File

@ -0,0 +1,134 @@
oscillatingInletACMI2D
This tutorial case gives an example of the Arbitrarily Coupled Mesh Interface
(ACMI) usage. The mesh is composed of two mesh regions: an inlet channel which
oscillates in the +/- Y-direction, and a fixed mesh region.
Each ACMI patch requires the specification of a 'non-overlapping' patch. In
this example, the non-overlapping patches are described as walls, e.g. taken
from the constant/polyMesh/boundary file:
1. First ACMI patch pair applied to the inlet channel outlet
ACMI1_couple
{
type cyclicACMI;
nFaces 40;
startFace 43720;
matchTolerance 0.0001;
transform noOrdering;
neighbourPatch ACMI2_couple;
nonOverlapPatch ACMI1_blockage;
}
ACMI1_blockage
{
type wall;
nFaces 40;
startFace 43680;
}
1. Second ACMI patch pair applied to the fixed mesh region inlet
ACMI2_couple
{
type cyclicACMI;
nFaces 96;
startFace 43856;
matchTolerance 0.0001;
transform noOrdering;
neighbourPatch ACMI1_couple;
nonOverlapPatch ACMI2_blockage;
}
ACMI2_blockage
{
type wall;
nFaces 96;
startFace 43760;
}
In the above, the ACMI1_blockage and ACMI1_couple patches occupy the same space,
with duplicate points, edges and faces. The ACMI2_blockage and ACMI2_couple
patches are created similarly.
The duplicate patches are initially created using the createBaffles utility.
Firstly, the original (non-duplicated) patch faces are collected into zones
using the topoSet utility.
Note: when specifying the ACMI patch-pairs, the coupled patch must be specified
before its associated non-overlapping patch.
Each ACMI/non-overlapping patch pair is specified using a master-slave approach.
However, since we are generating boundary patches (which are always master
patches) the slave patches are simply defined using 'dummy' entries, e.g.:
type faceZone;
zoneName couple1Faces;
patches
{
// create cyclic ACMI patch
master
{
//- Master side patch
name ACMI1_couple;
type cyclicACMI;
matchTolerance 0.0001;
neighbourPatch ACMI2_couple;
nonOverlapPatch ACMI1_blockage;
transform noOrdering;
}
slave // dummy entries only
{
//- Slave side patch
name ACMI1_couple;
type patch;
}
// create blockage patch
master2
{
//- Master side patch
name ACMI1_blockage;
type wall;
}
slave12 // dummy entries only
{
//- Slave side patch
name ACMI1_blockage;
type wall;
}
}
Boundary conditions must then be applied to all geometric patches in the usual,
manner, and the cases can be executed in parallel (as shown when running the
Allrun-parallel script) without any speacial treatment, i.e. the case set-up is
the same as when operating in serial mode.
checkMesh
---------
checkMesh will see the 'duplicate' boundary faces but does not know about
the area factors so will complain:
***Boundary openness (-0.0103092 2.3845e-17 3.80774e-17) possible hole in boundary description.
***Open cells found, max cell openness: 0.333333, number of open cells 136
<<Writing 136 non closed cells to set nonClosedCells
As long as these non-closed cells are on the ACMI they can be ignored.
paraFoam
--------
- display: it will not display the outside of the ACMI, there will be a hole.
- cuttingPlanes: they leave out the duplicate faces (i.e. the cells on
the ACMI patches)
- interpolation: the interpolation does not take into account the
area-weights on the ACMI.
pointFields
-----------
Same as paraFoam: the interpolation does not take into account the
area-weights on the ACMI.

View File

@ -0,0 +1,32 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libfvMotionSolvers.so");
motionSolver solidBody;
cellZone inletChannel;
solidBodyMotionFunction oscillatingLinearMotion;
amplitude (0 0.5 0);
omega 3.14; // rad/s (.5 rps)
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu 1e-6;
// ************************************************************************* //

View File

@ -0,0 +1,30 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
RASModel kEpsilon;
turbulence on;
printCoeffs on;
}
// ************************************************************************* //

View File

@ -0,0 +1,103 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
scale 1;
vertices
(
(0 0.3 0)
(1 0.3 0)
(1 0.7 0)
(0 0.7 0)
(0 0.3 0.1)
(1 0.3 0.1)
(1 0.7 0.1)
(0 0.7 0.1)
(1 0 0)
(3 0 0)
(3 1 0)
(1 1 0)
(1 0 0.1)
(3 0 0.1)
(3 1 0.1)
(1 1 0.1)
);
blocks
(
// hex (0 1 2 3 4 5 6 7) (20 20 1) simpleGrading (1 1 1)
// hex (8 9 10 11 12 13 14 15) (40 48 1) simpleGrading (1 1 1)
hex (0 1 2 3 4 5 6 7) (80 40 1) simpleGrading (1 1 1)
hex (8 9 10 11 12 13 14 15) (80 96 1) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
inlet
{
type patch;
faces
(
(0 4 7 3)
);
}
outlet
{
type patch;
faces
(
(10 14 13 9)
);
}
walls
{
type wall;
faces
(
(3 7 6 2)
(1 5 4 0)
(11 15 14 10)
(9 13 12 8)
);
}
couple1
{
type patch;
faces
(
(2 6 5 1)
);
}
couple2
{
type patch;
faces
(
(8 12 15 11)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //

View File

@ -0,0 +1,53 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application pimpleFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 5;
deltaT 0.005;
writeControl adjustableRunTime;
writeInterval 0.05;
purgeWrite 0;
writeFormat ascii;
writePrecision 10;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
adjustTimeStep true;
maxCo 0.5;
// ************************************************************************* //

View File

@ -0,0 +1,111 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createBafflesDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Whether to convert internal faces only (so leave boundary faces intact).
// This is only relevant if your face selection type can pick up boundary
// faces.
internalFacesOnly false;
// Baffles to create.
baffles
{
// NOTE: cyclicAMI patches MUST BE defined PRIOR to their associted
// blockage patches
ACMI1
{
//- Use predefined faceZone to select faces and orientation.
type faceZone;
zoneName couple1Faces;
patches
{
master
{
//- Master side patch
name ACMI1_couple;
type cyclicACMI;
matchTolerance 0.0001;
neighbourPatch ACMI2_couple;
nonOverlapPatch ACMI1_blockage;
transform noOrdering;
}
slave // not used since we're manipulating a boundary patch
{
//- Slave side patch
name ACMI1_couple;
type patch;
}
master2
{
//- Master side patch
name ACMI1_blockage;
type wall;
}
slave2 // not used since we're manipulating a boundary patch
{
//- Slave side patch
name ACMI1_blockage;
type wall;
}
}
}
ACMI2
{
//- Use predefined faceZone to select faces and orientation.
type faceZone;
zoneName couple2Faces;
patches
{
master
{
//- Master side patch
name ACMI2_couple;
type cyclicACMI;
matchTolerance 0.0001;
neighbourPatch ACMI1_couple;
nonOverlapPatch ACMI2_blockage;
transform noOrdering;
}
slave // not used since we're manipulating a boundary patch
{
//- Slave side patch
name ACMI2_couple;
type patch;
}
master2
{
//- Master side patch
name ACMI2_blockage;
type wall;
}
slave2 // not used since we're manipulating a boundary patch
{
//- Slave side patch
name ACMI2_blockage;
type wall;
}
}
}
}
// ************************************************************************* //

View File

@ -0,0 +1,28 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
method scotch;
coeffs
{
n (1 4 1);
//delta 0.001; // default=0.001
//order xyz; // default=xzy
}
// ************************************************************************* //

View File

@ -0,0 +1,56 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) cellLimited Gauss linear 1;
}
divSchemes
{
default none;
// div(phi,U) Gauss upwind;
div(phi,U) Gauss linearUpwind grad(U);
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear limited corrected 0.33;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default limited corrected 0.33;
}
// ************************************************************************* //

View File

@ -0,0 +1,77 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"pcorr.*"
{
solver GAMG;
tolerance 1e-2;
relTol 0;
smoother GaussSeidel;
cacheAgglomeration no;
maxIter 50;
}
p
{
$pcorr;
tolerance 1e-5;
relTol 0.01;
}
pFinal
{
$p;
tolerance 1e-10;
relTol 0;
}
"(U|k|epsilon)"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-6;
relTol 0.1;
}
"(U|k|epsilon)Final"
{
$U;
tolerance 1e-6;
relTol 0;
}
}
PIMPLE
{
correctPhi no;
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
// "(U|k|epsilon).*" 1;
}
cache
{
grad(U);
}
// ************************************************************************* //

View File

@ -0,0 +1,89 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
// Get both sides of ami
// ~~~~~~~~~~~~~~~~~~~~~
// Create faceZone for patch couple1
{
name couple1FaceSet;
type faceSet;
action new;
source patchToFace;
sourceInfo
{
name couple1;
}
}
{
name couple1Faces;
type faceZoneSet;
action new;
source setToFaceZone;
sourceInfo
{
faceSet couple1FaceSet;
}
}
// Create faceZone for patch couple2
{
name couple2FaceSet;
type faceSet;
action new;
source patchToFace;
sourceInfo
{
name couple2;
}
}
{
name couple2Faces;
type faceZoneSet;
action new;
source setToFaceZone;
sourceInfo
{
faceSet couple2FaceSet;
}
}
// Create cellZone for moving cells in inlet channel
{
name inletChannelCellSet;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (-100 -100 -100) (1.0001 100 100);
}
}
{
name inletChannel;
type cellZoneSet;
action new;
source setToCellZone;
sourceInfo
{
set inletChannelCellSet;
}
}
);
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
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
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value uniform (0 -5 0);
}
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
outerCylinder
{
type noSlip;
}
"propeller.*"
{
type movingWallVelocity;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 0.0495;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
wall
{
type epsilonWallFunction;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.06;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type fixedValue;
value $internalField;
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
wall
{
type kqRWallFunction;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,46 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
wall
{
type nutkWallFunction;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform 0;
}
wall
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,12 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
cleanCase0
# Remove surfaces and features
rm -f constant/triSurface/propellerTip.obj.gz > /dev/null 2>&1
rm -f constant/triSurface/*.eMesh* > /dev/null 2>&1
rm -rf constant/extendedFeatureEdgeMesh > /dev/null 2>&1
#------------------------------------------------------------------------------

View File

@ -0,0 +1,11 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
./Allrun.pre
runApplication decomposePar
runParallel $(getApplication)
runApplication reconstructPar
#------------------------------------------------------------------------------

View File

@ -0,0 +1,30 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
# copy propeller surface from resources directory
cp $FOAM_TUTORIALS/resources/geometry/propellerTip.obj.gz constant/triSurface/
# - meshing
runApplication blockMesh
runApplication surfaceFeatureExtract
runApplication snappyHexMesh -overwrite
runApplication renumberMesh -overwrite
# force removal of fields generated by snappy
rm -rf 0
# - generate face/cell sets and zones
runApplication topoSet -dict system/createInletOutletSets.topoSetDict
# - create the inlet/outlet and AMI patches
runApplication createPatch -overwrite
# - test by running moveDynamicMes
#runApplication moveDynamicMesh -checkAMI
# - set the initial fields
restore0Dir
#------------------------------------------------------------------------------

View File

@ -0,0 +1,32 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libfvMotionSolvers.so");
motionSolver solidBody;
cellZone innerCylinderSmall;
solidBodyMotionFunction rotatingMotion;
origin (0 0 0);
axis (0 1 0);
omega 158; // rad/s
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu 1e-6;
// ************************************************************************* //

View File

@ -0,0 +1,304 @@
# Wavefront OBJ file
# Regions:
# 0 ascii
#
# points : 100
# triangles : 196
#
v 0.0857323 0.1 -0.135092
v -0.0857323 0.1 -0.135092
v -0.0857323 0.1 0.135092
v 0.0857323 0.1 0.135092
v 0.158738 0.1 -0.0200533
v -0.158738 0.1 -0.0200533
v -0.158738 0.1 0.0200533
v 0.158738 0.1 0.0200533
v 0.0681247 0.1 -0.144772
v -0.0681247 0.1 -0.144772
v -0.0681247 0.1 0.144772
v 0.0681247 0.1 0.144772
v 0.154973 0.1 -0.0397904
v -0.154973 0.1 -0.0397904
v -0.154973 0.1 0.0397904
v 0.154973 0.1 0.0397904
v 0.0100465 0.1 -0.159684
v -0.0100465 0.1 -0.159684
v -0.0100465 0.1 0.159684
v 0.0100465 0.1 0.159684
v 0.148764 0.1 -0.0588999
v -0.148764 0.1 -0.0588999
v -0.148764 0.1 0.0588999
v 0.148764 0.1 0.0588999
v 0.140209 0.1 -0.0770806
v -0.140209 0.1 -0.0770806
v -0.140209 0.1 0.0770806
v 0.140209 0.1 0.0770806
v 0.0494427 0.1 -0.152169
v -0.0494427 0.1 -0.152169
v -0.0494427 0.1 0.152169
v 0.0494427 0.1 0.152169
v 0.16 0.1 0
v -0.16 0.1 6.56331e-11
v 0.101988 0.1 -0.123282
v -0.101988 0.1 -0.123282
v -0.101988 0.1 0.123282
v 0.101988 0.1 0.123282
v 0.029981 0.1 -0.157166
v -0.029981 0.1 -0.157166
v -0.029981 0.1 0.157166
v 0.029981 0.1 0.157166
v 0.129443 0.1 -0.0940456
v -0.129443 0.1 -0.0940456
v -0.129443 0.1 0.0940456
v 0.129443 0.1 0.0940456
v 0.116635 0.1 -0.109528
v -0.116635 0.1 -0.109528
v -0.116635 0.1 0.109528
v 0.116635 0.1 0.109528
v 0.0857323 -0.6 -0.135092
v -0.0857323 -0.6 -0.135092
v -0.0857323 -0.6 0.135092
v 0.0857323 -0.6 0.135092
v 0.158738 -0.6 -0.0200533
v -0.158738 -0.6 -0.0200533
v -0.158738 -0.6 0.0200533
v 0.158738 -0.6 0.0200533
v 0.0681247 -0.6 -0.144772
v -0.0681247 -0.6 -0.144772
v -0.0681247 -0.6 0.144772
v 0.0681247 -0.6 0.144772
v 0.154973 -0.6 -0.0397904
v -0.154973 -0.6 -0.0397904
v -0.154973 -0.6 0.0397904
v 0.154973 -0.6 0.0397904
v 0.0100465 -0.6 -0.159684
v -0.0100465 -0.6 -0.159684
v -0.0100465 -0.6 0.159684
v 0.0100465 -0.6 0.159684
v 0.148764 -0.6 -0.0588999
v -0.148764 -0.6 -0.0588999
v -0.148764 -0.6 0.0588999
v 0.148764 -0.6 0.0588999
v 0.140209 -0.6 -0.0770806
v -0.140209 -0.6 -0.0770806
v -0.140209 -0.6 0.0770806
v 0.140209 -0.6 0.0770806
v 0.0494427 -0.6 -0.152169
v -0.0494427 -0.6 -0.152169
v -0.0494427 -0.6 0.152169
v 0.0494427 -0.6 0.152169
v 0.16 -0.6 0
v -0.16 -0.6 6.56331e-11
v 0.101988 -0.6 -0.123282
v -0.101988 -0.6 -0.123282
v -0.101988 -0.6 0.123282
v 0.101988 -0.6 0.123282
v 0.029981 -0.6 -0.157166
v -0.029981 -0.6 -0.157166
v -0.029981 -0.6 0.157166
v 0.029981 -0.6 0.157166
v 0.129443 -0.6 -0.0940456
v -0.129443 -0.6 -0.0940456
v -0.129443 -0.6 0.0940456
v 0.129443 -0.6 0.0940456
v 0.116635 -0.6 -0.109528
v -0.116635 -0.6 -0.109528
v -0.116635 -0.6 0.109528
v 0.116635 -0.6 0.109528
g ascii
f 33 83 5
f 55 5 83
f 5 55 13
f 63 13 55
f 13 63 21
f 71 21 63
f 21 71 25
f 75 25 71
f 25 75 43
f 93 43 75
f 43 93 47
f 97 47 93
f 47 97 35
f 85 35 97
f 35 85 1
f 51 1 85
f 1 51 9
f 59 9 51
f 9 59 29
f 79 29 59
f 29 79 39
f 89 39 79
f 39 89 17
f 67 17 89
f 17 67 18
f 68 18 67
f 18 68 40
f 90 40 68
f 40 90 30
f 80 30 90
f 30 80 10
f 60 10 80
f 10 60 2
f 52 2 60
f 2 52 36
f 86 36 52
f 36 86 48
f 98 48 86
f 48 98 44
f 94 44 98
f 44 94 26
f 76 26 94
f 26 76 22
f 72 22 76
f 22 72 14
f 64 14 72
f 14 64 6
f 56 6 64
f 6 56 34
f 84 34 56
f 34 84 7
f 57 7 84
f 7 57 15
f 65 15 57
f 15 65 23
f 73 23 65
f 23 73 27
f 77 27 73
f 27 77 45
f 95 45 77
f 45 95 49
f 99 49 95
f 49 99 37
f 87 37 99
f 37 87 3
f 53 3 87
f 3 53 11
f 61 11 53
f 11 61 31
f 81 31 61
f 31 81 41
f 91 41 81
f 41 91 19
f 69 19 91
f 19 69 20
f 70 20 69
f 20 70 42
f 92 42 70
f 42 92 32
f 82 32 92
f 32 82 12
f 62 12 82
f 12 62 4
f 54 4 62
f 4 54 38
f 88 38 54
f 38 88 50
f 100 50 88
f 50 100 46
f 96 46 100
f 46 96 28
f 78 28 96
f 28 78 24
f 74 24 78
f 24 74 16
f 66 16 74
f 16 66 8
f 58 8 66
f 8 58 33
f 83 33 58
f 13 21 5
f 21 25 5
f 5 25 33
f 33 25 8
f 25 43 8
f 43 47 8
f 47 35 8
f 35 1 8
f 1 9 8
f 9 29 8
f 29 39 8
f 39 17 8
f 17 18 8
f 18 40 8
f 40 30 8
f 30 10 8
f 10 2 8
f 2 36 8
f 36 48 8
f 48 44 8
f 44 26 8
f 26 22 8
f 22 14 8
f 14 6 8
f 6 34 8
f 34 7 8
f 8 7 16
f 16 7 24
f 7 15 24
f 15 23 24
f 24 23 28
f 28 23 46
f 46 23 50
f 50 23 38
f 38 23 4
f 23 27 4
f 27 45 4
f 45 49 4
f 49 37 4
f 37 3 4
f 4 3 12
f 12 3 32
f 32 3 42
f 42 3 20
f 20 3 19
f 19 3 41
f 41 3 31
f 11 31 3
f 66 74 58
f 74 78 58
f 58 78 83
f 83 78 55
f 78 96 55
f 96 100 55
f 100 88 55
f 88 54 55
f 54 62 55
f 62 82 55
f 82 92 55
f 92 70 55
f 70 69 55
f 69 91 55
f 91 81 55
f 81 61 55
f 61 53 55
f 53 87 55
f 87 99 55
f 99 95 55
f 95 77 55
f 77 73 55
f 73 65 55
f 65 57 55
f 57 84 55
f 84 56 55
f 55 56 63
f 63 56 71
f 56 64 71
f 64 72 71
f 71 72 75
f 75 72 93
f 93 72 97
f 97 72 85
f 85 72 51
f 72 76 51
f 76 94 51
f 94 98 51
f 98 86 51
f 86 52 51
f 51 52 59
f 59 52 79
f 79 52 89
f 89 52 67
f 67 52 68
f 68 52 90
f 90 52 80
f 60 80 52

View File

@ -0,0 +1,364 @@
# Wavefront OBJ file
# Regions:
# 0 ascii
#
# points : 120
# triangles : 236
#
v 0.109625 0.06 -0.0488084
v 0.0488084 0.06 -0.109625
v -0.0488084 0.06 -0.109625
v -0.109625 0.06 -0.0488084
v -0.109625 0.06 0.0488084
v -0.0488084 0.06 0.109625
v 0.0488084 0.06 0.109625
v 0.109625 0.06 0.0488084
v 0.097082 0.06 -0.0705342
v 0.0705342 0.06 -0.097082
v -0.0705342 0.06 -0.097082
v -0.097082 0.06 -0.0705342
v -0.097082 0.06 0.0705342
v -0.0705342 0.06 0.097082
v 0.0705342 0.06 0.097082
v 0.097082 0.06 0.0705342
v 0.103923 0.06 -0.06
v 0.06 0.06 -0.103923
v -0.06 0.06 -0.103923
v -0.103923 0.06 -0.06
v -0.103923 0.06 0.06
v -0.06 0.06 0.103923
v 0.06 0.06 0.103923
v 0.103923 0.06 0.06
v 0.12 0.06 0
v -2.46124e-11 0.06 -0.12
v -0.12 0.06 4.92248e-11
v 7.38372e-11 0.06 0.12
v 0.0891774 0.06 -0.0802957
v 0.0802957 0.06 -0.0891774
v -0.0802957 0.06 -0.0891774
v -0.0891774 0.06 -0.0802957
v -0.0891774 0.06 0.0802957
v -0.0802957 0.06 0.0891774
v 0.0802957 0.06 0.0891774
v 0.0891774 0.06 0.0802957
v 0.114127 0.06 -0.037082
v 0.037082 0.06 -0.114127
v -0.037082 0.06 -0.114127
v -0.114127 0.06 -0.037082
v -0.114127 0.06 0.037082
v -0.037082 0.06 0.114127
v 0.037082 0.06 0.114127
v 0.114127 0.06 0.037082
v 0.117378 0.06 -0.0249494
v 0.0249494 0.06 -0.117378
v -0.0249494 0.06 -0.117378
v -0.117378 0.06 -0.0249494
v -0.117378 0.06 0.0249494
v -0.0249494 0.06 0.117378
v 0.0249494 0.06 0.117378
v 0.117378 0.06 0.0249494
v 0.119343 0.06 -0.0125434
v 0.0125434 0.06 -0.119343
v -0.0125434 0.06 -0.119343
v -0.119343 0.06 -0.0125434
v -0.119343 0.06 0.0125434
v -0.0125434 0.06 0.119343
v 0.0125434 0.06 0.119343
v 0.119343 0.06 0.0125434
v 0.109625 -0.08 -0.0488084
v 0.0488084 -0.08 -0.109625
v -0.0488084 -0.08 -0.109625
v -0.109625 -0.08 -0.0488084
v -0.109625 -0.08 0.0488084
v -0.0488084 -0.08 0.109625
v 0.0488084 -0.08 0.109625
v 0.109625 -0.08 0.0488084
v 0.097082 -0.08 -0.0705342
v 0.0705342 -0.08 -0.097082
v -0.0705342 -0.08 -0.097082
v -0.097082 -0.08 -0.0705342
v -0.097082 -0.08 0.0705342
v -0.0705342 -0.08 0.097082
v 0.0705342 -0.08 0.097082
v 0.097082 -0.08 0.0705342
v 0.103923 -0.08 -0.06
v 0.06 -0.08 -0.103923
v -0.06 -0.08 -0.103923
v -0.103923 -0.08 -0.06
v -0.103923 -0.08 0.06
v -0.06 -0.08 0.103923
v 0.06 -0.08 0.103923
v 0.103923 -0.08 0.06
v 0.12 -0.08 0
v -2.46124e-11 -0.08 -0.12
v -0.12 -0.08 4.92248e-11
v 7.38372e-11 -0.08 0.12
v 0.0891774 -0.08 -0.0802957
v 0.0802957 -0.08 -0.0891774
v -0.0802957 -0.08 -0.0891774
v -0.0891774 -0.08 -0.0802957
v -0.0891774 -0.08 0.0802957
v -0.0802957 -0.08 0.0891774
v 0.0802957 -0.08 0.0891774
v 0.0891774 -0.08 0.0802957
v 0.114127 -0.08 -0.037082
v 0.037082 -0.08 -0.114127
v -0.037082 -0.08 -0.114127
v -0.114127 -0.08 -0.037082
v -0.114127 -0.08 0.037082
v -0.037082 -0.08 0.114127
v 0.037082 -0.08 0.114127
v 0.114127 -0.08 0.037082
v 0.117378 -0.08 -0.0249494
v 0.0249494 -0.08 -0.117378
v -0.0249494 -0.08 -0.117378
v -0.117378 -0.08 -0.0249494
v -0.117378 -0.08 0.0249494
v -0.0249494 -0.08 0.117378
v 0.0249494 -0.08 0.117378
v 0.117378 -0.08 0.0249494
v 0.119343 -0.08 -0.0125434
v 0.0125434 -0.08 -0.119343
v -0.0125434 -0.08 -0.119343
v -0.119343 -0.08 -0.0125434
v -0.119343 -0.08 0.0125434
v -0.0125434 -0.08 0.119343
v 0.0125434 -0.08 0.119343
v 0.119343 -0.08 0.0125434
g ascii
f 25 85 53
f 113 53 85
f 53 113 45
f 45 113 105
f 45 105 37
f 97 37 105
f 37 97 1
f 61 1 97
f 1 61 17
f 17 61 77
f 17 77 9
f 9 77 69
f 9 69 29
f 89 29 69
f 29 89 30
f 90 30 89
f 30 90 10
f 70 10 90
f 10 70 18
f 18 70 78
f 18 78 2
f 2 78 62
f 2 62 38
f 98 38 62
f 38 98 46
f 106 46 98
f 46 106 54
f 54 106 114
f 54 114 26
f 86 26 114
f 26 86 55
f 115 55 86
f 55 115 47
f 47 115 107
f 47 107 39
f 99 39 107
f 39 99 3
f 63 3 99
f 3 63 19
f 19 63 79
f 19 79 11
f 11 79 71
f 11 71 31
f 91 31 71
f 31 91 32
f 92 32 91
f 32 92 12
f 72 12 92
f 12 72 20
f 20 72 80
f 20 80 4
f 4 80 64
f 4 64 40
f 100 40 64
f 40 100 48
f 108 48 100
f 48 108 56
f 56 108 116
f 56 116 27
f 87 27 116
f 27 87 57
f 117 57 87
f 57 117 49
f 49 117 109
f 49 109 41
f 101 41 109
f 41 101 5
f 65 5 101
f 5 65 21
f 21 65 81
f 21 81 13
f 13 81 73
f 13 73 33
f 93 33 73
f 33 93 34
f 94 34 93
f 34 94 14
f 74 14 94
f 14 74 22
f 22 74 82
f 22 82 6
f 6 82 66
f 6 66 42
f 102 42 66
f 42 102 50
f 110 50 102
f 50 110 58
f 58 110 118
f 58 118 28
f 88 28 118
f 28 88 59
f 119 59 88
f 59 119 51
f 51 119 111
f 51 111 43
f 103 43 111
f 43 103 7
f 67 7 103
f 7 67 23
f 23 67 83
f 23 83 15
f 15 83 75
f 15 75 35
f 95 35 75
f 35 95 36
f 96 36 95
f 36 96 16
f 76 16 96
f 16 76 24
f 24 76 84
f 24 84 8
f 8 84 68
f 8 68 44
f 104 44 68
f 44 104 52
f 112 52 104
f 52 112 60
f 60 112 120
f 60 120 25
f 85 25 120
f 45 37 53
f 37 1 53
f 53 1 25
f 25 1 60
f 1 17 60
f 60 17 52
f 52 17 44
f 44 17 8
f 8 17 24
f 24 17 16
f 16 17 36
f 36 17 35
f 35 17 15
f 15 17 23
f 23 17 7
f 7 17 43
f 43 17 51
f 51 17 59
f 59 17 28
f 28 17 58
f 58 17 50
f 50 17 42
f 42 17 6
f 6 17 22
f 22 17 14
f 14 17 34
f 17 9 34
f 9 29 34
f 34 29 33
f 33 29 13
f 13 29 21
f 21 29 5
f 5 29 41
f 41 29 49
f 49 29 57
f 57 29 27
f 27 29 56
f 56 29 48
f 48 29 40
f 40 29 4
f 4 29 20
f 20 29 12
f 12 29 32
f 32 29 31
f 31 29 11
f 29 30 11
f 30 10 11
f 11 10 19
f 19 10 3
f 3 10 39
f 39 10 47
f 47 10 55
f 55 10 26
f 26 10 54
f 54 10 46
f 46 10 38
f 38 10 2
f 18 2 10
f 112 104 120
f 104 68 120
f 120 68 85
f 85 68 113
f 68 84 113
f 113 84 105
f 105 84 97
f 97 84 61
f 61 84 77
f 77 84 69
f 69 84 89
f 89 84 90
f 90 84 70
f 70 84 78
f 78 84 62
f 62 84 98
f 98 84 106
f 106 84 114
f 114 84 86
f 86 84 115
f 115 84 107
f 107 84 99
f 99 84 63
f 63 84 79
f 79 84 71
f 71 84 91
f 84 76 91
f 76 96 91
f 91 96 92
f 92 96 72
f 72 96 80
f 80 96 64
f 64 96 100
f 100 96 108
f 108 96 116
f 116 96 87
f 87 96 117
f 117 96 109
f 109 96 101
f 101 96 65
f 65 96 81
f 81 96 73
f 73 96 93
f 93 96 94
f 94 96 74
f 96 95 74
f 95 75 74
f 74 75 82
f 82 75 66
f 66 75 102
f 102 75 110
f 110 75 118
f 118 75 88
f 88 75 119
f 119 75 111
f 111 75 103
f 103 75 67
f 83 67 75

View File

@ -0,0 +1,304 @@
# Wavefront OBJ file
# Regions:
# 0 ascii
#
# points : 100
# triangles : 196
#
v 0.297634 0.2 -0.0376
v -0.297634 0.2 -0.0376
v -0.297634 0.2 0.0376
v 0.297634 0.2 0.0376
v 0.160748 0.2 -0.253298
v -0.160748 0.2 -0.253298
v -0.160748 0.2 0.253298
v 0.160748 0.2 0.253298
v 0.0562144 0.2 -0.294686
v -0.0562144 0.2 -0.294686
v -0.0562144 0.2 0.294686
v 0.0562144 0.2 0.294686
v 0.191227 0.2 -0.231154
v -0.191227 0.2 -0.231154
v -0.191227 0.2 0.231154
v 0.191227 0.2 0.231154
v 0.278933 0.2 -0.110437
v -0.278933 0.2 -0.110437
v -0.278933 0.2 0.110437
v 0.278933 0.2 0.110437
v 0.262892 0.2 -0.144526
v -0.262892 0.2 -0.144526
v -0.262892 0.2 0.144526
v 0.262892 0.2 0.144526
v 0.0188372 0.2 -0.299408
v -0.0188372 0.2 -0.299408
v -0.0188372 0.2 0.299408
v 0.0188372 0.2 0.299408
v 0.127734 0.2 -0.271448
v -0.127734 0.2 -0.271448
v -0.127734 0.2 0.271448
v 0.127734 0.2 0.271448
v 0.3 0.2 0
v -0.3 0.2 1.23062e-10
v 0.0927051 0.2 -0.285317
v -0.0927051 0.2 -0.285317
v -0.0927051 0.2 0.285317
v 0.0927051 0.2 0.285317
v 0.290575 0.2 -0.074607
v -0.290575 0.2 -0.074607
v -0.290575 0.2 0.074607
v 0.290575 0.2 0.074607
v 0.242705 0.2 -0.176336
v -0.242705 0.2 -0.176336
v -0.242705 0.2 0.176336
v 0.242705 0.2 0.176336
v 0.218691 0.2 -0.205364
v -0.218691 0.2 -0.205364
v -0.218691 0.2 0.205364
v 0.218691 0.2 0.205364
v 0.297634 -0.8 -0.0376
v -0.297634 -0.8 -0.0376
v -0.297634 -0.8 0.0376
v 0.297634 -0.8 0.0376
v 0.160748 -0.8 -0.253298
v -0.160748 -0.8 -0.253298
v -0.160748 -0.8 0.253298
v 0.160748 -0.8 0.253298
v 0.0562144 -0.8 -0.294686
v -0.0562144 -0.8 -0.294686
v -0.0562144 -0.8 0.294686
v 0.0562144 -0.8 0.294686
v 0.191227 -0.8 -0.231154
v -0.191227 -0.8 -0.231154
v -0.191227 -0.8 0.231154
v 0.191227 -0.8 0.231154
v 0.278933 -0.8 -0.110437
v -0.278933 -0.8 -0.110437
v -0.278933 -0.8 0.110437
v 0.278933 -0.8 0.110437
v 0.262892 -0.8 -0.144526
v -0.262892 -0.8 -0.144526
v -0.262892 -0.8 0.144526
v 0.262892 -0.8 0.144526
v 0.0188372 -0.8 -0.299408
v -0.0188372 -0.8 -0.299408
v -0.0188372 -0.8 0.299408
v 0.0188372 -0.8 0.299408
v 0.127734 -0.8 -0.271448
v -0.127734 -0.8 -0.271448
v -0.127734 -0.8 0.271448
v 0.127734 -0.8 0.271448
v 0.3 -0.8 0
v -0.3 -0.8 1.23062e-10
v 0.0927051 -0.8 -0.285317
v -0.0927051 -0.8 -0.285317
v -0.0927051 -0.8 0.285317
v 0.0927051 -0.8 0.285317
v 0.290575 -0.8 -0.074607
v -0.290575 -0.8 -0.074607
v -0.290575 -0.8 0.074607
v 0.290575 -0.8 0.074607
v 0.242705 -0.8 -0.176336
v -0.242705 -0.8 -0.176336
v -0.242705 -0.8 0.176336
v 0.242705 -0.8 0.176336
v 0.218691 -0.8 -0.205364
v -0.218691 -0.8 -0.205364
v -0.218691 -0.8 0.205364
v 0.218691 -0.8 0.205364
g ascii
f 33 83 1
f 51 1 83
f 1 51 39
f 89 39 51
f 39 89 17
f 67 17 89
f 17 67 21
f 21 67 71
f 21 71 43
f 93 43 71
f 43 93 47
f 97 47 93
f 47 97 13
f 63 13 97
f 13 63 5
f 5 63 55
f 5 55 29
f 79 29 55
f 29 79 35
f 85 35 79
f 35 85 9
f 59 9 85
f 9 59 25
f 75 25 59
f 25 75 26
f 76 26 75
f 26 76 10
f 60 10 76
f 10 60 36
f 86 36 60
f 36 86 30
f 80 30 86
f 30 80 6
f 56 6 80
f 6 56 14
f 14 56 64
f 14 64 48
f 98 48 64
f 48 98 44
f 94 44 98
f 44 94 22
f 72 22 94
f 22 72 18
f 18 72 68
f 18 68 40
f 90 40 68
f 40 90 2
f 52 2 90
f 2 52 34
f 84 34 52
f 34 84 3
f 53 3 84
f 3 53 41
f 91 41 53
f 41 91 19
f 69 19 91
f 19 69 23
f 23 69 73
f 23 73 45
f 95 45 73
f 45 95 49
f 99 49 95
f 49 99 15
f 65 15 99
f 15 65 7
f 7 65 57
f 7 57 31
f 81 31 57
f 31 81 37
f 87 37 81
f 37 87 11
f 61 11 87
f 11 61 27
f 77 27 61
f 27 77 28
f 78 28 77
f 28 78 12
f 62 12 78
f 12 62 38
f 88 38 62
f 38 88 32
f 82 32 88
f 32 82 8
f 58 8 82
f 8 58 16
f 16 58 66
f 16 66 50
f 100 50 66
f 50 100 46
f 96 46 100
f 46 96 24
f 74 24 96
f 24 74 20
f 20 74 70
f 20 70 42
f 92 42 70
f 42 92 4
f 54 4 92
f 4 54 33
f 83 33 54
f 17 21 39
f 21 43 39
f 43 47 39
f 47 13 39
f 13 5 39
f 5 29 39
f 29 35 39
f 35 9 39
f 9 25 39
f 25 26 39
f 26 10 39
f 10 36 39
f 36 30 39
f 30 6 39
f 6 14 39
f 14 48 39
f 48 44 39
f 44 22 39
f 22 18 39
f 18 40 39
f 39 40 1
f 1 40 33
f 33 40 4
f 4 40 42
f 40 2 42
f 2 34 42
f 34 3 42
f 3 41 42
f 42 41 20
f 20 41 24
f 41 19 24
f 19 23 24
f 24 23 46
f 46 23 50
f 50 23 16
f 23 45 16
f 45 49 16
f 49 15 16
f 16 15 8
f 8 15 32
f 32 15 38
f 38 15 12
f 12 15 28
f 28 15 27
f 27 15 11
f 11 15 37
f 37 15 31
f 7 31 15
f 70 74 92
f 74 96 92
f 96 100 92
f 100 66 92
f 66 58 92
f 58 82 92
f 82 88 92
f 88 62 92
f 62 78 92
f 78 77 92
f 77 61 92
f 61 87 92
f 87 81 92
f 81 57 92
f 57 65 92
f 65 99 92
f 99 95 92
f 95 73 92
f 73 69 92
f 69 91 92
f 91 53 92
f 53 84 92
f 84 52 92
f 52 90 92
f 92 90 54
f 54 90 83
f 83 90 51
f 90 68 51
f 68 72 51
f 51 72 89
f 89 72 67
f 67 72 71
f 71 72 93
f 93 72 97
f 97 72 63
f 72 94 63
f 94 98 63
f 98 64 63
f 63 64 55
f 55 64 79
f 79 64 85
f 85 64 59
f 59 64 75
f 75 64 76
f 76 64 60
f 60 64 86
f 86 64 80
f 56 80 64

View File

@ -0,0 +1,30 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
RASModel kEpsilon;
turbulence on;
printCoeffs on;
}
// ************************************************************************* //

View File

@ -0,0 +1,72 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
scale 1;
vertices
(
(-0.3 -0.81 -0.3)
( 0.3 -0.81 -0.3)
( 0.3 0.21 -0.3)
(-0.3 0.21 -0.3)
(-0.3 -0.81 0.3)
( 0.3 -0.81 0.3)
( 0.3 0.21 0.3)
(-0.3 0.21 0.3)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (12 20 12) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
walls
{
type wall;
faces
(
(2 6 5 1)
(0 3 2 1)
(0 4 7 3)
(4 5 6 7)
);
}
inlet
{
type patch;
faces
(
(3 7 6 2)
);
}
outlet
{
type patch;
faces
(
(1 5 4 0)
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,62 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application pimpleFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 0.1;
deltaT 1e-5;
writeControl adjustableRunTime;
writeInterval 0.001;
////- For testing with moveDynamicMesh
//deltaT 0.01;
//writeControl timeStep;
//writeInterval 1;
purgeWrite 0;
writeFormat binary;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
adjustTimeStep yes;
maxCo 2;
functions
{
#includeFunc Q
#include "surfaces"
#include "forces"
}
// ************************************************************************* //

View File

@ -0,0 +1,78 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name boundaryFaces;
type faceSet;
action new;
source patchToFace;
sourceInfo
{
name outerCylinder;
}
}
{
name outletFaces;
type faceSet;
action new;
source faceToFace;
sourceInfo
{
set boundaryFaces;
}
}
{
name inletFaces;
type faceSet;
action new;
source faceToFace;
sourceInfo
{
set boundaryFaces;
}
}
{
name outletFaces;
type faceSet;
action subset;
source normalToFace;
sourceInfo
{
normal (0 -1 0); // Vector
cos 0.3; // Tolerance (max cos of angle)
}
}
{
name inletFaces;
type faceSet;
action subset;
source normalToFace;
sourceInfo
{
normal (0 1 0); // Vector
cos 0.3; // Tolerance (max cos of angle)
}
}
);
// ************************************************************************* //

View File

@ -0,0 +1,74 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
// with transformations (i.e. cyclics).
pointSync false;
// Patches to create.
patches
(
{
//- Master side patch
name AMI1;
patchInfo
{
type cyclicAMI;
matchTolerance 0.0001;
neighbourPatch AMI2;
transform noOrdering;
}
constructFrom patches;
patches (innerCylinderSmall);
}
{
//- Slave side patch
name AMI2;
patchInfo
{
type cyclicAMI;
matchTolerance 0.0001;
neighbourPatch AMI1;
transform noOrdering;
}
constructFrom patches;
patches (innerCylinderSmall_slave);
}
{
name inlet;
patchInfo
{
type patch;
}
constructFrom set;
set inletFaces;
}
{
name outlet;
patchInfo
{
type patch;
}
constructFrom set;
set outletFaces;
}
);
// ************************************************************************* //

View File

@ -0,0 +1,28 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
method hierarchical;
coeffs
{
n (1 4 1);
//delta 0.001; // default=0.001
//order xyz; // default=xzy
}
// ************************************************************************* //

View File

@ -0,0 +1,30 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
forces
{
type forces;
libs ("libforces.so");
writeControl timeStep;
timeInterval 1;
log yes;
patches ("propeller.*");
rho rhoInf; // Indicates incompressible
log true;
rhoInf 1; // Redundant for incompressible
CofR (0 0 0); // Rotation around centre line of propeller
pitchAxis (0 1 0);
}
// ************************************************************************* //

View File

@ -0,0 +1,56 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) cellLimited Gauss linear 1;
}
divSchemes
{
default none;
// div(phi,U) Gauss upwind;
div(phi,U) Gauss linearUpwind grad(U);
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear limited corrected 0.33;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default limited corrected 0.33;
}
// ************************************************************************* //

View File

@ -0,0 +1,78 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"pcorr.*"
{
solver GAMG;
tolerance 1e-2;
relTol 0;
smoother DICGaussSeidel;
cacheAgglomeration no;
maxIter 50;
}
p
{
$pcorr;
tolerance 1e-5;
relTol 0.01;
}
pFinal
{
$p;
tolerance 1e-6;
relTol 0;
}
"(U|k|epsilon)"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-6;
relTol 0.1;
}
"(U|k|epsilon)Final"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-6;
relTol 0;
}
}
PIMPLE
{
correctPhi no;
nOuterCorrectors 2;
nCorrectors 1;
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
"(U|k|epsilon).*" 1;
}
cache
{
grad(U);
}
// ************************************************************************* //

View File

@ -0,0 +1,476 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Which of the steps to run
castellatedMesh true;
snap true;
addLayers false;
// Geometry. Definition of all surfaces. All surfaces are of class
// searchableSurface.
// Surfaces are used
// - to specify refinement for any mesh cell intersecting it
// - to specify refinement for any mesh cell inside/outside/near
// - to 'snap' the mesh boundary to the surface
geometry
{
innerCylinder.obj
{
type triSurfaceMesh;
name innerCylinder;
regions
{
ascii
{
name innerCylinder;
}
}
}
innerCylinderSmall.obj
{
type triSurfaceMesh;
name innerCylinderSmall;
regions
{
ascii
{
name innerCylinderSmall;
}
}
}
outerCylinder.obj
{
type triSurfaceMesh;
name outerCylinder;
regions
{
ascii
{
name outerCylinder;
}
}
}
propellerTip.obj.gz
{
type triSurfaceMesh;
name propellerTip;
regions
{
ascii
{
name propellerTip;
}
}
}
propellerStem1.obj
{
type triSurfaceMesh;
name propellerStem1;
regions
{
ascii
{
name propellerStem1;
}
}
}
propellerStem2.obj
{
type triSurfaceMesh;
name propellerStem2;
regions
{
ascii
{
name propellerStem2;
}
}
}
propellerStem3.obj
{
type triSurfaceMesh;
name propellerStem3;
regions
{
ascii
{
name propellerStem3;
}
}
}
};
// Settings for the castellatedMesh generation.
castellatedMeshControls
{
// Refinement parameters
// ~~~~~~~~~~~~~~~~~~~~~
// If local number of cells is >= maxLocalCells on any processor
// switches from from refinement followed by balancing
// (current method) to (weighted) balancing before refinement.
maxLocalCells 100000;
// Overall cell limit (approximately). Refinement will stop immediately
// upon reaching this number so a refinement level might not complete.
// Note that this is the number of cells before removing the part which
// is not 'visible' from the keepPoint. The final number of cells might
// actually be a lot less.
maxGlobalCells 2000000;
// The surface refinement loop might spend lots of iterations refining just a
// few cells. This setting will cause refinement to stop if <= minimumRefine
// are selected for refinement. Note: it will at least do one iteration
// (unless the number of cells to refine is 0)
minRefinementCells 0;
// Allow a certain level of imbalance during refining
// (since balancing is quite expensive)
// Expressed as fraction of perfect balance (= overall number of cells /
// nProcs). 0=balance always.
maxLoadUnbalance 0.10;
// Number of buffer layers between different levels.
// 1 means normal 2:1 refinement restriction, larger means slower
// refinement.
nCellsBetweenLevels 2;
// Explicit feature edge refinement
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies a level for any cell intersected by its edges.
// This is a featureEdgeMesh, read from constant/triSurface for now.
features
(
{
file "innerCylinderSmall.eMesh";
level 4;
}
{
file "outerCylinder.eMesh";
level 0;
}
{
file "propellerTip.eMesh";
level 4;
}
// {
// file "propellerStem1.eMesh";
// level 4;
// }
{
file "propellerStem2.eMesh";
level 4;
}
{
file "propellerStem3.eMesh";
level 4;
}
);
// Surface based refinement
// ~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies two levels for every surface. The first is the minimum level,
// every cell intersecting a surface gets refined up to the minimum level.
// The second level is the maximum level. Cells that 'see' multiple
// intersections where the intersections make an
// angle > resolveFeatureAngle get refined up to the maximum level.
refinementSurfaces
{
innerCylinderSmall
{
level (4 4);
faceType boundary;
cellZone innerCylinderSmall;
faceZone innerCylinderSmall;
cellZoneInside inside;
}
outerCylinder
{
level (0 0);
}
propellerTip
{
level (4 5);
}
propellerStem1
{
level (4 4);
}
propellerStem2
{
level (4 4);
}
propellerStem3
{
level (4 4);
}
}
// Resolve sharp angles
resolveFeatureAngle 30;
// Region-wise refinement
// ~~~~~~~~~~~~~~~~~~~~~~
// Specifies refinement level for cells in relation to a surface. One of
// three modes
// - distance. 'levels' specifies per distance to the surface the
// wanted refinement level. The distances need to be specified in
// descending order.
// - inside. 'levels' is only one entry and only the level is used. All
// cells inside the surface get refined up to the level. The surface
// needs to be closed for this to be possible.
// - outside. Same but cells outside.
refinementRegions
{
innerCylinder
{
mode inside;
levels ((1E15 3));
}
innerCylinderSmall
{
mode inside;
levels ((1E15 4));
}
}
// Mesh selection
// ~~~~~~~~~~~~~~
// After refinement patches get added for all refinementSurfaces and
// all cells intersecting the surfaces get put into these patches. The
// section reachable from the locationInMesh is kept.
// NOTE: This point should never be on a face, always inside a cell, even
// after refinement.
locationInMesh (0.01 -0.5 0.01);
// Whether any faceZones (as specified in the refinementSurfaces)
// are only on the boundary of corresponding cellZones or also allow
// free-standing zone faces. Not used if there are no faceZones.
allowFreeStandingZoneFaces false;
}
// Settings for the snapping.
snapControls
{
//- Number of patch smoothing iterations before finding correspondence
// to surface
nSmoothPatch 3;
//- Relative distance for points to be attracted by surface feature point
// or edge. True distance is this factor times local
// maximum edge length.
tolerance 4.0; // 1.0;
//- Number of mesh displacement relaxation iterations.
nSolveIter 300;
//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;
// Feature snapping
// Number of feature edge snapping iterations.
// Leave out altogether to disable.
nFeatureSnapIter 10;
// Detect (geometric only) features by sampling the surface
// (default=false).
implicitFeatureSnap true;
// Use castellatedMeshControls::features (default = true)
explicitFeatureSnap false;
// Detect features between multiple surfaces
// (only for explicitFeatureSnap, default = false)
multiRegionFeatureSnap true;
}
// Settings for the layer addition.
addLayersControls
{
// Are the thickness parameters below relative to the undistorted
// size of the refined cell outside layer (true) or absolute sizes (false).
relativeSizes true;
// Per final patch (so not geometry!) the layer information
layers
{
}
// Expansion factor for layer mesh
expansionRatio 1.0;
// Wanted thickness of final added cell layer. If multiple layers
// is the thickness of the layer furthest away from the wall.
// Relative to undistorted size of cell outside layer.
// See relativeSizes parameter.
finalLayerThickness 0.3;
// Minimum thickness of cell layer. If for any reason layer
// cannot be above minThickness do not add layer.
// Relative to undistorted size of cell outside layer.
minThickness 0.1;
// If points get not extruded do nGrow layers of connected faces that are
// also not grown. This helps convergence of the layer addition process
// close to features.
// Note: changed(corrected) w.r.t 1.7.x! (didn't do anything in 1.7.x)
nGrow 0;
// Advanced settings
// When not to extrude surface. 0 is flat surface, 90 is when two faces
// are perpendicular
featureAngle 30;
// Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 3;
// Number of smoothing iterations of surface normals
nSmoothSurfaceNormals 1;
// Number of smoothing iterations of interior mesh movement direction
nSmoothNormals 3;
// Smooth layer thickness over surface patches
nSmoothThickness 10;
// Stop layer growth on highly warped cells
maxFaceThicknessRatio 0.5;
// Reduce layer growth where ratio thickness to medial
// distance is large
maxThicknessToMedialRatio 0.3;
// Angle used to pick up medial axis points
// Note: changed(corrected) w.r.t 1.7.x! 90 degrees corresponds to 130
// in 1.7.x.
minMedianAxisAngle 90;
// Create buffer region for new layer terminations
nBufferCellsNoExtrude 0;
// Overall max number of layer addition iterations. The mesher will exit
// if it reaches this number of iterations; possibly with an illegal
// mesh.
nLayerIter 50;
}
// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
//- Maximum non-orthogonality allowed. Set to 180 to disable.
maxNonOrtho 65;
//- Max skewness allowed. Set to <0 to disable.
maxBoundarySkewness 20;
maxInternalSkewness 4;
//- Max concaveness allowed. Is angle (in degrees) below which concavity
// is allowed. 0 is straight face, <0 would be convex face.
// Set to 180 to disable.
maxConcave 80;
//- Minimum pyramid volume. Is absolute volume of cell pyramid.
// Set to a sensible fraction of the smallest cell volume expected.
// Set to very negative number (e.g. -1E30) to disable.
minVol 1e-13;
//- Minimum quality of the tet formed by the face-centre
// and variable base point minimum decomposition triangles and
// the cell centre. This has to be a positive number for tracking
// to work. Set to very negative number (e.g. -1E30) to
// disable.
// <0 = inside out tet,
// 0 = flat tet
// 1 = regular tet
minTetQuality -1; // 1e-30;
//- Minimum face area. Set to <0 to disable.
minArea -1;
//- Minimum face twist. Set to <-1 to disable. dot product of face normal
// and face centre triangles normal
minTwist 0.01;
//- Minimum normalised cell determinant
// 1 = hex, <= 0 = folded or flattened illegal cell
minDeterminant 0.001;
//- minFaceWeight (0 -> 0.5)
minFaceWeight 0.05;
//- minVolRatio (0 -> 1)
minVolRatio 0.01;
//must be >0 for Fluent compatibility
minTriangleTwist -1;
// Advanced
//- Number of error distribution iterations
nSmoothScale 4;
//- Amount to scale back displacement at error points
errorReduction 0.75;
// Optional : some meshing phases allow usage of relaxed rules.
// See e.g. addLayersControls::nRelaxedIter.
relaxed
{
//- Maximum non-orthogonality allowed. Set to 180 to disable.
maxNonOrtho 75;
}
}
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1e-6;
// ************************************************************************* //

View File

@ -0,0 +1,59 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object surfaceFeatureExtractDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//innerCylinder.obj
//{
// #include "surfaceFeatureExtractDictDefaults"
//}
innerCylinderSmall.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
outerCylinder.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
propellerStem1.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
propellerStem2.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
propellerStem3.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
propellerTip.obj
{
#include "surfaceFeatureExtractDictDefaults"
}
// ************************************************************************* //

View File

@ -0,0 +1,15 @@
// How to obtain raw features (extractFromFile || extractFromSurface)
extractionMethod extractFromSurface;
// Mark edges whose adjacent surface normals are at an angle less
// than includedAngle as features
// - 0 : selects no edges
// - 180: selects all edges
includedAngle 150;
trimFeatures
{
// Remove features with fewer than the specified number of edges
minElem 10;
}

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
surfaces
{
type surfaces;
libs ("libsampling.so");
writeControl writeTime;
surfaceFormat vtk;
fields (p U Q);
interpolationScheme cellPoint;
surfaces
(
zNormal
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0 0 0);
normal (0 0 1);
}
interpolate true;
}
isoQ
{
type isoSurface;
isoField Q;
isoValue 1000;
interpolate true;
}
propeller
{
type patch;
patches ("propeller.*");
interpolate true;
}
);
}
// ************************************************************************* //

View File

@ -0,0 +1,11 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
( cd wingMotion_snappyHexMesh && cleanCase )
( cd wingMotion2D_simpleFoam && cleanCase0 )
( cd wingMotion2D_pimpleFoam && cleanCase0 )
#------------------------------------------------------------------------------

View File

@ -0,0 +1,38 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
# Make 3D mesh in slab of cells.
(
cd wingMotion_snappyHexMesh || exit 1
runApplication blockMesh
runApplication snappyHexMesh -overwrite
)
# Make a 2D mesh by extruding a patch and solve to steady state.
(
cd wingMotion2D_simpleFoam || exit 1
runApplication extrudeMesh
runApplication createPatch -overwrite
restore0Dir
runApplication simpleFoam
)
# Copy mesh from the steady state case, map the results to a mesh motion case,
# then solve transient.
(
cd wingMotion2D_pimpleFoam || exit 1
\rm -rf constant/polyMesh
\cp -r ../wingMotion2D_simpleFoam/constant/polyMesh constant
restore0Dir
runApplication mapFields ../wingMotion2D_simpleFoam -sourceTime latestTime -consistent
\mv 0/pointDisplacement.unmapped 0/pointDisplacement
runApplication decomposePar
runParallel $(getApplication)
runApplication reconstructPar
)
#------------------------------------------------------------------------------

View File

@ -0,0 +1,45 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "include/initialConditions"
dimensions [0 1 -1 0 0 0 0];
internalField uniform $flowVelocity;
boundaryField
{
#include "include/fixedInlet"
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value $internalField;
}
wing
{
type movingWallVelocity;
value uniform (0 0 0);
}
#include "include/frontBackTopBottomPatches"
}
// ************************************************************************* //

View File

@ -0,0 +1,15 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
inlet
{
type fixedValue;
value $internalField;
}
// ************************************************************************* //

View File

@ -0,0 +1,24 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
topAndBottom
{
type slip;
}
front
{
type empty;
}
back
{
type empty;
}
// ************************************************************************* //

View File

@ -0,0 +1,14 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
flowVelocity (100 0 0);
pressure 0;
turbulentKE 37;
turbulentOmega 32;
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "include/initialConditions"
dimensions [0 2 -2 0 0 0 0];
internalField uniform $turbulentKE;
boundaryField
{
#include "include/fixedInlet"
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
wing
{
type kqRWallFunction;
value $internalField;
}
#include "include/frontBackTopBottomPatches"
}
// ************************************************************************* //

View File

@ -0,0 +1,38 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
wing
{
type nutkWallFunction;
value uniform 0;
}
"(front|back|topAndBottom|inlet|outlet)"
{
type calculated;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "include/initialConditions"
dimensions [0 0 -1 0 0 0 0];
internalField uniform $turbulentOmega;
boundaryField
{
#include "include/fixedInlet"
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
wing
{
type omegaWallFunction;
value $internalField;
}
#include "include/frontBackTopBottomPatches"
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "include/initialConditions"
dimensions [0 2 -2 0 0 0 0];
internalField uniform $pressure;
boundaryField
{
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value $internalField;
}
wing
{
type zeroGradient;
}
#include "include/frontBackTopBottomPatches"
}
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class pointVectorField;
object pointDisplacement;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 0 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
wing
{
type calculated;
value uniform (0 0 0);
}
front
{
type empty;
}
back
{
type empty;
}
".*"
{
type fixedValue;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,88 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolverLibs ("libsixDoFRigidBodyMotion.so");
motionSolver sixDoFRigidBodyMotion;
patches (wing);
innerDistance 0.3;
outerDistance 1;
mass 22.9;
centreOfMass (0.4974612746 -0.01671895744 0.125);
momentOfInertia (1.958864357 3.920839234 2.057121362);
orientation
(
0.9953705935 0.09611129781 0
-0.09611129781 0.9953705935 0
0 0 1
);
angularMomentum (0 0 -2);
g (0 -9.81 0);
rho rhoInf;
rhoInf 1;
report on;
solver
{
type symplectic;
}
constraints
{
yLine
{
sixDoFRigidBodyMotionConstraint line;
centreOfRotation (0.25 0.007 0.125);
direction (0 1 0);
}
zAxis
{
sixDoFRigidBodyMotionConstraint axis;
axis (0 0 1);
}
}
restraints
{
verticalSpring
{
sixDoFRigidBodyMotionRestraint linearSpring;
anchor (0.25 0.007 0.125);
refAttachmentPt (0.25 0.007 0.125);
stiffness 4000;
damping 2;
restLength 0;
}
axialSpring
{
sixDoFRigidBodyMotionRestraint linearAxialAngularSpring;
axis (0 0 1);
stiffness 700;
damping 0.5;
referenceOrientation $orientation;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu 1e-05;
// ************************************************************************* //

View File

@ -0,0 +1,30 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
RASModel kOmegaSST;
turbulence on;
printCoeffs on;
}
// ************************************************************************* //

View File

@ -0,0 +1,64 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application pimpleFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 5;
deltaT 1e-5;
writeControl adjustableRunTime;
writeInterval 1e-2;
purgeWrite 0;
writeFormat ascii;
writePrecision 10;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
adjustTimeStep yes;
maxCo 0.9;
functions
{
sixDoFRigidBodyState
{
type sixDoFRigidBodyState;
libs ("libsixDoFRigidBodyState.so");
angleFormat degrees;
}
#include "ensightWrite"
}
// ************************************************************************* //

View File

@ -0,0 +1,28 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
method simple;
coeffs
{
n (2 2 1);
//delta 0.001; // default=0.001
//order xyz; // default=xzy
}
// ************************************************************************* //

View File

@ -0,0 +1,59 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss linearUpwind grad(U);
div(phi,k) Gauss limitedLinear 1;
div(phi,omega) Gauss limitedLinear 1;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear limited corrected 0.5;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -0,0 +1,91 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"pcorr.*"
{
solver GAMG;
tolerance 0.02;
relTol 0;
smoother GaussSeidel;
}
p
{
$pcorr;
tolerance 1e-7;
relTol 0.01;
}
pFinal
{
$p;
tolerance 1e-7;
relTol 0;
}
"(U|k|omega)"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-06;
relTol 0.1;
}
"(U|k|omega)Final"
{
$U;
tolerance 1e-06;
relTol 0;
}
cellDisplacement
{
solver GAMG;
tolerance 1e-5;
relTol 0;
smoother GaussSeidel;
}
}
PIMPLE
{
correctPhi yes;
nOuterCorrectors 2;
nCorrectors 1;
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
fields
{
p 0.3;
}
equations
{
"(U|k|omega)" 0.7;
"(U|k|omega)Final" 1.0;
}
}
cache
{
grad(U);
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "include/initialConditions"
dimensions [0 1 -1 0 0 0 0];
internalField uniform $flowVelocity;
boundaryField
{
#include "include/fixedInlet"
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value $internalField;
}
wing
{
type noSlip;
}
#include "include/frontBackTopBottomPatches"
}
// ************************************************************************* //

View File

@ -0,0 +1,15 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
inlet
{
type fixedValue;
value $internalField;
}
// ************************************************************************* //

View File

@ -0,0 +1,24 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
topAndBottom
{
type slip;
}
front
{
type empty;
}
back
{
type empty;
}
// ************************************************************************* //

View File

@ -0,0 +1,14 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
flowVelocity (100 0 0);
pressure 0;
turbulentKE 37;
turbulentOmega 32;
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "include/initialConditions"
dimensions [0 2 -2 0 0 0 0];
internalField uniform $turbulentKE;
boundaryField
{
#include "include/fixedInlet"
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
wing
{
type kqRWallFunction;
value $internalField;
}
#include "include/frontBackTopBottomPatches"
}
// ************************************************************************* //

View File

@ -0,0 +1,38 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
wing
{
type nutkWallFunction;
value uniform 0;
}
"(front|back|topAndBottom|inlet|outlet)"
{
type calculated;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "include/initialConditions"
dimensions [0 0 -1 0 0 0 0];
internalField uniform $turbulentOmega;
boundaryField
{
#include "include/fixedInlet"
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
wing
{
type omegaWallFunction;
value $internalField;
}
#include "include/frontBackTopBottomPatches"
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "include/initialConditions"
dimensions [0 2 -2 0 0 0 0];
internalField uniform $pressure;
boundaryField
{
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value $internalField;
}
wing
{
type zeroGradient;
}
#include "include/frontBackTopBottomPatches"
}
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu 1e-05;
// ************************************************************************* //

View File

@ -0,0 +1,29 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType RAS;
RAS
{
RASModel kOmegaSST;
turbulence on;
printCoeffs on;
}
// ************************************************************************* //

View File

@ -0,0 +1,65 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application simpleFoam;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 3000;
deltaT 1;
writeControl runTime;
writeInterval 100;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
functions
{
forces
{
type forces;
libs ("libforces.so");
writeControl timeStep;
writeInterval 10;
patches (wing);
rho rhoInf;
log true;
rhoInf 1;
CofR (0.4974612746 -0.01671895744 0.125);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
pointSync false;
patches
(
{
// Name of new patch
name front;
// Type of new patch
patchInfo
{
type empty;
}
// How to construct: either from 'patches' or 'set'
constructFrom patches;
// If constructFrom = patches : names of patches. Wildcards allowed.
patches (symFront);
}
{
// Name of new patch
name back;
// Type of new patch
patchInfo
{
type empty;
}
// How to construct: either from 'patches' or 'set'
constructFrom patches;
// If constructFrom = patches : names of patches. Wildcards allowed.
patches (symBack);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,53 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object extrudeMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// What to extrude:
// patch : from patch of another case ('sourceCase')
// mesh : as above but with original case included
// surface : from externally read surface
constructFrom patch;
sourceCase "../wingMotion_snappyHexMesh";
sourcePatches (symFront);
// If construct from patch: patch to use for back (can be same as sourcePatch)
exposedPatchName symBack;
// Flip surface normals before usage. Valid only for extrude from surface or
// patch.
flipNormals false;
//- Linear extrusion in point-normal direction
extrudeModel linearNormal;
nLayers 1;
expansionRatio 1.0;
linearNormalCoeffs
{
thickness 0.05;
}
// Do front and back need to be merged? Usually only makes sense for 360
// degree wedges.
mergeFaces false; //true;
// Merge small edges. Fraction of bounding box.
mergeTol 0;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -0,0 +1,59 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,k) bounded Gauss upwind;
div(phi,omega) bounded Gauss upwind;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //

View File

@ -0,0 +1,78 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver GAMG;
tolerance 1e-7;
relTol 0.1;
smoother GaussSeidel;
}
U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}
k
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}
omega
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.1;
nSweeps 1;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
fields
{
p 0.3;
}
equations
{
"(U|k|omega)" 0.7;
"(U|k|omega)Final" 1.0;
}
}
cache
{
grad(U);
}
// ************************************************************************* //

View File

@ -0,0 +1,94 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
scale 1;
vertices
(
(-1.2 -2.2 -0.1)
( 5 -2.2 -0.1)
( 5 2.2 -0.1)
(-1.2 2.2 -0.1)
(-1.2 -2.2 0.1)
( 5 -2.2 0.1)
( 5 2.2 0.1)
(-1.2 2.2 0.1)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (36 24 1) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
topAndBottom
{
type patch;
faces
(
(3 7 6 2)
(1 5 4 0)
);
}
inlet
{
type patch;
faces
(
(0 4 7 3)
);
}
outlet
{
type patch;
faces
(
(2 6 5 1)
);
}
symFront
{
type symmetryPlane;
faces
(
(4 5 6 7)
);
}
symBack
{
type symmetryPlane;
faces
(
(0 3 2 1)
);
}
);
mergePatchPairs
(
);
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application snappyHexMesh;
startFrom latestTime;
startTime 0;
stopAt endTime;
endTime 100;
deltaT 1;
writeControl runTime;
writeInterval 1;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
}
// ************************************************************************* //

View File

@ -0,0 +1,28 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 3;
method simple;
coeffs
{
n (1 3 1);
//delta 0.001; // default=0.001
//order xyz; // default=xzy
}
// ************************************************************************* //

View File

@ -0,0 +1,58 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss limitedLinearV 1;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phid,p) Gauss limitedLinear 1;
div(phi,K) Gauss limitedLinear 1;
div(phi,e) Gauss limitedLinear 1;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear limited corrected 0.5;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
// ************************************************************************* //

View File

@ -0,0 +1,51 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-12;
relTol 0;
}
rho
{
solver PCG;
preconditioner DIC;
tolerance 1e-08;
relTol 0;
}
"(U|e|k|epsilon|R)"
{
$p;
tolerance 1e-08;
relTol 0;
}
}
PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 2;
}
// ************************************************************************* //

View File

@ -0,0 +1,320 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object snappyHexMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Which of the steps to run
castellatedMesh true;
snap true;
addLayers true;
// Geometry. Definition of all surfaces. All surfaces are of class
// searchableSurface.
// Surfaces are used
// - to specify refinement for any mesh cell intersecting it
// - to specify refinement for any mesh cell inside/outside/near
// - to 'snap' the mesh boundary to the surface
geometry
{
wing_5degrees.obj
{
type triSurfaceMesh;
name wing;
}
refinementBox
{
type searchableBox;
min (-1 -1 -1);
max ( 5 1 1);
}
};
// Settings for the castellatedMesh generation.
castellatedMeshControls
{
// Refinement parameters
// ~~~~~~~~~~~~~~~~~~~~~
// If local number of cells is >= maxLocalCells on any processor
// switches from from refinement followed by balancing
// (current method) to (weighted) balancing before refinement.
maxLocalCells 100000;
// Overall cell limit (approximately). Refinement will stop immediately
// upon reaching this number so a refinement level might not complete.
// Note that this is the number of cells before removing the part which
// is not 'visible' from the keepPoint. The final number of cells might
// actually be a lot less.
maxGlobalCells 2000000;
// The surface refinement loop might spend lots of iterations refining just
// a few cells. This setting will cause refinement to stop if <=
// minimumRefine are selected for refinement. Note: it will at least do one
// iteration (unless the number of cells to refine is 0)
minRefinementCells 100;
// Number of buffer layers between different levels.
// 1 means normal 2:1 refinement restriction, larger means slower
// refinement.
nCellsBetweenLevels 6;
// Explicit feature edge refinement
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies a level for any cell intersected by its edges.
// This is a featureEdgeMesh, read from constant/triSurface for now.
features ();
// Surface based refinement
// ~~~~~~~~~~~~~~~~~~~~~~~~
// Specifies two levels for every surface. The first is the minimum level,
// every cell intersecting a surface gets refined up to the minimum level.
// The second level is the maximum level. Cells that 'see' multiple
// intersections where the intersections make an
// angle > resolveFeatureAngle get refined up to the maximum level.
refinementSurfaces
{
wing
{
// Surface-wise min and max refinement level
level (5 5);
}
}
// Resolve sharp angles on fridges
resolveFeatureAngle 30;
// Region-wise refinement
// ~~~~~~~~~~~~~~~~~~~~~~
// Specifies refinement level for cells in relation to a surface. One of
// three modes
// - distance. 'levels' specifies per distance to the surface the
// wanted refinement level. The distances need to be specified in
// descending order.
// - inside. 'levels' is only one entry and only the level is used. All
// cells inside the surface get refined up to the level. The surface
// needs to be closed for this to be possible.
// - outside. Same but cells outside.
refinementRegions
{
refinementBox
{
mode inside;
levels ((1e15 2));
}
}
// Mesh selection
// ~~~~~~~~~~~~~~
// After refinement patches get added for all refinementSurfaces and
// all cells intersecting the surfaces get put into these patches. The
// section reachable from the locationInMesh is kept.
// NOTE: This point should never be on a face, always inside a cell, even
// after refinement.
locationInMesh (-0.5 0 0);
// Whether any faceZones (as specified in the refinementSurfaces)
// are only on the boundary of corresponding cellZones or also allow
// free-standing zone faces. Not used if there are no faceZones.
allowFreeStandingZoneFaces true;
}
// Settings for the snapping.
snapControls
{
//- Number of patch smoothing iterations before finding correspondence
// to surface
nSmoothPatch 3;
//- Relative distance for points to be attracted by surface feature point
// or edge. True distance is this factor times local
// maximum edge length.
tolerance 4.0;
//- Number of mesh displacement relaxation iterations.
nSolveIter 30;
//- Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;
}
// Settings for the layer addition.
addLayersControls
{
// Are the thickness parameters below relative to the undistorted
// size of the refined cell outside layer (true) or absolute sizes (false).
relativeSizes true;
// Per final patch (so not geometry!) the layer information
layers
{
wing
{
nSurfaceLayers 3;
}
}
// Expansion factor for layer mesh
expansionRatio 1.3;
// Wanted thickness of final added cell layer. If multiple layers
// is the thickness of the layer furthest away from the wall.
// Relative to undistorted size of cell outside layer.
// See relativeSizes parameter.
finalLayerThickness 0.7;
// Minimum thickness of cell layer. If for any reason layer
// cannot be above minThickness do not add layer.
// Relative to undistorted size of cell outside layer.
// See relativeSizes parameter.
minThickness 0.25;
// If points get not extruded do nGrow layers of connected faces that are
// also not grown. This helps convergence of the layer addition process
// close to features.
// Note: changed(corrected) w.r.t 1.7.x! (didn't do anything in 1.7.x)
nGrow 0;
// Advanced settings
// When not to extrude surface. 0 is flat surface, 90 is when two faces
// are perpendicular
featureAngle 60;
// Maximum number of snapping relaxation iterations. Should stop
// before upon reaching a correct mesh.
nRelaxIter 5;
// Number of smoothing iterations of surface normals
nSmoothSurfaceNormals 1;
// Number of smoothing iterations of interior mesh movement direction
nSmoothNormals 3;
// Smooth layer thickness over surface patches
nSmoothThickness 10;
// Stop layer growth on highly warped cells
maxFaceThicknessRatio 0.5;
// Reduce layer growth where ratio thickness to medial
// distance is large
maxThicknessToMedialRatio 0.3;
// Angle used to pick up medial axis points
// Note: changed(corrected) w.r.t 16x! 90 degrees corresponds to 130 in 16x.
minMedianAxisAngle 90;
// Create buffer region for new layer terminations
nBufferCellsNoExtrude 0;
// Overall max number of layer addition iterations. The mesher will exit
// if it reaches this number of iterations; possibly with an illegal
// mesh.
nLayerIter 50;
}
// Generic mesh quality settings. At any undoable phase these determine
// where to undo.
meshQualityControls
{
//- Maximum non-orthogonality allowed. Set to 180 to disable.
maxNonOrtho 65;
//- Max skewness allowed. Set to <0 to disable.
maxBoundarySkewness 20;
maxInternalSkewness 4;
//- Max concaveness allowed. Is angle (in degrees) below which concavity
// is allowed. 0 is straight face, <0 would be convex face.
// Set to 180 to disable.
maxConcave 80;
//- Minimum pyramid volume. Is absolute volume of cell pyramid.
// Set to a sensible fraction of the smallest cell volume expected.
// Set to very negative number (e.g. -1E30) to disable.
minVol 1e-13;
//- Minimum quality of the tet formed by the face-centre
// and variable base point minimum decomposition triangles and
// the cell centre. Set to very negative number (e.g. -1E30) to
// disable.
// <0 = inside out tet,
// 0 = flat tet
// 1 = regular tet
minTetQuality 1e-30;
//- Minimum face area. Set to <0 to disable.
minArea -1;
//- Minimum face twist. Set to <-1 to disable. dot product of face normal
// and face centre triangles normal
minTwist 0.05;
//- Minimum normalised cell determinant
// 1 = hex, <= 0 = folded or flattened illegal cell
minDeterminant 0.001;
//- minFaceWeight (0 -> 0.5)
minFaceWeight 0.05;
//- minVolRatio (0 -> 1)
minVolRatio 0.01;
//must be >0 for Fluent compatibility
minTriangleTwist -1;
// Advanced
//- Number of error distribution iterations
nSmoothScale 4;
//- Amount to scale back displacement at error points
errorReduction 0.75;
}
// Advanced
// Merge tolerance. Is fraction of overall bounding box of initial mesh.
// Note: the write tolerance needs to be higher than this.
mergeTolerance 1e-6;
// ************************************************************************* //

View File

@ -0,0 +1,58 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
rotor
{
type movingWallVelocity;
value uniform (0 0 0);
}
stator
{
type movingWallVelocity;
value uniform (0 0 0);
}
front
{
type empty;
}
back
{
type empty;
}
AMI1
{
type cyclicAMI;
value $internalField;
}
AMI2
{
type cyclicAMI;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,60 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 20;
boundaryField
{
rotor
{
type epsilonWallFunction;
value $internalField;
}
stator
{
type epsilonWallFunction;
value $internalField;
}
front
{
type empty;
}
back
{
type empty;
}
AMI1
{
type cyclicAMI;
value $internalField;
}
AMI2
{
type cyclicAMI;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,60 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 1;
boundaryField
{
rotor
{
type kqRWallFunction;
value uniform 0;
}
stator
{
type kqRWallFunction;
value uniform 0;
}
front
{
type empty;
}
back
{
type empty;
}
AMI1
{
type cyclicAMI;
value $internalField;
}
AMI2
{
type cyclicAMI;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,60 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
rotor
{
type nutkWallFunction;
value uniform 0;
}
stator
{
type nutkWallFunction;
value uniform 0;
}
front
{
type empty;
}
back
{
type empty;
}
AMI1
{
type cyclicAMI;
value $internalField;
}
AMI2
{
type cyclicAMI;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,56 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
rotor
{
type zeroGradient;
}
stator
{
type zeroGradient;
}
front
{
type empty;
}
back
{
type empty;
}
AMI1
{
type cyclicAMI;
value $internalField;
}
AMI2
{
type cyclicAMI;
value $internalField;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,12 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
./makeMesh
#runApplication $(getApplication)
runApplication decomposePar
runParallel $(getApplication)
runApplication reconstructPar
#------------------------------------------------------------------------------

View File

@ -0,0 +1,30 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicMotionSolverFvMesh;
motionSolver solidBody;
cellZone rotor;
solidBodyMotionFunction rotatingMotion;
origin (0 0 0);
axis (0 0 1);
omega 6.2832; // rad/s
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu 1e-05;
// ************************************************************************* //

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType laminar;
// ************************************************************************* //

View File

@ -0,0 +1,11 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
m4 < system/blockMeshDict.m4 > system/blockMeshDict
runApplication blockMesh
runApplication topoSet
#------------------------------------------------------------------------------

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