Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Сontact problems of the theory of elasticity

More
5 years 8 months ago #728 by Username
Hi,

I solve the contact problem of the theory of elasticity, the condition in figure 1 . Yellow cylinder and a red cube. the Blue highlighted area of contact between cylinder and cube. Сontact type - 'Bonded'. Figure 2 shows a 3d model in the format *step. The cylinder and cube have different material.

If I import *.step which contains these two models, then there is a problem with the purpose of the material. NGSolve sees two models, but you can only specify one material. So I went the other way, importing the models separately:
Code:
geo_1 = LoadOCCGeometry('cyl.step') grid_mesh_1 = geo_1.GenerateMesh(maxh=0.5) mesh_1 = Mesh(grid_mesh_1) geo_2 = LoadOCCGeometry('cub.step') grid_mesh_2 = geo_2.GenerateMesh(maxh=0.5) mesh_2 = Mesh(grid_mesh_2)
Then I set the names for the boundary conditions:
Code:
for key in range(len(mesh_1.GetBoundaries())): grid_mesh_1.SetBCName(key, 'cyl_surface_' + str(key)) for key in range(len(mesh_2.GetBoundaries())): grid_mesh_2.SetBCName(key, 'cub_surface_' + str(key))
Ask material:
Code:
grid_mesh_1.SetMaterial(1, 'material_1') grid_mesh_2.SetMaterial(1, 'material_2')

Create a space of finite elements:
Code:
cyl = H1(mesh_1, order=1, dim=mesh_1.dim, definedon='material_1') cub = H1(mesh_2, order=1, dirichlet='cub_surface_6', dim=mesh_2.dim, definedon='material_2')
And then the question arises, how now to ask the contact between the cylinder and the cube?
How to combine H1 spaces for further calculation?
When using
Code:
cyl_and_cub = FESpace([cyl, cub])
nothing happens. I think it's because there is no contact condition and the finite elements intersect.

Files: cyl.step , cub.step , test_1.py
More
5 years 8 months ago #729 by cwinters
Hi,

if you import two geometries and mesh them separately, the meshes at the interface do not match. Therefore this won't work.

Could you please attach the step file with both parts, then I can check what's happening during the import.

Best,
Christoph
More
5 years 8 months ago #730 by Username
More
5 years 8 months ago #732 by joachim
Hi Username,

it depends on your contact algorithm: Does it work for unrelated meshes (using geometric searching), or do you want matching meshes ?

Joachim
More
5 years 8 months ago #733 by Username
It would be ideal to escape from the condition of contact of type 'bonded' and want matching meshes.
More
5 years 8 months ago #734 by joachim
Hi,

here we solve a contact problem ...

I used the CSG geometry to setup your model. We generate one model with two materials. The common interface gets the boundary condition label "contact".

We define two VectorH1 spaces restricted to the two materials (definedon=...). Thus, we have duplicated the variables on the contact interface. I merge the spaces to one CompoundFESpace. Then we define the elastic energies. I use a penalty for the penetration (u1-u2)*n.

I attached a plot of the contact force.

Of course, the example is very much simplified, and it's easy to add a real material.

Best, Joachim
The following user(s) said Thank You: Username
Time to create page: 0.176 seconds