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

STL build of a file in MATLAB

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 9, 2015, 14:27
Default STL build of a file in MATLAB
  #1
New Member
 
Steven Jachec
Join Date: Feb 2013
Posts: 5
Rep Power: 5
sjachec is on a distinguished road
I have created a 3D Gaussian bump geometry in MATLAB. I am want to generate steady flow around the bump using simpleFoam. Wanting to bring it into snappyHexMesh, I used stlwrite to produce the STL file and bring to the triSurface directory.

After I blockMesh and snappyHexMesh, I can see in paraview it is meshing through my Gaussian bump, which I do not want. Is this because the STL is not closed (I did a surfaceCHeck and can see it is not)? I thought the bounding box limits would take care of this. MATLAB basically produces a single valued function of the bump. If this is the problem, what's the best/easiest way to close?
sjachec is offline   Reply With Quote

Old   February 9, 2015, 15:59
Default
  #2
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 198
Rep Power: 4
ssss is on a distinguished road
You will also need to create an stl with the full domain containing the bump so that snappyHexMeshDict can mesh inside a closed domain
ssss is offline   Reply With Quote

Old   February 9, 2015, 17:02
Default
  #3
New Member
 
Steven Jachec
Join Date: Feb 2013
Posts: 5
Rep Power: 5
sjachec is on a distinguished road
But the motorbike example does not do this. The motorbike OBJ is just bike and rider itself. We then use blockMeshDict to set the xyz limits of the bounding box and mesh around the OBJ. Correct?
sjachec is offline   Reply With Quote

Old   February 9, 2015, 17:47
Default
  #4
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 198
Rep Power: 4
ssss is on a distinguished road
Yes that is true.

If you only want to use one *.stl or one *.obj, you will need to be very careful with the position set in the *.stl, you will need to set the stl as a refinementSurface , and you will need to set a correct locationInMesh

If you want I can have a look at your case to see if I can obtain your mesh
ssss is offline   Reply With Quote

Old   February 12, 2015, 14:15
Smile
  #5
New Member
 
Steven Jachec
Join Date: Feb 2013
Posts: 5
Rep Power: 5
sjachec is on a distinguished road
I figured it out. The (snappyHexMesh [SHM]) gridding turned out to be fine.

The issue was.....

After SHM additional folders (1/ 2/ 3/) are created. I failed to copy the newly gridded results back to polyMesh directory. I fixed by

>> mv 3/polyMesh/* constant/polyMesh

Thanks for your offer to look,
Steven
sjachec is offline   Reply With Quote

Reply

Tags
matlab, snapphexmesh, stl

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
swak4Foam-groovyBC build problem zxj160 OpenFOAM 18 July 30, 2013 13:14
"parabolicVelocity" in OpenFoam 2.1.0 ? sawyer86 OpenFOAM Running, Solving & CFD 21 February 7, 2012 12:44
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 20:08
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24


All times are GMT -4. The time now is 20:33.