Index: bugs/round1/fileio_split/bug.fix.m =================================================================== --- bugs/round1/fileio_split/bug.fix.m (revision 22980) +++ bugs/round1/fileio_split/bug.fix.m (nonexistent) @@ -1,134 +0,0 @@ -%%% Board mesh, part 1 -unit = 1.0e-3; -f_max = 7e9; -FDTD = InitFDTD(); -FDTD = SetGaussExcite(FDTD, f_max/2, f_max/2); -BC = {'PML_8' 'PML_8' 'PML_8' 'PML_8' 'PML_8' 'PML_8'}; -FDTD = SetBoundaryCond(FDTD, BC); -physical_constants; -CSX = InitCSX(); - -%%% User tunables - -%% base_priority and offset: chassis for the board to sit in. -% base priority: if the board displaces the model of the chassis or the other way around. -base_priority=0; - -% offset on the whole layout to locate it relative to the simulation origin -offset.x = 0.0000; -offset.y = 0.0000; -offset.z = 0; - -% void is the material used for: fill holes, cutouts in substrate, etc -void.name = 'AIR'; -void.epsilon = 1.000000; -void.mue = 1.000000; -% void.kappa = kappa; -% void.sigma = sigma; - -% how many points should be used to describe the round end of traces. -kludge.segments = 10; - - -%%% Board mesh, part 2 -z_bottom_copper=4.5000 -mesh.y=[12.4500 12.1833 11.8000 11.3000 0.0000 0.4913 0.9826 1.4739 1.9652 2.4565 2.9478 3.4391 3.9304 4.4217 4.9130 5.4043 5.8956 6.3870 6.8783 7.3696 7.8609 8.3522 8.8435 9.3348 9.8261 10.3174 10.8087 12.6000 12.7500 12.7500 12.8982 13.0465 13.1947 13.3429 13.4912 13.6394 13.7876 13.9359 14.0841 14.2324 14.3806 14.5288 14.6771 14.8253 14.9735 15.1218 15.2700 15.4182 15.5665 15.7147 15.8629 16.0112 16.1594 16.3076 16.4559 16.6041 16.7523 16.9006 17.0488 17.1971 17.3453 17.4935 17.6418 17.7900 17.9382 18.0865 18.2347 18.3829 18.5312 18.6794 18.8276 18.9759 19.1241 19.2723 19.4206 19.5688 19.7170 19.8653 20.0135 20.1618 20.3100 20.4582 20.6065 20.7547 20.9029 21.0512 21.1994 21.3476 21.4959 21.6441 21.7923 21.9406 22.0888 22.2370 22.3853 22.5335 22.6817 22.8300 22.9782 23.1264 23.2747 23.4229 23.5712 23.7194 23.8676 24.0159 24.1641 24.3123 24.4606 24.6088 24.7570 24.9053 25.0535 25.2017 25.3500 25.5000 25.5000 25.6500 25.9167 26.3000 26.8000 27.2985 27.7970 28.2955 28.7940 29.2925 29.7910 30.2895 30.7881 31.2866 31.7851 32.2836 32.7821 33.2806 33.7791 34.2776 34.7761 35.2746 35.7731 36.2716 36.7701 37.2686 37.7672 38.2657 38.7642 39.2627 39.7612 40.2597 40.7582 41.2567 41.7552 42.2537 42.7522 43.2507 43.7492 44.2477 44.7462 45.2448 45.7433 46.2418 46.7403 47.2388 47.7373 48.2358 48.7343 49.2328 49.7313 50.2298 50.7283 51.2268 51.7253 52.2239 52.7224 53.2209 53.7194 54.2179 54.7164 55.2149 55.7134 56.2119 56.7104 57.2089 57.7074 58.2059 58.7044 59.2030 59.7015 60.2000 60.6985 61.1970 61.6955 62.1940 62.6925 63.1910 63.6895 64.1880 64.6865 65.1850 65.6835 66.1820 66.6806 67.1791 67.6776 68.1761 68.6746 69.1731 69.6716 70.1701 70.6686 71.1671 71.6656 72.1641 72.6626 73.1611 73.6597 74.1582 74.6567 75.1552 75.6537 76.1522 76.6507 77.1492 77.6477 78.1462 78.6447 79.1432 79.6417 80.1402 80.6388 81.1373 81.6358 82.1343 82.6328 83.1313 83.6298 84.1283 84.6268 85.1253 85.6238 86.1223 86.6208 87.1193 87.6179 88.1164 88.6149 89.1134 89.6119 90.1104 90.6089 91.1074 91.6059 92.1044 92.6029 93.1014 93.5999 94.0984 94.5969 95.0955 95.5940 96.0925 96.5910 97.0895 97.5880 98.0865 98.5850 99.0835 99.5820 100.0805 100.5790 101.0775 101.5760 102.0746 102.5731 103.0716 103.5701 104.0686 104.5671 105.0656 105.5641 106.0626 106.5611 107.0596 107.5581 108.0566 108.5551 109.0537 109.5522 110.0507 110.5492 111.0477 111.5462 112.0447 112.5432 113.0417 113.5402 114.0387 114.5372 115.0357 115.5342 116.0327 116.5313 117.0298 117.5283 118.0268 118.5253 119.0238 119.5223 120.0208 120.5193 121.0178 121.5163 122.0148 122.5133 123.0118 123.5104 124.0089 124.5074 125.0059 125.5044 126.0029 126.5014 127.0000]; -mesh.x=[12.4500 12.1833 11.8000 11.3000 0.0000 0.4913 0.9826 1.4739 1.9652 2.4565 2.9478 3.4391 3.9304 4.4217 4.9130 5.4043 5.8956 6.3870 6.8783 7.3696 7.8609 8.3522 8.8435 9.3348 9.8261 10.3174 10.8087 12.6000 12.7500 12.7500 12.8982 13.0465 13.1947 13.3429 13.4912 13.6394 13.7876 13.9359 14.0841 14.2324 14.3806 14.5288 14.6771 14.8253 14.9735 15.1218 15.2700 15.4182 15.5665 15.7147 15.8629 16.0112 16.1594 16.3076 16.4559 16.6041 16.7523 16.9006 17.0488 17.1971 17.3453 17.4935 17.6418 17.7900 17.9382 18.0865 18.2347 18.3829 18.5312 18.6794 18.8276 18.9759 19.1241 19.2723 19.4206 19.5688 19.7170 19.8653 20.0135 20.1618 20.3100 20.4582 20.6065 20.7547 20.9029 21.0512 21.1994 21.3476 21.4959 21.6441 21.7923 21.9406 22.0888 22.2370 22.3853 22.5335 22.6817 22.8300 22.9782 23.1264 23.2747 23.4229 23.5712 23.7194 23.8676 24.0159 24.1641 24.3123 24.4606 24.6088 24.7570 24.9053 25.0535 25.2017 25.3500 25.5000 25.5000 25.6500 25.9167 26.3000 26.8000 27.2985 27.7970 28.2955 28.7940 29.2925 29.7910 30.2895 30.7881 31.2866 31.7851 32.2836 32.7821 33.2806 33.7791 34.2776 34.7761 35.2746 35.7731 36.2716 36.7701 37.2686 37.7672 38.2657 38.7642 39.2627 39.7612 40.2597 40.7582 41.2567 41.7552 42.2537 42.7522 43.2507 43.7492 44.2477 44.7462 45.2448 45.7433 46.2418 46.7403 47.2388 47.7373 48.2358 48.7343 49.2328 49.7313 50.2298 50.7283 51.2268 51.7253 52.2239 52.7224 53.2209 53.7194 54.2179 54.7164 55.2149 55.7134 56.2119 56.7104 57.2089 57.7074 58.2059 58.7044 59.2030 59.7015 60.2000 60.6985 61.1970 61.6955 62.1940 62.6925 63.1910 63.6895 64.1880 64.6865 65.1850 65.6835 66.1820 66.6806 67.1791 67.6776 68.1761 68.6746 69.1731 69.6716 70.1701 70.6686 71.1671 71.6656 72.1641 72.6626 73.1611 73.6597 74.1582 74.6567 75.1552 75.6537 76.1522 76.6507 77.1492 77.6477 78.1462 78.6447 79.1432 79.6417 80.1402 80.6388 81.1373 81.6358 82.1343 82.6328 83.1313 83.6298 84.1283 84.6268 85.1253 85.6238 86.1223 86.6208 87.1193 87.6179 88.1164 88.6149 89.1134 89.6119 90.1104 90.6089 91.1074 91.6059 92.1044 92.6029 93.1014 93.5999 94.0984 94.5969 95.0955 95.5940 96.0925 96.5910 97.0895 97.5880 98.0865 98.5850 99.0835 99.5820 100.0805 100.5790 101.0775 101.5760 102.0746 102.5731 103.0716 103.5701 104.0686 104.5671 105.0656 105.5641 106.0626 106.5611 107.0596 107.5581 108.0566 108.5551 109.0537 109.5522 110.0507 110.5492 111.0477 111.5462 112.0447 112.5432 113.0417 113.5402 114.0387 114.5372 115.0357 115.5342 116.0327 116.5313 117.0298 117.5283 118.0268 118.5253 119.0238 119.5223 120.0208 120.5193 121.0178 121.5163 122.0148 122.5133 123.0118 123.5104 124.0089 124.5074 125.0059 125.5044 126.0029 126.5014 127.0000]; -mesh.z=[0.0000 0.2500 0.5000 0.7500 1.0000 1.2500 1.5000 1.7500 2.0000 2.2500 2.5000 2.7500 3.0000 3.2500 3.5000 3.7500 4.0000 4.2500 4.5000 -4.0000 -3.3333 -2.6667 -2.0000 -1.3333 -0.6667 4.5000 5.1667 5.8333 6.5000 7.1667 7.8333]; -mesh.x = mesh.x .+ offset.x; -mesh.y = offset.y .- mesh.y; -mesh.z = z_bottom_copper .- mesh.z .+ offset.z; -CSX = DefineRectGrid(CSX, unit, mesh); - -%%% Layer mapping -layers(1).number = 1; -layers(1).name = 'top_copper'; -layers(1).clearn = 0; -layer_types(1).name = 'COPPER_1'; -layer_types(1).subtype = 2; -layer_types(1).thickness = 0.0254; -layer_types(1).conductivity = 56*10^6; - -layers(2).number = 2; -layers(2).name = 'grp_4'; -layers(2).clearn = 0; -layer_types(2).name = 'SUBSTRATE_2'; -layer_types(2).subtype = 3; -layer_types(2).thickness = 1.5000; -layer_types(2).epsilon = 3.66; -layer_types(2).mue = 0; -layer_types(2).kappa = 0; -layer_types(2).sigma = 0; - -layers(3).number = 3; -layers(3).name = 'Intern'; -layers(3).clearn = 0; -layer_types(3).name = 'COPPER_3'; -layer_types(3).subtype = 2; -layer_types(3).thickness = 0.0254; -layer_types(3).conductivity = 56*10^6; - -layers(4).number = 4; -layers(4).name = 'grp_6'; -layers(4).clearn = 0; -layer_types(4).name = 'SUBSTRATE_4'; -layer_types(4).subtype = 3; -layer_types(4).thickness = 1.5000; -layer_types(4).epsilon = 3.66; -layer_types(4).mue = 0; -layer_types(4).kappa = 0; -layer_types(4).sigma = 0; - -layers(5).number = 5; -layers(5).name = 'Intern'; -layers(5).clearn = 0; -layer_types(5).name = 'COPPER_5'; -layer_types(5).subtype = 2; -layer_types(5).thickness = 0.0254; -layer_types(5).conductivity = 56*10^6; - -layers(6).number = 6; -layers(6).name = 'grp_8'; -layers(6).clearn = 0; -layer_types(6).name = 'SUBSTRATE_6'; -layer_types(6).subtype = 3; -layer_types(6).thickness = 1.5000; -layer_types(6).epsilon = 3.66; -layer_types(6).mue = 0; -layer_types(6).kappa = 0; -layer_types(6).sigma = 0; - -layers(7).number = 7; -layers(7).name = 'bottom_copper'; -layers(7).clearn = 0; -layer_types(7).name = 'COPPER_7'; -layer_types(7).subtype = 2; -layer_types(7).thickness = 0.0254; -layer_types(7).conductivity = 56*10^6; - - -%%% Initialize pcb2csx -PCBRND = InitPCBRND(layers, layer_types, void, base_priority, offset, kludge); -CSX = InitPcbrndLayers(CSX, PCBRND); - -%%% Board outline -outline_xy(1, 1) = 0; outline_xy(2, 1) = 0; -outline_xy(1, 2) = 127.0000; outline_xy(2, 2) = 0; -outline_xy(1, 3) = 127.0000; outline_xy(2, 3) = -127.0000; -outline_xy(1, 4) = 0; outline_xy(2, 4) = -127.0000; -CSX = AddPcbrndPoly(CSX, PCBRND, 2, outline_xy, 1); -CSX = AddPcbrndPoly(CSX, PCBRND, 4, outline_xy, 1); -CSX = AddPcbrndPoly(CSX, PCBRND, 6, outline_xy, 1); - -%%% Copper objects -poly0_xy(1, 1) = 12.7000; poly0_xy(2, 1) = -12.7000; -poly0_xy(1, 2) = 25.4000; poly0_xy(2, 2) = -12.7000; -poly0_xy(1, 3) = 25.4000; poly0_xy(2, 3) = -25.4000; -poly0_xy(1, 4) = 12.7000; poly0_xy(2, 4) = -25.4000; -CSX = AddPcbrndPoly(CSX, PCBRND, 1, poly0_xy, 1); -%%% Port(s) on terminals - -Sim_Path = 'openems'; % a path is required. to use the current directory just leave this field null -Sim_CSX = 'csxcad.xml'; % the file name is manditory, sadly the other files it will dump out are not under our control -WriteOpenEMS( [Sim_Path '/' Sim_CSX], FDTD, CSX ); -