.. 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_short_cantilever.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_short_cantilever.py: Solve a 2D short cantilever 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-37 Setup the topology optimization problem --------------------------------------- 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 = "Short_Cantilever" .. GENERATED FROM PYTHON SOURCE LINES 44-45 Define the number of elements in the 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 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-61 .. code-block:: Python min_memeber_size = 1.5 .. GENERATED FROM PYTHON SOURCE LINES 62-63 Instantiate the :class:`.DesignSpace` and the disciplines: .. GENERATED FROM PYTHON SOURCE LINES 63-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_memeber_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, "DisciplinaryOpt", "compliance", design_space, ) .. 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() .. raw:: html


.. GENERATED FROM PYTHON SOURCE LINES 97-98 Execute the scenario: .. GENERATED FROM PYTHON SOURCE LINES 98-100 .. code-block:: Python scenario.execute({"max_iter": 200, "algo": "NLOPT_MMA"}) .. rst-class:: sphx-glr-script-out .. code-block:: none INFO - 08:58:44: INFO - 08:58:44: *** Start MDOScenario execution *** INFO - 08:58:44: MDOScenario INFO - 08:58:44: Disciplines: DensityFilter FininiteElementAnalysis MaterialModelInterpolation VolumeFraction INFO - 08:58:44: MDO formulation: DisciplinaryOpt INFO - 08:58:44: Optimization problem: INFO - 08:58:44: minimize compliance(x) INFO - 08:58:44: with respect to x INFO - 08:58:44: subject to constraints: INFO - 08:58:44: volume fraction(x) <= 0.3 INFO - 08:58:44: Solving optimization problem with algorithm NLOPT_MMA: INFO - 08:58:45: 1%| | 2/200 [00:00<00:10, 18.10 it/sec, obj=1.46e+3] INFO - 08:58:45: 2%|▏ | 3/200 [00:00<00:09, 20.39 it/sec, obj=1.45e+3] INFO - 08:58:45: 2%|▏ | 4/200 [00:00<00:08, 21.85 it/sec, obj=1.45e+3] INFO - 08:58:45: 2%|▎ | 5/200 [00:00<00:08, 22.71 it/sec, obj=1.45e+3] INFO - 08:58:45: 3%|▎ | 6/200 [00:00<00:08, 23.33 it/sec, obj=1.43e+3] INFO - 08:58:45: 4%|▎ | 7/200 [00:00<00:08, 23.87 it/sec, obj=1.4e+3] INFO - 08:58:45: 4%|▍ | 8/200 [00:00<00:07, 24.22 it/sec, obj=1.36e+3] INFO - 08:58:45: 4%|▍ | 9/200 [00:00<00:07, 24.51 it/sec, obj=1.2e+3] INFO - 08:58:45: 5%|▌ | 10/200 [00:00<00:07, 24.78 it/sec, obj=1.01e+3] INFO - 08:58:45: 6%|▌ | 11/200 [00:00<00:07, 25.00 it/sec, obj=756] INFO - 08:58:45: 6%|▌ | 12/200 [00:00<00:07, 25.05 it/sec, obj=573] INFO - 08:58:45: 6%|▋ | 13/200 [00:00<00:07, 25.26 it/sec, obj=509] INFO - 08:58:45: 7%|▋ | 14/200 [00:00<00:07, 25.46 it/sec, obj=448] INFO - 08:58:45: 8%|▊ | 15/200 [00:00<00:07, 25.64 it/sec, obj=399] INFO - 08:58:45: 8%|▊ | 16/200 [00:00<00:07, 25.76 it/sec, obj=360] INFO - 08:58:45: 8%|▊ | 17/200 [00:00<00:07, 25.85 it/sec, obj=329] INFO - 08:58:45: 9%|▉ | 18/200 [00:00<00:07, 25.93 it/sec, obj=304] INFO - 08:58:45: 10%|▉ | 19/200 [00:00<00:06, 26.06 it/sec, obj=278] INFO - 08:58:45: 10%|█ | 20/200 [00:00<00:06, 26.14 it/sec, obj=251] INFO - 08:58:45: 10%|█ | 21/200 [00:00<00:06, 26.28 it/sec, obj=231] INFO - 08:58:45: 11%|█ | 22/200 [00:00<00:06, 26.37 it/sec, obj=213] INFO - 08:58:45: 12%|█▏ | 23/200 [00:00<00:06, 26.47 it/sec, obj=193] INFO - 08:58:45: 12%|█▏ | 24/200 [00:00<00:06, 26.56 it/sec, obj=175] INFO - 08:58:45: 12%|█▎ | 25/200 [00:00<00:06, 26.62 it/sec, obj=161] INFO - 08:58:45: 13%|█▎ | 26/200 [00:00<00:06, 26.70 it/sec, obj=153] INFO - 08:58:46: 14%|█▎ | 27/200 [00:01<00:06, 26.78 it/sec, obj=148] INFO - 08:58:46: 14%|█▍ | 28/200 [00:01<00:06, 26.87 it/sec, obj=145] INFO - 08:58:46: 14%|█▍ | 29/200 [00:01<00:06, 26.97 it/sec, obj=143] INFO - 08:58:46: 15%|█▌ | 30/200 [00:01<00:06, 27.05 it/sec, obj=142] INFO - 08:58:46: 16%|█▌ | 31/200 [00:01<00:06, 27.12 it/sec, obj=141] INFO - 08:58:46: 16%|█▌ | 32/200 [00:01<00:06, 27.21 it/sec, obj=140] INFO - 08:58:46: 16%|█▋ | 33/200 [00:01<00:06, 27.31 it/sec, obj=140] INFO - 08:58:46: 17%|█▋ | 34/200 [00:01<00:06, 27.38 it/sec, obj=140] INFO - 08:58:46: 18%|█▊ | 35/200 [00:01<00:06, 27.47 it/sec, obj=139] INFO - 08:58:46: 18%|█▊ | 36/200 [00:01<00:05, 27.55 it/sec, obj=139] INFO - 08:58:46: 18%|█▊ | 37/200 [00:01<00:05, 27.63 it/sec, obj=139] INFO - 08:58:46: 19%|█▉ | 38/200 [00:01<00:05, 27.69 it/sec, obj=139] INFO - 08:58:46: 20%|█▉ | 39/200 [00:01<00:05, 27.75 it/sec, obj=139] INFO - 08:58:46: 20%|██ | 40/200 [00:01<00:05, 27.81 it/sec, obj=139] INFO - 08:58:46: 20%|██ | 41/200 [00:01<00:05, 27.87 it/sec, obj=139] INFO - 08:58:46: 21%|██ | 42/200 [00:01<00:05, 27.93 it/sec, obj=138] INFO - 08:58:46: 22%|██▏ | 43/200 [00:01<00:05, 27.99 it/sec, obj=138] INFO - 08:58:46: 22%|██▏ | 44/200 [00:01<00:05, 28.05 it/sec, obj=138] INFO - 08:58:46: 22%|██▎ | 45/200 [00:01<00:05, 28.10 it/sec, obj=138] INFO - 08:58:46: 23%|██▎ | 46/200 [00:01<00:05, 28.15 it/sec, obj=138] INFO - 08:58:46: 24%|██▎ | 47/200 [00:01<00:05, 28.19 it/sec, obj=138] INFO - 08:58:46: 24%|██▍ | 48/200 [00:01<00:05, 28.22 it/sec, obj=138] INFO - 08:58:46: 24%|██▍ | 49/200 [00:01<00:05, 28.26 it/sec, obj=138] INFO - 08:58:46: 25%|██▌ | 50/200 [00:01<00:05, 28.30 it/sec, obj=138] INFO - 08:58:46: 26%|██▌ | 51/200 [00:01<00:05, 28.36 it/sec, obj=138] INFO - 08:58:46: 26%|██▌ | 52/200 [00:01<00:05, 28.38 it/sec, obj=138] INFO - 08:58:46: 26%|██▋ | 53/200 [00:01<00:05, 28.42 it/sec, obj=138] INFO - 08:58:46: 27%|██▋ | 54/200 [00:01<00:05, 28.46 it/sec, obj=137] INFO - 08:58:46: 28%|██▊ | 55/200 [00:01<00:05, 28.48 it/sec, obj=137] INFO - 08:58:46: 28%|██▊ | 56/200 [00:01<00:05, 28.51 it/sec, obj=137] INFO - 08:58:46: 28%|██▊ | 57/200 [00:01<00:05, 28.54 it/sec, obj=137] INFO - 08:58:47: 29%|██▉ | 58/200 [00:02<00:04, 28.56 it/sec, obj=137] INFO - 08:58:47: 30%|██▉ | 59/200 [00:02<00:04, 28.59 it/sec, obj=137] INFO - 08:58:47: 30%|███ | 60/200 [00:02<00:04, 28.63 it/sec, obj=137] INFO - 08:58:47: 30%|███ | 61/200 [00:02<00:04, 28.65 it/sec, obj=137] INFO - 08:58:47: 31%|███ | 62/200 [00:02<00:04, 28.62 it/sec, obj=137] INFO - 08:58:47: 32%|███▏ | 63/200 [00:02<00:04, 28.65 it/sec, obj=137] INFO - 08:58:47: 32%|███▏ | 64/200 [00:02<00:04, 28.67 it/sec, obj=137] INFO - 08:58:47: 32%|███▎ | 65/200 [00:02<00:04, 28.69 it/sec, obj=137] INFO - 08:58:47: 33%|███▎ | 66/200 [00:02<00:04, 28.70 it/sec, obj=137] INFO - 08:58:47: 34%|███▎ | 67/200 [00:02<00:04, 28.73 it/sec, obj=137] INFO - 08:58:47: 34%|███▍ | 68/200 [00:02<00:04, 28.75 it/sec, obj=137] INFO - 08:58:47: 34%|███▍ | 69/200 [00:02<00:04, 28.77 it/sec, obj=137] INFO - 08:58:47: 35%|███▌ | 70/200 [00:02<00:04, 28.78 it/sec, obj=137] INFO - 08:58:47: 36%|███▌ | 71/200 [00:02<00:04, 28.79 it/sec, obj=137] INFO - 08:58:47: 36%|███▌ | 72/200 [00:02<00:04, 28.80 it/sec, obj=137] INFO - 08:58:47: 36%|███▋ | 73/200 [00:02<00:04, 28.81 it/sec, obj=137] INFO - 08:58:47: 37%|███▋ | 74/200 [00:02<00:04, 28.82 it/sec, obj=137] INFO - 08:58:47: 38%|███▊ | 75/200 [00:02<00:04, 28.84 it/sec, obj=137] INFO - 08:58:47: 38%|███▊ | 76/200 [00:02<00:04, 28.85 it/sec, obj=137] INFO - 08:58:47: 38%|███▊ | 77/200 [00:02<00:04, 28.86 it/sec, obj=137] INFO - 08:58:47: 39%|███▉ | 78/200 [00:02<00:04, 28.88 it/sec, obj=137] INFO - 08:58:47: 40%|███▉ | 79/200 [00:02<00:04, 28.87 it/sec, obj=137] INFO - 08:58:47: 40%|████ | 80/200 [00:02<00:04, 28.88 it/sec, obj=137] INFO - 08:58:47: 40%|████ | 81/200 [00:02<00:04, 28.90 it/sec, obj=137] INFO - 08:58:47: 41%|████ | 82/200 [00:02<00:04, 28.91 it/sec, obj=137] INFO - 08:58:47: 42%|████▏ | 83/200 [00:02<00:04, 28.93 it/sec, obj=137] INFO - 08:58:47: 42%|████▏ | 84/200 [00:02<00:04, 28.95 it/sec, obj=137] INFO - 08:58:47: 42%|████▎ | 85/200 [00:02<00:03, 28.96 it/sec, obj=137] INFO - 08:58:47: 43%|████▎ | 86/200 [00:02<00:03, 28.97 it/sec, obj=137] INFO - 08:58:47: 44%|████▎ | 87/200 [00:03<00:03, 28.99 it/sec, obj=137] INFO - 08:58:48: 44%|████▍ | 88/200 [00:03<00:03, 29.00 it/sec, obj=137] INFO - 08:58:48: 44%|████▍ | 89/200 [00:03<00:03, 29.01 it/sec, obj=137] INFO - 08:58:48: 45%|████▌ | 90/200 [00:03<00:03, 29.03 it/sec, obj=137] INFO - 08:58:48: 46%|████▌ | 91/200 [00:03<00:03, 29.04 it/sec, obj=137] INFO - 08:58:48: 46%|████▌ | 92/200 [00:03<00:03, 29.05 it/sec, obj=137] INFO - 08:58:48: 46%|████▋ | 93/200 [00:03<00:03, 29.07 it/sec, obj=137] INFO - 08:58:48: 47%|████▋ | 94/200 [00:03<00:03, 29.07 it/sec, obj=137] INFO - 08:58:48: 48%|████▊ | 95/200 [00:03<00:03, 29.09 it/sec, obj=137] INFO - 08:58:48: 48%|████▊ | 96/200 [00:03<00:03, 29.10 it/sec, obj=137] INFO - 08:58:48: 48%|████▊ | 97/200 [00:03<00:03, 29.12 it/sec, obj=137] INFO - 08:58:48: 49%|████▉ | 98/200 [00:03<00:03, 29.13 it/sec, obj=137] INFO - 08:58:48: 50%|████▉ | 99/200 [00:03<00:03, 29.14 it/sec, obj=137] INFO - 08:58:48: 50%|█████ | 100/200 [00:03<00:03, 29.16 it/sec, obj=137] INFO - 08:58:48: 50%|█████ | 101/200 [00:03<00:03, 29.17 it/sec, obj=137] INFO - 08:58:48: 51%|█████ | 102/200 [00:03<00:03, 29.18 it/sec, obj=137] INFO - 08:58:48: 52%|█████▏ | 103/200 [00:03<00:03, 29.20 it/sec, obj=137] INFO - 08:58:48: 52%|█████▏ | 104/200 [00:03<00:03, 29.21 it/sec, obj=137] INFO - 08:58:48: 52%|█████▎ | 105/200 [00:03<00:03, 29.22 it/sec, obj=137] INFO - 08:58:48: 53%|█████▎ | 106/200 [00:03<00:03, 29.23 it/sec, obj=137] INFO - 08:58:48: 54%|█████▎ | 107/200 [00:03<00:03, 29.23 it/sec, obj=137] INFO - 08:58:48: 54%|█████▍ | 108/200 [00:03<00:03, 29.24 it/sec, obj=137] INFO - 08:58:48: 55%|█████▍ | 109/200 [00:03<00:03, 29.25 it/sec, obj=137] INFO - 08:58:48: 55%|█████▌ | 110/200 [00:03<00:03, 29.26 it/sec, obj=137] INFO - 08:58:48: 56%|█████▌ | 111/200 [00:03<00:03, 29.28 it/sec, obj=137] INFO - 08:58:48: 56%|█████▌ | 112/200 [00:03<00:03, 29.29 it/sec, obj=137] INFO - 08:58:48: 56%|█████▋ | 113/200 [00:03<00:02, 29.30 it/sec, obj=137] INFO - 08:58:48: 57%|█████▋ | 114/200 [00:03<00:02, 29.32 it/sec, obj=137] INFO - 08:58:48: 57%|█████▊ | 115/200 [00:03<00:02, 29.33 it/sec, obj=137] INFO - 08:58:48: 58%|█████▊ | 116/200 [00:03<00:02, 29.34 it/sec, obj=137] INFO - 08:58:48: 58%|█████▊ | 117/200 [00:03<00:02, 29.35 it/sec, obj=137] INFO - 08:58:49: 59%|█████▉ | 118/200 [00:04<00:02, 29.35 it/sec, obj=137] INFO - 08:58:49: 60%|█████▉ | 119/200 [00:04<00:02, 29.36 it/sec, obj=137] INFO - 08:58:49: 60%|██████ | 120/200 [00:04<00:02, 29.36 it/sec, obj=137] INFO - 08:58:49: 60%|██████ | 121/200 [00:04<00:02, 29.36 it/sec, obj=137] INFO - 08:58:49: 61%|██████ | 122/200 [00:04<00:02, 29.36 it/sec, obj=137] INFO - 08:58:49: 62%|██████▏ | 123/200 [00:04<00:02, 29.37 it/sec, obj=137] INFO - 08:58:49: 62%|██████▏ | 124/200 [00:04<00:02, 29.37 it/sec, obj=137] INFO - 08:58:49: 62%|██████▎ | 125/200 [00:04<00:02, 29.37 it/sec, obj=137] INFO - 08:58:49: 63%|██████▎ | 126/200 [00:04<00:02, 29.38 it/sec, obj=137] INFO - 08:58:49: 64%|██████▎ | 127/200 [00:04<00:02, 29.39 it/sec, obj=137] INFO - 08:58:49: 64%|██████▍ | 128/200 [00:04<00:02, 29.40 it/sec, obj=137] INFO - 08:58:49: 64%|██████▍ | 129/200 [00:04<00:02, 29.41 it/sec, obj=137] INFO - 08:58:49: 65%|██████▌ | 130/200 [00:04<00:02, 29.41 it/sec, obj=137] INFO - 08:58:49: 66%|██████▌ | 131/200 [00:04<00:02, 29.41 it/sec, obj=137] INFO - 08:58:49: 66%|██████▌ | 132/200 [00:04<00:02, 29.41 it/sec, obj=137] INFO - 08:58:49: 66%|██████▋ | 133/200 [00:04<00:02, 29.41 it/sec, obj=137] INFO - 08:58:49: 67%|██████▋ | 134/200 [00:04<00:02, 29.42 it/sec, obj=137] INFO - 08:58:49: 68%|██████▊ | 135/200 [00:04<00:02, 29.42 it/sec, obj=137] INFO - 08:58:49: 68%|██████▊ | 136/200 [00:04<00:02, 29.43 it/sec, obj=137] INFO - 08:58:49: 68%|██████▊ | 137/200 [00:04<00:02, 29.43 it/sec, obj=137] INFO - 08:58:49: 69%|██████▉ | 138/200 [00:04<00:02, 29.44 it/sec, obj=137] INFO - 08:58:49: 70%|██████▉ | 139/200 [00:04<00:02, 29.43 it/sec, obj=137] INFO - 08:58:49: 70%|███████ | 140/200 [00:04<00:02, 29.43 it/sec, obj=137] INFO - 08:58:49: 70%|███████ | 141/200 [00:04<00:02, 29.43 it/sec, obj=137] INFO - 08:58:49: 71%|███████ | 142/200 [00:04<00:01, 29.44 it/sec, obj=137] INFO - 08:58:49: 72%|███████▏ | 143/200 [00:04<00:01, 29.44 it/sec, obj=137] INFO - 08:58:49: 72%|███████▏ | 144/200 [00:04<00:01, 29.45 it/sec, obj=137] INFO - 08:58:49: 72%|███████▎ | 145/200 [00:04<00:01, 29.46 it/sec, obj=137] INFO - 08:58:49: 73%|███████▎ | 146/200 [00:04<00:01, 29.48 it/sec, obj=137] INFO - 08:58:49: 74%|███████▎ | 147/200 [00:04<00:01, 29.49 it/sec, obj=137] INFO - 08:58:50: 74%|███████▍ | 148/200 [00:05<00:01, 29.49 it/sec, obj=137] INFO - 08:58:50: 74%|███████▍ | 149/200 [00:05<00:01, 29.49 it/sec, obj=137] INFO - 08:58:50: 75%|███████▌ | 150/200 [00:05<00:01, 29.49 it/sec, obj=137] INFO - 08:58:50: 76%|███████▌ | 151/200 [00:05<00:01, 29.50 it/sec, obj=137] INFO - 08:58:50: 76%|███████▌ | 152/200 [00:05<00:01, 29.50 it/sec, obj=137] INFO - 08:58:50: 76%|███████▋ | 153/200 [00:05<00:01, 29.49 it/sec, obj=137] INFO - 08:58:50: 77%|███████▋ | 154/200 [00:05<00:01, 29.49 it/sec, obj=137] INFO - 08:58:50: 78%|███████▊ | 155/200 [00:05<00:01, 29.50 it/sec, obj=137] INFO - 08:58:50: 78%|███████▊ | 156/200 [00:05<00:01, 29.49 it/sec, obj=137] INFO - 08:58:50: 78%|███████▊ | 157/200 [00:05<00:01, 29.50 it/sec, obj=137] INFO - 08:58:50: 79%|███████▉ | 158/200 [00:05<00:01, 29.50 it/sec, obj=137] INFO - 08:58:50: 80%|███████▉ | 159/200 [00:05<00:01, 29.50 it/sec, obj=137] INFO - 08:58:50: 80%|████████ | 160/200 [00:05<00:01, 29.52 it/sec, obj=137] INFO - 08:58:50: 80%|████████ | 161/200 [00:05<00:01, 29.53 it/sec, obj=137] INFO - 08:58:50: 81%|████████ | 162/200 [00:05<00:01, 29.55 it/sec, obj=137] INFO - 08:58:50: 82%|████████▏ | 163/200 [00:05<00:01, 29.55 it/sec, obj=137] INFO - 08:58:50: 82%|████████▏ | 164/200 [00:05<00:01, 29.56 it/sec, obj=137] INFO - 08:58:50: 82%|████████▎ | 165/200 [00:05<00:01, 29.57 it/sec, obj=137] INFO - 08:58:50: 83%|████████▎ | 166/200 [00:05<00:01, 29.57 it/sec, obj=137] INFO - 08:58:50: 84%|████████▎ | 167/200 [00:05<00:01, 29.57 it/sec, obj=137] INFO - 08:58:50: 84%|████████▍ | 168/200 [00:05<00:01, 29.58 it/sec, obj=137] INFO - 08:58:50: 84%|████████▍ | 169/200 [00:05<00:01, 29.58 it/sec, obj=137] INFO - 08:58:50: 85%|████████▌ | 170/200 [00:05<00:01, 29.59 it/sec, obj=137] INFO - 08:58:50: 86%|████████▌ | 171/200 [00:05<00:00, 29.60 it/sec, obj=137] INFO - 08:58:50: 86%|████████▌ | 172/200 [00:05<00:00, 29.61 it/sec, obj=137] INFO - 08:58:50: 86%|████████▋ | 173/200 [00:05<00:00, 29.62 it/sec, obj=137] INFO - 08:58:50: 87%|████████▋ | 174/200 [00:05<00:00, 29.62 it/sec, obj=137] INFO - 08:58:50: 88%|████████▊ | 175/200 [00:05<00:00, 29.63 it/sec, obj=137] INFO - 08:58:50: 88%|████████▊ | 176/200 [00:05<00:00, 29.63 it/sec, obj=137] INFO - 08:58:50: 88%|████████▊ | 177/200 [00:05<00:00, 29.63 it/sec, obj=137] INFO - 08:58:51: 89%|████████▉ | 178/200 [00:06<00:00, 29.63 it/sec, obj=137] INFO - 08:58:51: 90%|████████▉ | 179/200 [00:06<00:00, 29.64 it/sec, obj=137] INFO - 08:58:51: 90%|█████████ | 180/200 [00:06<00:00, 29.64 it/sec, obj=137] INFO - 08:58:51: 90%|█████████ | 181/200 [00:06<00:00, 29.65 it/sec, obj=137] INFO - 08:58:51: 91%|█████████ | 182/200 [00:06<00:00, 29.65 it/sec, obj=137] INFO - 08:58:51: 92%|█████████▏| 183/200 [00:06<00:00, 29.65 it/sec, obj=137] INFO - 08:58:51: 92%|█████████▏| 184/200 [00:06<00:00, 29.66 it/sec, obj=137] INFO - 08:58:51: 92%|█████████▎| 185/200 [00:06<00:00, 29.67 it/sec, obj=137] INFO - 08:58:51: 93%|█████████▎| 186/200 [00:06<00:00, 29.68 it/sec, obj=137] INFO - 08:58:51: 94%|█████████▎| 187/200 [00:06<00:00, 29.68 it/sec, obj=137] INFO - 08:58:51: 94%|█████████▍| 188/200 [00:06<00:00, 29.68 it/sec, obj=137] INFO - 08:58:51: 94%|█████████▍| 189/200 [00:06<00:00, 29.68 it/sec, obj=137] INFO - 08:58:51: 95%|█████████▌| 190/200 [00:06<00:00, 29.68 it/sec, obj=137] INFO - 08:58:51: 96%|█████████▌| 191/200 [00:06<00:00, 29.69 it/sec, obj=137] INFO - 08:58:51: 96%|█████████▌| 192/200 [00:06<00:00, 29.69 it/sec, obj=137] INFO - 08:58:51: 96%|█████████▋| 193/200 [00:06<00:00, 29.69 it/sec, obj=137] INFO - 08:58:51: 97%|█████████▋| 194/200 [00:06<00:00, 29.69 it/sec, obj=137] INFO - 08:58:51: 98%|█████████▊| 195/200 [00:06<00:00, 29.69 it/sec, obj=137] INFO - 08:58:51: 98%|█████████▊| 196/200 [00:06<00:00, 29.69 it/sec, obj=137] INFO - 08:58:51: 98%|█████████▊| 197/200 [00:06<00:00, 29.70 it/sec, obj=137] INFO - 08:58:51: 99%|█████████▉| 198/200 [00:06<00:00, 29.70 it/sec, obj=137] INFO - 08:58:51: 100%|█████████▉| 199/200 [00:06<00:00, 29.71 it/sec, obj=137] INFO - 08:58:51: 100%|██████████| 200/200 [00:06<00:00, 29.81 it/sec, obj=137] INFO - 08:58:51: Optimization result: INFO - 08:58:51: Optimizer info: INFO - 08:58:51: Status: None INFO - 08:58:51: Message: Maximum number of iterations reached. GEMSEO Stopped the driver INFO - 08:58:51: Number of calls to the objective function by the optimizer: 201 INFO - 08:58:51: Solution: INFO - 08:58:51: The solution is feasible. INFO - 08:58:51: Objective: 136.56123312100124 INFO - 08:58:51: Standardized constraints: INFO - 08:58:51: [volume fraction-0.3] = -1.9140380946858215e-09 INFO - 08:58:51: *** End MDOScenario execution (time: 0:00:06.725027) *** {'max_iter': 200, 'algo': 'NLOPT_MMA'} .. 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( "BasicHistory", variable_names=["compliance"], show=True, save=False ) .. image-sg:: /examples/topology_optimization/images/sphx_glr_plot_topology_optimization_short_cantilever_001.png :alt: History plot :srcset: /examples/topology_optimization/images/sphx_glr_plot_topology_optimization_short_cantilever_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("TopologyView", n_x=n_x, n_y=n_y, show=True, save=False) .. image-sg:: /examples/topology_optimization/images/sphx_glr_plot_topology_optimization_short_cantilever_002.png :alt: plot topology optimization short cantilever :srcset: /examples/topology_optimization/images/sphx_glr_plot_topology_optimization_short_cantilever_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 7.040 seconds) .. _sphx_glr_download_examples_topology_optimization_plot_topology_optimization_short_cantilever.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_short_cantilever.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_topology_optimization_short_cantilever.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_