ContactEngineering / ContactMechanics

Contact mechanics using elastic half-space methods
https://contactengineering.github.io/ContactMechanics/
MIT License
21 stars 5 forks source link

Store results of optimization in system not in Substrate #38

Closed sannant closed 2 years ago

sannant commented 3 years ago

At least that's what we decided for the Adhesion potentials in Adhesion.

Example: https://github.com/ContactEngineering/ContactMechanics/blob/47c100be6eef46711db70bcd6d15c1abba672277/ContactMechanics/Systems.py#L863

@pastewka what do you think ?

pastewka commented 3 years ago

Sounds good - I think this should go into system

pastewka commented 2 years ago

I think this is already the case and the line is a bug. substrate.force should contain just the force contribution from the substrate, self.force should contain the sum of substrate plus interaction.

sannant commented 2 years ago

I disagree. when I call system.force I expect to get the physical value I am interested in (either the substrate force or the interaction force), not the residual of the optimization problem.

Happy to create a variable called residual_force

sannant commented 2 years ago

I want to additionally point out that: