0% found this document useful (0 votes)
32 views

Stress-Constrained Topology Optimization for Commercial Software: A Python Implementation for ABAQUS®

Uploaded by

jiangxuetao0501
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views

Stress-Constrained Topology Optimization for Commercial Software: A Python Implementation for ABAQUS®

Uploaded by

jiangxuetao0501
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

applied

sciences
Review
Stress-Constrained Topology Optimization for Commercial
Software: A Python Implementation for ABAQUS®
Pedro Fernandes 1, * , Àlex Ferrer 2 , Paulo Gonçalves 1 , Marco Parente 1,3 , Ricardo Pinto 1
and Nuno Correia 1

1 INEGI—Institute for Science and Innovation in Mechanical and Industrial Engineering,


4200-465 Porto, Portugal; [email protected] (P.G.)
2 CIMNE—International Center for Numerical Methods in Engineering, Campus Nord UPC,
S/N 08034 Barcelona, Spain
3 FEUP—Faculty of Engineering, University of Porto, Rua Dr. Roberto Frias, 4200-465 Porto, Portugal
* Correspondence: [email protected]

Abstract: Topology optimization has evidenced its capacity to provide new optimal designs in many
different disciplines. However, most novel methods are difficult to apply in commercial software,
limiting their use in the academic field and hindering their application in the industry. This article
presents a new open methodology for solving geometrically complex non-self-adjoint topology
optimization problems, including stress-constrained and stress minimization formulations, using
validated FEM commercial software. The methodology was validated by comparing the sensitivity
analysis with the results obtained through finite differences and solving two benchmark problems
with the following optimizers: Optimality Criteria, Method of Moving Asymptotes, Sequential
Least-Squares Quadratic Programming (SLSQP), and Trust-constr optimization algorithms. The
SLSQP and Trust-constr optimization algorithms obtained better results in stress-minimization
problem statements than the methodology available in ABAQUS® . A Python implementation of this
methodology is proposed, working in conjunction with the commercial software ABAQUS® 2023 to
allow a straightforward application to new problems while benefiting from a graphic user interface
and validated finite element solver.
Citation: Fernandes, P.; Ferrer, À.;
Gonçalves, P.; Parente, M.; Pinto, R.;
Keywords: topology optimization; stress constraints; Python; ABAQUS; educational
Correia, N. Stress-Constrained
Topology Optimization for
Commercial Software: A Python
Implementation for ABAQUS® . Appl.
Sci. 2023, 13, 12916. https://doi.org/ 1. Introduction
10.3390/app132312916 Originally described by Bendsøe and Kikuchi in 1988 [1], topology optimization is
one of the three sub-fields of structural optimization, amongst size and shape optimization.
Academic Editors: Aniello Riccio and
Angela Russo
Usually applied in the early stage of structural design, its purpose is to find the optimal
distribution of material when certain load conditions are applied [2,3]. The design region
Received: 27 October 2023 is usually represented with density based or level-set functions, which are optimized
Revised: 26 November 2023 according to a certain objective function and constraints, defining which regions should
Accepted: 29 November 2023 have material and which should not [4].
Published: 2 December 2023
The popularity of topology optimization has led to the publishing of several educa-
tional articles [5]. These include the MATLAB codes written by Ole Sigmund [6], later
revisited by Andreassen et al. [7], and an equivalent implementation for 3D problems by
Copyright: © 2023 by the authors.
Liu [8], all of them using the Solid Isotropic Material with Penalization (SIMP) method [9,10]
Licensee MDPI, Basel, Switzerland. to define the material properties and the Optimality Criteria (OCs) [11] to determine the
This article is an open access article optimal design variables. Other publications include the MATLAB implementation of
distributed under the terms and the level-set method [12,13] by Challis [14] and the implementations of the Bi-directional
conditions of the Creative Commons Evolutionary Structural Optimization (BESO) method [15] in MATLAB and Python by
Attribution (CC BY) license (https:// Huang and Xie [16] and Zuo and Xie [17], respectively. Table 1 compiles the publications
creativecommons.org/licenses/by/ on the development and implementation of topology optimization methods, sorted by the
4.0/). problem statement addressed, highlighting:

Appl. Sci. 2023, 13, 12916. https://doi.org/10.3390/app132312916 https://www.mdpi.com/journal/applsci


Appl. Sci. 2023, 13, 12916 2 of 39

• The optimization algorithm used;


• If the publication provides the code implementation;
• If the method considers more constraints than just a mass or volume limit;
• If the method is suitable for complex geometries, allowing an easy application to case
studies with intricate design spaces or the interaction with CAD models;
• If the method is based on commercial solvers.
Appl. Sci. 2023, 13, 12916 3 of 39

Table 1. Literature review summary table, including scientific articles referred to in the ABAQUS® and ANSYS® documentation, sorted by scope. The black dots
indicate an affirmative answer to the questions posed in each column.

Consider Non-Material Constraint?

Suitable for Complex Geometries?

Based on Commercial Solver?


Provides Code?
Reference
Source Scope of the Reference Author Algorithm

Sigmund [18] -
Zhu et al. [19] -
Review article or complementary method Sigmund and Maute [20] OC •
Wang et al. [5] -
Harzheim and Graf [21] -
Sigmund [6] OC •
Andreassen et al. [7] OC •
Challis [14] Level-set method •
Zuo and Xie [17] OC • •
Literature Suresh [22] Pareto-optimal tracing •
Talischi et al. [23] OC •
Compliance minimization Smith and Norato [24] MMA and fmincon •
Sanders et al. [25] Modified OC •
Otomori et al. [26] Level-set method •
Gao et al. [27] OC •
Xia and Breitkopf [28] OC •
Liu and Tovar [8] OC, SLSQP, and MMA •
Aage et al. [29] MMA • •
Liang and Cheng [30] OC •
Appl. Sci. 2023, 13, 12916 4 of 39

Table 1. Cont.

Consider Non-Material Constraint?

Suitable for Complex Geometries?

Based on Commercial Solver?


Provides Code?
Reference
Source Scope of the Reference Author Algorithm

Picelli et al. [31] OC •


Ferrari and Sigmund [32] OC •
Compliance minimization Du et al. [33] Level-set method •
Chen et al. [34] MMA • •
Sotiropoulos et al. [35] OC, MMA
Londoño and Paulino [36] MMA • •
Yang et al. [37] MMA •
Bruggi and Venini [38] MMA •
Lee et al. [39] SQP •
Cai and Zhang [40] Level-set method •
Literature Troya and Tortorelli [41] MMA •
Suresh and
Level-set method • •
Takalloozadeh [42]
Stress-constrained compliance minimization Chu et al. [43] OC • •
Oh et al. [44] Gradient-based phase field •
Luo et al. [45] MMA •
Biyikli and To [46] PTO • •
Amir [47] MMA • •
París et al. [48] SLP and steepest descent •
Holmberg et al. [49] MMA •
Norato et al. [50] MMA •
Appl. Sci. 2023, 13, 12916 5 of 39

Table 1. Cont.

Consider Non-Material Constraint?

Suitable for Complex Geometries?

Based on Commercial Solver?


Provides Code?
Reference
Source Scope of the Reference Author Algorithm

Burger and Stainko [51] Interior point method •


De Leon et al. [52] MMA •
Holmberg et al. [53] MMA •
Pastore et al. [54] SLP, MMA, and OC •
París et al. [55] SLP and steepest descent •
Deng and Suresh [56] Level-set method •
Senhora et al. [57] MMA •
Saadlaoui et al. [58] Commercial software (black box) • • •
Stress-constrained compliance minimization
Holmberg et al. [59] MMA •
Amir and Lazarov [60] MMA •
Literature Granlund et al. [61] MMA •
Amstutz et al. [62] Level-set method •
Cheng et al. [63] MMA •
Deng et al. [64] MMA • •
Mirzendehdel and
Level-set method • •
Suresh [65]
Collet et al. [66] MMA •
Stress- and compliance-constrained mass minimization
Bruggi and Duysinx [67] MMA •
Londoño et al. [68] MMA •
Stress-constrained mass minimization
París et al. [69] SLP •
Appl. Sci. 2023, 13, 12916 6 of 39

Table 1. Cont.

Consider Non-Material Constraint?

Suitable for Complex Geometries?

Based on Commercial Solver?


Provides Code?
Reference
Source Scope of the Reference Author Algorithm

Long et al. [70] SQP and MMA •


Stress-constrained mass minimization Duysinx [71] MMA •
Literature Silva et al. [72] Level-set method • • •
Miyajima et al. [73] Level-set method •
Stress-constrained compliance maximization
Emmendoerfer et al. [74] Level-set method •
ABAQUS® Review article or complementary method BendsØe and Sigmund [75] OC, MMA, SLP, and level-set method • •
documentation Compliance minimization Bakhtiary et al. [76] OC • •
Mlejnek [77] -
Stolpe and Svanberg [78] -
Pedersen and Allinger [79] -
Review article or complementary method
BendsØe and Sigmund [80] -
Clausen and Pedersen [81] -
Svanberg [82] -
Compliance minimization Kabus and Pedersen [83] Commercial software (black box) • • •
ANSYS®
documentation Søndergaard and
Minimization of maximum pressure Commercial software (black box) • • •
Pedersen [84]
Hansen [85] MMA
Eigenvector minimization
Olhoff and Du [86] MMA • •
Jog [87] OC
Compliance and eigenfrequency minimization
Sigmund and Jensen [88] MMA •
Maximization of the magnitude of steady-state vibrations Tcherniak [89] MMA •
Appl. Sci. 2023, 13, 12916 7 of 39

Table 1 includes several publications with open access implementations of topology


optimization methods suitable for compliance-minimization problems [6,7,14,17,22–32,34].
However, only four publications provide implementations of topology optimization meth-
ods compatible with stress-constrained compliance-minimization problems [36,46,47,64].
Regarding these three publications, Biyikli et al. [46] proposed a non-sensitivity method
and Amir [47] proposed a method based on inexact sensitivities, leaving the MATLAB
implementations proposed by Londoño and Paulino [36] and by Deng et al. [64] as the only
publications providing a non-approximated solution to the stress-constrained compliance-
minimization problem. On top of the reduced number of publications providing open
access solutions with non-approximated methods to this problem statement, there are
additional points of improvement that could be addressed to promote the research and
application of topology optimization methods in the industry: including the compatibility
with complex design spaces and geometries, as well as the interaction with commercially
available and validated solvers. Finally, it is also relevant to consider that the topology opti-
mization methods available in commercial software, such as ABAQUS® 2023 and ANSYS®
2023, operate on an opaque black-box system, limiting the access to relevant information
and hindering their extension to a new feature of interest, such as reliability-based topology
optimization [90–92] and robust topology optimization considering uncertainties [93].
To address this issue, the present article contributes with a methodology capable of
solving non-self-adjoint problems in commercial software, including stress-constrained
compliance minimization and stress-minimization problem statements, defined in a com-
plex geometrical space. This methodology has been validated, evaluating the sensitivity
analysis with finite differences and solving two benchmark problems with the follow-
ing optimizers: Optimality Criteria, Method of Moving Asymptotes, Sequential Least-
Squares Quadratic Programming, and Trust-constr optimization algorithms. In compliance-
minimization problems and stress-constrained compliance-minimization problems, the
methodology herein implemented achieved a performance equal to ABAQUS® in terms of
the objective function. In stress-minimization problems, the methodology herein imple-
mented allowed a stress reduction 35% superior to the one obtained with ABAQUS® .
To allow straightforward use even in an industrial field, a Python implementation
is provided as Supplementary Material. This implementation works in conjunction with
ABAQUS® , allowing a direct application to new problems, providing a graphic user
interface and access to a commercially validated finite-element solver. The implementa-
tion can also be downloaded in digital format from the following Dataset [94] or reposi-
tory: https://github.com/pnfernandes/Python-Code-for-Stress-Constrained-Topology-
Optimization-in-ABAQUS.
The following sections of the article are organized as follows. Sections 2 and 3 for-
mulate the topology optimization problem statements and deduce the necessary function
derivatives in both continuous and discrete formulations, respectively. Section 4 describes
the filter technique to void numerical instabilities. Section 5 overviews the optimization
algorithms available in the provided code. Section 6 summarizes the most-relevant aspects
of the Python code implementation, while in Section 7, the benchmark problems considered
are presented. Section 8 demonstrates the suitability of the code implementation to solve
the problems proposed. The results of the topology optimization processes are presented
in Section 9. Finally, Section 10 summarizes the main conclusions of the present work.

2. Continuous Formulation of Topology Optimization Problem Statements


and Sensitivities
In this section, the theoretical part of the topology optimization problem statement
and the sensitivity analysis are defined in their continuous versions. Its practical coun-
terpart, the discrete formulation, is presented in Section 3, which may allow an easier
understanding of both the theoretical and implementation fundamentals of the topology
optimization method.
Appl. Sci. 2023, 13, 12916 8 of 39

2.1. Topology Optimization Problem


Consider the formulation of a generic topology optimization problem, defined as
finding ρ ∈ L∞ (Ω) such that:
min : J (ρ, u(ρ)) (1)
ρ

subject to:

ρmin ≤ ρ ≤ 1 (2)
Z
ρ dx ≤ V ∗ (3)

where Ω is the domain of the topology optimization problem, L∞ (Ω) is the space of
bounded functions, and the density ρ represents the design variables, whichR can vary within
the interval [ρmin , 1]. J represents a generic objective or cost function; ρ dx represents
a generic volume constraint function, where V ∗ is its maximum allowable value; u(ρ)
are the displacement solutions of the standard equilibrium equation presented as finding
u ∈ H01 (Ω) such that:

a(ρ, u, v) = l (ρ, v), ∀ v ∈ H01 (Ω) (4)

where a(ρ, u, v) is the constitutive function of the equilibrium equation, l (ρ, v) are the
external forces, and H01 (Ω) is the space of functions with square integrable derivatives and
homogeneous values on the boundary and domain Ω ∈ R D , with D ∈ [2, 3]. The bilinear
form is:
Z
a(ρ, u, v) = 5s uC(ρ) 5s v dx (5)

with the external forces l (ρ, v) written as:


Z Z
l (ρ, v) = f (ρ) v dx + t · nv ds. (6)
Ω ∂Ω

Here, 5s represents a symmetric gradient and C(ρ) is the constitutive tensor, and
thus, the strains ξ (u) = 5s u are in accordance with linear elasticity. v is the corresponding
test function; f (ρ) is a generic volumetric load function; t indicates the applied boundary
forces, if they exist; n is the normal direction pointing outwards of the boundary ∂Ω of v.
It is important to note that this material constraint can be applied to either the volume or
mass of the structure, following the same expressions. The volume constraint is preferred
and used in this article to conform with the most-used term in the literature.
When considering a maximum stress constraint, the problem statement is also sub-
ject to:
Z
σaV M (ρ, u(ρ)) dx ≤ σ∗ (7)

where Ω σaV M (ρ, u(ρ)) dx represents the stress constraint with a maximum allowable value σ∗ .
R

In particular, σaV M is the penalized von Mises stress, as described in the following subsection.

2.2. Regularization and Penalization


Regarding this particular work and implementation, it is important to note two
adopted considerations. The first one is using two penalization factors applied to the
material stiffness and stress. These factors aim at making intermediate design solutions
uncompetitive and, in turn, promoting black-and-white solutions.
Appl. Sci. 2023, 13, 12916 9 of 39

The material stiffness is penalized by the SIMP penalization parameter P = 3.0, in


accordance with [80], when using continuous design variables (Equation (8)). In this
implementation, this factor is also applied to the other material properties, as:

C(ρ) = ρ P C0 (8)

where C0 is the material stiffness of a fully solid element. Note that C0 (ρ) = Pρ P−1 C0 for
this type of stiffness penalization.
The stress is also penalized according to a factor equal to ρ β , with β = 12 , as adopted
in [53], following the initial proposal by Bruggi et al. [95] with the exponent suggested
in [96]. This penalization leads to a non-physical stress for intermediate design densities, but
not for black-and-white solutions, and tends towards 0 when the design density decreases,
avoiding singularity problems [53]. Thus, σa is defined as the amplified stress, described by
the following expression:
σa (ρ) = ρ β σ̂ (ρ) (9)
with:
σ̂(ρ) = C0 5s u(ρ) (10)
where σ̂ (ρ) is the stress vector, written in Voigt notation. Therefore, the von Mises amplified
1
stress norm is σaV M = (σa Mσa ) 2 , with M being the von Mises matrix operator.
The second consideration is the use of a regularization approach, where removed or
void elements will maintain a minimum design density, ρmin = 0.01 by default, which
contrasts with the complete element removal. In the literature, these regularization tech-
niques may be referred to as “soft-kill” and “hard-kill” approaches [17]. The regularization
approach was introduced in the code implementation to avoid the stiffness matrix becom-
ing singular, as well as allowing a constant mesh in the finite-element model during the
topology optimization loop [17,53].

2.3. Sensitivity Analysis


The derivative of the cost function in the direction ρ̃ ∈ L∞ (Ω) is then defined as:

DJ (ρ, u(ρ))ρ̃ = Dρ J (ρ, u(ρ))ρ̃ + Du J (ρ, u(ρ)) Dρ u(ρ)ρ̃, ∀ ρ̃ ∈ L∞ (Ω) (11)

Taking the derivative in the equilibrium equation, in order to find Du J (ρ, u(ρ)) Dρ u(ρ)ρ̃,
leads to:

[ Dρ a(ρ, u(ρ), v) − Dρ l (ρ, v)]ρ̃ + Du a(ρ, u(ρ), v) Dρ u(ρ)ρ̃ = 0


(12)
∀ v ∈ H01 (Ω), ∀ ρ̃ ∈ L∞ (Ω).

Since a(ρ, u(ρ), v) is linear, it can be rewritten as:

Du a(ρ, u(ρ), v) Dρ u(ρ)ρ̃ = a(ρ, Dρ u(ρ)ρ̃, v); (13)

therefore, Equation (12) can be rewritten as follows:

− a(ρ, Dρ u(ρ)ρ̃, v) = [ Dρ a(ρ, u(ρ), v) − Dρ l (ρ, v)]ρ̃, ∀ v, ρ̃. (14)

Solving Equation (14) for all values of ρ̃ would be too expensive. For this reason, the
use of the adjoint method is preferred. To do so, the adjoint variable λ is defined, the
solution of:

a(ρ, λ, w) = − Du J (ρ, u(ρ))w ∀ w ∈ H01 (Ω) ⇔


(15)
⇔ − a(ρ, Dρ u(ρ)ρ̃, λ) = Du J (ρ, u(ρ)) Dρ u(ρ)ρ̃, ∀ ρ̃.
Appl. Sci. 2023, 13, 12916 10 of 39

Then, taking w = Dρ u(ρ)ρ̃ in Equation (15):

Du J (ρ, u(ρ)) Dρ u(ρ)ρ̃ = − a(ρ, λ, Dρ u(ρ)ρ̃) =


= − a(ρ, Dρ u(ρ)ρ̃, λ) = (16)
= [ Dρ a(ρ, u(ρ), λ) − Dρ l (ρ, v)]ρ̃

where the self-adjoint property of a(ρ, λ, w) and Equation (12) are applied.
The generic optimization process, which can be defined in four main steps, is proposed
as follows:
• Find u(ρ) ∈ H01 (Ω), the solution of: a(ρ, u, v) = l (ρ, v), ∀ v ∈ H01 (Ω);
• Find λ, the solution of: a(ρ, λ, w) = − Du J (ρ, u(ρ))w, ∀ w;
• Compute the derivative as DJ (ρ, u(ρ))ρ̃ = [ Dρ J (ρ, u(ρ)) + aρ (ρ, u(ρ), λ) − lρ (ρ, λ)]ρ̃;
• Update the design variables using the gradient information.
The first two steps correspond to solving the state and adjoint problems, respectively.
The third step is the gradient calculation, which is defined in terms of the state and
adjoint variables. The fourth and final step consists of using the gradient to determine the
next value of the design variables, which can be performed by any suitable optimization
algorithm (such as the algorithms described in Section 5).

2.4. Compliance Functional


In the particular problem statement of compliance minimization, the objective function
can be rewritten as:
Z
J (ρ, u(ρ)) = f u dx (17)

and its derivative in the direction w ∈ H01 (Ω) is then:


Z
Du J (ρ, u(ρ))w = f w dx = l (w). (18)

Notice that, in the particular case of compliance-minimization problem statements, it is


commonly assumed in the literature that the external loads do not depend on ρ. Therefore:

a(ρ, u, v) = l (v). (19)

In this particular case, the adjoint variable leads to the same expression shown in
Equation (15), and introducing Equation (4), it is implied that:

a(ρ, λ, w) = − Du J (ρ, u(ρ))w, ∀w


(20)
⇔ − a(ρ, u, w) = − Du J (ρ, u(ρ)) = −l (w).

Note that Equation (20), which describes the adjoint problem of the compliance-
minimization problem statement, returns the definition of the state problem, setting them
equal to each other. Functionals that are “self-adjoint” lead to clear computational benefits
since Equations (4) and (15) can be solved with the same computation, a single FEA in the
case of the code provided.
Since l (v) and l (w) do not depend on ρ, the terms Dρ J (ρ, u(ρ))ρ̃ = Dρ l (w)ρ̃ =
Dρ l (v)ρ̃ = 0, and thus, the derivative is just:

DJ (ρ, u(ρ))ρ̃ = − Dρ a(ρ, u(ρ), u(ρ))ρ̃. (21)

Following the definition of the compliance, the derivative of the bilinear form is:
Z
Dρ a(ρ, u(ρ), v) = 5s vC0 (ρ) 5s uρ̃ dx (22)

Appl. Sci. 2023, 13, 12916 11 of 39

Finally, considering the stiffness penalization used, Equation (22) can be introduced
into (21), obtaining:
Z Z
DJ (ρ, u(ρ))ρ̃ = 5s u( Pρ P−1 C0 ) 5s uρ̃ dx = gρ̃ dx (23)
Ω Ω

where g is the gradient of the compliance objective function, thus obtained as g = 5s u


( Pρ P−1 C0 ) 5s u. For this particular case, the first three optimization steps can be rewrit-
ten as:
• Find u(ρ) ∈ H01 (Ω), the solution of: a(ρ, u(ρ), v) = l (v), ∀ v ∈ H01 (Ω);
• Take λ = −u, since a(ρ, λ, w) = − Du J (ρ, u(ρ))w = −l (v), ∀ w is exactly the same
problem as the first step;
Compute: DJ (ρ, u(ρ))ρ̃ = − aρ (ρ, u(ρ), u(ρ))ρ̃ = Ω 5s u( Pρ P−1 C0 ) 5s uρ̃ dx.
R

2.5. Stress Functional


In the stress-minimization or stress-constrained compliance-minimization problem
statements, the derivative of the stress norm functional should also be taken. Here, the
maximum function is approximated by means of a modified p-norm function. This ap-
proximation is necessary to provide a derivable function that approximates the maximum
function, which is non-differentiable. Adopting the modified p-norm approximation pro-
posed in [53], the maximum function represented in Equation (7) can be redefined as:
Z  q 1
q
J (ρ, u(ρ)) = σaV M (ρ, u(ρ)) dx (24)

1
where q is the exponential factor, and the von Mises amplified stress norm is σaV M = (σa Mσa ) 2 ,
with M being the von Mises matrix operator. Note that, although unconventional, this
manuscript adopted q as the exponential factor of the p-norm approximation to improve
the readability of the equation and to avoid confusion with the design density symbol ρ and
the SIMP exponential factor P. Furthermore, it is relevant to highlight that, by adopting
the use of this approximation, a global approach is selected, instead of local enforcement
at each integration point. This option was preferred for providing better scaling with the
mesh refinement, reducing the computational cost, and for its simplicity. However, the use
of augmented Lagrangian methods could be seen as an alternative [57].
The term Dρ J (ρ, u(ρ))(ρ̃) is defined as:

Dρ J (ρ, u(ρ))(ρ̃) =
Z  q  1q −1 Z (25)
= σaV M (ρ, u(ρ)) dx ×q σaV M (ρ, u(ρ))q−1 Dσa σaV M ( Dρ σa (ρ̃)) dx
Ω Ω

where:

Dρ σa (ρ̃) = βρ β−1 C0 5s uρ̃. (26)

The derivative in the direction w, which allows us to define the adjoint problem, is:

Du J (ρ, u(ρ))(w) =
Z  q  1q −1 Z (27)
= σaV M (ρ, u(ρ)) dx × σaV M (ρ, u(ρ))q−1 Dσa σaV M ( Du σa (w)) dx
Ω Ω

where:
1
Dσa σaV M ( Du σa (w)) = (σa Mσa )− 2 σa MDu σa (w) (28)
Appl. Sci. 2023, 13, 12916 12 of 39

with:

Du σa (w) = ρ β C0 5s w. (29)

Finally, before determining the value of DJ (ρ, u(ρ))ρ̃, it is required to find Dρ a(ρ, u(ρ), λ)
as follows:
Z
Dρ a(ρ, u(ρ), λ)ρ̃ = 5s λC0 (ρ) 5s uρ̃. (30)

As stated previously, note that 5s λ and 5s u represent the strains of the adjoint and
state problems, respectively. Therefore, in the provided code implementation, these terms
are obtained directly from the ABAQUS® FEA. Also, note that, for the stress functional,
Dρ l (λ) = 0. Finally, the first three optimization steps can then be rewritten as:
• Find u, the solution of a(ρ, u(ρ)v) = l (ρ, v);
• Using Equation (27), find λ such that a(ρ, λ, w) = − Du J (ρ, u(ρ))w, ∀ w. Note that
this functional is not self-adjoint, leading to a different procedure than the one shown
in the previous section;
• Compute: DJ (ρ, u(ρ))ρ̃ = [ Dρ J (ρ, u(ρ)) + Dρ a(ρ, u(ρ), λ)]ρ̃.

3. Discrete Formulation of Topology Optimization Problem Statements


and Sensitivities
In this section, the topology optimization problem statement and sensitivity analysis
defined in Section 2 are now presented in their discretized versions. This information is
included here to bridge the gap between the continuous framework shown in Section 2
and the implementation used in the code provided with this work, allowing an easier
understanding of both the theoretical and implementation fundamentals of a topology
optimization method.

3.1. Topology Optimization Problem


The discrete version of Problem (1) results in:

min : J (ρ, u(ρ)) (31)


ρ

subject to:
ρmin ≤ ρe ≤ 1 ∀ e = 1, . . . , N (32)
V (ρ) = ∑ ρe ve ≤ V ∗ (33)
ρ

where, as previously defined, J (ρ) is the cost function, the density ρ represents the design
variables, which can vary within the interval [ρmin , 1], V (ρ) is the total volume, with ve rep-
resenting the volume of element e when the design density ρ = 1, V ∗ is the maximum value
of the volume constraint, and u(ρ) is the solution displacement vector of the state problem:

F = K (ρ)u. (34)
The stiffness matrix K (ρ) and force vector F are defined as, respectively:
Z
K (ρ) = BaT C Ba dx (35)

Z Z
F= N f dx + N t · n ds (36)
Ω ∂Ω
where Ba is the strain–displacement matrix in the evaluation point a, N a linear shape
function, and f a generic load function, while t indicates the applied boundary forces, if
they exist, and n is the normal direction pointing outwards of the boundary ∂Ω.
Appl. Sci. 2023, 13, 12916 13 of 39

When considering a maximum stress constraint, the problem statement is also sub-
ject to:
σ PN (ρ) ≤ σ∗ (37)
where σ PN (ρ) represents the maximum stress and σ∗ its the maximum allowable value.
Note that the penalization factors and regularization process described in Section 2.2
are not changed.

3.2. Sensitivity Analysis


The gradient of the cost function can be defined as:

∂J ∂J ∂u
5ρ J = + . (38)
∂ρ ∂u ∂ρ
∂J
In order to find ∂u , it is possible to reorganize the state equation, multiply it for a
generic vector v, and derive the expression, leading to:
 
∂K (ρ) ∂F (ρ) ∂u(ρ)
vT u(ρ) − + K (ρ) = 0; (39)
∂ρ ∂ρ ∂ρ

therefore:
 T  
∂u(ρ) ∂K (ρ) ∂F (ρ)
− K T (ρ) v = vt u− . (40)
∂ρ ∂ρ ∂ρ

As stated in Section 2, solving Equation (40) for all values of ρ would be too expensive,
motivating the use of the adjoint method. Defining the adjoint variable as λ = v such that
K T (ρ)λ = − ∂u
∂J
leads to:
 T  T  
∂u(ρ) ∂u ∂J ∂K (ρ) ∂F (ρ)
− K T (ρ)λ = = λT u− . (41)
∂ρ ∂ρ ∂u ∂ρ ∂ρ

Thus, the gradient can finally be rewritten as:


 
∂J ∂J ∂u ∂J ∂F (ρ) ∂K (ρ)
5ρ J = + = + λT − u . (42)
∂ρ ∂u ∂ρ ∂ρ ∂ρ ∂ρ

With this information, the equivalent three-step process described in Section 2.3 can
be rewritten as:
• Find u such that: K (ρ)u = F (ρ);
∂J
• Find λ such that: K (ρ)λ = − ∂u ;
h i
∂J T ∂F (ρ) ∂K (ρ)
• Compute: 5ρ J = ∂ρ + λ ∂ρ − ∂ρ u .

3.3. Compliance Functional


The compliance can be defined as C (ρ) = F u(ρ), and its sensitivity can be determined
as follows [97–99]:
∂C ∂u
=F ; (43)
∂ρe ∂ρe
since u(ρ) = K −1 (ρ) F and ∂u
∂ρe = −K −1 ∂ρ
∂K −1
e
K F, Equation (43) becomes:

∂C ∂K −1 ∂K
= − FK −1 K F = −u u. (44)
∂ρe ∂ρe ∂ρ
Appl. Sci. 2023, 13, 12916 14 of 39

BaT C Ba dx, with A being the assembly operator, and that


R
Considering that K = A Ωe
ρ is constant in Ωe , ∂K
∂ρ can be rewritten as follows:

P T P
Z Z Z
∂K
= BaT C0 Ba dx = BaT Pρ P−1 C0 Ba dx = Ba C Ba dx = K. (45)
∂ρ Ωe Ωe Ωe ρ ρ

Introducing Equation (45) into (44) leads to:

∂C P Ee
= − ρ P ueT K0 ue = − P (46)
∂ρe ρ ρ

where ue and K0 are the elemental displacement vector and stiffness matrix of a fully solid
element (i.e., ρ = 1.0). The term ρ P ueT K0 ue is the strain energy ( Ee ), missing only the 12
constant. However, because this constant is applied to all elements, it can be neglected, and
set the term ρ P ueT K0 ue equal to the strain energy (Ee ) automatically calculated in ABAQUS® .
In this particular case, the first three steps of the generic optimization process can be
simplified and rewritten as follows:
• Find u such that: K (ρ)u = F (ρ). This procedure can be performed using an ABAQUS®
FEA;
• Take λ = −u, since the problem is self-adjoint;
• Compute: ∂ρ ∂C
e
= − P Eρe . Note that Ee can be obtained from the ABAQUS® FEA
executed in the first step.
This information is included to allow an easier understanding of the code implemen-
tation and its correlation with the formal mathematical formulation.

3.4. Stress Functional


The maximum function is approximated by means of a modified p-norm function.
This approximation is necessary to provide a derivable function that approximates the
maximum function, which is non-differentiable. This implementation adopts the modified
p-norm approximation proposed in [53]:
!1
q q
1 
σ PN
(ρ) =
Ni ∑ σavM (ρ) (47)

where q is the exponential factor, Ω is the set of stress evaluation points in the topology
optimization problem, and σavM is the value of the amplified von Mises stress in point a.
Note that, although unconventional, this manuscript adopted q as the exponential factor of
the p-norm approximation to improve the readability of the equation and avoid confusion
with the design density symbol ρ and the SIMP exponential factor P. Furthermore, it is
relevant to highlight that, by adopting the use of this approximation, a global approach is
selected, instead of local enforcement at each integration point. This option was preferred
for providing better scaling with the mesh refinement, reducing the computational cost,
and for its simplicity. However, the use of augmented Lagrangian methods could be seen
as an alternative [57].
The derivative of the p-norm approximation with respect to the design density of
an element can be obtained by the chain-rule, multiplying three intermediate terms. The
first term is the derivative of the p-norm approximation with respect to the amplified von
Mises stress:
! 1 −1
q
∂σ PN (ρ) 1  q 1  vM q−1
∂σavM
=
Ni ∑ σavM (ρ) × σ (ρ)
Ni a
. (48)
α∈Ω
Appl. Sci. 2023, 13, 12916 15 of 39

The second term is the derivative of σavM with respect to the stress vector in point a.
1
Since σavM can be written in matrix form as σavM = (σa Mσa ) 2 , its derivative becomes:

∂σavM (ρ) 1 ∂σa (ρ)


= (σa (ρ) Mσa (ρ))− 2 × σa (ρ) M . (49)
∂σa (ρ) ∂ρ

The third and last terms are the derivative of the stress vector σa with respect to the
design density. Considering Equations (9) and (10):

∂σa (ρ) ∂u(ρ)


= βρ β−1 C0 Ba u(ρ) + ρ β C0 Ba . (50)
∂ρ ∂ρ

∂u(ρ)
The term ∂ρ is obtained from the state Equation (34):

∂K (ρ) ∂u(ρ) ∂F (ρ)


u(ρ) + K (ρ) = =0⇔
∂ρ ∂ρ ∂ρ
(51)
∂u(ρ) ∂K (ρ)
⇔ = − K −1 ( ρ ) u(ρ)
∂ρ ∂ρ

and, therefore, with β = 12 :

∂σa (ρ) 1 1 1 ∂K (ρ)


= ρ− 2 C0 Ba u(ρ) − ρ 2 C0 Ba K −1 (ρ) u ( ρ ). (52)
∂ρ 2 ∂ρ

∂F (ρ)
Note that it was assumed that ∂ρ = 0. This assumption is valid for static-load-driven
problems, where the load is considered to be constant and independent of the material
distribution. For displacement-driven problems, this assumption is not valid, as the forces
resulting from the displacement applied will change depending on the material distribution.
With Equations (48) through (51) and applying the chain rule, it is possible to define
∂σ PN (ρ)
∂ρ as:

∂σ PN (ρ) ∂σ PN (ρ) ∂σavM (ρ) ∂σa (ρ)


= =
∂ρ ∂σavM ∂σa ∂ρ
∂σ PN (ρ) ∂σavM (ρ) 1 − 1

= ρ 2 C0 Ba u(ρ) (53)
∂σavM ∂σa 2

1 ∂K (ρ)
− ρ 2 C0 B a K − 1 ( ρ ) u(ρ) .
∂ρ
PN ( ρ ) (Equation (54)), referring to the component of the
Renaming these two terms as ∂σsp f
derivative that is dependent on the stress penalization factor, and ∂σuPN (ρ) (Equation (55)),
referring to the component of the derivative that is dependent on the nodal displacement:

∂σ PN (ρ) ∂σavM (ρ)


 
PN 1 −1
∂σsp f (ρ) = ρ 2 C0 Ba u(ρ) (54)
∂σavM ∂σa 2

∂σ PN (ρ) ∂σavM (ρ)


 
1 −1 ∂K (ρ)
∂σuPN (ρ) = × − ρ C0 B a K ( ρ )
2 u(ρ) . (55)
∂σavM ∂σa ∂ρ
PN ( ρ ) can be easily determined, since the only information required is
Notice that ∂σsp f
∂σ PN (ρ)
the stress vector (σ̂a (ρ) = C0 Ba u(ρ)) and the design densities. ∂σavM
can be determined
∂σavM (ρ)
with a simple summation and ∂σa through the product of two vectors and a matrix.
Appl. Sci. 2023, 13, 12916 16 of 39

The term ∂σuPN (ρ), on the other hand, requires the explicit definition of the matrices Ba ,
∂K (ρ)
K −1 (ρ), and ∂ρ , which are dependent on the element formulation used in the numerical
model. Furthermore, for topology optimization problems where the number of design
variables is larger than the number of constraints, the most-efficient way to determine
∂σuPN (ρ) is using an adjoint model, defining the adjoint variable as:

∂σ PN (ρ) ∂σavM (ρ)


K (ρ)λ = C0 B a ⇔
∂σavM ∂σa
(56)
∂σ PN (ρ) ∂σavM (ρ)
⇔λ= C0 B a K − 1 ( ρ ) .
∂σavM ∂σa

Therefore, the adjoint variable can be extracted from a finite element analysis, where
∂σ PN (ρ) ∂σvM (ρ)
a
the load applied on each node is equal to ∂σvM
a ∂σa C0 Ba , and λ is equal to the node
displacement. Introducing the adjoint variable in Equation (54) then leads to:

∂σ PN (ρ) ∂σavM (ρ)


 
1 ∂K (ρ)
∂σuPN (ρ) = −ρ λ
2 u(ρ) . (57)
∂σavM ∂σa ∂ρ

Finally, since K can be defined as K = ABaT C(ρ) Ba , since Ba λ and Ba u are equal to the
deformation vectors of the adjoint and state models (ξ adj and ξ s , respectively), Equation (57)
can be simplified to:

∂σ PN ∂σavM  1 T 0

∂σuPN (ρ) = − ρ 2ξ
adj ( ρ )C ( ρ ) ξ s ( ρ ) . (58)
∂σavM ∂σa

With this information, the first three steps of the generic optimization process can be
rewritten as follows:
• Find u such that: K (ρ)u = F (ρ). This procedure can be performed through an
ABAQUS® FEA;
∂σ PN (ρ) ∂σavM (ρ)
• Find λ such that: K (ρ)λ = ∂σvM ∂σa C0 Ba ;
a 
PN ∂σ vM 1

• Compute: ∂σuPN (ρ) = ∂σvM ∂σa a −ρ 2 ξ adj
∂σ T ( ρ )C0 ( ρ ) ξ ( ρ ) .
s
a

As demonstrated in Equation (55) through (58), determining ∂σuPN (ρ) is significantly


more complex and computationally expensive, due to the necessity of using the adjoint
model. Some researchers [100] have proposed approximating this term as ∂σuPN (ρ) = 0, in
an attempt to reduce the complexity and computational cost of stress-dependent topology
optimization problems. While doing so does have evident advantages, the results obtained
for each element of the benchmark problem described in Section 7.2 show that, on average,
|∂σuPN (ρ)| > |∂σsp
PN ( ρ )|. As a result, assuming that ∂σ PN ( ρ ) = 0 would lead to an average
f u
error greater than 50% in the calculation of the maximum stress sensitivity, at least for
the particular case of the benchmark problem described in Section 7.2. The error in this
approximation is aggravated by the fact that ∂σuPN (ρ) has a negative sign from Equation (53),
and as a consequence, ignoring this term could potentially point the optimization algorithm
in the opposite direction of the gradient. Therefore, the simplification proposed in [100]
was not adopted in this work.

3.5. Volume Constraint


The value of the sensitivity of the volume constraint to changes in the design density
of each element is equal to the value of its volume, as defined in Equation (59). Note that
the equivalent sensitivity can be obtained for a mass constraint, replacing the volume of
the element with its mass.
∂V (ρ)
= Ve . (59)
∂ρe
Appl. Sci. 2023, 13, 12916 17 of 39

4. Mesh Dependency and Data Filtering


In order to obtain a mesh-independent solution and avoid the “checkerboard” instabil-
ity, the raw sensitivities and/or design densities are processed with a blurring filter [6,101].
This article adopted the filter scheme used in [17], which is a simplification of the scheme
proposed by Huang and Xie [102], described as follows:
!
w(rej )
ρe = ∑ ρj (60)
j ∑ j w(rej )

where the value of w(rej ) is equal to the difference between the maximum range of the
filter (rmax ) and the actual distance between the central element e and the j elements in its
neighborhood (rej ), defined as follows:

w(rej ) = max (0, rmax − rej ). (61)

This parameter can be interpreted as a pondered measurement of how close the two
elements are. Note that the code implementation provided allows the user to select if
the blurring filter should be applied to the sensitivities (excluding the volume constraint
sensitivities, or equivalent), the design densities, or both.
It is relevant to note that, although not implemented in the methodology herein
proposed, it is common to couple filtering techniques with projection methods [103] in
order to obtain a better geometry definition in the final solution. Doing so may eliminate
residual grey areas, which is particularly relevant in stress-constrained problems, where a
smoother geometry may avoid the creation of stress concentration points.

5. Optimization Algorithms
5.1. Optimality Criteria
The OC method implemented in this article follows the approach proposed by Bend-
søe [99] and implemented by Sigmund in [6]. It is usually applied to problems of compliance
minimization with a volume constraint. According to this procedure, the design variables
can be updated according to the following expression:
 η
ρlower , if ρBe ≤ ρlower

η η
ρ = ρBe , if ρlower ≤ ρBe ≤ ρupper (62)
 η
ρupper , if ρupper ≤ ρBe

ρlower = max (ρmin , ρ − δρ) (63)


ρupper = min(1.0, ρ + δρ) (64)
where ρlower and ρupper represent the design densities’ move limits imposed by the parame-
ter δρ. η is a numerical damping coefficient set equal to 0.5 in accordance with [6]. Be is
a parameter obtained from the optimality condition, described as the ratio between the
gradient of the objective and constraint functions divided by the Lagrangian multiplier (ψ),
as follows:
− ∂C
∂ρ − ∂C
∂ρ
Be = ∂V = . (65)
ψ ψVe
∂ρ

The Lagrangian multiplier ψ can be found using a bisection method, updating its
value until the volume of the solution meets the imposed constraint.
This method can also be simplified in order to obtain an equivalent version suitable
for discrete design variables. This simplification corresponds to the approach used by
Zuo and Xie in [17]. For the current iteration, the code determines the sensitivities of all
elements. Then, a bisection method is used to determine a threshold sensitivity. All
elements with a sensitivity greater than the threshold become solid (i.e., ρ = 1.0), while the
other elements are removed according to the “soft-kill” approach (i.e., ρ = ρmin ). Similar to
Appl. Sci. 2023, 13, 12916 18 of 39

the continuous version, the value of the sensitivity threshold is updated until the mass or
volume of the structure meets the volume constraint imposed.
When using the OC method, especially the discrete version, it is usual to consider
a fully solid design for the initial iteration and gradually reduce the volume constraint
in each iteration until the target value is reached. This procedure is adopted to obtain a
convergent solution and can be defined through the following equation:

V k+1 = max (V ∗ , V k (1.0 − evol )) (66)

where k is the number of the current iteration and evol is the ratio at which the volume
constraint decreases in each iteration, until the target volume constraint (V ∗ ) is reached.
Nonetheless, it is important to understand that this discrete version should be regarded
as a heuristic, which was observed to work well when solving compliance-minimization
problems. However, this procedure can be criticized from an optimization perspective,
as there is no mathematical guarantee that the objective function will decrease during
each iteration.

5.2. Method of Moving Asymptotes


The Method of Moving Asymptotes (MMA) is a nonlinear programming method
that can be applied to structural optimization problems. Its functioning is based on an
iterative process, generating a series of strictly convex approximating sub-problems. As
an input to generate the sub-problem approximation, the MMA takes the value of the
objective function, the value of the constraints, and the respective gradients as the inputs.
Then, using dual-methods such as [104,105], the sub-problem is solved and the solution
is taken as the value of the design variables in the next iteration of the main optimization
problem [82].
The popularity of the application of the MMA to topology optimization problems is
justified by several factors. From a computational point of view, the use of an approximation
sub-problem and gradient information provides a means to reduce the number of structural
problems solved, which are usually expensive. Furthermore, the versatility of the method
and capability of handling multiple types of constraints make it suitable and applicable
to a wide range of cases, from simple compliance-minimization problems with a single
volume constraint, to cases where multiple constraints with different natures are applied.
Its stability is also a positive characteristic, even for initial non-fully solid designs. Due to its
extension and complexity, the interested reader is referred to [82] for a detailed explanation
of this method.
The present code establishes a connection between ABAQUS® and the implementation
of the MMA created by Deetman [106] (“mmasub” and “subsolve” functions of the code
provided), which is a Python version of the MATLAB code created by Svanberg [107].

5.3. Sequential Least-Squares Programming


Sequential Least-Squares Programming (SLSQP) is a Sequential Least-Squares Pro-
gramming algorithm that utilizes the Quasi-Newton method to obtain an optimal solution.
The strategy behind this algorithm consists of approximating the objective function with a
quadratic equation and using the minimum of the approximation function as a possible
solution in the next iteration. To improve the efficiency, the SLSQP can use Quasi-Newton
methods to approximate the objective Hessian function.
The code provided uses the SLSQP implementation available in the SciPy module [108],
which is a library of numerical routines for the Python programming language, which
provides the fundamental building blocks for modeling and solving scientific problems.

5.4. Trust-Constr
Trust-constr is a trust region algorithm for constrained optimization, available in the
SciPy module [108]. Both line search methods and trust region methods generate steps
with the help of a quadratic model of the objective function. However, while line search
Appl. Sci. 2023, 13, 12916 19 of 39

methods use a step length along a given search direction, trust region methods define a
region around the current iteration, within which they trust that the quadratic model is an
accurate approximation [109].
This algorithm utilizes the trust region interior point method described in [110] to solve
the inequality constraints imposed in the topology optimization problem statement. The
strategy behind this interior point method [110] consists of solving inequality constraints
by introducing slack variables. Then, the process is repeated for a sequence of equality-
constrained barrier problems with progressively smaller values of the barrier parameter.

6. Python Implementation and Usage


The following subsections present a brief guide on how to use the Python code provided
with the following Dataset [94] or repository: https://github.com/pnfernandes/Python-
Code-for-Stress-Constrained-Topology-Optimization-in-ABAQUS. A brief overview of
the most-important details of the main code classes and functions is also included in these
subsections. The detailed information of each class and function can be found in their
respective doc-string. The sequence of operations performed by this code implementation
is described in Figure 1.

Figure 1. Sequence of operations performed by the topology optimization code implemented in


this manuscript.

This code can be called in ABAQUS® using the Run Script command in the File
tab or by copying it into the command line. Note that the Run Script command loads
the code faster, but automatically assumes that the user intends to solve the topology
optimization in its totality. Copying it into the command line leads to a slower input, but
allows a line-by-line execution, which may be useful for understanding the functioning of
the code implementation.
The PEP8 [111] Python style guide was followed as closely as possible. However, the
interested reader is warned that some exceptions exist, caused by compatibility constraints
with the data structures and pre-defined variables existing in ABAQUS® . An example of
these exceptions includes the naming of constant material properties without all capital
letters, since these names are already used by ABAQUS® in a different data structure.

6.1. Code Usage


Upon executing the code, ABAQUS® will create a series of prompt dialogue boxes.
This allows the user to select the model database file (.cae), structural part, material, problem
Appl. Sci. 2023, 13, 12916 20 of 39

statement, optimization algorithm, and internal parameters to be considered during the


topology optimization.
Besides being fully functional, the ABAQUS® model does not require any specific
formatting, except for the following considerations:
• Within the same part, the user can define specific elements to be optimized, dividing
the part into two regions: one with editable elements and another with elements
that should not be included in the optimization process (i.e., passive elements, from
this point onward referred to as “frozen region” or “frozen elements”). To do so, the
user should create a set named “editable_elements”, containing the elements to be
edited. If this set does not exist, the whole part will be optimized. Note that the
name “editable_elements” is case sensitive. This is performed in order to promote the
optimization only of the targeted area and also to reduce the computational cost.
• The region to be optimized should not have a material section assigned to it, as the
code will automatically assign the material properties and sections directly to the
elements. Therefore, if the user defined a set with the editable elements, only the
elements not included (frozen elements) should have a material section assigned
to them.
• It is possible to allow the frozen elements to be considered during the filtering oper-
ations. To do so, the user should create a second element set with the case-sensitive
name “neighbouring_region”.
• If multiple copies of the part to be optimized are included in the model assembly, only
the first copy will be optimized.

6.2. Model Formatting, Job Submission, and Sensitivities (Lines 28–3452)


The ModelPreparation class modifies the ABAQUS® model file (.cae) in order to allow
the assignment of material properties and material sections to each individual element,
as well as the property update during each iteration. Furthermore, this class requests the
output of the strain energies, external work, and node strains if solving a stress-dependent
problem. In ABAQUS® , the strain energies of geometrically nonlinear problems are stored
in the variables “SENER” and “PENER”, respectively, for the elastic and plastic strain
components. Note that, according to the literature [14,17,98,102,112], the sensitivity of each
element in a geometrically nonlinear compliance-minimization problem is given by the sum
p
of the elastic strain ( Eee ) and plastic strain components ( Ee ), as described in Equation (67).
However, for geometrically linear problems, the plastic strain component is zero, and
ABAQUS® stores the strain energies in the variable “ESEDEN”. The external work is only
requested for a critical analysis of the result, as it should be equal to the objective function
considering no energy dissipation.

∂C p
= Eee + Ee . (67)
∂ρ

The submission of the FEA simulations for the state and adjoint models is managed by
the classes ABAQUSFEA and AdjointModel, respectively. ABAQUSFEA  is also responsible
for determining the sensitivity of the compliance objective function ∂C
∂ρ , which is stored
as the class attribute “ae”. On the other hand, the AdjointModel classalso applies the
∂σ PN (ρ)

adjoint loads and determines the stress sensitivity. The stress sensitivity ∂ρ , and its
most-relevant intermediate terms PN ( ρ )
(∂σsp and ∂σuPN (ρ))are stored as attributes of this
f
class, along with the stress and strain vectors. In particular:
∂σ PN (ρ)
• “elmt_stress_sensitivity_continuous” stores the values of ∂ρ in a mesh-independent
and mesh-independent form, making the comparison of the value of this derivative
more suitable for the results obtained through finite differences.
Appl. Sci. 2023, 13, 12916 21 of 39

∂σ PN (ρ)
• “elmt_stress_sensitivity_discrete” stores the values of ∂ρ in a mesh-dependent
form, which is more suitable to be used as an input to the optimization algorithms,
since they generally do not have access to the information of the mesh used in the FEA
model. The difference between discrete and continuous element stress sensitivity is
the multiplication by the determinant of the Jacobian matrix.
• “d_pnorm_spf” stores the values of ∂σsp PN ( ρ ).
f
• “d_pnorm_displacement” stores the values of ∂σuPN (ρ).
• “stress_vector” and “stress_vector_int” store the stress vectors determined at the
element nodes and integration points.
• “deformation_vector” and “deformation_vector_int” store the strain vectors deter-
mined at the element nodes and integration points.
The sensitivity of the material constraint is determined by the material_constraint_sensitivity
function, accounting for the possibility of having a non-uniform mesh with elements of
different sizes and the use of either a volume or mass constraint.

6.3. Material and Stress Constraints (Lines 3453–3607)


The values of the material and maximum stress constraints are determined by the
MaterialConstraint class and the stress_constraint_evaluation function, respectively. The
maximum stress value is approximated with the modified p-norm function described in
Equation (47), which is determined by the p_norm_approximation function.

6.4. Data Filtering (Lines 3608–3846)


The blurring filter is defined by the DataFilter class, which determines how each
element is influenced by its neighborhood. The neighborhood of each element is defined
by the elements that are fully within a maximum search radius defined by the user. The
code Lines 3760–3762, intentionally left commented to reduce computational cost, generate
element sets that allow an easy visual interpretation of the neighborhood of each element.

6.5. Optimization Algorithms: Optimality Criteria, Method of Moving Asymptotes, Sequential


Least-Squares Quadratic Programming, and Trust-Constr (Lines 3847–5622)
The present code provides five optimization algorithms, described in Section 5, which
can be used to solve the topology optimization problem.
The discrete and continuous versions of the OC algorithm, implemented in the func-
tions oc_discrete and oc_continuous, are only suitable for compliance-minimization problems.
The remaining optimization algorithms are suitable for all problem statements included.
The mma function is a decorator that links ABAQUS® to the mmasub and subsolv
functions implemented by Arjen Deetman [106]. Therefore, the main purpose of the mma
function is the processing of the inputs necessary to apply the MMA [107] as a function of
the problem statement selected by the user.
The functioning of the oc_discrete, oc_continuous, and mma functions is managed by
the main program loop, described in Section 6.11. However, this is not the case for the
SLSQP and Trust-constr algorithms available in this code, as they belong to the SciPy
module [108]. To be fully functional, the SLSQP and Trust-constr algorithms require the
additional freedom to decide when and how many times to call the objective, sensitivity,
and constraint functions. Furthermore, the problem statement must be defined using
unique data structures. For these reasons, class SciPyOptimizer is responsible for:
• Calling the SLSQP and Trust-constr methods from the SciPy module [108].
• Re-defining the problem statement with the correct data structure required by the
algorithm selected.
• Providing the freedom for these algorithms to call the objective, sensitivity, and
constraint functions as many times and in any given order necessary.
Appl. Sci. 2023, 13, 12916 22 of 39

• Trying to record the data of each iteration as accurately as possible. However, it is


to be expected that the data recorded may include information from intermediate
evaluation points.
Finally, there are two details that should be considered before using the SLSQP and
Trust-constr algorithms. One is that both have internal convergence criteria. To change
them, the user may be required to edit the code provided with this article. The second
detail is that the initial solution must be feasible; otherwise, the optimization process will
stop. This is particularly relevant when defining the initial material distribution and/or
when using a p-norm continuation approach (described in Section 6.11). The OC and MMA
methods implemented do not have these restrictions for the initial guess.

6.6. Display Definition (Lines 5623–6207)


The SetDisplay class is capable of changing the color codes of the element sets. In
compliance-minimization problems, this allows the user to plot a gray-scale representation
of the material distribution. In stress-dependent problems, the user has the additional
options of plotting the distribution of the element stress or element-amplified stress, both
of which can be raised to the p-norm exponential factor. The element stress plotted is equal
to the average of the stresses determined at the integration points of the element.
The graphic representation(s) plotted at each iteration are automatically saved to a
.png file.
To allow an easier interpretation of the 3D material distributions, the SetDisplay class
has a built-in method (function of a class) named hide_elements, whose input is a design
variable threshold value. This method will hide all elements whose design variable is below
the threshold input.

6.7. Data Recording (Lines 6208–6349)


At the end of each iteration, the save_data function will create a text file that records
the values of all variables necessary to describe the current solution, as well as the internal
parameters selected by the user.
This text file can also be used to restart the topology optimization process, start-
ing from any iteration. However, as mentioned in Section 6.5, note that the algorithms
SLSQP and Trust-constr may require the current iteration to be feasible with respect to the
constraints imposed.
At the end of the optimization process, save_mdb will create a separate ABAQUS® .cae
file with the final solution obtained and a record of the objective function and material
constraint values.

6.8. Element Formulation and Stiffness Matrix (Lines 6350–7283)


To solve stress-dependent problems, it is necessary to have access to information
that depends on the element formulation (as shown in Section 3.4), such as Ba , K, C, and
the Jacobian matrix, as well as the definition of the element shape functions and their
derivatives. The code provided includes the information required to use one 2D element
with 4 nodes and one 3D element with 8 nodes. The 2D element is referred in ABAQUS®
by the code 2DQ4 and, more specifically, as CPS4 or CPE4 for the plane–stress and plane–
strain cases, respectively. The 3D element is referred in ABAQUS® by the code C3D8. The
information of these elements is included in the ElementFormulation class, while the stiffness
matrix C is created by the c_matrix_function function.
Although not used in the present article, the ElementFormulation class also includes the
formulation of a shell element (referenced by the code S4 in ABAQUS® ). This information
was included in order to promote the development of topology optimization methodologies
suitable to this particular type of element.
Appl. Sci. 2023, 13, 12916 23 of 39

6.9. Parameter Input Request, Domain Definition, and Variable Generation (Lines 7284–8854)
The ParameterInput class generates the prompt boxes that appear when running the
code. The information introduced by the user is then used to create the global variables
required for the code. A detailed list of these variables and their purpose can be found in
Lines 8366–8461.
This information is then used by the EditableDomain class, to define the design space of
the topology optimization problem, and by the VariableGenerator class, to create the lists and
dictionaries that record the relevant data gathered during the topology optimization process.
For a detailed description of these variables, please refer to the code Lines 8721–8827.

6.10. Auxiliary Functions (Lines 8855–9013)


Finally, there are four auxiliary functions to be briefly mentioned:
• average_ae outputs the average of the compliance sensitivity of each element over
the last three iterations. This leads to an easier convergence of the OC algorithms,
especially when considering discrete variables.
• The update_past_info function updates the variables that record the design variables
and compliance sensitivity used in the previous two iterations.
• The evaluate_change function creates a ratio that describes how the objective function
has changed over the last 10 iterations, which is used as convergence criteria in the
implementation provided.
• The remove_files function will allow an automatic removal of the temporary files created
by ABAQUS® after each FEA.

6.11. Main Program (Lines 9014–9307)


The main program is divided in two phases. Between Lines 9014 and 9110, the code
creates the classes required for the problem statement selected and prepares the ABAQUS®
model accordingly. The optimization process and the convergence criteria are defined in
Lines 9111–9307.
The optimization process considers two loops. The first is applicable for stress-
dependent problems, allowing a continuous increase of the p-norm exponential factor
between Qi and QF. This functionality, here referred to as the “p-norm continuation ap-
proach”, allows the stress constraint to be applied gradually and may be useful to improve
the convergence of the algorithm. The continuation approach contrasts with the constant
approach, which only considers one constant value for the p-normfactor. Note that for
stress-independent problems (where Qi is not used, but set to 1.0) and when using the
constant approach, Qi = QF, leading to a single loop.
The second loop represents the convergence criteria. The code assumes that the
algorithm has converged if the objective function has not changed more than 0.1 % over the
last 10 iterations. It was selected as the default convergence criteria to allow an easy and
relatively fast recreation of the results detailed in this article, as well as for being similar to
the criteria adopted in [17]. The interested user is reminded that these criteria do not apply
to the SLSQP and Trust-constr algorithms (as mentioned in Section 6.5) and is encouraged
to create convergence criteria adapted to the topology optimization problem analyzed.

7. Benchmark Problems and Case Study


7.1. Cantilever Beam
The purpose of including this problem was to validate the functioning of the compli-
ance objective function and volume constraint implemented in the code provided, before
addressing more-complex stress-dependent problems, such as the L-bracket detailed in
Section 7.2.
This problem was modeled using a regular mesh with an element size of 5.0 mm and
the element type CPS4. The load F was equal to 100.0 N, applied to a single node, in the
corner represented in Figure 2. The problem was solved using an implicit analysis and
Appl. Sci. 2023, 13, 12916 24 of 39

considering a material with a 70.000 MPa Young’s modulus, a 0.33 Poisson’s ratio, and a
material density of 2.7 × 10−9 t/mm3 .

Figure 2. Dimensions and boundary conditions of the Cantilever beam numerical model.

The ABAQUS® models necessary to reproduce all the results described in this work
are available in the Dataset [94].

7.2. L-Bracket
The L-bracket was chosen as a more-challenging benchmark problem [53,113,114],
characterized by its initial geometry containing a stress-concentration point in the internal
corner. Unconstrained compliance-minimization problems tend to ignore the stress con-
centration point, leading to an angular shape. On the other hand, stress-minimization or
stress-constrained compliance-minimization problems tend to create rounded shapes that
avoid the stress concentration. For these reasons, the L-bracket problem will be used in
this research to validate and demonstrate the functioning of the code implemented when
solving stress-dependent topology optimization problems. Furthermore, the strain and
stress state generated by this L-bracket geometry is used in Section 8 to validate the correct
implementation of the element formulations and maximum stress differentiation process.
The dimensions and boundary conditions considered are represented in Figure 3.
Unless stated otherwise, this problem was modeled using a regular mesh with an element
size of 3.0 mm and the element type CPS4. The load F was equal to 1500.0 N, with this
value being distributed over the nodes included in the 12.0 × 12.0 corner represented in
Figure 3. The elements within the 12.0 × 12.0 corner are not editable during the optimization
process. The problem was solved using an implicit analysis and considering a material
with a 70.000 MPa Young’s modulus, a 0.33 Poisson’s ratio, and a material density of
2.7 × 10−9 ton/mm3 .

7.3. Bonded Support


The problem described in Figure 4 was selected to provide a three-dimensional case
study that is more representative of the complex geometries that can be found in engineer-
ing design problems.
Appl. Sci. 2023, 13, 12916 25 of 39

Figure 3. Dimensions and boundary conditions of the L-bracket numerical model.

The design space was modeled using an irregular mesh with an average element size
of 1.25 mm and hexahedral C3D10, leading to an approximate total of 370.000 elements.
A unit load was applied at a reference point attached to the connection region of the
structure, while the surface of the adhesive joint was considered fixed. To minimize the
computational cost, two planes of symmetry were considered along the XY and YZ planes,
reducing the total number of elements. The problem was solved using an implicit analysis
considering a material with: a 70.000 MPa Young’s modulus, a 0.33 Poisson’s ratio, and
a material density of 2.7 × 10−9 ton/mm3 . The problem also considered a simplified
representation of an adhesive bond, accounting only for the elastic properties (a 1.500 MPa
Young’s modulus and a 0.3 Poisson’s ratio). Due to the complexity of the design, the
interested reader is referred to the Mendeley Dataset [94] for the complete description of
the geometry considered in this case study and shown in Figure 4.
The material elements representing the adhesive bond are identified as “frozen ele-
ments”. This excludes the possibility of editing the material distribution in this region,
which would influence the resistance of the joint due to the reduction of the bonded area
and excludes the contribution of these elements during the use of the blurring filter, which
would be physically unreasonable as the adhesive and substrate are made of different
materials. On the other hand, the first layer of elements of the support in contact with the
adhesive was identified as a “neighboring region”, which does not allow changes in the
material distribution of these elements, but allows the consideration of their influence in
the determination of the gradients. However, unlike the previous case, the elements in this
region were considered during the filtering process, as the material is the same as the one
assigned to the editable region of the topology optimization process. The “frozen elements”
and “neighboring region” are shown in Figure 4 in red and blue, respectively.
The ABAQUS® models necessary to reproduce all the results described in this work
are available in the Dataset [94].
Appl. Sci. 2023, 13, 12916 26 of 39

Figure 4. Complete three-dimensional representation of the geometry considered for the bonded
support and its boundary conditions. The exterior surface of the region shown in red is considered
fixed. The complete geometry is provided in the Mendeley Dataset [94]. (a) Detailed view of the
bonded region. (b) Detailed view of the loads applied in the lower surface.

8. Code Validation
The data necessary to solve compliance-minimization problems can be directly ob-
tained from ABAQUS® , which is a commercially certified software. However, stress-
dependent problems require the explicit programming of the element formulation and
of the derivation process of the maximum stress function. The purpose of the following
subsections is to present a brief validation of the code implementation. Section 8.1 validates
the element formulations implemented, comparing the strains and stresses determined
by the code and by ABAQUS® at each integration point. Section 8.2 compares the deriva-
tive of the maximum stress determined by the code with the derivative obtained through
finite differences.
In this section, the L-bracket benchmark problem described in Section 7.2 is used. The
reason behind this choice is that the L-bracket problem leads to a complex strain and stress
state, allowing a more-challenging and -generic testing of elements over a wider variety of
loading conditions than the Cantilever beam problem.

8.1. Validation of the Element Formulation


The analysis of the element formulation is based on the measurement of a pondered
error, described as follows:
i γi
Err = δγi . (68)
|γ|
where Erri is the pondered error determined for the component i of a generic vector γ

and δγi is the difference between the component determined by ABAQUS® and its code
i is determined as the product of δγ by the ratio between the component γ
counterpart. Err i i
and the magnitude of the vector γ.
This metric is preferred over the direct comparison of δγi , since the latter is highly
influenced by floating point errors. One of the reasons for this influence is that, while
ABAQUS® operates internally with double-precision, the output received by the code is in
a single-precision format. This difference reduces the number of decimal places considered
in each value and could lead to disproportional artificial errors in the vector components
that contribute the least to the magnitude of the vector or in vectors whose magnitude
tends towards zero. The second reason is that δγi tends to estimate large error values for
Appl. Sci. 2023, 13, 12916 27 of 39

vector components that have a significantly smaller magnitude when compared to the
magnitude of the vector.
Table 2 summarizes the average pondered error observed for each integration point
of four variants of the L-bracket numerical model described in Section 7.2, each with a
different element type. For the particular case of using a 3D element (element type C3D8
in ABAQUS® ), a thickness of 1.0 mm was considered for the L-bracket geometry. Since
the largest average pondered error observed is equal to 2.0%, it can be concluded that the
element formulations included in the code provided were implemented successfully for
the case selected. Furthermore, for each element type, the table indicates the percentage of
integration points with a pondered error less than 1.0%.

Table 2. Average pondered error between the elements implemented in the code and the ABAQUS®
output. The dimensions are represented in millimeters.

CPS4 CPE4 S4 C3D8


i (%) Int. Points i (%) Int. Points i (%) Int. Points i (%) Int. Points
Err i < 1% (%) Err i < 1% (%) Err i < 1% (%) Err i < 1% (%)
Err Err Err Err
ξ 11 0.05 99.65 0.90 63.39 0.49 97.29 0.44 96.37
ξ 22 0.15 99.55 0.97 63.31 0.44 97.60 0.44 96.37
ξ 33 - - - - - - 0.44 96.37
ξ 12 0.04 99.51 0.04 99.51 1.95 32.45 <0.01 100.0
ξ 13 - - - - - - <0.01 100.0
ξ 23 - - - - - - <0.01 100.0
σ11 0.00 99.88 1.85 31.74 0.61 95.89 1.45 44.81
σ22 0.15 99.65 2.00 63.41 0.61 97.29 1.45 96.36
σ33 - - - - - - 1.45 44.82
σ12 0.01 99.55 0.01 99.55 0.77 77.44 <0.01 100.0
σ13 - - - - - - <0.01 100.0
σ23 - - - - - - <0.01 100.0

Although not included in the present work due to its extension, the interested reader is
informed that the Dataset [94] associated with this research includes a detailed comparison
of every integration point, considering both the pondered and regular error measurements.

8.2. Validation of the Maximum Stress Derivative


To validate the stress norm derivative of the code provided, its result was compared
with the derivative obtained through finite differences. To do so, the design density of the
elements located at points A, B, and C (shown in Figure 3) were changed individually, and
the value of the maximum stress approximation was used to apply the finite differences.
This procedure was repeated for the three elements, considering three different mesh sizes
of 3.0 mm, 1.0 mm, and 0.5 mm, each increasing the order of magnitude of the total number
of elements by 1, and different design density changes of 0.1, and 0.01. These density
changes were chosen to conform with the maximum stiffness element difference allowable
by ABAQUS® . The results obtained are summarized in Table 3.
It can be observed that the results obtained through finite differences are in good
agreement with the derivative obtained by the Python code implemented, especially when
the mesh size and the design density decrease.
∂σ PN (ρ) PN ( ρ ) and
Table 4 indicates the average values of ∂ρ and its components ∂σsp f
∂σuPN (ρ) observed in the L-bracket model as a function of the element mesh size and design
density. These data indicated that the approximation proposed in [100] (described at the
end of Section 3.4) should not be adopted for the present problem.
Appl. Sci. 2023, 13, 12916 28 of 39

Table 3. Analysis of the continuous maximum stress derivative determined by the Python code and
the derivative obtained through finite differences.

Mesh Number of p-Norm (MPa) Element Element p-Norm (MPa) Finite Continuous
∆ρ
Size Elements @ ρ = 1.0 Location Label @ ρ = 1 − ∆ρ Differences Derivative
0.1 335.12679 −208.4939
A 69,184 −129.6819
0.01 315.23590 −95.8493
0.1 314.27740 0.0000
0.5 102,400 314.27741 B 102,332 0.0001
0.01 314.27741 0.0000
0.1 314.28104 −0.0363
C 63,841 −0.0301
0.01 314.27784 −0.0438
0.1 272.87736 0.8519
A 17,269 0.4426
0.01 272.95502 0.7534
0.1 272.96249 0.0006
1 25,600 272.96255 B 25,560 0.0004
0.01 272.96255 0.0000
0.1 272.97007 −0.0752
C 23,901 −0.0685
0.01 272.96326 −0.0713
0.1 232.36352 −112.7404
A 1953 −65.2413
0.01 221.48312 −39.3637
0.1 221.08923 0.0025
3 2889 221.08948 B 2875 0.0029
0.01 221.08941 0.0066
0.1 221.13180 −0.4232
C 2683 −0.4054
0.01 221.09332 −0.3842

Table 4. Average value of the stress derivative, and its components, observed in the L-bracket model
at different design density values, considering three different mesh sizes.

∂σ PN (ρ) PN ( ρ ) |∂σuPN (ρ)|


Mesh Size ρ ∂ρ ∂σsp f ∂σuPN (ρ) PN ( ρ )|
|∂σsp f

1 −0.0088 0.0004 −0.0092 24.037


0.5 0.5 −2304.3703 0.5426 −2304.9129 4248.295
0.1 −90.9833 1.2132 −92.1965 75.996
1 −0.0305 0.0013 −0.0318 23.864
1 0.5 −7949.4335 1.8849 −7951.3184 4218.445
0.1 −313.8380 4.2147 −318.0527 75.462
1 −0.2140 0.0096 −0.2236 23.289
3 0.5 −3.4697 0.1086 −3.5784 32.936
0.1 −2206.1706 30.3676 −2236.5382 73.649

9. Topology Optimization Results


Figure 5 summarizes the results obtained for the compliance minimization of the
Cantilever beam. Figure 6 summarizes the results obtained for the topology optimization of
the L-bracket considering the different problem statements, plotting the objective function
at each iteration and illustrating one of the final geometries obtained. Finally, Figure 7
shows the topology-optimized geometry of the bonded support. The color code adopted
here displays elements with ρ = 0 in white, intermediate densities in grey, and elements
with ρ = 1.0 in black. These results were not adimensionalized.
The results obtained for each problem statement and any particular choice of pa-
rameters are discussed in the following subsections. In common, these examples share
the volume constraint V ∗ = 0.5. In the particular case of the solution “OC—Discrete
and decreasing”, the initial density was set to 1.0 and gradually reduced by a factor of
Appl. Sci. 2023, 13, 12916 29 of 39

evol = 0.05, while the remaining cases considered an initial density equal to 0.5. The
maximum move limit was equal to 0.2 for the OC or MMA algorithms and 1.0 for the
SciPy algorithms SLSQP or Trust-constr, corresponding to their pre-default values. The
blurring filter was applied to both the sensitivity and design densities with a maximum
search radius of 8.0 mm for the L-bracket, 12.0 mm for the Cantilever beam, and 3.5 mm
for the bonded support, except for the discrete version of the OC, which only applied the
blurring filter to the sensitivity. The influence of the frozen elements was also considered
during the application of the blurring filter. For stress-dependent problem statements, a
p-norm exponential factor Qi = 8.0 was used.
Overall, the Trust-constr and SLSQP algorithms tended to require a larger number of
iterations to reach convergence. The reason for this difference was justified by their internal
convergence criteria, as described in Section 6.11.
In the results shown, the existence of few elements with intermediate design densities
is, generally, to be expected for two reasons. First, applying a blurring filter will cause a
gradual transition between the solid and void regions, avoiding a full “black-and-white”
solution. Second, as described in Section 6.11, the convergence criterion depends only on
the values of the objective function and does not impose a strict restriction on the final
solution being constituted only by solid elements. These two factors justify the apparent
better performance of the discrete version of the OC algorithm, since it only uses solid
elements and does not have a blurring filter applied to the element densities. However, it is
most likely that this optimization method converged to a better local minimum.
It is also relevant to note that the mesh size had an influence on the use of elements
with intermediate design densities. To completely avoid the existence of residual grey areas,
it is recommended to implement projection methods [103], to define the final contour of the
geometry, or to apply a final threshold filter to the design densities of each element. How-
ever, despite the potential influence of internal parameters, such as the filtering approach,
mesh refinement, and the choice of the optimization algorithm and its hyperparameters, the
results presented in both case studies are in line with the information reported in previous
publications [53].
Regarding the computational efficiency of the implementation proposed here, it was
seen that it requires an average of 50 s per iteration when executed with an Intel® CoreTM
i7-8750H CPU @ 2.20 GHz. However, the use of external packages, to apply the SLSQP and
Trust-constr algorithms available in Python, led to an increase of this value to an average of
380 s per iteration. These values include the whole process required to perform an iteration,
including: the update of the material properties, the preparation of the ABAQUS® input
file, model execution, data extraction from the FEA solution, the calculation of gradients,
the application of the optimization process to update the design densities, and the plot of
the new material distribution.
Finally, the Cantilever beam and L-bracket problems solved in these sections could also
be replicated in 3D space. This is possible as the code provided includes the implementation
of a 3D element (C3D8 in ABAQUS® ) and as the problem solving process does not require
any particular adaptation when being converted to 3D space.
The interested reader is informed that the Dataset [94] contains all the solutions
obtained by each optimization algorithm, at each iteration. Due to its large extension, the
information presented in this section is limited to the most-relevant solutions.

9.1. Cantilever Beam: Compliance Minimization Results


The objective functions obtained by each of the different optimization algorithms
were in good agreement, converging towards an approximately equal value of compliance.
However, a different trend can be observed for the “OC—discrete and decreasing” case. In
this particular case, the initial solution considers a fully solid design that must gradually
reduce its mass to meet the volume constraint, causing a consequent reduction of the
structural stiffness and an increase of the compliance value.
Appl. Sci. 2023, 13, 12916 30 of 39

Figure 5. Graphic representation of the objective function and volume constraint obtained for the
compliance minimization of the Cantilever beam. The geometry displayed represents the final
solution obtained by the MMA algorithm.
Appl. Sci. 2023, 13, 12916 31 of 39

Figure 6. Graphic representation of the objective function obtained for each optimization algorithm
and problem statement. The geometries displayed represent the final solution obtained by the
algorithms: (A) OC—Continuous, (B) MMA, (C) SciPy SLSQP.

This observation is also in line with the volume constraint graphic, which shows a
gradual decrease until the value 0.5 is reached. On the other hand, the remaining algorithms
maintained the volume constraint within a feasible domain.
The final Cantilever geometry obtained was similar across all cases considered and
illustrated, in Figure 5, with the solution found by the MMA. In this particular case, the
elements with intermediate densities may also be the result of using a coarser mesh.

9.2. L-Bracket: Compliance Minimization Results


The solutions obtained for the compliance-minimization problem were similar across
all the algorithms used, differing only in the use of intermediate design densities in some
elements. The solution obtained by the continuous version of the OC is shown in Figure 6A
as an example of this geometry.
The volume constraint was respected across all iterations. This behavior was also
observed for the problem statements presented in Sections 9.3 and 9.4. For this reason, the
graphic representation of the constraints was not included in these sections.
Appl. Sci. 2023, 13, 12916 32 of 39

Figure 7. Graphic representation of the topology optimized geometry, objective function, and
material constraint obtained during the compliance minimization of the bonded support. The
geometry displayed represents the final solution obtained by the OC—Continuous algorithm. The
image shown only includes elements with a design density ρ = 1.0 to improve the readability and
comprehension of the solution obtained.
Appl. Sci. 2023, 13, 12916 33 of 39

9.3. L-Bracket: Stress-Constrained Compliance Minimization Results


The stress-constrained compliance-minimization problem statement considered a
maximum allowable stress σ∗ = 200.0 MPa. Imposing this constraint caused the MMA to
converge towards a curved geometry, shown in Figure 6B, avoiding the creation of a stress
concentration point in the inner corner of the L-bracket. This transition is in agreement
with the results presented in [53].
It is important to note that the transition from an angular geometry to a curved
geometry (from case A to B of Figure 6) is dependent on several factors and not guaranteed
to occur. First, the use of the modified p-norm approximation (Equation (47) proposed
in [53]) may lead to an underestimate of the maximum stress installed. This fact may
cause the optimization algorithm to overlook the influence of the stress concentration
point and justifies the selection of σ∗ = 200.0 MPa, a relatively low maximum value for
the stress constraint. Second, the algorithm selected may adopt a strategy that is more
or less prone to explore and accept solutions that do not respect the imposed constraints.
The solution obtained by the SLSQP algorithm had a slightly curved shape closer to the
region where the load was applied, but did not avoid the internal angular geometry.
The solution obtained by the Trust-constr region was equal to the one obtained in the
compliance-minimization problem statement, as the implementation available in SciPy
only determined the maximum stress sensitivity for the first iteration. Although this
strategy reduced the computational cost, it did not allow a rigorous evaluation of the
influence of each element in the maximum stress.
Finally, it is also important to note that the p-norm exponential factor had a significant
influence on the result obtained, especially in the use of elements with intermediate densities.

9.4. L-Bracket: Stress Minimization Results


Defining a stress-minimization problem statement may also lead to a transition from
an angular to a curved geometry. This is particularly evident in the solution obtained by
the SLSQP algorithm, shown in Figure 6C. However, this transition did not occur with
the method available in ABAQUS® . As a result, the SLSQP and Trust-constr algorithms
converged to solutions with maximum stresses of 315 MPa and 330 MPa, respectively,
representing a 35% reduction when compared to the 518 MPa installed in the solution
obtained with ABAQUS® .
The data obtained with the SLSQP indicated an unstable behavior with large vari-
ability in the objective function. To improve readability, only the cumulative best solution
obtained with this method was included in the plots referring to this problem statement.
This variability indicates that the SLSQP was more likely to perform larger density re-
distributions, which may be a result of the strategy adopted by the SciPy implementation
of this algorithm, and a result of the influence of their internal parameters, which largely
affect the solutions obtained.
Similar to the previous problem statement, the p-norm exponential factor had a signif-
icant influence on the result obtained, especially in the use of elements with intermediate
densities. Also, although the MMA algorithm was removing material from the stress concentra-
tion area, further research should be performed to find appropriate tolerance parameters.

9.5. Bonded Support: Compliance Minimization Results


The application of the compliance-minimization problem statement to the bonded
support allows the removal of material in the central region, leaving material in the connec-
tion between the adhesive joint and the elements sustaining the external loads and in the
lower surface of the design domain. To improve the readability and comprehension of the
geometry obtained, Figure 7 only displays the elements where ρ = 1.0. The results herein
shown also included the deformations installed in the topology-optimized design and the
complete geometry obtained by mirroring the initial model along the XY and YZ planes.
Appl. Sci. 2023, 13, 12916 34 of 39

10. Conclusions
This paper addressed the difficulties of applying novel topology optimization methods
in the industry, where the black-box system common to most commercial software limits
the access to relevant information. Therefore, a new open methodology for solving non-
self-adjoint topology optimization problems in ABAQUS® was presented.
The functioning of this method was validated through two procedures: first, by
comparing the results of the sensitivity analysis with finite differences, which indicated
a good correlation between both; then, by solving two benchmark problems with the
following algorithms: Optimality Criteria, Method of Moving Asymptotes, Sequential
Least-Squares Quadratic Programming, and Trust-constr algorithm. The results obtained,
convergence, and influence of the problem statement chosen were in agreement with other
state-of-the-art results. In the stress-minimization case study, having access to optimization
algorithms unavailable in commercial software allowed the methodology herein presented
a maximum stress reduction of 35% when compared to the solution obtained in ABAQUS® .
An implementation of this method is provided in Python, working in conjunction
with ABAQUS® , in order to allow a direct application to new problems. The code imple-
mentation, as well as the ABAQUS® models necessary to recreate the work reported in
this paper are available as Supplementary Material and can also be downloaded in digital
format from the following Dataset [94] or repository: https://github.com/pnfernandes/
Python-Code-for-Stress-Constrained-Topology-Optimization-in-ABAQUS.
Therefore, this article promotes the advance of the state-of-the-art by providing the tools
required to solve stress-dependent geometrically complex problems, as well as a modular
path that opens the possibility of implementing novel methods in an industrial environment.

Supplementary Materials: The following supporting information can be downloaded at: https:
//www.mdpi.com/article/10.3390/app132312916/s1 and Dataset [94] or repository: https://github.
com/pnfernandes/Python-Code-for-Stress-Constrained-Topology-Optimization-in-ABAQUS. The
Python code implementation, the ABAQUS® numerical models, and the complete raw data used in
this work.
Author Contributions: Conceptualization, P.F. and A.F.; methodology, A.F.; software, P.F. and M.P.;
validation, P.F. and A.F.; formal analysis, P.F., A.F. and P.G.; investigation, P.F.; resources, N.C.;
data curation, P.F.; writing—original draft preparation, P.F.; writing—review and editing, A.F.;
visualization, P.F.; supervision, A.F., R.P. and N.C.; project administration, R.P. and N.C.; funding
acquisition, N.C. All authors have read and agreed to the published version of the manuscript.
Funding: P. Fernandes gratefully acknowledges the financial support from FCT—Fundação para a
Ciência e a Tecnologia, I.P., under the scope of the Ph.D. Grant SFRH/BD/145425/2019. A. Ferrer
gratefully acknowledges the partial support of Serra Húnter Research Program (Spain).
Data Availability Statement: Not applicable.
Conflicts of Interest: The authors declare no conflict of interest.

Abbreviations
The following abbreviations, acronyms, and symbols are used in this manuscript:

2DQ4 A 2D element with four nodes


3D Three-Dimensional
BESO Bi-directional Evolutionary Structural Optimization
C3D8 A 3D Cube element with eight nodes
C3D10 A 3D Cube element with 10 nodes
CPE4 Plane–strain Element with four nodes
CPS4 Plane–stress element with four nodes
FEA Finite-Element Analysis
MDPI Multidisciplinary Digital Publishing Institute
MMA Method of Moving Asymptotes
OC Optimality Criterion
Appl. Sci. 2023, 13, 12916 35 of 39

PEP8 Style Guide for Python Code


S4 Shell element with four nodes
SIMP Solid Isotropic Material with Penalization
SLSQP Sequential Least-Squares Programming
β Stress penalization factor
5s Symmetric gradient
η Numerical damping coefficient
γ Generic vector
C Element stiffness
ψ Lagrange multiplier
ρ Filtered design density
σ Stress
σaV M Amplified von Mises stress
σa Amplified stress
Ba Strain–displacement matrix
Be Optimality condition parameter
E Young’s modulus
Ee Elastic strain energy
Ep Plastic strain energy
Err Pondered error
evol Material constraint evolution ratio
F Force
f Generic load function
g Gradient
H01 (Ω) Space of functions with square integrable derivatives and homogeneous boundary values
J Cost function
K Stiffness
l External load forces
L∞ (Ω) Space of bounded functions
m Mass
M von Mises matrix
N Linear shape function
n Normal direction pointing outwards of the boundary ∂Ω of v
Ω Domain of the topology optimization problem
P SIMP penalty factor
QF Final p-norm approximation factor
Qi Initial p-norm approximation factor
rmax Maximum filter search radius
t Applied boundary forces
u Displacement
v Poisson’s coefficient
V Volume
V∗ Maximum allowable volume
x Design density variable

References
1. Bendsøe, M.P.; Kikuchi, N. Generating optimal topologies in structural design using a homogenization method. Comput. Methods
Appl. Mech. Eng. 1988, 71, 197–224. [CrossRef]
2. Alderliesten, R.C. Designing for damage tolerance in aerospace: A hybrid material technology. Mater. Des. 2015, 66, 421–428.
[CrossRef]
3. Meng, L.; Zhang, W.; Quan, D.; Shi, G.; Tang, L.; Hou, Y.; Breitkopf, P.; Zhu, J.; Gao, T. From Topology Optimization Design to
Additive Manufacturing: Today’s Success and Tomorrow’s Roadmap. Arch. Comput. Methods Eng. 2020, 27, 805–830. [CrossRef]
4. Zhang, W.; Yang, J.; Xu, Y.; Gao, T. Topology optimization of thermoelastic structures: Mean compliance minimization or elastic
strain energy minimization. Struct. Multidiscip. Optim. 2014, 49, 417–429. [CrossRef]
5. Wang, C.; Zhao, Z.; Zhou, M.; Sigmund, O.; Zhang, X.S. A comprehensive review of educational articles on structural and
multidisciplinary optimization. Struct. Multidiscip. Optim. 2021, 64, 2827–2880. [CrossRef]
6. Sigmund, O. A 99 line topology optimization code written in matlab. Struct. Multidiscip. Optim. 2001, 21, 120–127. [CrossRef]
Appl. Sci. 2023, 13, 12916 36 of 39

7. Andreassen, E.; Clausen, A.; Schevenels, M.; Lazarov, B.S.; Sigmund, O. Efficient topology optimization in MATLAB using
88 lines of code. Struct. Multidiscip. Optim. 2011, 43, 1–16. [CrossRef]
8. Liu, K.; Tovar, A. An efficient 3D topology optimization code written in Matlab. Struct. Multidiscip. Optim. 2014, 50, 1175–1196.
[CrossRef]
9. Bendsøe, M.P. Optimal shape design as a material distribution problem. Struct. Optim. 1989, 1, 193–202. [CrossRef]
10. Zhou, M.; Rozvany, G.I. The COC algorithm, Part II: Topological, geometrical and generalized shape optimization. Comput.
Methods Appl. Mech. Eng. 1991, 89, 309–336. [CrossRef]
11. Rozvany, G.I.N.; Sobieszczanski-Sobieski, J. New optimality criteria methods: Forcing uniqueness of the adjoint strains by
corner-rounding at constraint intersections. Struct. Optim. 1992, 4, 244–246. [CrossRef]
12. Osher, S.; Sethian, J.A. Fronts propagating with curvature-dependent speed: Algorithms based on Hamilton-Jacobi formulations.
J. Comput. Phys. 1988, 79, 12–49. [CrossRef]
13. Wang, M.Y.; Wang, X.; Guo, D. A level set method for structural topology optimization. Comput. Methods Appl. Mech. Eng. 2003,
192, 227–246. [CrossRef]
14. Challis, V.J. A discrete level-set topology optimization code written in Matlab. Struct. Multidiscip. Optim. 2010, 41, 453–464.
[CrossRef]
15. Young, V.; Querin, O.M.; Steven, G.P.; Xie, Y.M. 3D and multiple load case bi-directional evolutionary structural optimization
(BESO). Struct. Optim. 1999, 18, 183–192. [CrossRef]
16. Huang, X.; Xie, Y.M. A further review of ESO type methods for topology optimization. Struct. Multidiscip. Optim. 2010,
41, 671–683. [CrossRef]
17. Zuo, Z.H.; Xie, Y.M. A simple and compact Python code for complex 3D topology optimization. Adv. Eng. Softw. 2015, 85, 1–11.
[CrossRef]
18. Sigmund, O. On the usefulness of non-gradient approaches in topology optimization. Struct. Multidiscip. Optim. 2011, 43, 589–596.
[CrossRef]
19. Zhu, B.; Zhang, X.; Zhang, H.; Liang, J.; Zang, H.; Li, H.; Wang, R. Design of compliant mechanisms using continuum topology
optimization: A review. Mech. Mach. Theory 2020, 143, 103622. [CrossRef]
20. Sigmund, O.; Maute, K. Topology optimization approaches: A comparative review. Struct. Multidiscip. Optim. 2013, 48, 1031–1055.
[CrossRef]
21. Harzheim, L.; Graf, G. A review of optimization of cast parts using topology optimization: II-Topology optimization with
manufacturing constraints. Struct. Multidiscip. Optim. 2006, 31, 388–399. [CrossRef]
22. Suresh, K. A 199-line Matlab code for Pareto-optimal tracing in topology optimization. Struct. Multidiscip. Optim. 2010,
42, 665–679. [CrossRef]
23. Talischi, C.; Paulino, G.H.; Pereira, A.; Menezes, I.F.M. PolyTop: A Matlab implementation of a general topology optimization
framework using unstructured polygonal finite element meshes. Struct. Multidiscip. Optim. 2012, 45, 329–357. [CrossRef]
24. Smith, H.; Norato, J.A. A MATLAB code for topology optimization using the geometry projection method. Struct. Multidiscip.
Optim. 2020, 62, 1579–1594. [CrossRef]
25. Sanders, E.D.; Pereira, A.; Aguiló, M.A.; Paulino, G.H. PolyMat: An efficient Matlab code for multi-material topology optimization.
Struct. Multidiscip. Optim. 2018, 58, 2727–2759. [CrossRef]
26. Otomori, M.; Yamada, T.; Izui, K.; Nishiwaki, S. Matlab code for a level set-based topology optimization method using a reaction
diffusion equation. Struct. Multidiscip. Optim. 2015, 51, 1159–1172. [CrossRef]
27. Gao, J.; Luo, Z.; Xia, L.; Gao, L. Concurrent topology optimization of multiscale composite structures in Matlab. Struct. Multidiscip.
Optim. 2019, 60, 2621–2651. [CrossRef]
28. Xia, L.; Breitkopf, P. Design of materials using topology optimization and energy-based homogenization approach in Matlab.
Struct. Multidiscip. Optim. 2015, 52, 1229–1241. [CrossRef]
29. Aage, N.; Andreassen, E.; Lazarov, B.S. Topology optimization using PETSc: An easy-to-use, fully parallel, open source topology
optimization framework. Struct. Multidiscip. Optim. 2015, 51, 565–572. [CrossRef]
30. Liang, Y.; Cheng, G. Further elaborations on topology optimization via sequential integer programming and Canonical relaxation
algorithm and 128-line MATLAB code. Struct. Multidiscip. Optim. 2020, 61, 411–431. [CrossRef]
31. Picelli, R.; Sivapuram, R.; Xie, Y.M. A 101-line MATLAB code for topology optimization using binary variables and integer
programming. Struct. Multidiscip. Optim. 2021, 63, 935–954. [CrossRef]
32. Ferrari, F.; Sigmund, O. A new generation 99 line Matlab code for compliance topology optimization and its extension to 3D.
Struct. Multidiscip. Optim. 2020, 62, 2211–2228. [CrossRef]
33. Du, Z.; Cui, T.; Liu, C.; Zhang, W.; Guo, Y.; Guo, X. An efficient and easy-to-extend Matlab code of the Moving Morphable
Component (MMC) method for three-dimensional topology optimization. Struct. Multidiscip. Optim. 2022, 65, 158. [CrossRef]
34. Chen, Q.; Zhang, X.; Zhu, B. A 213-line topology optimization code for geometrically nonlinear structures. Struct. Multidiscip.
Optim. 2019, 59, 1863–1879. [CrossRef]
35. Sotiropoulos, S.; Kazakis, G.; Lagaros, N.D. Conceptual design of structural systems based on topology optimization and
prefabricated components. Comput. Struct. 2020, 226, 106136. [CrossRef]
36. Giraldo-Londoño, O.; Paulino, G.H. PolyStress: A Matlab implementation for local stress-constrained topology optimization
using the augmented Lagrangian method. Struct. Multidiscip. Optim. 2021, 63, 2065–2097. [CrossRef]
Appl. Sci. 2023, 13, 12916 37 of 39

37. Yang, D.; Liu, H.; Zhang, W.; Li, S. Stress-constrained topology optimization based on maximum stress measures. Comput. Struct.
2018, 198, 23–39. [CrossRef]
38. Bruggi, M.; Venini, P. A mixed FEM approach to stress-constrained topology optimization. Int. J. Numer. Methods Eng. 2008,
73, 1693–1714. [CrossRef]
39. Lee, E.; James, K.A.; Martins, J.R.R.A. Stress-constrained topology optimization with design-dependent loading. Struct.
Multidiscip. Optim. 2012, 46, 647–661. [CrossRef]
40. Cai, S.; Zhang, W. Stress-constrained topology optimization with free-form design domains. Comput. Methods Appl. Mech. Eng.
2015, 289, 267–290. [CrossRef]
41. Salazar de Troya, M.A.; Tortorelli, D.A. Adaptive mesh refinement in stress-constrained topology optimization. Struct. Multidiscip.
Optim. 2018, 58, 2369–2386. [CrossRef]
42. Suresh, K.; Takalloozadeh, M. Stress-constrained topology optimization: A topological level-set approach. Struct. Multidiscip.
Optim. 2013, 48, 295–309. [CrossRef]
43. Chu, S.; Gao, L.; Xiao, M.; Luo, Z.; Li, H.; Gui, X. A new method based on adaptive volume constraint and stress penalty for
stress-constrained topology optimization. Struct. Multidiscip. Optim. 2018, 57, 1163–1185. [CrossRef]
44. Oh, M.K.; Lee, D.S.; Yoo, J. Stress-constrained topology optimization simultaneously considering the uncertainty of load positions.
Int. J. Numer. Methods Eng. 2022, 123, 339–365. [CrossRef]
45. Luo, Y.; Wang, M.Y.; Kang, Z. An enhanced aggregation method for topology optimization with local stress constraints. Comput.
Methods Appl. Mech. Eng. 2013, 254, 31–41. [CrossRef]
46. Biyikli, E.; To, A.C. Proportional topology optimization: A new non-sensitivity method for solving stress-constrained and
minimum compliance problems and its implementation in MATLAB. PLoS ONE 2015, 10, e0145041. [CrossRef] [PubMed]
47. Amir, O. Efficient stress-constrained topology optimization using inexact design sensitivities. Int. J. Numer. Methods Eng. 2021,
122, 3241–3272. [CrossRef]
48. Paris, J.; Navarrina, F.; Colominas, I.; Casteleiro, M. Stress constraints sensitivity analysis in structural topology optimization.
Comput. Methods Appl. Mech. Eng. 2010, 199, 2110–2122. [CrossRef]
49. Holmberg, E.; Torstenfelt, B.; Klarbring, A. Global and clustered approaches for stress-constrained topology optimization and
deactivation of design variables. In Proceedings of the 10th World Congress on Structural and Multidisciplinary Optimization,
Orlando, FL, USA, 19–24 May 2013; pp. 1–10.
50. Norato, J.A.; Smith, H.A.; Deaton, J.D.; Kolonay, R.M. A maximum-rectifier-function approach to stress-constrained topology
optimization. Struct. Multidiscip. Optim. 2022, 65, 286. [CrossRef]
51. Burger, M.; Stainko, R. Phase-field relaxation of topology optimization with local stress constraints. SIAM J. Control Optim. 2006,
45, 1447–1466. [CrossRef]
52. De Leon, D.M.; Alexandersen, J.; O. Fonseca, J.S.; Sigmund, O. Stress-constrained topology optimization for compliant mechanism
design. Struct. Multidiscip. Optim. 2015, 52, 929–943. [CrossRef]
53. Holmberg, E.; Torstenfelt, B.; Klarbring, A. Stress-constrained topology optimization. Struct. Multidiscip. Optim. 2013, 48, 33–47.
[CrossRef]
54. Pastore, T.; Mercuri, V.; Menna, C.; Asprone, D.; Festa, P.; Auricchio, F. Topology optimization of stress-constrained structural
elements using risk-factor approach. Comput. Struct. 2019, 224, 106104. [CrossRef]
55. Paris, J.; Colominas, I.; Navarrina, F.; Casteleiro, M. Parallel computing in topology optimization of structures with stress
constraints. Comput. Struct. 2013, 125, 62–73. [CrossRef]
56. Deng, S.; Suresh, K. Multi-constrained topology optimization via the topological sensitivity. Struct. Multidiscip. Optim. 2015,
51, 987–1001. [CrossRef]
57. Senhora, F.V.; Giraldo-Londoño, O.; Menezes, I.F.M.; Paulino, G.H. Topology optimization with local stress constraints: A stress
aggregation-free approach. Struct. Multidiscip. Optim. 2020, 62, 1639–1668. [CrossRef]
58. Saadlaoui, Y.; Milan, J.L.; Rossi, J.M.; Chabrand, P. Topology optimization and additive manufacturing: Comparison of conception
methods using industrial codes. J. Manuf. Syst. 2017, 43, 178–186. [CrossRef]
59. Holmberg, E.; Torstenfelt, B.; Klarbring, A. Fatigue constrained topology optimization. Struct. Multidiscip. Optim. 2014,
50, 207–219. [CrossRef]
60. Amir, O.; Lazarov, B.S. Achieving stress-constrained topological design via length scale control. Struct. Multidiscip. Optim. 2018,
58, 2053–2071. [CrossRef]
61. Granlund, G.; Wallin, M.; Tortorelli, D.; Watts, S. Stress-constrained topology optimization of structures subjected to nonpropor-
tional loading. Int. J. Numer. Methods Eng. 2023, 124, 2818–2836. [CrossRef]
62. Amstutz, S.; Novotny, A.A.; de Souza Neto, E.A. Topological derivative-based topology optimization of structures subject to
Drucker–Prager stress constraints. Comput. Methods Appl. Mech. Eng. 2012, 233, 123–136. [CrossRef]
63. Cheng, L.; Bai, J.; To, A.C. Functionally graded lattice structure topology optimization for the design of additive manufactured
components with stress constraints. Comput. Methods Appl. Mech. Eng. 2019, 344, 334–359. [CrossRef]
64. Deng, H.; Vulimiri, P.S.; To, A.C. An efficient 146-line 3D sensitivity analysis code of stress-based topology optimization written
in MATLAB. Optim. Eng. 2021, 23, 1733–1757. [CrossRef]
65. Mirzendehdel, A.M.; Suresh, K. Support structure constrained topology optimization for additive manufacturing. Comput.-Aided
Des. 2016, 81, 1–13. [CrossRef]
Appl. Sci. 2023, 13, 12916 38 of 39

66. Collet, M.; Bruggi, M.; Duysinx, P. Topology optimization for minimum weight with compliance and simplified nominal stress
constraints for fatigue resistance. Struct. Multidiscip. Optim. 2017, 55, 839–855. [CrossRef]
67. Bruggi, M.; Duysinx, P. Topology optimization for minimum weight with compliance and stress constraints. Struct. Multidiscip.
Optim. 2012, 46, 369–384. [CrossRef]
68. Giraldo-Londoño, O.; Aguiló, M.A.; Paulino, G.H. Local stress constraints in topology optimization of structures subjected to
arbitrary dynamic loads: A stress aggregation-free approach. Struct. Multidiscip. Optim. 2021, 64, 3287–3309. [CrossRef]
69. París, J.; Navarrina, F.; Colominas, I.; Casteleiro, M. Topology optimization of continuum structures with local and global stress
constraints. Struct. Multidiscip. Optim. 2009, 39, 419–437. [CrossRef]
70. Long, K.; Wang, X.; Liu, H. Stress-constrained topology optimization of continuum structures subjected to harmonic force
excitation using sequential quadratic programming. Struct. Multidiscip. Optim. 2019, 59, 1747–1759. [CrossRef]
71. Duysinx, P. Topology optimization with different stress limit in tension and compression. In Proceedings of the Third World
Congress of Structural and Multidisciplinary Optimization (WCSMO3), Buffalo, NY, USA, 17–21 May 1999.
72. da Silva, A.L.F.; Salas, R.A.; Nelli Silva, E.C.; Reddy, J.N. Topology optimization of fibers orientation in hyperelastic composite
material. Compos. Struct. 2020, 231, 111488. [CrossRef]
73. Miyajima, K.; Noguchi, Y.; Yamada, T. Optimal design of compliant displacement magnification mechanisms using stress-
constrained topology optimization based on effective energy. Finite Elem. Anal. Des. 2023, 216, 103892. [CrossRef]
74. Emmendoerfer Jr, H.; Fancello, E.A.; Silva, E.C.N. Stress-constrained level set topology optimization for compliant mechanisms.
Comput. Methods Appl. Mech. Eng. 2020, 362, 112777. [CrossRef]
75. Bendsoe, M.P.; Sigmund, O. Topology Optimization: Theory, Methods, and Applications; Springer Science & Business Media:
Berlin/Heidelberg, Germany, 2003.
76. Bakhtiary, N.; Allinger, P.; Friedrich, M.; Mulfinger, F.; Sauter, J.; Müller, O.; Puchinger, M. A new approach for sizing, shape and
topology optimization. SAE Trans. 1996, 105, 745–761.
77. Mlejnek, H.P. Some aspects of the genesis of structures. Struct. Optim. 1992, 5, 64–69. [CrossRef]
78. Stolpe, M.; Svanberg, K. An alternative interpolation scheme for minimum compliance topology optimization. Struct. Multidiscip.
Optim. 2001, 22, 116–124. [CrossRef]
79. Pedersen, C.B.W.; Allinger, P. Industrial implementation and applications of topology optimization and future needs. In
IUTAM Symposium on Topological Design Optimization of Structures, Machines and Materials: Status and Perspectives; Springer:
Berlin/Heidelberg, Germany, 2006; pp. 229–238.
80. Bendsøe, M.P.; Sigmund, O. Material interpolation schemes in topology optimization. Arch. Appl. Mech. 1999, 69, 635–654.
[CrossRef]
81. Clausen, P.M.; Pedersen, C.B.W. Non-parametric large scale structural optimization for industrial applications. In III Euro-
pean Conference on Computational Mechanics: Solids, Structures and Coupled Problems in Engineering: Book of Abstracts; Springer:
Berlin/Heidelberg, Germany, 2006; p. 482.
82. Svanberg, K. The method of moving asymptotes—a new method for structural optimization. Int. J. Numer. Methods Eng. 1987,
24, 359–373. [CrossRef]
83. Kabus, S.; Pedersen, C.B.W. Optimal bearing housing designing using topology optimization. J. Tribol. 2012, 134, 021102.
[CrossRef]
84. Søndergaard, M.B.; Pedersen, C.B.W. Applied topology optimization of vibro-acoustic hearing instrument models. J. Sound Vib.
2014, 333, 683–692. [CrossRef]
85. Hansen, L.V. Topology optimization of free vibrations of fiber laser packages. Struct. Multidiscip. Optim. 2005, 29, 341–348.
[CrossRef]
86. Olhoff, N.; Du, J. Topology optimization of vibrating bi-material structures with respect to sound radiation. In IUTAM Symposium
on Topological Design Optimization of Structures, Machines and Materials: Status and Perspectives; Springer: Berlin/Heidelberg,
Germany, 2006; pp. 43–52.
87. JOG, C.S. Topology design of structures subjected to periodic loading. J. Sound Vib. 2002, 253, 687–709. [CrossRef]
88. Sigmund, O.; Søndergaard Jensen, J. Systematic design of phononic band–gap materials and structures by topology optimization.
Philos. Trans. R. Soc. London. Ser. A Math. Phys. Eng. Sci. 2003, 361, 1001–1019. [CrossRef]
89. Tcherniak, D. Topology optimization of resonating structures using SIMP method. Int. J. Numer. Methods Eng. 2002, 54, 1605–1622.
[CrossRef]
90. Guo, L.; Wang, X.; Meng, Z.; Yu, B. Reliability-based topology optimization of continuum structure under buckling and
compliance constraints. Int. J. Numer. Methods Eng. 2022, 123, 4032–4053. [CrossRef]
91. Meng, Z.; Pang, Y.; Pu, Y.; Wang, X. New hybrid reliability-based topology optimization method combining fuzzy and probabilistic
models for handling epistemic and aleatory uncertainties. Comput. Methods Appl. Mech. Eng. 2020, 363, 112886. [CrossRef]
92. Meng, Z.; Keshtegar, B. Adaptive conjugate single-loop method for efficient reliability-based design and topology optimization.
Comput. Methods Appl. Mech. Eng. 2019, 344, 95–119. [CrossRef]
93. Meng, Z.; Wu, Y.; Wang, X.; Ren, S.; Yu, B. Robust topology optimization methodology for continuum structures under
probabilistic and fuzzy uncertainties. Int. J. Numer. Methods Eng. 2021, 122, 2095–2111. [CrossRef]
94. Fernandes, P.; Ferrer, A.; Teixeira, P.; Parente, M.; Pinto, R.; Correia, N. Python Code for Stress Constrained Topology Optimization
in ABAQUS. 2023. [CrossRef]
Appl. Sci. 2023, 13, 12916 39 of 39

95. Bruggi, M. On an alternative approach to stress constraints relaxation in topology optimization. Struct. Multidiscip. Optim. 2008,
36, 125–141. [CrossRef]
96. Le, C.; Norato, J.; Bruns, T.; Ha, C.; Tortorelli, D. Stress-based topology optimization for continua. Struct. Multidiscip. Optim. 2010,
41, 605–620. [CrossRef]
97. Yang, L.; Lavrinenko, A.V.; Hvam, J.M.; Sigmund, O. Design of one-dimensional optical pulse-shaping filters by time-domain
topology optimization. Appl. Phys. Lett. 2009, 95, 261101. [CrossRef]
98. Huang, X.; Xie, Y.M. Bi-directional evolutionary topology optimization of continuum structures with one or multiple materials.
Comput. Mech. 2009, 43, 393–401. [CrossRef]
99. Bendsøe, M.P. Optimization of Structural Topology, Shape, and Material; Springer: Berlin/Heidelberg, Germany, 1995. [CrossRef]
100. Ferraro, S. Topology Optimization and Failure Analysis of Deployable Thin Shells with Cutouts; California Institute of Technology:
Pasadena, CA, USA, 2020.
101. Sigmund, O.; Petersson, J. Numerical instabilities in topology optimization: A survey on procedures dealing with checkerboards,
mesh-dependencies and local minima. Struct. Optim. 1998, 16, 68–75. [CrossRef]
102. Huang, X.; Xie, Y.M. Convergent and mesh-independent solutions for the bi-directional evolutionary structural optimization
method. Finite Elem. Anal. Des. 2007, 43, 1039–1049. [CrossRef]
103. Wang, F.; Lazarov, B.S.; Sigmund, O. On projection methods, convergence and robust formulations in topology optimization.
Struct. Multidiscip. Optim. 2011, 43, 767–784. [CrossRef]
104. Svanberg, K. Algorithm for Optimum Structural Design Using Duality. In Mathematical Programming Study; Number 20; Springer:
Berlin/Heidelberg, Germany, 1982; pp. 161–177. [CrossRef]
105. Fleury, C. Structural weight optimization by dual methods of convex programming. Int. J. Numer. Methods Eng. 1979,
14, 1761–1783. [CrossRef]
106. Deetman, A. GCMMA-MMA-Python Home Page. Available online: https://github.com/arjendeetman/GCMMA-MMA-Python
(accessed on 26 October 2023).
107. Svanberg, K. MMA and GCMMA Matlab Code Home Page. Available online: https://www.smoptit.se/ (accessed on
1 December 2023).
108. Virtanen, P.; Gommers, R.; Oliphant, T.; Haberland, M.; Reddy, T.; Cournapeau, D. SciPy 1.2.1: Fundamental Algorithms for
Scientific Computing in Python. Nat. Methods 2020, 17, 261–272. [CrossRef] [PubMed]
109. Nocedal, J.; Wright, S.J. Numerical Optimization; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2006; pp. 1–664.
[CrossRef]
110. Byrd, R.H.; Hribar, M.E.; Nocedal, J. An interior point algorithm for large-scale nonlinear programming. SIAM J. Optim. 1999,
9, 877–900. [CrossRef]
111. development team van Rossum, P. The Python Language Reference Release 3.6.0; Network Theory Ltd.: Godalming, UK, 2017.
112. Buhl, T.; Pedersen, C.B.; Sigmund, O. Stiffness design of geometrically nonlinear structures using topology optimization. Struct.
Multidiscip. Optim. 2000, 19, 93–104. [CrossRef]
113. Duysinx, P.; Sigmund, O. New developments in handling stress constraints in optimal material distribution. In Proceedings
of the 7th AIAA/USAF/NASA/ISSMO Symposium on Multidisciplinary Analysis and Optimization, St. Louis, MO, USA,
2–4 September 1998; pp. 1501–1509. [CrossRef]
114. Bendsøe, M.P.; Díaz, A.R. A method for treating damage related criteria in optimal topology design of continuum structures.
Struct. Optim. 1998, 16, 108–115. [CrossRef]

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual
author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to
people or property resulting from any ideas, methods, instructions or products referred to in the content.

You might also like