afa13 |
March 26, 2021 13:33 |
NACA0012 k-OmegaSST model
Hello All,
I am trying to simulate a flow over a NACA0012 airfoil with k-omegaSST(incompressible) at different angles of attack. On the NASA website, the study is done using a low Re(6e6) and a turbulence intensity of 0.052%. I tried first with the turbulence intensity of 0.5% (estimated from this website's tool) used 1 for nut/nu and a velocity of around 80m/s with 10 deg as an angle of attack. For the 0.5% I got a convergence however the values for the drag coefficient were far from the results by NASA; the lift coeffecients were in the range of 7%. However, when i change my boundary conditions based on the 0.052% criteria it doesnt converge and the program stops because I get extremely high values for both Cd and Cl. As for a 0 deg angle of attack, using the values of the 0.052% turbulent intensity to calculate the boundary conditions, the solution converges after 1474 iterations and i get
Code:
Cd=0.0071605
Cl=-0.000470603
My mesh is constructed using construct2d by using the dat file from the NASA website then the plot3dtofoam function and a createPatchDict.
Any help is appreciated because I have gone my ways trying to figure this thing out.
Code:
patch walls y+ : min = 6.98209, max = 7.02351, average = 7.02168
The boundary conditions I have are as follows:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.00328535;
boundaryField
{
farfield
{
type freestream;
freestreamValue $internalField;
}
walls
{
type kqRWallFunction;
value $internalField;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2012 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 1.85e-5;
boundaryField
{
farfield
{
type freestream;
freestreamValue $internalField;//uniform 9.8e-4;
//value uniform 0.14;
}
walls
{
type nutUSpaldingWallFunction;
value uniform 0;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 -1 0 0 0 0];
internalField uniform 219;
boundaryField
{
farfield
{
type freestream;
freestreamValue $internalField;
}
walls
{
type omegaWallFunction;
value $internalField;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
farfield
{
type freestreamPressure;
freestreamValue $internalField;
}
walls
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (87.64789 15.4546 0);
boundaryField
{
farfield
{
type freestreamVelocity;
freestreamValue $internalField;
}
walls
{
type noSlip;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //
The code to calculate the lift and drag coefficients:
Code:
forces
{
type forces;
functionObjectLibs ("libforces.so");
outputControl timeStep;
outputInterval 1;
patches ( "walls" );
pName p;
UName U;
rho rhoInf;
log true;
CofR (0.25 0 0);
rhoInf 1.225;
}
forceCoeffs
{
type forceCoeffs;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;
patches ( "walls" );
pName p;
UName U;
rho rhoInf;
log true;
liftDir (.1736 0.98481 0);
dragDir (0.98481 .1736 0);
CofR (0.25 0 0);
pitchAxis (0 0 1);
magUInf 89;
rhoInf 1.225;
lRef 1;
Aref 1;
}
Code:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 8
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default steadyState;
}
gradSchemes
{
default Gauss linear;
limited cellLimited Gauss linear 1;
grad(U) $limited;
grad(k) $limited;
grad(omega) $limited;
}
divSchemes
{
default none;
div(phi,U) bounded Gauss linearUpwind unlimited;
turbulence bounded Gauss linearUpwind limited;
div(phi,k) $turbulence;
div(phi,omega) $turbulence;
div(phi,epsilon) $turbulence;
div((nuEff*dev(T(grad(U))))) Gauss linear;
div((nuEff*dev2(T(grad(U))))) Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
wallDist
{
method meshWave;
}
// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
p
{
solver GAMG;
tolerance 1e-7;
relTol 0.001;
minIter 5;
maxIter 100;
smoother GaussSeidel;
nPreSweeps 1;
nPostSweeps 3;
nFinestSweeps 3;
scaleCorrection true;
directSolveCoarsest false;
cacheAgglomeration on;
nCellsInCoarsestLevel 50;
agglomerator faceAreaPair;
mergeLevels 1;
}
U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.01;
nSweeps 1;
}
k
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.01;
nSweeps 1;
}
omega
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-8;
relTol 0.01;
nSweeps 1;
}
}
SIMPLE
{
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
residualControl
{
p 1e-5;
U 1e-5;
"(k|omega)" 1e-5;
}
}
relaxationFactors
{
fields
{
p 0.3;
}
equations
{
"(U|k|omega)" 0.7;
"(U|k|omega)Final" 0.7;
}
}
cache
{
grad(U);
}
// ************************************************************************* //
|