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

[mesh manipulation] CreateBaffles generates distorted mesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 24, 2019, 05:36
Default CreateBaffles generates distorted mesh
  #1
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 16
Andrea_85 is on a distinguished road
Dear All,


I am having problems with the createBaffles utility. I have a pretty much simple 2D geometry that is a rectangular domain divided in 4 regions as shown below


Code:
-------------------------------------
|  region 1  | region 2  | region 3 |          -> 0.15 m
-------------------------------------
|                                    |
|               region 4             |          -> 1.85 m
|                                    |
-------------------------------------
I want to create baffles between region 1 and region 2 and between region 2 and region 3. The thickness of the first layer (with regions 1/2/3) is 0.15 m and the thickness of the bottom layer (region 4) is 1.85m. I need a very fine mesh in the first layer and i am using 1000 cells in the vertical direction with aspect ratio 100. The mesh in horizontal direction is much coarser (34 cells), as well as the mesh in the bottom layer (20 cells in vertical direction).



I succesfully generated the mesh with blockMesh and checkMesh only complains about high aspect ratio cells, but this is ok for our applications.



Code:
Create polyMesh street for time = 0

Time = 0

Mesh stats
    points:           71470
    internal points:  0
    faces:            139774
    internal faces:   68306
    cells:            34680
    faces per cell:   6
    boundary patches: 6
    point zones:      0
    face zones:       0
    cell zones:       4

Overall number of cells of each type:
    hexahedra:     34680
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     0

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
    bottom              34       70       ok (non-closed singly connected)
    top_ac              10       22       ok (non-closed singly connected)
    sides               2040     4084     ok (non-closed singly connected)
    defaultFaces        69360    71470    ok (non-closed singly connected)
    sw_left             12       26       ok (non-closed singly connected)
    sw_right            12       26       ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (0 0 0) (10 2 0.1)
    Mesh has 2 geometric (non-empty/wedge) directions (1 1 0)
    Mesh has 2 solution (non-empty) directions (1 1 0)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (3.14905e-18 9.41006e-19 -3.95371e-16) OK.
 ***High aspect ratio cells found, Max aspect ratio: 91151.3, number of cells 26468
  <<Writing 26468 cells with high aspect ratio to set highAspectRatioCells
    Minimum face area = 6.959e-07. Maximum face area = 0.320584.  Face area magnitudes OK.
    Min volume = 6.959e-08. Max volume = 0.0320584.  Total volume = 2.  Cell volumes OK.
    Mesh non-orthogonality Max: 0 average: 0
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 1.09523e-13 OK.
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.
Then I used setSet to select all the cells in between region 1 and region 2 and region 2 and region 3. It correctly selects 2000 cells, and after checking with paraview everything seems ok. Then I run createBaffles:


Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  6
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      createBafflesDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Whether to convert internal faces only (so leave boundary faces intact).
// This is only relevant if your face selection type can pick up boundary
// faces.


internalFacesOnly true;

// Example using "blades" as name of baffle patch
baffles
{
    baffles  // group name
    {
        //- Use predefined faceZone to select faces and orientation.
        type        faceZone;
        zoneName    ground_baffles;

        patches
        {
            master
            {
                name        membrane_master;  // patch name
                type        patch;
            }
            slave
            {
                name        membrane_slave;  // patch name
                type        patch;
            }
        }
    }
}


// ************************************************************************* //


--> output-->


Create time

Create mesh street for time = 0

Reading baffle criteria from createBafflesDict

Not converting faces on non-coupled patches.

Created zone baffles at index 1 with 2000 faces
Converted 2000 faces into boundary faces in patches
2
(
membrane_master
membrane_slave
)


--> FOAM Warning :
    From function int main(int, char**)
    in file createBaffles.C at line 854
    Setting field on boundary faces to zero.
You might have to edit these fields.
Writing mesh to 3600
End
The problem is that the createBaffles utility has now generated a lot of distorted cells with zero face area or zero volume, high on-orthogonality and high skewness.



Code:
Time = 3600

Mesh stats
    points:           71470
    internal points:  0
    faces:            141774
    internal faces:   66306
    cells:            34680
    faces per cell:   6
    boundary patches: 8
    point zones:      0
    face zones:       2
    cell zones:       4

Overall number of cells of each type:
    hexahedra:     34680
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     0

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
    bottom              34       70       ok (non-closed singly connected)
    top_ac              10       22       ok (non-closed singly connected)
    sides               2040     4084     ok (non-closed singly connected)
    defaultFaces        69360    71470    ok (non-closed singly connected)
    sw_left             12       26       ok (non-closed singly connected)
    sw_right            12       26       ok (non-closed singly connected)
    membrane_master     2000     4004     ok (non-closed singly connected)
    membrane_slave      2000     4004     ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (0 0 0) (10 2 0.1)
    Mesh has 2 geometric (non-empty/wedge) directions (1 1 0)
    Mesh has 2 solution (non-empty) directions (1 1 0)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (1.72922e-17 -2.65561e-18 4.04997e-16) OK.
 ***High aspect ratio cells found, Max aspect ratio: 8.50484e+152, number of cells 26486
  <<Writing 26486 cells with high aspect ratio to set highAspectRatioCells
 ***Zero or negative face area detected.  Minimum area: 0
  <<Writing 1260 zero area faces to set zeroAreaFaces
 ***Zero or negative cell volume detected.  Minimum negative volume: 0, Number of negative volume cells: 408
  <<Writing 408 zero volume cells to set zeroVolumeCells
    Mesh non-orthogonality Max: 90 average: 6.07206
 ***Number of non-orthogonality errors: 372.
  <<Writing 372 non-orthogonal faces to set nonOrthoFaces
    Face pyramids OK.
 ***Max skewness = 3.35195e+152, 888 highly skew faces detected which may impair the quality of the results
  <<Writing 888 skew faces to set skewFaces
    Coupled point location match (average 0) OK.

Failed 5 mesh checks.

End
If I reduce the number of cells in the first layer from 1000 to 100, it magically works and got no warning (expect the high aspect ratio as i had before) from checkMesh. Any idea? Could it be related to some tolerance in createBaffles? The first cell height close to the top surface is indeed very small.


Thanks,
Andrea
Andrea_85 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[snappyHexMesh] Add Mesh Layers doesnt work on the whole surface Kryo OpenFOAM Meshing & Mesh Conversion 13 February 17, 2022 08:34
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 08:38
decomposePar problem: Cell 0contains face labels out of range vaina74 OpenFOAM Pre-Processing 37 July 20, 2020 06:38
[ICEM] 2D hybrid mesh (unstructured mesh highly dependent on structured mesh parameters) shubham jain ANSYS Meshing & Geometry 1 April 10, 2017 06:03
[snappyHexMesh] Snappyhex mesh: poor inlet mesh Swagga5aur OpenFOAM Meshing & Mesh Conversion 1 December 3, 2016 17:59


All times are GMT -4. The time now is 02:54.