This datafile does some final polishing, particularly of the undercutting
in the toe and heel. Also, it demonstrates the use of Hessian commands,
and does some investigation of numerical accuracy.
constraint 31 // +x side of lead formula: z >= gap/2 ? x = leadshift + width/2 : 0 constraint 32 // -x side of lead formula: z >= gap/2 ? x = leadshift - width/2 : 0The
0
part of the conditional formula is effectively a
non-constraint, since it is trivially satisfied by any vertex.
It turned out insufficient just to align vertices for z >= gap.
Now vertices on these constraints can be forced to stay beyond the
toe with constraint 33:
constraint 33 nonpositive // keep in front of toe above gap formula: z >= gap/2 ? y - (leadtoe+leadheel) : -1This works pretty well, permitting us to remove the fixing of vertices 25 and 26 from
gogo
.
constraint 34 nonpositive // keep under heel formula: z - ZLOWER
Eigenprobe
t" will report the
number of Hessian eigenvalues below, equal, and above the value t.
If all eigenvalues are positive, the Hessian is positive definite, which
is necessary at an energy minimum.
ritz(t,n)
" will calculate the n eigenvalues nearest t.
Keep n small, like 5 or 10 at most. Also, to properly compare
eigenvalues at different refinements, you should have the linear_metric
option on (it is turned on in gullwing-4.fe). To see the eigenvector
displacements corresponding to eigenvalues, see the documentation for
the hessian_menu
command.
hessian
command itself calculates the
energy minimum from the Hessian matrix and the gradient, and moves the
surface there. This should be used only when near the minimum, and when
the Hessian is positive definite. Even then, strange things can happen,
so be cautious. Save your surface, unless you are willing to re-evolve.
The hessian_seek
command is more forgiving, acting like the
g
command in moving in the direction calculated by the hessian
only to the low point of energy.
hessian_normal
mode is set, which is done
by default in Evolver version 2.14 and later. But the hessian_normal
command is still in these gullwing datafiles for use in older Evolvers.
hessian_normal
mode is vertices hitting one-sided constraints, particularly when
the vertices wind up confined to a line, as when the solder contact
line hits the top of the lead. Therefore, I have found it prudent to
fix such vertices, and I call the command to do this nail
:
nail := { constraint_tolerance := 1e-2; g; // to get hit_constraint to use new constraint_tolerance fix vertex where hit_constraint 6 or hit_constraint 7 or hit_constraint 20 or hit_constraint 21 or hit_constraint 22 or hit_constraint 23 or hit_constraint 33; fix vertex where id>=25 and id<=28; constraint_tolerance := 1e-12; }The
constraint_tolerance
internal variable is the criterion
by which the Evolver judges whether a vertex has hit a constraint.
It turned out the default value of 1e-12 was not quite small enough
for certain vertices.
There is also an unnail
command to unfix all these vertices,
which should be used when further non-Hessian evolution is done, say
after refining.
Enter command: outline Enter command: gogo (much output) Enter command: nail 0. area: 1182.62391951408 energy: -148.290414019104 scale: 0.548760 Fixed: 70 Enter command: g 0. area: 1182.61764555601 energy: -148.290552356250 scale: 0.615594 Enter command: nail 0. area: 1182.57887374083 energy: -148.291385388198 scale: 2.00000 Enter command: eigenprobe 0 Converting to all named quantities...Done. Eigencounts: 0 <, 0 ==, 185 > Enter command: hessian 1. area: 1182.38631123151 energy: -148.291436510627 Enter command: hessian 1. area: 1182.38666006866 energy: -148.291436511044 Enter command: hessian 1. area: 1182.38666212261 energy: -148.291436511044When
hessian
works, it works very well, usually converging
completely in four or so iterations. Actually, only the energy has
converged completely here; a couple more iterations will converge the
area also.
gogo
, corresponding vertices are asymmetric by up to 0.01 mil.
gogo
and the Hessian convergence in gomore
:
xforce: -0.00587398488960 yforce: -6.80646244092031 zforce: -31.75953513419927After another refinement and more iteration (see the
gogo2
command):
xforce: -0.00835102596852 yforce: -6.77895717956289 zforce: -31.87586150858124After yet another refinement and more iteration (see the
gogo3
command):
xforce: -0.00081057493162 yforce: -6.77176103820898 zforce: -31.92729134980255One can get an idea of the accuracy of the forces from the x force, which ideally would be zero due to symmetry. With the linear model, one can generally expect an improvement by a factor of 4 in the force with each refinement.