.. 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-33 .. code-block:: Python from __future__ import annotations from gemseo import configure_logger from gemseo import create_scenario from gemseo.problems.topology_optimization.topopt_initialize import ( initialize_design_space_and_discipline_to, ) configure_logger() .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 34-36 Setup the topology optimization problem --------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 38-39 Define the target volume fraction: .. GENERATED FROM PYTHON SOURCE LINES 39-41 .. code-block:: Python volume_fraction = 0.3 .. GENERATED FROM PYTHON SOURCE LINES 42-43 Define the problem type: .. GENERATED FROM PYTHON SOURCE LINES 43-45 .. code-block:: Python problem_name = "MBB" .. GENERATED FROM PYTHON SOURCE LINES 46-47 Define the number of elements in x- and y- directions: .. GENERATED FROM PYTHON SOURCE LINES 47-50 .. code-block:: Python n_x = 50 n_y = 25 .. GENERATED FROM PYTHON SOURCE LINES 51-52 Define the full material Young's modulus and the Poisson's ratio: .. GENERATED FROM PYTHON SOURCE LINES 52-55 .. code-block:: Python e0 = 1 nu = 0.3 .. GENERATED FROM PYTHON SOURCE LINES 56-57 Define the penalty of the SIMP approach: .. GENERATED FROM PYTHON SOURCE LINES 57-59 .. code-block:: Python penalty = 3 .. GENERATED FROM PYTHON SOURCE LINES 60-61 Define the minimum member size in the solution: .. GENERATED FROM PYTHON SOURCE LINES 61-62 .. code-block:: Python min_member_size = 1.5 .. GENERATED FROM PYTHON SOURCE LINES 63-64 Instantiate the :class:`.DesignSpace` and the disciplines: .. GENERATED FROM PYTHON SOURCE LINES 64-75 .. 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 76-79 Solve the topology optimization problem --------------------------------------- Generate an :class:`.MDOScenario` .. GENERATED FROM PYTHON SOURCE LINES 79-86 .. code-block:: Python scenario = create_scenario( disciplines, "compliance", design_space, formulation_name="DisciplinaryOpt", ) .. GENERATED FROM PYTHON SOURCE LINES 87-88 Add the volume fraction constraint to the scenario: .. GENERATED FROM PYTHON SOURCE LINES 88-92 .. code-block:: Python scenario.add_constraint( "volume fraction", constraint_type="ineq", value=volume_fraction ) .. GENERATED FROM PYTHON SOURCE LINES 93-94 Generate the XDSM .. GENERATED FROM PYTHON SOURCE LINES 94-96 .. code-block:: Python scenario.xdsmize(save_html=False, pdf_build=False) .. raw:: html


.. GENERATED FROM PYTHON SOURCE LINES 97-98 Execute the scenario .. GENERATED FROM PYTHON SOURCE LINES 98-100 .. code-block:: Python scenario.execute(algo_name="NLOPT_MMA", max_iter=200) .. rst-class:: sphx-glr-script-out .. code-block:: none INFO - 11:41:54: *** Start MDOScenario execution *** INFO - 11:41:54: MDOScenario INFO - 11:41:54: Disciplines: DensityFilter FiniteElementAnalysis MaterialModelInterpolation VolumeFraction INFO - 11:41:54: MDO formulation: DisciplinaryOpt INFO - 11:41:54: Optimization problem: INFO - 11:41:54: minimize compliance(x) INFO - 11:41:54: with respect to x INFO - 11:41:54: subject to constraints: INFO - 11:41:54: volume fraction(x) <= 0.3 INFO - 11:41:54: Solving optimization problem with algorithm NLOPT_MMA: INFO - 11:41:54: 1%| | 2/200 [00:00<00:07, 26.01 it/sec, obj=1.79e+3] INFO - 11:41:54: 2%|▏ | 3/200 [00:00<00:06, 28.56 it/sec, obj=1.78e+3] INFO - 11:41:54: 2%|▏ | 4/200 [00:00<00:06, 30.09 it/sec, obj=1.77e+3] INFO - 11:41:54: 2%|▎ | 5/200 [00:00<00:06, 30.99 it/sec, obj=1.75e+3] INFO - 11:41:54: 3%|▎ | 6/200 [00:00<00:06, 31.53 it/sec, obj=1.71e+3] INFO - 11:41:54: 4%|▎ | 7/200 [00:00<00:05, 32.18 it/sec, obj=1.65e+3] INFO - 11:41:54: 4%|▍ | 8/200 [00:00<00:05, 32.65 it/sec, obj=1.41e+3] INFO - 11:41:54: 4%|▍ | 9/200 [00:00<00:05, 33.10 it/sec, obj=1.19e+3] INFO - 11:41:54: 5%|▌ | 10/200 [00:00<00:05, 33.41 it/sec, obj=903] INFO - 11:41:54: 6%|▌ | 11/200 [00:00<00:05, 33.70 it/sec, obj=724] INFO - 11:41:54: 6%|▌ | 12/200 [00:00<00:05, 33.97 it/sec, obj=612] INFO - 11:41:54: 6%|▋ | 13/200 [00:00<00:05, 34.20 it/sec, obj=534] INFO - 11:41:54: 7%|▋ | 14/200 [00:00<00:05, 34.42 it/sec, obj=474] INFO - 11:41:54: 8%|▊ | 15/200 [00:00<00:05, 34.69 it/sec, obj=444] INFO - 11:41:54: 8%|▊ | 16/200 [00:00<00:05, 34.91 it/sec, obj=419] INFO - 11:41:54: 8%|▊ | 17/200 [00:00<00:05, 35.19 it/sec, obj=405] INFO - 11:41:54: 9%|▉ | 18/200 [00:00<00:05, 35.42 it/sec, obj=387] INFO - 11:41:54: 10%|▉ | 19/200 [00:00<00:05, 35.52 it/sec, obj=364] INFO - 11:41:54: 10%|█ | 20/200 [00:00<00:05, 35.62 it/sec, obj=338] INFO - 11:41:54: 10%|█ | 21/200 [00:00<00:05, 35.70 it/sec, obj=306] INFO - 11:41:54: 11%|█ | 22/200 [00:00<00:04, 35.78 it/sec, obj=272] INFO - 11:41:54: 12%|█▏ | 23/200 [00:00<00:04, 35.93 it/sec, obj=253] INFO - 11:41:54: 12%|█▏ | 24/200 [00:00<00:04, 35.97 it/sec, obj=244] INFO - 11:41:54: 12%|█▎ | 25/200 [00:00<00:04, 36.07 it/sec, obj=234] INFO - 11:41:54: 13%|█▎ | 26/200 [00:00<00:04, 36.09 it/sec, obj=224] INFO - 11:41:55: 14%|█▎ | 27/200 [00:00<00:04, 36.17 it/sec, obj=213] INFO - 11:41:55: 14%|█▍ | 28/200 [00:00<00:04, 36.36 it/sec, obj=207] INFO - 11:41:55: 14%|█▍ | 29/200 [00:00<00:04, 36.46 it/sec, obj=202] INFO - 11:41:55: 15%|█▌ | 30/200 [00:00<00:04, 36.56 it/sec, obj=197] INFO - 11:41:55: 16%|█▌ | 31/200 [00:00<00:04, 36.64 it/sec, obj=193] INFO - 11:41:55: 16%|█▌ | 32/200 [00:00<00:04, 36.72 it/sec, obj=190] INFO - 11:41:55: 16%|█▋ | 33/200 [00:00<00:04, 36.84 it/sec, obj=188] INFO - 11:41:55: 17%|█▋ | 34/200 [00:00<00:04, 36.94 it/sec, obj=186] INFO - 11:41:55: 18%|█▊ | 35/200 [00:00<00:04, 37.03 it/sec, obj=185] INFO - 11:41:55: 18%|█▊ | 36/200 [00:00<00:04, 37.12 it/sec, obj=184] INFO - 11:41:55: 18%|█▊ | 37/200 [00:00<00:04, 37.20 it/sec, obj=183] INFO - 11:41:55: 19%|█▉ | 38/200 [00:01<00:04, 37.25 it/sec, obj=182] INFO - 11:41:55: 20%|█▉ | 39/200 [00:01<00:04, 37.30 it/sec, obj=181] INFO - 11:41:55: 20%|██ | 40/200 [00:01<00:04, 37.32 it/sec, obj=179] INFO - 11:41:55: 20%|██ | 41/200 [00:01<00:04, 37.33 it/sec, obj=177] INFO - 11:41:55: 21%|██ | 42/200 [00:01<00:04, 37.34 it/sec, obj=175] INFO - 11:41:55: 22%|██▏ | 43/200 [00:01<00:04, 37.35 it/sec, obj=174] INFO - 11:41:55: 22%|██▏ | 44/200 [00:01<00:04, 37.34 it/sec, obj=173] INFO - 11:41:55: 22%|██▎ | 45/200 [00:01<00:04, 37.38 it/sec, obj=172] INFO - 11:41:55: 23%|██▎ | 46/200 [00:01<00:04, 37.43 it/sec, obj=172] INFO - 11:41:55: 24%|██▎ | 47/200 [00:01<00:04, 37.47 it/sec, obj=172] INFO - 11:41:55: 24%|██▍ | 48/200 [00:01<00:04, 37.52 it/sec, obj=172] INFO - 11:41:55: 24%|██▍ | 49/200 [00:01<00:04, 37.52 it/sec, obj=172] INFO - 11:41:55: 25%|██▌ | 50/200 [00:01<00:03, 37.54 it/sec, obj=172] INFO - 11:41:55: 26%|██▌ | 51/200 [00:01<00:03, 37.56 it/sec, obj=172] INFO - 11:41:55: 26%|██▌ | 52/200 [00:01<00:03, 37.60 it/sec, obj=172] INFO - 11:41:55: 26%|██▋ | 53/200 [00:01<00:03, 37.64 it/sec, obj=172] INFO - 11:41:55: 27%|██▋ | 54/200 [00:01<00:03, 37.67 it/sec, obj=172] INFO - 11:41:55: 28%|██▊ | 55/200 [00:01<00:03, 37.68 it/sec, obj=172] INFO - 11:41:55: 28%|██▊ | 56/200 [00:01<00:03, 37.71 it/sec, obj=172] INFO - 11:41:55: 28%|██▊ | 57/200 [00:01<00:03, 37.75 it/sec, obj=172] INFO - 11:41:55: 29%|██▉ | 58/200 [00:01<00:03, 37.77 it/sec, obj=171] INFO - 11:41:55: 30%|██▉ | 59/200 [00:01<00:03, 37.79 it/sec, obj=171] INFO - 11:41:55: 30%|███ | 60/200 [00:01<00:03, 37.85 it/sec, obj=171] INFO - 11:41:55: 30%|███ | 61/200 [00:01<00:03, 37.89 it/sec, obj=171] INFO - 11:41:55: 31%|███ | 62/200 [00:01<00:03, 37.92 it/sec, obj=171] INFO - 11:41:55: 32%|███▏ | 63/200 [00:01<00:03, 37.94 it/sec, obj=171] INFO - 11:41:55: 32%|███▏ | 64/200 [00:01<00:03, 37.95 it/sec, obj=171] INFO - 11:41:55: 32%|███▎ | 65/200 [00:01<00:03, 37.95 it/sec, obj=171] INFO - 11:41:56: 33%|███▎ | 66/200 [00:01<00:03, 37.96 it/sec, obj=171] INFO - 11:41:56: 34%|███▎ | 67/200 [00:01<00:03, 37.98 it/sec, obj=171] INFO - 11:41:56: 34%|███▍ | 68/200 [00:01<00:03, 37.97 it/sec, obj=171] INFO - 11:41:56: 34%|███▍ | 69/200 [00:01<00:03, 37.97 it/sec, obj=171] INFO - 11:41:56: 35%|███▌ | 70/200 [00:01<00:03, 37.98 it/sec, obj=171] INFO - 11:41:56: 36%|███▌ | 71/200 [00:01<00:03, 37.97 it/sec, obj=171] INFO - 11:41:56: 36%|███▌ | 72/200 [00:01<00:03, 37.98 it/sec, obj=171] INFO - 11:41:56: 36%|███▋ | 73/200 [00:01<00:03, 37.99 it/sec, obj=171] INFO - 11:41:56: 37%|███▋ | 74/200 [00:01<00:03, 38.00 it/sec, obj=171] INFO - 11:41:56: 38%|███▊ | 75/200 [00:01<00:03, 38.02 it/sec, obj=171] INFO - 11:41:56: 38%|███▊ | 76/200 [00:01<00:03, 38.03 it/sec, obj=171] INFO - 11:41:56: 38%|███▊ | 77/200 [00:02<00:03, 38.05 it/sec, obj=171] INFO - 11:41:56: 39%|███▉ | 78/200 [00:02<00:03, 38.06 it/sec, obj=171] INFO - 11:41:56: 40%|███▉ | 79/200 [00:02<00:03, 38.09 it/sec, obj=171] INFO - 11:41:56: 40%|████ | 80/200 [00:02<00:03, 38.09 it/sec, obj=171] INFO - 11:41:56: 40%|████ | 81/200 [00:02<00:03, 38.11 it/sec, obj=171] INFO - 11:41:56: 41%|████ | 82/200 [00:02<00:03, 38.13 it/sec, obj=171] INFO - 11:41:56: 42%|████▏ | 83/200 [00:02<00:03, 38.15 it/sec, obj=171] INFO - 11:41:56: 42%|████▏ | 84/200 [00:02<00:03, 38.17 it/sec, obj=171] INFO - 11:41:56: 42%|████▎ | 85/200 [00:02<00:03, 38.20 it/sec, obj=171] INFO - 11:41:56: 43%|████▎ | 86/200 [00:02<00:02, 38.22 it/sec, obj=171] INFO - 11:41:56: 44%|████▎ | 87/200 [00:02<00:02, 38.24 it/sec, obj=171] INFO - 11:41:56: 44%|████▍ | 88/200 [00:02<00:02, 38.24 it/sec, obj=171] INFO - 11:41:56: 44%|████▍ | 89/200 [00:02<00:02, 38.26 it/sec, obj=171] INFO - 11:41:56: 45%|████▌ | 90/200 [00:02<00:02, 38.29 it/sec, obj=171] INFO - 11:41:56: 46%|████▌ | 91/200 [00:02<00:02, 38.32 it/sec, obj=171] INFO - 11:41:56: 46%|████▌ | 92/200 [00:02<00:02, 38.33 it/sec, obj=171] INFO - 11:41:56: 46%|████▋ | 93/200 [00:02<00:02, 38.35 it/sec, obj=171] INFO - 11:41:56: 47%|████▋ | 94/200 [00:02<00:02, 38.36 it/sec, obj=171] INFO - 11:41:56: 48%|████▊ | 95/200 [00:02<00:02, 38.38 it/sec, obj=171] INFO - 11:41:56: 48%|████▊ | 96/200 [00:02<00:02, 38.40 it/sec, obj=171] INFO - 11:41:56: 48%|████▊ | 97/200 [00:02<00:02, 38.42 it/sec, obj=171] INFO - 11:41:56: 49%|████▉ | 98/200 [00:02<00:02, 38.44 it/sec, obj=171] INFO - 11:41:56: 50%|████▉ | 99/200 [00:02<00:02, 38.45 it/sec, obj=171] INFO - 11:41:56: 50%|█████ | 100/200 [00:02<00:02, 38.46 it/sec, obj=171] INFO - 11:41:56: 50%|█████ | 101/200 [00:02<00:02, 38.48 it/sec, obj=171] INFO - 11:41:56: 51%|█████ | 102/200 [00:02<00:02, 38.49 it/sec, obj=171] INFO - 11:41:56: 52%|█████▏ | 103/200 [00:02<00:02, 38.49 it/sec, obj=171] INFO - 11:41:56: 52%|█████▏ | 104/200 [00:02<00:02, 38.50 it/sec, obj=171] INFO - 11:41:56: 52%|█████▎ | 105/200 [00:02<00:02, 38.51 it/sec, obj=171] INFO - 11:41:57: 53%|█████▎ | 106/200 [00:02<00:02, 38.52 it/sec, obj=171] INFO - 11:41:57: 54%|█████▎ | 107/200 [00:02<00:02, 38.52 it/sec, obj=171] INFO - 11:41:57: 54%|█████▍ | 108/200 [00:02<00:02, 38.53 it/sec, obj=171] INFO - 11:41:57: 55%|█████▍ | 109/200 [00:02<00:02, 38.54 it/sec, obj=171] INFO - 11:41:57: 55%|█████▌ | 110/200 [00:02<00:02, 38.54 it/sec, obj=171] INFO - 11:41:57: 56%|█████▌ | 111/200 [00:02<00:02, 38.54 it/sec, obj=171] INFO - 11:41:57: 56%|█████▌ | 112/200 [00:02<00:02, 38.53 it/sec, obj=171] INFO - 11:41:57: 56%|█████▋ | 113/200 [00:02<00:02, 38.53 it/sec, obj=171] INFO - 11:41:57: 57%|█████▋ | 114/200 [00:02<00:02, 38.54 it/sec, obj=171] INFO - 11:41:57: 57%|█████▊ | 115/200 [00:02<00:02, 38.55 it/sec, obj=172] INFO - 11:41:57: 58%|█████▊ | 116/200 [00:03<00:02, 38.56 it/sec, obj=172] INFO - 11:41:57: 58%|█████▊ | 117/200 [00:03<00:02, 38.55 it/sec, obj=172] INFO - 11:41:57: 59%|█████▉ | 118/200 [00:03<00:02, 38.55 it/sec, obj=172] INFO - 11:41:57: 60%|█████▉ | 119/200 [00:03<00:02, 38.55 it/sec, obj=171] INFO - 11:41:57: 60%|██████ | 120/200 [00:03<00:02, 38.54 it/sec, obj=171] INFO - 11:41:57: 60%|██████ | 121/200 [00:03<00:02, 38.53 it/sec, obj=171] INFO - 11:41:57: 61%|██████ | 122/200 [00:03<00:02, 38.52 it/sec, obj=170] INFO - 11:41:57: 62%|██████▏ | 123/200 [00:03<00:01, 38.51 it/sec, obj=170] INFO - 11:41:57: 62%|██████▏ | 124/200 [00:03<00:01, 38.51 it/sec, obj=170] INFO - 11:41:57: 62%|██████▎ | 125/200 [00:03<00:01, 38.51 it/sec, obj=170] INFO - 11:41:57: 63%|██████▎ | 126/200 [00:03<00:01, 38.52 it/sec, obj=170] INFO - 11:41:57: 64%|██████▎ | 127/200 [00:03<00:01, 38.52 it/sec, obj=170] INFO - 11:41:57: 64%|██████▍ | 128/200 [00:03<00:01, 38.52 it/sec, obj=170] INFO - 11:41:57: 64%|██████▍ | 129/200 [00:03<00:01, 38.52 it/sec, obj=170] INFO - 11:41:57: 65%|██████▌ | 130/200 [00:03<00:01, 38.53 it/sec, obj=170] INFO - 11:41:57: 66%|██████▌ | 131/200 [00:03<00:01, 38.53 it/sec, obj=170] INFO - 11:41:57: 66%|██████▌ | 132/200 [00:03<00:01, 38.55 it/sec, obj=170] INFO - 11:41:57: 66%|██████▋ | 133/200 [00:03<00:01, 38.55 it/sec, obj=170] INFO - 11:41:57: 67%|██████▋ | 134/200 [00:03<00:01, 38.55 it/sec, obj=170] INFO - 11:41:57: 68%|██████▊ | 135/200 [00:03<00:01, 38.57 it/sec, obj=170] INFO - 11:41:57: 68%|██████▊ | 136/200 [00:03<00:01, 38.58 it/sec, obj=170] INFO - 11:41:57: 68%|██████▊ | 137/200 [00:03<00:01, 38.58 it/sec, obj=170] INFO - 11:41:57: 69%|██████▉ | 138/200 [00:03<00:01, 38.59 it/sec, obj=170] INFO - 11:41:57: 70%|██████▉ | 139/200 [00:03<00:01, 38.60 it/sec, obj=170] INFO - 11:41:57: 70%|███████ | 140/200 [00:03<00:01, 38.61 it/sec, obj=170] INFO - 11:41:57: 70%|███████ | 141/200 [00:03<00:01, 38.61 it/sec, obj=170] INFO - 11:41:57: 71%|███████ | 142/200 [00:03<00:01, 38.61 it/sec, obj=170] INFO - 11:41:57: 72%|███████▏ | 143/200 [00:03<00:01, 38.61 it/sec, obj=170] INFO - 11:41:58: 72%|███████▏ | 144/200 [00:03<00:01, 38.60 it/sec, obj=170] INFO - 11:41:58: 72%|███████▎ | 145/200 [00:03<00:01, 38.61 it/sec, obj=170] INFO - 11:41:58: 73%|███████▎ | 146/200 [00:03<00:01, 38.61 it/sec, obj=170] INFO - 11:41:58: 74%|███████▎ | 147/200 [00:03<00:01, 38.62 it/sec, obj=170] INFO - 11:41:58: 74%|███████▍ | 148/200 [00:03<00:01, 38.62 it/sec, obj=170] INFO - 11:41:58: 74%|███████▍ | 149/200 [00:03<00:01, 38.61 it/sec, obj=170] INFO - 11:41:58: 75%|███████▌ | 150/200 [00:03<00:01, 38.61 it/sec, obj=170] INFO - 11:41:58: 76%|███████▌ | 151/200 [00:03<00:01, 38.62 it/sec, obj=170] INFO - 11:41:58: 76%|███████▌ | 152/200 [00:03<00:01, 38.63 it/sec, obj=170] INFO - 11:41:58: 76%|███████▋ | 153/200 [00:03<00:01, 38.63 it/sec, obj=170] INFO - 11:41:58: 77%|███████▋ | 154/200 [00:03<00:01, 38.64 it/sec, obj=170] INFO - 11:41:58: 78%|███████▊ | 155/200 [00:04<00:01, 38.64 it/sec, obj=170] INFO - 11:41:58: 78%|███████▊ | 156/200 [00:04<00:01, 38.65 it/sec, obj=170] INFO - 11:41:58: 78%|███████▊ | 157/200 [00:04<00:01, 38.65 it/sec, obj=170] INFO - 11:41:58: 79%|███████▉ | 158/200 [00:04<00:01, 38.65 it/sec, obj=170] INFO - 11:41:58: 80%|███████▉ | 159/200 [00:04<00:01, 38.66 it/sec, obj=170] INFO - 11:41:58: 80%|████████ | 160/200 [00:04<00:01, 38.66 it/sec, obj=170] INFO - 11:41:58: 80%|████████ | 161/200 [00:04<00:01, 38.68 it/sec, obj=170] INFO - 11:41:58: 81%|████████ | 162/200 [00:04<00:00, 38.69 it/sec, obj=170] INFO - 11:41:58: 82%|████████▏ | 163/200 [00:04<00:00, 38.71 it/sec, obj=170] INFO - 11:41:58: 82%|████████▏ | 164/200 [00:04<00:00, 38.73 it/sec, obj=170] INFO - 11:41:58: 82%|████████▎ | 165/200 [00:04<00:00, 38.76 it/sec, obj=170] INFO - 11:41:58: 83%|████████▎ | 166/200 [00:04<00:00, 38.78 it/sec, obj=170] INFO - 11:41:58: 84%|████████▎ | 167/200 [00:04<00:00, 38.81 it/sec, obj=170] INFO - 11:41:58: 84%|████████▍ | 168/200 [00:04<00:00, 38.82 it/sec, obj=170] INFO - 11:41:58: 84%|████████▍ | 169/200 [00:04<00:00, 38.83 it/sec, obj=170] INFO - 11:41:58: 85%|████████▌ | 170/200 [00:04<00:00, 38.84 it/sec, obj=170] INFO - 11:41:58: 86%|████████▌ | 171/200 [00:04<00:00, 38.85 it/sec, obj=170] INFO - 11:41:58: 86%|████████▌ | 172/200 [00:04<00:00, 38.86 it/sec, obj=170] INFO - 11:41:58: 86%|████████▋ | 173/200 [00:04<00:00, 38.87 it/sec, obj=170] INFO - 11:41:58: 87%|████████▋ | 174/200 [00:04<00:00, 38.88 it/sec, obj=170] INFO - 11:41:58: 88%|████████▊ | 175/200 [00:04<00:00, 38.90 it/sec, obj=170] INFO - 11:41:58: 88%|████████▊ | 176/200 [00:04<00:00, 38.92 it/sec, obj=170] INFO - 11:41:58: 88%|████████▊ | 177/200 [00:04<00:00, 38.93 it/sec, obj=170] INFO - 11:41:58: 89%|████████▉ | 178/200 [00:04<00:00, 38.94 it/sec, obj=170] INFO - 11:41:58: 90%|████████▉ | 179/200 [00:04<00:00, 38.94 it/sec, obj=170] INFO - 11:41:58: 90%|█████████ | 180/200 [00:04<00:00, 38.95 it/sec, obj=170] INFO - 11:41:58: 90%|█████████ | 181/200 [00:04<00:00, 38.95 it/sec, obj=170] INFO - 11:41:58: 91%|█████████ | 182/200 [00:04<00:00, 38.95 it/sec, obj=170] INFO - 11:41:58: 92%|█████████▏| 183/200 [00:04<00:00, 38.95 it/sec, obj=170] INFO - 11:41:58: 92%|█████████▏| 184/200 [00:04<00:00, 38.95 it/sec, obj=170] INFO - 11:41:59: 92%|█████████▎| 185/200 [00:04<00:00, 38.97 it/sec, obj=170] INFO - 11:41:59: 93%|█████████▎| 186/200 [00:04<00:00, 38.98 it/sec, obj=170] INFO - 11:41:59: 94%|█████████▎| 187/200 [00:04<00:00, 39.00 it/sec, obj=170] INFO - 11:41:59: 94%|█████████▍| 188/200 [00:04<00:00, 39.00 it/sec, obj=170] INFO - 11:41:59: 94%|█████████▍| 189/200 [00:04<00:00, 39.01 it/sec, obj=170] INFO - 11:41:59: 95%|█████████▌| 190/200 [00:04<00:00, 39.01 it/sec, obj=170] INFO - 11:41:59: 96%|█████████▌| 191/200 [00:04<00:00, 39.02 it/sec, obj=170] INFO - 11:41:59: 96%|█████████▌| 192/200 [00:04<00:00, 39.04 it/sec, obj=170] INFO - 11:41:59: 96%|█████████▋| 193/200 [00:04<00:00, 39.05 it/sec, obj=170] INFO - 11:41:59: 97%|█████████▋| 194/200 [00:04<00:00, 39.05 it/sec, obj=170] INFO - 11:41:59: 98%|█████████▊| 195/200 [00:04<00:00, 39.05 it/sec, obj=170] INFO - 11:41:59: 98%|█████████▊| 196/200 [00:05<00:00, 39.06 it/sec, obj=170] INFO - 11:41:59: 98%|█████████▊| 197/200 [00:05<00:00, 39.05 it/sec, obj=170] INFO - 11:41:59: 99%|█████████▉| 198/200 [00:05<00:00, 39.05 it/sec, obj=170] INFO - 11:41:59: 100%|█████████▉| 199/200 [00:05<00:00, 39.05 it/sec, obj=170] INFO - 11:41:59: 100%|██████████| 200/200 [00:05<00:00, 39.22 it/sec, obj=170] INFO - 11:41:59: Optimization result: INFO - 11:41:59: Optimizer info: INFO - 11:41:59: Status: None INFO - 11:41:59: Message: Maximum number of iterations reached. GEMSEO stopped the driver. INFO - 11:41:59: Number of calls to the objective function by the optimizer: 201 INFO - 11:41:59: Solution: INFO - 11:41:59: The solution is feasible. INFO - 11:41:59: Objective: 169.89161468983534 INFO - 11:41:59: Standardized constraints: INFO - 11:41:59: [volume fraction-0.3] = -4.312432086428508e-07 INFO - 11:41:59: *** End MDOScenario execution (time: 0:00:05.103644) *** .. GENERATED FROM PYTHON SOURCE LINES 101-104 Results ------- Post-process the optimization history: .. GENERATED FROM PYTHON SOURCE LINES 104-108 .. 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 109-110 Plot the solution .. GENERATED FROM PYTHON SOURCE LINES 110-111 .. 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 5.761 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 `_