# Mortar contact simple example

**URL:** <https://prepomax.discourse.group/t/mortar-contact-simple-example/3237>\
**Category:** General Questions\
**Created:** [February 6, 2026, 10:26pm UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237 "2026-02-06T22:26:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ANYS](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/anys/32/7737_2.png) [@ANYS](https://prepomax.discourse.group/u/ANYS)\
**Post date:** [February 6, 2026, 10:26pm UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/1 "2026-02-06T22:26:08Z")

</div>

HI,

¿Could someone provide a simple two cube example of MORTAR contact working in Prepomax?

Thanks

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [February 6, 2026, 11:18pm UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/2 "2026-02-06T23:18:45Z")

</div>

There are some examples within the CalculiX test cases (e.g. contact4\_mortar.inp):

[contact4\_mortar.inp](https://prepomax.discourse.group/uploads/short-url/bqLnr4bkn6vgzL7vbozNtk0scOy.inp) (3.6 KB)

But I attached an example made in PrePoMax too:

[Mortar contact.pmx](https://prepomax.discourse.group/uploads/short-url/eku6sjVZbpfpoiDVXxqa6S3ZSSq.pmx) (304.9 KB)

---

<div class="post-metadata">

**Author:** ![MisiaKu](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@MisiaKu](https://prepomax.discourse.group/u/MisiaKu)\
**Post date:** [February 7, 2026, 10:00am UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/3 "2026-02-07T10:00:10Z")

</div>

Sorry for any machine translation errors.

Below are analytical calculations for the example “Mortar contact.pmx” submitted by “FEAnalyst” based on Hooke’s law for compression. This is the simplest example of applying force.

 ![obraz](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/4/401bd93371085983d20b88886f0e5cb12c6b1857.jpeg)

 ![obraz](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/8/89aa137b00b2342258347c4c93f22282bcc269ea.png)

 ![obraz](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/8/8db8288bd95b1a5d5cfccc2787e93f4920c9940a.jpeg)

 ![obraz](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/f/f9d71456a1ce364e61f46536660ebadeb1614716.jpeg)

 ![obraz](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/f/f5059e48fefd2c75f57f60795f90fb65bd56573a.png)

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [February 7, 2026, 10:09am UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/4 "2026-02-07T10:09:51Z")

</div>

Yeah, we don’t doubt its accuracy - this type of contact uses Lagrange multipliers and doesn’t have small penetrations unlike penalty contact so it can be very accurate. However, its problem is really poor convergence (at least in most of my tests).

Also, the usual way to check if contact behaves as expected is to examine the CPRESS output. If it’s uniform and the values are correct then contact is working fine (at least in the normal direction).

---

<div class="post-metadata">

**Author:** ![MisiaKu](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@MisiaKu](https://prepomax.discourse.group/u/MisiaKu)\
**Post date:** [February 7, 2026, 10:14am UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/5 "2026-02-07T10:14:19Z")

</div>

Is there something wrong with PrePoMax 2.4 for Windows 10?

After every calculation, I get a strange message.

 ![obraz](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/e/eb7f76fc2826ddf80d472526f0e245e0822d8e4e.jpeg)

When I click “Result,” I get the following error message:

 ![obraz](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/d/d24fb04a4a3f7c7a128bd3a31bf1c533709a3f0e.jpeg)

This happens with every calculation.

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [February 7, 2026, 10:15am UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/6 "2026-02-07T10:15:28Z")

</div>

You can disable it here:

 ![image](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/f/f8fad8c6324a78b3805c31980d358b7f46d4c645.png)

---

<div class="post-metadata">

**Author:** ![MisiaKu](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@MisiaKu](https://prepomax.discourse.group/u/MisiaKu)\
**Post date:** [February 7, 2026, 10:33am UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/7 "2026-02-07T10:33:05Z")

</div>

I made an example to learn how to express force using deformations.

---

<div class="post-metadata">

**Author:** ![MisiaKu](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@MisiaKu](https://prepomax.discourse.group/u/MisiaKu)\
**Post date:** [February 7, 2026, 10:35am UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/9 "2026-02-07T10:35:25Z")

</div>

It is much more difficult when there is a complex bending element with a contact when you want to provide someone with the limit force, e.g. for some connection for a catalogue.

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [February 7, 2026, 10:40am UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/10 "2026-02-07T10:40:43Z")

</div>

> [@MisiaKu](#):
>
> I made an example to learn how to express force using deformations.

Another way can be to rearrange Hertz formulas - Roark’s book provides them for displacement too. So you can get contact stress from prescribed displacement.

But I guess the original question originates from this discussion where we (once again) talked about the usefulness of Mortar contact: [Contact issues in Visco analysis - Analysis issues - CalculiX (official versions are on www.calculix.de, the official GitHub repository is at https://github.com/Dhondtguido/CalculiX).](https://calculix.discourse.group/t/contact-issues-in-visco-analysis/3767)

---

<div class="post-metadata">

**Author:** ![MisiaKu](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@MisiaKu](https://prepomax.discourse.group/u/MisiaKu)\
**Post date:** [February 7, 2026, 11:22am UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/11 "2026-02-07T11:22:18Z")

</div>

A more accurate result of compressive stresses is obtained after unlocking the sideways movement of the base in the X and Y directions. I do not analyze contact stresses.

 ![obraz](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/5/5c1c1546e1671c0abf3eceeac3e497cf0ceb4fc5.png)

 ![obraz](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/e/e092058e193f661c5a2a3159a69b7ee4898e410b.jpeg)

 ![obraz](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/6/6eed20269ba0015d53a1f4699eb6e786958748ed.jpeg)

 ![obraz](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/2/2de18556b5fcb0563c751ec975c85bf008452452.jpeg)

S33 = 10.63 MPa

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [February 7, 2026, 11:43am UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/12 "2026-02-07T11:43:10Z")

</div>

One could also apply symmetry BCs on two sides here. Cubes are really nice for such simplified (single-element or with more elements) testing.

Here’s what is used in Abaqus documentation to compare node to surface and surface to surface contact (they check if CPRESS shows the same uniform pressure):

 ![IMG_1086](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/e/eccf328ea965ff872fd0fb7b932e8f9fa62147d1.jpeg)

They have an example of sphere on surface contact too and they compare CPRESS distributions.

---

<div class="post-metadata">

**Author:** ![MisiaKu](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@MisiaKu](https://prepomax.discourse.group/u/MisiaKu)\
**Post date:** [February 7, 2026, 2:25pm UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/13 "2026-02-07T14:25:27Z")

</div>

It is very rare in practice to use symmetry conditions, so not all verifications can be constructed using symmetry.

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [February 7, 2026, 2:28pm UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/14 "2026-02-07T14:28:24Z")

</div>

Depends on the industry, quite some analyses still benefit from symmetry or even 2D (although much less frequently). However, I was rather thinking about verifications of various software features where you can use models as simple as single elements (especially common when verifying advanced material models including subroutines) and cubes.

> **[Debugging Complex Finite Element Analysis Using a Single Element Model -...](https://www.engineering.com/debugging-complex-finite-element-analysis-using-a-single-element-model/)**
>
> Save time and headaches with single element analytical testing and other element analysis tips.

---

<div class="post-metadata">

**Author:** ![MisiaKu](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@MisiaKu](https://prepomax.discourse.group/u/MisiaKu)\
**Post date:** [February 7, 2026, 5:23pm UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/15 "2026-02-07T17:23:40Z")

</div>

You’re right, but you can’t just learn symmetry. You have to learn to solve the problem differently.

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [February 7, 2026, 5:31pm UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/16 "2026-02-07T17:31:32Z")

</div>

Things may indeed become tricky when the model appears symmetric, but we can’t use such BCs for some reason (e.g. buckling) or when we need to figure out more sophisticated approach to balance under- and overconstraint because the model doesn’t really meet the criteria for the use of symmetry BCs. In CalculiX, there’s also an issue with symmetry on curved shell edges.

Speaking about symmetry, there’s a nice article from FEA guru Tony Abbey: [Simplify FEA Simulation Models Using Planar Symmetry - Digital Engineering 24/7](https://www.digitalengineering247.com/article/simplify-fea-simulation-models-using-planar-symmetry)

---

<div class="post-metadata">

**Author:** ![MisiaKu](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@MisiaKu](https://prepomax.discourse.group/u/MisiaKu)\
**Post date:** [February 7, 2026, 6:24pm UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/17 "2026-02-07T18:24:43Z")

</div>

I don’t have such simple elements

---

<div class="post-metadata">

**Author:** ![fgr](https://avatars.discourse-cdn.com/v4/letter/f/f4b2a3/32.png) [@fgr](https://prepomax.discourse.group/u/fgr)\
**Post date:** [February 8, 2026, 3:00am UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/18 "2026-02-08T03:00:25Z")

</div>

In your hand calculation the material is free to expand in the XY-plane for all values of Z which isn’t the case for the simulation where XY-plane are locked at both top and bottom.

Instead of you could release the XY-plane by define your boundary condition as shown where only the symmetri lines are locked for movement in the XY-plane. This will give you values between 10.4899-10.4890 MPa and an error of 0.1%

 ![Capture](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/6/6a8452f3aa691a2a4722a0304252e59e69bacef6.jpeg)

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [February 8, 2026, 7:51am UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/19 "2026-02-08T07:51:53Z")

</div>

Symmetry planes should work too, that’s why I suggested their use for such simple test models in the first place.

---

<div class="post-metadata">

**Author:** ![ANYS](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/anys/32/7737_2.png) [@ANYS](https://prepomax.discourse.group/u/ANYS)\
**Post date:** [February 8, 2026, 2:36pm UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/20 "2026-02-08T14:36:24Z")

</div>

Thanks for the files @FEAnalyst.

After some testing seems there is a bug in ccx. Mortar convergence depends on the unit system used to do the analysis which should not. Maybe a round off error. Same analysis executed using mm works fine, but if node coordinates are expressed in m it terminates without explanation.

I will post in ccx forum to see if there is any explanation or error in my set up before reporting on Github.

When done in mm accuracy is perfect. Zero clearance and perfect contact pressure.

Regards

 ![screenshot.36](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/d/d16c106f73d9f2c26dc99c05c53be5060fa0f1fe.jpeg)

 ![imagen](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/5/507b424f21dab7ffe959cd453b9395aacfc63ce3.png)

---

<div class="post-metadata">

**Author:** ![FEAnalyst](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/feanalyst/32/688_2.png) [@FEAnalyst](https://prepomax.discourse.group/u/FEAnalyst)\
**Post date:** [February 8, 2026, 2:45pm UTC](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237/21 "2026-02-08T14:45:28Z")

</div>

> [@ANYS](#):
>
> I will post in ccx forum to see if there is any explanation or error in my set up before reporting on Github.

Please do so, I will also notify Guido if he doesn’t react anytime soon once the GitHub issue is posted.

I almost always use the SI(mm) system, and I had convergence issues with Mortar contact in several cases, but it might be another problem - probably poor convergence of the Lagrange multipliers in general, combined with worse optimization than e.g. in Abaqus.

Still, I will look for some examples too and maybe we can help Guido further improve the Mortar contact algorithm.

[Next page](https://prepomax.discourse.group/t/mortar-contact-simple-example/3237.md?page=2)
