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

[snappyHexMesh] Meshing a Duct

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 11, 2013, 19:09
Default Meshing a Duct
  #1
New Member
 
Dennis
Join Date: Mar 2013
Posts: 4
Rep Power: 13
dehein2 is on a distinguished road
Hello,

this is one of my first trys to mesh sth. Im trying to mesh a duct with snappyHexMesh. The duct was created in SolidWorks and exported as stl (bin). The Files center should be at [0 0 0] and the duct is approx. 40cm longs and 70cm in diameter. (at least that's what i created in SolidWorks)



First ting i did was creating a basic mesh. I used this blockMeshDict file to create a basic mesh:

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

convertToMeters 1.0;

vertices
(
    (-0.5 -0.5 -0.5)
    (0.5 -0.5 -0.5)
    (0.5 0.5 -0.5)
    (-0.5 0.5 -0.5)
    (-0.5 -0.5 0.5)
    (0.5 -0.5 0.5)
    (0.5 0.5 0.5)
    (-0.5 0.5 0.5)
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (10 10 10) simpleGrading (1 1 1)
);

edges
(
);


boundary
(
 
);

mergePatchPairs
(
);

// ************************************************************************* //
I can view the the mseh with paraForam and i looks fine. I then created my first snappyHexMesh file, but im not really sure what it does

Code:
castellatedMesh true;
snap            true;
addLayers       false;



geometry
{
    duct.stl
    {
        type triSurfaceMesh;
        name duct;
    }


};

castellatedMeshControls
{
    maxLocalCells 1000000;
    maxGlobalCells 2000000;
    minRefinementCells 0;
    nCellsBetweenLevels 2;

    features
    (
    );


}
 
snapControls
{
    nSmoothPatch 6;
    tolerance 10;
    nSolveIter 60;
    nRelaxIter 10;
}
And no matter what t do, i always get the following error message:

Code:
--> FOAM FATAL IO ERROR: 
keyword meshQualityControls is undefined in dictionary "/home/dehein/tmp/hexmsehtrial/system/snappyHexMeshDict"

file: /home/dehein/tmp/hexmsehtrial/system/snappyHexMeshDict from line 19 to line 60.

    From function dictionary::subDict(const word& keyword)
    in file db/dictionary/dictionary.C at line 626.

FOAM exiting
I would appreciate any kind of help

Thanks a lot
dehein2 is offline   Reply With Quote

Old   March 11, 2013, 19:44
Default
  #2
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
The error message

Code:
keyword meshQualityControls is undefined in dictionary "/home/dehein/tmp/hexmsehtrial/system/snappyHexMeshDict"
says that you are missing the "meshQualityControls" section in your snappyHexMeshDict file. Here is an example

Code:
    meshQualityControls
    {
        maxNonOrtho 65;
        maxBoundarySkewness 20;
        maxInternalSkewness 4;
        maxConcave 80;
        minFlatness 0.5;
        minVol 1.00E-13;
        minTetQuality -1e30;
        minArea -1;
        minTwist 0.05;
        minDeterminant 0.001;
        minFaceWeight 0.05;
        minVolRatio 0.01;
        minTriangleTwist -1;
        nSmoothScale 4;
        errorReduction 0.75;
    }
If you are just starting with OpenFOAM, i suggest using a pre-processor like HELYX-OS to write these *Dict files for you to avoid some of these errors. You can also use Dict files from other cases, use PyFoam to clone cases, or use other pre-processors. Good luck.

Disclaimer: I work for the company that makes HELYX-OS.

Last edited by chegdan; March 11, 2013 at 21:13.
chegdan is offline   Reply With Quote

Old   March 12, 2013, 04:30
Default
  #3
New Member
 
Dennis
Join Date: Mar 2013
Posts: 4
Rep Power: 13
dehein2 is on a distinguished road
edit: Sorry, ASCII works, but i get this error with binary stl's. Maybe thats interesting for you ?!
Is your tool only to create the mesh? Because all the Case Setup Options are greyed out?!

Hi chegdan,

thanks for the reply. I did not see that section in some of the tutorials ;(
But i downloaded and installed your company's tool and looks promising.

I tried to start by importing the stl fist, i crashed. I tried to export the stl as ASCII and binary from SolidWorks. Then i clicked on Import STL and the programm crashes directly.

When creating the case i get this output form the terminal

Code:
dehein@dehein-linuxmint ~/Engys/HelyxOS/v1.0.1 $ ./helyxOS.sh 
java -Xms128m -Xmx1024m -XX:OnError="/home/dehein/Engys/HelyxOS/v1.0.1/bin/collectInfo.run" -jar /home/dehein/Engys/HelyxOS/v1.0.1/lib/HelyxOS.jar HelyxOS 2>&1 | tee /home/dehein/Engys/HelyxOS/v1.0.1/helyxEE.log
WRITE: blockMeshDict -> /home/dehein/tmp/testcase/testcase/system/blockMeshDict
WRITE: snappyHexMeshDict -> /home/dehein/tmp/testcase/testcase/system/snappyHexMeshDict
WRITE: controlDict -> /home/dehein/tmp/testcase/testcase/system/controlDict
WRITE: fvSchemes -> /home/dehein/tmp/testcase/testcase/system/fvSchemes
WRITE: fvSolution -> /home/dehein/tmp/testcase/testcase/system/fvSolution
WRITE: decomposeParDict -> /home/dehein/tmp/testcase/testcase/system/decomposeParDict
Then i click import STL and get this:

Code:
dehein@dehein-linuxmint ~/Engys/HelyxOS/v1.0.1 $ ./helyxOS.sh 
java -Xms128m -Xmx1024m -XX:OnError="/home/dehein/Engys/HelyxOS/v1.0.1/bin/collectInfo.run" -jar /home/dehein/Engys/HelyxOS/v1.0.1/lib/HelyxOS.jar HelyxOS 2>&1 | tee /home/dehein/Engys/HelyxOS/v1.0.1/helyxEE.log
WRITE: blockMeshDict -> /home/dehein/tmp/testcase/testcase/system/blockMeshDict
WRITE: snappyHexMeshDict -> /home/dehein/tmp/testcase/testcase/system/snappyHexMeshDict
WRITE: controlDict -> /home/dehein/tmp/testcase/testcase/system/controlDict
WRITE: fvSchemes -> /home/dehein/tmp/testcase/testcase/system/fvSchemes
WRITE: fvSolution -> /home/dehein/tmp/testcase/testcase/system/fvSolution
WRITE: decomposeParDict -> /home/dehein/tmp/testcase/testcase/system/decomposeParDict
Thank you

Last edited by dehein2; March 12, 2013 at 04:51.
dehein2 is offline   Reply With Quote

Old   March 12, 2013, 10:51
Default
  #4
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
dehein2,

At present, HELYX-OS does not import binary format STL files, so you will have to do with ASCII at the moment. The messages that you are receiving are there to let you know what the GUI is doing, like writing dict files in this case. Its normal behavior at this point. For the case setup portion of the GUI, you will need to finish the meshing portion and save the case. After the case is saved, you will reload the case and the case setup portion will be ready to use.

There are some threads on HELYX-OS, but the most active is

http://www.cfd-online.com/Forums/ope...pyhexmesh.html

if you need some more information. However, most of the issues on that thread have been taken care of in the current release.

If you find a bug, they can be reported at SourceForge under the "tickets" section. It is also a good place to check if you run into anything. Good luck in setting up your case!
chegdan is offline   Reply With Quote

Reply


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
Meshing for rectangular duct SENER Mesh Generation & Pre-Processing 1 December 11, 2015 08:41
Meshing software comparison Wikie Mesh Generation & Pre-Processing 5 September 29, 2014 07:09
meshing a duct in gambit ako ANSYS Meshing & Geometry 7 April 2, 2009 23:07
Best Meshing scheme for Cylinder Nutrex Main CFD Forum 4 July 29, 2008 12:03
Volume Meshing & Face Meshing? singularity of grid ken FLUENT 0 September 4, 2003 12:08


All times are GMT -4. The time now is 03:37.