CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Pre-Processing (
-   -   Defining boundary conditions STL file (

marco100 April 19, 2012 08:15

Defining boundary conditions STL file

Since I just started exploring OpenFOAM I have a basic question.
I want to make a simulation of the air distribution in a building. I have the geometry available in an STL file (the building is drawn with AutoCAD). The STL file consists of one single block (containing the building, i.e. the walls, floor and ceiling). Inside it is open and this is the space where of course the air distribution has to be calculated.
So in the STL file there isn't any boundary condition prescribed yet (for instance there isn't an opening in a wall where air from outside can come in, the opening is something I have to create).
How can I define such an opening and get the geometry running in OpenFOAM? I have been playing with Salome and Engrid but it is not clear to me. It seems I cannot make any changes to the STL geometry.
I hope my question is clear.

Best regards,

lovecraft22 April 19, 2012 08:33

I would usually separate some of the triangles of your stl to a different stl file, give the latter a different name and use it to set a boundary condition on it.

marco100 April 19, 2012 08:40

Thanks for your reply.
So Openfoam can read in multiple STL files?
What would be the best pre-processor to make the separation? It seems some triangles are really big, maybe bigger than the opening I want to create. Do you have an idea for this?

lovecraft22 April 19, 2012 08:43

Yes, it can read multiple stl or even a stl with multiple regions in it.

About your problem, there are specific softwares that can do what you ask, but probably in your case the easiest way would be that of using a cad, cut the hole and save the file as building.stl, then generate a surface to cover your hole and save it as inlet.stl (or whatever you'd like). Any cad can do that.

marco100 April 19, 2012 09:01

I dont have a lot of experience with CAD programs. I only have the STL file. Can I read that in into a CAD program and make the changes you suggest?

lovecraft22 April 19, 2012 09:06

Yes, any cad software can do that.

marco100 April 19, 2012 09:28

I have AutoCAD but it cannot open STL files, only export it in that format.

elvis May 23, 2012 08:06


you might take a look at Blender
For an older Blender versions there are even OpenFoam related Tutorials
nice thread here for different Blender tasks

All times are GMT -4. The time now is 04:54.