# \*Model Change with elements that are part of a contact

**URL:** <https://calculix.discourse.group/t/model-change-with-elements-that-are-part-of-a-contact/1878>\
**Category:** Uncategorized\
**Created:** [October 17, 2023, 9:09am UTC](https://calculix.discourse.group/t/model-change-with-elements-that-are-part-of-a-contact/1878 "2023-10-17T09:09:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![febing](https://avatars.discourse-cdn.com/v4/letter/f/c89c15/32.png) [@febing](https://calculix.discourse.group/u/febing)\
**Post date:** [October 17, 2023, 9:09am UTC](https://calculix.discourse.group/t/model-change-with-elements-that-are-part-of-a-contact/1878/1 "2023-10-17T09:09:47Z")

</div>

Hello,  
is it posibble to remove/add elements with \*Model Change, that have surfaces that are part in a contact definition?  
When i do that, calculix seems to crash.  
😭

---

<div class="post-metadata">

**Author:** ![Calc\_em](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Calc\_em](https://calculix.discourse.group/u/Calc_em)\
**Post date:** [October 17, 2023, 11:30am UTC](https://calculix.discourse.group/t/model-change-with-elements-that-are-part-of-a-contact/1878/2 "2023-10-17T11:30:36Z")

</div>

Try this (from Abaqus documentation):

> If elements that are connected to a contact pair are removed, the contact pair should also be removed to avoid solver problems.

---

<div class="post-metadata">

**Author:** ![febing](https://avatars.discourse-cdn.com/v4/letter/f/c89c15/32.png) [@febing](https://calculix.discourse.group/u/febing)\
**Post date:** [October 17, 2023, 11:53am UTC](https://calculix.discourse.group/t/model-change-with-elements-that-are-part-of-a-contact/1878/3 "2023-10-17T11:53:15Z")

</div>

Hello Calc\_em,

i tried this. I removed the contact, befor i removed the element set.  
But calculix does not like it either.

---

<div class="post-metadata">

**Author:** ![Calc\_em](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Calc\_em](https://calculix.discourse.group/u/Calc_em)\
**Post date:** [October 18, 2023, 7:46am UTC](https://calculix.discourse.group/t/model-change-with-elements-that-are-part-of-a-contact/1878/4 "2023-10-18T07:46:30Z")

</div>

Try testing this on a simplified model (reduced as much as possible - to just a few elements) and share it here.

---

<div class="post-metadata">

**Author:** ![febing](https://avatars.discourse-cdn.com/v4/letter/f/c89c15/32.png) [@febing](https://calculix.discourse.group/u/febing)\
**Post date:** [October 18, 2023, 8:11pm UTC](https://calculix.discourse.group/t/model-change-with-elements-that-are-part-of-a-contact/1878/5 "2023-10-18T20:11:25Z")

</div>

Here is a sample input:

\*\* Heading +++++++++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*Heading  
Hash: LsCkcVm2, Date: 10/18/2023, Unit system: MM\_TON\_S\_C  
\*\*  
\*\* Nodes +++++++++++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*Node  
1, 0.00000000E+000, 0.00000000E+000, 1.00000000E+001  
2, 0.00000000E+000, 0.00000000E+000, 2.00000000E+001  
3, 0.00000000E+000, 1.00000000E+001, 1.00000000E+001  
4, 0.00000000E+000, 1.00000000E+001, 2.00000000E+001  
5, 1.00000000E+001, 0.00000000E+000, 1.00000000E+001  
6, 1.00000000E+001, 0.00000000E+000, 2.00000000E+001  
7, 1.00000000E+001, 1.00000000E+001, 1.00000000E+001  
8, 1.00000000E+001, 1.00000000E+001, 2.00000000E+001  
9, 0.00000000E+000, 0.00000000E+000, 1.50000000E+001  
10, 0.00000000E+000, 5.00000000E+000, 2.00000000E+001  
11, 0.00000000E+000, 5.00000000E+000, 1.50000000E+001  
12, 0.00000000E+000, 5.00000000E+000, 1.00000000E+001  
13, 0.00000000E+000, 1.00000000E+001, 1.50000000E+001  
14, 1.00000000E+001, 0.00000000E+000, 1.50000000E+001  
15, 1.00000000E+001, 5.00000000E+000, 1.00000000E+001  
16, 1.00000000E+001, 5.00000000E+000, 1.50000000E+001  
17, 1.00000000E+001, 1.00000000E+001, 1.50000000E+001  
18, 1.00000000E+001, 5.00000000E+000, 2.00000000E+001  
19, 5.00000000E+000, 0.00000000E+000, 1.00000000E+001  
20, 5.00000000E+000, 0.00000000E+000, 1.50000000E+001  
21, 5.00000000E+000, 0.00000000E+000, 2.00000000E+001  
22, 5.00000000E+000, 1.00000000E+001, 1.00000000E+001  
23, 5.00000000E+000, 1.00000000E+001, 1.50000000E+001  
24, 5.00000000E+000, 1.00000000E+001, 2.00000000E+001  
25, 5.00000000E+000, 5.00000000E+000, 1.00000000E+001  
26, 5.00000000E+000, 5.00000000E+000, 2.00000000E+001  
27, 0.00000000E+000, 0.00000000E+000, 0.00000000E+000  
28, 0.00000000E+000, 0.00000000E+000, 1.00000000E+001  
29, 0.00000000E+000, 1.00000000E+001, 0.00000000E+000  
30, 0.00000000E+000, 1.00000000E+001, 1.00000000E+001  
31, 1.00000000E+001, 0.00000000E+000, 0.00000000E+000  
32, 1.00000000E+001, 0.00000000E+000, 1.00000000E+001  
33, 1.00000000E+001, 1.00000000E+001, 0.00000000E+000  
34, 1.00000000E+001, 1.00000000E+001, 1.00000000E+001  
35, 0.00000000E+000, 0.00000000E+000, 5.00000000E+000  
36, 0.00000000E+000, 5.00000000E+000, 1.00000000E+001  
37, 0.00000000E+000, 5.00000000E+000, 5.00000000E+000  
38, 0.00000000E+000, 5.00000000E+000, 0.00000000E+000  
39, 0.00000000E+000, 1.00000000E+001, 5.00000000E+000  
40, 1.00000000E+001, 0.00000000E+000, 5.00000000E+000  
41, 1.00000000E+001, 5.00000000E+000, 0.00000000E+000  
42, 1.00000000E+001, 5.00000000E+000, 5.00000000E+000  
43, 1.00000000E+001, 1.00000000E+001, 5.00000000E+000  
44, 1.00000000E+001, 5.00000000E+000, 1.00000000E+001  
45, 5.00000000E+000, 0.00000000E+000, 0.00000000E+000  
46, 5.00000000E+000, 0.00000000E+000, 5.00000000E+000  
47, 5.00000000E+000, 0.00000000E+000, 1.00000000E+001  
48, 5.00000000E+000, 1.00000000E+001, 0.00000000E+000  
49, 5.00000000E+000, 1.00000000E+001, 5.00000000E+000  
50, 5.00000000E+000, 1.00000000E+001, 1.00000000E+001  
51, 5.00000000E+000, 5.00000000E+000, 0.00000000E+000  
52, 5.00000000E+000, 5.00000000E+000, 1.00000000E+001  
\*\*  
\*\* Elements ++++++++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*Element, Type=C3D10, Elset=Solid\_part-1  
1, 4, 6, 7, 8, 26, 16, 23, 24, 18, 17  
2, 6, 4, 7, 1, 26, 23, 16, 20, 11, 25  
3, 7, 1, 4, 3, 25, 11, 23, 22, 12, 13  
4, 7, 1, 5, 6, 25, 19, 15, 16, 20, 14  
5, 2, 1, 4, 6, 9, 11, 10, 21, 20, 26  
\*Element, Type=C3D10, Elset=Solid\_part-2  
6, 30, 32, 33, 34, 52, 42, 49, 50, 44, 43  
7, 32, 30, 33, 27, 52, 49, 42, 46, 37, 51  
8, 33, 27, 30, 29, 51, 37, 49, 48, 38, 39  
9, 33, 27, 31, 32, 51, 45, 41, 42, 46, 40  
10, 28, 27, 30, 32, 35, 37, 36, 47, 46, 52  
\*\*  
\*\* Node sets +++++++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*Nset, Nset=Internal-1\_master  
1, 3, 5, 7, 12, 15, 19, 22, 25  
\*Nset, Nset=Internal-1\_slave  
28, 30, 32, 34, 36, 44, 47, 50, 52  
\*Nset, Nset=Internal\_Selection-1\_Fixed-1  
27, 29, 31, 33, 38, 41, 45, 48, 51  
\*\*  
\*\* Element sets ++++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*Elset, Elset=Internal-1\_master\_S2  
3  
\*Elset, Elset=Internal-1\_master\_S1  
4  
\*Elset, Elset=Internal-1\_slave\_S2  
6  
\*Elset, Elset=Internal-1\_slave\_S4  
10  
\*Elset, Elset=Internal\_Selection-1\_Solid\_Section-1  
Solid\_part-1,  
Solid\_part-2  
\*Elset, Elset=Internal\_Selection-1\_Gravity-1  
Solid\_part-1,  
Solid\_part-2  
\*Elset, Elset=Set-1  
1, 2, 3, 4, 5  
\*\*  
\*\* Surfaces ++++++++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*Surface, Name=master, Type=Element  
Internal-1\_master\_S2, S2  
Internal-1\_master\_S1, S1  
\*Surface, Name=slave, Type=Element  
Internal-1\_slave\_S2, S2  
Internal-1\_slave\_S4, S4  
\*\*  
\*\* Physical constants ++++++++++++++++++++++++++++++++++++++  
\*\*  
\*\*  
\*\* Materials +++++++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*Material, Name=S235  
\*Density  
7.8E-09  
\*Elastic  
210000, 0.28  
\*Expansion, Zero=20  
1.1E-05  
\*Conductivity  
14  
\*Specific heat  
440000000  
\*\*  
\*\* Sections ++++++++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*Solid section, Elset=Internal\_Selection-1\_Solid\_Section-1, Material=S235  
\*\*  
\*\* Pre-tension sections ++++++++++++++++++++++++++++++++++++  
\*\*  
\*\*  
\*\* Constraints +++++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*\*  
\*\* Surface interactions ++++++++++++++++++++++++++++++++++++  
\*\*  
\*Surface interaction, Name=Surface\_Interaction-1  
\*Surface behavior, Pressure-overclosure=Hard  
\*Friction  
0.1  
\*\*  
\*\* Contact pairs +++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*Contact pair, Interaction=Surface\_Interaction-1, Type=Surface to surface  
slave, master  
\*\*  
\*\* Amplitudes ++++++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*\*  
\*\* Initial conditions ++++++++++++++++++++++++++++++++++++++  
\*\*  
\*\*  
\*\* Steps +++++++++++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*\*  
\*\* Step-1 ++++++++++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*Step, Inc=100  
\*Static  
1, 1, 1E-05, 1E+30  
\*\*  
\*\* Output frequency ++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*Output, Frequency=1  
\*\*  
\*\* Boundary conditions +++++++++++++++++++++++++++++++++++++  
\*\*  
\*Boundary, op=New  
\*\* Name: Fixed-1  
\*Boundary  
Internal\_Selection-1\_Fixed-1, 1, 6, 0  
\*\*  
\*\* Loads +++++++++++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*Cload, op=New  
\*Dload, op=New  
\*\* Name: Gravity-1  
\*Dload  
Internal\_Selection-1\_Gravity-1, Grav, 9810, 0, 0, -1  
\*\*  
\*\* Defined fields ++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*\*  
\*\* History outputs +++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*\*  
\*\* Field outputs +++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*Node file  
RF, U  
\*El file  
S, E  
\*Model Change, Type=Contact Pair, Remove  
master, slave  
\*Model Change, Type=Element, Remove  
Set-1  
\*\*  
\*\* End step ++++++++++++++++++++++++++++++++++++++++++++++++  
\*\*  
\*End step

---

<div class="post-metadata">

**Author:** ![BM\_PCC](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@BM\_PCC](https://calculix.discourse.group/u/BM_PCC)\
**Post date:** [January 22, 2024, 10:54am UTC](https://calculix.discourse.group/t/model-change-with-elements-that-are-part-of-a-contact/1878/6 "2024-01-22T10:54:05Z")

</div>

Hello,

The \*Model Change, Type=Contact Pair, Remove in Calculix inside the prepomax (windows) is not working.

I tried several times using different models, including the simplified model of @ [febing] but isn’t working.

The \*Model Change, Type=Element, Remove works fine, but not the Contact Pair. The simulation just ends without errors.

Anyone had the same problem?

Best Regards

---

<div class="post-metadata">

**Author:** ![Calc\_em](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Calc\_em](https://calculix.discourse.group/u/Calc_em)\
**Post date:** [January 22, 2024, 12:33pm UTC](https://calculix.discourse.group/t/model-change-with-elements-that-are-part-of-a-contact/1878/7 "2024-01-22T12:33:07Z")

</div>

The first thing is that the input above should be changed from:

> [@febing](#):
>
> \*Model Change, Type=Contact Pair, Remove  
> master, slave

to:

```auto
*Model Change, Type=Contact Pair, Remove
slave, master

```

Then it works in Abaqus but, for some reason, not in CalculiX.

Analysis with model change makes more sense when there are multiple steps so I propose something like this (again, works in Abaqus but not in CalculiX):

```auto
*Node
1, 0.00000000E+000, 0.00000000E+000, 1.00000000E+001
2, 0.00000000E+000, 0.00000000E+000, 2.00000000E+001
3, 0.00000000E+000, 1.00000000E+001, 1.00000000E+001
4, 0.00000000E+000, 1.00000000E+001, 2.00000000E+001
5, 1.00000000E+001, 0.00000000E+000, 1.00000000E+001
6, 1.00000000E+001, 0.00000000E+000, 2.00000000E+001
7, 1.00000000E+001, 1.00000000E+001, 1.00000000E+001
8, 1.00000000E+001, 1.00000000E+001, 2.00000000E+001
9, 0.00000000E+000, 0.00000000E+000, 1.50000000E+001
10, 0.00000000E+000, 5.00000000E+000, 2.00000000E+001
11, 0.00000000E+000, 5.00000000E+000, 1.50000000E+001
12, 0.00000000E+000, 5.00000000E+000, 1.00000000E+001
13, 0.00000000E+000, 1.00000000E+001, 1.50000000E+001
14, 1.00000000E+001, 0.00000000E+000, 1.50000000E+001
15, 1.00000000E+001, 5.00000000E+000, 1.00000000E+001
16, 1.00000000E+001, 5.00000000E+000, 1.50000000E+001
17, 1.00000000E+001, 1.00000000E+001, 1.50000000E+001
18, 1.00000000E+001, 5.00000000E+000, 2.00000000E+001
19, 5.00000000E+000, 0.00000000E+000, 1.00000000E+001
20, 5.00000000E+000, 0.00000000E+000, 1.50000000E+001
21, 5.00000000E+000, 0.00000000E+000, 2.00000000E+001
22, 5.00000000E+000, 1.00000000E+001, 1.00000000E+001
23, 5.00000000E+000, 1.00000000E+001, 1.50000000E+001
24, 5.00000000E+000, 1.00000000E+001, 2.00000000E+001
25, 5.00000000E+000, 5.00000000E+000, 1.00000000E+001
26, 5.00000000E+000, 5.00000000E+000, 2.00000000E+001
27, 0.00000000E+000, 0.00000000E+000, 0.00000000E+000
28, 0.00000000E+000, 0.00000000E+000, 1.00000000E+001
29, 0.00000000E+000, 1.00000000E+001, 0.00000000E+000
30, 0.00000000E+000, 1.00000000E+001, 1.00000000E+001
31, 1.00000000E+001, 0.00000000E+000, 0.00000000E+000
32, 1.00000000E+001, 0.00000000E+000, 1.00000000E+001
33, 1.00000000E+001, 1.00000000E+001, 0.00000000E+000
34, 1.00000000E+001, 1.00000000E+001, 1.00000000E+001
35, 0.00000000E+000, 0.00000000E+000, 5.00000000E+000
36, 0.00000000E+000, 5.00000000E+000, 1.00000000E+001
37, 0.00000000E+000, 5.00000000E+000, 5.00000000E+000
38, 0.00000000E+000, 5.00000000E+000, 0.00000000E+000
39, 0.00000000E+000, 1.00000000E+001, 5.00000000E+000
40, 1.00000000E+001, 0.00000000E+000, 5.00000000E+000
41, 1.00000000E+001, 5.00000000E+000, 0.00000000E+000
42, 1.00000000E+001, 5.00000000E+000, 5.00000000E+000
43, 1.00000000E+001, 1.00000000E+001, 5.00000000E+000
44, 1.00000000E+001, 5.00000000E+000, 1.00000000E+001
45, 5.00000000E+000, 0.00000000E+000, 0.00000000E+000
46, 5.00000000E+000, 0.00000000E+000, 5.00000000E+000
47, 5.00000000E+000, 0.00000000E+000, 1.00000000E+001
48, 5.00000000E+000, 1.00000000E+001, 0.00000000E+000
49, 5.00000000E+000, 1.00000000E+001, 5.00000000E+000
50, 5.00000000E+000, 1.00000000E+001, 1.00000000E+001
51, 5.00000000E+000, 5.00000000E+000, 0.00000000E+000
52, 5.00000000E+000, 5.00000000E+000, 1.00000000E+001
*Element, Type=C3D10, Elset=Solid_part-1
1, 4, 6, 7, 8, 26, 16, 23, 24, 18, 17
2, 6, 4, 7, 1, 26, 23, 16, 20, 11, 25
3, 7, 1, 4, 3, 25, 11, 23, 22, 12, 13
4, 7, 1, 5, 6, 25, 19, 15, 16, 20, 14
5, 2, 1, 4, 6, 9, 11, 10, 21, 20, 26
*Element, Type=C3D10, Elset=Solid_part-2
6, 30, 32, 33, 34, 52, 42, 49, 50, 44, 43
7, 32, 30, 33, 27, 52, 49, 42, 46, 37, 51
8, 33, 27, 30, 29, 51, 37, 49, 48, 38, 39
9, 33, 27, 31, 32, 51, 45, 41, 42, 46, 40
10, 28, 27, 30, 32, 35, 37, 36, 47, 46, 52
*Nset, Nset=Internal-1_master
1, 3, 5, 7, 12, 15, 19, 22, 25
*Nset, Nset=Internal-1_slave
28, 30, 32, 34, 36, 44, 47, 50, 52
*Nset, Nset=Internal_Selection-1_Fixed-1
27, 29, 31, 33, 38, 41, 45, 48, 51
*Elset, Elset=Internal-1_master_S2
3
*Elset, Elset=Internal-1_master_S1
4
*Elset, Elset=Internal-1_slave_S2
6
*Elset, Elset=Internal-1_slave_S4
10
*Elset, Elset=Internal_Selection-1_Solid_Section-1
Solid_part-1,
Solid_part-2
*Elset, Elset=Internal_Selection-1_Gravity-1
Solid_part-1,
Solid_part-2
*Elset, Elset=Set-1
1, 2, 3, 4, 5
*Surface, Name=master, Type=Element
Internal-1_master_S2, S2
Internal-1_master_S1, S1
*Surface, Name=slave, Type=Element
Internal-1_slave_S2, S2
Internal-1_slave_S4, S4
*Material, Name=S235
*Density
7.8E-09
*Elastic
210000, 0.28
*Solid section, Elset=Internal_Selection-1_Solid_Section-1, Material=S235
*Surface interaction, Name=Surface_Interaction-1
*Surface behavior, Pressure-overclosure=Hard
*Friction
0.1
*Contact pair, Interaction=Surface_Interaction-1, Type=Surface to surface
slave, master
*Step, Inc=100
*Static
1, 1, 1E-05, 1E+30
*Output, Frequency=1
*Boundary
Internal_Selection-1_Fixed-1, 1, 6, 0
*Dload
Internal_Selection-1_Gravity-1, Grav, 9810, 0, 0, -1
*Node file
RF, U
*El file
S, E
*End step
*Step, Inc=100
*Static
1, 1, 1E-05, 1E+30
*Output, Frequency=1
*Boundary
Internal_Selection-1_Fixed-1, 1, 6, 0
*Dload
Internal_Selection-1_Gravity-1, Grav, 9810, 0, 0, -1
*Node file
RF, U
*El file
S, E
*Model Change, Type=Contact Pair, Remove
slave, master
*Model Change, Type=Element, Remove
Set-1
*End step

```

Perhaps it’s a bug in CalculiX.

---

<div class="post-metadata">

**Author:** ![BM\_PCC](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@BM\_PCC](https://calculix.discourse.group/u/BM_PCC)\
**Post date:** [January 23, 2024, 9:22am UTC](https://calculix.discourse.group/t/model-change-with-elements-that-are-part-of-a-contact/1878/8 "2024-01-23T09:22:57Z")

</div>

@Calc_em I had the same experience.

Did you use calculix in prepomax(windows version) or your also tried in Linux?

Thanks for your feedback

Best Regards

---

<div class="post-metadata">

**Author:** ![Calc\_em](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@Calc\_em](https://calculix.discourse.group/u/Calc_em)\
**Post date:** [January 23, 2024, 9:37am UTC](https://calculix.discourse.group/t/model-change-with-elements-that-are-part-of-a-contact/1878/9 "2024-01-23T09:37:15Z")

</div>

> [@BM\_PCC](#):
>
> Did you use calculix in prepomax(windows version) or your also tried in Linux?

I used standalone CalculiX (without PrePoMax) on Windows but it’s likely the same on Linux.
