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 Community New Posts Updated Threads Search

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread 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: 143
Rep Power: 12
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 Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
search for using snappyHexMesh for meshing a stl file in OpenFOAM
__________________
My Personal Website (http://nimasamkhaniani.ir/)
Telegram channel (https://t.me/cfd_foam)
nimasam is offline   Reply With Quote

Old   June 29, 2013, 17:03
Default
  #3
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
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
    http://www.cfd-online.com/Forums/ope...s-meshers.html
    http://www.cfd-online.com/Forums/ope...pyhexmesh.html

Good luck.
chegdan is offline   Reply With Quote

Old   July 2, 2013, 14:50
Default
  #4
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
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
 
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
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
chegdan is offline   Reply With Quote

Old   July 2, 2013, 14:59
Default
  #6
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
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
 
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
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.
chegdan is offline   Reply With Quote

Old   July 9, 2013, 01:22
Default
  #8
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
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
 
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
it is possible to attach your snappyhexMeshDict and/or geometry that you are meshing?

Dan
chegdan is offline   Reply With Quote

Old   July 9, 2013, 13:37
Default
  #10
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
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: 143
Rep Power: 12
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
 
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
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.
chegdan is offline   Reply With Quote

Old   July 9, 2013, 14:03
Default
  #13
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
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.
chegdan is offline   Reply With Quote

Old   July 9, 2013, 15:08
Default
  #14
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
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
 
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
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.
chegdan is offline   Reply With Quote

Old   July 9, 2013, 15:22
Default
  #16
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
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: 143
Rep Power: 12
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
 
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
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.
chegdan is offline   Reply With Quote

Old   July 9, 2013, 15:31
Default
  #19
Senior Member
 
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 12
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: 143
Rep Power: 12
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


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 20:00.