CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   STL build of a file in MATLAB (https://www.cfd-online.com/Forums/openfoam-pre-processing/148330-stl-build-file-matlab.html)

sjachec February 9, 2015 13:27

STL build of a file in MATLAB
 
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?

ssss February 9, 2015 14:59

You will also need to create an stl with the full domain containing the bump so that snappyHexMeshDict can mesh inside a closed domain

sjachec February 9, 2015 16:02

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?

ssss February 9, 2015 16:47

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

sjachec February 12, 2015 13:15

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


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