Gull Wing home page   Previous Gull Wing page   Next Gull Wing page

Gull Wing Lead Example gullwing-3 for the Surface Evolver

[Click for the gullwing-3.fe datafile in a second window.]


This file replaces the solder-lead and solder-pad interface facets with edge integrals for surface energy, gravitational energy, and volume. This datafile is finally evolvable.

Design steps:



Here is a sequence of evolution commands and some commentary. It is in the datafile as the "gogo" command.


Now that we have a reasonably evolved surface, it is time to calculate forces on the lead. There are many ways to do this, as explained in the Ball Grid Array example, but the winner comes out to be the Principle of Virtual Work. That is, a particular force is the negative derivative of the energy with respect to a particular parameter. So one changes the parameter and recalculates the energy, and does numerical differentiation to get the force. The nice thing is that the moved surface does not have to be re-evolved to convergence. Any violation of the volume constraint can be corrected by using the pressure, which is the Lagrange multiplier for the volume, which means that pressure = d(energy)/d(volume). The force calculations are in a separate file, gullforces.cmd.

Here's the basic x force calculation command:

   dx := 0.0001
   calc_xforce := {
      delta_x := dx;
      hi := total_energy - body[1].pressure*(body[1].volume-body[1].target);
      delta_x := -2*dx;
      lo := total_energy - body[1].pressure*(body[1].volume-body[1].target);
      delta_x := dx;
      xforce := -(hi - lo)/2/dx;
Because the surface is at equilibrium, the exact way th e surface is moved does not matter, at least theoretically, but I have chosen to define a more elaborate move_x command to give a smoother perturbed surface, which should help with the numerical accuracy, and will work when the gap is zero. Instead of linearly interpolating between the pad and the bottom of the lead, I interpolate between the pad and the lowest point of the contact line on the lead, and store the interpolation parameter in an extra attribute:
   define vertex attribute alpha real

   calc_alpha := {
      minz := min(vertex where on_constraint 13 or on_constraint 23, z);
      if ( minz <= 0.0 ) then
         printf "WARNING: contact line hits pad.\n";
      foreach vertex vv do
      { if ( vv.on_constraint 1 or vv.on_constraint 5 ) then
          { vv.alpha := 0; continue; };
        if ( vv.fixed ) then { vv.alpha := 1; continue; };
        vv.alpha := vv.z >= minz ?  1 : vv.z/minz ;
Then the move_x command becomes
   move_x := { calc_alpha;
               leadshift := leadshift + delta_x;  // do parameters first
               set vertex x x+alpha*delta_x;

Gull Wing home page   Previous gullwing page   Next gullwing page
Surface Evolver home page
More Surface Evolver examples
Ken Brakke's home page
This page last modified August 12, 1999
Susquehanna University assumes no responsibility for the content of this personal website. Please read the disclaimer.