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

[mesh manipulation] StitchMesh and Interfaces problem

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By student666
  • 1 Post By Eloise

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 25, 2014, 18:15
Default StitchMesh and Interfaces problem
  #1
Member
 
Luca
Join Date: Mar 2011
Location: Italy
Posts: 62
Rep Power: 15
marluc is on a distinguished road
Dear All,

after running fluentMeshToFoam and stitchMesh I get the following output from checkMesh:

Code:
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           21680
    internal points:  0
    faces:            42248
    internal faces:   20572
    cells:            10470
    faces per cell:   6
    boundary patches: 9
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     10470
    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: 2
    The mesh has multiple regions which are not connected by any face.
  <<Writing region information to "0/cellToRegion"
  <<Writing region 0 with 5235 cells to cellSet region0
  <<Writing region 1 with 5235 cells to cellSet region1

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology                  
    WALL-RIB-up         60       122      ok (non-closed singly connected)  
    WALL-up             95       194      ok (non-closed singly connected)  
    WALL-RIB-down       60       122      ok (non-closed singly connected)  
    WALL-down           95       194      ok (non-closed singly connected)  
    OUTLET              98       200      ok (non-closed singly connected)  
    INLET               98       200      ok (non-closed singly connected)  
    INTERFACE-up        115      232      ok (non-closed singly connected)  
    INTERFACE-down      115      232      ok (non-closed singly connected)  
    frontAndBackPlanes  20940    21680    ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (0 0 -0.2506) (22 12 0.2506)
    Mesh (non-empty, non-wedge) directions (1 1 0)
    Mesh (non-empty) directions (1 1 0)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (-5.82137e-19 -2.01201e-17 8.24694e-19) OK.
    Max cell openness = 1.56737e-16 OK.
    Max aspect ratio = 4.64471 OK.
    Minimum face area = 0.0100249. Maximum face area = 0.232792.  Face area magnitudes OK.
    Min volume = 0.0050245. Max volume = 0.0415455.  Total volume = 128.307.  Cell volumes OK.
    Mesh non-orthogonality Max: 0 average: 0
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 5.28606e-13 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

Time = 1

Mesh stats
    points:           21664
    internal points:  0
    faces:            42241
    internal faces:   20795
    cells:            10470
    faces per cell:   6.02063
    boundary patches: 9
    point zones:      1
    face zones:       3
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     10346
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     124
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            7   72
            8   20
            9   24
           10   8

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
             WALL-RIB-up       60      122  ok (non-closed singly connected)
                 WALL-up       95      194  ok (non-closed singly connected)
           WALL-RIB-down       60      122  ok (non-closed singly connected)
               WALL-down       95      194  ok (non-closed singly connected)
                  OUTLET       98      198  ok (non-closed singly connected)
                   INLET       98      198  ok (non-closed singly connected)
            INTERFACE-up        0        0                        ok (empty)
          INTERFACE-down        0        0                        ok (empty)
      frontAndBackPlanes    20940    21664  ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (0 0 -0.2506) (22 12 0.2506)
    Mesh (non-empty, non-wedge) directions (1 1 0)
    Mesh (non-empty) directions (1 1 0)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (-6.05475e-19 1.44683e-17 8.57756e-19) OK.
    Max cell openness = 1.56737e-16 OK.
    Max aspect ratio = 4.64471 OK.
    Minimum face area = 0.00353238. Maximum face area = 0.232792.  Face area magnitudes OK.
    Min volume = 0.0050245. Max volume = 0.0415455.  Total volume = 128.307.  Cell volumes OK.
    Mesh non-orthogonality Max: 57.2336 average: 3.50758
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 1.52343 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
In the file constant/polymesh/boundary I find the two interfaces with nFaces 0.

Do I have to delete them from this file (and accordingly change the number of patches at the top of the file?
And should i then always use ciclicAMI BC for them in the IO field files in the /0 directory?

Actually I have changed the word interface to wall in the .msh file before running fluentMeshToFoam otherwise the interfaces wouldn't have been written to the boundary file and I would have not been able to run stitchMesh (no interfaces were found). Is this correct?

Thank you in advance for your help.
Regards,
Luca
marluc is offline   Reply With Quote

Old   June 25, 2014, 19:46
Default
  #2
Senior Member
 
M. C.
Join Date: May 2013
Location: Italy
Posts: 286
Blog Entries: 6
Rep Power: 16
student666 is on a distinguished road
Hi Luca,
Quote:
Do I have to delete them from this file (and accordingly change the number of patches at the top of the file?
after you run stitchMesh, you can delete boundary patches with nFaces = 0 and you have to adjust number of boundary at the top of the file.

Quote:
And should i then always use ciclicAMI BC for them in the IO field files in the /0 directory?
if you're intention is to make "interfaces" between to domains, for example fixed.domain and rotating domain like as MRFSimpleFoam, you have to specify interfaces as cyclicAMI and you don't have to run stitchMesh; stitchMesh allows you to remove internal faces.


Quote:
Actually I have changed the word interface to wall in the .msh file before running fluentMeshToFoam otherwise the interfaces wouldn't have been written to the boundary file and I would have not been able to run stitchMesh (no interfaces were found). Is this correct?
can't give you any advice.

Bye!
MartinB likes this.
student666 is offline   Reply With Quote

Old   June 26, 2014, 06:33
Default
  #3
Member
 
Luca
Join Date: Mar 2011
Location: Italy
Posts: 62
Rep Power: 15
marluc is on a distinguished road
Dear All,

I found the solution to my problem.

The mesh generated with Gambit contained two overlapping interfaces which has been defined as type interface. Before using stitchMesh I edited the .msh file and changed at the bottom of it interface to wall.
Then I ran fluentMeshToFoam.
Then with checkMesh I verified that I had two distinct regions, i.e. two separate volumes (*Number of regions: 2).

Now I have modified the field files in the 0 directory (p, U etc.) according to the patches listed in the file ./constant/polymesh/boundary. I have assigned a boundary conditions to the patches INTERFACE-up and INTERFACE-down as well.

After that I made the following steps (note that the directory is named 1 because of the deltaT in the controlDict. You can change it of course to obtain another directory name):
Code:
stitchMesh INTERFACE-up INTERFACE-down
rm -r ./constant/polymesh
mv ./1/polymesh ./constant 
rm -r 1/
Again with checkMesh I verified to have only one region left
(*Number of regions: 1).

I didn't remove the INTERFACE patches neither from the boundary file (even if their face number is zero (nfaces 0)) nor from the field files (p, U, etc.).

...and I could run my case with a non-conformal mesh.

Hope it helps.
Regards,
Luca

marluc is offline   Reply With Quote

Old   June 27, 2014, 07:50
Default
  #4
Senior Member
 
Eloïse
Join Date: Jul 2012
Location: Trondheim, Norway
Posts: 113
Rep Power: 13
Eloise is on a distinguished road
Quote:
Originally Posted by marluc View Post

I didn't remove the INTERFACE patches neither from the boundary file (even if their face number is zero (nfaces 0)) nor from the field files (p, U, etc.).
Hi Luca,

If you want to remove the patches with 0 faces, you can run the command "createPatch" with this createPatchDict in your system/ directory:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  dev                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
//       with transformations (i.e. cyclics).
pointSync false;

// Patches to create.
patches
(
);

// ************************************************************************* //
You will actually note create any patch, but this command automatically removes empty patches from the boundary file at the end of its execution. And you can then remove those patches from your field files.

As you noticed, it is not absolutely needed for the simulation to run, but it makes it cleaner

I hope that helps!
Regards,
Eloïse
marluc likes this.
Eloise is offline   Reply With Quote

Old   June 27, 2014, 15:43
Default
  #5
Member
 
Luca
Join Date: Mar 2011
Location: Italy
Posts: 62
Rep Power: 15
marluc is on a distinguished road
Dear Eloïse,

nice tip...I didn't know it but it works perfectly!
Thanks a lot!

Regards,
Luca
marluc is offline   Reply With Quote

Old   August 8, 2015, 17:29
Default
  #6
Member
 
J.-H. Wang
Join Date: Oct 2010
Posts: 72
Rep Power: 15
f0208secretx is on a distinguished road
Hi,

Thanks. I followed the instruction and the interface is stitched as advertised.

I am curious though: this process creates several more severly nonorthogonal faces (>70 degrees). Because I am running DES, I am worried that this would have adverse effects on the accuracy.

Have you tried to compare this approach (which obviously works topologically), and the AMI approach by directly assigning BC to interfaces? Which one is more appropriate in terms of accuracy?
f0208secretx is offline   Reply With Quote

Reply

Tags
interfaces, stitchmesh


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
[mesh manipulation] Problem with mesh quality after using mergeMesh and stitchMesh julianschl OpenFOAM Meshing & Mesh Conversion 7 May 23, 2015 12:42
stitchMesh problem dogan OpenFOAM Pre-Processing 18 October 11, 2014 13:40
[mesh manipulation] stitchMesh problems along patch edges ribe OpenFOAM Meshing & Mesh Conversion 2 March 5, 2013 15:25
[mesh manipulation] startFace problem using stitchMesh Attesz OpenFOAM Meshing & Mesh Conversion 2 April 12, 2012 08:15
[mesh manipulation] stitchMesh and mergeMeshes removal of interfaces flowris OpenFOAM Meshing & Mesh Conversion 6 July 16, 2010 12:06


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