tkeskita / swiftBlock

Blender add-on to generate OpenFOAM blockMeshDict
GNU General Public License v3.0
28 stars 5 forks source link

Orientation of blocks #4

Closed hkroeger closed 1 year ago

hkroeger commented 3 years ago

Hi, thanks for developing this very useful tool! I created a rather complex blocking. Preview and export are working nicely.

However, in the end after running checkMesh on the exported result, I get errors about negative volumes:

Checking geometry... Overall domain bounding box (-19449.3 -1.73472e-18 -3062.31) (17122.4 7000 4.72329) Mesh has 3 geometric (non-empty/wedge) directions (1 1 1) Mesh has 3 solution (non-empty) directions (1 1 1) Boundary openness (2.2762e-17 -8.34831e-17 9.50721e-17) OK. High aspect ratio cells found, Max aspect ratio: 2.52047e+105, number of cells 2 <<Writing 2 cells with high aspect ratio to set highAspectRatioCells Minimum face area = 3024.85. Maximum face area = 1.06208e+06. Face area magnitudes OK. Zero or negative cell volume detected. Minimum negative volume: -167769, Number of negative volume cells: 1 <<Writing 1 zero volume cells to set zeroVolumeCells Mesh non-orthogonality Max: 97.0164 average: 36.458 *Number of severely non-orthogonal (> 70 degrees) faces: 3178. Number of non-orthogonality errors: 3. <<Writing 3181 non-orthogonal faces to set nonOrthoFaces Error in face pyramids: 8 faces are incorrectly oriented. <<Writing 6 faces with incorrect orientation to set wrongOrientedFaces ***Max skewness = 19.541, 3 highly skew faces detected which may impair the quality of the results <<Writing 3 skew faces to set skewFaces Coupled point location match (average 0) OK.

Failed 5 mesh checks.

Also, while creating the blocks, I noticed that the blocks and/or faces apparently have some orientation. There were different directions displayed with the extrusion tool, sometimes opposite for faces side by side. If I select them nonetheless the resulting blocks disappear after clicking "Build".

Illustration:

  1. upper face + extrusion direction Auswahl_304
  2. lower face (next to the first) + extrusion direction Auswahl_305
  3. both together + extrusion direction Auswahl_306

I find it quite hard to keep properly track of the orientation, especially, if multiple O-grid-type blocks in different directions are required. Is there a way to modify and clean up the orientations?

Thanks!

hkroeger commented 3 years ago

I think the checkMesh error is more related to some bad projection since it only affects a low number of cells/faces. Sorry for the wrong alert.

tkeskita commented 1 year ago

OK. Yes, all faces have a normal direction, and it is important for projections. Blender has an Overlay option Show Face Orientation you can use to see face orientations by color (red/blue). Another alternative is to enable Display Face Normals overlay, which shows a line for face normals.