I'm trying to simulate flanges contact in patran using gap element for 2d element. can someone help me to find another way? even connecting not allined nodes?
Gap elements only work when the nodes are perfectly aligned. That is why surface contact is so nice. It does not have this requirement. What solver are you using?
I'm not terribly familiar with Patran, but dmacx is right, surface to surface is MUCH better. If you don't have a choice, you need to set your gap element effective radius to 1/2 the length of the longest edge that you are trying to contact. For instance, if your element size is uniformally 5mm, then set your gap element minimum length (contact distance) to 2.5mm. Connect the nodes that line up, but also connect the adjacent nodes, so for every contact pair (aligned nodes) you will have 6 contact elements. Here's a cryptic illustration: