Skip to content
Snippets Groups Projects
Commit bb701fde authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

prepare 4.9.5

parent 8e8e160e
No related branches found
No related tags found
No related merge requests found
(Work-in-progress): dynamic Gmsh library now also only exports public symbols on 4.9.5 (February 21, 2022): dynamic Gmsh library now also only exports public
macOS and Linux, like it does on Windows; better handling of max. thread symbols on macOS and Linux, like it does on Windows; better handling of
settings; small bug fixes. max. thread settings; small bug fixes.
* New API function: mesh/getDuplicateNodes * New API function: mesh/getDuplicateNodes
......
Point(1) = {1.0, 0.0, 0.0};
Point(2) = {0.994866, 6.7e-05, 0.0};
Point(3) = {0.986348, 0.000287, 0.0};
Point(4) = {0.976821, 0.000634, 0.0};
Point(5) = {0.966346, 0.001103, 0.0};
Point(6) = {0.955063, 0.001691, 0.0};
Point(7) = {0.943142, 0.002392, 0.0};
Point(8) = {0.930755, 0.003194, 0.0};
Point(9) = {0.918042, 0.004084, 0.0};
Point(10) = {0.905101, 0.005053, 0.0};
Point(11) = {0.892003, 0.00609, 0.0};
Point(12) = {0.878795, 0.007186, 0.0};
Point(13) = {0.865506, 0.008336, 0.0};
Point(14) = {0.852151, 0.009534, 0.0};
Point(15) = {0.838743, 0.010775, 0.0};
Point(16) = {0.825293, 0.012052, 0.0};
Point(17) = {0.811808, 0.013363, 0.0};
Point(18) = {0.798289, 0.014705, 0.0};
Point(19) = {0.784739, 0.016073, 0.0};
Point(20) = {0.771158, 0.017465, 0.0};
Point(21) = {0.757549, 0.018877, 0.0};
Point(22) = {0.743914, 0.020307, 0.0};
Point(23) = {0.730256, 0.02175, 0.0};
Point(24) = {0.716575, 0.023205, 0.0};
Point(25) = {0.702872, 0.024669, 0.0};
Point(26) = {0.689153, 0.026138, 0.0};
Point(27) = {0.675428, 0.027609, 0.0};
Point(28) = {0.66171, 0.029077, 0.0};
Point(29) = {0.648008, 0.030541, 0.0};
Point(30) = {0.634324, 0.031996, 0.0};
Point(31) = {0.620661, 0.03344, 0.0};
Point(32) = {0.607019, 0.03487, 0.0};
Point(33) = {0.593396, 0.036284, 0.0};
Point(34) = {0.579794, 0.037681, 0.0};
Point(35) = {0.566214, 0.039056, 0.0};
Point(36) = {0.552657, 0.040409, 0.0};
Point(37) = {0.539122, 0.041736, 0.0};
Point(38) = {0.525607, 0.043035, 0.0};
Point(39) = {0.512113, 0.044305, 0.0};
Point(40) = {0.498643, 0.045541, 0.0};
Point(41) = {0.485196, 0.046743, 0.0};
Point(42) = {0.471775, 0.047906, 0.0};
Point(43) = {0.458376, 0.049029, 0.0};
Point(44) = {0.445002, 0.050108, 0.0};
Point(45) = {0.431653, 0.051142, 0.0};
Point(46) = {0.418331, 0.052127, 0.0};
Point(47) = {0.405037, 0.05306, 0.0};
Point(48) = {0.391772, 0.053939, 0.0};
Point(49) = {0.378538, 0.05476, 0.0};
Point(50) = {0.365336, 0.05552, 0.0};
Point(51) = {0.352169, 0.056215, 0.0};
Point(52) = {0.339039, 0.056843, 0.0};
Point(53) = {0.325948, 0.057399, 0.0};
Point(54) = {0.312899, 0.057879, 0.0};
Point(55) = {0.299897, 0.05828, 0.0};
Point(56) = {0.286946, 0.058597, 0.0};
Point(57) = {0.274049, 0.058826, 0.0};
Point(58) = {0.261211, 0.058961, 0.0};
Point(59) = {0.248437, 0.058999, 0.0};
Point(60) = {0.235737, 0.058934, 0.0};
Point(61) = {0.223117, 0.058761, 0.0};
Point(62) = {0.21059, 0.058474, 0.0};
Point(63) = {0.198168, 0.058068, 0.0};
Point(64) = {0.185864, 0.057536, 0.0};
Point(65) = {0.173699, 0.056872, 0.0};
Point(66) = {0.161694, 0.056071, 0.0};
Point(67) = {0.149879, 0.055129, 0.0};
Point(68) = {0.138293, 0.054041, 0.0};
Point(69) = {0.126981, 0.052807, 0.0};
Point(70) = {0.116001, 0.051427, 0.0};
Point(71) = {0.105418, 0.049909, 0.0};
Point(72) = {0.09531, 0.048263, 0.0};
Point(73) = {0.08575, 0.046506, 0.0};
Point(74) = {0.07681, 0.044662, 0.0};
Point(75) = {0.06854, 0.042758, 0.0};
Point(76) = {0.060971, 0.04082, 0.0};
Point(77) = {0.054103, 0.038875, 0.0};
Point(78) = {0.04791, 0.036942, 0.0};
Point(79) = {0.042349, 0.035036, 0.0};
Point(80) = {0.037363, 0.033167, 0.0};
Point(81) = {0.032895, 0.031338, 0.0};
Point(82) = {0.028889, 0.02955, 0.0};
Point(83) = {0.025291, 0.027804, 0.0};
Point(84) = {0.022055, 0.026093, 0.0};
Point(85) = {0.019136, 0.024414, 0.0};
Point(86) = {0.016497, 0.022761, 0.0};
Point(87) = {0.014113, 0.021129, 0.0};
Point(88) = {0.011961, 0.019514, 0.0};
Point(89) = {0.010022, 0.017915, 0.0};
Point(90) = {0.00828, 0.016329, 0.0};
Point(91) = {0.006725, 0.01475, 0.0};
Point(92) = {0.005342, 0.013172, 0.0};
Point(93) = {0.004119, 0.011588, 0.0};
Point(94) = {0.003054, 0.009997, 0.0};
Point(95) = {0.002151, 0.008403, 0.0};
Point(96) = {0.001413, 0.006817, 0.0};
Point(97) = {0.000839, 0.005249, 0.0};
Point(98) = {0.000423, 0.003712, 0.0};
Point(99) = {0.000152, 0.002209, 0.0};
Point(100) = {1.7e-05, 0.000733, 0.0};
Point(101) = {0.0, 0.0, 0.0};
Point(102) = {1.7e-05, -0.000733, 0.0};
Point(103) = {0.000152, -0.002209, 0.0};
Point(104) = {0.000423, -0.003712, 0.0};
Point(105) = {0.000839, -0.005249, 0.0};
Point(106) = {0.001413, -0.006817, 0.0};
Point(107) = {0.002151, -0.008403, 0.0};
Point(108) = {0.003054, -0.009997, 0.0};
Point(109) = {0.004119, -0.011588, 0.0};
Point(110) = {0.005342, -0.013172, 0.0};
Point(111) = {0.006725, -0.01475, 0.0};
Point(112) = {0.00828, -0.016329, 0.0};
Point(113) = {0.010022, -0.017915, 0.0};
Point(114) = {0.011961, -0.019514, 0.0};
Point(115) = {0.014113, -0.021129, 0.0};
Point(116) = {0.016497, -0.022761, 0.0};
Point(117) = {0.019136, -0.024414, 0.0};
Point(118) = {0.022055, -0.026093, 0.0};
Point(119) = {0.025291, -0.027804, 0.0};
Point(120) = {0.028889, -0.02955, 0.0};
Point(121) = {0.032895, -0.031338, 0.0};
Point(122) = {0.037363, -0.033167, 0.0};
Point(123) = {0.042349, -0.035036, 0.0};
Point(124) = {0.04791, -0.036942, 0.0};
Point(125) = {0.054103, -0.038875, 0.0};
Point(126) = {0.060971, -0.04082, 0.0};
Point(127) = {0.06854, -0.042758, 0.0};
Point(128) = {0.07681, -0.044662, 0.0};
Point(129) = {0.08575, -0.046506, 0.0};
Point(130) = {0.09531, -0.048263, 0.0};
Point(131) = {0.105418, -0.049909, 0.0};
Point(132) = {0.116001, -0.051427, 0.0};
Point(133) = {0.126981, -0.052807, 0.0};
Point(134) = {0.138293, -0.054041, 0.0};
Point(135) = {0.149879, -0.055129, 0.0};
Point(136) = {0.161694, -0.056071, 0.0};
Point(137) = {0.173699, -0.056872, 0.0};
Point(138) = {0.185864, -0.057536, 0.0};
Point(139) = {0.198168, -0.058068, 0.0};
Point(140) = {0.21059, -0.058474, 0.0};
Point(141) = {0.223117, -0.058761, 0.0};
Point(142) = {0.235737, -0.058934, 0.0};
Point(143) = {0.248437, -0.058999, 0.0};
Point(144) = {0.261211, -0.058961, 0.0};
Point(145) = {0.274049, -0.058826, 0.0};
Point(146) = {0.286946, -0.058597, 0.0};
Point(147) = {0.299897, -0.05828, 0.0};
Point(148) = {0.312899, -0.057879, 0.0};
Point(149) = {0.325948, -0.057399, 0.0};
Point(150) = {0.339039, -0.056843, 0.0};
Point(151) = {0.352169, -0.056215, 0.0};
Point(152) = {0.365336, -0.05552, 0.0};
Point(153) = {0.378538, -0.05476, 0.0};
Point(154) = {0.391772, -0.053939, 0.0};
Point(155) = {0.405037, -0.05306, 0.0};
Point(156) = {0.418331, -0.052127, 0.0};
Point(157) = {0.431653, -0.051142, 0.0};
Point(158) = {0.445002, -0.050108, 0.0};
Point(159) = {0.458376, -0.049029, 0.0};
Point(160) = {0.471775, -0.047906, 0.0};
Point(161) = {0.485196, -0.046743, 0.0};
Point(162) = {0.498643, -0.045541, 0.0};
Point(163) = {0.512113, -0.044305, 0.0};
Point(164) = {0.525607, -0.043035, 0.0};
Point(165) = {0.539122, -0.041736, 0.0};
Point(166) = {0.552657, -0.040409, 0.0};
Point(167) = {0.566214, -0.039056, 0.0};
Point(168) = {0.579794, -0.037681, 0.0};
Point(169) = {0.593396, -0.036284, 0.0};
Point(170) = {0.607019, -0.03487, 0.0};
Point(171) = {0.620661, -0.03344, 0.0};
Point(172) = {0.634324, -0.031996, 0.0};
Point(173) = {0.648008, -0.030541, 0.0};
Point(174) = {0.66171, -0.029077, 0.0};
Point(175) = {0.675428, -0.027609, 0.0};
Point(176) = {0.689153, -0.026138, 0.0};
Point(177) = {0.702872, -0.024669, 0.0};
Point(178) = {0.716575, -0.023205, 0.0};
Point(179) = {0.730256, -0.02175, 0.0};
Point(180) = {0.743914, -0.020307, 0.0};
Point(181) = {0.757549, -0.018877, 0.0};
Point(182) = {0.771158, -0.017465, 0.0};
Point(183) = {0.784739, -0.016073, 0.0};
Point(184) = {0.798289, -0.014705, 0.0};
Point(185) = {0.811808, -0.013363, 0.0};
Point(186) = {0.825293, -0.012052, 0.0};
Point(187) = {0.838743, -0.010775, 0.0};
Point(188) = {0.852151, -0.009534, 0.0};
Point(189) = {0.865506, -0.008336, 0.0};
Point(190) = {0.878795, -0.007186, 0.0};
Point(191) = {0.892003, -0.00609, 0.0};
Point(192) = {0.905101, -0.005053, 0.0};
Point(193) = {0.918042, -0.004084, 0.0};
Point(194) = {0.930755, -0.003194, 0.0};
Point(195) = {0.943142, -0.002392, 0.0};
Point(196) = {0.955063, -0.001691, 0.0};
Point(197) = {0.966346, -0.001103, 0.0};
Point(198) = {0.976821, -0.000634, 0.0};
Point(199) = {0.986348, -0.000287, 0.0};
Point(200) = {0.994866, -6.7e-05, 0.0};
Spline(1) = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22};
Spline(2) = {22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64};
Spline(3) = {64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101};
Spline(4) = {101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138};
Spline(5) = {138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180};
Spline(6) = {180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 1};
// assistant points
Point(201) = {25, 25, 0, 1.0};
Point(202) = {-25, 25, 0, 1.0};
Point(203) = {-25, -25, 0, 1.0};
Point(204) = {25, -25, 0, 1.0};
Point(205) = {0.25, 0, 0, 1.0};
Point(206) = {0.50, 0, 0, 1.0};
Point(207) = {0.75, 0, 0, 1.0};
Point(208) = {-12, 25, 0, 1.0};
Point(209) = {-12, -25, 0, 1.0};
Point(210) = {-25, 0, 0, 1.0};
Point(211) = {1, 25, 0, 1.0};
Point(212) = {1, -25, 0, 1.0};
Point(213) = {25, 0, 0, 1.0};
Line(7) = {64, 202};
Line(8) = {138, 203};
Line(9) = {22, 208};
Line(10) = {180, 209};
Line(11) = {1, 211};
Line(12) = {1, 212};
Line(13) = {101, 210};
Line(14) = {1, 213};
Line(15) = {213, 201};
Line(16) = {201, 211};
Line(17) = {211, 208};
Line(18) = {208, 202};
Line(19) = {202, 210};
Line(20) = {210, 203};
Line(21) = {203, 209};
Line(22) = {209, 212};
Line(23) = {212, 204};
Line(24) = {204, 213};
// block1
Curve Loop(2) = {14, 15, 16, -11};
Plane Surface(2) = {2};
// block2
Curve Loop(3) = {-1, 11, 17, -9};
Plane Surface(3) = {3};
// block3
Curve Loop(4) = {-2, 9, 18, -7};
Plane Surface(4) = {4};
// block4
Curve Loop(5) = {-3, 7, 19, -13};
Plane Surface(5) = {5};
// block5
Curve Loop(6) = {-4, 13, 20, -8};
Plane Surface(6) = {6};
// block6
Curve Loop(7) = {-5, 8, 21, -10};
Plane Surface(7) = {7};
// block7
Curve Loop(8) = {-6, 10, 22, -12};
Plane Surface(8) = {8};
// block8
Curve Loop(9) = {-14, 12, 23, 24};
Plane Surface(9) = {9};
// boundary ids
Physical Curve(0) = {19, 20}; // inlet
Physical Curve(1) = {15, 24}; // outlet
Physical Curve(2) = {3, 2, 1}; // upper airfoil surface
Physical Curve(3) = {4, 5, 6}; // lower airfoil surface
Physical Curve(4) = {18, 17, 16}; // upper
Physical Curve(5) = {21, 22, 23}; // lower
Physical Surface(0) = {2, 3, 4, 5, 6, 7, 8, 9}; // fluid domain
// Mesh
Transfinite Surface {2, 3, 4, 5, 6, 7, 8, 9};
Transfinite Curve{11, 9, 7} = 37 Using Progression 1.2;
Transfinite Curve{13} = 37 Using Progression 1.39;
Transfinite Curve{8, 10, 12} = 37 Using Progression 1.2;
Transfinite Curve{14} = 41 Using Progression 1.2;
Transfinite Curve{15, -24} = 37 Using Progression 1.1;
Transfinite Curve{-16, 23} = 41 Using Progression 1.05;
Transfinite Curve{1, -6} = 25 Using Progression 1.05;
Transfinite Curve{17, -22} = 25 Using Progression 1.05;
Transfinite Curve{2, -5} = 37 Using Bump 1.2;
Transfinite Curve{18, -21} = 37 Using Bump 5;
Transfinite Curve{-3} = 37 Using Progression 1.2;
Transfinite Curve{4} = 37 Using Progression 1.2;
Transfinite Curve{-19} = 37 Using Progression 1.02;
Transfinite Curve{20} = 37 Using Progression 1.02;
Recombine Surface{2, 3, 4, 5, 6, 7, 8, 9};
Source diff could not be displayed: it is too large. Options to address this: view the blob.
lc1 = 4.;
lc2 = 4.;
Point( 1) = { 0.00000, 0.00000, 0.0, lc1};
Point( 2) = { 0.00000, 63.50000, 0.0, lc1};
Point( 3) = { 7.87400, 63.50000, 0.0, lc1};
Point( 4) = { 22.25000, 57.57847, 0.0, lc1};
Point( 5) = { 55.87660, 24.05100, 0.0, lc2};
Point( 6) = { 64.83803, 20.32000, 0.0, lc2};
Point( 7) = { 68.14965, 20.76200, 0.0, lc2};
Point( 8) = { 185.03900, 52.32200, 0.0, lc1};
Point( 9) = { 185.03900, 0.00000, 0.0, lc1};
Point(10) = { 64.83803, 0.00000, 0.0, lc2};
// center of circle arcs
Point(11) = { 7.87400, 43.18000, 0.0, lc1};
Point(12) = { 64.83803, 32.95000, 0.0, lc2};
//
Line(1) = {1, 2};
Line(2) = {2, 3};
Circle(3) = {3, 11, 4};
Line(4) = {4, 5};
Circle(5) = {5, 12, 6};
Circle(6) = {6, 12, 7};
Line(7) = {7, 8};
Line(8) = {8, 9};
Line(9) = {9, 10};
Line(10) = {10, 1};
Line Loop(1) = {1:10};
Plane Surface(1) = {1};
Field[1] = BoundaryLayer;
Field[1].CurvesList = {2:7};
Field[1].PointsList = {2:8};
Field[1].Size = 0.1;
Field[1].SizeFar = 4.;
Field[1].Ratio = 1.2;
Field[1].Thickness = 2.;
Field[1].Quads = 1;
//Field[2] = MinAniso;
//Field[2].FieldsList = {1};
//Background Field = 2;
BoundaryLayer Field = 1;
// Set global parameters
DOM_SIZE = 1000. ;
TRANS_LAYER_THICK = 5. ;
TRANS_LAYER_DIVS = 8 ;
// ------------------ // ------------------------------------------------------------------------------- //
centreMeshFactor = 30; // default = 1, increase the factor to get a rougher mesh around the circle centre //
// ------------------ // ------------------------------------------------------------------------------- //
// the mesh sizes are computed to satisfy two constraints (number of elements across interphase thickness (8) and
// number of elements on the circle arc (480))
centreMeshSize = 5.36688745;
outerMeshSize = 5.36688745;
innerMeshSize = 5.23598776;
// Lists of bubble center coordinates (x,y) and bubble radii
bubble_xs[] = { 0. } ;
bubble_ys[] = { 0. } ;
bubble_rs[] = { 200. } ;
// Definition of a macro generating a bubble and its interphase layer
Macro GenerateBubble
pp = newp ;
Point( pp ) = { xc , yc , 0. , lc_centre} ;
Point( pp+1 ) = { xc + rp, yc , 0. , lc_inner} ;
Point( pp+2 ) = { xc , yc + rp, 0. , lc_inner} ;
Point( pp+3 ) = { xc - rp, yc , 0. , lc_inner} ;
Point( pp+4 ) = { xc , yc - rp, 0. , lc_inner} ;
Point( pp+5 ) = { xc + rp + wt, yc , 0. , lc_outer} ;
Point( pp+6 ) = { xc , yc + rp + wt, 0. , lc_outer} ;
Point( pp+7 ) = { xc - rp - wt, yc , 0. , lc_outer} ;
Point( pp+8 ) = { xc , yc - rp - wt, 0. , lc_outer} ;
lp = newl ;
Circle( lp ) = { pp+1 , pp , pp+2 } ;
Circle( lp+1 ) = { pp+2 , pp , pp+3 } ;
Circle( lp+2 ) = { pp+3 , pp , pp+4 } ;
Circle( lp+3 ) = { pp+4 , pp , pp+1 } ;
lt = newl ;
Circle( lt ) = { pp+5 , pp , pp+6 } ;
Circle( lt+1 ) = { pp+6 , pp , pp+7 } ;
Circle( lt+2 ) = { pp+7 , pp , pp+8 } ;
Circle( lt+3 ) = { pp+8 , pp , pp+5 } ;
Line( lt+4 ) = { pp+1 , pp+5 } ;
Line( lt+5 ) = { pp+2 , pp+6 } ;
Line( lt+6 ) = { pp+3 , pp+7 } ;
Line( lt+7 ) = { pp+4 , pp+8 } ;
llp = newll ;
Line Loop( llp ) = { lp:(lp+3) } ;
llt = newll ;
Line Loop( llt ) = { lt:(lt+3) } ;
Line Loop( llt+1 ) = { lt , -(lt+5), -lp , lt+4 } ;
Line Loop( llt+2 ) = { lt+1, -(lt+6), -(lp+1), lt+5 } ;
Line Loop( llt+3 ) = { lt+2, -(lt+7), -(lp+2), lt+6 } ;
Line Loop( llt+4 ) = { lt+3, -(lt+4), -(lp+3), lt+7 } ;
sp = news ;
Plane Surface( sp ) = { llp } ;
st = news ;
Plane Surface( st ) = { llt+1 } ;
Plane Surface( st+1 ) = { llt+2 } ;
Plane Surface( st+2 ) = { llt+3 } ;
Plane Surface( st+3 ) = { llt+4 } ;
Transfinite Line{ lp:(lp+3) } = 61; //Ceil[ ( ( nd + 1 ) * Pi * rp ) / ( 2. * wt ) ] ; Transfinite Line{ -lt:-(lt+3) } = 61; //Ceil[ ( ( nd + 1 ) * Pi * rp ) / ( 2. * wt ) ] ;
Transfinite Line{ lt+4, -(lt+5), lt+6, -(lt+7) } = 5; //( nd + 1 ) ;
Transfinite Surface{ st:(st+3) } ;
Recombine Surface{ st:(st+3) } ;
Hide { Line{ (lt+4):(lt+7) } ; }
Recursive Hide { Line{ lt:(lt+3) } ; }
// embed centre point into circle surface to get a rougher mesh size
Point{ pp } In Surface{ sp };
bubble_surfs[] += { sp } ;
interphase_surfs[] += { st:(st+3) } ;
interphase_edges[] += { lt:(lt+3) } ;
interphase_loops[] += { llt } ;
Return
// Domain construction
xd = DOM_SIZE / 2. ;
yd = DOM_SIZE / 2. ;
lcd = DOM_SIZE / 100. ;
pd = newp ;
Point( pd ) = { xd, yd, 0., lcd } ;
Point( pd+1 ) = { -xd, yd, 0., lcd } ;
Point( pd+2 ) = { -xd, -yd, 0., lcd } ;
Point( pd+3 ) = { xd, -yd, 0., lcd } ;
ld = newl ;
Line( ld ) = { pd , pd+1 } ;
Line( ld+1 ) = { pd+1 , pd+2 } ;
Line( ld+2 ) = { pd+2 , pd+3 } ;
Line( ld+3 ) = { pd+3 , pd } ;
lld = newll ;
Line Loop( lld ) = { ld:(ld+3) } ;
// Generate bubbles => ready storage lists
bubble_surfs[] = {} ;
interphase_surfs[] = {} ;
interphase_edges[] = {} ;
interphase_loops[] = {} ;
// Generate bubbles => Loop on bubbles
For i_bubble In { 0:(#bubble_xs[] - 1) }
// Generate bubbles => set bubble parameter
xc = bubble_xs[ i_bubble ] ;
yc = bubble_ys[ i_bubble ] ;
rp = bubble_rs[ i_bubble ] ;
wt = TRANS_LAYER_THICK ;
nd = TRANS_LAYER_DIVS ;
lc_centre = centreMeshFactor * centreMeshSize;
lc_inner = innerMeshSize;
lc_outer = outerMeshSize;
// Generate bubbles => Call macro
Call GenerateBubble ;
EndFor
// Finalize domain surface accounting for the holes created
// by the particles and their transition layers
sd = news ;
Plane Surface( sd ) = { lld, interphase_loops[] } ;
//Recombine Surface{ bubble_surfs[], sd } ;
// Coloring
Recursive Color Gray { Surface{ bubble_surfs[] } ; }
Recursive Color SkyBlue { Surface{ interphase_surfs[] } ; }
Recursive Color DarkBlue { Surface{ sd } ; }
// Physical tags
Physical Surface( "bubbles", 1000 ) = { bubble_surfs[] } ;
Physical Surface( "interphase layers", 2000 ) = { interphase_surfs[] } ;
Physical Surface( "medium", 3000 ) = { sd } ;
Mesh.Algorithm = 8;
Mesh.SubdivisionAlgorithm = 1;
Mesh.RecombinationAlgorithm = 1;
Mesh.RecombineAll = 1;
Mesh.RecombineOptimizeTopology = 25;
MeshAlgorithm Surface {24} = 5;
...@@ -98,17 +98,17 @@ Public License (GPL)</a>: ...@@ -98,17 +98,17 @@ Public License (GPL)</a>:
<ul> <ul>
<li> <li>
<div class="highlight"> <div class="highlight">
Current stable release (version 4.9.4, 3 February 2022): Current stable release (version 4.9.5, 21 February 2022):
<ul> <ul>
<li>Download Gmsh for <li>Download Gmsh for
<a href="bin/Windows/gmsh-4.9.4-Windows64.zip">Windows</a>, <a href="bin/Windows/gmsh-4.9.5-Windows64.zip">Windows</a>,
<a href="bin/Linux/gmsh-4.9.4-Linux64.tgz">Linux</a> or <a href="bin/Linux/gmsh-4.9.5-Linux64.tgz">Linux</a> or
<a href="bin/MacOSX/gmsh-4.9.4-MacOSX.dmg">macOS</a> <a href="#1"><sup>*</sup></a> <a href="bin/MacOSX/gmsh-4.9.5-MacOSX.dmg">macOS</a> <a href="#1"><sup>*</sup></a>
<li>Download the <a href="src/gmsh-4.9.4-source.tgz">source code</a> <li>Download the <a href="src/gmsh-4.9.5-source.tgz">source code</a>
<li>Download the Software Development Kit (SDK) for <li>Download the Software Development Kit (SDK) for
<a href="bin/Windows/gmsh-4.9.4-Windows64-sdk.zip">Windows</a>, <a href="bin/Windows/gmsh-4.9.5-Windows64-sdk.zip">Windows</a>,
<a href="bin/Linux/gmsh-4.9.4-Linux64-sdk.tgz">Linux</a> or <a href="bin/Linux/gmsh-4.9.5-Linux64-sdk.tgz">Linux</a> or
<a href="bin/MacOSX/gmsh-4.9.4-MacOSX-sdk.tgz">macOS</a> <a href="#1"><sup>*</sup></a> <a href="bin/MacOSX/gmsh-4.9.5-MacOSX-sdk.tgz">macOS</a> <a href="#1"><sup>*</sup></a>
<li>Download both Gmsh and the SDK with pip: '<code>pip install --upgrade <li>Download both Gmsh and the SDK with pip: '<code>pip install --upgrade
<a href="https://pypi.org/project/gmsh/">gmsh</a></code>' <a href="https://pypi.org/project/gmsh/">gmsh</a></code>'
</ul> </ul>
......
import gmsh
gmsh.initialize()
b = gmsh.model.occ.addBox(0,0,0, 1,1,0.5)
s = gmsh.model.occ.addSphere(1,1,0.5,0.4)
c = gmsh.model.occ.cut([(3, b)], [(3, s)])
b1 = gmsh.model.occ.addBox(0.3,0.3,0.4, 0.1,0.1,0.1)
b2 = gmsh.model.occ.addBox(0.5,0.5,0.4, 0.1,0.1,0.1)
gmsh.model.occ.fragment([(3, b1), (3, b2)], c[0])
gmsh.model.occ.synchronize()
size_bulk = 0.04
size_small = 0.002
dist_max = 0.2
power = 2
gmsh.model.mesh.setSize(gmsh.model.getEntities(0), size_bulk)
gmsh.model.mesh.setSize(gmsh.model.getBoundary([(3, b1), (3, b2)], recursive=True), size_small)
# new "Extend" field:
f = gmsh.model.mesh.field.add("Extend")
gmsh.model.mesh.field.setNumbers(f, "SurfacesList",
[e[1] for e in gmsh.model.getEntities(2)])
gmsh.model.mesh.field.setNumbers(f, "CurvesList",
[e[1] for e in gmsh.model.getEntities(1)])
gmsh.model.mesh.field.setNumber(f, "DistMax", dist_max)
gmsh.model.mesh.field.setNumber(f, "SizeMax", size_bulk)
gmsh.model.mesh.field.setNumber(f, "Power", power)
gmsh.model.mesh.field.setAsBackgroundMesh(f)
gmsh.option.setNumber("Mesh.MeshSizeExtendFromBoundary", 0)
# new 3D algo:
gmsh.option.setNumber("Mesh.Algorithm3D", 10)
gmsh.fltk.run()
import gmsh
gmsh.initialize()
gmsh.model.occ.addBox(0,0,0,1,1,1)
gmsh.model.occ.addBox(1,0,0,1,1,1)
gmsh.model.occ.removeAllDuplicates()
gmsh.model.occ.synchronize()
gmsh.model.mesh.generate(3)
# Mesh.MeshOnlyVisible can be used to selectively mesh, or in this case set the
# order, on parts of a model
gmsh.option.setNumber('Mesh.MeshOnlyVisible', 1)
gmsh.model.setVisibility([(3,2)], 0, recursive=True)
gmsh.model.mesh.setOrder(2) # only on volume 1
gmsh.model.setVisibility([(3,2)], 1, recursive=True)
gmsh.fltk.run()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment