CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Gmsh] Serious problem with mesh strategy????? (https://www.cfd-online.com/Forums/openfoam-meshing/157546-serious-problem-mesh-strategy.html)

tareqkh August 1, 2015 05:15

Serious problem with mesh strategy?????
 
Hello Fomers,

I am studying flow over a C-D with a flange. The reason of this study is to do gird convergence and a validations at the same time. I have made the mesh using Gmsh. The dimensions of the problem is as follows:

The domain and dimensions
Attachment 41213
Attachment 41214

As I mentioned, I have made the mesh and set up the required patches for the boundary conditions. However, when I exported the mesh and did gmshTofoam, I got an empty patch around the (Shroud), even though I defined it. I do not know whether this comes from the mesh strategy that I did or from not selecting the right patches. I have tried so many times, but no progress so far. I was wondering if somebody had faced the same problem before could guide me to resolve this issue. I am attaching the geo file of the problem.

Attachment 41215

Thanks in advance,

KateEisenhower August 3, 2015 02:11

Hello Tareqkh,

thanks for your mail. This problem looks interesting. I'll have a look at your file later today. Please note that I am not able to respond to your message via Mail. I think this has to do sth. with your cfd-online settings.

Best regards,

Kate

tareqkh August 3, 2015 02:18

Hello Kate
 
I would like to express my gratitude for you kind reply and hospitality. I have recognized that I have to add thickness to the problem to get the patch, but the problem gets more messy and unable to manage it. I can send the update file if you want.

Kind regards,

KateEisenhower August 3, 2015 02:20

You're welcome. Yes, please upload it!

Kate

tareqkh August 3, 2015 02:29

Updated File
 
Here is and an updated file of the shrouded diffuser by adding thickness.

Thanks again,

KateEisenhower August 3, 2015 04:54

Quote:

Originally Posted by tareqkh (Post 558112)
Here is and an updated file of the shrouded diffuser by adding thickness.

Attachment 41231

Thanks again,

Hello again,

I had a look at your file. First, I have a few questions? How did you create your geometry? Did you enter your points and lines by hand?
Am I right that you want to define a 2D domain? Please note that OpenFoam is not capable of solving 2D problems. Your domain should have a thickness of one cell, than you have to assign empty patches. I have never worked with OpenFoam in 2D, but I guess this is the way to do it.
Furtheron I am getting two errors when loading the file. This is because you defined spline 9 and spline 10 two times.
And I am not able to create a 2D mesh with this setup.
Also you have to create physical entities when you want to export your mesh (look at the official user guide for this).

So please explain the problem a bit more. If I am able I would be glad to help you.

Best regards,

Kate

tareqkh August 3, 2015 05:12

Quote:

Originally Posted by KateEisenhower (Post 558124)
Hello again,

I had a look at your file. First, I have a few questions? How did you create your geometry? Did you enter your points and lines by hand?
Am I right that you want to define a 2D domain? Please note that OpenFoam is not capable of solving 2D problems. Your domain should have a thickness of one cell, than you have to assign empty patches. I have never worked with OpenFoam in 2D, but I guess this is the way to do it.
Furtheron I am getting two errors when loading the file. This is because you defined spline 9 and spline 10 two times.
And I am not able to create a 2D mesh with this setup.
Also you have to create physical entities when you want to export your mesh (look at the official user guide for this).

So please explain the problem a bit more. If I am able I would be glad to help you.

Best regards,

Kate

Thank you again for your quick reply. Here are answers to your question:

Quote:

Originally Posted by KateEisenhower (Post 558124)
I had a look at your file. First, I have a few questions? How did you create your geometry? Did you enter your points and lines by hand?
Kate

From the dimensions in the beginning of the post, I attached a pictures with dimensions of the problem. Then I used excel to make the points and extract them to gmsh. So, it clearly by hand, but it is based on the geometry of the problem. If you have any idea on how to do it easily that would be perfect.

Quote:

Originally Posted by KateEisenhower (Post 558124)
Am I right that you want to define a 2D domain? Please note that OpenFoam is not capable of solving 2D problems. Your domain should have a thickness of one cell, than you have to assign empty patches. I have never worked with OpenFoam in 2D, but I guess this is the way to do it.

I did the command extrude in order to export the mesh to OpenFoam and then using the command gmshToFoam. I also fixed the points that you mentioned, so please see the attached file, which will answer your questions. I am currently concern about the mesh strategy that I am going to use, so if you could find some time to help make it right that would be so kind of you.

Kind regards,

KateEisenhower August 3, 2015 05:26

Quote:

Originally Posted by tareqkh (Post 558128)
Thank you again for your quick reply. Here are answers to your question:



From the dimensions in the beginning of the post, I attached a pictures with dimensions of the problem. Then I used excel to make the points and extract them to gmsh. So, it clearly by hand, but it is based on the geometry of the problem. If you have any idea on how to do it easily that would be perfect.



I did the command extrude in order to export the mesh to OpenFoam and then using the command gmshToFoam. I also fixed the points that you mentioned, so please see the attached file, which will answer your questions. I am currently concern about the mesh strategy that I am going to use, so if you could find some time to help make it right that would be so kind of you.

Kind regards,

Hello Tareqhk,

now I got two unknown lines and a physical surface which is defined two times. It is a bit annoying to stumble over the same mistakes again. Please open the *.geo file and check if gmsh reports any problems before uploading the file again.

Best regards,

Kate

P. s.: Is it possible you get these errors because you are working with GUI? If this is the case, please double-click on the saved geo file. Than gmsh should load the file and tells you at the bottom of the window if there are any errors. You can than click on the report and see the exact line numbers. You can than open the geo file in any text editor and correct them.

tareqkh August 3, 2015 05:36

Thanks again for your kind reply. I have fixed all errors, but I a little bit concern on how to mesh it properly. Do you have any idea how to start?

Best,

Tareq

KateEisenhower August 3, 2015 05:48

1 Attachment(s)
Yes, in the 2D case, I highly recommend the attached example which you can adapt for your use case. It was posted and probably created by Prof. Geuzaine, the creator of gmsh. I can't find the original source right now.

All the best,

Kate

tareqkh August 3, 2015 05:58

What is the relationship between my case and the case that you sent?

Best,

Tareq

KateEisenhower August 3, 2015 06:56

Of course, the mesh you are creating always depends on the results you are looking for. I chose this example because it shows how you can create a nice boundary layer with transfinite entities.
But it is all useless, unless you tell us what you want to calculate.

Best regards,

Kate

tareqkh August 3, 2015 07:00

Your case that you sent was not relevant to my case. I want to plot the velocity along the line and compare my results to the literature.

Thanks again,

Tareq

KateEisenhower August 3, 2015 07:07

Okay, my first question would be: Why do you need this large wind tunnel setup around your geometry?

tareqkh August 3, 2015 07:08

Because this case is in the literature.

Best,

Tarq

KateEisenhower August 3, 2015 07:17

Is it possible to provide a link to this source?

tareqkh August 3, 2015 07:19

After finishing this case, I will provide you the link.

Best,

Tareq


All times are GMT -4. The time now is 06:45.