##### Personal tools
You are here: Home Use Re: Salome fails with complex geometry

# Re: Salome fails with complex geometry

Up to Use

### Re: Salome fails with complex geometry

Posted by Francesco at October 03. 2012

hello,

i have to simulate the flow over an open structure made by kelvin cell. I think i need a long domain and i would like to use

about 5*5*10 cells ( each cell made by 36 cylinders).  I use a .py script that works fine  if i do not use cut fuse or common operation.

Thus i am able to have the 3D structure by creating a single cell, making of it a compound and  by a series of translations and compound operation i obtain the final structure.

However, my understanding is that to build the grid i have to subtract this compound structure from the box of the domain. If i try to do that SALOME STALLED, or very very slow, and after 1 hour i still do not have the final volume.

The same happens if i try to fuse all the cylinders together instead of making the compound.

Does anybody see a mistake in my procedure? can you suggest a better procedure? or Salome is simply not powerful enough for such a case?

I was also wondering if anyone has a suggestion on how to build the grid around such a complex shape? For example is it possible to build a grid only on the outside of a volume not on the inside? so i avoid to do this expensive cut, common and fuse operations..

best regards and thankyou for any help...

francesco

### Re: Salome fails with complex geometry

Posted by Saint Michael at October 03. 2012

Previously Francesco wrote:

I was also wondering if anyone has a suggestion on how to build the grid around such a complex shape? For example is it possible to build a grid only on the outside of a volume not on the inside? so i avoid to do this expensive cut, common and fuse operations..

Hi Francesco

This is a wonderful supposition. You can go this way if the cylinders of compound do not touch one another. See the attached sample script, it creates a solid of shells of a domain (box) and 5 cylinders without use of boolean operations.

St.Michael

Attachments

### Re: Salome fails with complex geometry

Posted by Francesco at October 03. 2012

Thank You Saint Michael,

unfortunately the cylinders intersect in the corners of the cells. Attached there is a picture of a small version of the structure that i want to build.

Seems weird to me that  i am not able  to obtain the actual volume of the domain starting from the compound of this structures...

Do you have any idea on what i may do wrong? my operations are

a) create vertixes of a single kelvin cell

b) create the vertors of all the edges of a single kelvin cell

c) create a cylinder for each edge of a single kelving cell

d) make the compound of a single kelvin cell ( compound of the cylinders in c)

e) copy end translate the compound of a single kelvin cell

f) create the compound made of a line of kelvin cells

g) copy and translate the compound of the row of kelvin cells

h) create the compound made of a plane of kelvin cells

i) copy and translate the compound of the plane of kelvin cells

l) create the final compound.

Up to now it works.

then if i create a box and try to subtract the compound The salome' stalls...

Any IDEA ?

thank you

francesco

Attachments

### Re: Salome fails with complex geometry

Posted by Saint Michael at October 03. 2012

No wander that you can't get the result hence there are more that 9000 boolean operations to perform. Could you attach a BREP file of one kelvin cell that I could experiment with it?

St.Michael

### Re: Salome fails with complex geometry

Posted by Francesco at October 03. 2012

Hi,

I was aware of the operations that i am performing, for that reasons i was asking for a better procedure..

I have attached the .py file. (is it enough for you?)

.  the boolean operations are only at the end...

Thank you a lot for the time you want to put on this

francesco

Attachments

### Re: Salome fails with complex geometry

Posted by Saint Michael at October 03. 2012

The script is fine. But I doubt I implement the solution I have in mind very soon, there is some work to do (every day . So I'd like to share my vision so that you could try it by your-self.

The main idea is that you proposed initially (realization is in solid_from_shells.py). So, we need a shell composed of outer faces of KelvinCellFoam, as if we had fused all cylinders together.

I noted that KelvinCellFoam looks like a mesh, at most of nodes of which 4 cylinders meet, and only 3 cylinders meet at boundary. Hence we can compose a kernel part of KelvinCellFoam of parts consisting of faces of 4 half-cylinders meeting at a "node", and accomplish our shell with faces of 3 half-cylinders parts. Then we get a final shape by creating a solid of following shells: a shell of the domain and a shell created from all faces of 4- and 3-horn parts.

How to get outer faces of 4 fused half-cylinders (solid), i.e. how to get rid off disk faces at cross sections of cylinders. For this, geompy.GetInPlace() should be used with the 1st arg = the solid and the 2nd arg = a compound of all faces of the 4 cylinders.

Hope, I'm clear enough.

St.Michael

### Re: Salome fails with complex geometry

Posted by Francesco at October 04. 2012

Hi Saint Michael,

Not sure sure if i understand what you are suggesting, and i am not really used to the concept of shells. But it seems to me that the following will help.

The Kelving cell foam can be built starting from a Kernell  that share only surfaces but not volumes. Basically  by intersecting the single KelvingCell with a cube  (see attached .py)  you create a cell with half cylinder at the boundaries. Then to build the Foam these boundaries of the cell will touch but not intersect. I didn't go this way originally because i may need to extract also the surface of the kelvin cell and i am not sure how SALOME would handle the shared surfaces.  Hope that this is helping

attachment:

KelvinCell_structure_cube is the modified script for the full KelvinCellFoam (here i have commented the final fuse and cut operations that give problems ... ) . The object  KelvinCell is the kernell mentioned before.

Thank you a lot for your help...

francesco

Attachments

### Re: Salome fails with complex geometry

Posted by Saint Michael at October 04. 2012

Hi Francesco

I also thought of similar approach, now I don't remember exactly why I rejected it, probably I did not wanted to fuse many cylinders and create many cutting tools for each side of Kelvin cell. A drawback of my approach is that many differently oriented small parts are necessary.

St.Michael

### Re: Salome fails with complex geometry

Posted by Francesco at October 05. 2012

Hi

i have not understood what geompy.GetInPlace() does and how to use it.

Now i have 2 shells (or a series of Shells) that share a face. How to remove the shared 'faces'  and keep only the outer shell?

another problem tha i foreseen is to close a shell. for example if i have a closed shell and i cut it i obtain a 'open' shell is there a way to close it again?

thank you

francesco

### Re: Salome fails with complex geometry

Posted by Saint Michael at October 05. 2012

Hi Francesco

Here is a simple script demonstration the idea. The code is commented.

St.Michael

Attachments

### Re: Salome fails with complex geometry

Posted by Francesco at October 08. 2012

Hi St.Michael,

Thank you a lot for the script. i try to find ways and ideas to implement this for my case.

but i have a "theoretical" question. with this method the total operations is clearly increased compared to simply work with solids.

Is this better because boolean operations between shells are much cheaper than those with solids? Why? Is salome selecting point by point the result thus a volume is more expensive than a surface? ...

thank you a lot

francesco

### Re: Salome fails with complex geometry

Posted by Saint Michael at October 08. 2012

Hi Francesco

This way is better because it allows minimizing a number of boolean operations performed, as they are used to create only one cell. After that, boolean operations are not used at all. When we create a solid from shells, no boolean operation is used, shells are used as is.

St.Michael

### Re: Salome fails with complex geometry

Posted by pierre_j at November 19. 2012

Hi Francesco,

I am far from being an expert, but looking at the picture you enclosed earlier, it seems that a pattern is reproduced to create the cells you mentionned.

Would I be you, instead of reproducing this pattern with copy/symmetry, etc... in GEOM module, I would only draw a single pattern, then mesh it intelligently so that the mesh can be copied, and so on...

In short I would rather work on the mesh once it has been created by copy, than on the geometry: this would result in smaller work on GEOM and meshing for Salome.

Is such an approach relevant?

Bests,

Pierre

### Re: Salome fails with complex geometry

Posted by Francesco at November 20. 2012

Thank you,

If i well understand you suggest me to create the mesh( of a single cell, and then copy and paste the that mesh. I did not taught of that when i was working with the regular mesh.  Interesting approach. Unfortunately the regular mesh is a simplified geometry, my final geometry is something like the one attached here, so the random nature of this structure prevent me to use your approach, and suggest me that there are no alternative to place each cylinder at the time.

thank you a lot for the good idea...

francesco

Attachments

### Re: Salome fails with complex geometry

Posted by Francesco at November 20. 2012

Thank you,

If i well understand you suggest me to create the mesh( of a single cell, and then copy and paste the that mesh. I did not taught of that when i was working with the regular mesh.  Interesting approach. Unfortunately the regular mesh is a simplified geometry, my final geometry is something like the one attached here, so the random nature of this structure prevent me to use your approach, and suggest me that there are no alternative to place each cylinder at the time.

thank you a lot for the good idea...

francesco

Attachments

### Re: Salome fails with complex geometry

Posted by pierre_j at November 20. 2012

Waoh!

How will you generate it in GEOM?

Bests,

Pierre

### Re: Salome fails with complex geometry

Posted by Francesco at November 20. 2012

I have built a fortran code that dump a python script... which basically define all the vertexes and then based on the vertexes places one by one each cylinders... yes i know it is a long script ...

Best,

Francesco