aaronlloyd |
April 5, 2024 18:32 |
2D cylinder simulation
3 Attachment(s)
I am simulating an incompressible external flow 2D circular cylinder. I know that it is a “classical” example but I haven`t been able to find a similar case online to improve my results in order to obtain the most liable/precise simulation.
My Reynolds number is 2.4 x10^4 and I should get a Cd = 1.2. Instead I am obtaining a higher value (1,43 in average).
I used snappyHexMesh to generate the mesh and then extrudeMesh, I tried several trials changing layers (number, thickness, conformation) and mesh. In all cases the max value of y+ was <1.
I am attaching the results of a simulation in which there were 40 layers and average y+=0.17 and max y+ = 0.32.
The code below refers to the 0 folder boundary conditions k, nut, omega, p, U
k
Code:
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.0294;
boundaryField
{
inlet
{
type fixedValue;
value uniform 0.0294;
}
outlet
{
type inletOutlet;
inletValue uniform 0.0294;
value uniform 0.0294;
}
left
{
type symmetryPlane;
}
right
{
type symmetryPlane;
}
top
{
type empty;
}
bottom
{
type empty;
}
cylinder
{
type fixedValue;
value uniform 1e-10;
}
}
nut
Code:
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type calculated;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
left
{
type symmetryPlane;
}
right
{
type symmetryPlane;
}
top
{
type empty;
}
bottom
{
type empty;
}
cylinder
{
type calculated;
value uniform 0;
}
}
omega
Code:
dimensions [0 0 -1 0 0 0 0];
internalField uniform 164;
boundaryField
{
inlet
{
type fixedValue;
value uniform 164;
}
outlet
{
type inletOutlet;
inletValue uniform 164;
value uniform 164;
}
left
{
type symmetryPlane;
}
right
{
type symmetryPlane;
}
top
{
type empty;
}
bottom
{
type empty;
}
cylinder
{
type omegaWallFunction;
value uniform 164;
}
}
p
Code:
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform 0;
}
left
{
type symmetryPlane;
}
right
{
type symmetryPlane;
}
top
{
type empty;
}
bottom
{
type empty;
}
cylinder
{
type zeroGradient;
}
}
and U
Code:
dimensions [0 1 -1 0 0 0 0];
internalField uniform (14 0 0);
boundaryField
{
inlet
{
type fixedValue;
value uniform (14 0 0);
}
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (14 0 0);
}
left
{
type symmetryPlane;
}
right
{
type symmetryPlane;
}
top
{
type empty;
}
bottom
{
type empty;
}
cylinder
{
type fixedValue;
value uniform (0 0 0);
}
}
and controlDict
Code:
application pimpleFoam;
startFrom latestTime;
stopAt endTime;
endTime 100;
deltaT 0.00001;
writeControl adjustable;
writeInterval 0.001;
purgeWrite 1;
writeFormat binary;
writePrecision 7;
writeCompression no;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep yes;
maxCo 0.9;
functions
{
#include "forces"
#include "forceCoeffs"
#include "yPlus1"
#include "pressureCoefficient"
#include "wallShearStress"
#include "Q"
#include "wallBoundedStreamLine"
}
and fvSchemes
Code:
ddtSchemes
{
default CrankNicolson 0.9;
}
gradSchemes
{
default Gauss linear;
}
divSchemes
{
default none;
div(phi,U) Gauss linear;
div(phi,k) Gauss upwind;
div(phi,omega) Gauss upwind;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear limited 1.0;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default limited 1.0;
}
wallDist
{
method meshWave;
}
and fvSolution
Code:
solvers
{
p
{
solver GAMG;
smoother GaussSeidel;
tolerance 1e-6;
relTol 0.01;
}
pFinal
{
solver GAMG;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0;
}
U
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-8;
relTol 0.1;
}
UFinal
{
$U;
relTol 0;
}
k
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-8;
relTol 0.1;
}
kFinal
{
$U;
relTol 0;
}
omega
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-8;
relTol 0.1;
}
omegaFinal
{
$U;
relTol 0;
}
}
PIMPLE
{
nCorrectors 2;
nNonOrthogonalCorrectors 1;
nOuterCorrectors 1;
}
I am attaching a screenshot of the mesh and the images of the results: RESIDUAL(Ux, Uy, p) and Cd. The chart shows the final period as the simulation appears already for a while convergent.
|