CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

n23012 meshing problem.....

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Alhasan

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 24, 2014, 21:52
Default n23012 meshing problem.....
  #1
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16
tareqkh is on a distinguished road
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,

error.jpg

mesh.jpg
tareqkh is offline   Reply With Quote

Old   December 25, 2014, 10:26
Default Try get better mesh with good skewness and aspect ratio
  #2
Senior Member
 
Alhasan's Avatar
 
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15
Alhasan is on a distinguished road
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
Attached Images
File Type: jpg Screen Shot 2014-12-25 at 15.24.04.jpg (98.8 KB, 17 views)
Alhasan is offline   Reply With Quote

Old   December 25, 2014, 15:17
Default
  #3
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16
tareqkh is on a distinguished road
Quote:
Originally Posted by Alhasan View Post

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?

angle of attack.jpg

Regards,
tareqkh is offline   Reply With Quote

Old   December 25, 2014, 17:00
Default
  #4
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 12
ssss is on a distinguished road
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.
ssss is offline   Reply With Quote

Old   December 25, 2014, 17:29
Default
  #5
Senior Member
 
Alhasan's Avatar
 
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15
Alhasan is on a distinguished road
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 View Post
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 likes this.
Alhasan is offline   Reply With Quote

Old   December 26, 2014, 00:26
Default skwness aspect ratio
  #6
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16
tareqkh is on a distinguished road
Quote:
Originally Posted by Alhasan View Post
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"


e2eba6bd40640ec153af41a4b1032bad.png


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,
tareqkh is offline   Reply With Quote

Old   December 26, 2014, 08:23
Default
  #7
Senior Member
 
Alhasan's Avatar
 
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15
Alhasan is on a distinguished road
Hey Khamllag,
Quote:
Originally Posted by tareqkh View Post
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
Attached Images
File Type: png Figure 1.png (12.4 KB, 3 views)
File Type: png Figure 2.png (12.0 KB, 3 views)
Alhasan is offline   Reply With Quote

Old   December 27, 2014, 17:40
Default n23012
  #8
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16
tareqkh is on a distinguished road
Quote:
Originally Posted by Alhasan View Post
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,

n23012.zip
tareqkh is offline   Reply With Quote

Old   December 27, 2014, 21:30
Default
  #9
Senior Member
 
Alhasan's Avatar
 
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15
Alhasan is on a distinguished road
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
Alhasan is offline   Reply With Quote

Old   December 27, 2014, 21:38
Default
  #10
Senior Member
 
tareqkh's Avatar
 
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16
tareqkh is on a distinguished road
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...
tareqkh is offline   Reply With Quote

Old   December 27, 2014, 21:53
Default
  #11
Senior Member
 
Alhasan's Avatar
 
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15
Alhasan is on a distinguished road
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
Alhasan is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with querying the meshing database in CFX-Pre ashtonJ CFX 18 April 18, 2023 23:49
[Other] Hex meshing problem DM12 patrick ANSYS Meshing & Geometry 7 January 9, 2015 07:21
Gambit meshing problem to following geometry ahmadmln ANSYS Meshing & Geometry 2 October 21, 2014 01:49
[ANSYS Meshing] Inflation - Airfoil Meshing - Divergence problem dalecooper ANSYS Meshing & Geometry 0 July 19, 2013 07:04
Meshing problem in GAMBIT Vidya Raja FLUENT 0 May 20, 2006 23:31


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