.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/topology_optimization/plot_topology_optimization_MBB.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_topology_optimization_plot_topology_optimization_MBB.py: Solve a 2D MBB topology optimization problem ============================================ .. GENERATED FROM PYTHON SOURCE LINES 23-31 .. code-block:: Python from __future__ import annotations from gemseo import create_scenario from gemseo.problems.topology_optimization.topopt_initialize import ( initialize_design_space_and_discipline_to, ) .. GENERATED FROM PYTHON SOURCE LINES 32-34 Setup the topology optimization problem --------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 36-37 Define the target volume fraction: .. GENERATED FROM PYTHON SOURCE LINES 37-39 .. code-block:: Python volume_fraction = 0.3 .. GENERATED FROM PYTHON SOURCE LINES 40-41 Define the problem type: .. GENERATED FROM PYTHON SOURCE LINES 41-43 .. code-block:: Python problem_name = "MBB" .. GENERATED FROM PYTHON SOURCE LINES 44-45 Define the number of elements in x- and y- directions: .. GENERATED FROM PYTHON SOURCE LINES 45-48 .. code-block:: Python n_x = 50 n_y = 25 .. GENERATED FROM PYTHON SOURCE LINES 49-50 Define the full material Young's modulus and the Poisson's ratio: .. GENERATED FROM PYTHON SOURCE LINES 50-53 .. code-block:: Python e0 = 1 nu = 0.3 .. GENERATED FROM PYTHON SOURCE LINES 54-55 Define the penalty of the SIMP approach: .. GENERATED FROM PYTHON SOURCE LINES 55-57 .. code-block:: Python penalty = 3 .. GENERATED FROM PYTHON SOURCE LINES 58-59 Define the minimum member size in the solution: .. GENERATED FROM PYTHON SOURCE LINES 59-60 .. code-block:: Python min_member_size = 1.5 .. GENERATED FROM PYTHON SOURCE LINES 61-62 Instantiate the :class:`.DesignSpace` and the disciplines: .. GENERATED FROM PYTHON SOURCE LINES 62-73 .. code-block:: Python design_space, disciplines = initialize_design_space_and_discipline_to( problem=problem_name, n_x=n_x, n_y=n_y, e0=e0, nu=nu, penalty=penalty, min_member_size=min_member_size, vf0=volume_fraction, ) .. GENERATED FROM PYTHON SOURCE LINES 74-77 Solve the topology optimization problem --------------------------------------- Generate an :class:`.MDOScenario` .. GENERATED FROM PYTHON SOURCE LINES 77-84 .. code-block:: Python scenario = create_scenario( disciplines, "compliance", design_space, formulation_name="DisciplinaryOpt", ) .. GENERATED FROM PYTHON SOURCE LINES 85-86 Add the volume fraction constraint to the scenario: .. GENERATED FROM PYTHON SOURCE LINES 86-90 .. code-block:: Python scenario.add_constraint( "volume fraction", constraint_type="ineq", value=volume_fraction ) .. GENERATED FROM PYTHON SOURCE LINES 91-92 Generate the XDSM .. GENERATED FROM PYTHON SOURCE LINES 92-94 .. code-block:: Python scenario.xdsmize(save_html=False) .. raw:: html


.. GENERATED FROM PYTHON SOURCE LINES 95-96 Execute the scenario .. GENERATED FROM PYTHON SOURCE LINES 96-98 .. code-block:: Python scenario.execute(algo_name="NLOPT_MMA", max_iter=200) .. rst-class:: sphx-glr-script-out .. code-block:: none INFO - 16:24:29: *** Start MDOScenario execution *** INFO - 16:24:29: MDOScenario INFO - 16:24:29: Disciplines: DensityFilter FiniteElementAnalysis MaterialModelInterpolation VolumeFraction INFO - 16:24:29: MDO formulation: DisciplinaryOpt INFO - 16:24:30: Optimization problem: INFO - 16:24:30: minimize compliance(x) INFO - 16:24:30: with respect to x INFO - 16:24:30: under the inequality constraints INFO - 16:24:30: volume fraction(x) <= 0.3 INFO - 16:24:30: Solving optimization problem with algorithm NLOPT_MMA: INFO - 16:24:30: 1%| | 2/200 [00:00<00:05, 39.56 it/sec, feas=True, obj=1.79e+3] INFO - 16:24:30: 2%|▏ | 3/200 [00:00<00:04, 42.52 it/sec, feas=True, obj=1.78e+3] INFO - 16:24:30: 2%|▏ | 4/200 [00:00<00:04, 44.68 it/sec, feas=True, obj=1.77e+3] INFO - 16:24:30: 2%|▎ | 5/200 [00:00<00:04, 45.73 it/sec, feas=True, obj=1.75e+3] INFO - 16:24:30: 3%|▎ | 6/200 [00:00<00:04, 46.22 it/sec, feas=True, obj=1.71e+3] INFO - 16:24:30: 4%|▎ | 7/200 [00:00<00:04, 46.99 it/sec, feas=True, obj=1.65e+3] INFO - 16:24:30: 4%|▍ | 8/200 [00:00<00:04, 47.22 it/sec, feas=True, obj=1.41e+3] INFO - 16:24:30: 4%|▍ | 9/200 [00:00<00:03, 47.84 it/sec, feas=True, obj=1.19e+3] INFO - 16:24:30: 5%|▌ | 10/200 [00:00<00:03, 48.14 it/sec, feas=True, obj=903] INFO - 16:24:30: 6%|▌ | 11/200 [00:00<00:03, 48.47 it/sec, feas=True, obj=724] INFO - 16:24:30: 6%|▌ | 12/200 [00:00<00:03, 48.86 it/sec, feas=True, obj=612] INFO - 16:24:30: 6%|▋ | 13/200 [00:00<00:03, 49.12 it/sec, feas=True, obj=534] INFO - 16:24:30: 7%|▋ | 14/200 [00:00<00:03, 49.31 it/sec, feas=True, obj=474] INFO - 16:24:30: 8%|▊ | 15/200 [00:00<00:03, 49.57 it/sec, feas=True, obj=444] INFO - 16:24:30: 8%|▊ | 16/200 [00:00<00:03, 49.86 it/sec, feas=True, obj=419] INFO - 16:24:30: 8%|▊ | 17/200 [00:00<00:03, 50.18 it/sec, feas=True, obj=405] INFO - 16:24:30: 9%|▉ | 18/200 [00:00<00:03, 50.50 it/sec, feas=True, obj=387] INFO - 16:24:30: 10%|▉ | 19/200 [00:00<00:03, 50.60 it/sec, feas=True, obj=364] INFO - 16:24:30: 10%|█ | 20/200 [00:00<00:03, 50.76 it/sec, feas=True, obj=338] INFO - 16:24:30: 10%|█ | 21/200 [00:00<00:03, 50.86 it/sec, feas=True, obj=306] INFO - 16:24:30: 11%|█ | 22/200 [00:00<00:03, 51.03 it/sec, feas=True, obj=272] INFO - 16:24:30: 12%|█▏ | 23/200 [00:00<00:03, 51.32 it/sec, feas=True, obj=253] INFO - 16:24:30: 12%|█▏ | 24/200 [00:00<00:03, 51.40 it/sec, feas=True, obj=244] INFO - 16:24:30: 12%|█▎ | 25/200 [00:00<00:03, 51.61 it/sec, feas=True, obj=234] INFO - 16:24:30: 13%|█▎ | 26/200 [00:00<00:03, 51.71 it/sec, feas=True, obj=224] INFO - 16:24:30: 14%|█▎ | 27/200 [00:00<00:03, 51.89 it/sec, feas=True, obj=213] INFO - 16:24:30: 14%|█▍ | 28/200 [00:00<00:03, 52.25 it/sec, feas=True, obj=207] INFO - 16:24:30: 14%|█▍ | 29/200 [00:00<00:03, 52.51 it/sec, feas=True, obj=202] INFO - 16:24:30: 15%|█▌ | 30/200 [00:00<00:03, 52.78 it/sec, feas=True, obj=197] INFO - 16:24:30: 16%|█▌ | 31/200 [00:00<00:03, 53.04 it/sec, feas=True, obj=193] INFO - 16:24:30: 16%|█▌ | 32/200 [00:00<00:03, 53.30 it/sec, feas=True, obj=190] INFO - 16:24:30: 16%|█▋ | 33/200 [00:00<00:03, 53.56 it/sec, feas=True, obj=188] INFO - 16:24:30: 17%|█▋ | 34/200 [00:00<00:03, 53.57 it/sec, feas=True, obj=186] INFO - 16:24:30: 18%|█▊ | 35/200 [00:00<00:03, 53.76 it/sec, feas=True, obj=185] INFO - 16:24:30: 18%|█▊ | 36/200 [00:00<00:03, 54.01 it/sec, feas=True, obj=184] INFO - 16:24:30: 18%|█▊ | 37/200 [00:00<00:03, 54.15 it/sec, feas=True, obj=183] INFO - 16:24:30: 19%|█▉ | 38/200 [00:00<00:02, 54.32 it/sec, feas=True, obj=182] INFO - 16:24:30: 20%|█▉ | 39/200 [00:00<00:02, 54.53 it/sec, feas=True, obj=181] INFO - 16:24:30: 20%|██ | 40/200 [00:00<00:02, 54.70 it/sec, feas=True, obj=179] INFO - 16:24:30: 20%|██ | 41/200 [00:00<00:02, 54.84 it/sec, feas=True, obj=177] INFO - 16:24:30: 21%|██ | 42/200 [00:00<00:02, 54.92 it/sec, feas=True, obj=175] INFO - 16:24:30: 22%|██▏ | 43/200 [00:00<00:02, 55.10 it/sec, feas=True, obj=174] INFO - 16:24:30: 22%|██▏ | 44/200 [00:00<00:02, 55.14 it/sec, feas=True, obj=173] INFO - 16:24:30: 22%|██▎ | 45/200 [00:00<00:02, 55.32 it/sec, feas=True, obj=172] INFO - 16:24:30: 23%|██▎ | 46/200 [00:00<00:02, 55.52 it/sec, feas=True, obj=172] INFO - 16:24:30: 24%|██▎ | 47/200 [00:00<00:02, 55.68 it/sec, feas=True, obj=172] INFO - 16:24:30: 24%|██▍ | 48/200 [00:00<00:02, 55.87 it/sec, feas=True, obj=172] INFO - 16:24:30: 24%|██▍ | 49/200 [00:00<00:02, 56.05 it/sec, feas=True, obj=172] INFO - 16:24:30: 25%|██▌ | 50/200 [00:00<00:02, 56.21 it/sec, feas=True, obj=172] INFO - 16:24:30: 26%|██▌ | 51/200 [00:00<00:02, 56.32 it/sec, feas=True, obj=172] INFO - 16:24:30: 26%|██▌ | 52/200 [00:00<00:02, 56.44 it/sec, feas=True, obj=172] INFO - 16:24:30: 26%|██▋ | 53/200 [00:00<00:02, 56.57 it/sec, feas=True, obj=172] INFO - 16:24:30: 27%|██▋ | 54/200 [00:00<00:02, 56.68 it/sec, feas=True, obj=172] INFO - 16:24:30: 28%|██▊ | 55/200 [00:00<00:02, 56.80 it/sec, feas=True, obj=172] INFO - 16:24:30: 28%|██▊ | 56/200 [00:00<00:02, 56.91 it/sec, feas=True, obj=172] INFO - 16:24:31: 28%|██▊ | 57/200 [00:00<00:02, 57.04 it/sec, feas=True, obj=172] INFO - 16:24:31: 29%|██▉ | 58/200 [00:01<00:02, 57.14 it/sec, feas=True, obj=171] INFO - 16:24:31: 30%|██▉ | 59/200 [00:01<00:02, 57.26 it/sec, feas=True, obj=171] INFO - 16:24:31: 30%|███ | 60/200 [00:01<00:02, 57.45 it/sec, feas=True, obj=171] INFO - 16:24:31: 30%|███ | 61/200 [00:01<00:02, 57.59 it/sec, feas=True, obj=171] INFO - 16:24:31: 31%|███ | 62/200 [00:01<00:02, 57.70 it/sec, feas=True, obj=171] INFO - 16:24:31: 32%|███▏ | 63/200 [00:01<00:02, 57.81 it/sec, feas=True, obj=171] INFO - 16:24:31: 32%|███▏ | 64/200 [00:01<00:02, 57.89 it/sec, feas=True, obj=171] INFO - 16:24:31: 32%|███▎ | 65/200 [00:01<00:02, 57.96 it/sec, feas=True, obj=171] INFO - 16:24:31: 33%|███▎ | 66/200 [00:01<00:02, 58.07 it/sec, feas=True, obj=171] INFO - 16:24:31: 34%|███▎ | 67/200 [00:01<00:02, 58.18 it/sec, feas=True, obj=171] INFO - 16:24:31: 34%|███▍ | 68/200 [00:01<00:02, 58.26 it/sec, feas=True, obj=171] INFO - 16:24:31: 34%|███▍ | 69/200 [00:01<00:02, 58.35 it/sec, feas=True, obj=171] INFO - 16:24:31: 35%|███▌ | 70/200 [00:01<00:02, 58.43 it/sec, feas=True, obj=171] INFO - 16:24:31: 36%|███▌ | 71/200 [00:01<00:02, 58.46 it/sec, feas=True, obj=171] INFO - 16:24:31: 36%|███▌ | 72/200 [00:01<00:02, 58.50 it/sec, feas=True, obj=171] INFO - 16:24:31: 36%|███▋ | 73/200 [00:01<00:02, 58.55 it/sec, feas=True, obj=171] INFO - 16:24:31: 37%|███▋ | 74/200 [00:01<00:02, 58.62 it/sec, feas=True, obj=171] INFO - 16:24:31: 38%|███▊ | 75/200 [00:01<00:02, 58.66 it/sec, feas=True, obj=171] INFO - 16:24:31: 38%|███▊ | 76/200 [00:01<00:02, 58.72 it/sec, feas=True, obj=171] INFO - 16:24:31: 38%|███▊ | 77/200 [00:01<00:02, 58.80 it/sec, feas=True, obj=171] INFO - 16:24:31: 39%|███▉ | 78/200 [00:01<00:02, 58.86 it/sec, feas=True, obj=171] INFO - 16:24:31: 40%|███▉ | 79/200 [00:01<00:02, 58.99 it/sec, feas=True, obj=171] INFO - 16:24:31: 40%|████ | 80/200 [00:01<00:02, 59.07 it/sec, feas=True, obj=171] INFO - 16:24:31: 40%|████ | 81/200 [00:01<00:02, 59.16 it/sec, feas=True, obj=171] INFO - 16:24:31: 41%|████ | 82/200 [00:01<00:01, 59.23 it/sec, feas=True, obj=171] INFO - 16:24:31: 42%|████▏ | 83/200 [00:01<00:01, 59.29 it/sec, feas=True, obj=171] INFO - 16:24:31: 42%|████▏ | 84/200 [00:01<00:01, 59.35 it/sec, feas=True, obj=171] INFO - 16:24:31: 42%|████▎ | 85/200 [00:01<00:01, 59.39 it/sec, feas=True, obj=171] INFO - 16:24:31: 43%|████▎ | 86/200 [00:01<00:01, 59.43 it/sec, feas=True, obj=171] INFO - 16:24:31: 44%|████▎ | 87/200 [00:01<00:01, 59.45 it/sec, feas=True, obj=171] INFO - 16:24:31: 44%|████▍ | 88/200 [00:01<00:01, 59.48 it/sec, feas=True, obj=171] INFO - 16:24:31: 44%|████▍ | 89/200 [00:01<00:01, 59.53 it/sec, feas=True, obj=171] INFO - 16:24:31: 45%|████▌ | 90/200 [00:01<00:01, 59.59 it/sec, feas=True, obj=171] INFO - 16:24:31: 46%|████▌ | 91/200 [00:01<00:01, 59.66 it/sec, feas=True, obj=171] INFO - 16:24:31: 46%|████▌ | 92/200 [00:01<00:01, 59.73 it/sec, feas=True, obj=171] INFO - 16:24:31: 46%|████▋ | 93/200 [00:01<00:01, 59.80 it/sec, feas=True, obj=171] INFO - 16:24:31: 47%|████▋ | 94/200 [00:01<00:01, 59.86 it/sec, feas=True, obj=171] INFO - 16:24:31: 48%|████▊ | 95/200 [00:01<00:01, 59.93 it/sec, feas=True, obj=171] INFO - 16:24:31: 48%|████▊ | 96/200 [00:01<00:01, 59.99 it/sec, feas=True, obj=171] INFO - 16:24:31: 48%|████▊ | 97/200 [00:01<00:01, 60.03 it/sec, feas=True, obj=171] INFO - 16:24:31: 49%|████▉ | 98/200 [00:01<00:01, 59.95 it/sec, feas=True, obj=171] INFO - 16:24:31: 50%|████▉ | 99/200 [00:01<00:01, 59.92 it/sec, feas=True, obj=171] INFO - 16:24:31: 50%|█████ | 100/200 [00:01<00:01, 59.93 it/sec, feas=True, obj=171] INFO - 16:24:31: 50%|█████ | 101/200 [00:01<00:01, 59.96 it/sec, feas=True, obj=171] INFO - 16:24:31: 51%|█████ | 102/200 [00:01<00:01, 60.01 it/sec, feas=True, obj=171] INFO - 16:24:31: 52%|█████▏ | 103/200 [00:01<00:01, 60.05 it/sec, feas=True, obj=171] INFO - 16:24:31: 52%|█████▏ | 104/200 [00:01<00:01, 60.09 it/sec, feas=True, obj=171] INFO - 16:24:31: 52%|█████▎ | 105/200 [00:01<00:01, 60.13 it/sec, feas=True, obj=171] INFO - 16:24:31: 53%|█████▎ | 106/200 [00:01<00:01, 60.18 it/sec, feas=True, obj=171] INFO - 16:24:31: 54%|█████▎ | 107/200 [00:01<00:01, 60.23 it/sec, feas=True, obj=171] INFO - 16:24:31: 54%|█████▍ | 108/200 [00:01<00:01, 60.20 it/sec, feas=True, obj=171] INFO - 16:24:31: 55%|█████▍ | 109/200 [00:01<00:01, 60.24 it/sec, feas=True, obj=171] INFO - 16:24:31: 55%|█████▌ | 110/200 [00:01<00:01, 60.29 it/sec, feas=True, obj=171] INFO - 16:24:31: 56%|█████▌ | 111/200 [00:01<00:01, 60.33 it/sec, feas=True, obj=171] INFO - 16:24:31: 56%|█████▌ | 112/200 [00:01<00:01, 60.37 it/sec, feas=True, obj=171] INFO - 16:24:31: 56%|█████▋ | 113/200 [00:01<00:01, 60.40 it/sec, feas=True, obj=171] INFO - 16:24:31: 57%|█████▋ | 114/200 [00:01<00:01, 60.43 it/sec, feas=True, obj=171] INFO - 16:24:31: 57%|█████▊ | 115/200 [00:01<00:01, 60.51 it/sec, feas=True, obj=173] INFO - 16:24:31: 58%|█████▊ | 116/200 [00:01<00:01, 60.55 it/sec, feas=True, obj=173] INFO - 16:24:31: 58%|█████▊ | 117/200 [00:01<00:01, 60.60 it/sec, feas=True, obj=172] INFO - 16:24:31: 59%|█████▉ | 118/200 [00:01<00:01, 60.65 it/sec, feas=True, obj=172] INFO - 16:24:31: 60%|█████▉ | 119/200 [00:01<00:01, 60.66 it/sec, feas=True, obj=171] INFO - 16:24:31: 60%|██████ | 120/200 [00:01<00:01, 60.69 it/sec, feas=True, obj=171] INFO - 16:24:31: 60%|██████ | 121/200 [00:01<00:01, 60.72 it/sec, feas=True, obj=171] INFO - 16:24:32: 61%|██████ | 122/200 [00:02<00:01, 60.76 it/sec, feas=True, obj=171] INFO - 16:24:32: 62%|██████▏ | 123/200 [00:02<00:01, 60.79 it/sec, feas=True, obj=171] INFO - 16:24:32: 62%|██████▏ | 124/200 [00:02<00:01, 60.81 it/sec, feas=True, obj=170] INFO - 16:24:32: 62%|██████▎ | 125/200 [00:02<00:01, 60.83 it/sec, feas=True, obj=170] INFO - 16:24:32: 63%|██████▎ | 126/200 [00:02<00:01, 60.85 it/sec, feas=True, obj=170] INFO - 16:24:32: 64%|██████▎ | 127/200 [00:02<00:01, 60.87 it/sec, feas=True, obj=170] INFO - 16:24:32: 64%|██████▍ | 128/200 [00:02<00:01, 60.88 it/sec, feas=True, obj=170] INFO - 16:24:32: 64%|██████▍ | 129/200 [00:02<00:01, 60.89 it/sec, feas=True, obj=170] INFO - 16:24:32: 65%|██████▌ | 130/200 [00:02<00:01, 60.92 it/sec, feas=True, obj=170] INFO - 16:24:32: 66%|██████▌ | 131/200 [00:02<00:01, 60.95 it/sec, feas=True, obj=170] INFO - 16:24:32: 66%|██████▌ | 132/200 [00:02<00:01, 60.99 it/sec, feas=True, obj=170] INFO - 16:24:32: 66%|██████▋ | 133/200 [00:02<00:01, 61.01 it/sec, feas=True, obj=170] INFO - 16:24:32: 67%|██████▋ | 134/200 [00:02<00:01, 61.03 it/sec, feas=True, obj=170] INFO - 16:24:32: 68%|██████▊ | 135/200 [00:02<00:01, 61.07 it/sec, feas=True, obj=170] INFO - 16:24:32: 68%|██████▊ | 136/200 [00:02<00:01, 61.11 it/sec, feas=True, obj=170] INFO - 16:24:32: 68%|██████▊ | 137/200 [00:02<00:01, 61.14 it/sec, feas=True, obj=170] INFO - 16:24:32: 69%|██████▉ | 138/200 [00:02<00:01, 61.16 it/sec, feas=True, obj=170] INFO - 16:24:32: 70%|██████▉ | 139/200 [00:02<00:00, 61.19 it/sec, feas=True, obj=170] INFO - 16:24:32: 70%|███████ | 140/200 [00:02<00:00, 61.21 it/sec, feas=True, obj=170] INFO - 16:24:32: 70%|███████ | 141/200 [00:02<00:00, 61.26 it/sec, feas=True, obj=170] INFO - 16:24:32: 71%|███████ | 142/200 [00:02<00:00, 61.29 it/sec, feas=True, obj=170] INFO - 16:24:32: 72%|███████▏ | 143/200 [00:02<00:00, 61.31 it/sec, feas=True, obj=170] INFO - 16:24:32: 72%|███████▏ | 144/200 [00:02<00:00, 61.35 it/sec, feas=True, obj=170] INFO - 16:24:32: 72%|███████▎ | 145/200 [00:02<00:00, 61.38 it/sec, feas=True, obj=170] INFO - 16:24:32: 73%|███████▎ | 146/200 [00:02<00:00, 61.41 it/sec, feas=True, obj=170] INFO - 16:24:32: 74%|███████▎ | 147/200 [00:02<00:00, 61.42 it/sec, feas=True, obj=170] INFO - 16:24:32: 74%|███████▍ | 148/200 [00:02<00:00, 61.45 it/sec, feas=True, obj=170] INFO - 16:24:32: 74%|███████▍ | 149/200 [00:02<00:00, 61.50 it/sec, feas=True, obj=170] INFO - 16:24:32: 75%|███████▌ | 150/200 [00:02<00:00, 61.53 it/sec, feas=True, obj=170] INFO - 16:24:32: 76%|███████▌ | 151/200 [00:02<00:00, 61.54 it/sec, feas=True, obj=170] INFO - 16:24:32: 76%|███████▌ | 152/200 [00:02<00:00, 61.56 it/sec, feas=True, obj=170] INFO - 16:24:32: 76%|███████▋ | 153/200 [00:02<00:00, 61.58 it/sec, feas=True, obj=170] INFO - 16:24:32: 77%|███████▋ | 154/200 [00:02<00:00, 61.60 it/sec, feas=True, obj=170] INFO - 16:24:32: 78%|███████▊ | 155/200 [00:02<00:00, 61.63 it/sec, feas=True, obj=170] INFO - 16:24:32: 78%|███████▊ | 156/200 [00:02<00:00, 61.67 it/sec, feas=True, obj=170] INFO - 16:24:32: 78%|███████▊ | 157/200 [00:02<00:00, 61.71 it/sec, feas=True, obj=170] INFO - 16:24:32: 79%|███████▉ | 158/200 [00:02<00:00, 61.75 it/sec, feas=True, obj=170] INFO - 16:24:32: 80%|███████▉ | 159/200 [00:02<00:00, 61.78 it/sec, feas=True, obj=170] INFO - 16:24:32: 80%|████████ | 160/200 [00:02<00:00, 61.81 it/sec, feas=True, obj=170] INFO - 16:24:32: 80%|████████ | 161/200 [00:02<00:00, 61.85 it/sec, feas=True, obj=170] INFO - 16:24:32: 81%|████████ | 162/200 [00:02<00:00, 61.86 it/sec, feas=True, obj=170] INFO - 16:24:32: 82%|████████▏ | 163/200 [00:02<00:00, 61.82 it/sec, feas=True, obj=170] INFO - 16:24:32: 82%|████████▏ | 164/200 [00:02<00:00, 61.83 it/sec, feas=True, obj=170] INFO - 16:24:32: 82%|████████▎ | 165/200 [00:02<00:00, 61.84 it/sec, feas=True, obj=170] INFO - 16:24:32: 83%|████████▎ | 166/200 [00:02<00:00, 61.86 it/sec, feas=True, obj=170] INFO - 16:24:32: 84%|████████▎ | 167/200 [00:02<00:00, 61.88 it/sec, feas=True, obj=170] INFO - 16:24:32: 84%|████████▍ | 168/200 [00:02<00:00, 61.91 it/sec, feas=True, obj=170] INFO - 16:24:32: 84%|████████▍ | 169/200 [00:02<00:00, 61.95 it/sec, feas=True, obj=170] INFO - 16:24:32: 85%|████████▌ | 170/200 [00:02<00:00, 61.99 it/sec, feas=True, obj=170] INFO - 16:24:32: 86%|████████▌ | 171/200 [00:02<00:00, 62.02 it/sec, feas=True, obj=170] INFO - 16:24:32: 86%|████████▌ | 172/200 [00:02<00:00, 62.04 it/sec, feas=True, obj=170] INFO - 16:24:32: 86%|████████▋ | 173/200 [00:02<00:00, 62.06 it/sec, feas=True, obj=170] INFO - 16:24:32: 87%|████████▋ | 174/200 [00:02<00:00, 62.03 it/sec, feas=True, obj=170] INFO - 16:24:32: 88%|████████▊ | 175/200 [00:02<00:00, 62.06 it/sec, feas=True, obj=170] INFO - 16:24:32: 88%|████████▊ | 176/200 [00:02<00:00, 62.08 it/sec, feas=True, obj=170] INFO - 16:24:32: 88%|████████▊ | 177/200 [00:02<00:00, 62.11 it/sec, feas=True, obj=170] INFO - 16:24:32: 89%|████████▉ | 178/200 [00:02<00:00, 62.14 it/sec, feas=True, obj=170] INFO - 16:24:32: 90%|████████▉ | 179/200 [00:02<00:00, 62.19 it/sec, feas=True, obj=170] INFO - 16:24:32: 90%|█████████ | 180/200 [00:02<00:00, 62.20 it/sec, feas=True, obj=170] INFO - 16:24:32: 90%|█████████ | 181/200 [00:02<00:00, 62.23 it/sec, feas=True, obj=170] INFO - 16:24:32: 91%|█████████ | 182/200 [00:02<00:00, 62.24 it/sec, feas=True, obj=170] INFO - 16:24:32: 92%|█████████▏| 183/200 [00:02<00:00, 62.25 it/sec, feas=True, obj=170] INFO - 16:24:32: 92%|█████████▏| 184/200 [00:02<00:00, 62.27 it/sec, feas=True, obj=170] INFO - 16:24:32: 92%|█████████▎| 185/200 [00:02<00:00, 62.30 it/sec, feas=True, obj=170] INFO - 16:24:32: 93%|█████████▎| 186/200 [00:02<00:00, 62.32 it/sec, feas=True, obj=170] INFO - 16:24:33: 94%|█████████▎| 187/200 [00:02<00:00, 62.34 it/sec, feas=True, obj=170] INFO - 16:24:33: 94%|█████████▍| 188/200 [00:03<00:00, 62.37 it/sec, feas=True, obj=170] INFO - 16:24:33: 94%|█████████▍| 189/200 [00:03<00:00, 62.39 it/sec, feas=True, obj=170] INFO - 16:24:33: 95%|█████████▌| 190/200 [00:03<00:00, 62.41 it/sec, feas=True, obj=170] INFO - 16:24:33: 96%|█████████▌| 191/200 [00:03<00:00, 62.43 it/sec, feas=True, obj=170] INFO - 16:24:33: 96%|█████████▌| 192/200 [00:03<00:00, 62.46 it/sec, feas=True, obj=170] INFO - 16:24:33: 96%|█████████▋| 193/200 [00:03<00:00, 62.48 it/sec, feas=True, obj=170] INFO - 16:24:33: 97%|█████████▋| 194/200 [00:03<00:00, 62.50 it/sec, feas=True, obj=170] INFO - 16:24:33: 98%|█████████▊| 195/200 [00:03<00:00, 62.54 it/sec, feas=True, obj=170] INFO - 16:24:33: 98%|█████████▊| 196/200 [00:03<00:00, 62.55 it/sec, feas=True, obj=170] INFO - 16:24:33: 98%|█████████▊| 197/200 [00:03<00:00, 62.58 it/sec, feas=True, obj=170] INFO - 16:24:33: 99%|█████████▉| 198/200 [00:03<00:00, 62.62 it/sec, feas=True, obj=170] INFO - 16:24:33: 100%|█████████▉| 199/200 [00:03<00:00, 62.64 it/sec, feas=True, obj=170] INFO - 16:24:33: 100%|██████████| 200/200 [00:03<00:00, 62.67 it/sec, feas=True, obj=170] INFO - 16:24:33: Optimization result: INFO - 16:24:33: Optimizer info: INFO - 16:24:33: Status: None INFO - 16:24:33: Message: Maximum number of iterations reached. GEMSEO stopped the driver. INFO - 16:24:33: Solution: INFO - 16:24:33: The solution is feasible. INFO - 16:24:33: Objective: 169.89100281948836 INFO - 16:24:33: Standardized constraints: INFO - 16:24:33: [volume fraction-0.3] = 6.224782465036327e-07 INFO - 16:24:33: *** End MDOScenario execution *** .. GENERATED FROM PYTHON SOURCE LINES 99-102 Results ------- Post-process the optimization history: .. GENERATED FROM PYTHON SOURCE LINES 102-106 .. code-block:: Python scenario.post_process( post_name="BasicHistory", variable_names=["compliance"], show=True, save=False ) .. image-sg:: /examples/topology_optimization/images/sphx_glr_plot_topology_optimization_MBB_001.png :alt: History plot :srcset: /examples/topology_optimization/images/sphx_glr_plot_topology_optimization_MBB_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 107-108 Plot the solution .. GENERATED FROM PYTHON SOURCE LINES 108-109 .. code-block:: Python scenario.post_process(post_name="TopologyView", n_x=n_x, n_y=n_y, show=True, save=False) .. image-sg:: /examples/topology_optimization/images/sphx_glr_plot_topology_optimization_MBB_002.png :alt: plot topology optimization MBB :srcset: /examples/topology_optimization/images/sphx_glr_plot_topology_optimization_MBB_002.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 4.121 seconds) .. _sphx_glr_download_examples_topology_optimization_plot_topology_optimization_MBB.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_topology_optimization_MBB.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_topology_optimization_MBB.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_topology_optimization_MBB.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_