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] Smoothing an stl file to match inlet with timeVaryingMappedFixedValue (https://www.cfd-online.com/Forums/openfoam-meshing/157454-smoothing-stl-file-match-inlet-timevaryingmappedfixedvalue.html)

MaryBau July 29, 2015 18:14

Smoothing an stl file to match inlet with timeVaryingMappedFixedValue
 
2 Attachment(s)
Hi everyone:

I am doing a wind simulation over complex terrain. I did a precursor simulation over flat terrain to generate the inlet for the successor complex terrain simulation. So the inlet in the successor simulation is defined as timeVaryingMappedFixedValue.

I generate the complex terrain mesh with a *.stl file of the terrain. Because of the terrain features, the inlet in the successor mesh does not match perfectly the precursor simulation plane. I think that is causing me some instabilities as seen in the picture.

Does anyone know how can I either:

-create a buffer zone upstream of my successor mesh to perfectly linked it to the precursor? I tried mergeMesh and then stichMesh but there is a big offset and it does not work (as the second pic shows).

-or how can I modify my stl file (smoothing it in the upstream direction) to get a good inlet?

-or any other suggestion?

Thanks a lot!

vatavuk July 30, 2015 07:59

Hi MaryBau,
I’ve done a simulation similar to yours. Depending on the way you are generating the stl file, you may be able to generate a smooth transition. In my case I had a VBA program running in excel that generated the stl file and so I had to insert the smooth transition by programming, it was quite difficult to do it but it worked.
How did you generate the stl file?
Best Regards,
Paulo

MaryBau July 30, 2015 08:11

Hi Paulo,

Thanks for the reply. I did not generate the stl file, it was given to me. And I do not have the xyz data either to generate my own stl file. Is there a easy way to convert stl to xyz, and start over?

Thanks again,

Mary

vatavuk July 31, 2015 07:35

Hi Mary,
I don't know an easy way to convert stl to xyz.
Perhaps it would be easier if you generate a second stl that creates a smoothing region and then generate the mesh with the two stls. To do this, it isn't necessary to know all xyz coordinates but only the coordinates of the curve that forms the boundary between the original region and the new smooth one.
Now the problem is how to obtain the coordinates of the curve? You may try to use meshLab, in http://meshlab.sourceforge.net/, it says it can create slices of a surface and export the points.
I hope this helps.
Best Regards,
Paulo


All times are GMT -4. The time now is 15:21.