[Click for the bga-5.fe datafile in a second window.]
This model does a movable upper pad with an external load on it.
Notable features:
Declaring a parameter to be an "optimizing_parameter" instead of
a "parameter" in the datafile makes it subject to optimization during
iteration, like vertex coordinates. At runtime, any parameter can be
converted back and forth with "fixparametername" and
"unfixparametername". To get the top pad to float,
we make it an optimizing parameter.
To implement the external load on the top pad, we define a
potential energy for one vertex by defining a named quantity "pad_energy"
using the method "vertex_scalar_integral" with the integrand
"pad_weight*z". "pad_weight" is a parameter, and changing it at runtime
does change the load immediately, since it is used in an integrand formula.
One could put the quantity "pad_energy" on any vertex of the upper pad, but I chose
to create an auxiliary vertex, vertex 13, to put the load on, in
anticipation of lateral loads later on. Vertex 13 is given the
attribute "bare" so the Evolver doesn't warn about the vertex not
being attached to any edges.
Gradients and hessians with respect to an optimizing parameter
are done with central differences, so they can slow things down.
The default parameter difference is 1e-4, but that can be changed
by adding a "pdelta = value" attribute to the parameter
definition in the datafile.
To do a sort of impedance matching of the optimizing parameter
gradient with the gradient of the rest of the energy, there is another
attribute one can define for a parameter, "scale". It multiplies the
motion of the parameter. If the parameter is moving too glacially slowly,
try increasing the parameter's scale. Default value is 1.
As the datafile is set up, the load decreases the height from 0.12
to about 0.105 when "gogo" is run.
Negative values of "pad_load" can be used to model a BGA joint
on the underside of a board.