CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

How to import single STL file to openfoam in Windows 10

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Saamu

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 10, 2019, 08:08
Default How to import single STL file to openfoam in Windows 10
  #1
Member
 
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 8
Jinjolee is on a distinguished road
I am a Windows 10 user and have never used Linux before. Currently I am working on a final year project, which needs to generate a fluid flow simulation of track cycling. I have created a cyclist and bike model in SolidWorks, and I would like to export the model and use in OpenFOAM. I have installed OpenFOAM on my Windows 10 using Ubuntu. I followed the guide from https://openfoam.org/download/windows/ . By the way, I am a completely newbie in OpenFOAM and Ubuntu.

I first export the SolidWorks model to .stl file with in ASCII. And it is in a single file, namely Model.STL. And now I would like to do meshing on this STL model using SnappyHexMesh. However, I do not know how to import the STL file using OpenFOAM. I tried to find tutorial of this, but I couldn't find any using a single STL model.

Could anyone help me to figure out what should I do? Thanks in advanced.
Jinjolee is offline   Reply With Quote

Old   April 10, 2019, 09:52
Default
  #2
New Member
 
Join Date: Mar 2019
Posts: 2
Rep Power: 0
Saamu is on a distinguished road
You have to put the stl file in the constant/triSurface-folder. SnappyHexMesh will then be able to read this stl file
tukkuezgi likes this.
Saamu is offline   Reply With Quote

Old   April 10, 2019, 11:04
Default
  #3
Member
 
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 8
Jinjolee is on a distinguished road
Quote:
Originally Posted by Saamu View Post
You have to put the stl file in the constant/triSurface-folder. SnappyHexMesh will then be able to read this stl file
Thanks for replying. After I moved the stl file into triSurface folder, what should I do? I tried to run SnappyHexMesh by typing "snappyHexMesh", but it said
-->FOAM FATAL ERROR
cannot find file "/home/<username>/OpenFOAM/<username>-dev/run/system/controlDict"

Thanks a lot.
Jinjolee is offline   Reply With Quote

Old   April 10, 2019, 18:46
Default
  #4
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22
jherb is on a distinguished road
As shown in the output, you need a controlDict file in the systems folder. You could start with one of the files in the $FOAM_TUTORIALS subfolders which use snappyHexMesh, e.g. the motorBike tutorial:
https://github.com/OpenFOAM/OpenFOAM...Foam/motorBike
jherb is offline   Reply With Quote

Old   April 11, 2019, 01:03
Default
  #5
Member
 
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 8
Jinjolee is on a distinguished road
Quote:
Originally Posted by jherb View Post
As shown in the output, you need a controlDict file in the systems folder. You could start with one of the files in the $FOAM_TUTORIALS subfolders which use snappyHexMesh, e.g. the motorBike tutorial:
https://github.com/OpenFOAM/OpenFOAM...Foam/motorBike
Thanks a lot! I would try this out.
Jinjolee is offline   Reply With Quote

Old   April 11, 2019, 03:48
Default
  #6
Member
 
Joe lee
Join Date: Nov 2018
Posts: 59
Rep Power: 8
Jinjolee is on a distinguished road
Quote:
Originally Posted by jherb View Post
As shown in the output, you need a controlDict file in the systems folder. You could start with one of the files in the $FOAM_TUTORIALS subfolders which use snappyHexMesh, e.g. the motorBike tutorial:
https://github.com/OpenFOAM/OpenFOAM...Foam/motorBike
Is it true that surfaceFeatureExtract function only takes stl file with .stl.gz extension? My file is in .stl format and it cannot be read by the surfaceFeatures and surfaceFeatureExtract function. I checked that flange is in .stl.gz. So I am wondering if the stl file has to be in .stl.gz.

If the above is true, how should I turn .stl into .stl.gz? Thanks.

EDIT
Nevermind. I put the wrong file in the triSurface folder.
Jinjolee is offline   Reply With Quote

Old   May 16, 2023, 13:14
Default
  #7
New Member
 
Rahmat
Join Date: Mar 2023
Posts: 16
Rep Power: 3
Rahmat1 is on a distinguished road
How the constant/triSurface-folder is being created? Is it created once the OF is installed? Where is the location of this file. I’m also a newbie in openfoam. Thanks
Rahmat1 is offline   Reply With Quote

Old   May 17, 2023, 04:32
Default
  #8
New Member
 
Kuralamuthan Veerapandiyan
Join Date: Jan 2022
Location: Chennai, India
Posts: 2
Rep Power: 0
Kuralamuthan is on a distinguished road
Quote:
Originally Posted by Rahmat1 View Post
How the constant/triSurface-folder is being created? Is it created once the OF is installed? Where is the location of this file. I’m also a newbie in openfoam. Thanks
1. If the folder is not present, you can create it manually.

2. ".stl " file is to be supplied by you. If you want to run a custom simulation, create that 3D model in any other software like Fusion 360, Solidworks, etc.. and export them as ".stl" files.
Kuralamuthan is offline   Reply With Quote

Old   May 17, 2023, 13:35
Default
  #9
New Member
 
Rahmat
Join Date: Mar 2023
Posts: 16
Rep Power: 3
Rahmat1 is on a distinguished road
Quote:
Originally Posted by Kuralamuthan View Post
1. If the folder is not present, you can create it manually.

2. ".stl " file is to be supplied by you. If you want to run a custom simulation, create that 3D model in any other software like Fusion 360, Solidworks, etc.. and export them as ".stl" files.
Re-read my questions
Rahmat1 is offline   Reply With Quote

Old   May 19, 2023, 11:03
Default
  #10
Member
 
Vinzenz Götz
Join Date: Mar 2021
Location: Munich, Germany
Posts: 31
Rep Power: 5
Vinzmann is on a distinguished road
Quote:
Originally Posted by Rahmat1 View Post
How the constant/triSurface-folder is being created? Is it created once the OF is installed? Where is the location of this file. I’m also a newbie in openfoam. Thanks
Create the folder with

Code:
mkdir triSurface
while you're in the constant folder. If you don't know where that is please read Chapter "2.1 File structure of OpenFOAM cases" of the user guide again.

What file are you talking about?

Best regards,
Vinz
Vinzmann is offline   Reply With Quote

Reply

Tags
import cad, snappyhexmesh 3d, ubuntu 14.04 lts, windows 10


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
[foam-extend.org] Problems installing foam-extend-4.0 on openSUSE 42.2 and Ubuntu 16.04 ordinary OpenFOAM Installation 19 September 3, 2019 19:13
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 04:23
[swak4Foam] Error bulding swak4Foam sfigato OpenFOAM Community Contributions 18 August 22, 2013 13:41
2.0.x on Mac OSX niklas OpenFOAM Installation 74 March 28, 2012 17:46
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24


All times are GMT -4. The time now is 12:53.