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

how to call my .stl file in the terminal

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

Like Tree3Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   July 9, 2013, 16:11
Default
  #21
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 581
Rep Power: 20
chegdan will become famous soon enoughchegdan will become famous soon enough
First off, there is a snappyhexMeshDict file in the tar file from the wiki located here in case you wanted to go there and look further into replicating the case that was provided on the wiki. I went ahead and made a new one that works for the STL file you provided.

My snappyHexMeshDict file is
Code:
/*--------------------------------*- C++ -*----------------------------------*\
|       o          |                                                          |
|    o     o       | HelyxOS                                                  |
|   o   O   o      | Version: vnull.null.null                                           |
|    o     o       | Web:     http://www.engys.com                            |
|       o          |                                                          |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version 2.0;
    format ascii;
    class dictionary;
    location system;
    object snappyHexMeshDict;
}

    castellatedMesh true;
    snap true;
    addLayers true;
    geometry
    {
        AskerveinHill.stl
        {
            type triSurfaceMesh;
            name AskerveinHill;
        }

    }

    castellatedMeshControls
    {
        features
        (
        );
        refinementSurfaces
        {
            AskerveinHill
            {
                regions
                {
                    vcg
                    {
                        level (2 3 );
                    }

                }

                level (0 0 );
            }

        }

        refinementRegions
        {
            AskerveinHill
            {
                levels ();
                mode distance;
            }

        }

        locationInMesh (500.0 500.0 250.0 );
        maxLocalCells 1000000;
        maxGlobalCells 2000000;
        minRefinementCells 0;
        nCellsBetweenLevels 1;
        resolveFeatureAngle 30;
        allowFreeStandingZoneFaces false;
    }

    snapControls
    {
        nSolveIter 300;
        nSmoothPatch 3;
        tolerance 1.0;
        nRelaxIter 5;
        nFeatureSnapIter 10;
        implicitFeatureSnap false;
        explicitFeatureSnap true;
        multiRegionFeatureSnap false;
    }

    addLayersControls
    {
        layers
        {
            AskerveinHill_vcg
            {
                nSurfaceLayers 4;
            }

        }

        relativeSizes true;
        expansionRatio 1.0;
        finalLayerThickness 0.3;
        minThickness 0.2;
        nGrow 0;
        featureAngle 60;
        slipFeatureAngle 30;
        nRelaxIter 3;
        nSmoothSurfaceNormals 1;
        nSmoothNormals 3;
        nSmoothThickness 10;
        maxFaceThicknessRatio 0.5;
        maxThicknessToMedialRatio 0.3;
        minMedianAxisAngle 90;
        nBufferCellsNoExtrude 0;
        nLayerIter 50;
        nRelaxedIter 20;
    }

    meshQualityControls
    {
        maxNonOrtho 65;
        maxBoundarySkewness 20;
        maxInternalSkewness 4;
        maxConcave 80;
        minFlatness 0.5;
        minVol 1.00E-13;
        minTetQuality -1e30;
        minArea -1;
        minTwist 0.02;
        minDeterminant 0.001;
        minFaceWeight 0.02;
        minVolRatio 0.01;
        minTriangleTwist -1;
        nSmoothScale 4;
        errorReduction 0.75;
    }

    debug 0;
    mergeTolerance 1E-6;
My blockMeshDict file is

Code:
/*--------------------------------*- C++ -*----------------------------------*\
|       o          |                                                          |
|    o     o       | HelyxOS                                                  |
|   o   O   o      | Version: vnull.null.null                                           |
|    o     o       | Web:     http://www.engys.com                            |
|       o          |                                                          |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version 2.0;
    format ascii;
    class dictionary;
    location system;
    object blockMeshDict;
}

    convertToMeters 1;
    vertices 
    (

        ( 5.0 5.0 -10.0) 
        ( 2640.0 5.0 -10.0) 
        ( 2640.0 2480.0 -10.0) 
        ( 5.0 2480.0 -10.0) 
        ( 5.0 5.0 500.0) 
        ( 2640.0 5.0 500.0) 
        ( 2640.0 2480.0 500.0) 
        ( 5.0 2480.0 500.0) 
    );
    blocks 
    (
    hex (0 1 2 3 4 5 6 7) (106 100 21 ) simpleGrading (1 1 1)
    );
    edges ( );
    patches 
    (
    
 wall ffminx ( (0 4 7 3) )
 wall ffmaxx ( (1 2 6 5) )
 wall ffminy ( (0 1 5 4) )
 wall ffmaxy ( (3 7 6 2) )
 wall ffminz ( (0 3 2 1) )
 wall ffmaxz ( (4 5 6 7) )

    );
    mergePatchPairs ( );
and this can all be meshed by executing

Code:
blockMesh
snappyHexMesh
When the blockMeshDict is placed in the constant/polyMesh folder and the snappyHexMeshDict file is in the system folder of the case. These files should produce a domain that has about 1.3 million cells with a boundary layer of cells over the domain. You may want to look through the snappyHexMeshDict in the tar file form the original Askervein case (above) and add refinement boxes and change the refinement levels to match the original case. I suggest you look at the following presentation to get a good idea about what each of these entries are in my dictionary files and also the overall method involved.
izna likes this.
__________________
Dan

Find me on twitter @dancombest and LinkedIn
chegdan is offline   Reply With Quote

Old   July 9, 2013, 16:17
Default
  #22
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 5
izna is on a distinguished road
thank you.

froom the onlie package i cannot open it.. this is why i used another askervin .stl which i sent to you.

HAving done the modifications, i am able to run the blockmesh and snappyhexmesh.

then i run simpleFoam.. and i obtain error..

Quote:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.2.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.2.0-5be49240882f
Exec : simpleFoam
Date : Jul 10 2013
Time : 13:24:41
Host : "izna-MS-7592"
PID : 3545
Case : /home/izna/Desktop/Askervein
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 6

Reading field p



--> FOAM FATAL IO ERROR:
cannot find file

file: /home/izna/Desktop/Askervein/6/p at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.

FOAM exiting

Last edited by izna; July 10, 2013 at 05:28.
izna is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
swak4foam building problem GGerber OpenFOAM Installation 54 April 24, 2015 16:02
non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Native Meshers: blockMesh 7 April 17, 2013 05:42
pisoFoam compiling error with OF 1.7.1 on MAC OSX Greg Givogue OpenFOAM Programming & Development 3 March 4, 2011 18:18
1.7.x Environment Variables on Linux 10.04 rasma OpenFOAM Installation 9 July 30, 2010 04:43
Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Native Meshers: blockMesh 10 April 2, 2007 14:00


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