Dear Yves, thank you for your fast and clear reply. I gave it a try to check whether i could first retrieve the nodal forces from the force density (i did exactly as you suggested, except i multiplied the mass matrix by the value given by the multipliers) and i got exactly the same nodal forces as i had with the residual method. Therefore, if i want to improve my result i guess i should avoid using the nodal forces as an input for the model.
Instead of using an add explicit rhs, is there a way to enforce the force density directly? In other words, is it possible to initialize the multiplier for the dirichlet condition with a given value (the one found in the first computation for instance) and make it a data instead of a variable of the problem? I had tried a disable_variable on mult_on_u followed by a set_variable but i am not sure this is the proper way to do that, what do you think? Thanks in advance, once again, David. Le ven. 30 juil. 2021 à 13:08, Yves Renard <yves.ren...@insa-lyon.fr> a écrit : > > Dear David, > > I don't know if this explains the difference obtained because it is > really important, but the residual of the linear system and the > multiplier are not really comparable. The residual is not a force > density, its components represent some equivalent nodal forces whose > intensity depends on the mesh size, whereas the multiplier is taken from > a finite element field and represents a force density. To obtain a force > density from the nodal forces, a mass matrix must be inverted on the > contact boundary. > > Best regards, > > Yves > > > On 30/07/2021 12:41, David Danan wrote: > > Dear GetFem community, > > > > i am trying to compute the reaction forces associated to a dirichlet > > condition, in order to do so, i have followed the advices given in > > this thread > > https://www.mail-archive.com/getfem-users@gna.org/msg01136.html > > <https://www.mail-archive.com/getfem-users@gna.org/msg01136.html> > > > > You can also find enclosed my test case, using the python interface. > > The steps are the following: > > -Solve a simple 2D elasticity problem on a rectangle (dirichlet on the > > left, neumann on the top) > > -Compute the reaction forces arising from the residual without the > > dirichlet condition, by using the solution in displacement, the > > tangent matrix and the right hand side term > > -Retrieve the value of the multiplier associated to the dirichlet > > condition > > > > In fact, i expected both quantity to be the same but they were not (2 > > order of magnitude different, i didn't expect such large values for > > the multipliers) and i was wondering which one was correct. > > If it helps, you can find both quantities in Mult.png (Multipliers is > > the true multiplier and MultipliersResidual is the residual without > > the dirichlet condition). > > > > Next, i built a second model similar to the first one but without a > > dirichlet condition. I added an explicit rhs using the > > MultipliersResidual ( Multipliers gave strange results) and tried to > > solve the problem, you can see the original solution "Displacement" > > and newsolution "Displacement_test" result in Sol.png. > > > > It seems i am missing something there, i expected the solutions to be > > the same, not just close enough. > > Can you enlighten me? > > > > Best regards, > > David. > > > > -- > > Yves Renard (yves.ren...@insa-lyon.fr) tel : (33) 04.72.43.87.08 > INSA-Lyon > 20, rue Albert Einstein > 69621 Villeurbanne Cedex, FRANCE > http://math.univ-lyon1.fr/~renard > > --------- > >