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   June 25, 2013, 06:28
Default how to call my .stl file in the terminal
  #1
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 139
Rep Power: 4
izna is on a distinguished road
hello everyone,

i am used to only fluent mesh to foam conversion.
Now i have a .stl file, by which command do i call it in my terminal?

2) i am using simpleFoam/turbineSitings, which command should i run this in terminal?

thanking you all foamers for a reply.
izna is offline   Reply With Quote

Old   June 29, 2013, 16:13
Default
  #2
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
search for using snappyHexMesh for meshing a stl file in OpenFOAM
__________________
Training Course on OpenFOAM at (http://www.isme.ir/)
My Weblog (http://openfoam.blogfa.com/)
nimasam is offline   Reply With Quote

Old   June 29, 2013, 17:03
Default
  #3
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 543
Rep Power: 18
chegdan will become famous soon enough
Izna,

Welcome to the forum! STL files are used as surfaces within the meshing application snappyHexMesh. There are numerous posts on the topic throughout the forum, but I would suggest a few things to start with.
  • Read through some of the snappyHexMesh documentation here
  • Look at some more detailed explanations of snappyhexMesh and also the wiki page
  • Glance at some of the tutorial cases and see how they use STL files. One of the best examples is the motorBike case located in
    Code:
    $FOAM_RUN/tutorials/incompressible/simpleFoam/motorBike
    you can search for other examples in the tutorial directory with the command
    Code:
    find . -name snappyHexMeshDict
  • If you are in a hurry, you may want to try some of the OpenFOAM pre processors located here. I can suggest some but I don't want to sound like a broken record on the forum. You may want to check out two active threads on the forum
    SwiftSnap and SwiftBlock, GUIs for OpenFOAM's meshers
    Helyx-OS (GUI for SnappyHexMesh

Good luck.
__________________
Dan

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

Old   July 2, 2013, 14:50
Default
  #4
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 139
Rep Power: 4
izna is on a distinguished road
hello Dear Daniel..

I thank you a lot for your useful info.. it was really nice of you..

i am starting to read it all now..
Fact is i used Openfoam only after meshing in gambit and then using the command FluentMeshToFoam, i do my iterations...
now unfortunately i have the .stl file.. hence am lost..
izna is offline   Reply With Quote

Old   July 2, 2013, 14:58
Default
  #5
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 543
Rep Power: 18
chegdan will become famous soon enough
If you have a mesh, no need to use that STL file. Your FluentMeshToFoam should populate your polyMesh folder (i.e. the folder holding the mesh in OpenFOAM) nicely and you should be ready to go onto setting up boundary conditions, setting up your model, and running simulations.

Summary: if you have a mesh no need for that STL file
__________________
Dan

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

Old   July 2, 2013, 14:59
Default
  #6
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 139
Rep Power: 4
izna is on a distinguished road
hii

yes i know ..
But in that particular case i have acquired the Askervein Hill in .stl.. hence i need to find a way to mesh it..
izna is offline   Reply With Quote

Old   July 2, 2013, 15:11
Default
  #7
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 543
Rep Power: 18
chegdan will become famous soon enough
Then see post 3 for my pointers of a direction to go.

Good luck and report back if you are having issues.
izna likes this.
__________________
Dan

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

Old   July 9, 2013, 01:22
Default
  #8
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 139
Rep Power: 4
izna is on a distinguished road
Hello Dan,
I have used snappyhexmesh on my .stl file and i see the following error.. i am lost in what else to do now..


Quote:

Introducing baffles to block off problem cells
----------------------------------------------

#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigSegv::sigHandler(int) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam:rimitiveMesh:ointCells(int, Foam:ynamicList<int, 0u, 2u, 1u>&) const in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4 Foam::meshRefinement::markFacesOnProblemCells(Foam ::dictionary const&, bool, Foam::Field<double> const&, Foam::List<int> const&) const in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libautoMesh.so"
#5 Foam::meshRefinement::baffleAndSplitMesh(bool, bool, Foam::Field<double> const&, bool, Foam::dictionary const&, Foam::Time&, Foam::List<int> const&, Foam::List<int> const&, Foam::Vector<double> const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libautoMesh.so"
#6 Foam::autoRefineDriver::baffleAndSplitMesh(Foam::r efinementParameters const&, bool, Foam::dictionary const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libautoMesh.so"
#7 Foam::autoRefineDriver::doRefine(Foam::dictionary const&, Foam::refinementParameters const&, bool, Foam::dictionary const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libautoMesh.so"
#8
in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/snappyHexMesh"
#9 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#10
in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/snappyHexMesh"
Segmentation fault (core dumped)

izna is offline   Reply With Quote

Old   July 9, 2013, 11:04
Default
  #9
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 543
Rep Power: 18
chegdan will become famous soon enough
it is possible to attach your snappyhexMeshDict and/or geometry that you are meshing?

Dan
__________________
Dan

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

Old   July 9, 2013, 13:37
Default
  #10
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 139
Rep Power: 4
izna is on a distinguished road
helo Dan

when i run Block mesh it works perfectly..
when i run snappyhexmesh i get this error..

also when i do block mesh in my .stl file, the mesh r coarse.. i mean the snappyhexmesh mesh have finer mesh? i can not understand this..
izna is offline   Reply With Quote

Old   July 9, 2013, 13:41
Default
  #11
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 139
Rep Power: 4
izna is on a distinguished road
this is the full messgae.. with snappyhexmesh

Quote:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 599

Read mesh in = 13.11 s

Overall mesh bounding box : (-350 -132 0.76) (400 118 250)
Relative tolerance : 1e-06
Absolute matching distance : 0.000828927365696

Reading refinement surfaces.
Read refinement surfaces in = 0.66 s

Reading refinement shells.
Read refinement shells in = 0 s

Setting refinement level of surface to be consistent with shells.
Checked shell refinement in = 0 s

Reading features.
Read features in = 0 s


Determining initial surface intersections
-----------------------------------------

Edge intersection testing:
Number of edges : 3185543
Number of edges to retest : 3185543
Number of intersected edges : 324948
Calculated surface intersections in = 17.58 s

Initial mesh : cells:938563 faces:3185543 points:1317605
Cells per refinement level:
0 73958
1 7415
2 27973
3 104656
4 724561

Adding patches for surface regions
----------------------------------

Patch Type Region
----- ---- ------
Bolund:

5 wall Bolund_CreatedbyGmsh

Added patches in = 0.02 s

Selecting decompositionMethod none

Refinement phase
----------------

Found point (-89 -130 4) in cell 71709 on processor 0

Surface refinement iteration 0
------------------------------

Marked for refinement due to surface intersection : 2 cells.
Determined cells to refine in = 3.59 s
Selected for refinement : 3 cells (out of 938563)
Edge intersection testing:
Number of edges : 3185606
Number of edges to retest : 300
Number of intersected edges : 324951
Refined mesh in = 9.81 s
After refinement surface refinement iteration 0 : cells:938584 faces:3185606 points:1317626
Cells per refinement level:
0 73958
1 7415
2 27972
3 104662
4 724577

Surface refinement iteration 1
------------------------------

Marked for refinement due to surface intersection : 0 cells.
Determined cells to refine in = 0.82 s
Selected for refinement : 0 cells (out of 938584)
Stopping refining since too few cells selected.


Removing mesh beyond surface intersections
------------------------------------------

Found point (-89 -130 4) in cell 71709 in global region 0 out of 5 regions.
Keeping all cells in region 0 containing point (-89 -130 4)
Selected for keeping : 938584 cells.
Edge intersection testing:
Number of edges : 3185606
Number of edges to retest : 0
Number of intersected edges : 324951

Shell refinement iteration 0
----------------------------

Marked for refinement due to distance to explicit features : 0 cells.
Marked for refinement due to refinement shells : 0 cells.
Determined cells to refine in = 13.89 s
Selected for internal refinement : 0 cells (out of 938584)
Stopping refining since too few cells selected.


Splitting mesh at surface intersections
---------------------------------------

Introducing baffles for 324951 faces that are intersected by the surface.

Edge intersection testing:
Number of edges : 3185619
Number of edges to retest : 1324745
Number of intersected edges : 324961
Created baffles in = 11.57 s


After introducing baffles : cells:938584 faces:3185619 points:1317626
Cells per refinement level:
0 73958
1 7415
2 27972
3 104662
4 724577

Introducing baffles to block off problem cells
----------------------------------------------

#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigSegv::sigHandler(int) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Foam:rimitiveMesh:ointCells(int, Foam:ynamicList<int, 0u, 2u, 1u>&) const in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#4 Foam::meshRefinement::markFacesOnProblemCells(Foam ::dictionary const&, bool, Foam::Field<double> const&, Foam::List<int> const&) const in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libautoMesh.so"
#5 Foam::meshRefinement::baffleAndSplitMesh(bool, bool, Foam::Field<double> const&, bool, Foam::dictionary const&, Foam::Time&, Foam::List<int> const&, Foam::List<int> const&, Foam::Vector<double> const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libautoMesh.so"
#6 Foam::autoRefineDriver::baffleAndSplitMesh(Foam::r efinementParameters const&, bool, Foam::dictionary const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libautoMesh.so"
#7 Foam::autoRefineDriver::doRefine(Foam::dictionary const&, Foam::refinementParameters const&, bool, Foam::dictionary const&) in "/opt/openfoam220/platforms/linuxGccDPOpt/lib/libautoMesh.so"
#8
in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/snappyHexMesh"
#9 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#10
in "/opt/openfoam220/platforms/linuxGccDPOpt/bin/snappyHexMesh"
Segmentation fault (core dumped)


izna is offline   Reply With Quote

Old   July 9, 2013, 14:01
Default
  #12
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 543
Rep Power: 18
chegdan will become famous soon enough
Quote:
Originally Posted by izna View Post
helo Dan

when i run Block mesh it works perfectly..
when i run snappyhexmesh i get this error..

also when i do block mesh in my .stl file, the mesh r coarse.. i mean the snappyhexmesh mesh have finer mesh? i can not understand this..
The way SHM works is to take the base mesh with a particular cell size and then refine, snap, and remove cells that do not belong there. Take a look at this presentation for the methodology of SHM. Read that presentation before you proceed any further with SHM.
__________________
Dan

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

Old   July 9, 2013, 14:03
Default
  #13
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 543
Rep Power: 18
chegdan will become famous soon enough
Quote:
Originally Posted by izna View Post
this is the full messgae.. with snappyhexmesh
I can't really do anything with this until you provide a snappyHexMeshDict file or case with how you have set things up. Until i have that type of information then i can just guess what the problem is.
__________________
Dan

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

Old   July 9, 2013, 15:08
Default
  #14
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 139
Rep Power: 4
izna is on a distinguished road
can u provide an email add i can send my .stl file as well as my case file?
izna is offline   Reply With Quote

Old   July 9, 2013, 15:12
Default
  #15
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 543
Rep Power: 18
chegdan will become famous soon enough
Use dropbox (www.dropbox) and then provide a link to your file by right clicking on the file in the public folder and copy pasting the link here. when we are done you can just delete the file from dropbox or edit your post to say that you removed the link.
__________________
Dan

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

Old   July 9, 2013, 15:22
Default
  #16
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 139
Rep Power: 4
izna is on a distinguished road
http://openfoamwiki.net/index.php/Fi...emplate.tar.gz


this file i am using but i have not used same .stl hence wud sent u the .stl file i used

the one in the link is broken i think..
izna is offline   Reply With Quote

Old   July 9, 2013, 15:25
Default
  #17
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 139
Rep Power: 4
izna is on a distinguished road
my .stl file used...
izna is offline   Reply With Quote

Old   July 9, 2013, 15:28
Default
  #18
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 543
Rep Power: 18
chegdan will become famous soon enough
Quote:
Originally Posted by izna View Post
http://openfoamwiki.net/index.php/Fi...emplate.tar.gz


this file i am using but i have not used same .stl hence wud sent u the .stl file i used

the one in the link is broken i think..
So this is the STL file you are using?
izna likes this.
__________________
Dan

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

Old   July 9, 2013, 15:31
Default
  #19
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 139
Rep Power: 4
izna is on a distinguished road
i am uploading it few min u would get it..

https://www.dropbox.com/s/w9cvgyig9y...ill.stl.tar.gz
izna is offline   Reply With Quote

Old   July 9, 2013, 15:54
Default
  #20
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 139
Rep Power: 4
izna is on a distinguished road
Dear Dan,

have you been able to find and download the file?
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 22:10.