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/)
-   -   n23012 meshing problem..... (https://www.cfd-online.com/Forums/openfoam-solving/146342-n23012-meshing-problem.html)

tareqkh December 24, 2014 21:52

n23012 meshing problem.....
 
2 Attachment(s)
Hello everybody,

I hope that you all are fine and enjoying the CFD world. I have been working on gmsh on the airfoil n23012. I have found this example on the internet, and try to understand how can make an unstructured mesh since it is essential to have a good mesh in order to get reasonable results. However, when I used the command gmshToFoam and then checkMesh, SimpleFoam has given me a message tells that the mesh is not ok. I made print screen for both the mesh and the error on the gnu terminal wishing from somebody how is able to help me out in this issue.

Regards,

Attachment 36212

Attachment 36213

Alhasan December 25, 2014 10:26

Try get better mesh with good skewness and aspect ratio
 
1 Attachment(s)
Hey Khamllag,

you said you are trying to create an unstructured mesh !! but the mesh you have posted looks like a structured one.

On a first look the mesh doesn't look very good, you need to read about skewness and aspect ratio at least before creating your next mesh.

There should not be quick jumps in cell sizes the mesh should have smooth transitions like the attached picture below

all the best,
Hasan KJ

tareqkh December 25, 2014 15:17

1 Attachment(s)
Quote:

Originally Posted by Alhasan (Post 525211)

On a first look the mesh doesn't look very good, you need to read about skewness and aspect ratio at least before creating your next mesh.

First of all, I would like to thank you for your quick response and guidance. I would be more than happy if you could suggest specific documents about it since there are many on the internet. Second, I am curious about the picture you have posted. Have you got any reasonable results when you compared it to the literature. Finally, I have seen many posts on CFD online showing mesh file with an angle of attack like the picture below, and my question is about whether do we need to change the U file in the zero folder on that behalf or not. For instance, if our problem has horizontal velocity of 20 m/s and our airfoil has 7 degree. What the U file in this condition would be?

Attachment 36221

Regards,

ssss December 25, 2014 17:00

Did you put the front and back part of your mesh as empty in the constant/polyMesh/boundary file?

I would also say that the mesh is not very well done, I would try to put the inlet as circle, that would help to improve the inlet cells. I would also start using a mucho more coarse mesh which should give less problemas when talking about high aspect ratio cells near the airfoil wall.

Alhasan December 25, 2014 17:29

For a basic mesh you dont need to waste your time reading books skwness aspect ratio are explained here http://en.wikipedia.org/wiki/Types_of_mesh

Yes, I did have good results for the pictures posted but there is some small inconsistencies that I am trying to figure out you can have an eye on this thread for more info http://www.cfd-online.com/Forums/ope...provement.html

But at some point in time you need to get to basics of what is happening by reading some books then you will understand it better.

And yeah also Look at C-mesh it is very effective for airfoils. http://www.cfd-online.com/Wiki/NACA0012_airfoil

Quote:

Originally Posted by tareqkh (Post 525225)
my question is about whether do we need to change the U file in the zero folder on that behalf or not. For instance, if our problem has horizontal velocity of 20 m/s and our airfoil has 7 degree. What the U file in this condition would be?,

There are two ways of achieving this implementing angle of attack
1) if you are using a rectangular mesh you have to tilt the airfoil in the geometry but you donot have to make any changes in the 0/U file you just have to use a normal fixed value as inlet
Code:

  INLET
    {
        type            fixedValue;
        value          uniform (20 0 0);
    }

but one downside of this is you have to create a new geometry for every angle of attack you want to test, if you are looking at airfoil in stall you better go for this approach but preferably with a C or O mesh.

2) The other way is to have a geometry of a C-mesh with airfoil at Zero angle of attack and use to 0/U file to control the flow angle, the angle of the flow at which it gets to the airfoil.
Code:

  INLET
    {
        type            fixedValue;
        value          uniform (18.323 1.234 0);
    }

where ( 0 0 0) denotes (x y z) axis I dont have any files atm to show you but you can find it some thread where you will just use sin/cos of velocity to get the angle you require. hope this gives you an idea what is happening in the U file. This is effective for small angle of attacks as for large angle of attacks the mesh of the zero angle of attack used here will be insufficient so it is better to make a new Cmesh with airfoil having the require angle of attack

All the best,
Hasan K.J

tareqkh December 26, 2014 00:26

skwness aspect ratio
 
1 Attachment(s)
Quote:

Originally Posted by Alhasan (Post 525233)
For a basic mesh you dont need to waste your time reading books skwness aspect ratio are explained here http://en.wikipedia.org/wiki/Types_of_mesh

Hello Mr. Alhasan,

Thank you again for your kind explanations and taking the time. You were to the point. However, I still have a question about using this equation:

"Based on the deviation from normalized equilateral angle

This method applies to all cell and face shapes and is almost always used for prisms and pyramids"


Attachment 36223


Could you please show me how to use it in order to create a good mesh for the airfoil example?


Finally, I have been using gmsh for about two weeks, and in fact I am having some difficulties controlling the mesh since it has many commands that are not obvious. I have found the manual on the internet and try it to follow it, but it is not easy to understand. Have you read the manual about gmsh?


Regards,

Alhasan December 26, 2014 08:23

2 Attachment(s)
Hey Khamllag,
Quote:

Originally Posted by tareqkh (Post 525242)
Could you please show me how to use it in order to create a good mesh for the airfoil example?
Regards,

You are complicating it, it is very simple there should not be great angle in the skewness (unlike figure 1) in your cells when you create your mesh hope you understand. An ideal mesh would have square cells all over the domain with with one side of the square perpendicular to the direction of the flow (like figure 2). But practically this is not possible due to the shape of the structure that we want to test so the cells eventually get some skew,so we just have to make sure that this skewness is not very great as it can cause numerical inconsistencies in the simulation.

However i dont think skewness was your main problem with your mesh it was the aspect ratio where you had very very long rectangle cells (square cells are optimal)

All the best,
Hasan K.j

tareqkh December 27, 2014 17:40

n23012
 
1 Attachment(s)
Quote:

Originally Posted by Alhasan (Post 525261)
Hey Khamllag,


You are complicating it, it is very simple there should not be great angle in the skewness (unlike figure 1) in your cells when you create your mesh hope you understand. An ideal mesh would have square cells all over the domain with with one side of the square perpendicular to the direction of the flow (like figure 2). But practically this is not possible due to the shape of the structure that we want to test so the cells eventually get some skew,so we just have to make sure that this skewness is not very great as it can cause numerical inconsistencies in the simulation.

However i dont think skewness was your main problem with your mesh it was the aspect ratio where you had very very long rectangle cells (square cells are optimal)

All the best,
Hasan K.j

According to your replay, I am attaching the geo file that has all commands. I would really appreciate your help if could show me how to fix it.

Thank you again for your time,

Attachment 36232

Alhasan December 27, 2014 21:30

Hey Khamllag,

I am sorry I am not familiar with Gmsh. For staters from your first image, just increasing the number of nodes on the x and y-axis would sort out your problem with aspect ratio.

Just play around with it that is how you learn, play with number of nodes on x and y axis till it approximately looks like the image i shared in my first comment.

Have fun all the best.
Hasan K.J

tareqkh December 27, 2014 21:38

Hey Alhasan,

Do you have the mesh file for the picture that you have shown it to me? It will be nice to check and compare the experiential results with CFD. I just want to change it to the openFoam.

Thank you again...

Alhasan December 27, 2014 21:53

Hey,
I have compared my mesh with experimental results and they are not good enough like I have mentioned in my previous comments and I am still waiting for that question to be answer here http://www.cfd-online.com/Forums/ope...provement.html
My mesh will do you no good and I am still working on it, you have to create your own mesh for your case as mine is NACA0012 and I have meshed using ICEM and Salome.

Best of Luck,
Hasan K.J


All times are GMT -4. The time now is 09:34.