mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: compressibleInterDyMFoam enhancements for mesh motion and sphere drop test case tutorial
This commit is contained in:
@ -0,0 +1,63 @@
|
||||
/*--------------------------------*- 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 T;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
innerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
value uniform 300;
|
||||
}
|
||||
outerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
value uniform 300;
|
||||
}
|
||||
top
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 300;
|
||||
value uniform 300;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
farFieldWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
sphere
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,63 @@
|
||||
/*--------------------------------*- 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 T.air;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
innerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
value uniform 300;
|
||||
}
|
||||
outerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
value uniform 300;
|
||||
}
|
||||
top
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 300;
|
||||
value uniform 300;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
farFieldWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
sphere
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,63 @@
|
||||
/*--------------------------------*- 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 T.water;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 1 0 0 0];
|
||||
|
||||
internalField uniform 300;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
innerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
value uniform 300;
|
||||
}
|
||||
outerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
value uniform 300;
|
||||
}
|
||||
top
|
||||
{
|
||||
type inletOutlet;
|
||||
inletValue uniform 300;
|
||||
value uniform 300;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
farFieldWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
sphere
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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 volVectorField;
|
||||
location "0";
|
||||
object U;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -1 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
innerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
outerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
farFieldWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
sphere
|
||||
{
|
||||
type movingWallVelocity;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,61 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus.master |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object alpha.walter;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 0 0 0 0 0 0];
|
||||
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
innerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
value uniform 0;
|
||||
}
|
||||
outerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
value uniform 0;
|
||||
}
|
||||
top
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
farFieldWall
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
sphere
|
||||
{
|
||||
type zeroGradient;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,65 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus.master |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object p;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 101325;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
innerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
value uniform 101325;
|
||||
}
|
||||
outerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
value uniform 101325;
|
||||
}
|
||||
top
|
||||
{
|
||||
type calculated;
|
||||
value uniform 101325;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type calculated;
|
||||
value uniform 101325;
|
||||
}
|
||||
farFieldWall
|
||||
{
|
||||
type calculated;
|
||||
value uniform 101325;
|
||||
}
|
||||
sphere
|
||||
{
|
||||
type calculated;
|
||||
value uniform 101325;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,68 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus.master |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class volScalarField;
|
||||
location "0";
|
||||
object p_rgh;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [1 -1 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 101325;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
innerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
value uniform 101325;
|
||||
}
|
||||
outerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
value uniform 101325;
|
||||
}
|
||||
top
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform 101325;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
gradient uniform 0;
|
||||
value uniform 101325;
|
||||
}
|
||||
farFieldWall
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
gradient uniform 0;
|
||||
value uniform 101325;
|
||||
}
|
||||
sphere
|
||||
{
|
||||
type fixedFluxPressure;
|
||||
gradient uniform 0;
|
||||
value uniform 101325;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,99 @@
|
||||
/*--------------------------------*- 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;
|
||||
location "0";
|
||||
object pointDisplacement;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#include "$FOAM_CASE/constant/dynamicMeshDict"
|
||||
#include "$FOAM_CASE/system/blockMeshDict"
|
||||
|
||||
dimensions [0 1 0 0 0 0 0];
|
||||
|
||||
internalField uniform (0 0 0);
|
||||
|
||||
boundaryField
|
||||
{
|
||||
farFieldWall
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
top
|
||||
{
|
||||
type fixedValue;
|
||||
value uniform (0 0 0);
|
||||
}
|
||||
sphere
|
||||
{
|
||||
type sixDoFRigidBodyDisplacement;
|
||||
centreOfMass (0 $:sphereCentreHeight 0);
|
||||
momentOfInertia (2e-3 2e-3 2e-3);
|
||||
velocity (0 -3.77 0);
|
||||
accelerationRelaxation 1;
|
||||
accelerationDamping 1;
|
||||
|
||||
mass 2.08e-3; // sphere mass 0.15 kg, 5 degree wedge
|
||||
// rhoInf -1; // needed only for solvers solving for
|
||||
// kinematic pressure
|
||||
report on;
|
||||
|
||||
constraints
|
||||
{
|
||||
maxIterations 500;
|
||||
|
||||
fixedLine1
|
||||
{
|
||||
sixDoFRigidBodyMotionConstraint line;
|
||||
centreOfRotation (0 0.147 0);
|
||||
direction (0 1 0);
|
||||
}
|
||||
|
||||
fixedOrientation1
|
||||
{
|
||||
sixDoFRigidBodyMotionConstraint orientation;
|
||||
}
|
||||
}
|
||||
|
||||
solver
|
||||
{
|
||||
type Newmark;
|
||||
}
|
||||
|
||||
value uniform ( 0 0 0 );
|
||||
}
|
||||
innerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
}
|
||||
outerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Source tutorial clean functions
|
||||
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
|
||||
rm -rf 0/
|
||||
cleanCase
|
||||
25
tutorials/multiphase/compressibleInterDyMFoam/laminar/sphereDrop/Allrun
Executable file
25
tutorials/multiphase/compressibleInterDyMFoam/laminar/sphereDrop/Allrun
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
runApplication topoSet
|
||||
|
||||
# remove empty patches
|
||||
runApplication createPatch -overwrite
|
||||
|
||||
# split mesh into 2 regions at the AMI coupled patch
|
||||
runApplication mergeOrSplitBaffles -overwrite
|
||||
|
||||
echo "Copying 0.org to 0"
|
||||
cp -r 0.org 0
|
||||
|
||||
runApplication setFields
|
||||
|
||||
(cd constant/polyMesh && ln -s ../../include/meshModifiers .)
|
||||
|
||||
runApplication $(getApplication)
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -0,0 +1,108 @@
|
||||
/*--------------------------------*- 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 binary;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object dynamicMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dynamicFvMesh dynamicMotionSolverTopoFvMesh;
|
||||
|
||||
motionSolverLibs ("libfvMotionSolvers.so");
|
||||
|
||||
solver displacementLayeredMotion;
|
||||
|
||||
displacementLayeredMotionCoeffs
|
||||
{
|
||||
// In addition to boundary conditions on pointDisplacement
|
||||
// we can also have boundary conditions on faceZones bordering cellZones.
|
||||
regions
|
||||
{
|
||||
LARTopCells
|
||||
{
|
||||
interpolationScheme oneSided;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
top // patch
|
||||
{
|
||||
type uniformFollow; // use pointDisplacement bc
|
||||
patch sphere; // fixed/static
|
||||
}
|
||||
|
||||
LARTopFaces
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
topBlock
|
||||
{
|
||||
interpolationScheme oneSided;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
LARTopFaces
|
||||
{
|
||||
type uniformFollow;
|
||||
patch sphere;
|
||||
}
|
||||
|
||||
centralTopFaces
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
centralBlock
|
||||
{
|
||||
interpolationScheme oneSided;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
centralTopFaces
|
||||
{
|
||||
type uniformFollow;
|
||||
patch sphere;
|
||||
}
|
||||
|
||||
centralBottomFaces
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bottomBlock
|
||||
{
|
||||
interpolationScheme oneSided;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
centralBottomFaces
|
||||
{
|
||||
type uniformFollow;
|
||||
patch sphere;
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type slip;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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 uniformDimensionedVectorField;
|
||||
location "constant";
|
||||
object g;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
dimensions [0 1 -2 0 0 0 0];
|
||||
value (0 -9.81 0 );
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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 | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
phases (water air);
|
||||
|
||||
pMin pMin [1 -1 -2 0 0 0 0] 1000;
|
||||
|
||||
sigma sigma [1 0 -2 0 0 0 0] 0.07;
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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;
|
||||
location "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
transport const;
|
||||
thermo hConst;
|
||||
equationOfState perfectGas;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
nMoles 1;
|
||||
molWeight 28.9;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cp 1007;
|
||||
Hf 0;
|
||||
}
|
||||
equationOfState
|
||||
{
|
||||
rho 1.27;
|
||||
R 90000;
|
||||
rho0 1.27;
|
||||
}
|
||||
transport
|
||||
{
|
||||
mu 1.84e-05;
|
||||
Pr 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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 "constant";
|
||||
object thermophysicalProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
thermoType
|
||||
{
|
||||
type heRhoThermo;
|
||||
mixture pureMixture;
|
||||
transport const;
|
||||
thermo hConst;
|
||||
equationOfState rhoConst;
|
||||
specie specie;
|
||||
energy sensibleInternalEnergy;
|
||||
}
|
||||
|
||||
mixture
|
||||
{
|
||||
specie
|
||||
{
|
||||
nMoles 1;
|
||||
molWeight 18.0;
|
||||
}
|
||||
equationOfState
|
||||
{
|
||||
rho 1027;
|
||||
}
|
||||
thermodynamics
|
||||
{
|
||||
Cp 4195;
|
||||
Hf 0;
|
||||
}
|
||||
transport
|
||||
{
|
||||
mu 3.645e-4;
|
||||
Pr 2.289;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,33 @@
|
||||
/*--------------------------------*- 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;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
phases (water air);
|
||||
|
||||
water
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu [0 2 -1 0 0 0 0] 1e-06;
|
||||
rho [1 -3 0 0 0 0 0] 998.2;
|
||||
}
|
||||
|
||||
air
|
||||
{
|
||||
transportModel Newtonian;
|
||||
nu [0 2 -1 0 0 0 0] 1.48e-05;
|
||||
rho [1 -3 0 0 0 0 0] 1;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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;
|
||||
location "constant";
|
||||
object turbulenceProperties;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
simulationType laminar;
|
||||
|
||||
RAS
|
||||
{
|
||||
RASModel laminar;
|
||||
|
||||
turbulence on;
|
||||
|
||||
printCoeffs off;
|
||||
}
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,43 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: 2.3.x |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class polyTopoChanger;
|
||||
location "constant/polyMesh";
|
||||
object meshModifiers;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
2
|
||||
(
|
||||
top
|
||||
{
|
||||
type layerAdditionRemoval;
|
||||
faceZoneName top;
|
||||
minLayerThickness 0.001;
|
||||
maxLayerThickness 0.03;
|
||||
thicknessFromVolume false;
|
||||
active true;
|
||||
}
|
||||
|
||||
bottom
|
||||
{
|
||||
type layerAdditionRemoval;
|
||||
faceZoneName bottom;
|
||||
// minLayerThickness 0.005;
|
||||
// maxLayerThickness 0.03;
|
||||
minLayerThickness 0.005;
|
||||
maxLayerThickness 0.03;
|
||||
thicknessFromVolume false;
|
||||
active true;
|
||||
}
|
||||
)
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,349 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM Extend Project: Open Source CFD |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object blockMeshDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
convertToMeters 1;
|
||||
|
||||
// Domain
|
||||
axisLevel 0.0; // x-coord of axis (right boundary of domain)
|
||||
bottomLevel -1.0; // y-coord of bottom of domain
|
||||
topLevel 1.0; // y-coord of top of domain
|
||||
farFieldWall -0.572; // x-coord of far field wall
|
||||
wedgeAngle 5.0; // Wedge angle in degrees
|
||||
// Size of block moving with sphere (no cell deformation), in sphere radii
|
||||
// above and below centre of sphere
|
||||
upperSphereBlock 5.0;
|
||||
lowerSphereBlock 5.0;
|
||||
sphereLayerThickness 2.0; // Total layer thickness in sphere radii
|
||||
|
||||
// Sphere
|
||||
sphereRadius 0.028;
|
||||
sphereCentreHeight 0.147; // y-coord of sphere centre
|
||||
|
||||
pi #calc "Foam::constant::mathematical::pi";
|
||||
|
||||
// Calculated positions
|
||||
sphereRadiusPosition #calc "-1.0*(1.0 + $sphereLayerThickness)*$sphereRadius"; //"-1.0* $sphereRadius";
|
||||
AMIBlockPosition #calc "2.0*$sphereRadiusPosition + $sphereRadius";
|
||||
// Centre plane is z=0, so use half of wedge angle to calculate pos and neg
|
||||
// z-positions
|
||||
halfAngleRad #calc "0.5*$wedgeAngle*$pi/180.0";
|
||||
tanAlpha #calc "tan($halfAngleRad)";
|
||||
// Multiply by -1 because tan give negative value
|
||||
firstBlockPosDepth #calc "-1.0*$tanAlpha*$sphereRadiusPosition";
|
||||
firstBlockNegDepth #calc "-1.0*$firstBlockPosDepth";
|
||||
AMIBlockPosDepth #calc "-1.0*$tanAlpha*$AMIBlockPosition";
|
||||
AMIBlockNegDepth #calc "-1.0*$AMIBlockPosDepth";
|
||||
farFieldPosDepth #calc "-1.0*$tanAlpha*$farFieldWall";
|
||||
farFieldNegDepth #calc "-1.0*$farFieldPosDepth";
|
||||
|
||||
bottomBlockTopHeight #calc "$sphereCentreHeight - $lowerSphereBlock*$sphereRadius";
|
||||
topBlockBottomHeight #calc "$sphereCentreHeight + $upperSphereBlock*$sphereRadius";
|
||||
|
||||
topSphere #calc "$sphereCentreHeight + $sphereRadius";
|
||||
bottomSphere #calc "$sphereCentreHeight - $sphereRadius";
|
||||
topSphereLayer #calc "$sphereCentreHeight + (1.0 + $sphereLayerThickness)*$sphereRadius";
|
||||
bottomSphereLayer #calc "$sphereCentreHeight - (1.0 + $sphereLayerThickness)*$sphereRadius";
|
||||
|
||||
// Layer block below sphere
|
||||
innerBottomLayerX #calc "-1.0*cos(45.0*$pi/180.0)*$sphereRadius";
|
||||
innerBottomLayerY #calc "$sphereCentreHeight - cos(45.0*$pi/180.0)*$sphereRadius";
|
||||
innerBottomLayerZPos #calc "-1.0*$tanAlpha*$innerBottomLayerX";
|
||||
innerBottomLayerZNeg #calc "-1.0*$innerBottomLayerZPos";
|
||||
|
||||
innerBottomArcX1 #calc "-1.0*sin(22.5*$pi/180.0)*$sphereRadius";
|
||||
innerBottomArcY1 #calc "$sphereCentreHeight - cos(22.5*$pi/180.0)*$sphereRadius";
|
||||
innerBottomArcZ1Pos #calc "$innerBottomArcX1*$tanAlpha";
|
||||
innerBottomArcZ1Neg #calc "-1.0*$innerBottomArcZ1Pos";
|
||||
|
||||
outerBottomArcX1 #calc "-1.0*sin(22.5*$pi/180.0)*$sphereRadius*(1.0 + $sphereLayerThickness)";
|
||||
outerBottomArcY1 #calc #{ $sphereCentreHeight - cos(22.5*$pi/180.0)*$sphereRadius*(1.0 + $sphereLayerThickness) #};
|
||||
outerBottomArcZ1Pos #calc "$outerBottomArcX1*$tanAlpha";
|
||||
outerBottomArcZ1Neg #calc "-1.0*$outerBottomArcZ1Pos";
|
||||
|
||||
outerBottomLayerX #calc "-1.0*cos(45.0*$pi/180.0)*(1.0 + $sphereLayerThickness)*$sphereRadius";
|
||||
outerBottomLayerY #calc "$sphereCentreHeight - cos(45.0*$pi/180.0)*(1.0 + $sphereLayerThickness)*$sphereRadius";
|
||||
outerBottomLayerZPos #calc "-1.0*$tanAlpha*$outerBottomLayerX";
|
||||
outerBottomLayerZNeg #calc "-1.0*$outerBottomLayerZPos";
|
||||
|
||||
// Layer block above sphere
|
||||
innerTopLayerX #calc "cos(135.0*$pi/180.0)*$sphereRadius";
|
||||
innerTopLayerY #calc "$sphereCentreHeight - cos(135.0*$pi/180.0)*$sphereRadius";
|
||||
innerTopLayerZPos #calc "-1.0*$tanAlpha*$innerBottomLayerX";
|
||||
innerTopLayerZNeg #calc "-1.0*$innerBottomLayerZPos";
|
||||
|
||||
innerTopArcX1 #calc "-1.0*sin(157.5*$pi/180.0)*$sphereRadius";
|
||||
innerTopArcY1 #calc "$sphereCentreHeight - cos(157.5*$pi/180.0)*$sphereRadius";
|
||||
innerTopArcZ1Pos #calc "$innerTopArcX1*$tanAlpha";
|
||||
innerTopArcZ1Neg #calc "-1.0*$innerTopArcZ1Pos";
|
||||
|
||||
outerTopArcX1 #calc "-1.0*sin(157.5*$pi/180.0)*$sphereRadius*(1.0 + $sphereLayerThickness)";
|
||||
outerTopArcY1 #calc "$sphereCentreHeight - cos(157.5*$pi/180.0)*$sphereRadius*(1.0 + $sphereLayerThickness)";
|
||||
outerTopArcZ1Pos #calc "$outerTopArcX1*$tanAlpha";
|
||||
outerTopArcZ1Neg #calc "-1.0*$outerTopArcZ1Pos";
|
||||
|
||||
outerTopLayerX #calc "cos(135.0*$pi/180.0)*(1.0 + $sphereLayerThickness)*$sphereRadius";
|
||||
outerTopLayerY #calc "$sphereCentreHeight - cos(135.0*$pi/180.0)*(1.0 + $sphereLayerThickness)*$sphereRadius";
|
||||
outerTopLayerZPos #calc "-1.0*$tanAlpha*$outerTopLayerX";
|
||||
outerTopLayerZNeg #calc "-1.0*$outerTopLayerZPos";
|
||||
|
||||
// Layer block left of sphere
|
||||
innerLeftArcX #calc "-1.0*$sphereRadius";
|
||||
innerLeftArcY #calc "$sphereCentreHeight";
|
||||
innerLeftArcZPos #calc "-1.0*$tanAlpha*$innerLeftArcX";
|
||||
innerLeftArcZNeg #calc "-1.0*$innerLeftArcZPos";
|
||||
|
||||
outerLeftArcX #calc "-1.0*(1.0 + $sphereLayerThickness)*$sphereRadius";
|
||||
outerLeftArcZPos #calc "-1.0*$tanAlpha*$outerLeftArcX";
|
||||
outerLeftArcZNeg #calc "-1.0*$outerLeftArcZPos";
|
||||
|
||||
|
||||
|
||||
vertices
|
||||
(
|
||||
// Lower moving block
|
||||
($axisLevel $bottomLevel 0) // 0
|
||||
($axisLevel $bottomBlockTopHeight 0) // 1
|
||||
($AMIBlockPosition $bottomLevel $AMIBlockPosDepth) // 2
|
||||
($AMIBlockPosition $bottomLevel $AMIBlockNegDepth) // 3
|
||||
($AMIBlockPosition $bottomBlockTopHeight $AMIBlockNegDepth) // 4
|
||||
($AMIBlockPosition $bottomBlockTopHeight $AMIBlockPosDepth) // 5
|
||||
|
||||
// Upper moving block
|
||||
($AMIBlockPosition $topBlockBottomHeight $AMIBlockPosDepth) // 6
|
||||
($AMIBlockPosition $topBlockBottomHeight $AMIBlockNegDepth) // 7
|
||||
($axisLevel $topBlockBottomHeight 0) // 8
|
||||
($AMIBlockPosition $topLevel $AMIBlockPosDepth) // 9
|
||||
($AMIBlockPosition $topLevel $AMIBlockNegDepth) // 10
|
||||
($axisLevel $topLevel 0) // 11
|
||||
|
||||
// Farfield block
|
||||
($farFieldWall $bottomLevel $farFieldPosDepth) // 12
|
||||
($AMIBlockPosition $bottomLevel $AMIBlockPosDepth) // 13
|
||||
($AMIBlockPosition $topLevel $AMIBlockPosDepth) // 14
|
||||
($farFieldWall $topLevel $farFieldPosDepth) // 15
|
||||
|
||||
($farFieldWall $bottomLevel $farFieldNegDepth) // 16
|
||||
($AMIBlockPosition $bottomLevel $AMIBlockNegDepth) // 17
|
||||
($AMIBlockPosition $topLevel $AMIBlockNegDepth) // 18
|
||||
($farFieldWall $topLevel $farFieldNegDepth) // 19
|
||||
|
||||
// Sphere block
|
||||
($axisLevel $bottomSphere 0) // 20
|
||||
($innerBottomLayerX $innerBottomLayerY $innerBottomLayerZPos) // 21
|
||||
($innerBottomLayerX $innerBottomLayerY $innerBottomLayerZNeg) // 22
|
||||
($axisLevel $bottomSphereLayer 0) // 23
|
||||
($outerBottomLayerX $outerBottomLayerY $outerBottomLayerZPos) // 24
|
||||
($outerBottomLayerX $outerBottomLayerY $outerBottomLayerZNeg) // 25
|
||||
|
||||
($axisLevel $topSphere 0) // 26
|
||||
($axisLevel $topSphereLayer 0) // 27
|
||||
($innerTopLayerX $innerTopLayerY $innerTopLayerZNeg) // 28
|
||||
($outerTopLayerX $outerTopLayerY $outerTopLayerZNeg) // 29
|
||||
($innerTopLayerX $innerTopLayerY $innerTopLayerZPos) // 30
|
||||
($outerTopLayerX $outerTopLayerY $outerTopLayerZPos) // 31
|
||||
);
|
||||
|
||||
edgeNumber 1; // 0.707;
|
||||
|
||||
layerGrading 0.5;
|
||||
invLayerGrading #calc "1.0/$layerGrading";
|
||||
blockGrading 0.3;
|
||||
invBlockGrading #calc "1.0/$blockGrading";
|
||||
|
||||
blocks
|
||||
(
|
||||
hex (16 17 18 19 12 13 14 15) farField (25 100 1) simplegrading (1 1 1)
|
||||
|
||||
hex (3 0 1 4 2 0 1 5) bottomBlock (10 50 1) simplegrading ($edgeNumber 1 1)
|
||||
|
||||
hex (7 8 11 10 6 8 11 9) topBlock (10 35 1) simplegrading ($edgeNumber 1 1)
|
||||
|
||||
hex (25 23 20 22 24 23 20 21)
|
||||
centralBlock (10 20 1)
|
||||
edgeGrading
|
||||
(
|
||||
1 1 1 1
|
||||
$layerGrading $layerGrading $layerGrading $layerGrading
|
||||
1 1 1 1
|
||||
) // bottom layer
|
||||
|
||||
hex (25 22 28 29 24 21 30 31)
|
||||
centralBlock (20 20 1)
|
||||
edgeGrading
|
||||
(
|
||||
$layerGrading $layerGrading $layerGrading $layerGrading
|
||||
1 1 1 1
|
||||
1 1 1 1
|
||||
) // middle layer
|
||||
|
||||
hex (28 26 27 29 30 26 27 31)
|
||||
centralBlock (10 20 1)
|
||||
edgeGrading
|
||||
(
|
||||
1 1 1 1
|
||||
$invLayerGrading $invLayerGrading $invLayerGrading $invLayerGrading
|
||||
1 1 1 1
|
||||
) // top layer
|
||||
|
||||
hex (4 1 23 25 5 1 23 24)
|
||||
centralBlock (10 10 1)
|
||||
edgeGrading
|
||||
(
|
||||
$edgeNumber 1 1 $edgeNumber
|
||||
$blockGrading $edgeNumber $edgeNumber $blockGrading
|
||||
1 $edgeNumber $edgeNumber 1
|
||||
) // bottom
|
||||
|
||||
hex (4 25 29 7 5 24 31 6)
|
||||
centralBlock (10 20 1)
|
||||
edgeGrading
|
||||
(
|
||||
$blockGrading $blockGrading $blockGrading $blockGrading
|
||||
1 1 1 1
|
||||
1 1 1 1
|
||||
) // middle
|
||||
|
||||
hex (29 27 8 7 31 27 8 6)
|
||||
centralBlock (10 10 1)
|
||||
edgeGrading
|
||||
(
|
||||
1 $edgeNumber $edgeNumber 1
|
||||
$invBlockGrading $invBlockGrading $invBlockGrading $invBlockGrading
|
||||
1 1 1 1
|
||||
) // top
|
||||
);
|
||||
|
||||
edges
|
||||
(
|
||||
// Layer block below sphere
|
||||
arc 20 22 ($innerBottomArcX1 $innerBottomArcY1 $innerBottomArcZ1Pos)
|
||||
arc 20 21 ($innerBottomArcX1 $innerBottomArcY1 $innerBottomArcZ1Neg)
|
||||
arc 23 25 ($outerBottomArcX1 $outerBottomArcY1 $outerBottomArcZ1Pos)
|
||||
arc 23 24 ($outerBottomArcX1 $outerBottomArcY1 $outerBottomArcZ1Neg)
|
||||
|
||||
// Layer block above sphere
|
||||
arc 26 28 ($innerTopArcX1 $innerTopArcY1 $innerTopArcZ1Pos)
|
||||
arc 26 30 ($innerTopArcX1 $innerTopArcY1 $innerTopArcZ1Neg)
|
||||
arc 27 29 ($outerTopArcX1 $outerTopArcY1 $outerTopArcZ1Pos)
|
||||
arc 27 31 ($outerTopArcX1 $outerTopArcY1 $outerTopArcZ1Neg)
|
||||
|
||||
// Layer block left of sphere
|
||||
arc 22 28 ($innerLeftArcX $innerLeftArcY $innerLeftArcZNeg)
|
||||
arc 21 30 ($innerLeftArcX $innerLeftArcY $innerLeftArcZPos)
|
||||
arc 24 31 ($outerLeftArcX $innerLeftArcY $outerLeftArcZPos)
|
||||
arc 25 29 ($outerLeftArcX $innerLeftArcY $outerLeftArcZNeg)
|
||||
);
|
||||
|
||||
boundary
|
||||
(
|
||||
front
|
||||
{
|
||||
type wedge;
|
||||
faces
|
||||
(
|
||||
(0 1 5 2)
|
||||
(5 1 23 24)
|
||||
(23 20 21 24)
|
||||
(24 21 30 31)
|
||||
(5 24 31 6)
|
||||
(31 27 8 6)
|
||||
(6 8 11 9)
|
||||
(31 30 26 27)
|
||||
(12 13 14 15)
|
||||
);
|
||||
}
|
||||
back
|
||||
{
|
||||
type wedge;
|
||||
faces
|
||||
(
|
||||
(0 3 4 1)
|
||||
(1 4 25 23)
|
||||
(4 7 29 25)
|
||||
(23 25 22 20)
|
||||
(25 29 28 22)
|
||||
(29 7 8 27)
|
||||
(28 29 27 26)
|
||||
(7 10 11 8)
|
||||
(16 17 18 19)
|
||||
);
|
||||
}
|
||||
innerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
neighbourPatch outerAMI;
|
||||
faces
|
||||
(
|
||||
(4 5 6 7)
|
||||
(6 9 10 7)
|
||||
(2 5 4 3)
|
||||
);
|
||||
transform noOrdering;
|
||||
}
|
||||
outerAMI
|
||||
{
|
||||
type cyclicAMI;
|
||||
neighbourPatch innerAMI;
|
||||
faces
|
||||
(
|
||||
(14 13 17 18)
|
||||
);
|
||||
transform noOrdering;
|
||||
}
|
||||
top
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(15 14 18 19)
|
||||
(9 11 11 10)
|
||||
);
|
||||
}
|
||||
bottom
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(12 16 17 13)
|
||||
(0 2 3 0)
|
||||
);
|
||||
}
|
||||
farFieldWall
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(12 15 19 16)
|
||||
);
|
||||
}
|
||||
sphere
|
||||
{
|
||||
type wall;
|
||||
faces
|
||||
(
|
||||
(20 22 21 20)
|
||||
(21 22 28 30)
|
||||
(30 26 26 28)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
mergePatchPairs
|
||||
(
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,61 @@
|
||||
/*--------------------------------*- 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 compressibleInterDyMFoam;
|
||||
|
||||
startFrom startTime;
|
||||
|
||||
startTime 0;
|
||||
|
||||
stopAt endTime;
|
||||
|
||||
endTime 0.07;
|
||||
|
||||
deltaT 5e-05;
|
||||
|
||||
writeControl adjustableRunTime;
|
||||
|
||||
writeInterval 0.001;
|
||||
|
||||
purgeWrite 0;
|
||||
|
||||
writeFormat ascii;
|
||||
|
||||
writePrecision 10;
|
||||
|
||||
writeCompression off;
|
||||
|
||||
timeFormat general;
|
||||
|
||||
timePrecision 6;
|
||||
|
||||
runTimeModifiable true;
|
||||
|
||||
adjustTimeStep yes;
|
||||
|
||||
maxCo 0.1;
|
||||
|
||||
maxAlphaCo 0.1;
|
||||
|
||||
libs
|
||||
(
|
||||
"libsixDoFRigidBodyMotion.so"
|
||||
"libtopoChangerFvMesh.so"
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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 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. An empty patch list just removes patches with zero
|
||||
// faces from $FOAM_CASE/constant/polyMesh/boundary.
|
||||
patches
|
||||
(
|
||||
);
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,71 @@
|
||||
/*--------------------------------*- 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(U) cellLimited Gauss linear 1;
|
||||
}
|
||||
|
||||
divSchemes
|
||||
{
|
||||
default none;
|
||||
div(rhoPhi,U) Gauss linearUpwind grad(U);
|
||||
div(phi,alpha) Gauss vanLeer;
|
||||
div(phirb,alpha) Gauss linear;
|
||||
div(rhoPhi,K) Gauss linear;
|
||||
div(rhoPhi,T) Gauss linear;
|
||||
div(phi,thermo:rho.water) Gauss linear;
|
||||
div(phi,thermo:rho.air) Gauss linear;
|
||||
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
|
||||
div((phi+meshPhi),p) Gauss linear;
|
||||
|
||||
div((muEff*dev2(T(grad(U))))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
{
|
||||
default Gauss linear corrected;
|
||||
}
|
||||
|
||||
interpolationSchemes
|
||||
{
|
||||
default linear;
|
||||
}
|
||||
|
||||
snGradSchemes
|
||||
{
|
||||
default corrected;
|
||||
}
|
||||
|
||||
fluxRequired
|
||||
{
|
||||
default no;
|
||||
pcorr ;
|
||||
p ;
|
||||
pd;
|
||||
alpha1;
|
||||
p_rgh;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,113 @@
|
||||
/*--------------------------------*- 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
|
||||
{
|
||||
"alpha.water.*"
|
||||
{
|
||||
nAlphaCorr 1;
|
||||
nAlphaSubCycles 1;
|
||||
cAlpha 1;
|
||||
}
|
||||
|
||||
|
||||
cellDisplacement
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-5;
|
||||
relTol 0;
|
||||
smoother GaussSeidel;
|
||||
cacheAgglomeration true;
|
||||
nCellsInCoarsestLevel 10;
|
||||
agglomerator faceAreaPair;
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
"rho.*|pcorr.*"
|
||||
{
|
||||
solver PCG;
|
||||
preconditioner DIC;
|
||||
tolerance 1e-8;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
p_rgh
|
||||
{
|
||||
solver GAMG;
|
||||
tolerance 1e-8;
|
||||
relTol 0.05;
|
||||
smoother DICGaussSeidel;
|
||||
nPreSweeps 0;
|
||||
nPostSweeps 2;
|
||||
cacheAgglomeration on;
|
||||
agglomerator faceAreaPair;
|
||||
nCellsInCoarsestLevel 10;
|
||||
mergeLevels 1;
|
||||
}
|
||||
|
||||
p_rghFinal
|
||||
{
|
||||
$p_rgh;
|
||||
tolerance 1e-08;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
"(U|k|epsilon|T)"
|
||||
{
|
||||
solver smoothSolver;
|
||||
smoother symGaussSeidel;
|
||||
tolerance 1e-08;
|
||||
relTol 0.1;
|
||||
}
|
||||
|
||||
"(U|k|epsilon|T)Final"
|
||||
{
|
||||
$U;
|
||||
tolerance 1e-08;
|
||||
relTol 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
PIMPLE
|
||||
{
|
||||
momentumPredictor no;
|
||||
nOuterCorrectors 2;
|
||||
nCorrectors 4;
|
||||
|
||||
nNonOrthogonalCorrectors 1;
|
||||
|
||||
correctPhi yes;
|
||||
|
||||
checkMeshCourantNo no;
|
||||
moveMeshOuterCorrectors no;
|
||||
|
||||
transonic false;
|
||||
}
|
||||
|
||||
relaxationFactors
|
||||
{
|
||||
fields
|
||||
{
|
||||
}
|
||||
equations
|
||||
{
|
||||
".*" 1;
|
||||
}
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,33 @@
|
||||
/*--------------------------------*- 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 setFieldsDict;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
defaultFieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.water 0 // Air
|
||||
);
|
||||
|
||||
regions
|
||||
(
|
||||
boxToCell
|
||||
{
|
||||
box (-20 -20 -1) (20 0 1);
|
||||
fieldValues
|
||||
(
|
||||
volScalarFieldValue alpha.water 1 // Water
|
||||
);
|
||||
}
|
||||
);
|
||||
@ -0,0 +1,326 @@
|
||||
/*--------------------------------*- 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
|
||||
(
|
||||
// 1. Create cellZones
|
||||
|
||||
// Create cellSet topBlock from cellZone topBlock created by blockMesh
|
||||
{
|
||||
name topBlockCells;
|
||||
type cellSet;
|
||||
action new;
|
||||
source zoneToCell;
|
||||
sourceInfo
|
||||
{
|
||||
name topBlock;
|
||||
}
|
||||
}
|
||||
|
||||
// Create cellSet centralBlock from cellZone centralBlock created by blockMesh
|
||||
{
|
||||
name centralBlockCells;
|
||||
type cellSet;
|
||||
action new;
|
||||
source zoneToCell;
|
||||
sourceInfo
|
||||
{
|
||||
name centralBlock;
|
||||
}
|
||||
}
|
||||
|
||||
// Create cellSet bottomBlock from cellZone bottomBlock created by blockMesh
|
||||
{
|
||||
name bottomBlockCells;
|
||||
type cellSet;
|
||||
action new;
|
||||
source zoneToCell;
|
||||
sourceInfo
|
||||
{
|
||||
name bottomBlock;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 2. Get the faces at the top patch
|
||||
|
||||
// Get all the faces in the top patch
|
||||
{
|
||||
name top;
|
||||
type faceSet;
|
||||
action new;
|
||||
source patchToFace;
|
||||
sourceInfo
|
||||
{
|
||||
name top;
|
||||
}
|
||||
}
|
||||
|
||||
// Only keep those that border the top block topBlock
|
||||
{
|
||||
name top;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set topBlockCells;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert top from faceSet to faceZone
|
||||
{
|
||||
name top;
|
||||
type faceZoneSet;
|
||||
action new;
|
||||
source setAndNormalToFaceZone;
|
||||
sourceInfo
|
||||
{
|
||||
faceSet top;
|
||||
normal (0 -1 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 3. Get the faces on the border of cellZones topBlock and centralBlock
|
||||
|
||||
// Get all faces in topBlock
|
||||
{
|
||||
name centralTopFaces;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set topBlockCells;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// Get the faces that border topBlock and centralBlock
|
||||
{
|
||||
name centralTopFaces;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set centralBlockCells;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert topBlockFaces from faceSet to faceZone
|
||||
{
|
||||
name centralTopFaces;
|
||||
type faceZoneSet;
|
||||
action new;
|
||||
source setsToFaceZone;
|
||||
sourceInfo
|
||||
{
|
||||
faceSet centralTopFaces;
|
||||
cellSet topBlockCells;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 4. Get all the faces on the border of cellZones centralBlock and
|
||||
// bottomBlock
|
||||
|
||||
// Get all faces in bottomBlock
|
||||
{
|
||||
name centralBottomFaces;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set bottomBlockCells;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// Get the faces that border centralBlock and bottomBlock
|
||||
{
|
||||
name centralBottomFaces;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set centralBlockCells;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert centralBottomFaces from faceSet to faceZone
|
||||
{
|
||||
name centralBottomFaces;
|
||||
type faceZoneSet;
|
||||
action new;
|
||||
source setsToFaceZone;
|
||||
sourceInfo
|
||||
{
|
||||
faceSet centralBottomFaces;
|
||||
cellSet centralBlockCells;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 5. Get the faces at bottom patch
|
||||
|
||||
// Get all the faces in the bottom patch
|
||||
{
|
||||
name bottom;
|
||||
type faceSet;
|
||||
action new;
|
||||
source patchToFace;
|
||||
sourceInfo
|
||||
{
|
||||
name bottom;
|
||||
}
|
||||
}
|
||||
|
||||
// Only keep those that border the bottom block bottomBlockCells
|
||||
{
|
||||
name bottom;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set bottomBlockCells;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert bottom from faceSet to faceZone
|
||||
{
|
||||
name bottom;
|
||||
type faceZoneSet;
|
||||
action new;
|
||||
source setAndNormalToFaceZone;
|
||||
sourceInfo
|
||||
{
|
||||
faceSet bottom;
|
||||
normal (0 1 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// AJH New - create additional face zones to enable solid body motion
|
||||
// for the majority of the action area around the sphere, and only apply
|
||||
// layer addition-removal (LAR) at the extremities
|
||||
|
||||
// create cell zone at top of domain for LAR region
|
||||
{
|
||||
name LARTopCells;
|
||||
type cellSet;
|
||||
action new;
|
||||
source cellToCell;
|
||||
sourceInfo
|
||||
{
|
||||
set topBlockCells;
|
||||
}
|
||||
}
|
||||
{
|
||||
name LARTopCells;
|
||||
type cellSet;
|
||||
action subset;
|
||||
source boxToCell;
|
||||
sourceInfo
|
||||
{
|
||||
box (-100 0.95 -100)(100 100 100);
|
||||
}
|
||||
}
|
||||
{
|
||||
name LARTopCells;
|
||||
type cellZoneSet;
|
||||
action new;
|
||||
source setToCellZone;
|
||||
sourceInfo
|
||||
{
|
||||
set LARTopCells;
|
||||
}
|
||||
}
|
||||
|
||||
// upate old topBlock cellZone
|
||||
{
|
||||
name topBlockCells;
|
||||
type cellSet;
|
||||
action delete;
|
||||
source cellToCell;
|
||||
sourceInfo
|
||||
{
|
||||
set LARTopCells;
|
||||
}
|
||||
}
|
||||
{
|
||||
name topBlock;
|
||||
type cellZoneSet;
|
||||
action remove;
|
||||
}
|
||||
{
|
||||
name topBlock;
|
||||
type cellZoneSet;
|
||||
action new;
|
||||
source setToCellZone;
|
||||
sourceInfo
|
||||
{
|
||||
set topBlockCells;
|
||||
}
|
||||
}
|
||||
|
||||
// generate face zone between LARTopCells and topBlockCells cellSets
|
||||
{
|
||||
name LARTopFaces;
|
||||
type faceSet;
|
||||
action new;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set LARTopCells;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
{
|
||||
name LARTopFaces;
|
||||
type faceSet;
|
||||
action subset;
|
||||
source cellToFace;
|
||||
sourceInfo
|
||||
{
|
||||
set topBlockCells;
|
||||
option all;
|
||||
}
|
||||
}
|
||||
{
|
||||
name LARTopFaces;
|
||||
type faceZoneSet;
|
||||
action new;
|
||||
source setsToFaceZone;
|
||||
sourceInfo
|
||||
{
|
||||
faceSet LARTopFaces;
|
||||
cellSet topBlockCells;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user