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

[CAD formats] 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 Search this Thread Display Modes
Old   July 9, 2013, 16:11
Default
  #21
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
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.
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: 12
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 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
Custom Thermophysical Properties wsmith02 OpenFOAM 4 June 1, 2023 14:30
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 80 May 17, 2022 08:06
[swak4Foam] Installation Problem with OF 6 version Aurel OpenFOAM Community Contributions 14 November 18, 2020 16:18
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 18:13
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 03:23


All times are GMT -4. The time now is 10:23.