Hello everyone,
I am currently working on a 3D contact mechanics problem using the augmented Lagrangian method.
For post-processing purposes, I would like to compute the contact force and the contact pressure. The multiplier is introduced in the model using:
md.add_filtered_fem_variable("lam2", mfl2, region);
However, I’m having trouble evaluating the contact pressure only on the contact surface.
I tried using interpolation, but my output gf.MeshFem is defined over the entire mesh, whereas I need it only on the contact surface.
- What is the proper way to project or interpolate the contact pressure over the contact surface (i.e., the region used with
add_filtered_fem_variable)?
- What is the recommended way in GetFEM to evaluate and export the total contact force based on the Lagrange multiplier?
Thank you very much for your help!
Best regards,
Rene
1 Like
You can have results on any mesh and export them on any other mesh. Here some examples for inspiration.
mfx_ = gf.MeshFem(m, 1)
mfx_.set_classical_fem(1)
kept_dofs = mfx_.basic_dof_on_region(RG1)
mfx = gf.MeshFem("partial", mf_, kept_dofs)
md.add_fem_variable(mfx)
mfout.export_to_vtu("results.vtu",
mfout, md.interpolation("H", mfout), "H",
mfout, md.interpolation("sqr(H)", mfout), "H_squared",
mfp, md.variable("P"), "P",
md.mesh_fem_of_variable("u"), md.variable("u"), "displacements",
mfx_, mfx.extend_vector(md.variable("x")), "x",
mfout, md.interpolation("x", mfout, RG1), "x in region 1",)
When you express surface results on a volume mesh, the result decays in the first element below the surface towards 0. This is normal and it is just a visualization convention.
Results can also be exported on so called “Slices”, which offer quite some post-processing capabilities within GetFEM:
Nowadays I prefer to do this kind of post-processing in ParaView, and I rarely use slices.
Thank you very much for your valuable response it was truly helpful.
Just two quick side questions, not directly related to this topic:
Is there a way in GetFEM to compute the volume of an arbitrary shape?
I’ll get back to you if I have any further questions.
Thanks again!
Best regards,
Rene
If mim is an integration method on some mesh m, then the total volume of the mesh can be computed with
VOL = gf.asm_generic(mim, 0, "1", -1)
The x-coordinate of the center of mass of the mesh can be computed with
x_pos = gf.asm_generic(mim, 0, "X(1)", -1) / VOL
The area of some surface region RG_SURF of the mesh, can be computed with
A = gf.asm_generic(mim, 0, "1", RG_SURF)
1 Like
Thanks it works perfectly