Solve a 2D MBB topology optimization problem

from __future__ import annotations

from gemseo import configure_logger
from gemseo import create_scenario
from gemseo.problems.topo_opt.topopt_initialize import (
    initialize_design_space_and_discipline_to,
)

configure_logger()
<RootLogger root (INFO)>

Setup the topology optimization problem

Define the target volume fraction:

volume_fraction = 0.3

Define the problem type:

problem_name = "MBB"

Define the number of elements in x- and y- directions:

n_x = 50
n_y = 25

Define the full material Young’s modulus and the Poisson’s ratio:

e0 = 1
nu = 0.3

Define the penalty of the SIMP approach:

penalty = 3

Define the minimum member size in the solution:

min_member_size = 1.5

Instantiate the DesignSpace and the disciplines:

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,
)

Solve the topology optimization problem

Generate an MDOScenario

scenario = create_scenario(
    disciplines,
    "DisciplinaryOpt",
    "compliance",
    design_space,
)

Add the volume fraction constraint to the scenario:

scenario.add_constraint(
    "volume fraction", constraint_type="ineq", value=volume_fraction
)

Generate the XDSM

scenario.xdsmize()


Execute the scenario

scenario.execute({"max_iter": 200, "algo": "NLOPT_MMA"})
    INFO - 09:04:59:
    INFO - 09:04:59: *** Start MDOScenario execution ***
    INFO - 09:04:59: MDOScenario
    INFO - 09:04:59:    Disciplines: DensityFilter FininiteElementAnalysis MaterialModelInterpolation VolumeFraction
    INFO - 09:04:59:    MDO formulation: DisciplinaryOpt
    INFO - 09:04:59: Optimization problem:
    INFO - 09:04:59:    minimize compliance(x)
    INFO - 09:04:59:    with respect to x
    INFO - 09:04:59:    subject to constraints:
    INFO - 09:04:59:       volume fraction(x) <= 0.3
    INFO - 09:04:59: Solving optimization problem with algorithm NLOPT_MMA:
    INFO - 09:04:59:      1%|          | 2/200 [00:00<00:13, 14.37 it/sec, obj=1.79e+3]
    INFO - 09:04:59:      2%|▏         | 3/200 [00:00<00:12, 16.34 it/sec, obj=1.78e+3]
    INFO - 09:05:00:      2%|▏         | 4/200 [00:00<00:11, 17.58 it/sec, obj=1.77e+3]
    INFO - 09:05:00:      2%|▎         | 5/200 [00:00<00:10, 18.38 it/sec, obj=1.75e+3]
    INFO - 09:05:00:      3%|▎         | 6/200 [00:00<00:10, 18.93 it/sec, obj=1.71e+3]
    INFO - 09:05:00:      4%|▎         | 7/200 [00:00<00:09, 19.44 it/sec, obj=1.65e+3]
    INFO - 09:05:00:      4%|▍         | 8/200 [00:00<00:09, 19.77 it/sec, obj=1.41e+3]
    INFO - 09:05:00:      4%|▍         | 9/200 [00:00<00:09, 20.12 it/sec, obj=1.19e+3]
    INFO - 09:05:00:      5%|▌         | 10/200 [00:00<00:09, 20.36 it/sec, obj=903]
    INFO - 09:05:00:      6%|▌         | 11/200 [00:00<00:09, 20.57 it/sec, obj=724]
    INFO - 09:05:00:      6%|▌         | 12/200 [00:00<00:09, 20.78 it/sec, obj=612]
    INFO - 09:05:00:      6%|▋         | 13/200 [00:00<00:08, 20.96 it/sec, obj=534]
    INFO - 09:05:00:      7%|▋         | 14/200 [00:00<00:08, 21.06 it/sec, obj=474]
    INFO - 09:05:00:      8%|▊         | 15/200 [00:00<00:08, 21.22 it/sec, obj=444]
    INFO - 09:05:00:      8%|▊         | 16/200 [00:00<00:08, 21.31 it/sec, obj=419]
    INFO - 09:05:00:      8%|▊         | 17/200 [00:00<00:08, 21.44 it/sec, obj=405]
    INFO - 09:05:00:      9%|▉         | 18/200 [00:00<00:08, 21.57 it/sec, obj=387]
    INFO - 09:05:00:     10%|▉         | 19/200 [00:00<00:08, 21.66 it/sec, obj=364]
    INFO - 09:05:00:     10%|█         | 20/200 [00:00<00:08, 21.72 it/sec, obj=338]
    INFO - 09:05:00:     10%|█         | 21/200 [00:00<00:08, 21.78 it/sec, obj=306]
    INFO - 09:05:00:     11%|█         | 22/200 [00:01<00:08, 21.73 it/sec, obj=272]
    INFO - 09:05:00:     12%|█▏        | 23/200 [00:01<00:08, 21.79 it/sec, obj=253]
    INFO - 09:05:00:     12%|█▏        | 24/200 [00:01<00:08, 21.84 it/sec, obj=244]
    INFO - 09:05:00:     12%|█▎        | 25/200 [00:01<00:07, 21.92 it/sec, obj=234]
    INFO - 09:05:00:     13%|█▎        | 26/200 [00:01<00:07, 21.96 it/sec, obj=224]
    INFO - 09:05:01:     14%|█▎        | 27/200 [00:01<00:07, 22.02 it/sec, obj=213]
    INFO - 09:05:01:     14%|█▍        | 28/200 [00:01<00:07, 22.11 it/sec, obj=207]
    INFO - 09:05:01:     14%|█▍        | 29/200 [00:01<00:07, 22.16 it/sec, obj=202]
    INFO - 09:05:01:     15%|█▌        | 30/200 [00:01<00:07, 22.23 it/sec, obj=197]
    INFO - 09:05:01:     16%|█▌        | 31/200 [00:01<00:07, 22.29 it/sec, obj=193]
    INFO - 09:05:01:     16%|█▌        | 32/200 [00:01<00:07, 22.36 it/sec, obj=190]
    INFO - 09:05:01:     16%|█▋        | 33/200 [00:01<00:07, 22.41 it/sec, obj=188]
    INFO - 09:05:01:     17%|█▋        | 34/200 [00:01<00:07, 22.47 it/sec, obj=186]
    INFO - 09:05:01:     18%|█▊        | 35/200 [00:01<00:07, 22.53 it/sec, obj=185]
    INFO - 09:05:01:     18%|█▊        | 36/200 [00:01<00:07, 22.58 it/sec, obj=184]
    INFO - 09:05:01:     18%|█▊        | 37/200 [00:01<00:07, 22.61 it/sec, obj=183]
    INFO - 09:05:01:     19%|█▉        | 38/200 [00:01<00:07, 22.64 it/sec, obj=182]
    INFO - 09:05:01:     20%|█▉        | 39/200 [00:01<00:07, 22.69 it/sec, obj=181]
    INFO - 09:05:01:     20%|██        | 40/200 [00:01<00:07, 22.72 it/sec, obj=179]
    INFO - 09:05:01:     20%|██        | 41/200 [00:01<00:07, 22.69 it/sec, obj=177]
    INFO - 09:05:01:     21%|██        | 42/200 [00:01<00:06, 22.72 it/sec, obj=175]
    INFO - 09:05:01:     22%|██▏       | 43/200 [00:01<00:06, 22.76 it/sec, obj=174]
    INFO - 09:05:01:     22%|██▏       | 44/200 [00:01<00:06, 22.79 it/sec, obj=173]
    INFO - 09:05:01:     22%|██▎       | 45/200 [00:01<00:06, 22.82 it/sec, obj=172]
    INFO - 09:05:01:     23%|██▎       | 46/200 [00:02<00:06, 22.86 it/sec, obj=172]
    INFO - 09:05:01:     24%|██▎       | 47/200 [00:02<00:06, 22.89 it/sec, obj=172]
    INFO - 09:05:01:     24%|██▍       | 48/200 [00:02<00:06, 22.92 it/sec, obj=172]
    INFO - 09:05:01:     24%|██▍       | 49/200 [00:02<00:06, 22.95 it/sec, obj=172]
    INFO - 09:05:01:     25%|██▌       | 50/200 [00:02<00:06, 22.99 it/sec, obj=172]
    INFO - 09:05:02:     26%|██▌       | 51/200 [00:02<00:06, 23.02 it/sec, obj=172]
    INFO - 09:05:02:     26%|██▌       | 52/200 [00:02<00:06, 23.05 it/sec, obj=172]
    INFO - 09:05:02:     26%|██▋       | 53/200 [00:02<00:06, 23.08 it/sec, obj=172]
    INFO - 09:05:02:     27%|██▋       | 54/200 [00:02<00:06, 23.12 it/sec, obj=172]
    INFO - 09:05:02:     28%|██▊       | 55/200 [00:02<00:06, 23.15 it/sec, obj=172]
    INFO - 09:05:02:     28%|██▊       | 56/200 [00:02<00:06, 23.18 it/sec, obj=172]
    INFO - 09:05:02:     28%|██▊       | 57/200 [00:02<00:06, 23.21 it/sec, obj=172]
    INFO - 09:05:02:     29%|██▉       | 58/200 [00:02<00:06, 23.23 it/sec, obj=171]
    INFO - 09:05:02:     30%|██▉       | 59/200 [00:02<00:06, 23.26 it/sec, obj=171]
    INFO - 09:05:02:     30%|███       | 60/200 [00:02<00:06, 23.30 it/sec, obj=171]
    INFO - 09:05:02:     30%|███       | 61/200 [00:02<00:05, 23.33 it/sec, obj=171]
    INFO - 09:05:02:     31%|███       | 62/200 [00:02<00:05, 23.35 it/sec, obj=171]
    INFO - 09:05:02:     32%|███▏      | 63/200 [00:02<00:05, 23.37 it/sec, obj=171]
    INFO - 09:05:02:     32%|███▏      | 64/200 [00:02<00:05, 23.39 it/sec, obj=171]
    INFO - 09:05:02:     32%|███▎      | 65/200 [00:02<00:05, 23.40 it/sec, obj=171]
    INFO - 09:05:02:     33%|███▎      | 66/200 [00:02<00:05, 23.42 it/sec, obj=171]
    INFO - 09:05:02:     34%|███▎      | 67/200 [00:02<00:05, 23.43 it/sec, obj=171]
    INFO - 09:05:02:     34%|███▍      | 68/200 [00:02<00:05, 23.43 it/sec, obj=171]
    INFO - 09:05:02:     34%|███▍      | 69/200 [00:02<00:05, 23.45 it/sec, obj=171]
    INFO - 09:05:02:     35%|███▌      | 70/200 [00:02<00:05, 23.46 it/sec, obj=171]
    INFO - 09:05:02:     36%|███▌      | 71/200 [00:03<00:05, 23.48 it/sec, obj=171]
    INFO - 09:05:02:     36%|███▌      | 72/200 [00:03<00:05, 23.49 it/sec, obj=171]
    INFO - 09:05:02:     36%|███▋      | 73/200 [00:03<00:05, 23.51 it/sec, obj=171]
    INFO - 09:05:02:     37%|███▋      | 74/200 [00:03<00:05, 23.52 it/sec, obj=171]
    INFO - 09:05:02:     38%|███▊      | 75/200 [00:03<00:05, 23.55 it/sec, obj=171]
    INFO - 09:05:03:     38%|███▊      | 76/200 [00:03<00:05, 23.56 it/sec, obj=171]
    INFO - 09:05:03:     38%|███▊      | 77/200 [00:03<00:05, 23.58 it/sec, obj=171]
    INFO - 09:05:03:     39%|███▉      | 78/200 [00:03<00:05, 23.59 it/sec, obj=171]
    INFO - 09:05:03:     40%|███▉      | 79/200 [00:03<00:05, 23.61 it/sec, obj=171]
    INFO - 09:05:03:     40%|████      | 80/200 [00:03<00:05, 23.63 it/sec, obj=171]
    INFO - 09:05:03:     40%|████      | 81/200 [00:03<00:05, 23.65 it/sec, obj=171]
    INFO - 09:05:03:     41%|████      | 82/200 [00:03<00:04, 23.66 it/sec, obj=171]
    INFO - 09:05:03:     42%|████▏     | 83/200 [00:03<00:04, 23.68 it/sec, obj=171]
    INFO - 09:05:03:     42%|████▏     | 84/200 [00:03<00:04, 23.69 it/sec, obj=171]
    INFO - 09:05:03:     42%|████▎     | 85/200 [00:03<00:04, 23.71 it/sec, obj=171]
    INFO - 09:05:03:     43%|████▎     | 86/200 [00:03<00:04, 23.73 it/sec, obj=171]
    INFO - 09:05:03:     44%|████▎     | 87/200 [00:03<00:04, 23.74 it/sec, obj=171]
    INFO - 09:05:03:     44%|████▍     | 88/200 [00:03<00:04, 23.74 it/sec, obj=171]
    INFO - 09:05:03:     44%|████▍     | 89/200 [00:03<00:04, 23.75 it/sec, obj=171]
    INFO - 09:05:03:     45%|████▌     | 90/200 [00:03<00:04, 23.76 it/sec, obj=171]
    INFO - 09:05:03:     46%|████▌     | 91/200 [00:03<00:04, 23.77 it/sec, obj=171]
    INFO - 09:05:03:     46%|████▌     | 92/200 [00:03<00:04, 23.78 it/sec, obj=171]
    INFO - 09:05:03:     46%|████▋     | 93/200 [00:03<00:04, 23.80 it/sec, obj=171]
    INFO - 09:05:03:     47%|████▋     | 94/200 [00:03<00:04, 23.81 it/sec, obj=171]
    INFO - 09:05:03:     48%|████▊     | 95/200 [00:03<00:04, 23.82 it/sec, obj=171]
    INFO - 09:05:03:     48%|████▊     | 96/200 [00:04<00:04, 23.84 it/sec, obj=171]
    INFO - 09:05:03:     48%|████▊     | 97/200 [00:04<00:04, 23.85 it/sec, obj=171]
    INFO - 09:05:03:     49%|████▉     | 98/200 [00:04<00:04, 23.86 it/sec, obj=171]
    INFO - 09:05:03:     50%|████▉     | 99/200 [00:04<00:04, 23.87 it/sec, obj=171]
    INFO - 09:05:03:     50%|█████     | 100/200 [00:04<00:04, 23.88 it/sec, obj=171]
    INFO - 09:05:04:     50%|█████     | 101/200 [00:04<00:04, 23.89 it/sec, obj=171]
    INFO - 09:05:04:     51%|█████     | 102/200 [00:04<00:04, 23.90 it/sec, obj=171]
    INFO - 09:05:04:     52%|█████▏    | 103/200 [00:04<00:04, 23.91 it/sec, obj=171]
    INFO - 09:05:04:     52%|█████▏    | 104/200 [00:04<00:04, 23.93 it/sec, obj=171]
    INFO - 09:05:04:     52%|█████▎    | 105/200 [00:04<00:03, 23.93 it/sec, obj=171]
    INFO - 09:05:04:     53%|█████▎    | 106/200 [00:04<00:03, 23.94 it/sec, obj=171]
    INFO - 09:05:04:     54%|█████▎    | 107/200 [00:04<00:03, 23.96 it/sec, obj=171]
    INFO - 09:05:04:     54%|█████▍    | 108/200 [00:04<00:03, 23.96 it/sec, obj=171]
    INFO - 09:05:04:     55%|█████▍    | 109/200 [00:04<00:03, 23.97 it/sec, obj=171]
    INFO - 09:05:04:     55%|█████▌    | 110/200 [00:04<00:03, 23.97 it/sec, obj=171]
    INFO - 09:05:04:     56%|█████▌    | 111/200 [00:04<00:03, 23.98 it/sec, obj=171]
    INFO - 09:05:04:     56%|█████▌    | 112/200 [00:04<00:03, 23.97 it/sec, obj=171]
    INFO - 09:05:04:     56%|█████▋    | 113/200 [00:04<00:03, 23.98 it/sec, obj=171]
    INFO - 09:05:04:     57%|█████▋    | 114/200 [00:04<00:03, 23.98 it/sec, obj=171]
    INFO - 09:05:04:     57%|█████▊    | 115/200 [00:04<00:03, 23.99 it/sec, obj=172]
    INFO - 09:05:04:     58%|█████▊    | 116/200 [00:04<00:03, 23.99 it/sec, obj=172]
    INFO - 09:05:04:     58%|█████▊    | 117/200 [00:04<00:03, 23.99 it/sec, obj=172]
    INFO - 09:05:04:     59%|█████▉    | 118/200 [00:04<00:03, 24.00 it/sec, obj=172]
    INFO - 09:05:04:     60%|█████▉    | 119/200 [00:04<00:03, 24.00 it/sec, obj=171]
    INFO - 09:05:04:     60%|██████    | 120/200 [00:04<00:03, 24.00 it/sec, obj=171]
    INFO - 09:05:04:     60%|██████    | 121/200 [00:05<00:03, 24.01 it/sec, obj=171]
    INFO - 09:05:04:     61%|██████    | 122/200 [00:05<00:03, 24.01 it/sec, obj=170]
    INFO - 09:05:04:     62%|██████▏   | 123/200 [00:05<00:03, 24.02 it/sec, obj=170]
    INFO - 09:05:04:     62%|██████▏   | 124/200 [00:05<00:03, 24.03 it/sec, obj=170]
    INFO - 09:05:05:     62%|██████▎   | 125/200 [00:05<00:03, 24.04 it/sec, obj=170]
    INFO - 09:05:05:     63%|██████▎   | 126/200 [00:05<00:03, 24.04 it/sec, obj=170]
    INFO - 09:05:05:     64%|██████▎   | 127/200 [00:05<00:03, 24.05 it/sec, obj=170]
    INFO - 09:05:05:     64%|██████▍   | 128/200 [00:05<00:02, 24.06 it/sec, obj=170]
    INFO - 09:05:05:     64%|██████▍   | 129/200 [00:05<00:02, 24.06 it/sec, obj=170]
    INFO - 09:05:05:     65%|██████▌   | 130/200 [00:05<00:02, 24.07 it/sec, obj=170]
    INFO - 09:05:05:     66%|██████▌   | 131/200 [00:05<00:02, 24.07 it/sec, obj=170]
    INFO - 09:05:05:     66%|██████▌   | 132/200 [00:05<00:02, 24.08 it/sec, obj=170]
    INFO - 09:05:05:     66%|██████▋   | 133/200 [00:05<00:02, 24.09 it/sec, obj=170]
    INFO - 09:05:05:     67%|██████▋   | 134/200 [00:05<00:02, 24.10 it/sec, obj=170]
    INFO - 09:05:05:     68%|██████▊   | 135/200 [00:05<00:02, 24.11 it/sec, obj=170]
    INFO - 09:05:05:     68%|██████▊   | 136/200 [00:05<00:02, 24.12 it/sec, obj=170]
    INFO - 09:05:05:     68%|██████▊   | 137/200 [00:05<00:02, 24.13 it/sec, obj=170]
    INFO - 09:05:05:     69%|██████▉   | 138/200 [00:05<00:02, 24.13 it/sec, obj=170]
    INFO - 09:05:05:     70%|██████▉   | 139/200 [00:05<00:02, 24.14 it/sec, obj=170]
    INFO - 09:05:05:     70%|███████   | 140/200 [00:05<00:02, 24.14 it/sec, obj=170]
    INFO - 09:05:05:     70%|███████   | 141/200 [00:05<00:02, 24.15 it/sec, obj=170]
    INFO - 09:05:05:     71%|███████   | 142/200 [00:05<00:02, 24.16 it/sec, obj=170]
    INFO - 09:05:05:     72%|███████▏  | 143/200 [00:05<00:02, 24.17 it/sec, obj=170]
    INFO - 09:05:05:     72%|███████▏  | 144/200 [00:05<00:02, 24.17 it/sec, obj=170]
    INFO - 09:05:05:     72%|███████▎  | 145/200 [00:05<00:02, 24.18 it/sec, obj=170]
    INFO - 09:05:05:     73%|███████▎  | 146/200 [00:06<00:02, 24.19 it/sec, obj=170]
    INFO - 09:05:05:     74%|███████▎  | 147/200 [00:06<00:02, 24.19 it/sec, obj=170]
    INFO - 09:05:05:     74%|███████▍  | 148/200 [00:06<00:02, 24.19 it/sec, obj=170]
    INFO - 09:05:05:     74%|███████▍  | 149/200 [00:06<00:02, 24.20 it/sec, obj=170]
    INFO - 09:05:06:     75%|███████▌  | 150/200 [00:06<00:02, 24.20 it/sec, obj=170]
    INFO - 09:05:06:     76%|███████▌  | 151/200 [00:06<00:02, 24.21 it/sec, obj=170]
    INFO - 09:05:06:     76%|███████▌  | 152/200 [00:06<00:01, 24.21 it/sec, obj=170]
    INFO - 09:05:06:     76%|███████▋  | 153/200 [00:06<00:01, 24.22 it/sec, obj=170]
    INFO - 09:05:06:     77%|███████▋  | 154/200 [00:06<00:01, 24.23 it/sec, obj=170]
    INFO - 09:05:06:     78%|███████▊  | 155/200 [00:06<00:01, 24.23 it/sec, obj=170]
    INFO - 09:05:06:     78%|███████▊  | 156/200 [00:06<00:01, 24.24 it/sec, obj=170]
    INFO - 09:05:06:     78%|███████▊  | 157/200 [00:06<00:01, 24.25 it/sec, obj=170]
    INFO - 09:05:06:     79%|███████▉  | 158/200 [00:06<00:01, 24.25 it/sec, obj=170]
    INFO - 09:05:06:     80%|███████▉  | 159/200 [00:06<00:01, 24.26 it/sec, obj=170]
    INFO - 09:05:06:     80%|████████  | 160/200 [00:06<00:01, 24.26 it/sec, obj=170]
    INFO - 09:05:06:     80%|████████  | 161/200 [00:06<00:01, 24.27 it/sec, obj=170]
    INFO - 09:05:06:     81%|████████  | 162/200 [00:06<00:01, 24.27 it/sec, obj=170]
    INFO - 09:05:06:     82%|████████▏ | 163/200 [00:06<00:01, 24.27 it/sec, obj=170]
    INFO - 09:05:06:     82%|████████▏ | 164/200 [00:06<00:01, 24.28 it/sec, obj=170]
    INFO - 09:05:06:     82%|████████▎ | 165/200 [00:06<00:01, 24.29 it/sec, obj=170]
    INFO - 09:05:06:     83%|████████▎ | 166/200 [00:06<00:01, 24.30 it/sec, obj=170]
    INFO - 09:05:06:     84%|████████▎ | 167/200 [00:06<00:01, 24.31 it/sec, obj=170]
    INFO - 09:05:06:     84%|████████▍ | 168/200 [00:06<00:01, 24.31 it/sec, obj=170]
    INFO - 09:05:06:     84%|████████▍ | 169/200 [00:06<00:01, 24.31 it/sec, obj=170]
    INFO - 09:05:06:     85%|████████▌ | 170/200 [00:06<00:01, 24.31 it/sec, obj=170]
    INFO - 09:05:06:     86%|████████▌ | 171/200 [00:07<00:01, 24.32 it/sec, obj=170]
    INFO - 09:05:06:     86%|████████▌ | 172/200 [00:07<00:01, 24.32 it/sec, obj=170]
    INFO - 09:05:06:     86%|████████▋ | 173/200 [00:07<00:01, 24.32 it/sec, obj=170]
    INFO - 09:05:06:     87%|████████▋ | 174/200 [00:07<00:01, 24.33 it/sec, obj=170]
    INFO - 09:05:06:     88%|████████▊ | 175/200 [00:07<00:01, 24.34 it/sec, obj=170]
    INFO - 09:05:07:     88%|████████▊ | 176/200 [00:07<00:00, 24.35 it/sec, obj=170]
    INFO - 09:05:07:     88%|████████▊ | 177/200 [00:07<00:00, 24.35 it/sec, obj=170]
    INFO - 09:05:07:     89%|████████▉ | 178/200 [00:07<00:00, 24.35 it/sec, obj=170]
    INFO - 09:05:07:     90%|████████▉ | 179/200 [00:07<00:00, 24.35 it/sec, obj=170]
    INFO - 09:05:07:     90%|█████████ | 180/200 [00:07<00:00, 24.35 it/sec, obj=170]
    INFO - 09:05:07:     90%|█████████ | 181/200 [00:07<00:00, 24.35 it/sec, obj=170]
    INFO - 09:05:07:     91%|█████████ | 182/200 [00:07<00:00, 24.36 it/sec, obj=170]
    INFO - 09:05:07:     92%|█████████▏| 183/200 [00:07<00:00, 24.36 it/sec, obj=170]
    INFO - 09:05:07:     92%|█████████▏| 184/200 [00:07<00:00, 24.37 it/sec, obj=170]
    INFO - 09:05:07:     92%|█████████▎| 185/200 [00:07<00:00, 24.37 it/sec, obj=170]
    INFO - 09:05:07:     93%|█████████▎| 186/200 [00:07<00:00, 24.38 it/sec, obj=170]
    INFO - 09:05:07:     94%|█████████▎| 187/200 [00:07<00:00, 24.39 it/sec, obj=170]
    INFO - 09:05:07:     94%|█████████▍| 188/200 [00:07<00:00, 24.39 it/sec, obj=170]
    INFO - 09:05:07:     94%|█████████▍| 189/200 [00:07<00:00, 24.39 it/sec, obj=170]
    INFO - 09:05:07:     95%|█████████▌| 190/200 [00:07<00:00, 24.40 it/sec, obj=170]
    INFO - 09:05:07:     96%|█████████▌| 191/200 [00:07<00:00, 24.41 it/sec, obj=170]
    INFO - 09:05:07:     96%|█████████▌| 192/200 [00:07<00:00, 24.41 it/sec, obj=170]
    INFO - 09:05:07:     96%|█████████▋| 193/200 [00:07<00:00, 24.42 it/sec, obj=170]
    INFO - 09:05:07:     97%|█████████▋| 194/200 [00:07<00:00, 24.42 it/sec, obj=170]
    INFO - 09:05:07:     98%|█████████▊| 195/200 [00:07<00:00, 24.42 it/sec, obj=170]
    INFO - 09:05:07:     98%|█████████▊| 196/200 [00:08<00:00, 24.42 it/sec, obj=170]
    INFO - 09:05:07:     98%|█████████▊| 197/200 [00:08<00:00, 24.42 it/sec, obj=170]
    INFO - 09:05:07:     99%|█████████▉| 198/200 [00:08<00:00, 24.42 it/sec, obj=170]
    INFO - 09:05:07:    100%|█████████▉| 199/200 [00:08<00:00, 24.43 it/sec, obj=170]
    INFO - 09:05:07:    100%|██████████| 200/200 [00:08<00:00, 24.52 it/sec, obj=170]
    INFO - 09:05:07: Optimization result:
    INFO - 09:05:07:    Optimizer info:
    INFO - 09:05:07:       Status: None
    INFO - 09:05:07:       Message: Maximum number of iterations reached. GEMSEO Stopped the driver
    INFO - 09:05:07:       Number of calls to the objective function by the optimizer: 201
    INFO - 09:05:07:    Solution:
    INFO - 09:05:07:       The solution is feasible.
    INFO - 09:05:07:       Objective: 169.89161468983534
    INFO - 09:05:07:       Standardized constraints:
    INFO - 09:05:07:          [volume fraction-0.3] = -4.312432086428508e-07
    INFO - 09:05:07: *** End MDOScenario execution (time: 0:00:08.174480) ***

{'max_iter': 200, 'algo': 'NLOPT_MMA'}

Results

Post-process the optimization history:

scenario.post_process(
    "BasicHistory", variable_names=["compliance"], show=True, save=False
)
History plot
/home/docs/checkouts/readthedocs.org/user_builds/gemseo/envs/stable/lib/python3.9/site-packages/gemseo/datasets/dataset.py:490: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`
  self[columns] = value

<gemseo.post.basic_history.BasicHistory object at 0x7f0e1a920040>

Plot the solution

scenario.post_process("TopologyView", n_x=n_x, n_y=n_y, show=True, save=False)
plot topology optimization MBB
<gemseo.post.topology_view.TopologyView object at 0x7f0e1a920610>

Total running time of the script: (0 minutes 8.910 seconds)

Gallery generated by Sphinx-Gallery