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

[snappyHexMesh] SHM RAM and -parallel proplem

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

Like Tree1Likes
  • 1 Post By student666

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 16, 2014, 12:50
Default SHM RAM and -parallel proplem
  #1
New Member
 
Join Date: Mar 2014
Posts: 9
Rep Power: 12
Heremus is on a distinguished road
Hi,
I'm relative new to openFOAM but I managed to get a working snappyHexMeshDict and now I'm trying to get a better resolution at my geometry. So that the round parts are more segmented in the final net. (It's a round air-foil, shaped like a ring). With the previous refinement levels it wasn't enough refined. So now I have 2 problems.

First of all I have an RAM/Swap Issue. I put the refinement level to 8 which actually worked. Then I put it up to 9 and the increased need of memory crashed the PC's. (5, 8 and 16 GB RAM + 4 GB Swap). I played with various parameters but hadn't any success to get very clean shape of my geometry.

Any suggestions how I can trim my snappyHexMeshDict file?

Code:
FoamFile
{
        version 2.0;
        format ascii;
        root "";
        case "";
        instance "";
        local "";
        class dictionary;
        object autoHexMeshDict;
}

// Which of the steps to run
castellatedMesh true;
snap            true;
addLayers       true;

geometry
{
    hull.stl
    {
        type triSurfaceMesh;
        name DIFUSOR;

        regions
        {
            OBJECT
            {
                name difusorHull;
            }
        }    
    
    }
    
    refinementBox
    {
        type searchableBox;
        min (-0.50 -1.25 0);
        max (2 1.25 2.8);
    }
};

// Settings for the castellatedMesh generation.
castellatedMeshControls
{

    maxLocalCells 10000000;                //Max cells pro CPU
    maxGlobalCells 10000000;            //Max overall cells
    minRefinementCells 50;                //Loopbreaker if the to refine cells are less than this Number
    nCellsBetweenLevels 1;                //Defines the refinement of one level

    features
    ({file "hull.eMesh"; level 0;});

    refinementSurfaces
    {
        DIFUSOR
        {
            level (6 9);
        }
    }

    resolveFeatureAngle 30;            //Refinement if some FeatureAngle is higher than this

    refinementRegions
    {
        refinementBox
        {
            mode inside;
            levels ((0.1 3));
        }    

        DIFUSOR
            {
            mode distance;
            levels ((0.02 9) (0.6 8) (0.2 7));
            }
    }

    locationInMesh (8 8 0.5);            //Snappy meshing inside or outside a model

    allowFreeStandingZoneFaces false;
}

// Settings for the snapping.
snapControls
{
    nSmoothPatch    8;         // presmoothing iterations before correspondence is set
    tolerance       1.0;        // relative distance the program searches for snappoints
    nSolveIter      80;        // how often do snapiterations bigger-->better-->longer
    nRelaxIter      5;        // remove bad meshpoints. Should end before reaching value
    implicitFeatureSnap false;     // using surfaceFeatureExtract Method(generates eMesh)
} 

// Settings for the layer addition.
addLayersControls
{

    layers
    {
        difusorHull
        {
            nSurfaceLayers 6;
        }
    }

    relativeSizes true;
    expansionRatio 1.15;
    finalLayerThickness 0.2;
    minThickness 0.1;
    nGrow 1;

// Advanced Setting
    featureAngle 30;
    nRelaxIter 5;
    nSmoothSurfaceNormals 1;
    nSmoothNormals 3;
    nSmoothThickness 10;
    maxFaceThicknessRatio 0.5;
    maxThicknessToMedialRatio 0.3;
    minMedianAxisAngle 80;
    nBufferCellsNoExtrude 0;
    nLayerIter 50;
    nRelaxedIter 20;
}

meshQualityControls
{
    maxNonOrtho 65;
    maxBoundarySkewness 20;
    maxInternalSkewness 4;
    maxConcave 80;

    minVol 1e-13;
    minTetQuality 1e-9;
    minFlatness 0.5;
    minArea -1;
    minTwist 0.05;
    minDeterminant 0.001;
    minFaceWeight 0.05;
    minVolRatio 0.01;
    minTriangleTwist -1;
    
    nSmoothScale 4;
    errorReduction 0.75;

    relaxed
    {
    }
}

// Advanced
// Flags for optional output
debug 0;

mergeTolerance 1e-6;
Secondly I have a the option to use a preconfigured cluster. This would help me also with my memory-issue because I can split it up between different PC's. But I think I make some mistakes. When I use the command:
Code:
mpirun --hostfile system/machines -np 4 snappyHexMesh -parallel > meshLog
it produces this error:
Code:
[NameOfServer:22784] Error: unknown option "--daemonize"
I tried to run it with --no-daemonize option but that had no effect.
I also checked if I can access to every server without verification and that worked. May I initialise OpenFOAM incorrectly or I use the mpirun wrong?
Attached Files
File Type: txt snappyHexMeshDict.txt (3.9 KB, 3 views)
File Type: txt Error.txt (2.7 KB, 7 views)

Last edited by Heremus; May 21, 2014 at 09:50.
Heremus is offline   Reply With Quote

Old   June 11, 2014, 08:52
Default ram
  #2
New Member
 
Calum Douglas
Join Date: Apr 2013
Location: Coventry, UK
Posts: 26
Rep Power: 13
snowygrouch is on a distinguished road
well firstly if you want very high refinement, but dont have enough RAM - you cant do it. You`ll have to just use lower refinement levels.

However you have set you max cell count as identical for both
CPU and entire case. Which isnt very good as the CPU
will run out of cells and stop refinement before anything else happens.

As a rough guide you should divide total system ram by # cores and use that as a ratio.

Ie. if you have 16gb RAM with 8 cores, you have 2gb per core.
Hence your max cell count total should be 8x higher than the max cell count per cpu.

Right now you have 10 million cells as max for BOTH each core AND the total solution.

maxLocalCells 10000000;
maxGlobalCells 10000000;

I have no idea how much total ram you have but, I would change it for example to something like this (if you have 4 cores for example)


maxLocalCells 4000000;
maxGlobalCells 16000000;
__________________
Calum Douglas
Director
Scorpion Dynamics Ltd
Email: calum.douglas@scorpion-dynamics.com
Web: www.scorpion-dynamics.com
snowygrouch is offline   Reply With Quote

Old   June 26, 2014, 12:10
Default
  #3
New Member
 
Join Date: Mar 2014
Posts: 9
Rep Power: 12
Heremus is on a distinguished road
Cool thank you for your help!

I tried your settings but unfortunately it requires so much more space than before that it nearly crashed instantly. And I have 4 cores and 16 Gb of RAM

I will try if there is an 0 to much in the maxLocalCells but then it's 40x.
Heremus is offline   Reply With Quote

Old   June 26, 2014, 14:10
Default refinement
  #4
New Member
 
Calum Douglas
Join Date: Apr 2013
Location: Coventry, UK
Posts: 26
Rep Power: 13
snowygrouch is on a distinguished road
Your refinement levels are incredibly high.

levels ((0.02 9) (0.6 8) (0.2 7))

If you`ve only got 16gb ram, and the model is large - you
will have to lower those or you`ll never mesh it.

If you want to do more, you`ll have to buy more ram. I`ve got 32GB
and wish I had twice that....

you`ll just have to try something like

levels ((0.02 4) (0.6 3) (0.2 2))

and work upwards until you reach the limit of your machine.
__________________
Calum Douglas
Director
Scorpion Dynamics Ltd
Email: calum.douglas@scorpion-dynamics.com
Web: www.scorpion-dynamics.com
snowygrouch is offline   Reply With Quote

Old   July 7, 2014, 08:05
Default
  #5
Senior Member
 
M. C.
Join Date: May 2013
Location: Italy
Posts: 286
Blog Entries: 6
Rep Power: 17
student666 is on a distinguished road
Hi all,

is there a reference table, or a "not-written" rule, that can help to estimate how many cells should be allocated for each core and for total amount of RAM?
enginpower likes this.
student666 is offline   Reply With Quote

Reply

Tags
mpirun, openfoam, parallel computation, snappyhexmesh

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
Huge increase of RAM makes parallel mpirun fails choch OpenFOAM 2 November 12, 2018 11:42
[snappyHexMesh] Snappyhexmesh parallel using all RAM snowygrouch OpenFOAM Meshing & Mesh Conversion 2 May 29, 2014 17:57
ECC vs. non ECC ram: My opinion ghost82 Hardware 19 February 13, 2014 10:32
New workstation for different usage scenarios - CPU and RAM natem Hardware 6 August 7, 2013 03:47
Messhing in Parallel: CPU <5% Ram > 90% Allrun Sleeping stark22 OpenFOAM Running, Solving & CFD 0 December 2, 2012 11:28


All times are GMT -4. The time now is 22:20.