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?

  • $\begingroup$ Could you be a bit more specific as to how it's not working as expected (i.e., what did you expect, and what do you observe)? Otherwise it's difficult to help. $\endgroup$ – Christian Clason Apr 25 '15 at 12:00
  • $\begingroup$ The tangent stiffness matrix is the stiffness matrix used in each iteration of the solution of a nonlinear problem. It changes with each iteration. Is your problem nonlinear? If the problem is linear it would typically converge in a single itteration, and in that case the tangent stiffness matrix is simply the stiffness matrix. $\endgroup$ – DanielRch Apr 25 '15 at 12:41
  • $\begingroup$ I think your idea of specifying displacements at selected nodes is a good one. I'll update my response to include some discussion of this. $\endgroup$ – Bill Greene Apr 25 '15 at 15:16

$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 do that for prescribed displacements. Those might be the only changes to the code needed to prescribe non-zero instead of zero displacements.

  • $\begingroup$ I see, thanks for the clarification. How would one include non-homogenous displacement boundary conditions in this algorithm? $\endgroup$ – damian Apr 25 '15 at 14:44
  • $\begingroup$ ... this seems to work. I had tried something similar earlier but abandoned it - turns out I was missing one case where the solution vector was being reset to all zeroes. Thanks! $\endgroup$ – damian Apr 28 '15 at 16:43

From looking at the website, VegaFEM is a specific solver for nonlinear elasticity. Solving a nonlinear PDE requires an iterative procedure, where for every step you have to solve a linearized PDE, which is sometimes called "tangent equation". The tangent stiffness matrix would then refer to the stiffness matrix obtained from discretizing the tangent equation.

Note that the tangent equation always involves homogeneous boundary conditions even if the nonlinear PDE has nonhomogeneous boundary conditions (conceptually, you want to use the tangent solution $\delta u$ as an update of the current iteration $u^k$, and $u^k+\delta u$ will not satisfy the correct boundary conditions otherwise).

  • $\begingroup$ Ah, I see. That's probably why it's not working. VegaFEM already implements homogenous boundary conditions by removing rows and columns from the simulation. I'm simulating non-homegenous displacement boundary conditions using PID controllers to apply external forces to the boundary nodes, but this introduces another kind of elasticity that I'd rather avoid. $\endgroup$ – damian Apr 25 '15 at 14:36
  • $\begingroup$ I have updated the question. $\endgroup$ – damian Apr 25 '15 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.