CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   IcoFoam 2D airfoil convergence problems (https://www.cfd-online.com/Forums/openfoam-solving/58374-icofoam-2d-airfoil-convergence-problems.html)

pcasto July 7, 2008 20:50

Hi everyone, I am trying to
 
Hi everyone,

I am trying to simulate steady flow over a NACA0012 airfoil at Mach number 0.2 and AOA 2 degrees and I'm having problems converging to the solution with icoFoam.

I'm using a structured C-mesh of dimensions (384x64) which can be seen here:
www.stanford.edu/~pcasto2/naca0012_visc/mesh.pdf

The utility checkMesh outputs the following:

-------------------------
Checking geometry...
Domain bounding box: (-14.5446 -16.6068 0) (18 16.6068 1)
Boundary openness (-1.78119e-18 1.88139e-17 4.27264e-16) OK.
***High aspect ratio cells found, Max aspect ratio: 74554.3, number of cells 7232
<<Writing 7232 cells with high aspect ratio to set highAspectRatioCells
Minumum face area = 1.5362e-08. Maximum face area = 3.57128. Face area magnitudes OK.
Min volume = 1.5362e-08. Max volume = 3.57128. Total volume = 938.87. Cell volumes OK.
Mesh non-orthogonality Max: 88.216 average: 9.60062
*Number of severely non-orthogonal faces: 252.
Non-orthogonality check OK.
<<Writing 252 non-orthogonal faces to set nonOrthoFaces
Face pyramids OK.
Max skewness = 0.186059 OK.
*Edges too small, min/max edge length = 1.90263e-05 2.79354, number too small: 3244
<<Writing 3884 points on short edges to set shortEdges
All angles in faces OK.
Face flatness (1 = flat, 0 = butterfly) : average = 1 min = 1
All face flatness OK.

Failed 1 mesh checks.

-----------------------------

So it seems to complain about the HAR cells but I would really like to be able to obtain a solution on this mesh...

Now my problem is the following: I can't get icoFoam to convergence properly. The pressure residual goes down to 4e-04 but stops decreasing after. (see convergence history at: www.stanford.edu/~pcasto2/naca0012_visc/p0_conv.pdf) The Cp distribution I obtain for this convergence level does not agree with results obtained with our flow solver. (www.stanford.edu/~pcasto2/naca0012_visc/cp_plot.pdf).

My boundary conditions are as follows:
INLET
p: zeroGradient, U: fixedValue (69.383 2.422 0)
OUTLET
p: fixedValue 100000, U: zeroGradient
WALL
p: zeroGradient, U: fixedValue (0 0 0)

I'm using the same schemes used with the cavity tutorial except that I set nNonOrthogonalCorrectors to 2. I also reduced my time step to 2e-07.

I'm fairly new to OpenFOAM so maybe I missed something really obvious but I would really appreciate if you could help me in getting a converged solution.

paulo July 8, 2008 16:03

Hello Patrice, As I can see
 
Hello Patrice,

As I can see, the value of the velocities that you are using lead to a turbulent flow (if the fluid is air), and icoFoam is destinated to laminar problems, as far as I know.

Use simpleFoam instead.

Regards,

Paulo.

pcasto July 9, 2008 17:59

Hey Paulo, I understand th
 
Hey Paulo,

I understand that at this Reynolds number, the flow should transition to turbulent flow over the airfoil. However, the algorithm should still be able to converge even though it might not give the real physical solution. The velocity components seems to converge but I don't understand why pressure doesn't converge. Any idea what values for the parameters in fvSchemes or fvSolution would help improve the pressure convergence?

Thanx

Patrice

paulo July 12, 2008 15:16

Hello Patrice, In my experi
 
Hello Patrice,

In my experience, high Reynolds number always lead to numerical instabilities. The model must have something to dissipate the turbulent energy (like epsilon or omega).

That is my understanding, it might be not right.

Any comments are apreciated.

Regards,

Paulo.

PS: Sorry for the late reply.

pcasto July 12, 2008 18:24

Hey Paulo, Thanx for your r
 
Hey Paulo,

Thanx for your reply. I finally managed to have icoFoam converged. I also tried using simpleFoam and you are right, switching turbulence on (I used k-epsilon) helps in improving the convergence. Also, I didn't have any problem converging when I reduced the Reynolds number. For those of you who are having convergence problem with simpleFoam or icoFoam, here are the setting I used. When using simpleFoam, if the pressure residual stalls, you can try increasing the relaxation factor for pressure to 0.5 or 0.6 after a few outer iterations, it might help to reach a lower pressure residual.

Patrice

----------------------------
IcoFOAM:

gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
}

divSchemes
{
default Gauss upwind;
div(phi,U) Gauss upwind;
}

laplacianSchemes
{
default none;
laplacian(nu,U) Gauss linear limited 0.7;
laplacian((1|A(U)),p) Gauss linear limited 1.;
}

interpolationSchemes
{
default linear;
interpolate(HbyA) linear;
}

solvers
{
p PCG
{
preconditioner DIC;
tolerance 1e-08;
relTol 0;
};

U PBiCG
{
preconditioner DILU;
tolerance 1e-08;
relTol 0;
};
}

PISO
{
nCorrectors 1;
nNonOrthogonalCorrectors 1;
}

SIMPLEFOAM

Same fvSchemes as with IcoFOAM

fvSolution:
p PCG
{
preconditioner DIC;
tolerance 1e-08;
relTol 0;
};

U PBiCG
{
preconditioner DILU;
tolerance 1e-08;
relTol 0;
};

k BICCG 1e-06 0;
epsilon BICCG 1e-06 0;
R BICCG 1e-06 0;
nuTilda BICCG 1e-06 0;
}

SIMPLE
{
nNonOrthogonalCorrectors 1;
pRefCell 0;
pRefValue 0;
}

relaxationFactors
{
p 0.3;
U 0.7;
k 0.5;
epsilon 0.5;
}

paulo July 16, 2008 14:24

Very nice Patrice! And than
 
Very nice Patrice!

And thanks for posting your solution.

Btw, do you have any Cd / Cl results?

I'm interested in validation of the turbulent code.

Regards,

Paulo.

pcasto July 16, 2008 15:16

Hey Paulo, No I haven't cal
 
Hey Paulo,

No I haven't calculated Cl and Cd yet. I will probably do that soon. I'll let you know what are my results. I am now trying to simulate the flow at higher angle of attach but I'm having problems with my boundary conditions (see the thread named: Boundary conditions - C-mesh, high AOA ). If you have any suggestions on how to resolve my problems, I would really appreciate your help.

Again thanks for your help

Patrice

pcasto July 24, 2008 23:56

For anyone interested in analy
 
For anyone interested in analyzing an airfoil with simpleFoam or rhoSimpleFoam, I posted my case folders for a Naca0012 at 2 degrees AOA. Hope this can be useful to people reading this thread. I used the SA model as it proved to improve the convergence significantly.

NACA 0012, Mach 0.2, AOA 2, simpleFoam

NACA 0012, Mach 0.5, AOA 2, rhoSimpleFoam

dinonettis July 25, 2008 13:05

Hi Patrice, since I'm strug
 
Hi Patrice,

since I'm struggling with the same kind of problems (although my Ma is 0.75 and the mesh is an o-grid in a square domain) I would like to try your settings. Anyway I'd like to know if you are solving the boundary layer or using wall functions??
thank you in advance

dino

dinonettis July 25, 2008 13:07

ps: I can't see your mesh o
 
ps:

I can't see your mesh on this link:
"www.stanford.edu/~pcasto2/naca0012_visc/mesh.pdf "

the message I get is something like: object not found

bye

mgz1985 August 18, 2008 08:27

hI All, I am working on an
 
hI All,

I am working on an airfoil myself. I am having problems with running the solver icoFoam.

I get the following error

This mesh contains patches of type empty but is not 1D or 2D
by virtue of the fact that the number of faces of this
empty patch is not divisible by the number of cells.

From function emptyFvPatchField<type>::updateCoeffs()
in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 148.

But if I execute refineMesh with this file, it shows the mesh as 2-D mesh. I have checked my patches individually and they are all correct without any errors. Also, I have not defined any internal face as boundary face. Still I get this error. My checkMesh also, does not give me any error. It is only when I execute icoFoam, I get this error. I cant understand why so?

Can anyone suggest any help?

Thanks

mattijs August 18, 2008 16:24

Have a look at the cavity tuto
 
Have a look at the cavity tutorial - every cell has two faces which are in the empty patch. Count the number of cells and the size of your empty patch. Perhaps you have more than one cell in the third direction?

mgz1985 August 18, 2008 17:24

Hi Mattijs Yeah I have alre
 
Hi Mattijs

Yeah I have already done that. I have 13 blocks or cells as u want to call them. So it should be 26 faces in the empty patch I believe which is also correct in the blockMeshDict file.

Also, there are no faces repeated in the empty Patch or any other patch. I am attaching the file, if u can, then please take a look.

Thanks
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif blockMeshDict

ngj August 18, 2008 18:31

The problem is due to your mes
 
The problem is due to your mesh generation. As can be seen from the attached picture of your mesh, there are several black lines, which are default faces generated by blockMesh.

http://www.cfd-online.com/OpenFOAM_D...ges/1/8776.png

The default faces are given empty, but as they are perpendicular to the x-y plane, the mesh looks like being 3D for any solver in OF.

My guess is that the problem lies within the fact, that you do not have the same number of cells in all the blocks, thus blockMesh does not know how to connect across these non-matching interfaces and makes it a seperate region.

Further in your checkMesh, you are informed that your mesh consists of multiple regions which are not interconnected, but this is merely a warning.

/ Niels

mgz1985 August 19, 2008 13:51

hi niels, first off i cant
 
hi niels,

first off i cant c the black lines in my paraview.

my colleague showed them to be discontinuties which i dont think should arise because everypatch is beginning from the vertex of the preceding patches so it should be a continuous faces and should not contain defaultFaces added by OpenFOAM.

These defaultFaces are being added at the connection of 2 patches. i do not understand the error for this discontinuity or is it incorrect to define a common vertex in 2 patches.

mgz1985 August 19, 2008 13:58

and yeah i also tried to remov
 
and yeah i also tried to remove the discontinuity by making a successive patch from the penultimate point in the previous patch but it does not seem to help.

ngj August 19, 2008 15:13

1. See the attached picture in
 
1. See the attached picture in my previous post for the black lines.

2. If you zoom onto the mesh in paraView, then you will see that the interface between the different blocks have non-matching nodal points, even though the entire interface patch are perfectly matching.

3. I have been wondering that it actually was succesfully generated by blockMesh, but in the blockMesh-file you will find that you have multiple definition of the points, thus as (point N) = (point M) but you use N in one block and M in the the neighboring block me guess is that they are considered to be non-interconnected. Discard all multiple defined points and make your blocks based on unique point definitions. See the UserGuide for questions on mesh generation using blockMesh.

/ Niels

mgz1985 August 19, 2008 16:59

yeah Niels, I can see the d
 
yeah Niels,

I can see the discontinuity in ur image and the image sent by my colleague.

And yes regarding the individual point method, i tried that in the morning, it was good for the airfoil upper chord and lower chord patch but when i tried to attach the gap between the slot and airfoil, i had the same problem of no connectivity.

Anyways I can try again tomorrow as the blockMesh is in the office.

mgz1985 August 20, 2008 17:23

HI all, I tried the unique
 
HI all,

I tried the unique point method but it does not work.

The problem is in meshing the gaps arising due to the deflection of the slot. is there anyway to mesh the following in OpenFOAM.

i have an edge A-B-C. from this edge, B-C has to form a different patch and A-C a different one. i have read the users guide and seen examples in icoFoam and simpleFoam but I cant find anything similar to this. Can some one suggest another software for meshing this.

Thanks

peter73 November 6, 2008 16:46

I tried the NACA0012 airfoil f
 
I tried the NACA0012 airfoil for incompressible flow using k-epsilon model with minor changes on the solver. It seems work for me.


All times are GMT -4. The time now is 04:39.