# A negative entity-index

**URL:** <https://calculix.discourse.group/t/a-negative-entity-index/652>\
**Category:** Uncategorized\
**Created:** [June 29, 2021, 11:41am UTC](https://calculix.discourse.group/t/a-negative-entity-index/652 "2021-06-29T11:41:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![FredXG](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@FredXG](https://calculix.discourse.group/u/FredXG)\
**Post date:** [June 29, 2021, 11:41am UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/1 "2021-06-29T11:41:57Z")

</div>

Hello Everyone,

I want to visualize my inp. file via “Run CGX Preprocessor mode”. However, there were errors like following:  
_ **ERROR in seta: A negative entity-index:-1 was used in set C\_Disc\_Rim\_03\_M** _

There are two parts in my inp. file, one is solid section for C3D10 elements and one is membrane section for M3D4 for the solid surface. Some selected element surfaces of solid elements are included as well in the inp. file.

When only the solid elements, solid section and selected element surfaces are imported, no such error occurs. When only the membrane section and elements are imported, no such error occurs also.  
However, when they are imported together, errors like shown occur.

Does anyone know the possible reasons and ways to fix this? Thanks a lot! inp. file is attached:  
[https://www.dropbox.com/s/cbbxmrcxiwifu9l/A\_Disc.inp?dl=0](https://www.dropbox.com/s/cbbxmrcxiwifu9l/A_Disc.inp?dl=0)

---

<div class="post-metadata">

**Author:** ![dichtstoff](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@dichtstoff](https://calculix.discourse.group/u/dichtstoff)\
**Post date:** [June 29, 2021, 12:12pm UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/2 "2021-06-29T12:12:08Z")

</div>

Hello,  
i don’t have access to your dropbox in the moment,  
but maybe you have an intersection with two elments or something like these.  
sometimes it helps to use a different version of cgx / ccx for better error.  
you can also import both parts with cgx,  
read part\_1.inp  
read part\_2.inp add  
wbr

[Advanced CalculiX Tutorial | Libre Mechanics](https://www.libremechanics.com/?q=node/23)

---

<div class="post-metadata">

**Author:** ![FredXG](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@FredXG](https://calculix.discourse.group/u/FredXG)\
**Post date:** [June 29, 2021, 1:07pm UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/3 "2021-06-29T13:07:29Z")

</div>

Thanks a lot for your suggestion Dichtstoff,  
Maybe because the nodes of membrane elements are equivalenced to nodes of surface an solid elements? Here I have a question about the nodes equivalence, is this recognized in calculix or not?  
(I´m fresh about Calculix, so this question may bit stupid 😓)  
I did tried with different version, but it does not works.  
I tried to include two parts into one inp. file, is that waht you mean? I found membrane elements may be the main cause.

---

<div class="post-metadata">

**Author:** ![dichtstoff](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@dichtstoff](https://calculix.discourse.group/u/dichtstoff)\
**Post date:** [June 29, 2021, 4:23pm UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/6 "2021-06-29T16:23:23Z")

</div>

you can print se,  
than you see, that your sets are empty:  
prnt se  
1 all stat:o n:69060 e:81852 f:1296 p:0 l:0 c:0 s:0 b:0 L:0 S:0 se:0 sh:0 v:0  
3 DiscSkinSurf stat:c n:0 e:27252 f:0 p:0 l:0 c:0 s:0 b:0 L:0 S:0 se:0 sh:0 v:0  
4 +M3D4 stat:c n:0 e:27252 f:0 p:0 l:0 c:0 s:0 b:0 L:0 S:0 se:0 sh:0 v:0  
5 DISC stat:c n:0 e:54600 f:0 p:0 l:0 c:0 s:0 b:0 L:0 S:0 se:0 sh:0 v:0  
6 +C3D8 stat:c n:0 e:54600 f:0 p:0 l:0 c:0 s:0 b:0 L:0 S:0 se:0 sh:0 v:0  
7 T\_Disc\_Weld\_01\_M stat:c n:0 e:0 f:648 p:0 l:0 c:0 s:0 b:0 L:0 S:0 se:0 sh:0 v:0  
8 C\_Disc\_Rim\_03\_M stat:c n:0 e:0 f:0 p:0 l:0 c:0 s:0 b:0 L:0 S:0 se:0 sh:0 v:0  
9 C\_Disc\_Bolt\_04\_S stat:c n:0 e:0 f:0 p:0 l:0 c:0 s:0 b:0 L:0 S:0 se:0 sh:0 v:0  
10 C\_Disc\_Hub\_05\_S stat:c n:0 e:0 f:0 p:0 l:0 c:0 s:0 b:0 L:0 S:0 se:0 sh:0 v:0  
11 +cont2 stat:c n:0 e:0 f:0 p:0 l:0 c:0 s:0 b:0 L:0 S:0 se:0 sh:0 v:0  
12 +cont1 stat:c n:0 e:0 f:0 p:0 l:0 c:0 s:0 b:0 L:0 S:0 se:0 sh:0 v:0

7 T\_Disc\_Weld\_01\_M stat:c n:0 e:0 f:648 p:0 l:0 c:0 s:0 b:0 L:0 S:0 se:0 sh:0 v:0  
f=faces

wbr

---

<div class="post-metadata">

**Author:** ![FredXG](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@FredXG](https://calculix.discourse.group/u/FredXG)\
**Post date:** [July 1, 2021, 12:21pm UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/7 "2021-07-01T12:21:35Z")

</div>

Hello Dichtstoff,

I simplified this disc firstly without any skin surf and want to go further with my model.  
I met another question, however, at pre-tension section, since I want to apply bolt pre-tension force.  
elset \_Surf\_Bolt\_01\_S2 is defined successfully, but the surface Surf\_Bolt\_01 used for pre-tension section was missing (_Surf\_Bolt\_01 stat:c n:0 e:0 f:0 p:0 l:0 s:0 b:0 L:0 S:0 se:0 sh:0 v:0_)

\*Elset, elset=\_Surf\_Bolt\_01\_S2, generate  
245374, 245652, 2  
\*Surface, type=ELEMENT, name=Surf\_Bolt\_01  
\_Surf\_Bolt\_01\_S2, S2  
\*Pre-tension Section, surface=Surf\_Bolt\_01, node=283534

in cgx2.10 the error showed " ERROR in set:Surf\_Bolt\_01, face:2 of element:245374 does not exist."  
I tired with S1 to S6 one by one, the error was the same like Face:1…6 does not exist.

in cgx2.16 the error showed " ERROR in seta: A negative entity-index:-1 was used in set Surf\_Bolt\_01"

Do you have any idea about this? Thanks a lot ![inp. file](https://www.dropbox.com/s/2a01mt7bp9jruqh/8mmDisc_v1.inp?dl=0)

---

<div class="post-metadata">

**Author:** ![FredXG](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@FredXG](https://calculix.discourse.group/u/FredXG)\
**Post date:** [July 1, 2021, 12:22pm UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/8 "2021-07-01T12:22:22Z")

</div>

[https://www.dropbox.com/s/2a01mt7bp9jruqh/8mmDisc\_v1.inp?dl=0](https://www.dropbox.com/s/2a01mt7bp9jruqh/8mmDisc_v1.inp?dl=0)

---

<div class="post-metadata">

**Author:** ![dichtstoff](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@dichtstoff](https://calculix.discourse.group/u/dichtstoff)\
**Post date:** [July 1, 2021, 4:07pm UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/9 "2021-07-01T16:07:09Z")

</div>

hello,

you use the command:  
comp \_Surf\_Bolt\_01\_S2 d  
prnt se  
\_Surf\_Bolt\_01\_S2 stat:c n:322 e:140 f:40 p:0 l:0 c:0 s:0 b:0 L:0 S:0 se:0 sh:0 v:0  
plot e \_Surf\_Bolt\_01\_S2  
plus f \_Surf\_Bolt\_01\_S2  
send \_Surf\_Bolt\_01\_S2 abq sur

\*\* Surfaces based on \_Surf\_Bolt\_01\_S2  
\*SURFACE, NAME=S\_Surf\_Bolt\_01\_S2  
245496, S6  
245498, S3  
245390, S3  
245460, S6  
245450, S3  
245448, S6  
245512, S3  
245510, S6  
245650, S5  
245502, S3  
245384, S6  
245406, S6  
245440, S3  
245418, S6  
245420, S3  
245464, S6  
245392, S3  
245410, S6  
245412, S3  
245382, S6  
245434, S3  
245574, S4  
245636, S5  
245638, S4  
245530, S4  
245600, S5  
245590, S4  
245588, S5  
245652, S4  
245642, S4  
245524, S5  
245546, S5  
245580, S4  
245558, S5  
245560, S4  
245604, S5  
245532, S4  
245550, S5  
245552, S4  
245522, S5

 ![image](https://global.discourse-cdn.com/free1/uploads/calculix/original/1X/3b987fd80d13ab9232cae9d601e49ed36ecbd972.png)

---

<div class="post-metadata">

**Author:** ![FredXG](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@FredXG](https://calculix.discourse.group/u/FredXG)\
**Post date:** [July 2, 2021, 10:20am UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/11 "2021-07-02T10:20:31Z")

</div>

Hello Dichtstoff,

Thanks a lot for your help.  
After using comb to include all entities of \_Surf\_Bolt\_01\_S2, why there are only faces in colour yellow (colour showed in your picture) captured? In fact, the surface I need for bolt pre-tension is one of the upper or bottom faces in colour green. However, they are not captured by using comb.

Is there any way to capture one of these surfaces? I´m thinking maybe through nodes on these surfaces?

Thanks a lot.

---

<div class="post-metadata">

**Author:** ![dichtstoff](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@dichtstoff](https://calculix.discourse.group/u/dichtstoff)\
**Post date:** [July 2, 2021, 12:57pm UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/12 "2021-07-02T12:57:58Z")

</div>

hello,

you can only capture, what is in the set,  
or is connected to parts from the set.

you have no geometry information like lines, areas or bodies.

so your set has 140 elements, so you can collect all nodes and surfaces (if they have)  
belonging to 140 the elements. where is the connection to the other elements?

you can catch the surfaces through nodes,  
these is perfect way.  
through nodes, you can catch elements and surfaces.

maybe you can define your sets while creating and export your mesh!?

a good command for working is the enq command:

enq surface sbound\_02 rec \_ \_ 6000

it needs some time, but very powerful and helpful command.  
it always helpful, to teste with a simple case.

i can share an simple example for study

wbr

---

<div class="post-metadata">

**Author:** ![FredXG](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@FredXG](https://calculix.discourse.group/u/FredXG)\
**Post date:** [July 5, 2021, 3:22pm UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/13 "2021-07-05T15:22:03Z")

</div>

Firstly, thanks a lot for you tips.

I´ve tried to capture the element surface through its connected nodes, but it doesn´t work like what I expected. No element surface could be gotten vis this way.  
Since the element surface which I want is a common surface of upper and lower elements, maybe it´s not recognized like this way in calculix or not?

Actually this element surface is already defined in Hypermesh and also could be read in abaqus. But when it´s run in calculix, this section is not recognized. Therefore I´m trying to find a way whether I can generate this element surface directly in calculix.

---

<div class="post-metadata">

**Author:** ![SergioP](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/sergiop/32/10_2.png) [@SergioP](https://calculix.discourse.group/u/SergioP)\
**Post date:** [July 5, 2021, 6:59pm UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/14 "2021-07-05T18:59:57Z")

</div>

What I have done in the past is divide every bolt in two parts, so then they have the preload surfaces exposed. I have opened the ring assy with Mecway and found that the bolts and center are in the same part, they could be modeled as separated parts and glued by TIE. I suggest you to use Prepomax (the preload card is nicely implemented, and even there is a video on Youtube on how to use it) or Mecway for preparing your model. By the way, what a nice mesh of the ring assembly, I miss my days meshing with Abaqus CAE or NX. Regards

---

<div class="post-metadata">

**Author:** ![FredXG](https://avatars.discourse-cdn.com/v4/letter/f/3d9bf3/32.png) [@FredXG](https://calculix.discourse.group/u/FredXG)\
**Post date:** [July 6, 2021, 3:32pm UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/15 "2021-07-06T15:32:25Z")

</div>

Thanks a lot for this tips. I will try this way later.  
Best wishes:)

---

<div class="post-metadata">

**Author:** ![dichtstoff](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@dichtstoff](https://calculix.discourse.group/u/dichtstoff)\
**Post date:** [July 11, 2021, 8:18pm UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/16 "2021-07-11T20:18:07Z")

</div>

you can add sets for your elements:  
\*Element,ELSET=001,type=C3D8  
you have now no sets:  
\*Element, type=C3D8

than you can work with your sets, these makes it much easier to work with it  
by hand with collecting with qadd command or enq! command

and so you can make the mesh with screws and give them a own set

 ![image](https://global.discourse-cdn.com/free1/uploads/calculix/original/1X/68bde3ee0e40da2628b7715c0d3f8bf00a6aba97.png)

how you get your mesh in calculix?

 ![image](https://global.discourse-cdn.com/free1/uploads/calculix/original/1X/016672d90b5fc6365e7b3952c5a939486e93332b.png)

surface collected by hand with qadd command  
with plot surface from set element 004

283532, 2.41805029, 5.98792982, 107.384567  
\*Element,ELSET=004,type=C3D8  
206453, 227331, 227385, 227333, 227319, 227492, 227546, 227494, 227480

---

<div class="post-metadata">

**Author:** ![dichtstoff](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@dichtstoff](https://calculix.discourse.group/u/dichtstoff)\
**Post date:** [July 11, 2021, 8:24pm UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/17 "2021-07-11T20:24:26Z")

</div>

I’m jealous of your mesh.  
At first i was thinking, you did by hand (with cgx).  
I know only gmesh for creating mesh with hexahedral elements with freeware!?

wbr

---

<div class="post-metadata">

**Author:** ![SergioP](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/sergiop/32/10_2.png) [@SergioP](https://calculix.discourse.group/u/SergioP)\
**Post date:** [July 12, 2021, 11:53am UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/18 "2021-07-12T11:53:06Z")

</div>

@dichtstoff , you can made hexamesh with Salome, if you made enough partitions on the geometrý could achieve 100% hexas, or maybe about 95% of hexas plus some wedges for free meshes. This particular assembly is very well suited for meshing it in Salome.

---

<div class="post-metadata">

**Author:** ![dichtstoff](https://avatars.discourse-cdn.com/v4/letter/d/dec6dc/32.png) [@dichtstoff](https://calculix.discourse.group/u/dichtstoff)\
**Post date:** [July 12, 2021, 5:08pm UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/19 "2021-07-12T17:08:45Z")

</div>

Hello SergioP,

i have tried it Salome, but it was maybe a bit to complicated to have a quick result.  
So i thought, i use the time for making my mesh with cgx.  
But i 'll check it out next time again. Sometimes you need several attempts.  
wbr

---

<div class="post-metadata">

**Author:** ![SergioP](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/sergiop/32/10_2.png) [@SergioP](https://calculix.discourse.group/u/SergioP)\
**Post date:** [July 12, 2021, 8:39pm UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/20 "2021-07-12T20:39:32Z")

</div>

Yeah, Salome can be a little weird at the begingin, the same as Paraview, but they are very powerfull tools.

---

<div class="post-metadata">

**Author:** ![COCO](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@COCO](https://calculix.discourse.group/u/COCO)\
**Post date:** [June 29, 2022, 12:56pm UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/21 "2022-06-29T12:56:51Z")

</div>

Hello, SergioP.  
Could I ask some questions about Salome and Calculix?  
I generate the .unv file and converter it into .inp file by unical3 according to these videos (linke:[Creating Fluid and Solid Geometries in Salome - YouTube](https://www.youtube.com/watch?v=tmSnN3vgbNs)). But there is no data in inlet.nam and outlet.nam after I send inlet/outlet abq nam by using cgx. And there is an error “ERROR in seta: A negative entity-index:-1 was used in set soutlet " after I input the command " cgx -c solidShell.inp”. I am a freshman in Salome and Calculix. So I don’t know why and want to search for your help.

---

<div class="post-metadata">

**Author:** ![SergioP](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/sergiop/32/10_2.png) [@SergioP](https://calculix.discourse.group/u/SergioP)\
**Post date:** [June 29, 2022, 1:26pm UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/22 "2022-06-29T13:26:10Z")

</div>

Hi Coco,

If you use Salome/Unical for meshing, the easier way for creating groups of nodes/faces/elements is create those groups in Salome before exporting the mesh, and avoid the use of CGX and multiple files for the mesh, only one file for the mesh, and maybe another one for the boundary conditions using \*INCLUDE, or just write it in the same mesh file, at the end.

Regards

---

<div class="post-metadata">

**Author:** ![COCO](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@COCO](https://calculix.discourse.group/u/COCO)\
**Post date:** [June 30, 2022, 7:55am UTC](https://calculix.discourse.group/t/a-negative-entity-index/652/23 "2022-06-30T07:55:38Z")

</div>

Hi SergioP,

Thanks for your reply. I check my .inp file converted from .unv file and find that there is no data about \*NSET, NSET=Ninlet. I think it is the main reason. So I’d like to know which operation will lead to the absence of these data.

Best regards

[Next page](https://calculix.discourse.group/t/a-negative-entity-index/652.md?page=2)
