hexagon logo

Stiff spring element works inside adm but stops converging when defined inside dll

We are trying to use a GForce to model a nonlinear element in an assembly. When we define this spring inside the adm file, the model runs OK and converges quickly. However, when the spring is defined inside a dll created using c-code, the convergence takes longer. The internal and external definitions for the spring create similar forces (we overlapped the two).
1.      The dll stops converging (for sim/stat) when we use stiffer springs, even for linear springs. Has anyone had this issue before that a spring converges when it defines inside the adm file and does not converge when defined inside dll? For sim/dyn, both springs work ok (dll needs more iterations).
2.      Can it be due to Jacobian? Is it possible to help dll converge by providing the Jacobean for the function?  We use GSE. However, in the simplified version, only GSEoutput has the linear spring equations. 
  • without knowing any details of your issue, here is a hint to theory: (physically) stiff springs in many cases cause the underlying system to become (numerically) stiff. Have a look in a numerics textbook what that means. Stiff systems in turn typically need to be integrated (solved numerically) by any type of implicit integration scheme, like Euler implicit (BDF), trapezoidal rule, Gear, or similar. *All* these methods require the Jacobian, at least of the stiff part of the system. And this might be the answer to your question. Which basically was given by yourself :-)