View Issue Details

IDProjectCategoryView StatusLast Update
0003171OpenFOAMBugpublic2019-02-25 11:35
ReportergskillasAssigned Tohenry 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformOpenSUSEOSLeapOS Version15
Product Versiondev 
Fixed in Versiondev 
Summary0003171: blockmesh reports wrong cell sizes
Descriptionblockmesh reports cell sizes wrongly.

Creating points with scale 1
    Block 0 cell size :
        i : 2.5 .. 2.5
        j : 1 .. 1
        k : 1 .. 1
Steps To Reproducerun blockmesh on attached file (distorted cube), or on any axisymmertrical 2D case.
TagsNo tags attached.

Activities

gskillas

2019-02-16 16:23

reporter  

blockMeshExample.tar.gz (25,609 bytes)

henry

2019-02-21 15:26

manager   ~0010313

Last edited: 2019-02-21 15:32

View 2 revisions

The current output is a sanity check and does not do an exhaustive analysis of all the cell generated per block, it just checks the grading on the first edge in each direction. Even if it did analyse every cell on a distorted mesh the cell size is not well defined; would you want the bounding box dimensions, the minimum dimensions etc. etc.

If the current output is confusing the best approach might be to remove it altogether and a post-processing tool like checkMesh used to analyse the cell sizes.

henry

2019-02-21 16:02

manager   ~0010314

One option is to print the range of cell edge lengths for all the block edges which for the case provided generates

    Block 0 cell size :
        (i 0 0) : 2.5 .. 2.5
        (i 1 0) : 2.5 .. 2.5
        (i 0 1) : 2.5 .. 2.5
        (i 1 1) : 2.5 .. 2.5
        (0 j 0) : 1 .. 1
        (1 j 0) : 1 .. 1
        (0 j 1) : 1.00049 .. 1.00049
        (1 j 1) : 1.00037 .. 1.00037
        (0 0 k) : 1 .. 1
        (1 0 k) : 1 .. 1
        (0 1 k) : 0.96875 .. 0.96875
        (1 1 k) : 0.972656 .. 0.972656

This is probably OK for a small number of blocks in the mesh but if there is a large number this will be a lot of output.

gskillas

2019-02-23 11:54

reporter   ~0010326

Hello Henry

this is too much information, you are right. What if blockMesh reports only min/max cell sizes:

i: 2.5 .. 2.5
j: 1 .. 1.00049
k: 0.96875 .. 1

this might be a good balance between information and output. Having this output is very convenient for debugging purposes, when building structured meshes. checkMesh is good to get more detailed information, but takes longer to generate.

Best regards,

George

henry

2019-02-23 12:32

manager   ~0010329

This is possible but a bit complicated to implement because the edge information would need to be cached and processed to return the range for the set of edges in each direction.
I will look into it next week.

henry

2019-02-25 09:44

manager   ~0010332

The problem with only printing the max and min in each direction is that it hides the direction of the grading and doesn't provide useful information in the case that edge grading is used.
It would be better if the edge-based cell size range is printed for edges that are sub-divided differently, so the output would be something like:

     Block 0 cell size :
        i : 2.5
        (0 j 0) : 1
        (1 j 0) : 1
        (0 j 1) : 1.00049
        (1 j 1) : 1.00037
        (0 0 k) : 1
        (1 0 k) : 1
        (0 1 k) : 0.96875
        (1 1 k) : 0.972656

henry

2019-02-25 11:35

manager   ~0010333

Resolved by commit fa33e8e1980a30db3aa5037ccb8a17577a8c2234

Issue History

Date Modified Username Field Change
2019-02-16 16:23 gskillas New Issue
2019-02-16 16:23 gskillas File Added: blockMeshExample.tar.gz
2019-02-21 15:26 henry Note Added: 0010313
2019-02-21 15:32 henry Note Edited: 0010313 View Revisions
2019-02-21 16:02 henry Note Added: 0010314
2019-02-23 11:54 gskillas Note Added: 0010326
2019-02-23 12:32 henry Note Added: 0010329
2019-02-25 09:44 henry Note Added: 0010332
2019-02-25 11:35 henry Assigned To => henry
2019-02-25 11:35 henry Status new => resolved
2019-02-25 11:35 henry Resolution open => fixed
2019-02-25 11:35 henry Fixed in Version => dev
2019-02-25 11:35 henry Note Added: 0010333