CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] stl file problem (https://www.cfd-online.com/Forums/openfoam-meshing/124799-stl-file-problem.html)

Alfalfa October 13, 2013 13:11

stl file problem
 
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 October 13, 2013 16:30

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?


All times are GMT -4. The time now is 19:13.