Solve a 2D L-shape 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 fractio:

volume_fraction = 0.3

Define the problem type:

problem_name = "L-Shape"

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

n_x = 25
n_y = 25

Define the full material Young’s modulus and 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,
    formulation="DisciplinaryOpt",
    objective_name="compliance",
    design_space=design_space,
)

Add the volume fraction constraint to the scenario:

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

Generate the XDSM

scenario.xdsmize()


Execute the scenario

scenario.execute({"max_iter": 200, "algo": "NLOPT_MMA"})
    INFO - 10:54:09:
    INFO - 10:54:09: *** Start MDOScenario execution ***
    INFO - 10:54:09: MDOScenario
    INFO - 10:54:09:    Disciplines: DensityFilter FininiteElementAnalysis MaterialModelInterpolation VolumeFraction
    INFO - 10:54:09:    MDO formulation: DisciplinaryOpt
    INFO - 10:54:09: Optimization problem:
    INFO - 10:54:09:    minimize compliance(x)
    INFO - 10:54:09:    with respect to x
    INFO - 10:54:09:    subject to constraints:
    INFO - 10:54:09:       volume fraction(x) <= 0.3
    INFO - 10:54:09:      1%|          | 2/200 [00:00<00:07, 25.85 it/sec, obj=2.23e+3]
    INFO - 10:54:09:      2%|▏         | 3/200 [00:00<00:06, 29.96 it/sec, obj=1.96e+3]
    INFO - 10:54:09:      2%|▏         | 4/200 [00:00<00:06, 32.64 it/sec, obj=1.75e+3]
    INFO - 10:54:09:      2%|▎         | 5/200 [00:00<00:05, 34.46 it/sec, obj=1.57e+3]
    INFO - 10:54:09:      3%|▎         | 6/200 [00:00<00:05, 35.73 it/sec, obj=1.2e+3]
    INFO - 10:54:09:      4%|▎         | 7/200 [00:00<00:05, 36.62 it/sec, obj=963]
    INFO - 10:54:09:      4%|▍         | 8/200 [00:00<00:05, 37.28 it/sec, obj=624]
    INFO - 10:54:09:      4%|▍         | 9/200 [00:00<00:05, 37.79 it/sec, obj=497]
    INFO - 10:54:09:      5%|▌         | 10/200 [00:00<00:04, 38.25 it/sec, obj=395]
    INFO - 10:54:09:      6%|▌         | 11/200 [00:00<00:04, 38.68 it/sec, obj=306]
    INFO - 10:54:09:      6%|▌         | 12/200 [00:00<00:04, 39.07 it/sec, obj=251]
    INFO - 10:54:09:      6%|▋         | 13/200 [00:00<00:04, 39.45 it/sec, obj=225]
    INFO - 10:54:09:      7%|▋         | 14/200 [00:00<00:04, 39.79 it/sec, obj=209]
    INFO - 10:54:09:      8%|▊         | 15/200 [00:00<00:04, 40.11 it/sec, obj=201]
    INFO - 10:54:09:      8%|▊         | 16/200 [00:00<00:04, 40.41 it/sec, obj=195]
    INFO - 10:54:10:      8%|▊         | 17/200 [00:00<00:04, 40.64 it/sec, obj=190]
    INFO - 10:54:10:      9%|▉         | 18/200 [00:00<00:04, 40.90 it/sec, obj=186]
    INFO - 10:54:10:     10%|▉         | 19/200 [00:00<00:04, 41.13 it/sec, obj=182]
    INFO - 10:54:10:     10%|█         | 20/200 [00:00<00:04, 41.37 it/sec, obj=178]
    INFO - 10:54:10:     10%|█         | 21/200 [00:00<00:04, 41.60 it/sec, obj=174]
    INFO - 10:54:10:     11%|█         | 22/200 [00:00<00:04, 41.78 it/sec, obj=169]
    INFO - 10:54:10:     12%|█▏        | 23/200 [00:00<00:04, 41.91 it/sec, obj=164]
    INFO - 10:54:10:     12%|█▏        | 24/200 [00:00<00:04, 42.07 it/sec, obj=161]
    INFO - 10:54:10:     12%|█▎        | 25/200 [00:00<00:04, 42.24 it/sec, obj=159]
    INFO - 10:54:10:     13%|█▎        | 26/200 [00:00<00:04, 42.45 it/sec, obj=157]
    INFO - 10:54:10:     14%|█▎        | 27/200 [00:00<00:04, 42.64 it/sec, obj=156]
    INFO - 10:54:10:     14%|█▍        | 28/200 [00:00<00:04, 42.79 it/sec, obj=155]
    INFO - 10:54:10:     14%|█▍        | 29/200 [00:00<00:03, 42.93 it/sec, obj=154]
    INFO - 10:54:10:     15%|█▌        | 30/200 [00:00<00:03, 43.08 it/sec, obj=154]
    INFO - 10:54:10:     16%|█▌        | 31/200 [00:00<00:03, 43.21 it/sec, obj=153]
    INFO - 10:54:10:     16%|█▌        | 32/200 [00:00<00:03, 43.30 it/sec, obj=153]
    INFO - 10:54:10:     16%|█▋        | 33/200 [00:00<00:03, 43.40 it/sec, obj=152]
    INFO - 10:54:10:     17%|█▋        | 34/200 [00:00<00:03, 43.51 it/sec, obj=152]
    INFO - 10:54:10:     18%|█▊        | 35/200 [00:00<00:03, 43.58 it/sec, obj=152]
    INFO - 10:54:10:     18%|█▊        | 36/200 [00:00<00:03, 43.66 it/sec, obj=152]
    INFO - 10:54:10:     18%|█▊        | 37/200 [00:00<00:03, 43.72 it/sec, obj=152]
    INFO - 10:54:10:     19%|█▉        | 38/200 [00:00<00:03, 43.76 it/sec, obj=152]
    INFO - 10:54:10:     20%|█▉        | 39/200 [00:00<00:03, 43.84 it/sec, obj=152]
    INFO - 10:54:10:     20%|██        | 40/200 [00:00<00:03, 43.93 it/sec, obj=152]
    INFO - 10:54:10:     20%|██        | 41/200 [00:00<00:03, 44.01 it/sec, obj=152]
    INFO - 10:54:10:     21%|██        | 42/200 [00:00<00:03, 44.09 it/sec, obj=152]
    INFO - 10:54:10:     22%|██▏       | 43/200 [00:00<00:03, 44.13 it/sec, obj=152]
    INFO - 10:54:10:     22%|██▏       | 44/200 [00:00<00:03, 44.20 it/sec, obj=152]
    INFO - 10:54:10:     22%|██▎       | 45/200 [00:01<00:03, 44.29 it/sec, obj=152]
    INFO - 10:54:10:     23%|██▎       | 46/200 [00:01<00:03, 44.35 it/sec, obj=152]
    INFO - 10:54:10:     24%|██▎       | 47/200 [00:01<00:03, 44.44 it/sec, obj=152]
    INFO - 10:54:10:     24%|██▍       | 48/200 [00:01<00:03, 44.51 it/sec, obj=152]
    INFO - 10:54:10:     24%|██▍       | 49/200 [00:01<00:03, 44.57 it/sec, obj=152]
    INFO - 10:54:10:     25%|██▌       | 50/200 [00:01<00:03, 44.62 it/sec, obj=152]
    INFO - 10:54:10:     26%|██▌       | 51/200 [00:01<00:03, 44.64 it/sec, obj=152]
    INFO - 10:54:10:     26%|██▌       | 52/200 [00:01<00:03, 44.68 it/sec, obj=152]
    INFO - 10:54:10:     26%|██▋       | 53/200 [00:01<00:03, 44.72 it/sec, obj=152]
    INFO - 10:54:10:     27%|██▋       | 54/200 [00:01<00:03, 44.74 it/sec, obj=152]
    INFO - 10:54:10:     28%|██▊       | 55/200 [00:01<00:03, 44.74 it/sec, obj=152]
    INFO - 10:54:10:     28%|██▊       | 56/200 [00:01<00:03, 44.76 it/sec, obj=152]
    INFO - 10:54:10:     28%|██▊       | 57/200 [00:01<00:03, 44.78 it/sec, obj=152]
    INFO - 10:54:10:     29%|██▉       | 58/200 [00:01<00:03, 44.81 it/sec, obj=152]
    INFO - 10:54:10:     30%|██▉       | 59/200 [00:01<00:03, 44.83 it/sec, obj=152]
    INFO - 10:54:10:     30%|███       | 60/200 [00:01<00:03, 44.85 it/sec, obj=152]
    INFO - 10:54:10:     30%|███       | 61/200 [00:01<00:03, 44.87 it/sec, obj=152]
    INFO - 10:54:10:     31%|███       | 62/200 [00:01<00:03, 44.90 it/sec, obj=152]
    INFO - 10:54:10:     32%|███▏      | 63/200 [00:01<00:03, 44.90 it/sec, obj=152]
    INFO - 10:54:11:     32%|███▏      | 64/200 [00:01<00:03, 44.91 it/sec, obj=152]
    INFO - 10:54:11:     32%|███▎      | 65/200 [00:01<00:03, 44.91 it/sec, obj=152]
    INFO - 10:54:11:     33%|███▎      | 66/200 [00:01<00:02, 44.94 it/sec, obj=152]
    INFO - 10:54:11:     34%|███▎      | 67/200 [00:01<00:02, 44.94 it/sec, obj=152]
    INFO - 10:54:11:     34%|███▍      | 68/200 [00:01<00:02, 44.95 it/sec, obj=152]
    INFO - 10:54:11:     34%|███▍      | 69/200 [00:01<00:02, 44.94 it/sec, obj=152]
    INFO - 10:54:11:     35%|███▌      | 70/200 [00:01<00:02, 44.97 it/sec, obj=152]
    INFO - 10:54:11:     36%|███▌      | 71/200 [00:01<00:02, 45.02 it/sec, obj=152]
    INFO - 10:54:11:     36%|███▌      | 72/200 [00:01<00:02, 45.06 it/sec, obj=152]
    INFO - 10:54:11:     36%|███▋      | 73/200 [00:01<00:02, 45.10 it/sec, obj=152]
    INFO - 10:54:11:     37%|███▋      | 74/200 [00:01<00:02, 45.14 it/sec, obj=152]
    INFO - 10:54:11:     38%|███▊      | 75/200 [00:01<00:02, 45.20 it/sec, obj=152]
    INFO - 10:54:11:     38%|███▊      | 76/200 [00:01<00:02, 45.25 it/sec, obj=152]
    INFO - 10:54:11:     38%|███▊      | 77/200 [00:01<00:02, 45.30 it/sec, obj=152]
    INFO - 10:54:11:     39%|███▉      | 78/200 [00:01<00:02, 45.31 it/sec, obj=152]
    INFO - 10:54:11:     40%|███▉      | 79/200 [00:01<00:02, 45.33 it/sec, obj=152]
    INFO - 10:54:11:     40%|████      | 80/200 [00:01<00:02, 45.34 it/sec, obj=152]
    INFO - 10:54:11:     40%|████      | 81/200 [00:01<00:02, 45.39 it/sec, obj=152]
    INFO - 10:54:11:     41%|████      | 82/200 [00:01<00:02, 45.43 it/sec, obj=152]
    INFO - 10:54:11:     42%|████▏     | 83/200 [00:01<00:02, 45.44 it/sec, obj=152]
    INFO - 10:54:11:     42%|████▏     | 84/200 [00:01<00:02, 45.46 it/sec, obj=152]
    INFO - 10:54:11:     42%|████▎     | 85/200 [00:01<00:02, 45.49 it/sec, obj=152]
    INFO - 10:54:11:     43%|████▎     | 86/200 [00:01<00:02, 45.53 it/sec, obj=152]
    INFO - 10:54:11:     44%|████▎     | 87/200 [00:01<00:02, 45.57 it/sec, obj=152]
    INFO - 10:54:11:     44%|████▍     | 88/200 [00:01<00:02, 45.62 it/sec, obj=152]
    INFO - 10:54:11:     44%|████▍     | 89/200 [00:01<00:02, 45.67 it/sec, obj=152]
    INFO - 10:54:11:     45%|████▌     | 90/200 [00:01<00:02, 45.70 it/sec, obj=152]
    INFO - 10:54:11:     46%|████▌     | 91/200 [00:01<00:02, 45.73 it/sec, obj=152]
    INFO - 10:54:11:     46%|████▌     | 92/200 [00:02<00:02, 45.76 it/sec, obj=152]
    INFO - 10:54:11:     46%|████▋     | 93/200 [00:02<00:02, 45.80 it/sec, obj=152]
    INFO - 10:54:11:     47%|████▋     | 94/200 [00:02<00:02, 45.83 it/sec, obj=152]
    INFO - 10:54:11:     48%|████▊     | 95/200 [00:02<00:02, 45.86 it/sec, obj=152]
    INFO - 10:54:11:     48%|████▊     | 96/200 [00:02<00:02, 45.88 it/sec, obj=152]
    INFO - 10:54:11:     48%|████▊     | 97/200 [00:02<00:02, 45.92 it/sec, obj=152]
    INFO - 10:54:11:     49%|████▉     | 98/200 [00:02<00:02, 45.96 it/sec, obj=152]
    INFO - 10:54:11:     50%|████▉     | 99/200 [00:02<00:02, 46.00 it/sec, obj=152]
    INFO - 10:54:11:     50%|█████     | 100/200 [00:02<00:02, 46.03 it/sec, obj=152]
    INFO - 10:54:11:     50%|█████     | 101/200 [00:02<00:02, 46.06 it/sec, obj=152]
    INFO - 10:54:11:     51%|█████     | 102/200 [00:02<00:02, 46.08 it/sec, obj=152]
    INFO - 10:54:11:     52%|█████▏    | 103/200 [00:02<00:02, 46.09 it/sec, obj=152]
    INFO - 10:54:11:     52%|█████▏    | 104/200 [00:02<00:02, 46.12 it/sec, obj=152]
    INFO - 10:54:11:     52%|█████▎    | 105/200 [00:02<00:02, 46.13 it/sec, obj=152]
    INFO - 10:54:11:     53%|█████▎    | 106/200 [00:02<00:02, 46.17 it/sec, obj=152]
    INFO - 10:54:11:     54%|█████▎    | 107/200 [00:02<00:02, 46.20 it/sec, obj=152]
    INFO - 10:54:11:     54%|█████▍    | 108/200 [00:02<00:01, 46.23 it/sec, obj=152]
    INFO - 10:54:11:     55%|█████▍    | 109/200 [00:02<00:01, 46.26 it/sec, obj=152]
    INFO - 10:54:11:     55%|█████▌    | 110/200 [00:02<00:01, 46.30 it/sec, obj=152]
    INFO - 10:54:11:     56%|█████▌    | 111/200 [00:02<00:01, 46.33 it/sec, obj=152]
    INFO - 10:54:12:     56%|█████▌    | 112/200 [00:02<00:01, 46.36 it/sec, obj=152]
    INFO - 10:54:12:     56%|█████▋    | 113/200 [00:02<00:01, 46.35 it/sec, obj=152]
    INFO - 10:54:12:     57%|█████▋    | 114/200 [00:02<00:01, 46.37 it/sec, obj=152]
    INFO - 10:54:12:     57%|█████▊    | 115/200 [00:02<00:01, 46.40 it/sec, obj=152]
    INFO - 10:54:12:     58%|█████▊    | 116/200 [00:02<00:01, 46.42 it/sec, obj=152]
    INFO - 10:54:12:     58%|█████▊    | 117/200 [00:02<00:01, 46.45 it/sec, obj=152]
    INFO - 10:54:12:     59%|█████▉    | 118/200 [00:02<00:01, 46.47 it/sec, obj=152]
    INFO - 10:54:12:     60%|█████▉    | 119/200 [00:02<00:01, 46.49 it/sec, obj=152]
    INFO - 10:54:12:     60%|██████    | 120/200 [00:02<00:01, 46.52 it/sec, obj=152]
    INFO - 10:54:12:     60%|██████    | 121/200 [00:02<00:01, 46.55 it/sec, obj=152]
    INFO - 10:54:12:     61%|██████    | 122/200 [00:02<00:01, 46.58 it/sec, obj=152]
    INFO - 10:54:12:     62%|██████▏   | 123/200 [00:02<00:01, 46.60 it/sec, obj=152]
    INFO - 10:54:12:     62%|██████▏   | 124/200 [00:02<00:01, 46.62 it/sec, obj=152]
    INFO - 10:54:12:     62%|██████▎   | 125/200 [00:02<00:01, 46.64 it/sec, obj=152]
    INFO - 10:54:12:     63%|██████▎   | 126/200 [00:02<00:01, 46.66 it/sec, obj=152]
    INFO - 10:54:12:     64%|██████▎   | 127/200 [00:02<00:01, 46.69 it/sec, obj=152]
    INFO - 10:54:12:     64%|██████▍   | 128/200 [00:02<00:01, 46.70 it/sec, obj=152]
    INFO - 10:54:12:     64%|██████▍   | 129/200 [00:02<00:01, 46.72 it/sec, obj=152]
    INFO - 10:54:12:     65%|██████▌   | 130/200 [00:02<00:01, 46.75 it/sec, obj=152]
    INFO - 10:54:12:     66%|██████▌   | 131/200 [00:02<00:01, 46.77 it/sec, obj=152]
    INFO - 10:54:12:     66%|██████▌   | 132/200 [00:02<00:01, 46.77 it/sec, obj=152]
    INFO - 10:54:12:     66%|██████▋   | 133/200 [00:02<00:01, 46.78 it/sec, obj=152]
    INFO - 10:54:12:     67%|██████▋   | 134/200 [00:02<00:01, 46.80 it/sec, obj=152]
    INFO - 10:54:12:     68%|██████▊   | 135/200 [00:02<00:01, 46.81 it/sec, obj=152]
    INFO - 10:54:12:     68%|██████▊   | 136/200 [00:02<00:01, 46.83 it/sec, obj=152]
    INFO - 10:54:12:     68%|██████▊   | 137/200 [00:02<00:01, 46.85 it/sec, obj=152]
    INFO - 10:54:12:     69%|██████▉   | 138/200 [00:02<00:01, 46.87 it/sec, obj=152]
    INFO - 10:54:12:     70%|██████▉   | 139/200 [00:02<00:01, 46.90 it/sec, obj=152]
    INFO - 10:54:12:     70%|███████   | 140/200 [00:02<00:01, 46.92 it/sec, obj=152]
    INFO - 10:54:12:     70%|███████   | 141/200 [00:03<00:01, 46.94 it/sec, obj=152]
    INFO - 10:54:12:     71%|███████   | 142/200 [00:03<00:01, 46.96 it/sec, obj=152]
    INFO - 10:54:12:     72%|███████▏  | 143/200 [00:03<00:01, 46.98 it/sec, obj=152]
    INFO - 10:54:12:     72%|███████▏  | 144/200 [00:03<00:01, 47.00 it/sec, obj=152]
    INFO - 10:54:12:     72%|███████▎  | 145/200 [00:03<00:01, 47.01 it/sec, obj=152]
    INFO - 10:54:12:     73%|███████▎  | 146/200 [00:03<00:01, 47.03 it/sec, obj=152]
    INFO - 10:54:12:     74%|███████▎  | 147/200 [00:03<00:01, 47.05 it/sec, obj=152]
    INFO - 10:54:12:     74%|███████▍  | 148/200 [00:03<00:01, 47.07 it/sec, obj=152]
    INFO - 10:54:12:     74%|███████▍  | 149/200 [00:03<00:01, 47.09 it/sec, obj=152]
    INFO - 10:54:12:     75%|███████▌  | 150/200 [00:03<00:01, 47.10 it/sec, obj=152]
    INFO - 10:54:12:     76%|███████▌  | 151/200 [00:03<00:01, 47.12 it/sec, obj=152]
    INFO - 10:54:12:     76%|███████▌  | 152/200 [00:03<00:01, 47.13 it/sec, obj=152]
    INFO - 10:54:12:     76%|███████▋  | 153/200 [00:03<00:00, 47.15 it/sec, obj=152]
    INFO - 10:54:12:     77%|███████▋  | 154/200 [00:03<00:00, 47.16 it/sec, obj=152]
    INFO - 10:54:12:     78%|███████▊  | 155/200 [00:03<00:00, 47.18 it/sec, obj=152]
    INFO - 10:54:12:     78%|███████▊  | 156/200 [00:03<00:00, 47.20 it/sec, obj=152]
    INFO - 10:54:12:     78%|███████▊  | 157/200 [00:03<00:00, 47.22 it/sec, obj=152]
    INFO - 10:54:12:     79%|███████▉  | 158/200 [00:03<00:00, 47.24 it/sec, obj=152]
    INFO - 10:54:12:     80%|███████▉  | 159/200 [00:03<00:00, 47.26 it/sec, obj=152]
    INFO - 10:54:12:     80%|████████  | 160/200 [00:03<00:00, 47.28 it/sec, obj=152]
    INFO - 10:54:12:     80%|████████  | 161/200 [00:03<00:00, 47.29 it/sec, obj=152]
    INFO - 10:54:13:     81%|████████  | 162/200 [00:03<00:00, 47.30 it/sec, obj=152]
    INFO - 10:54:13:     82%|████████▏ | 163/200 [00:03<00:00, 47.31 it/sec, obj=152]
    INFO - 10:54:13:     82%|████████▏ | 164/200 [00:03<00:00, 47.33 it/sec, obj=152]
    INFO - 10:54:13:     82%|████████▎ | 165/200 [00:03<00:00, 47.33 it/sec, obj=152]
    INFO - 10:54:13:     83%|████████▎ | 166/200 [00:03<00:00, 47.34 it/sec, obj=152]
    INFO - 10:54:13:     84%|████████▎ | 167/200 [00:03<00:00, 47.34 it/sec, obj=152]
    INFO - 10:54:13:     84%|████████▍ | 168/200 [00:03<00:00, 47.35 it/sec, obj=152]
    INFO - 10:54:13:     84%|████████▍ | 169/200 [00:03<00:00, 47.37 it/sec, obj=152]
    INFO - 10:54:13:     85%|████████▌ | 170/200 [00:03<00:00, 47.38 it/sec, obj=152]
    INFO - 10:54:13:     86%|████████▌ | 171/200 [00:03<00:00, 47.39 it/sec, obj=152]
    INFO - 10:54:13:     86%|████████▌ | 172/200 [00:03<00:00, 47.41 it/sec, obj=152]
    INFO - 10:54:13:     86%|████████▋ | 173/200 [00:03<00:00, 47.42 it/sec, obj=152]
    INFO - 10:54:13:     87%|████████▋ | 174/200 [00:03<00:00, 47.44 it/sec, obj=152]
    INFO - 10:54:13:     88%|████████▊ | 175/200 [00:03<00:00, 47.45 it/sec, obj=152]
    INFO - 10:54:13:     88%|████████▊ | 176/200 [00:03<00:00, 47.46 it/sec, obj=152]
    INFO - 10:54:13:     88%|████████▊ | 177/200 [00:03<00:00, 47.47 it/sec, obj=152]
    INFO - 10:54:13:     89%|████████▉ | 178/200 [00:03<00:00, 47.48 it/sec, obj=152]
    INFO - 10:54:13:     90%|████████▉ | 179/200 [00:03<00:00, 47.48 it/sec, obj=152]
    INFO - 10:54:13:     90%|█████████ | 180/200 [00:03<00:00, 47.49 it/sec, obj=152]
    INFO - 10:54:13:     90%|█████████ | 181/200 [00:03<00:00, 47.50 it/sec, obj=152]
    INFO - 10:54:13:     91%|█████████ | 182/200 [00:03<00:00, 47.51 it/sec, obj=152]
    INFO - 10:54:13:     92%|█████████▏| 183/200 [00:03<00:00, 47.52 it/sec, obj=152]
    INFO - 10:54:13:     92%|█████████▏| 184/200 [00:03<00:00, 47.53 it/sec, obj=152]
    INFO - 10:54:13:     92%|█████████▎| 185/200 [00:03<00:00, 47.55 it/sec, obj=152]
    INFO - 10:54:13:     93%|█████████▎| 186/200 [00:03<00:00, 47.56 it/sec, obj=152]
    INFO - 10:54:13:     94%|█████████▎| 187/200 [00:03<00:00, 47.58 it/sec, obj=152]
    INFO - 10:54:13:     94%|█████████▍| 188/200 [00:03<00:00, 47.59 it/sec, obj=152]
    INFO - 10:54:13:     94%|█████████▍| 189/200 [00:03<00:00, 47.60 it/sec, obj=152]
    INFO - 10:54:13:     95%|█████████▌| 190/200 [00:03<00:00, 47.61 it/sec, obj=152]
    INFO - 10:54:13:     96%|█████████▌| 191/200 [00:04<00:00, 47.63 it/sec, obj=152]
    INFO - 10:54:13:     96%|█████████▌| 192/200 [00:04<00:00, 47.65 it/sec, obj=152]
    INFO - 10:54:13:     96%|█████████▋| 193/200 [00:04<00:00, 47.66 it/sec, obj=152]
    INFO - 10:54:13:     97%|█████████▋| 194/200 [00:04<00:00, 47.67 it/sec, obj=152]
    INFO - 10:54:13:     98%|█████████▊| 195/200 [00:04<00:00, 47.68 it/sec, obj=152]
    INFO - 10:54:13:     98%|█████████▊| 196/200 [00:04<00:00, 47.70 it/sec, obj=152]
    INFO - 10:54:13:     98%|█████████▊| 197/200 [00:04<00:00, 47.72 it/sec, obj=152]
    INFO - 10:54:13:     99%|█████████▉| 198/200 [00:04<00:00, 47.73 it/sec, obj=152]
    INFO - 10:54:13:    100%|█████████▉| 199/200 [00:04<00:00, 47.74 it/sec, obj=152]
    INFO - 10:54:13:    100%|██████████| 200/200 [00:04<00:00, 47.89 it/sec, obj=152]
    INFO - 10:54:13: Optimization result:
    INFO - 10:54:13:    Optimizer info:
    INFO - 10:54:13:       Status: None
    INFO - 10:54:13:       Message: Maximum number of iterations reached. GEMSEO Stopped the driver
    INFO - 10:54:13:       Number of calls to the objective function by the optimizer: 201
    INFO - 10:54:13:    Solution:
    INFO - 10:54:13:       The solution is feasible.
    INFO - 10:54:13:       Objective: 151.6287318635838
    INFO - 10:54:13:       Standardized constraints:
    INFO - 10:54:13:          [volume fraction-0.3] = 1.0976701955156543e-06
    INFO - 10:54:13: *** End MDOScenario execution (time: 0:00:04.190251) ***

{'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
<gemseo.post.basic_history.BasicHistory object at 0x7f1e01efca60>

Plot the solution

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

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

Gallery generated by Sphinx-Gallery