I'm trying to implement nonzero Displacement Boundary Conditions in VegaFEM on a non-linear model, using the method outlined in 3.6.2 of University of Colorado's intro to FEM (modify $f = Ku$: set desired displacements in $u$ and eliminate rows and columns in $K$ by calculating forces and applying to $f$).However it's not working as expected. I'm not sure exactly where in the solver source code I need to make the modifications to $f$, $K$ and $u$ but no matter where I do it the result is that either the model explodes or, if I make the displacements tiny, it seems to be having some influence in the correct direction (like an external force) but massively exaggerated and not anything resembling a 'boundary condition'. I wonder if I'm being thrown off because I'm assuming that the tangent stiffness matrix in the VegaFEM integrator is just another name for the stiffness matrix in the Introduction to FEM notes. Is this assumption correct? If so - VegaFEM computes internal forces and then adds external forces before passing the forces on to the solver. Does the $f$ in $f = Ku$ refer to the external forces or the internal forces?edit clarified linear vs nonlinear, and what 'not working as expected' means.edit The goal is effectively that I want to attach a highly elastic object to one or more virtual sticks which I can then drag around the simulation environment with the mouse in order to stretch the object. I'm currently simulating the boundary conditions (attachment to sticks) using PID controllers to apply external forces to the bound nodes, but this introduces another kind of elasticity that I'd rather avoid. Is there some other approach I should be considering?
Is tangent stiffness matrix the same as stiffness matrix?
finite element;boundary conditions;nonlinear equations
$K u$ equals the internal forces only in the linear case. The tangent stiffness matrix, $K$, in a nonlinear problem is normally used in a Newton-Raphson algorithm to calculate updates to the displacement vector as follows:$$K \Delta u = f - f_{internal}$$$$ u_{i+1} = u_i + \Delta u$$The vector of internal forces, $f_{internal}$ must be calculated from the nonlinear element equations. The iteration continues until $u$ converges.In a nonlinear problem, both the tangent $K$ and the $f_{internal}$ vector are functions of the displacements. One consequence of this is that to prescribe displacements at selected nodes, the displacement vector passed into the functions that calculate these must contain the prescribed values. The nonlinear solution algorithm typically begins with a solution vector of all zeros. Instead, selected entries can be set to the prescribed values so that the internal forces will be calculated correctly. If VegaFEM explicitly eliminates global equations for a constrained degree of freedom, it also should dothat for prescribed displacements. Those might be the only changes to the code needed to prescribe non-zero instead of zero displacements.