CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Native Meshers: snappyHexMesh and Others

stl file problem

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 13, 2013, 13:11
Question stl file problem
  #1
New Member
 
Gabriel Boucher
Join Date: Jul 2013
Posts: 23
Rep Power: 4
Alfalfa is on a distinguished road
Hello, I'm new to snappy and want to give it a try. I ran the motorbike tutorial and everything went well. I then wanted to try with another geometry (a sphere) and compare it with my results from Star-CCM+. Here come the problems... I built a sphere in Salome and saved it in *.stl then I modified the surfaceFeatureExtractDict to extract the features (I changed the name of the file for sphere.stl). but when I run it, I get this error:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  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
Exec   : surfaceFeatureExtract
Date   : Oct 13 2013
Time   : 12:58:35
Host   : "gabriel-All-Series"
PID    : 8342
Case   : /home/gabriel/OpenFOAM/OpenFOAM-2.2.0/gabriel-2.2.0/run/airFoil2D
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

Reading surfaceFeatureExtractDict

Surface            : "sphere.stl"


Feature line extraction is only valid on closed manifold surfaces.
Statistics:
Triangles    : 1200
Vertices     : 609
Bounding Box : (-0.997147 -0.997146 -1) (0.997146 0.997146 1)


Constructing feature set from included angle 150

Initial feature set:
    feature points : 1
    feature edges  : 49
    of which
        region edges   : 49
        external edges : 0
        internal edges : 0

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::tmp<Foam::Field<Foam::Vector<double> > > Foam::operator/<Foam::Vector<double> >(Foam::UList<Foam::Vector<double> > const&, Foam::tmp<Foam::Field<double> > const&) at ??:?
#4  void Foam::extendedFeatureEdgeMesh::sortPointsAndEdges<Foam::triSurface>(Foam::triSurface const&, Foam::List<int> const&, Foam::List<int> const&, Foam::List<int> const&) at ??:?
#5  Foam::extendedFeatureEdgeMesh::extendedFeatureEdgeMesh(Foam::surfaceFeatures const&, Foam::objectRegistry const&, Foam::fileName const&) at ??:?
#6  
 at ??:?
#7  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8  
 at ??:?
Floating point exception (core dumped)
I tried to use another program (blender) to generate the stl file but I still get the same error. I tried with a cone instead of a sphere, still nothing and now I don't know what to do. I also tried binary and ascii for the stl but it doesn't change anythig.

Here's my surfaceFeatureExtractDict:

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      surfaceFeatureExtractDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

sphere.stl
{
    // How to obtain raw features (extractFromFile || extractFromSurface)
    extractionMethod    extractFromSurface;

    extractFromSurfaceCoeffs
    {
        // Mark edges whose adjacent surface normals are at an angle less
        // than includedAngle as features
        // - 0  : selects no edges
        // - 180: selects all edges
        includedAngle   150;
    }

    // Write options

        // Write features to obj format for postprocessing
        writeObj                yes;
}


// ************************************************************************* //
Any help would be appreciated

Gabriel
Alfalfa is offline   Reply With Quote

Old   October 13, 2013, 16:30
Default
  #2
New Member
 
Gabriel Boucher
Join Date: Jul 2013
Posts: 23
Rep Power: 4
Alfalfa is on a distinguished road
Ok, I found a way to make it work... but I'm not sure why it doesn't work the intended way. What i did is I used blender to create a ''mesh'' sphere instead of a surface one and saved it in *.obj. After that, it worked. I still have a question though. When I run snappy, I get a warning saying:

Number of cells in mesh:10240 does not equal size of cellLevel:455769

I can get rid of this by deleting cellLevel and pointLevel files from the polymesh directory but it's a weird error and I don't get it.

Does anyone knows what could be the problem here?
Alfalfa 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
build problem swak4Foam OF 2.2.0 mcathela OpenFOAM Installation 14 April 23, 2013 13:59
error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Native Meshers: blockMesh 2 March 14, 2012 10:56
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 12:46
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24


All times are GMT -4. The time now is 01:00.