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

STL build of a file in MATLAB

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread 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: 13
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: 205
Rep Power: 13
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: 13
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: 205
Rep Power: 13
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: 13
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


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
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 17:02
[swak4Foam] swak4Foam-groovyBC build problem zxj160 OpenFOAM Community Contributions 18 July 30, 2013 14: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 02:24


All times are GMT -4. The time now is 03:11.