##### Personal tools
You are here: Home Desk in a room - How to build geometry working with hexahedral mesh?

# Desk in a room - How to build geometry working with hexahedral mesh?

Up to How to use Salome?

### Desk in a room - How to build geometry working with hexahedral mesh?

Posted by Robert Scholz at January 17. 2013

Hi everyone,

I'm trying to build a model of a room with a desk in it. On the lower side of the desk there is a little pipe outlet for gas.

I'v tried building this in several different ways:

1) Building solids and cutting the desk out of the rooms volume with boolean function "cut"

2) Building solids for the desk and fusing them, then fusing a box for the room and the desk fuse.

3) Building everything using vertices and quadrangle faces and then making a single shell out of it.

Still this won't work. I finally got it meshed in Salome using way 3 and Hexaotic, but ideasUnvToFoam won't transfer it to OpenFoam.

I'm really really desperate for help. I hope you've got some hints for me? I've attached a picture of my setup.

Thank you very much!

Robert

Attachments

### Re: Desk in a room - How to build geometry working with hexahedral mesh?

Posted by William Tougeron at January 17. 2013

Hello Robert,

A quick hint would be to do like this:

• 1- Create a "box" having the size of your room.
• 2- Create all the planes visible in red in the enclosed picture (the planes can be bigger than the box limits).
• 3- Partition your box with all the planes, using Operations -> Partition. (Put the box in the Objects field, and all the planes in the Tool Objects field).

If you have problem during the partition, put all your planes in a compound object, then increase the "tolerance" of this compound with Repair -> Limit tolerance, then use the resulting object as the tool object.

• 4- Explode the partition to get back all the solids you want to put in your final domain. (Thanks to New Entity -> Explode.)
• 5- Put all the solid in a new compound.
• 6- "Glue" the faces between each solid of your final compound thanks to Repair -> Glue Faces (you may need to increase the tolerance inside the dialogue box).

Like this you should have a geometrical object that is suitable for hexahedron meshing

Best regards,

William

Attachments

### Re: Desk in a room - How to build geometry working with hexahedral mesh?

Posted by Robert Scholz at January 17. 2013

Hello William,

I'll try this. Thanks for the quick reply!

Best regards,

Robert

### Re: Desk in a room - How to build geometry working with hexahedral mesh?

Posted by Robert Scholz at January 17. 2013

Didn't work. Conversion into OpenFoam format is aborted due to "Assertion `nouveau > -1' failed.

Somehow the groups don't work - the walls are set to patch but the desk and the inlet are set to faceZone, although they should be patches, too.

### Re: Desk in a room - How to build geometry working with hexahedral mesh?

Posted by William Tougeron at January 17. 2013

Hello Robert,

I never met such error...

Is it possible to enclose the dump of your study? ([Ctrl] + [D])

Thank you very much!

William

### Re: Desk in a room - How to build geometry working with hexahedral mesh?

Posted by Robert Scholz at January 17. 2013

Hallo William,

I've attached the dump as a .rar. Thanks for your help.

Best regards,

Robert

Attachments

### Re: Desk in a room - How to build geometry working with hexahedral mesh?

Posted by Robert Scholz at January 17. 2013

Sorry, wrong dump! Here is the right one.

Attachments

### Re: Desk in a room - How to build geometry working with hexahedral mesh?

Posted by William Tougeron at January 17. 2013

Hello Robert,

I don't see your mesh in your dump study, but I can see two problems in your geometry:

- First, since I suppose the table shouldn't be present in the computational domain, you should remove the solids which are "inside" it before creating your final compound. (A bit as if you did a boolean Cut, but only by putting in the final compound solids being outside the table.)

- Second, the "desk" group is not properly defined: The faces are not adjacent (see the screenshot).

Here is a way to do all of this in the GUI without pain:

1- After exploding your partition into solids, hide everything excepted these solids.

2- Then, hide all the solids which are outside the table. Using selection boxes it is very quick to do in the 3D window. Please, notice that to select a solid with a selection box in Salome, you just have to select one of its faces.

3- When you see only your table, put all the visible solids in a compound. You can call this compound "table" for example.

4- Then, show again all the solids you exploded: outside and inside the table.

5- You can now expand the "table" node in the tree. You can see in red the list of all the solids inside the table. Select them all and select "Hide".

6- You can then select all your visible solids and create your final compound.

Now, to create the "desk" group:

7- When you see the "Create Group" dialogue box, click on "Only Sub-shape of the Second Shape". Then, put in the "Second Shape" field your "table" compound. Like this you will only see in the 3D window the elements lying at the surface of the table.

After, when your mesh is ready, you should click on your mesh in the tree and select "Create Groups from Geometry", then select in the tree your three groups ("desk", "wall", "inlet"). But maybe you knew this already...

Hope this time it will work!

Best regards,

William

Attachments

### Re: Desk in a room - How to build geometry working with hexahedral mesh?

Posted by William Tougeron at January 17. 2013

Yes, and you can also make multi-selections in the 3D Windows by holding the [Shift] key. (Instead of the [Ctrl] key in the study tree.)

For example, to hide everything under the table excepted its legs, select all the blocks under the table, then hold [Shift] and select only the legs.

This is easier to do in shading mode: Select all the objects in the 3D window -> right-click -> Display Mode -> Shading with Edges

Hope this helps

William

### Re: Desk in a room - How to build geometry working with hexahedral mesh?

Posted by Robert Scholz at January 18. 2013

Hey William,

it worked. Thank you so much, you really saved my weekend. I'm going to try this with a car in a garage now.

I think I understood the general process now - thanks to you.

Best regards,

Robert

### Re: Desk in a room - How to build geometry working with hexahedral mesh?

Posted by Naresh Yathuru at March 04. 2015

Hi,

First of all thanks william for a detailed explanation. And thanks robert for starting this thread.

I have a similar problem. i m looking for any kind of help u can offer. I m new to salome. in my case i have to model a room with a box inside this room. the room has a inlet on one side and outlet on another side.I followed your footprits and I created compunds and groups and exported individual stl to snappy hex mesh for meshing. But it says the geometry is not closed.  I could find where i could have gone wrong.

2. when i opened the stl file there are values like 2.3454e-16 and so. why is this happening?

3. the stl files do not save the name of the individual solid.

With regards,

Naresh

### Re: Desk in a room - How to build geometry working with hexahedral mesh?

Posted by Saint Michael at March 05. 2015

Hi Naresh

Can you share your STL file to check?

3. the stl files do not save the name of the individual solid.

This feature is not supported by SALOME. To get a file with several solids you can export every solid to a separate file, modify a file to set a correct solid name and then concatenate all files into one.

St.Michael