// A monodisperse cluster of 12 2D bubbles in 2 rows // with the addition of a single bamboo bubble to enlarge // in order to have a pressure gradient //generated by Simon Cox // copyright foams@aber.ac.uk, 2004 //if you use this file, please cite // Kern et al. (2004) Two-dimensional viscous froth model for foam dynamics, Phys. Rev. E. 70:041411. STRING // 1-dimensional surface space_dimension 2 PARAMETER l_x = 1 PARAMETER l_y = 1 PARAMETER bub_vol = 1. PARAMETER rad = 1 // degree of bend in constraint PARAMETER start = 7. // position of bend, width = 2 /* full bend */ constraint 1 //outside bottom formula: x2 = 0 constraint 2 //inside bottom formula: x2 = 2. constraint 3 //outside top formula: x2 = 4+2*rad constraint 4 //inside top formula: x2 = 2+2*rad constraint 5 //outside circle formula: (x1-start)^2 + (y-(rad+2))^2 = (rad+2)^2 constraint 6 //inside circle formula: (x1-start)^2 + (y-(rad+2))^2 = rad^2 vertices 1 1.0000*l_x 0.0000*l_y constraint 1 2 2.0000*l_x 0.0000*l_y constraint 1 3 3.0000*l_x 0.0000*l_y constraint 1 4 4.0000*l_x 0.0000*l_y constraint 1 5 5.0000*l_x 0.0000*l_y constraint 1 6 6.0000*l_x 0.0000*l_y constraint 1 7 7.0000*l_x 0.0000*l_y constraint 1 9 2.0000*l_x 1.0000*l_y 10 3.0000*l_x 1.0000*l_y 11 4.0000*l_x 1.0000*l_y 12 5.0000*l_x 1.0000*l_y 13 6.0000*l_x 1.0000*l_y 14 7.0000*l_x 1.0000*l_y 15 1.5000*l_x 1.0000*l_y 16 2.5000*l_x 1.0000*l_y 17 3.5000*l_x 1.0000*l_y 18 4.5000*l_x 1.0000*l_y 19 5.5000*l_x 1.0000*l_y 20 6.5000*l_x 1.0000*l_y 21 7.5000*l_x 1.0000*l_y 22 1.5000*l_x 2.0000*l_y constraint 2 23 2.5000*l_x 2.0000*l_y constraint 2 24 3.5000*l_x 2.0000*l_y constraint 2 25 4.5000*l_x 2.0000*l_y constraint 2 26 5.5000*l_x 2.0000*l_y constraint 2 27 6.5000*l_x 2.0000*l_y constraint 2 28 7.5000*l_x 2.0000*l_y constraint 2 101 -1 0 constraint 1 fixed 102 start+rad+2 2+rad constraint 5 fixed 103 -1 2 constraint 2 fixed 104 start+rad 2+rad constraint 6 fixed 105 -1 4+2*rad constraint 3 fixed 106 -1 2+2*rad constraint 4 fixed /* bamboo bubble */ 200 0 0 constraint 1 fixed 201 0 2*l_y constraint 2 fixed edges 1 1 2 constraint 1 2 2 3 constraint 1 3 3 4 constraint 1 4 4 5 constraint 1 5 5 6 constraint 1 6 6 7 constraint 1 8 9 16 9 10 17 10 11 18 11 12 19 12 13 20 13 14 21 14 15 9 15 16 10 16 17 11 17 18 12 18 19 13 19 20 14 21 22 23 constraint 2 22 23 24 constraint 2 23 24 25 constraint 2 24 25 26 constraint 2 25 26 27 constraint 2 26 27 28 constraint 2 28 1 15 29 2 9 30 3 10 31 4 11 32 5 12 33 6 13 34 7 14 35 15 22 36 16 23 37 17 24 38 18 25 39 19 26 40 20 27 41 21 28 100 101 200 constraint 1 101 102 7 constraint 1 102 103 201 constraint 2 104 104 28 constraint 2 105 104 106 constraint 6 106 102 105 constraint 5 201 200 1 constraint 1 202 201 22 constraint 2 203 200 201 fixed no_refine faces 1 1 29 -14 -28 2 2 30 -15 -8 -29 3 3 31 -16 -9 -30 4 4 32 -17 -10 -31 5 5 33 -18 -11 -32 6 6 34 -19 -12 -33 7 14 8 36 -21 -35 8 15 9 37 -22 -36 9 16 10 38 -23 -37 10 17 11 39 -24 -38 11 18 12 40 -25 -39 12 19 13 41 -26 -40 13 201 28 35 -202 -203 bodies 1 1 volume bub_vol 2 2 volume bub_vol 3 3 volume bub_vol 4 4 volume bub_vol 5 5 volume bub_vol 6 6 volume bub_vol 7 7 volume bub_vol 8 8 volume bub_vol 9 9 volume bub_vol 10 10 volume bub_vol 11 11 volume bub_vol 12 12 volume bub_vol 13 13 volume 1.0 read foreach edge ee where on_constraint 1 do set ee tension 0.5; foreach edge ee where on_constraint 2 do set ee tension 0.5; set12cons := { foreach vertex vv where on_constraint 1 do if (vv.x > start) then {unset vv constraint 1;set vv constraint 5;} else if (vv.y > 2+rad ) then {unset vv constraint 1;set vv constraint 3;}; foreach vertex vv where on_constraint 2 do if (vv.x > start) then {unset vv constraint 2;set vv constraint 6;} else if (vv.y > 2+rad ) then {unset vv constraint 2;set vv constraint 4;}; foreach vertex vv where on_constraint 3 do if (vv.x > start) then {unset vv constraint 3;set vv constraint 5;} else if (vv.y < 2+rad ) then {unset vv constraint 3;set vv constraint 1;}; foreach vertex vv where on_constraint 4 do if (vv.x > start) then {unset vv constraint 4;set vv constraint 6;} else if (vv.y < 2+rad ) then {unset vv constraint 4;set vv constraint 2;}; foreach vertex vv where on_constraint 5 do if (vv.x <= start) then { if (vv.y < 2+rad ) then {unset vv constraint 5;set vv constraint 1;} else if (vv.y > 2+rad ) then {unset vv constraint 5;set vv constraint 3;}}; foreach vertex vv where on_constraint 6 do if (vv.x <= start) then { if (vv.y < 2+rad ) then {unset vv constraint 6;set vv constraint 2;} else if (vv.y > 2+rad ) then {unset vv constraint 6;set vv constraint 4;}}; cnstnum2 := 1; { foreach edge ee where on_constraint cnstnum2 do { cnstnum := 1; { countvs := 0; foreach ee.vertex vv do if (vv.on_constraint cnstnum) then {countvs := countvs+1;}; if (countvs == 2) then {unset ee constraint cnstnum2; set ee constraint cnstnum}; cnstnum := cnstnum +1; } 6; }; cnstnum2 := cnstnum2 +1; } 6; }; gogo := { foreach vertex vv where vv.valence == 4 do {vv.x := vv.x + 0.03; vv.y := vv.y + 0.03;}; o; g 10; {r; {set12cons; g 2; V 2;} 15; } 2; unfix vertices vv where (vv.x > start && vv.x < 5+2*rad); {r; {set12cons; g 2; V 2;} 15; } 2; };