This section outlines the methods utilized to construct the aforementioned Bezier defined components. In Sects. 3.1 and 3.2, Bezier spine components will be considered, followed by Bezier width components, Sect. 3.3. Building on these, a generalized formula will be suggested, Sect. 3.4. The overall MMC framework and optimization strategy follow the well-documented approach of Guo et al. (2014), and Zhang et al. (2016). More emphasis will be placed on the differentiability of the modeling strategies, as required for the sensitivity analysis, Sect. 3.5.
Geometry projection techniques for representation of structural Bezier controlled components
The original TDF proposed by Guo et al. (2014) for a 2D problem is
$$\phi \left({\varvec{x}};m\right)=1-\left(\frac{{\cos}\left(\theta \right)\left(x-{{x}_{0}}\right)+{\sin}\left(\theta \right)\left(y-{{y}_{0}}\right)}{\frac{L}{2}}\right)^{m}-\left(\frac{-{\sin}\left(\theta \right)\left(x-{x}_{0}\right)+{\cos}\left(\theta \right)\left(y-{y}_{0}\right)}{\frac{w}{2}}\right)^{m},$$
(1)
where \(\left({\varvec{x}}\right)=\left(x,y\right)\) is the mesh node coordinates, (\({x}_{0},{y}_{0})\) specifies the component midpoint, \(L\) the length, \(w\) the width, and \(\theta\) the angular orientation. A penalty parameter, \(m,\) is used to increase the sharpness of the component boundary, set at 6. It was used in conjunction with a level set function
$$\left\{\begin{array}{ll}\phi \left({\varvec{x}}\right)>0, & \quad \text{if}\; x\in \Omega ,\\ \phi \left({\varvec{x}}\right)=0, & \quad \text{if}\; x\in \partial \Omega ,\\ \phi \left({\varvec{x}}\right)<0, & \quad \text{if}\; x\in D\backslash (\Omega \cup \partial \Omega )\end{array}\right.$$
(2)
to determine the region of the global design space, \(D\), occupied by a structural component, Ω. \(\partial\Omega\) indicates the boundary of the component. A maximum operator is used to combine multiple components. For \(N\) structural components, \({\phi }^{s}\left({\varvec{x}}\right)=\mathrm{max}({\phi }_{1}\left({\varvec{x}}\right),\dots ,{\phi }_{N}\left({\varvec{x}}\right)),\) where \(s\) denotes the aggregated representation of all components. The final structure is represented as
$$\left\{\begin{array}{ll}{\phi }^{s}\left({\varvec{x}}\right)>0, & \quad \text{if}\; x\in {\Omega }^{\mathrm{s}},\\ {\phi }^{s}\left({\varvec{x}}\right)=0, & \quad \text{if}\; x\in \partial {\Omega }^{\mathrm{s}},\\ {\phi }^{s}\left({\varvec{x}}\right)<0, & \quad \text{if}\; x\in D\backslash ({\Omega }^{\mathrm{s}}\cup \partial {\Omega }^{\mathrm{s}}).\end{array}\right.$$
(3)
The level set formulation is represented graphically for a single component in Fig. 1.
The TDF of (1) is equivalent to modeling linear components of fixed width, \(w\), between two control points, \(\left({p}_{0},{q}_{0}\right)\) and \(\left({p}_{1},{q}_{1}\right)\). A corresponding formulation for the TDF is
$$\phi \left({\varvec{x}};m\right)= 1-\left(\frac{\left(\frac{{p}_{1}-{p}_{0}}{L}\right)\left(x-\frac{{p}_{0}}{2}-\frac{{p}_{1}}{2}\right)+\left(\frac{{q}_{1}-{q}_{0}}{L}\right)\left(y-\frac{{q}_{0}}{2}-\frac{{q}_{1}}{2}\right)}{\frac{L}{2}}\right)^{m}-\left(\frac{\left(\frac{{q}_{0}-{q}_{1}}{L}\right)\left(x-\frac{{p}_{0}}{2}-\frac{{p}_{1}}{2}\right)+\left(\frac{{p}_{1}-{p}_{0}}{L}\right)\left(y-\frac{{q}_{0}}{2}-\frac{{q}_{1}}{2}\right)}{\frac{w}{2}}\right)^{m},$$
(4)
where
$$L={\left({\left({p}_{1}-{p}_{0}\right)}^{2}+{\left({q}_{1}-{q}_{0}\right)}^{2}\right)}^\frac{1}{2}.$$
(5)
Bezier spine components
The TDF of Eq. 4 can be modified to represent components of fixed width, \(w\), that follow a Bezier spine curve (Fig. 2). Bezier curves are parametric with the form \({\varvec{C}}\left(t\right)=(x\left(t\right),y\left(t\right))\), expressed as a function of the parameter \(t\in [\mathrm{0,1}]\). Each mesh node can be projected onto the Bezier curve at a point \(({x}_{{t}^{\ast}},{y}_{{t}^{\ast}})\), by a vector that is perpendicular to the curve, \({\varvec{n}}(t)\). This was achieved by solving the dot product of the projection vector with the tangent vector to the curve, \({\varvec{C}}^{\prime}\left(t\right)\). When perpendicular, the dot product will equal zero. The length of the perpendicular projection vector and the corresponding value of the intersection point, \({t}^{\ast}\), was used to construct a representation of the component as
$$\phi\left({\varvec{n}}\left({{\varvec{t}}}^{\ast}\left({\varvec{x}}\right)\right),{{\varvec{t}}}^{\ast}\left({\varvec{x}}\right);{m}_{1},{m}_{2}\right)=\mathrm{max}\left(1-\left(\frac{\Vert {\varvec{n}}({{\varvec{t}}}^{\ast}({\varvec{x}}))\Vert}{\frac{w}{2}}\right)^{{m}_{1}}-\left(1-{{\varvec{t}}}^{\ast}({\varvec{x}})+{\varvec{t}}^{\ast}({\varvec{x}})^{2}\right)^{{m}_{2}}\right),$$
(6)
where \({m}_{1}\) and \({m}_{2}\) are independent penalty parameters.
The max operator is required as any given mesh node may be perpendicularly projected onto the Bezier curve at more than one intersection point. This selects the intersection point that is closest to the center of the component. While being valid for a Bezier curve of degree \(d\), the derivation will be demonstrated on a curve of degree two, with three control points. The general expression for a Bezier curve is given as
$${\varvec{C}}\left(t\right)=\sum_{i=0}^{d}{{\varvec{b}}}_{i}{B}_{i,d}(t),$$
(7)
where \({{\varvec{b}}}_{i}\) is the ith control point, and \({B}_{i.d}\left(t\right)\) is a polynomial of the form
$${B}_{i.d}\left(t\right)=\frac{d!}{\left(d-i\right)!i!}{\left(1-t\right)}^{d-i}{t}^{i}.$$
(8)
For a curve of degree two, this equates to
$$x\left(t\right)={\left(1-t\right)}^{2}{p}_{0}+2\left(1-t\right)t{p}_{1}+{t}^{2}{p}_{2}$$
(9)
$$y\left(t\right)={\left(1-t\right)}^{2}{q}_{0}+2\left(1-t\right)t{q}_{1}+{t}^{2}{q}_{2}$$
(10)
where the three control points are, \({{\varvec{b}}}_{0}{(p}_{0},{q}_{0}),{{\varvec{b}}}_{1}{(p}_{1},{q}_{1}),\) and \({{\varvec{b}}}_{2}{(p}_{2},{q}_{2}).\)
The projection vector of a mesh node, \({(x}_{A},{y}_{A}),\) onto the Bezier spine is expressed as
$${\varvec{n}}({t}^{\ast})=({n}_{x}({t}^{\ast}),{n}_{y}({t}^{\ast}))=({x}_{t}({t}^{\ast})-{x}_{A},{y}_{t}({t}^{\ast})-{y}_{A})$$
(11)
where \({t}^{\ast}\) is the intersection point, and
$${n}_{x}({t}^{\ast})=\left({p}_{0}-2{p}_{1}+{p}_{2}\right){{t}^{\ast}}^{2}+\left(-2{p}_{0}+2{p}_{1}\right){t}^{\ast}+{p}_{0}-{x}_{A}$$
(12)
$${n}_{y}\left({t}^{\ast}\right)=\left({q}_{0}-2{q}_{1}+{q}_{2}\right){{t}^{\ast}}^{2}+\left(-2{q}_{0}+2{q}_{1}\right){t}^{\ast}+{q}_{0}-{y}_{A}$$
(13)
The tangent vector at the intersection point is expressed as \({\varvec{C}}^{\prime}\left({t}^{\ast}\right)=(x^{\prime}\left({t}^{\ast}\right),y^{\prime}\left({t}^{\ast}\right)),\) where
$$x^{\prime}\left({t}^{\ast}\right)=2\left({p}_{0}-2{p}_{1}+{p}_{2}\right){t}^{\ast}+\left(-2{p}_{0}+2{p}_{1}\right)$$
(14)
$${y}^{^{\prime}\left({t}^{\ast}\right)}=2\left({q}_{0}-2{q}_{1}+{q}_{2}\right){t}^{\ast}+\left(-2{q}_{0}+2{q}_{1}\right).$$
(15)
Solving
$${\varvec{n}}\cdot {{\varvec{C}}}^{\boldsymbol{^{\prime}}}=\begin{array}{c}\left|{\varvec{n}}\right|\left|{{\varvec{C}}}^{\boldsymbol{^{\prime}}}\right|cos\theta ={n}_{x}{x}^{^{\prime}}\left({t}^{\ast}\right)+{n}_{y}{y}^{^{\prime}}\left({t}^{\ast}\right)=0,\quad \text{if}\; \theta =\frac{\pi }{2}\end{array}$$
(16)
gives the intersection points on the Bezier spine. For a Bezier spine of degree d, this generates a polynomial of degree \(2d-1.\) For a Bezier curve of degree two, this results in a cubic polynomial which can be solved using Cardano’s cubic formula (Kurosh 1984). This ensures that the process of geometry projection is entirely algebraic which is an important development from methods using Bezier parameterizations, available in the literature, discussed in Sect. 2. For Bezier curves with a degree greater than two, numerical methods are required to find the roots of the polynomial.
Solutions for \({t}^{\ast}\) can be substituted into (6) to form the representation of the Bezier component on a fixed mesh. A regularized Heaviside function is used to smooth the boundary between solid and void domains, and also control the lower material limit. Several variations are discussed by Wein et al. (2020), and the polynomial form used in this work is
$$H\left(\phi ;\epsilon \right)=\left\{\begin{array}{ll}1, & \quad \text{if}\; \phi >\epsilon ,\\ \left(\frac{3\left(1-\alpha \right)}{4}\right)\left(\frac{\phi }{\epsilon }-\frac{{\phi }^{3}}{3{\epsilon }^{3}}\right)+\frac{1+\alpha }{2}, & \quad \text{if}\;-\epsilon \le \phi \le \epsilon ,\\ \alpha,& \quad \text{otherwise}.\end{array}\right.$$
(17)
where \(\epsilon\) determines the width of the regularization region, set at 0.5, and \(\alpha\) is a lower material limit to ensure the stability of the finite element solution, set at 1e-2 in this work. The significance of applying the regularized Heaviside function to the TDF function values for defining the upper and lower function limits and smoothing the transition region is depicted in Figs. 4 and 5.
The influence of the independent penalty parameters in (6), \({m}_{1}\) and \({m}_{2}\), can be visualized by considering a degree two Bezier curve with control points \({{\varvec{b}}}_{0}(-{500,0})\), \({{\varvec{b}}}_{1}({0,0})\), and \({{\varvec{b}}}_{2}({500,0})\), and a width, \(w\), of 100 mm (Fig. 3). The \(\phi ({\varvec{x}};{m}_{1},{m}_{2})\) and \(H\left(\phi ;\epsilon \right)\) values for one-dimensional cross-section “A–A” is plotted for a range of \({m}_{1}\) values in Fig. 4a and b, respectively. Note the influence of \({m}_{2}\) at this section is negligible, and the value of \(\epsilon\) has remained constant at 0.5. Similarly, \(\phi ({\varvec{x}};{m}_{1},{m}_{2})\) and \(H\left(\phi ;\epsilon \right)\) is plotted for a range of \({m}_{2}\) values at section “B-B”, where the influence of \({m}_{1}\) is negligible (Fig. 5a and b, respectively). Again, the value of \(\epsilon\) has remained constant at 0.5. It will be observed from the horizontal axis in both plots that a greater \({m}_{2}\) penalty is required to ensure the physical width of the transition region at the ends of the component are comparable to the physical width along the component edges. Consequently, \({m}_{1}\) is set at 4 in this work, and \({m}_{2}\) is set at 50. The independent penalty parameters have only been used for component formulations that implement Bezier spines.
The regularized Heaviside function combined with a trapezoidal rule with multiple integration points determines the material fraction, v, for each analysis element as
$${v}^{e}=\frac{{\sum }_{j=1}^{NG}\left({\sum }_{i=1}^{4}\left(H\left({\phi }_{j,i};\epsilon \right)\right) \right)}{4NG},$$
(18)
where \(i\) is the \(i\)th node of the \(j\)th geometry element, and the \(e\)th analysis element consists of \(NG\) geometry elements. In this work 5 integration points have been used which corresponds to 25 geometry elements within each analysis element. The Young’s modulus is calculated as
$${E}^{\rm e}={E}_{0}{\left({v}^{\rm e}\right)}^{\rm P},$$
(19)
where the penalty P is set at 2 in this work, and \({E}_{0}\) is the Young’s modulus of solid material. The total material volume is found as the summation of \({v}^{\rm e}\) over all the elements, \(NE,\) in the design domain. The material fraction distribution for a degree two Bezier curve with control points \({{\varvec{b}}}_{0}({500,200}),{{\varvec{b}}}_{1}({1000,1000}),\) and \({{\varvec{b}}}_{2}(\mathrm{2000,800})\), and a width, w, of 100 mm is depicted in Fig. 6.
Bezier width curves
Here, a formulation is described which utilizes Bezier curves as guide curves to control the width of a component as a function of its length, while assuming a linear spine between two control points. This enables curvature in the outer profile, as depicted in Fig. 7, providing a variable width. Design variables, \({d}_{x},\) are linked to the Bezier control points, \({{\varvec{b}}}_{i}\). These link the first and last control points to the start and end control points of the component spine. Multipliers are applied to the unit normal vector from the component spine, using parameters \({d}_{1}\) and \({d}_{2}\), respectively. The middle control point, \({{\varvec{b}}}_{1}\), is defined by a multiplier on the unit normal vector of the spine and the distance from the start control point, using parameters \({d}_{3}\) and \({d}_{4}\), respectively.
The updated TDF
$$\phi \left({\varvec{x}},w\left(t\right);{m}_{3}\right)= 1-\left(\frac{\left(\frac{{p}_{1}-{p}_{0}}{L}\right)\left(x-\frac{{p}_{0}}{2}-\frac{{p}_{1}}{2}\right)+\left(\frac{{q}_{1}-{q}_{0}}{L}\right)\left(y-\frac{{q}_{0}}{2}-\frac{{q}_{1}}{2}\right)}{\frac{L}{2}}\right)^{{m}_{3}}-\left(\frac{\left(\frac{{q}_{0}-{q}_{1}}{L}\right)\left(x-\frac{{p}_{0}}{2}-\frac{{p}_{1}}{2}\right)+\left(\frac{{p}_{1}-{p}_{0}}{L}\right)\left(y-\frac{{q}_{0}}{2}-\frac{{q}_{1}}{2}\right)}{w(t)}\right)^{{m}_{3}}$$
(20)
is similar to (4) as only two control points are used to model the component spine, however, it enables variation of the width, \(w\), along the length of the component. The penalty parameter, \({m}_{3}\), is set at 4 in this work. Each mesh node, \(\left(x,y\right)\), will have a unique width as a function of the parameter, \(t\), depicted in Fig. 8.
The width is calculated by firstly determining the value of \({t}_{\rm spn}\) where the mesh node projects onto the component spine using (16) and the procedure outlined in Sect. 3.2. A unit normal vector at this point is projected onto the Bezier guide curve to determine the guide curve intersection point, \({t}_{\rm bz}\). The distance between the intersection points \({\varvec{B}}\left({t}_{\rm bz}\right)\) and \({\varvec{C}}\left({t}_{\rm spn}\right)\) is equal to the half width of the component, as given by
$$w\left(t\right)=\Vert {\varvec{B}}\left({t}_{\rm bz}\right)-{\varvec{C}}\left({t}_{\rm spn}\right)\Vert .$$
(21)
Calculating the intersection point on the Bezier guide curve involves finding the solutions of a polynomial equation, hence more than one value for the component width may be found, Fig. 9. The correct solution is selected as that which has the smallest corresponding normalized value, \({{\varvec{t}}}_{b{z}_{n}}\), given by
$${{\varvec{t}}}_{b{z}_{n}}={\left({{\varvec{t}}}_{bz}-0.5\right)}^{2}.$$
(22)
The single intersection point, \({t}_{bz}\), used in (21) is selected from the vector \({{\varvec{t}}}_{bz}\) at the index determined by the index of smallest value in the corresponding normalized vector, \(\mathrm{min}\left({{\varvec{t}}}_{b{z}_{n}}\right).\)
As with the Bezier spine components, Eqs. 17 and 18 can be used to determine the material fraction assigned to each finite element. This is depicted in Fig. 10 for a guide curve with control points \({{\varvec{b}}}_{0}(\mathrm{1000,700})\), \({{\varvec{b}}}_{1}(\mathrm{1100,600})\), and \({{\varvec{b}}}_{2}(\mathrm{2000,600})\). The component spine is a line between points \(\left(\mathrm{1000,500}\right)\) and \((\mathrm{2000,500})\).
Generalized Bezier components
The Bezier spine curve and the Bezier representation of width can be united in a single representation. A Bezier curve is used to model the component spine as in Sect. 3.2, and an additional dimension is included in the control points to model the in-plane width \(w\), i.e. the Bezier curve is \(\left(x,y,w\right)= {\varvec{b}}(t)\). Alternatively, the component spine and component boundary could be modeled by two independent Bezier curves, however, this would require additional computational effort in constructing the geometry representation as intersection points must be calculated for both Bezier curves. The chosen approach introduces a minor restriction on the design freedom, as the width parameters are constrained to the Bezier spine control point positions. However, this minor restriction provides computational savings in constructing the components, as intersection points are only calculated for the spine Bezier curve. The process for constructing the component representation is similar to that in Sect. 3.2, however, the width parameter, \(w\), of Eq. 6 is now a function of the parameter \(t\). This is a trivial calculation using the general Bezier curve formula (7), after having found the intersection point, \({t}^{\ast}\), on the Bezier spine curve. The TDF can be updated as
$$\phi \left({\varvec{n}}\left({{\varvec{t}}}^{\ast}\left({\varvec{x}}\right)\right),{\varvec{w}}\left({{\varvec{t}}}^{\ast}\left({\varvec{x}}\right)\right),{{\varvec{t}}}^{\ast}\left({\varvec{x}}\right);{m}_{1},{m}_{2}\right)=\mathrm{max}\left(1-{\left(\frac{\Vert {\varvec{n}}({{\varvec{t}}}^{\ast}({\varvec{x}}))\Vert }{\frac{{\varvec{w}}({{\varvec{t}}}^{\ast}({\varvec{x}}))}{2}}\right)}^{{m}_{1}}-{\left(1-{{\varvec{t}}}^{\ast}({\varvec{x}})+{{{\varvec{t}}}^{\ast}({\varvec{x}})}^{2}\right)}^{{m}_{2}}\right).$$
(23)
As multiple mesh nodes may be perpendicularly projected onto the Bezier spine curve, the \(\mathrm{max}\) function is required to select the mesh node that is closest to the center of the component.
The modeling flexibility this enables is shown in Fig. 11 for a degree three Bezier curve. The corresponding control points are; \({{\varvec{b}}}_{0}({500,200,300}),{{\varvec{b}}}_{1}({1000,1000},-100),{{\varvec{b}}}_{2}(2500,-{200,400}),\) and, \({{\varvec{b}}}_{3}({2500,800,50}).\) This demonstrates how the small increment in parameters provides the potential for a significantly more complex component compared with the previous representations.
In summary, the theory outlined develops methods for representing structural components defined using explicit control points. The rth structural component is parameterized by a vector of design variables, \({{\varvec{D}}}^{r}\), that can be used directly as optimization variables in the MMC framework. \({{\varvec{D}}}^{r}=\left({{\varvec{b}}}_{0},\ldots ,{{\varvec{b}}}_{d}\right)\), where \(d\) is the degree of the component, and \({{\varvec{b}}}_{i}\) is a vector of variables for the ith control point, \((x,y,w).\) For N structural components, the vector of design variables is given as, \({\varvec{D}}=\left({{\varvec{D}}}^{1},\ldots,{{\varvec{D}}}^{N}\right).\)
Optimization framework and sensitivity calculation
The MATLAB implementation of the MMC framework as provided by Zhang et al. (2016) is used as the basis for this work. Readers are referred to the original work for more details on the particulars of the process. While Zhang et al.’s implementation has an integrated FEA routine, in this work the commercial FEA package MSC Nastran was used. This was used to calculate the design response of interest, and formed part of the calculation of the geometric sensitivities. All other aspects of the framework have been implemented in MATLAB. The Method of Moving Asymptotes (MMA), (Svanberg 1987), was used to solve the optimisation problem. The convergence criterion is defined as a limit on the change in successive values of the objective function, set as 0.005% in this work. This tolerance must be achieved on two successive iterations to confirm convergence. Additionally, the volume constraint must be respected.
The sensitivity of compliance, C, with respect to (wrt) each geometric parameter, a of component r, can be found using a chain rule formula
$$\frac{\partial C}{\partial a} = \sum_{e=1}^{NE}\frac{\partial C}{\partial {E}^{e}}\left(\frac{{E}_{0} }{4NG}\sum_{j=1}^{NG}\left(\sum_{i=1}^{4}P{\left(H\left({\phi }_{j,i}^{r};\epsilon \right)\right)}^{\mathrm{P}-1}\mathrm{min}\left(\frac{\partial H\left({\phi }_{j,i}^{s};\epsilon \right)}{\partial {\phi }_{j,i}^{s}},\frac{\partial H\left({\phi }_{j,i}^{r};\epsilon \right)}{\partial {\phi }_{j,i}^{r}}\right)\frac{\partial {\phi }_{j,i}^{r}}{\partial a}\right)\right),$$
(24)
where \(NE\) is the number of finite elements, and
$$\frac{\partial H\left(\phi ;\epsilon \right)}{\partial \phi }=\left\{\begin{array}{ll}0, &\quad \text{if}\; \phi >\epsilon ,\\ \left(\frac{3\left(1-\alpha \right)}{4}\right)\left(\frac{1}{\epsilon }-\frac{{\phi }^{2}}{{\epsilon }^{3}}\right), &\quad \text{if}\;-\epsilon \le \phi \le \epsilon ,\\ 0, &\quad \text{otherwise}.\end{array}\right.$$
(25)
The sensitivity of compliance wrt a change in material fraction, \(\partial C/\partial {E}^{e}\), is calculated using the SOL200 optimization module in MSC Nastran. The derivative of the TDF wrt \(a\), \(\partial \phi /\partial a\), can be determined analytically for all the formulations given in Eqs. 6, 20, and 23. To demonstrate this, \(\partial \phi /\partial {p}_{0}\) is derived in Appendix 1 for Bezier spine components (6). Equivalent derivatives can be found for all design variables.