# 2D Plane strain contact model in CCX

**URL:** <https://calculix.discourse.group/t/2d-plane-strain-contact-model-in-ccx/273>\
**Category:** Uncategorized\
**Created:** [October 23, 2020, 10:17am UTC](https://calculix.discourse.group/t/2d-plane-strain-contact-model-in-ccx/273 "2020-10-23T10:17:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![caeplayer](https://avatars.discourse-cdn.com/v4/letter/c/3d9bf3/32.png) [@caeplayer](https://calculix.discourse.group/u/caeplayer)\
**Post date:** [October 23, 2020, 10:17am UTC](https://calculix.discourse.group/t/2d-plane-strain-contact-model-in-ccx/273/1 "2020-10-23T10:17:44Z")

</div>

hi everyone,  
I am trying a 2D model from gmsh to CCX, but it seems something wrong with it.  
Do anyone has experiences with meshing a 2D model in gmsh, and put this mesh to calculate plane strain contact model in CacluiX(even a simple geometry)?

---

<div class="post-metadata">

**Author:** ![jbr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jbr](https://calculix.discourse.group/u/jbr)\
**Post date:** [October 23, 2020, 6:07pm UTC](https://calculix.discourse.group/t/2d-plane-strain-contact-model-in-ccx/273/2 "2020-10-23T18:07:09Z")

</div>

Hi @caeplayer, could you give more details about this? Maybe share the \*.geo and \*inp files to look at it.

---

<div class="post-metadata">

**Author:** ![mkraska](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@mkraska](https://calculix.discourse.group/u/mkraska)\
**Post date:** [October 24, 2020, 11:52am UTC](https://calculix.discourse.group/t/2d-plane-strain-contact-model-in-ccx/273/3 "2020-10-24T11:52:59Z")

</div>

In [https://github.com/mkraska/CalculiX-Examples/tree/master/Contact/Eyebar](https://github.com/mkraska/CalculiX-Examples/tree/master/Contact/Eyebar) there is an example with plane strain and contact. Note that both plane strain and plane stress are actually expanded into a layer of 3D elements with appropriate constraints. I remember that plane stress caused problems in the example because contact may be lost due to thickening of the slave surface (when using node to surface contact).

In plane strain, this should not be a problem. Also, surface to surface contact should not exhibit this problem.

---

<div class="post-metadata">

**Author:** ![caeplayer](https://avatars.discourse-cdn.com/v4/letter/c/3d9bf3/32.png) [@caeplayer](https://calculix.discourse.group/u/caeplayer)\
**Post date:** [October 26, 2020, 2:47am UTC](https://calculix.discourse.group/t/2d-plane-strain-contact-model-in-ccx/273/4 "2020-10-26T02:47:39Z")

</div>

hello,@ [mkraska](https://calculix.discourse.group/u/mkraska), thanks for your suggustion, precisely,my problem is which meshing type 2D or 3D I should choose,and how to change the meshing type to qu4e or element type to CPE4 in gmsh output .inp file to simulate Contact 2D problem no matter plane strain or plane stress.

 ![plan strain](https://global.discourse-cdn.com/free1/uploads/calculix/original/1X/bf9604338a554118ba1d9ed6de4a2b7642887d96.png)

---

<div class="post-metadata">

**Author:** ![caeplayer](https://avatars.discourse-cdn.com/v4/letter/c/3d9bf3/32.png) [@caeplayer](https://calculix.discourse.group/u/caeplayer)\
**Post date:** [October 26, 2020, 2:59am UTC](https://calculix.discourse.group/t/2d-plane-strain-contact-model-in-ccx/273/5 "2020-10-26T02:59:52Z")

</div>

hi@ [jbr](https://calculix.discourse.group/u/jbr), my case geometry is too complicated to draw and mesh in cgx ,so I use the 2D step file and Gmsh to mesh it. Eventhough, my 3D simulation is successful,I still do not know how to use Gmsh to make an output file that could simulate 2D plane stress or strain in CCX without cgx pre(I have tried some ways but is still fail).

---

<div class="post-metadata">

**Author:** ![xyont](https://yyz2.discourse-cdn.com/free1/user_avatar/calculix.discourse.group/xyont/32/3553_2.png) [@xyont](https://calculix.discourse.group/u/xyont)\
**Post date:** [October 26, 2020, 2:05pm UTC](https://calculix.discourse.group/t/2d-plane-strain-contact-model-in-ccx/273/6 "2020-10-26T14:05:29Z")

</div>

hi,  
the answer is actually on your diagram as shown above. if you want to do 2D analysis of plane stress/strain, you need to chose meshing 2D in GMSH then export to Abaqus input files as you noted. but seems it has plane stress by default (e.g CPS3,CPS4) so you need to change manually to plane strain element in CalculiX input decks by simple using find/replace inside text editor.

although 2D plane stress/strain element (triangle & quadrangle) are expanded to 3D element (wedge & hexahedral) it has different due to solver implementation in element nodes displacement restraint for out of plane direction.
