CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[snappyHexMesh] extrudeMesh + snappyHexMesh 2d wedge mesh

Register Blogs Community New Posts Updated Threads Search

Like Tree12Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2016, 04:11
Default
  #21
New Member
 
Nila
Join Date: Oct 2014
Posts: 24
Rep Power: 11
zannatul is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Quick answer: I took a brief look into the page and what's written on this current thread and:

The reason is very likely because the base mesh is uniform and has a good enough resolution.

If you use surface refinement, this means that snappyHexMesh might have certain regions that are more uniform than others, due to how the refinement transitions between levels and near the curves.

If you can provide detailed images with and without refinement, I can point out the reasons why this is happening.
Hi Bruno and Tobi

Here I have provided mesh quality and checkmesh results for both with level 0 refinement and level 3 refinement respectively along with images. Now for level 3 refinement I am still getting nice mesh on my curved surface but the problem is somewhere else.

1. When there is level 3 refinement the finest level is not covering the whole geometry (See images). Also faces with face pyramid volume < 1e-13 is 449174, which is very high. I have searched about it in the Forum. Some people saying that when the resolution of bg mesh is very fine this may happen. When I increase ncellbetweenlevel the coverage increases. But along with that cell numbers and face pyramids increase significantly.

Mesh quality control result for level 0 refinement-
Checking faces in error :

Code:
non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-09      : 0
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 0
    faces on cells with determinant < 0.001                : 0
Finished meshing without any errors
Finished meshing in = 124.36 s.
Checkmesh result-

Code:
Checking geometry...
    Overall domain bounding box (5.3814733e-19 0 -0.0066475946) (0.15225495 0.14 0.0066475946)
    Mesh (non-empty, non-wedge) directions (1 1 0)
    Mesh (non-empty) directions (1 1 1)
    Wedge front with angle 2.5 degrees
    Wedge back with angle 2.5 degrees
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (-1.0590505e-14 2.3795256e-17 -1.6763499e-14) OK.
    Max cell openness = 3.05806e-16 OK.
    Max aspect ratio = 2.3606207 OK.
    Minimum face area = 1.6186123e-08. Maximum face area = 1.452865e-05.  Face area magnitudes OK.
    Min volume = 1.119024e-11. Max volume = 1.1278445e-08.  Total volume = 0.00010219248.  Cell volumes OK.
    Mesh non-orthogonality Max: 18.415707 average: 0.48101389
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.52872632 OK.
    Coupled point location match (average 0) OK.

Mesh OK.
Mesh quality control result for level 3 refinement-
Checking faces in error :
Code:
non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 449174
    faces with face-decomposition tet quality < 1e-09      : 1
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 0
    faces on cells with determinant < 0.001                : 0
Finished meshing with 449175 illegal faces (concave, zero area or negative cell pyramid volume)
Finished meshing in = 1866.35 s.
Checkmesh results-

Code:
Checking geometry...
    Overall domain bounding box (5.3820021e-19 0 -0.0066475946) (0.15225495 0.14 0.0066477546)
    Mesh (non-empty, non-wedge) directions (1 1 0)
    Mesh (non-empty) directions (1 1 1)
    Wedge front with angle 2.5000009 degrees
 ***Wedge patch front not planar. Point (0.15224642 0.093431519 0.0066477546) is not in patch plane by 5.297356e-07 metre.
    Boundary openness (-1.7647037e-14 -5.3956546e-17 -3.5254179e-14) OK.
    Max cell openness = 3.6220384e-16 OK.
    Max aspect ratio = 2.162554 OK.
    Minimum face area = 3.0141525e-10. Maximum face area = 9.1604592e-06.  Face area magnitudes OK.
    Min volume = 2.6687307e-14. Max volume = 6.4104203e-09.  Total volume = 0.00010219239.  Cell volumes OK.
    Mesh non-orthogonality Max: 19.330951 average: 1.645505
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 1.8047799 OK.
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.
2. Another problem is that after running the simulation I found that the wall shear stress distribution (along the lower wall where the levels are perfectly fine) is not as expected. It should be a smooth single line. But in results it has many fluctuations and moving back and forth. I have not get this kind of distribution for my earlier cases. Is this happening because my curved surface has not reach convergence yet or that the y+ is not small enough. Please see the attached image for understanding. I could not find a suitable thread for this topic that is why posting together.

Please provide me some suggestions. Let me know if you need some other information for understanding. Thank you.

Zannatul
Attached Images
File Type: png The smallest level is not covering the whole geometry.png (12.0 KB, 223 views)
File Type: png When there is 0 level refinement.png (23.8 KB, 209 views)
File Type: jpg Wall shear stress.jpg (45.6 KB, 141 views)

Last edited by wyldckat; March 28, 2016 at 13:17. Reason: Added [CODE][/CODE] markers
zannatul is offline   Reply With Quote

Old   March 28, 2016, 14:10
Default
  #22
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@Zannatul: How exactly did you configure the refinement in "snappyHexMeshDict"? I've downloaded the case from Tobi's website, but without specific details of how exactly you modified the "snappyHexMeshDict" file, I'm not sure how to reproduce the problem.

As for the refinement region problem, you were too vague I have no idea where the first image is referring to... it's just showing something somewhere.

By the way, for mesh inspection, follow these instructions: http://openfoamwiki.net/index.php/FA...is_in_ParaView


As for the problem with the wall shear stress, you haven't given enough information on how to reproduce the results that you are getting. My guess is that you're not plotting the values correctly. (And yes, a vague description can lead to a vague answer )

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   March 28, 2016, 16:30
Default
  #23
New Member
 
Nila
Join Date: Oct 2014
Posts: 24
Rep Power: 11
zannatul is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings to all!

@Zannatul: How exactly did you configure the refinement in "snappyHexMeshDict"? I've downloaded the case from Tobi's website, but without specific details of how exactly you modified the "snappyHexMeshDict" file, I'm not sure how to reproduce the problem.

As for the refinement region problem, you were too vague I have no idea where the first image is referring to... it's just showing something somewhere.

By the way, for mesh inspection, follow these instructions: http://openfoamwiki.net/index.php/FA...is_in_ParaView


As for the problem with the wall shear stress, you haven't given enough information on how to reproduce the results that you are getting. My guess is that you're not plotting the values correctly. (And yes, a vague description can lead to a vague answer )

Best regards,
Bruno
Hi Bruno

I first apologize for being vague though I did not intended to be!

1. I have attached my case here so that you can see my snappydict file and also you will be able to reproduce it. You will be able to see that the fine level is not covering the whole geometry and also the number of face pyramid volume is very high. If you run checkMesh you can see the wedge face is not planner.

2. For the wall shear stress, I did run the simulation for 400000 iterations (In the case I have attached (zip file), the ncellsbetween level is 6 in the snappydict file, but the simulation I am talking about I used ncellsbetween level as 3 to save simulation time). Then I ran wallShearStress command. Then I extracted the lower wall data from paraview by just checking the lower wall patch. I have attached the .xlsx data of lower wall here as well (I have converted the .csv data to .xlsx beause the previous one is not supported to attach here. The plot was simple. I just plotted the wall shear stress against the points on the lower wall. One thing to mention here is that in my thinking there is no problem in plotting. Because I used this same method earlier for my previous simulations and got expected plot. That is why my guess is that either the iterations should be increased to ensure convergence of the curved surface or the y+ need to be decreased. Because I am using k-omega SST model which needs the y+ to be close to 1. In my case it is up to 5.8! May be I have to add some thin layers around my wedge face to solve this problem. But I do not know how I can do it.

Please let me know if you still have any question. Hope this time I am clearer
Attached Files
File Type: zip wedgeRun.zip (21.6 KB, 43 views)
File Type: xlsx Lower Wall data.xlsx (152.4 KB, 10 views)
zannatul is offline   Reply With Quote

Old   April 1, 2016, 23:13
Default
  #24
New Member
 
Nila
Join Date: Oct 2014
Posts: 24
Rep Power: 11
zannatul is on a distinguished road
Quote:
Originally Posted by wyldckat View Post
Greetings to all!

@Zannatul: How exactly did you configure the refinement in "snappyHexMeshDict"? I've downloaded the case from Tobi's website, but without specific details of how exactly you modified the "snappyHexMeshDict" file, I'm not sure how to reproduce the problem.

As for the refinement region problem, you were too vague I have no idea where the first image is referring to... it's just showing something somewhere.

By the way, for mesh inspection, follow these instructions: http://openfoamwiki.net/index.php/FA...is_in_ParaView


As for the problem with the wall shear stress, you haven't given enough information on how to reproduce the results that you are getting. My guess is that you're not plotting the values correctly. (And yes, a vague description can lead to a vague answer )

Best regards,
Bruno
Hi Bruno

Did you get a chance to look into my files? I think I have solved my problem. What I have done is that I have changed level 3 feature edge refinement to level 0. And I have added layers. Now my layers are following the curved geometry and the y+ is close to 2. I am going to try to lower it to 1 to get better use of k-w SST. My checkmesh problems (wedge face is not planar) are gone as well . I am hoping for the best that this time I get desired results. I thank you and also Tobi for both of your suggestions. Your experience helped me a lot and gave me courage to work ahead.

Zannatul
zannatul is offline   Reply With Quote

Old   April 10, 2016, 13:52
Default
  #25
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Zannatul,

Sorry, I've had a few extremely busy weeks lately and this weekend in particular I had to take a full rest.
I don't know when I'll be able to look into this, even though it's on my to-do list. With luck, I'll be able to take a quick look into this next weekend.

Best regards,
Bruno
wyldckat is offline   Reply With Quote

Old   April 12, 2016, 04:20
Default
  #26
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hey Bruno & Zannatul,

I checked your case and I am wondering why you use edge refinement instead of surface refinement in that case? There is no need for edge refinement. Use surface refinement and you will be a happy man.

If I run your case without modifications, one of the first big problems that occur direct after castellatedMesh is:
Code:
Checking initial mesh ...
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 542552
    faces with face-decomposition tet quality < 1e-09      : 0
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 0
    faces on cells with determinant < 0.001                : 0
Detected 542552 illegal faces (concave, zero area or negative cell pyramid volume)
After that I first checked your castellated mesh and the result is in the attachment. As I told you before, you should know how to use this surface feature refinement. You can see out of the picture that the edges are found correctly at the bottom and sides but the line at the top is not refined within level 3. Thats a big problem you have. I also told you that if you don't know how to use it correctly (or the problems that occur), check out the tutorial about feature edges on my homepage, there you will find exactly the behavior you get here.

After the snap procedure you get a more or less good mesh (related to the stuff you want to do now). Due to the fact that the top feature edges are not 100% aligned with the background mesh (you see this on the refinement levels), sHM will move the points of the cells to the feature edges:

Code:
        //- Use castellatedMeshControls::features (default = true)
        explicitFeatureSnap true;
Thus, the top edges are only refined by level 1 you know that this edge is not 100% on the top face of the background mesh and therefore after snapping your top face is not planar. After extrudeMesh you get this message after checkMesh:
Code:
    Wedge patch 'front' is not planar.
At local face at (0.024330986 0.10652083 0.0010623138) the normal (-0.043619304 0 0.99904823) differs from the average normal (-0.043619413 1.4461252e-09 0.99904822) by 1.1995704e-14
Either correct the patch or split it into planar parts
--> FOAM Warning : 
    From function wedgePolyPatch::calcGeometry(PstreamBuffers&)
    in file meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C at line 72
I hope that I explained it in a clear way.


Corrections

features level set to 0
refinementSurfaces set all regions to (2 2) or what ever you want. Front, back is kept to (0 0)

And woohooo ... done.
Code:
Checking initial mesh ...
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-09      : 0
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 0
    faces on cells with determinant < 0.001                : 0
Detected 0 illegal faces (concave, zero area or negative cell pyramid volume)
Checked initial mesh in = 1.52 s
Finally, I can add layers to the boundaries.
I tried it with my case, and it works perfectly for refinement of (1 1) (see attachment). Using an refinement of (2 2) it is not working directly because you get a bad corner (see attachment). What you have to do here, extrude minZ and not back (you have to check out the patches), and change point of axis in extrudeMeshDict to (0 0 0.003). Finally change the axis to (0 -1 0). Thats it.

I hope you will solve this problem now.


Additionally

Use my case (homepage), set nLevelsBetween... to 5 or 6, set all patches to level (2 2) except axis, front and back. Play around that the corner that is bad become nice.


Further hints

  • FlattenMesh can flatten patches (front and back for example)
  • Change the backgroundmesh a bit (like 1mm translation)
  • Maybe increase/decrease the writePrecision
  • Maybe a better way would be that the background mesh is bigger than the geometry and use flattenMesh after snapping.


Notice, do not start extruding the mesh without a good base mesh after snappyHexMesh.
Attached Images
File Type: png sFE.png (89.3 KB, 177 views)
File Type: png sFE2.png (126.3 KB, 168 views)
File Type: png meshingCorrect.png (80.9 KB, 170 views)
File Type: png level22.png (44.5 KB, 163 views)
File Type: png level22correct.png (82.5 KB, 187 views)
Sugajen, Tisswanny and krndv like this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   April 12, 2016, 20:42
Default
  #27
New Member
 
Nila
Join Date: Oct 2014
Posts: 24
Rep Power: 11
zannatul is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Hey Bruno & Zannatul,

I checked your case and I am wondering why you use edge refinement instead of surface refinement in that case? There is no need for edge refinement. Use surface refinement and you will be a happy man.

If I run your case without modifications, one of the first big problems that occur direct after castellatedMesh is:
Code:
Checking initial mesh ...
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 542552
    faces with face-decomposition tet quality < 1e-09      : 0
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 0
    faces on cells with determinant < 0.001                : 0
Detected 542552 illegal faces (concave, zero area or negative cell pyramid volume)
After that I first checked your castellated mesh and the result is in the attachment. As I told you before, you should know how to use this surface feature refinement. You can see out of the picture that the edges are found correctly at the bottom and sides but the line at the top is not refined within level 3. Thats a big problem you have. I also told you that if you don't know how to use it correctly (or the problems that occur), check out the tutorial about feature edges on my homepage, there you will find exactly the behavior you get here.

After the snap procedure you get a more or less good mesh (related to the stuff you want to do now). Due to the fact that the top feature edges are not 100% aligned with the background mesh (you see this on the refinement levels), sHM will move the points of the cells to the feature edges:

Code:
        //- Use castellatedMeshControls::features (default = true)
        explicitFeatureSnap true;
Thus, the top edges are only refined by level 1 you know that this edge is not 100% on the top face of the background mesh and therefore after snapping your top face is not planar. After extrudeMesh you get this message after checkMesh:
Code:
    Wedge patch 'front' is not planar.
At local face at (0.024330986 0.10652083 0.0010623138) the normal (-0.043619304 0 0.99904823) differs from the average normal (-0.043619413 1.4461252e-09 0.99904822) by 1.1995704e-14
Either correct the patch or split it into planar parts
--> FOAM Warning : 
    From function wedgePolyPatch::calcGeometry(PstreamBuffers&)
    in file meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C at line 72
I hope that I explained it in a clear way.


Corrections

features level set to 0
refinementSurfaces set all regions to (2 2) or what ever you want. Front, back is kept to (0 0)

And woohooo ... done.
Code:
Checking initial mesh ...
Checking faces in error :
    non-orthogonality > 65  degrees                        : 0
    faces with face pyramid volume < 1e-13                 : 0
    faces with face-decomposition tet quality < 1e-09      : 0
    faces with concavity > 80  degrees                     : 0
    faces with skewness > 4   (internal) or 20  (boundary) : 0
    faces with interpolation weights (0..1)  < 0.02        : 0
    faces with volume ratio of neighbour cells < 0.01      : 0
    faces with face twist < 0.02                           : 0
    faces on cells with determinant < 0.001                : 0
Detected 0 illegal faces (concave, zero area or negative cell pyramid volume)
Checked initial mesh in = 1.52 s
Finally, I can add layers to the boundaries.
I tried it with my case, and it works perfectly for refinement of (1 1) (see attachment). Using an refinement of (2 2) it is not working directly because you get a bad corner (see attachment). What you have to do here, extrude minZ and not back (you have to check out the patches), and change point of axis in extrudeMeshDict to (0 0 0.003). Finally change the axis to (0 -1 0). Thats it.

I hope you will solve this problem now.


Additionally

Use my case (homepage), set nLevelsBetween... to 5 or 6, set all patches to level (2 2) except axis, front and back. Play around that the corner that is bad become nice.


Further hints

  • FlattenMesh can flatten patches (front and back for example)
  • Change the backgroundmesh a bit (like 1mm translation)
  • Maybe increase/decrease the writePrecision
  • Maybe a better way would be that the background mesh is bigger than the geometry and use flattenMesh after snapping.


Notice, do not start extruding the mesh without a good base mesh after snappyHexMesh.
Hey Tobi

Thank you so much for your time and effort to look into my files and solving the problem. I am going to follow your suggestions. One question that I want to ask is that usually the meshes should increase gradually. Like the grading should be mostly 1.2. But when we add layers, I have seen in many tutorials that the connection with the farthest layer from wall and snappy levels are more than 1.2. Is it ok for snappy? Thank you again.
zannatul is offline   Reply With Quote

Old   October 3, 2016, 00:05
Default
  #28
Member
 
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 10
KarenRei is on a distinguished road
Working on trying out this example to try to debug my problems here:

http://www.cfd-online.com/Forums/ope...tml#post620066

I downloaded the example and had to change wedgeCoeffs to sectorCoeffs. Unfortunately, extrudeMesh is flaking out on:

--> FOAM FATAL ERROR:
Cannot find patch front in the source mesh.
Valid patch names are
8
(
minZ
inlet
upperWall
rightWall
outlet
lowerWall
back
axi
)

Seems to be due to this in snappyHexMesh:

Removing zero-sized patches:
maxY type patch at position 0
minX type patch at position 1
maxX type patch at position 2
minY type patch at position 3
maxZ type patch at position 4
front type patch at position 11


I'll look into it more tomorrow...
KarenRei is offline   Reply With Quote

Old   October 3, 2016, 23:49
Default
  #29
Member
 
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 10
KarenRei is on a distinguished road
Rather than working on the extrude stage, I was more interested in how this test case was managing to avoid errors with snappyHexMesh. Unfortunately, it appears to be that the answer is "by being so oversimplistic":

1) It's meshing the inside of a shape rather than its exterior (or a shape with nested parts)
2) It's meshing a constant even grid and only snapping to the shape rather than allowing for refinement
3) It's not using layer adding.

Whenever I try to adapt it to more complicated cases, it breaks down. I'm at my wits end here, I'm literally thinking about taking the output from snappyHexMesh and writing my own program to read it in, parse one face into coherent 2d cells and make a wedge out of them, because I can't see any way forward other than that.
KarenRei is offline   Reply With Quote

Old   May 31, 2017, 09:41
Default
  #30
New Member
 
fanchunyong
Join Date: Mar 2017
Posts: 4
Rep Power: 9
fanchunyong is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Okay I managed a lot of things by changing the patches of extrusion from front to back. Now checkMesh is okay:
Code:
Mesh stats
    points:           36991
    internal points:  0
    faces:            72242
    internal faces:   35524
    cells:            17919
    faces per cell:   6.0140633
    boundary patches: 8
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     17614
    prisms:        32
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     273
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            7   262
            8   11

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
                   Patch    Faces   Points                  Surface topology
                    axis        0        0                        ok (empty)
                     top      244      490  ok (non-closed singly connected)
                    side       58      118  ok (non-closed singly connected)
                   front    17919    18506  ok (non-closed singly connected)
                    back    17919    18506  ok (non-closed singly connected)
           groundAndWall      492      985  ok (non-closed singly connected)
                   inlet        6       13  ok (non-closed singly connected)
                  nozzel       80      162  ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (0 -0.005 -0.0052343265) (0.11988579 0.02 0.0052343265)
    Mesh (non-empty, non-wedge) directions (1 1 0)
    Mesh (non-empty) directions (1 1 1)
    Wedge front with angle 2.5 degrees
    Wedge back with angle 2.5 degrees
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (6.9999917e-16 -1.0560211e-15 -1.0271528e-14) OK.
    Max cell openness = 3.2088808e-16 OK.
    Max aspect ratio = 2.0340939 OK.
    Minimum face area = 2.7234931e-09. Maximum face area = 5.2528493e-06.  Face area magnitudes OK.
    Min volume = 6.1406691e-13. Max volume = 2.6273154e-09.  Total volume = 1.5537909e-05.  Cell volumes OK.
    Mesh non-orthogonality Max: 19.65403 average: 2.3702856
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.49041924 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
But I still got these extrem amount of warnings that the front and back are not planar ?
Hi Tobi ,could you tell me how you managed to solve the error ,when you checkMesh.i also meet the same question when i check my mesh .thank you
fanchunyong is offline   Reply With Quote

Old   May 31, 2017, 10:01
Default
  #31
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
To which error you are you relating? I had two mistakes as already given in the posts:
  1. extrusion was wrong oriented
  2. not planar based on accuracy (-> change to binary)
If you search for another answer you need to make a clear statement. You can also check my tutorials on my website to checkout how I do it.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   June 5, 2017, 04:10
Default
  #32
New Member
 
fanchunyong
Join Date: Mar 2017
Posts: 4
Rep Power: 9
fanchunyong is on a distinguished road
Quote:
Originally Posted by Tobi View Post
To which error you are you relating? I had two mistakes as already given in the posts:
  1. extrusion was wrong oriented
  2. not planar based on accuracy (-> change to binary)
If you search for another answer you need to make a clear statement. You can also check my tutorials on my website to checkout how I do it.
Dear sir , thanks for your reply . i have check your tutorials and i can use the extrudeMesh to gengrate mesh ,but when i checkMesh it shows'' Failed 2 mesh checks'' ,i don't know why.And can i sent my case to your email ,can you help me to check it?? thank you sir.
fanchunyong is offline   Reply With Quote

Old   June 5, 2017, 04:24
Default
  #33
New Member
 
fanchunyong
Join Date: Mar 2017
Posts: 4
Rep Power: 9
fanchunyong is on a distinguished road
Quote:
Originally Posted by Tobi View Post
To which error you are you relating? I had two mistakes as already given in the posts:
  1. extrusion was wrong oriented
  2. not planar based on accuracy (-> change to binary)
If you search for another answer you need to make a clear statement. You can also check my tutorials on my website to checkout how I do it.
sorry sir i don't know how to attach my case to the reply ,can you tell me how can i attach it ?

Last edited by wyldckat; June 25, 2017 at 10:52. Reason: fixed quote markers
fanchunyong is offline   Reply With Quote

Old   June 5, 2017, 05:25
Default
  #34
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Do you get the errors within my tutorial or in your personal case? If it is your personal case, please check out my tutorial first or search in the openfoamwiki. There should be a tutorial too (I am not wrong).
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   June 5, 2017, 06:40
Default
  #35
New Member
 
fanchunyong
Join Date: Mar 2017
Posts: 4
Rep Power: 9
fanchunyong is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Do you get the errors within my tutorial or in your personal case? If it is your personal case, please check out my tutorial first or search in the openfoamwiki. There should be a tutorial too (I am not wrong).
ok,thanks i will check it ,thank you again
fanchunyong is offline   Reply With Quote

Old   September 22, 2017, 03:05
Default 2D axisymmetric
  #36
New Member
 
karundev
Join Date: Jun 2017
Location: India
Posts: 25
Rep Power: 8
krndv is on a distinguished road
Hello,

Can anybody share the steps to get a mesh for a 2D axisymmetric case.

If i want to make it for a cylinder of dia 2R ?

is it like just meshing a face or width R using snappy and rotating it through 1 degree so that I can get 1 cell thickness along Z direction.


Thanks in advance
krndv is offline   Reply With Quote

Old   September 22, 2017, 19:45
Default
  #37
Member
 
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 10
KarenRei is on a distinguished road
I use:

system/extrudeMeshDict

FoamFile
{
version 2.0;
format ascii;
class dictionary;
object extrudeMeshDict;
}

constructFrom patch;
sourceCase "$FOAM_CASE";
sourcePatches (near);
exposedPatchName far;
flipNormals false;
extrudeModel wedge;
mergeFaces SEE NOTE BELOW;
nLayers 1;
expansionRatio 1.0;
mergeTol 0.000001;
linearDirectionCoeffs
{
direction (0 0 1);
thickness 0.100000;
}
sectorCoeffs
{
axisPt (0 0 0);
axis (0 1 0);
angle 1.000000;
}


I work with snappyHexMesh to build my slice to spin around an axis, though you probably won't. My setup for the radial case is: blockmesh -> surfaceFeatureExtract -> decomposePar -> snappyHexMesh -> collapseEdges -> extrudeMesh (with mergeFaces true) -> extrudeMesh (with mergeFaces false) -> collapseEdges -> renumberMesh -> mapFields
KarenRei is offline   Reply With Quote

Old   November 13, 2018, 05:25
Default face is not collapsing to an edge
  #38
Member
 
Alberto
Join Date: Sep 2013
Posts: 37
Rep Power: 12
malv83 is on a distinguished road
Quote:
Originally Posted by Tobi View Post
The case I made for your geometry is available on my homepage: http://holzmann-cfd.de/index.php/en/openfoam

Please tell me if I am not allowed to share it.
Hello Tobi,

I am trying to create a wedge starting from a simple block created with blockMesh and suing the extrudeMesh dictionary used in the case "2D Rotational Symmetric Mesh" in your website.

The problem I am having is that the face that should become the axis of symmetry is not collapsing to an edge, instead that face becomes part of one of the wedges faces and makes the complete wedge not symmetric (see the pictures).

Any ideas what is causing this?

This is my blockMeshDict and extrudeMesh files:

blockMesh:
Code:
vertices
(
    (-0.01 0 -0.01)
    ( 0.09 0 -0.01)
    ( 0.09 0.025 -0.01)
    (-0.01 0.025 -0.01)
    (-0.01 0 0.01)
    ( 0.09 0 0.01)
    ( 0.09 0.025 0.01)
    (-0.01 0.025 0.01)
);
blocks
(
    hex (0 1 2 3 4 5 6 7) (300 100 1) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
    front
    {
        type patch;
        faces
        (
            (4 5 6 7)
        );
    }
 
 back
    {
        type patch;
        faces
        (
            (0 1 2 3)
        );
    }
 
 axi
    {
        type patch;
        faces
        (
            (0 1 5 4)
        );
    }
);

extrudeMesh:
Code:
constructFrom patch;
sourceCase ".";
sourcePatches (back);

exposedPatchName front;
flipNormals false;

extrudeModel        wedge;
nLayers             1;
expansionRatio      0.002; 
sectorCoeffs
{
    axisPt      (0 0 0);
    axis        (1 0 0);
    angle       5;  // For nLayers=1 assume symmetry so angle/2 on each side
}
mergeFaces false;   //true;

mergeTol 1e-6;
Attached Images
File Type: jpg 2.jpg (20.3 KB, 35 views)
File Type: jpg 3.jpg (22.2 KB, 43 views)
malv83 is offline   Reply With Quote

Old   November 14, 2018, 02:22
Default
  #39
New Member
 
AnthonyP's Avatar
 
Tony
Join Date: May 2016
Posts: 22
Rep Power: 9
AnthonyP is on a distinguished road
I am running into a similar issue in my thread(no replies just yet): (Using extrudeMesh to create an axisymmetric mesh yields a wrongOrientedFace)


In my case, I've noticed that the axis face is collapsing down to a triangle with 2 of the corners opposite of the rest of the wedge geometry. (found by back-tracking the faces file to the points file)
Ex. if my symmetry was along the y axis and the geometry goes along the positive X-axis (z axis for the depth) two of the faces corners are in the -X region with the 3rd on the axis.

Unfortunately I am not able to help just yet, but I'll keep looking :/
AnthonyP is offline   Reply With Quote

Old   November 15, 2018, 08:11
Default wedge with extrudeMesh problems
  #40
Member
 
Alberto
Join Date: Sep 2013
Posts: 37
Rep Power: 12
malv83 is on a distinguished road
Changing sourcePatches from (front) to (back) solved the problem of the non-symmetric final geometry (symmetry plane was not collapsing to an edge), but I can not solve the warnings and errors of checkMesh.
Code:
--> FOAM Warning :
From function virtual void Foam::wedgePolyPatch::calcGeometry(Foam::PstreamBuffers&)
in file meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C at line 70
Wedge patch 'back' is not planar.
At local face at (0.032436500978669881301 0.0086712994579358493308 0.00037859711274703408777) the normal (3.4756075755086737744e-008 -0.043619419342796700301 0.99904822018569061637) differs from the average normal (-9.4556952460451980674e-011 -0.043619387107251821056 0.99904822159304018658) by 2.2556775865909222576e-015
Either correct the patch or split it into planar parts
I have changed the writePrecision to 20 and writeFormat to binary when building the mesh(which is created without error or warnings) and when running extrudeMesh, but I have no improvements.

Anybody else know other way (within OpenFOAM) to create the wedge?
malv83 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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 06:09
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell Arman_N OpenFOAM Meshing & Mesh Conversion 1 May 20, 2019 17:16
[snappyHexMesh] snappyHexMesh - geometry does not appear in Mesh czhongrong OpenFOAM Meshing & Mesh Conversion 1 January 20, 2016 05:26
3D Hybrid Mesh Errors DarrenC ANSYS Meshing & Geometry 11 August 5, 2013 06:42
Fluid-Structure-Interaction on wedge mesh WiWo OpenFOAM 6 March 6, 2010 07:18


All times are GMT -4. The time now is 00:36.