|
[Sponsors] |
December 24, 2023, 15:19 |
snappyhexmesh Edge problem
|
#1 | |
New Member
Nafiz Ahmed Khan
Join Date: Nov 2023
Location: Canada
Posts: 18
Rep Power: 2 |
Hello Everyone,
Please accept my warm greetings. I've made a simple mesh using the searchableCylinder in snappyHexMeshDict, as shown in Figure 1. 1.PNG But, while I tried to tilt the entire mesh, the edges were distorted and not uniform, as shown in figure 2. 2.jpg How do I solve this issue? snappyHexMeshDict: Quote:
Nafiz Last edited by Nafiz375; December 24, 2023 at 17:59. |
||
December 26, 2023, 10:49 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,068
Rep Power: 26 |
Hello,
What you see on the screenshot is the expected result if you just changed the orientation of your searchableCylinder. In paraView if you want to see the actual mesh your can toggle the advanced properties and untick "Decompose polyhedra". In addition if you used the slice filter you can untick "Triangulate the slice". Regards, Yann |
|
December 27, 2023, 11:12 |
|
#3 |
New Member
Nafiz Ahmed Khan
Join Date: Nov 2023
Location: Canada
Posts: 18
Rep Power: 2 |
Hello Yann,
Thanks for your reply. I've unchecked "Decompose polyhedra" and also unticked "Triangulate the slice." The meshing looks like below now. 3.PNG Is there any other way to improve the mesh quality at the edges? Regards, Nafiz |
|
December 28, 2023, 12:47 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,068
Rep Power: 26 |
There is probably a misunderstanding about what you are trying to do.
In your snappyHexMeshDict file, everything inside the refinementSurfaces is commented. Your windTurbine1 geometry is only used in the refinementRegions section to refine mesh inside the geometry to level 4. This is the result you get: the mesh is not snapped on your geometry, and the mesh inside or outside the geometry is not removed, but the region inside the geometry is refined as specified. If you actually want to mesh the windTurbine1 geometry, you need to define it in the refinementSurfaces section. In this case the mesh will be snapped on windTurbine1 and the cells inside or outside (depending on the locationInMesh parameter) will be removed from the mesh. Regards, Yann |
|
December 29, 2023, 18:00 |
|
#5 |
New Member
Nafiz Ahmed Khan
Join Date: Nov 2023
Location: Canada
Posts: 18
Rep Power: 2 |
Hello Yann,
I hope you are doing well. Thanks for the clarifications. I actually didn't use any STL file. I just used searchableCylinder in snappyHexMeshDict. That's why I couldn't use the refinementSurfaces for the surface and edges. Do I need to do the geometry with any other CAD software and then import it for the meshing with snappyHexMeshDict to imporve the mesh quality at the edges? Regards and thanks, Nafiz |
|
December 30, 2023, 05:17 |
|
#6 | |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,068
Rep Power: 26 |
Hello Nafiz,
Quote:
Regards, Yann |
||
January 5, 2024, 16:52 |
|
#7 | |
New Member
Nafiz Ahmed Khan
Join Date: Nov 2023
Location: Canada
Posts: 18
Rep Power: 2 |
Dear Yann,
Thank you so much for your suggestions. I have followed and done my meshing by importing a file. Capture.jpg I've attached the new mesh for your reference. Is there any way to improve more at the edges of the circle? The snappyHexmesh code is: Quote:
|
||
January 6, 2024, 05:43 |
|
#8 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,068
Rep Power: 26 |
Hello Nafiz,
It is a bit hard to tell as I cannot really see the cylinder edge on the screenshot you posted. Could you elaborate on the type of simulation you want to do with this geometry? Yann |
|
January 7, 2024, 19:08 |
|
#9 |
New Member
Nafiz Ahmed Khan
Join Date: Nov 2023
Location: Canada
Posts: 18
Rep Power: 2 |
Hi Yann,
I hope you are doing well. I'm trying to do a 3D actuator disk RANS simulation. I've imported the geometry from outside and used SnappyHexMesh for meshing. I'm just trying to find out the wake velocity behind the AD model. My issue is that around the edge of the circular mesh attached, the mesh isn't uniformly discretized. How can I improve the mesh at that circumference? The code for the SnappyHexMesh is attached above. Capture.jpg Capture.jpg 1.jpg Best wishes Nafiz |
|
January 8, 2024, 04:02 |
|
#10 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,068
Rep Power: 26 |
Hello Nafiz,
Thanks for the additional details. I am not sure to understand what I'm looking at. On your first 2 pictures the mesh does not seem to be snapped on your cylinder. On the last pic it kinda looks like it's snapped. How did you get the picture? About your STL file, is it a closed volume? If you intend to use actuation disk, your cylinder should be defined as a cellZone: Code:
refinementSurfaces { cylinder.obj { level (2 5); faceZone ActDiskZone; cellZone ActDiskZone; cellZoneInside insidePoint; } } Regards, Yann |
|
January 11, 2024, 14:17 |
|
#11 | |
New Member
Nafiz Ahmed Khan
Join Date: Nov 2023
Location: Canada
Posts: 18
Rep Power: 2 |
Hello Yann,
Thanks for your comments. The last pic I zoomed in on in Paraview, and yes, volume is closed. I'm trying to refine the meshing by adding an extra inner zone, like in the picture below. 1.jpg But while I gave the snappyHexMesh overwrite command, the outer domain vanished, and only the inner zone remained. I didn't change anything in the snappyHexMesh code. 2.PNG blockMesh code: Quote:
Regards, Nafiz |
||
January 12, 2024, 03:28 |
|
#12 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,068
Rep Power: 26 |
Hello Nafiz,
If you want to refine a zone inside your mesh you can do it directly in snappyHexMesh: define a box in the geometry section and then use it refinement regions. Code:
geometry { a_box_for_refinement { type box; min (1.5 1 -0.5); max (3.5 2 0.5); } }; Code:
refinementRegions { a_box_for_refinement { mode inside; levels ((1.0 4)); // refine to level 4 inside the box } } Regards, Yann |
|
January 12, 2024, 14:40 |
|
#13 |
New Member
Nafiz Ahmed Khan
Join Date: Nov 2023
Location: Canada
Posts: 18
Rep Power: 2 |
Hi Yann,
Thanks again for clearing up many of my questions. I actually owe it to you, as you have answered many of my doubts. I actually tried something like this. 1.PNG That's why I added another block to the block mesh. Is it possible to do that with just the refinement box, as you mentioned earlier? Reagrds, Nafiz |
|
January 15, 2024, 03:26 |
|
#14 | |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,068
Rep Power: 26 |
Hello Nafiz,
Quote:
Now if you aim to reproduce the results of a reference paper, the best you can do is to setup you case as close as possible from your reference. Regards, Yann |
||
January 16, 2024, 12:55 |
|
#15 |
New Member
Nafiz Ahmed Khan
Join Date: Nov 2023
Location: Canada
Posts: 18
Rep Power: 2 |
Hello Yann,
I solved that issue and made a refinement zone by adding a refinement box. But, while zooming in on the sectional view of the cylinder, I found some additional meshing happening, as shown in the picture. 1.jpg I tried to resolve that by adjusting different levels of meshing in both refinementSurfaces and refinementRegions. But I couldn't improve. Any suggestions for that? Best wishes, Nafiz |
|
January 17, 2024, 03:32 |
|
#16 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,068
Rep Power: 26 |
Hello Nafiz,
It might be a matter of alignment between blockMesh, the cylinder geometry and your refinement regions. The cells at the limit of your refinement zone can get selected for refinement or not depending on their position relatively to the refinement zone. Sometimes you can get this kind of thing when cells are just at the verge of the zone. Have you used refinement regions with distance mode on your cylinder or did you define box around it? You can try to slightly change the box position or refinement distance to see if it allow to avoid picking these cells for refinement. Regards, Yann |
|
January 21, 2024, 13:14 |
|
#17 |
New Member
Nafiz Ahmed Khan
Join Date: Nov 2023
Location: Canada
Posts: 18
Rep Power: 2 |
Hello Yann,
I solved this issue by following your suggestions. Now, I'm trying to extract data like stream-wise (U_x) and span-wise (U_y) velocities for the box as shown in the image. A plot_over_line just gives me a particular line. vel_mag.jpg How can I extract all the associated values for that whole region? Any suggestions? Best wishes, Nafiz |
|
January 22, 2024, 04:13 |
|
#18 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,068
Rep Power: 26 |
Hello Nafiz,
You can use the clip filter with the clip type: box to get the data of the region of interest. Now what do you mean by "extract data"? If you want to save these data in a file, you can click on your clip filter in the pipeline, then file>save data Regards, Yann |
|
January 29, 2024, 20:21 |
|
#19 |
New Member
Nafiz Ahmed Khan
Join Date: Nov 2023
Location: Canada
Posts: 18
Rep Power: 2 |
Hello Yann,
Thanks for your awesome advice. I tried the clip feature, as you mentioned. But while I tried to save data, I found something unusual: I specified one box with specific coordinates (x axis: 378 to 1008, y axis: 283.5 to 787.5) in the attached picture. But in the Find Data feature, while I checked the values for velocities, I found both x and y axis coordinates exceeded my given range (2nd picture). 1.jpg 2.PNG Any suggestions how can I find the data only for my specified region of interest? Regards, Nafiz |
|
January 30, 2024, 03:39 |
|
#20 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,068
Rep Power: 26 |
Hello Nafiz,
Are you sure your clip kept the inside of the box and not the outside? Regards, Yann |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[cfMesh] Edge problem | momod | OpenFOAM Community Contributions | 0 | May 19, 2023 11:51 |
[snappyHexMesh] Problem with snappyhexMesh: modelling a pore chamber and pore throat model | Saideep | OpenFOAM Meshing & Mesh Conversion | 5 | May 10, 2015 14:46 |
[GAMBIT] GAMBIT edge problem | SJD | ANSYS Meshing & Geometry | 4 | February 26, 2014 15:56 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 11:55 |