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

[snappyHexMesh] snappyHexMesh destroys Continuity

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes
  • 1 Post By Alczem
  • 2 Post By Yann
  • 1 Post By Yann
  • 2 Post By Alczem
  • 2 Post By Alczem
  • 1 Post By dachs

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 30, 2024, 11:48
Default snappyHexMesh destroys Continuity
  #1
New Member
 
Join Date: Jul 2024
Posts: 16
Rep Power: 2
dachs is on a distinguished road
Hello everyone,

I'm relatively new to CFD, so please excuse my rudimentary understanding. I have the following problem: I have a running two-phase simulation (interFoam, k-epsilon turbulence modelling). Now I want to extend my simulation and use SnappyHexMesh to refine my mesh depending on the location and partially cut cylinders from the mesh. I have defined boundary conditions for the newly created surfaces. Now I run my simulation as follows:
blockMesh
surface features
snappyHexMesh -overwrite
setFields
interFoam

Here I get the error message:


--> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux : 2.22507e-308
Specified mass inflow : 2.16108e-18
Specified mass outflow : 2.2285e-18
Adjustable mass outflow : 0



Which I do not understand, because I have neither inlets nor outlets (closed system). Do you have any ideas as to why this could be? Do you need code to better understand the problem?

I would be very grateful for any help.

Best regards
dachs
dachs is offline   Reply With Quote

Old   August 1, 2024, 11:18
Default
  #2
Senior Member
 
Join Date: Dec 2021
Posts: 251
Rep Power: 5
Alczem is on a distinguished road
Hey!


Could you post your case or at least your dictionaries used for the mesh generation? I suspect that some of your boundaries are of type patch or are not properly configured but I might be wrong.
Alczem is offline   Reply With Quote

Old   August 2, 2024, 03:57
Default
  #3
New Member
 
Join Date: Jul 2024
Posts: 16
Rep Power: 2
dachs is on a distinguished road
Quote:
Originally Posted by Alczem View Post
Hey!


Could you post your case or at least your dictionaries used for the mesh generation? I suspect that some of your boundaries are of type patch or are not properly configured but I might be wrong.

Hi Alczem,


Sure, and Thank you for your help.


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

convertToMeters 0.001;

vertices
(
    (65 0 -29.0)  //0
    (0 65 -29.0)  //1
    (-65 0 -29.0)  //2
    (0 -65 -29.0)  //3
    (100 0 -29.0)  //4
    (0 100 -29.0)  //5
    (-100 0 -29.0)  //6
    (0 -100 -29.0)  //7

    (65 0 29)  //8
    (0 65 29)  //9
    (-65 0 29)  //10
    (0 -65 29)  //11
    (100 0 29)  //12
    (0  100 29)  //13
    (-100 0 29)  //14
    ( 0 -100 29)  //15
);

blocks
(
    hex (1 0 4 5  9  8 12 13) (100 20 20) simpleGrading (1 1 1)
    hex (2 1 5 6 10  9 13 14) (100 20 20) simpleGrading (1 1 1)
    hex (3 2 6 7 11 10 14 15) (100 20 20) simpleGrading (1 1 1)
    hex (0 3 7 4  8 11 15 12) (100 20 20) simpleGrading (1 1 1)
);

edges
(
    arc 0 1  (45.96194077712559 45.961940777125584 -29.0)
    arc 1 2  (-45.961940777125584 45.96194077712559 -29.0)
    arc 2 3  (-45.9619407771256 -45.961940777125584 -29.0)
    arc 3 0  (45.96194077712558 -45.9619407771256 -29.0)
    
    arc 8 9  (45.96194077712559 45.961940777125584 29)
    arc 9 10  (-45.961940777125584 45.96194077712559 29)
    arc 10 11  (-45.9619407771256 -45.961940777125584 29)
    arc 11 8  (45.96194077712558 -45.9619407771256 29)

    arc 4 5  (67.99538807889842 67.9953880788984 -29.0)
    arc 5 6  (-67.9953880788984 67.99538807889842 -29.0)
    arc 6 7  (-67.99538807889843 -67.9953880788984 -29.0)
    arc 7 4  (67.99538807889839 -67.99538807889843 -29.0)
    
    arc 12 13  (67.99538807889842 67.9953880788984 29)
    arc 13 14  (-67.9953880788984 67.99538807889842 29)
    arc 14 15  (-67.99538807889843 -67.9953880788984 29)
    arc 15 12  (67.99538807889839 -67.99538807889843 29)


);


boundary
(
    innerWall
    {
        type wall;
        faces
        (
            (1 0  8  9)
            (2 1  9 10)
            (3 2 10 11)
            (0 3 11 8)
        );
    }

    outerWall
    {
        type wall;
        faces
        (
            (5 13 12 4)
            (6 14 13 5)
            (7 15 14 6)
            (4 12 15 7)
        );
    }
    
    frontWall
    {
        type wall;
        faces
        (
            (8 9  12  13)
            (9 10  13 14)
            (10 11 14 15)
            (11 8 15 12)
        );
    }
    
    backWall
    {
        type wall;
        faces
        (
            (0 1  4  5)
            (1 2  5  6)
            (2 3  6  7)
            (3 0  7  4)
        );
    }
);

mergePatchPairs
(
);




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

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

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

castellatedMesh true;
snap            true;
addLayers       false;

geometry
{    
        middleGap
    {
        type triSurfaceMesh;
        file "middleGap.stl";
    }   
     innerRing
    {
        type triSurfaceMesh;
        file "innerRing.stl";
    }   
     outerRing
    {
        type triSurfaceMesh;
        file "outerRing.stl";
    }
    roller01
    {
        type triSurfaceMesh;
        file "roller01.stl";
    }
    roller02
    {
        type triSurfaceMesh;
        file "roller02.stl";
    }
    roller03
    {
        type triSurfaceMesh;
        file "roller03.stl";
    }    
     roller04
    {
        type triSurfaceMesh;
        file "roller04.stl";
    }   
     roller05
    {
        type triSurfaceMesh;
        file "roller05.stl";
    }
    roller06
    {
        type triSurfaceMesh;
        file "roller06.stl";
    } 
     roller07
    {
        type triSurfaceMesh;
        file "roller07.stl";
    }      
     roller08
    {
        type triSurfaceMesh;
        file "roller08.stl";
    }
    roller09
    {
        type triSurfaceMesh;
        file "roller09.stl";
    }
    roller10
    {
        type triSurfaceMesh;
        file "roller10.stl";
    }    
     roller11
    {
        type triSurfaceMesh;
        file "roller11.stl";
    }      
    roller12
    {
        type triSurfaceMesh;
        file "roller12.stl";
    }
    roller13
    {
        type triSurfaceMesh;
        file "roller13.stl";
    }
    roller14
    {
        type triSurfaceMesh;
        file "roller14.stl";
    }    
     roller15
    {
        type triSurfaceMesh;
        file "roller15.stl";
    }     
     roller16
    {
        type triSurfaceMesh;
        file "roller16.stl";
    }      
      roller17
    {
        type triSurfaceMesh;
        file "roller17.stl";
    }
    roller18
    {
        type triSurfaceMesh;
        file "roller18.stl";
    }
    roller19
    {
        type triSurfaceMesh;
        file "roller19.stl";
    }    
     roller20
    {
        type triSurfaceMesh;
        file "roller20.stl";
    }  

rotating_inner_fluid
    {    
        type searchableCylinder;
        point1 (0.0 0.0 -0.029);
        point2 (0.0 0.0 0.029);
        radius 0.09616;
    }     

 
       
}


castellatedMeshControls
{

    maxLocalCells 10000000;

    maxGlobalCells 200000000;

    minRefinementCells 0;

    nCellsBetweenLevels 2;

    maxLoadUnbalance 0.10;

    features
    (
        {
            file "innerGap.eMesh";
            level 3;
        }
        {
            file "outerGap.eMesh";
            level 3;
        }
        {
            file "middleGap.eMesh";
            level 3;
        }
        {
            file "innerRing.eMesh";
            level 2;
        }        
        {
            file "outerRing.eMesh";
            level 2;
        }
        {
            file "roller01.eMesh";
            level 3;
        }        
        {
            file "roller02.eMesh";
            level 3;
        }
        {
            file "roller03.eMesh";
            level 3;
        }        
        {
            file "roller04.eMesh";
            level 3;
        }
        {
            file "roller05.eMesh";
            level 3;
        }
        {
            file "roller06.eMesh";
            level 3;
        }
        {
            file "roller07.eMesh";
            level 3;
        }        
        {
            file "roller08.eMesh";
            level 3;
        }
        {
            file "roller09.eMesh";
            level 3;
        }        
        {
            file "roller10.eMesh";
            level 3;
        }
        {
            file "roller11.eMesh";
            level 3;
        }           
        {
            file "roller12.eMesh";
            level 3;
        }
        {
            file "roller13.eMesh";
            level 3;
        }
        {
            file "roller14.eMesh";
            level 3;
        }
        {
            file "roller15.eMesh";
            level 3;
        }        
        {
            file "roller16.eMesh";
            level 3;
        }
        {
            file "roller17.eMesh";
            level 3;
        }        
        {
            file "roller18.eMesh";
            level 3;
        }
        {
            file "roller19.eMesh";
            level 3;
        }   
        {
            file "roller20.eMesh";
            level 3;
        }

    );

    resolveFeatureAngle 30;

    refinementSurfaces
    {    
        rotating_inner_fluid
        {
            level (1 1);
            cellZone rotating_inner_fluid;
            faceZone rotating_inner_fluid;
            cellZoneInside inside;
        }
        
        innerGap
        {
            level (2 2);
        }
        outerGap
        {
            level (2 2);
        }
        middleGap
        {
            level (2 2);
        }
        roller01
        {
            level (2 2);
        }        
        roller02
        {
            level (2 2);
        }
        roller03
        {
            level (2 2);
        }
        roller04
        {
            level (2 2);
        }
        roller05
        {
            level (2 2);
        }        
        roller06
        {
            level (2 2);
        }
        roller07
        {
            level (2 2);
        }           
        roller08
        {
            level (2 2);
        }
        roller09
        {
            level (2 2);
        }
        roller10
        {
            level (2 2);
        }
        roller11
        {
            level (2 2);
        }        
        roller12
        {
            level (2 2);
        }
        roller13
        {
            level (2 2);
        }           
        roller14
        {
            level (2 2);
        }
        roller15
        {
            level (2 2);
        }
        roller16
        {
            level (2 2);
        }
        roller17
        {
            level (2 2);
        }        
        roller18
        {
            level (2 2);
        }
        roller19
        {
            level (2 2);
        }           
        roller20
        {
            level (2 2);
        }        
        
        innerRing
        {
            level (2 2);
        }       
        outerRing
        {
            level (2 2);
        }
            
    }

    refinementRegions
    {    
        rotating_inner_fluid
        {
            mode inside;
            levels ((1E15 1));
        }
        
    }

    locationInMesh (0.012 0.0926 -0.020);  // Inside point

    allowFreeStandingZoneFaces false;
}

// Settings for the snapping.
snapControls
{

    nSmoothPatch 3;

    tolerance 1.0;

    nSolveIter 300;

    nRelaxIter 10;

    nFeatureSnapIter 10;

    implicitFeatureSnap true;

    explicitFeatureSnap false;

    multiRegionFeatureSnap true;
}

// Settings for the layer addition.
addLayersControls
{

    relativeSizes true;

    layers
    {

        
            
    }

    expansionRatio 1.0;

    finalLayerThickness 0.3;

    minThickness 0.01;

    nGrow 0;

    featureAngle 30;

    nRelaxIter 5;

    nSmoothSurfaceNormals 1;

    nSmoothNormals 3;

    nSmoothThickness 10;

    maxFaceThicknessRatio 0.5;

    maxThicknessToMedialRatio 0.3;

    minMedianAxisAngle 90;

    nBufferCellsNoExtrude 0;

    nLayerIter 50;

    nRelaxedIter 20;
}

meshQualityControls
{
    #include "meshQualityDict"

    relaxed
    {
        maxNonOrtho 75;
    }
}

writeFlags
(
);

mergeTolerance 1E-6;


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

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

//- Maximum non-orthogonality allowed. Set to 180 to disable.
maxNonOrtho 65;

//- Max skewness allowed. Set to <0 to disable.
maxBoundarySkewness 20;
maxInternalSkewness 4;

//- Max concaveness allowed. Is angle (in degrees) below which concavity
//  is allowed. 0 is straight face, <0 would be convex face.
//  Set to 180 to disable.
maxConcave 80;

//- Minimum pyramid volume. Is absolute volume of cell pyramid.
//  Set to a sensible fraction of the smallest cell volume expected.
//  Set to very negative number (e.g. -1E30) to disable.
minVol 1e-13;

//- Minimum quality of the tet formed by the face-centre
//  and variable base point minimum decomposition triangles and
//  the cell centre. Set to very negative number (e.g. -1E30) to
//  disable.
//     <0 = inside out tet,
//      0 = flat tet
//      1 = regular tet
minTetQuality 1e-15;

//- Minimum face area. Set to <0 to disable.
minArea -1;

//- Minimum face twist. Set to <-1 to disable. dot product of face normal
// and face centre triangles normal
minTwist 0.02;

//- Minimum normalised cell determinant. This is the determinant of all
//  the areas of internal faces. It is a measure of how much of the
//  outside area of the cell is to other cells. The idea is that if all
//  outside faces of the cell are 'floating' (zeroGradient) the
//  'fixedness' of the cell is determined by the area of the internal faces.
//  1 = hex, <= 0 = folded or flattened illegal cell
minDeterminant 0.001;

//- Relative position of face in relation to cell centres (0.5 for orthogonal
//  mesh) (0 -> 0.5)
minFaceWeight 0.05;

//- Volume ratio of neighbouring cells (0 -> 1)
minVolRatio 0.01;

//- Per triangle normal compared to average normal. Like face twist
//  but now per (face-centre decomposition) triangle. Must be >0 for Fluent
//  compatibility
minTriangleTwist -1;

nSmoothScale   4;

errorReduction 0.75;

//- If >0 : preserve cells with all points on the surface if the
//  resulting volume after snapping (by approximation) is larger than
//  minVolCollapseRatio times old volume (i.e. not collapsed to flat cell).
//  If <0 : delete always.
//minVolCollapseRatio 0.1;


// ************************************************************************* //
dachs is offline   Reply With Quote

Old   August 2, 2024, 05:48
Default
  #4
Senior Member
 
Join Date: Dec 2021
Posts: 251
Rep Power: 5
Alczem is on a distinguished road
Hey!


I can't see any obvious issue. Can you also share the resulting boundary file in polyMesh and your boundary conditions ? Is this a multiregion case or you simply needed a moving cellzone?
Alczem is offline   Reply With Quote

Old   August 2, 2024, 06:06
Default
  #5
Senior Member
 
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13
AtoHM is on a distinguished road
How about: FOAM FATAL ERROR: Continuity error cannot be removed by adjusting the outflow.
AtoHM is offline   Reply With Quote

Old   August 2, 2024, 06:08
Default
  #6
New Member
 
Join Date: Jul 2024
Posts: 16
Rep Power: 2
dachs is on a distinguished road
Quote:
Originally Posted by Alczem View Post
Hey!


I can't see any obvious issue. Can you also share the resulting boundary file in polyMesh and your boundary conditions ? Is this a multiregion case or you simply needed a moving cellzone?

Sure here you go:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  11
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

29
(
    innerWall
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          0;
        startFace       4700032;
    }
    outerWall
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          0;
        startFace       4700032;
    }
    frontWall
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          35292;
        startFace       4700032;
    }
    backWall
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          35292;
        startFace       4735324;
    }
    middleGap
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          8480;
        startFace       4770616;
    }
    innerRing
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          117462;
        startFace       4779096;
    }
    outerRing
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          143168;
        startFace       4896558;
    }
    roller01
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          25204;
        startFace       5039726;
    }
    roller02
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          25881;
        startFace       5064930;
    }
    roller03
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          26005;
        startFace       5090811;
    }
    roller04
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          26282;
        startFace       5116816;
    }
    roller05
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          25903;
        startFace       5143098;
    }
    roller06
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          22352;
        startFace       5169001;
    }
    roller07
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          19668;
        startFace       5191353;
    }
    roller08
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          20870;
        startFace       5211021;
    }
    roller09
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          20868;
        startFace       5231891;
    }
    roller10
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          19666;
        startFace       5252759;
    }
    roller11
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          19180;
        startFace       5272425;
    }
    roller12
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          19668;
        startFace       5291605;
    }
    roller13
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          20870;
        startFace       5311273;
    }
    roller14
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          20868;
        startFace       5332143;
    }
    roller15
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          19665;
        startFace       5353011;
    }
    roller16
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          19180;
        startFace       5372676;
    }
    roller17
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          22878;
        startFace       5391856;
    }
    roller18
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          26273;
        startFace       5414734;
    }
    roller19
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          26268;
        startFace       5441007;
    }
    roller20
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          25920;
        startFace       5467275;
    }
    inner_fluid
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          0;
        startFace       5493195;
    }
    inner_fluid_slave
    {
        type            wall;
        inGroups        List<word> 1(wall);
        nFaces          0;
        startFace       5493195;
    }
)

// ************************************************************************* //
Wait is moving cell zone active?

Last edited by dachs; August 2, 2024 at 06:14. Reason: mistake
dachs is offline   Reply With Quote

Old   August 2, 2024, 06:11
Default
  #7
New Member
 
Join Date: Jul 2024
Posts: 16
Rep Power: 2
dachs is on a distinguished road

Thank you for your reply, but my problem is that I have neither an inlet nor an outlet. I have a closed system so I cannot adjust the outlet BC.
dachs is offline   Reply With Quote

Old   August 2, 2024, 06:32
Default
  #8
Senior Member
 
Join Date: Dec 2021
Posts: 251
Rep Power: 5
Alczem is on a distinguished road
Hey,


Can you also share your boundary conditions in the 0 folder? Maybe share the whole case at this point


I noticed you have some patches with 0 faces in it, is that expected?
dachs likes this.
Alczem is offline   Reply With Quote

Old   August 2, 2024, 10:58
Default
  #9
New Member
 
Join Date: Jul 2024
Posts: 16
Rep Power: 2
dachs is on a distinguished road
Quote:
Originally Posted by Alczem View Post
Hey,


Can you also share your boundary conditions in the 0 folder? Maybe share the whole case at this point


I noticed you have some patches with 0 faces in it, is that expected?

Hi I had some problems sharing the whole file here but you can download it here. Thanks for your continued help.


https://gigamove.rwth-aachen.de/de/d...de8a434d290554


The patches with 0 faces are not intentional. I'll have to have a look at where exactly they are created. They are probably leftovers from old code
dachs is offline   Reply With Quote

Old   August 3, 2024, 07:03
Default
  #10
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hello,

I am not sure this is the source of your error, but you should not use zeroGradient BCs on walls for p_rgh. Use fixedFluxPressure instead.

I know using zeroGradient on pressure for solvers using gravity leads to flux calculation issues (for instance getting mass fluxes through walls). This could explain why you get continuity issues on a close system.

Also, I don't think you need a p file with interFoam, and if you do, I think the BCs should be set to calculated. Probably worth trying.

Yann
AtoHM and dachs like this.
Yann is offline   Reply With Quote

Old   August 5, 2024, 06:00
Default
  #11
New Member
 
Join Date: Jul 2024
Posts: 16
Rep Power: 2
dachs is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hello,

I am not sure this is the source of your error, but you should not use zeroGradient BCs on walls for p_rgh. Use fixedFluxPressure instead.

I know using zeroGradient on pressure for solvers using gravity leads to flux calculation issues (for instance getting mass fluxes through walls). This could explain why you get continuity issues on a close system.

Also, I don't think you need a p file with interFoam, and if you do, I think the BCs should be set to calculated. Probably worth trying.

Yann

Thank you for your input. Unfortunately, I still get the same error message. I personally have the feeling that it is due to snappyHExMeshDict. When I run blockMesh, setFields, InterFoam, the simulation runs normally ....
dachs is offline   Reply With Quote

Old   August 5, 2024, 07:04
Default
  #12
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Have you checked your mesh after running snappy? Do you get the expected mesh?
dachs likes this.
Yann is offline   Reply With Quote

Old   August 5, 2024, 07:37
Default
  #13
New Member
 
Join Date: Jul 2024
Posts: 16
Rep Power: 2
dachs is on a distinguished road
Quote:
Originally Posted by Yann View Post
Have you checked your mesh after running snappy? Do you get the expected mesh?

Yes, I have. I use the identical mesh for a single-phase simulation with simpleFOAM. I have no problems here.


I did a checkMesh and got:
Code:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0s

Mesh stats
    points:           5523675
    faces:            14363403
    internal faces:   12953887
    cells:            4426076
    faces per cell:   6.1719
    boundary patches: 27
    point zones:      0
    face zones:       1
    cell zones:       1

Overall number of cells of each type:
    hexahedra:     3911809
    prisms:        199787
    wedges:        0
    pyramids:      0
    tet wedges:    112
    tetrahedra:    0
    polyhedra:     314368
    Breakdown of polyhedra by number of faces:
        faces   number of cells
            4   118
            5   4978
            6   54696
            7   3660
            8   306
            9   187449
           10   1926
           11   16
           12   53399
           15   7526
           18   294

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
               frontWall    72076    75648  ok (non-closed singly connected)
                backWall    72070    75642  ok (non-closed singly connected)
                innerGap    14932    21035  ok (non-closed singly connected)
                outerGap    19729    26701  ok (non-closed singly connected)
               middleGap    18292    24294  ok (non-closed singly connected)
               innerRing   236526   243193  ok (non-closed singly connected)
               outerRing   246872   254032  ok (non-closed singly connected)
                roller01    36984    38472  ok (non-closed singly connected)
                roller02    38169    39651  ok (non-closed singly connected)
                roller03    39356    40986  ok (non-closed singly connected)
                roller04    39254    40770  ok (non-closed singly connected)
                roller05    38255    39748  ok (non-closed singly connected)
                roller06    35776    36804  ok (non-closed singly connected)
                roller07    34743    35316  ok (non-closed singly connected)
                roller08    35397    35989  ok (non-closed singly connected)
                roller09    35407    35993  ok (non-closed singly connected)
                roller10    34734    35307  ok (non-closed singly connected)
                roller11    33749    34317  ok (non-closed singly connected)
                roller12    34744    35317  ok (non-closed singly connected)
                roller13    35397    35988  ok (non-closed singly connected)
                roller14    35401    35988  ok (non-closed singly connected)
                roller15    34737    35309  ok (non-closed singly connected)
                roller16    33750    34318  ok (non-closed singly connected)
                roller17    36560    37593  ok (non-closed singly connected)
                roller18    39119    40627  ok (non-closed singly connected)
                roller19    39224    40734  ok (non-closed singly connected)
                roller20    38263    39761  ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (-0.0961497 -0.0961497 -0.029) (0.0961508 0.0961508 0.029)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (1.95169e-16 -8.66665e-16 4.15461e-16) OK.
    Max cell openness = 4.27151e-16 OK.
    Max aspect ratio = 13.1184 OK.
    Minimum face area = 1.17208e-09. Maximum face area = 6.57393e-07.  Face area magnitudes OK.
    Min volume = 2.52737e-13. Max volume = 3.18051e-10.  Total volume = 0.000360804.  Cell volumes OK.
    Mesh non-orthogonality Max: 64.9997 average: 10.2477
    Non-orthogonality check OK.
    Face pyramids OK.
 ***Max skewness = 13.8247, 29 highly skew faces detected which may impair the quality of the results
  <<Writing 29 skew faces to set skewFaces
    Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End
Could this be the problem?

Last edited by dachs; August 5, 2024 at 10:19. Reason: Adding Information
dachs is offline   Reply With Quote

Old   August 6, 2024, 03:59
Default
  #14
New Member
 
Join Date: Jul 2024
Posts: 16
Rep Power: 2
dachs is on a distinguished road
OK, I have customised my mesh so that the mesh check runs without errors. I still get the same error message for InterFoam
dachs is offline   Reply With Quote

Old   August 6, 2024, 07:04
Default
  #15
Senior Member
 
Join Date: Dec 2021
Posts: 251
Rep Power: 5
Alczem is on a distinguished road
Hey!


After trying to run your case, I think the main issue is the geometry itself: there are tangent boundaries that create disconnected and weird-looking regions. I am pretty sure OpenFoam is not happy about this.


I would try to make the geometry more "simple" to mesh, and to make sure the rollers are not touching each other especially with the rotating velocity condition they have. Regarding the contact between the rollers and the surrounding walls, you could widen a bit the enclosure and put rectangular blocks serving as contact points to avoir sharp corners.


EDIT: or you can also decrease the rollers' radius I guess
Attached Images
File Type: png disconnected_geometry.png (163.1 KB, 16 views)
Yann and dachs like this.
Alczem is offline   Reply With Quote

Old   August 6, 2024, 08:49
Default
  #16
New Member
 
Join Date: Jul 2024
Posts: 16
Rep Power: 2
dachs is on a distinguished road
Quote:
Originally Posted by Alczem View Post
Hey!


After trying to run your case, I think the main issue is the geometry itself: there are tangent boundaries that create disconnected and weird-looking regions. I am pretty sure OpenFoam is not happy about this.


I would try to make the geometry more "simple" to mesh, and to make sure the rollers are not touching each other especially with the rotating velocity condition they have. Regarding the contact between the rollers and the surrounding walls, you could widen a bit the enclosure and put rectangular blocks serving as contact points to avoir sharp corners.


EDIT: or you can also decrease the rollers' radius I guess

Hi, thanks again for your input. I took a closer look at the mesh today and came across this problem as well. To be honest, I don't know where these separate areas come from, as they didn't appear in older simulations. The rollers don't touch each other either, but are separated by unmoving plates (gaps). I'm really sorry that I uploaded a faulty mesh that you have now invested time in. I have restored the mesh to the "correct" old state, but I still get the same error message when running InterFoam. With checkMesh I get: Mesh ok but with checkMesh -allGeometry -allTopology I get three errors. I have cells with small quality or negative volume, cells with small determinant and many concave cells. I think the problem of continuity can occur mainly due to the cells with negative volume. I am now trying to improve the mesh and then run the simulation again. I would like to thank you and Yann again for all the input
dachs is offline   Reply With Quote

Old   August 6, 2024, 09:04
Default
  #17
Senior Member
 
Join Date: Dec 2021
Posts: 251
Rep Power: 5
Alczem is on a distinguished road
No worries Maybe start over from a simpler case, for instance with only one roller "floating' in a cubic domain to validate your setup and make sure the mesh is ok. It can be helpful to pinpoint the issue. Good luck!
Yann and dachs like this.
Alczem is offline   Reply With Quote

Old   August 15, 2024, 08:52
Default
  #18
New Member
 
Join Date: Jul 2024
Posts: 16
Rep Power: 2
dachs is on a distinguished road
After rebuilding the model and a lot of trial and error, I have finally fixed the problem. A little message for posterity: The biggest problem wasn't the poor mesh quality, but really the boundary conditions in 0/U. I previously used simpleFoam and here I chose the edge condition for the moving walls:


Code:

outerRing
    {
        type            rotatingWallVelocity;
        origin          (0 0 0);
        axis             (0 0 1);
    omega         constant -13.325; 
    
    }

but for interFoam this does not work. Here, the speed must be defined as follows:


Code:

outerRing



{ 
type            movingWallVelocity; 
value           uniform (0 0 0); 
velocity        (0 0 0); 
omega           (0 0 omegaZ)
origin          (0 0 0); 
 axis            (0 0 1); 
}
Alczem likes this.

Last edited by dachs; August 15, 2024 at 11:25. Reason: Tipo
dachs is offline   Reply With Quote

Reply

Tags
continuity error, interfoam solver, snappy hex mesh


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
pimpleDyMFoam computation randomly stops babapeti OpenFOAM Running, Solving & CFD 5 January 24, 2018 06:28
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 16:33
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 05:03
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 03:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07


All times are GMT -4. The time now is 08:26.