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/)
-   -   [CAD formats] how to call my .stl file in the terminal (https://www.cfd-online.com/Forums/openfoam-meshing/119792-how-call-my-stl-file-terminal.html)

izna June 25, 2013 06:28

how to call my .stl file in the terminal
 
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.

nimasam June 29, 2013 16:13

search for using snappyHexMesh for meshing a stl file in OpenFOAM

chegdan June 29, 2013 17:03

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.

izna July 2, 2013 14:50

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..

chegdan July 2, 2013 14:58

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

izna July 2, 2013 14:59

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..:(

chegdan July 2, 2013 15:11

Then see post 3 for my pointers of a direction to go.

Good luck and report back if you are having issues.

izna July 9, 2013 01:22

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::printStack(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::primitiveMesh::pointCells(int, Foam::DynamicList<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)



chegdan July 9, 2013 11:04

it is possible to attach your snappyhexMeshDict and/or geometry that you are meshing?

Dan

izna July 9, 2013 13:37

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 July 9, 2013 13:41

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::printStack(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::primitiveMesh::pointCells(int, Foam::DynamicList<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)




chegdan July 9, 2013 14:01

Quote:

Originally Posted by izna (Post 438742)
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 July 9, 2013 14:03

Quote:

Originally Posted by izna (Post 438743)
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.

izna July 9, 2013 15:08

can u provide an email add i can send my .stl file as well as my case file?

chegdan July 9, 2013 15:12

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.

izna July 9, 2013 15:22

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 July 9, 2013 15:25

my .stl file used...:(

chegdan July 9, 2013 15:28

Quote:

Originally Posted by izna (Post 438761)
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 July 9, 2013 15:31

i am uploading it few min u would get it..

https://www.dropbox.com/s/w9cvgyig9y...ill.stl.tar.gz

izna July 9, 2013 15:54

Dear Dan,

have you been able to find and download the file?


All times are GMT -4. The time now is 23:56.