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

[snappyHexMesh] snappyHexMesh problem with eMesh file

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

Like Tree2Likes
  • 1 Post By Ingöö
  • 1 Post By student666

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 26, 2014, 18:36
Default snappyHexMesh problem with eMesh file
  #1
New Member
 
Join Date: Jul 2014
Posts: 3
Rep Power: 12
Ingöö is on a distinguished road
Hi,

I'm trying to create a mesh around a NACA 0015 airfoil using foam-extend-3.1 with snappyHexMesh. I have already run the surfaceFeatureExtract command to create an eMesh file for the airfoil. I'm getting the following error message when I run the snappyHexMesh command:

Code:
Reading external feature lines

--> FOAM FATAL IO ERROR:
Expected a '(' while reading VectorSpace<Form, Cmpt, nCmpt>, found on line 19 the word 'externalStart'

file: /Volumes/foam-extend-3.1/tutorials/multiphase/interFoam/ras/NACA0015Test/constant/triSurface/NACA0015.eMesh at line 19.

    From function Istream::readBegin(const char*)
    in file db/IOstreams/IOstreams/Istream.C at line 86.

FOAM exiting
I have uploaded my test case to dropbox.
https://www.dropbox.com/s/45nv9u8le7...015%20Test.zip

snappyHexMesh runs without any errors when I comment out the featureEdgeMesh in snappyHexMeshDict. But it seems to ignore my stl file because I cannot see the NACA airfoil in the mesh.

I really appreciate any help you can provide.

Ingöö
Abdulbasit likes this.
Ingöö is offline   Reply With Quote

Old   September 17, 2014, 18:29
Default
  #2
Senior Member
 
M. C.
Join Date: May 2013
Location: Italy
Posts: 286
Blog Entries: 6
Rep Power: 17
student666 is on a distinguished road
Code:
Expected a '(' while reading VectorSpace<Form
seems OpenFoam already told you the problem.

Have a look at your emesh file go to line 19 and check for the missing (, maybe you edited it with no intentions.
student666 is offline   Reply With Quote

Old   October 22, 2014, 13:44
Default
  #3
Member
 
Seroga
Join Date: Dec 2011
Posts: 41
Rep Power: 14
Seroga is on a distinguished road
Is it possible to use snappyHexMesh without emesh-files?
Seroga is offline   Reply With Quote

Old   June 12, 2015, 04:28
Default
  #4
Member
 
Stephanie
Join Date: Feb 2015
Location: Magdeburg, Germany
Posts: 71
Rep Power: 11
stephie is on a distinguished road
Hello everyone,

I am trying to use SnappyHexMesh to snap a foil geometry out of an rectangular (small box).
I use the foam extend 3.1 version. Unfortunately I am not able to produce an emesh. Could anyone help me or send me the correct command? I would be very grateful.

These are the commands I used:

ideasUnvToFoam cad/name.unv

surfaceFeatureExtract -includedAngle 150 constant/triSurface/name.stl name

(here the eMesh normaly is produced..but the command just produce the .obj files)

snappyHexMesh -overwirte

--> here I gut this message because of the missing emesh file

--> FOAM FATAL IO ERROR:
problem while reading header for object foil_mesh.eMesh

file: /home/stephanie/Schreibtisch/SnappyHexMesh_NACA4518_150611/adaptiveMesh/constant/triSurface/foil_mesh.eMesh at line 2.

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

FOAM exiting


best regards,
Stephie
stephie is offline   Reply With Quote

Old   June 12, 2015, 04:44
Default
  #5
Senior Member
 
M. C.
Join Date: May 2013
Location: Italy
Posts: 286
Blog Entries: 6
Rep Power: 17
student666 is on a distinguished road
You can use surface feature exctract with stl files. Ideas unv to foam, already convert the unv file into openfoam mesh.
student666 is offline   Reply With Quote

Old   June 12, 2015, 05:08
Default
  #6
Member
 
Stephanie
Join Date: Feb 2015
Location: Magdeburg, Germany
Posts: 71
Rep Power: 11
stephie is on a distinguished road
Yes that is correct and what I do.

My background box is an .unv file which I convert to OpenFoam first.

The geometry of the foil is a stl file, which I would like to snap out of the box.

How I wrote, I use the following command surfaceFeatureExtract -includedAngle 150 constant/triSurface name.stl name

My current problem is, that this command does not produce any eMesh file.

So I guess, the command is not correct?
stephie is offline   Reply With Quote

Old   June 12, 2015, 05:21
Default
  #7
Senior Member
 
M. C.
Join Date: May 2013
Location: Italy
Posts: 286
Blog Entries: 6
Rep Power: 17
student666 is on a distinguished road
Ok, now I get it, I think the command is right.

Maybe a trivial error, you have to set the name of the stl file, not the name of your background mesh

Quote:
surfaceFeatureExtract -includedAngle 150 constant/triSurface/name.stl name
I would change to

Quote:
surfaceFeatureExtract -includedAngle 150 constant/triSurface/foil.stl
or whatever the name of your file is.

In any case I generally use a surfaceFeatureExctractDict in the system directory like:

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

amiRot1.stl
{
    extractionMethod    extractFromSurface; // extractFromFile or extractFromSurface
    extractFromSurfaceCoeffs
    {includedAngle   135;}
    writeObj                yes;    // Write options
}
then I only type surfaceFeatureExctract in the main root of the case.
student666 is offline   Reply With Quote

Old   June 12, 2015, 05:36
Default
  #8
Member
 
Stephanie
Join Date: Feb 2015
Location: Magdeburg, Germany
Posts: 71
Rep Power: 11
stephie is on a distinguished road
Hey,

thank you for your support. But the stl name is okay and here is my surfaceFeatureExtractDict

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

foil_mesh.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;
}


// ************************************************** *********************** //

May I send you a dropbox link with my case?
stephie is offline   Reply With Quote

Old   June 12, 2015, 05:45
Default
  #9
Senior Member
 
M. C.
Join Date: May 2013
Location: Italy
Posts: 286
Blog Entries: 6
Rep Power: 17
student666 is on a distinguished road
ok. I'll wait for it. I'll give it a try. You can post it here, or send to e-keneso@libero.it
student666 is offline   Reply With Quote

Old   June 12, 2015, 16:56
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer:
  1. I'm not certain if snappyHexMesh in foam-extend 3.1 is able to handle feature edges, because I can't find any tutorial for them.
  2. You could have taken a look at the tutorial cases in OpenFOAM 2.0 and newer did it:
    Code:
    surfaceFeatureExtract -includedAngle 150 constant/triSurface/name.stl constant/triSurface/name.eMesh


(edit: Moved my post for the answer I gave for the repeated question that was made on another thread.)

Last edited by wyldckat; June 13, 2015 at 13:35. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   June 13, 2015, 13:20
Default
  #11
Senior Member
 
M. C.
Join Date: May 2013
Location: Italy
Posts: 286
Blog Entries: 6
Rep Power: 17
student666 is on a distinguished road
Hi,

i performed some tests, but verify yourself what I'm writing:

Foam extended 3.1 can't perform the command surfaceFestureExctract with a dictionary in the system folder, f I type the command surface feature extract in Foam ext. I got this error message:
Code:
Usage:  surfaceFeatureExtract <surface> <output set> [-minElem  number of edges in feature] [-minLen cumulative length of feature]  [-deleteBox ((x0 y0 z0)(x1 y1 z1))] [-subsetBox ((x0 y0 z0)(x1 y1 z1))]  [-set input feature set] [-includedAngle included angle [0..180]] [-case  dir] [-noFunctionObjects]  [-help] [-doc] [-srcDoc]
So in order to extract the edges i used openfoam 2.4.0 or 2.3.1; with these versions I have been able to extract the edges. Somewhere on the web, I red about some problem with snappyHexMesh and foam extended version, but I didn't save the link, so you have to look for information if this is true. My suggestion is then to perform meshing operation with standard OF.

I wasn't able to open neither the stl file and the edges file with paraview, It crashes all the time, only blender gave me support; I suggest you to export the stl in other ways, cause it seems that your cad program is not performing it so good.

Hope this can help.

Ciao

Michele
wyldckat likes this.
student666 is offline   Reply With Quote

Old   June 15, 2015, 04:58
Default
  #12
Member
 
Stephanie
Join Date: Feb 2015
Location: Magdeburg, Germany
Posts: 71
Rep Power: 11
stephie is on a distinguished road
Hallo Michele, hello Bruno,

thank you for your support.
Finally I used your hint and create the emesh with OpenFOAM 2.4 and put it into foam-extend.
Now it works...today I was able to snap the foil geometry into the backgroundmesh.

best regards,
Stephie
stephie is offline   Reply With Quote

Old   March 24, 2019, 02:40
Default
  #13
New Member
 
Raj Kiran
Join Date: May 2018
Posts: 24
Rep Power: 8
Rakkiran is on a distinguished road
Hello Foamers,
I know this is very old post but I am facing few issues with eMesh. When I run the command surfaceFeatureExtract it is giving .eMesh files with zero points and zero edges .
Couldn't figure out the reason.


Regards,
Raj Kiran.
Rakkiran is offline   Reply With Quote

Old   March 24, 2019, 13:46
Default
  #14
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,980
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by Rakkiran View Post
When I run the command surfaceFeatureExtract it is giving .eMesh files with zero points and zero edges .
Quick answer:
Code:
surfaceCheck constant/triSurface/yourFileName.stl
this will give you information on the status and summary details of the STL file.
__________________
wyldckat is offline   Reply With Quote

Reply

Tags
emesh, naca 0015, snappyhexmesh, surfacefeatureextract

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
[OpenFOAM.org] Patches to compile OpenFOAM 2.2 on Mac OS X gschaider OpenFOAM Installation 136 October 10, 2017 17:25
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 01:22
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 17:18
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02


All times are GMT -4. The time now is 22:02.