ENH: overset: Initial release of overset capability.

Adds overset discretisation to selected physics:
- diffusion : overLaplacianDyMFoam
- incompressible steady : overSimpleFoam
- incompressible transient : overPimpleDyMFoam
- compressible transient: overRhoPimpleDyMFoam
- two-phase VOF: overInterDyMFoam

The overset method chosen is a parallel, fully implicit implementation
whereby the interpolation (from donor to acceptor) is inserted as an
adapted discretisation on the donor cells, such that the resulting matrix
can be solved using the standard linear solvers.

Above solvers come with a set of tutorials, showing how to create and set-up
simple simulations from scratch.
This commit is contained in:
mattijs
2017-06-14 09:51:02 +01:00
parent 69deec2e1c
commit fd665b4a3c
374 changed files with 29369 additions and 579 deletions

View File

@ -0,0 +1,62 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus-overset |
| \\ / 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
{
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
walls
{
//type slip;
type uniformFixedValue;
uniformValue (0 0 0);
}
hole
{
type movingWallVelocity;
value uniform (0 0 0);
}
// left1
// {
// type pressureInletOutletVelocity;
// value uniform (0 0 0);
// }
// left1
// {
// type fixedValue;
// value $internalField;
// }
//
// right1
// {
// type zeroGradient; //calculated;
// value $internalField;
// }
overset
{
type overset;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,64 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus-overset |
| \\ / 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
{
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
"(walls|hole)"
{
type zeroGradient;
}
// left1
// {
// type uniformTotalPressure;
// pressure table
// (
// (0 10)
// (1 40)
// );
// p0 40; // only used for restarts
// U U;
// phi phi;
// rho none;
// psi none;
// gamma 1;
// value uniform 40;
// }
// left1
// {
// type zeroGradient;
// }
//
// right1
// {
// type fixedValue; //calculated;
// value $internalField;
// }
overset
{
type overset;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus-overset |
| \\ / 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
{
".*"
{
type uniformFixedValue;
uniformValue (0 0 0);
}
hole
{
type zeroGradient;
}
overset
{
patchType overset;
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,37 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus-overset |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object zoneID;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
//- Set patchGroups for constraint patches
#include "${WM_PROJECT_DIR}/etc/caseDicts/setConstraintTypes"
overset
{
type overset;
}
".*"
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,14 @@
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
# Source tutorial clean functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -f constant/polyMesh/boundary
rm -f constant/polyMesh/zoneID
rm -f constant/cellInterpolationWeight
rm -rf 0
# ----------------------------------------------------------------- end-of-file

View File

@ -0,0 +1,14 @@
#!/bin/sh
. $WM_PROJECT_DIR/bin/tools/RunFunctions
./Allrun.pre
# Get application directory
application=`getApplication`
# Serial
#runApplication $application
# Parallel
runApplication decomposePar -cellDist
runParallel $application

View File

@ -0,0 +1,17 @@
#!/bin/sh
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
# Select cellSets
runApplication -s 1 topoSet
runApplication subsetMesh box -patch hole -overwrite
# Select cellSets
runApplication -s 2 topoSet
rm -rf 0 && cp -r 0.org 0
# Use cellSets to write zoneID
runApplication setFields

View File

@ -0,0 +1,3 @@
Transient, moving mesh
----------------------
Two turning rotors

View File

@ -0,0 +1,51 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus-overset |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dynamicFvMesh dynamicOversetFvMesh;
dynamicOversetFvMeshCoeffs
{
// layerRelax 0.3;
}
solver multiSolidBodyMotionSolver;
multiSolidBodyMotionSolverCoeffs
{
movingZone1
{
solidBodyMotionFunction rotatingMotion;
rotatingMotionCoeffs
{
origin (0.005 0.005 0.005);
axis (0 0 1);
omega 100.0;
}
}
movingZone2
{
solidBodyMotionFunction rotatingMotion;
rotatingMotionCoeffs
{
origin (0.009 0.005 0.005);
axis (0 0 1);
omega -100.0;
}
}
}
// ************************************************************************* //

View File

@ -0,0 +1,37 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus-overset |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-05;
CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 1;
}
BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 0;
n n [ 0 0 0 0 0 0 0 ] 1;
}
// ************************************************************************* //

View File

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

View File

@ -0,0 +1,140 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus-overset |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
convertToMeters 0.01;
vertices
(
( 0.00 0.0 0)
( 2.00 0.0 0)
( 2.00 1.0 0)
( 0.00 1.0 0)
( 0.00 0.0 1)
( 2.00 0.0 1)
( 2.00 1.0 1)
( 0.00 1.0 1)
// movingZone1
( 0.15 0.35 0)
( 0.85 0.35 0)
( 0.85 0.65 0)
( 0.15 0.65 0)
( 0.15 0.35 1)
( 0.85 0.35 1)
( 0.85 0.65 1)
( 0.15 0.65 1)
// movingZone2
( 0.75 0.15 0)
( 1.05 0.15 0)
( 1.05 0.85 0)
( 0.75 0.85 0)
( 0.75 0.15 1)
( 1.05 0.15 1)
( 1.05 0.85 1)
( 0.75 0.85 1)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (73 37 1) simpleGrading (1 1 1)
hex (8 9 10 11 12 13 14 15) movingZone1 (28 12 1) simpleGrading (1 1 1)
hex (16 17 18 19 20 21 22 23) movingZone2 (12 28 1) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
overset1
{
type overset;
faces
(
( 8 12 15 11)
(10 14 13 9)
(11 15 14 10)
( 9 13 12 8)
);
}
overset2
{
type overset;
faces
(
(16 20 23 19)
(18 22 21 17)
(19 23 22 18)
(17 21 20 16)
);
}
walls
{
type wall;
faces
(
(3 7 6 2)
(1 5 4 0)
(0 4 7 3)
(2 6 5 1)
);
}
// Populated by subsetMesh
hole
{
type wall;
faces ();
}
frontAndBack
{
type empty;
faces
(
(0 3 2 1)
(4 5 6 7)
);
}
frontAndBack1
{
type empty;
faces
(
( 8 11 10 9)
(12 13 14 15)
);
}
frontAndBack2
{
type empty;
faces
(
(16 19 18 17)
(20 21 22 23)
);
}
);
// ************************************************************************* //

View File

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

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;
note "mesh decomposition control dictionary";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 3;
method hierarchical;
hierarchicalCoeffs
{
n (3 1 1);
delta 0.001;
order xyz;
}
// ************************************************************************* //

View File

@ -0,0 +1,68 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus-overset |
| \\ / 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(T) Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss limitedLinearV 1;
div(phi,k) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1;
div(phi,R) Gauss limitedLinear 1;
div(R) Gauss linear;
div(phi,nuTilda) Gauss limitedLinear 1;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
laplacian(diffusivity,cellDisplacement) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
oversetInterpolation
{
method inverseDistance;
}
fluxRequired
{
default no;
pcorr ;
p ;
}
// ************************************************************************* //

View File

@ -0,0 +1,96 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus-overset |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
cellDisplacement
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
maxIter 100;
}
p
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-6;
relTol 0;
}
pFinal
{
$p;
}
pcorr
{
$p;
solver PCG;
preconditioner DIC;
}
pcorrFinal
{
$pcorr;
relTol 0;
}
"(U|k|epsilon)"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-6;
relTol 0;
}
"(U|k|epsilon)Final"
{
$U;
tolerance 1e-6;
relTol 0;
}
}
PIMPLE
{
momentumPredictor no;
correctPhi no;
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
ddtCorr false;
pRefPoint (0.0001 0.0001 0.001);
pRefValue 0.0;
}
relaxationFactors
{
fields
{
}
equations
{
".*" 1;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,57 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus-overset |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defaultFieldValues
(
volScalarFieldValue zoneID 123
);
regions
(
// Set cell values
// (does zerogradient on boundaries)
cellToCell
{
set c0;
fieldValues
(
volScalarFieldValue zoneID 0
);
}
cellToCell
{
set c1;
fieldValues
(
volScalarFieldValue zoneID 1
);
}
cellToCell
{
set c2;
fieldValues
(
volScalarFieldValue zoneID 2
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,116 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus-overset |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
actions
(
{
name c0;
type cellSet;
action new;
source regionsToCell;
sourceInfo
{
insidePoints ((0.001 0.001 0.001));
}
}
{
name c1;
type cellSet;
action new;
source cellToCell;
sourceInfo
{
set c0;
}
}
{
name c1;
type cellSet;
action invert;
}
{
name c2;
type cellSet;
action new;
source regionsToCell;
sourceInfo
{
insidePoints ((0.0076 0.00151 0.001));
set c1;
}
}
{
name c1;
type cellSet;
action delete;
source cellToCell;
sourceInfo
{
set c2;
}
}
// Select box to remove from region 1 and 2
{
name box;
type cellSet;
action new;
source cellToCell;
sourceInfo
{
set c1;
}
}
{
name box;
type cellSet;
action add;
source cellToCell;
sourceInfo
{
set c2;
}
}
{
name box;
type cellSet;
action subset;
source boxToCell;
sourceInfo
{
boxes
(
(0.0025 0.0045 -100)(0.0075 0.0055 100)
(0.0085 0.0025 -100)(0.0095 0.0075 100)
);
}
}
{
name box;
type cellSet;
action invert;
}
);
// ************************************************************************* //