// gullwing-2.fe // Surface Evolver datafile for the second example in the Gull Wing series. // This file adds the liquid solder, completely surrounded by facets. // Surrounding the solder with facets is easier conceptually than // going immediately to edge integrals, and provides an accuracy // check on the integral form in gullwing-3.fe. //Geometric parameters (all lengths in mils) // Paramters whose values should not be changed at runtime. parameter padtoe = -36 // x coordinate of pad toe end. parameter padheel = 15 // x coordinate of pad heel end. parameter padwidth = 14 // full y width of pad. parameter thick = 6 //Thickness of lead in the z direction. parameter width = 10 // Width of lead in y direction parameter leadtoe = -30 // Toe of lead, relative to heel (mils) parameter bend = 90*pi/180 // bending angle of a curved section, radians parameter rad = 10 // inside radius of bends parameter orad = rad+thick // outside radius of bends // Geometry parameters to change in moving lead around. parameter gap = 5 // Height of the bottom of the gull foot above the pad parameter leadheel = 0 // y coord of flat-curve junction of lead parameter leadshift = 0 // x offset of centerline of lead //Materials Parameters parameter gamlv = 0.45 // Liquid-vapor surface energy of solder (Kg/s^2) parameter den= 1.3e-10 // Density of solder (Kg/mil^3) parameter mr_grav= 385000 // Acceleration of gravity (mil/s^2) //Contact angles on sides, foot, and bottom surfaces of lead, and pad parameter theta_side = 20 // Contact angle on sides of the gull wing (degrees) parameter theta_lower = 20 // Contact angle on the bottom surface of the gull wing (degrees) parameter theta_toe = 20 // Contact angle on the toe of the gull wing (degrees) parameter thetap = 20 // Wetting angle on the pad (degrees) // Constraints for display of lead curved sections constraint 1 // lower side of lower curve formula: (z-(gap+orad))^2 + (y-leadheel)^2 = orad^2 constraint 2 // upper side of lower curve formula: (z-(gap+orad))^2 + (y-leadheel)^2 = rad^2 constraint 3 // lower side of upper curve formula: (z-(gap+(rad+orad)*(1-cos(bend))-rad))^2 + (y-leadheel-(rad+orad)*sin(bend))^2 = rad^2 constraint 4 // upper side of upper curve formula: (z-(gap+(rad+orad)*(1-cos(bend))-rad))^2 + (y-leadheel-(rad+orad)*sin(bend))^2 = orad^2 // Constraints for solder contact on the pad constraint 5 // pad surface formula: z = 0 constraint 6 nonnegative // Keep inside pad edges formula: (padwidth^2/4 - x^2)*(y-padtoe)*(padheel-y) // Constraints to keep solder on the lead constraint 10 // toe surface of lead, i.e. -y side formula: y = leadtoe+leadheel constraint 11 // +x side of lead formula: x = leadshift + width/2 constraint 12 // -x side of lead formula: x = leadshift - width/2 constraint 13 // bottom surface of lead, formulas like constraints 1 and 3 formula: (y < leadheel) ? (z - gap) : // flat part ( ((y-leadheel)*cos(bend) < (gap+orad-z)*sin(bend)) ? orad^2 - ((z-(gap+orad))^2 + (y-leadheel)^2) : // first curve ((z-(gap+(rad+orad)*(1-cos(bend))-rad))^2 + // second curve (y-leadheel-(rad+orad)*sin(bend))^2 - rad^2) ) // One-sided constraints to keep solder contact within bounds on lead constraint 20 nonnegative // -y bound; keep from running off toe formula: y = leadtoe+leadheel constraint 21 nonpositive // within x bounds; formula combo of constraints 11 and 12 formula: (x - leadshift + width/2)*(x - leadshift - width/2) constraint 22 nonnegative // above the bottom, formula combo of constraints 1 and 3 formula: (y < leadheel) ? (z - gap) : // flat part ( ((y-leadheel)*cos(bend) < (gap+orad-z)*sin(bend)) ? orad^2 - ((z-(gap+orad))^2 + (y-leadheel)^2) : // first curve ((z-(gap+(rad+orad)*(1-cos(bend))-rad))^2 + // second curve (y-leadheel-(rad+orad)*sin(bend))^2 - rad^2) ) constraint 23 nonpositive // below the top, formula combo of constraints 2 and 4 formula: (y < leadheel) ? (z - gap - thick) : // flat part ( (y-leadheel)*cos(bend) < (gap+orad-z)*sin(bend) ? rad^2 - ((z-(gap+orad))^2 + (y-leadheel)^2) : // first curve ((z-(gap+(rad+orad)*(1-cos(bend))-rad))^2 + // second curve (y-leadheel-(rad+orad)*sin(bend))^2 - orad^2) ) vertices 1 -padwidth/2 padtoe 0 fixed // For display of pad on substrate. 2 padwidth/2 padtoe 0 fixed 3 padwidth/2 padheel 0 fixed 4 -padwidth/2 padheel 0 fixed 5 -width/2 leadtoe gap fixed // For display of the lead. 6 width/2 leadtoe gap fixed 7 width/2 leadheel gap fixed 8 -width/2 leadheel gap fixed 9 -width/2 leadtoe gap+thick fixed 10 width/2 leadtoe gap+thick fixed 11 width/2 leadheel gap+thick fixed 12 -width/2 leadheel gap+thick fixed 13 width/2 orad*sin(bend) gap+orad*(1-cos(bend)) fixed 14 width/2 (rad+orad)*sin(bend) gap+(rad+orad)*(1-cos(bend)) fixed 15 -width/2 (rad+orad)*sin(bend) gap+(rad+orad)*(1-cos(bend)) fixed 16 -width/2 orad*sin(bend) gap+orad*(1-cos(bend)) fixed 17 width/2 rad*sin(bend) gap+thick+rad*(1-cos(bend)) fixed 18 width/2 (rad+orad)*sin(bend) gap+thick+(rad+orad)*(1-cos(bend)) fixed 19 -width/2 (rad+orad)*sin(bend) gap+thick+(rad+orad)*(1-cos(bend)) fixed 20 -width/2 rad*sin(bend) gap+thick+rad*(1-cos(bend)) fixed // Vertices for complete solder surface 21 -padwidth/2 padtoe 0 constraints 5,6 // On pad 22 padwidth/2 padtoe 0 constraints 5,6 23 padwidth/2 padheel 0 constraints 5,6 24 -padwidth/2 padheel 0 constraints 5,6 25 -width/2 leadtoe gap+thick/3 constraints 10,12,22,23 26 width/2 leadtoe gap+thick/3 constraints 10,11,22,23 27 width/2 orad*sin(bend/2) gap+orad*(1-cos(bend/2)) constraints 11,13 28 -width/2 orad*sin(bend/2) gap+orad*(1-cos(bend/2)) constraints 12,13 29 -width/2 leadtoe gap fixed 30 width/2 leadtoe gap fixed 31 width/2 leadheel gap constraints 11,13 32 -width/2 leadheel gap constraints 12,13 edges 1 1 2 fixed no_refine // For display of pad on substrate. 2 2 3 fixed no_refine 3 3 4 fixed no_refine 4 4 1 fixed no_refine 5 5 6 fixed // For display of lead. 6 6 7 fixed 7 7 8 fixed 8 8 5 fixed 9 9 10 fixed 10 10 11 fixed 11 11 12 fixed 12 12 9 fixed 13 5 9 fixed 14 6 10 fixed 15 7 11 fixed 16 8 12 fixed 17 7 13 fixed constraint 1 18 13 14 fixed constraint 3 19 15 16 fixed constraint 3 20 16 8 fixed constraint 1 21 13 16 fixed 22 14 15 fixed 23 11 17 fixed constraint 2 24 17 18 fixed constraint 4 25 19 20 fixed constraint 4 26 20 12 fixed constraint 2 27 17 20 fixed 28 18 19 fixed 29 13 17 fixed 30 14 18 fixed 31 15 19 fixed 32 16 20 fixed // Edges for solder 33 21 22 constraints 5,6 34 22 23 constraints 5,6 35 23 24 constraints 5,6 36 24 21 constraints 5,6 37 25 26 constraints 10,21,22,23 38 26 27 constraints 11,20,22,23 39 27 28 constraints 13,21 40 28 25 constraints 12,20,22,23 41 29 30 fixed 42 30 31 constraints 13,11 43 31 32 constraints 13,21 44 32 29 constraints 13,12 45 31 27 constraints 13,11 46 28 32 constraints 13,12 47 21 25 48 22 26 49 23 27 50 24 28 51 29 25 52 30 26 Faces 1 1 2 3 4 fixed color green no_refine // For display of pad. 2 -8 -7 -6 -5 fixed color yellow // For display of lead. 3 6 15 -10 -14 fixed color yellow 4 8 13 -12 -16 fixed color yellow 5 5 14 -9 -13 fixed color yellow 6 9 10 11 12 fixed color yellow 7 17 29 -23 -15 color yellow // not fixed yet so can massage below. 8 18 30 -24 -29 color yellow 9 7 -20 -21 -17 fixed color yellow constraint 1 10 21 -19 -22 -18 fixed color yellow constraint 3 11 23 27 26 -11 fixed color yellow constraint 2 12 24 28 25 -27 fixed color yellow constraint 4 13 16 -26 -32 20 color yellow 14 32 -25 -31 19 color yellow 15 31 -28 -30 22 fixed color yellow // Solder faces 16 33 48 -37 -47 tension gamlv // solder-air faces 17 34 49 -38 -48 tension gamlv 18 35 50 -39 -49 tension gamlv 19 36 47 -40 -50 tension gamlv 20 -36 -35 -34 -33 tension -gamlv*cos(thetap*pi/180) constraints 5,6 // pad 21 37 -52 -41 51 tension -gamlv*cos(theta_toe*pi/180) constraints 10,21,22,23 // lead toe 22 38 -45 -42 52 tension -gamlv*cos(theta_side*pi/180) constraints 11,20,22,23 // lead +x side 23 39 46 -43 45 tension -gamlv*cos(theta_lower*pi/180) constraints 13,20,21 // lead bottom curved part 24 40 -51 -44 -46 tension -gamlv*cos(theta_side*pi/180) constraints 12,20,22,23 // lead -x side 25 41 42 43 44 tension -gamlv*cos(theta_lower*pi/180) constraints 13,20,21 // lead flat bottom body 1 16 17 18 19 20 21 22 23 24 25 volume 3780 read //************************************************************************* // Some initial massage. // Subdivide some curve edges for better display refine edge where (id >= 17 and id <= 20) or (id >= 23 and id <= 26) // Get rid of pesky vertices in middle of curved sides. delete edge ee where sum(ee.facet,color==yellow)==2 and ee.length < thick/3 foreach facet ff where color==yellow do { fix ff.edge; fix ff.vertex; fix ff} // Get rid of energy on display surfaces set facet tension 0 where color==yellow or color==green //************************************************************************ // Some lead-moving commands. These are pretty basic, and will have to // be modified when the solder gets in place. These assume gap > 0. // Move in x direction by delta_x, i.e. off-center delta_x := 0 move_x := { leadshift := leadshift + delta_x; // do parameters first set vertex x x+delta_x where z > 0; } // Move in y direction by delta_y delta_y := 0 move_y := { leadheel := leadheel + delta_y; leadtoe := leadtoe + delta_y; set vertex y y+delta_y where z > 0; } // Move in z direction by delta_z delta_z := 0 move_z := { gap := gap + delta_z; set vertex z z+delta_z where z > 0; } read "outline.cmd" read "slats.cmd"