{'fraction_non_alphanumeric': 0.025173411732279848, 'fraction_numerical': 0.008544260186503744, 'mean_word_length': 5.051285615010424, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
PHYSICS-CONSISTENT DEEP LEARNING FOR STRUCTURAL TOPOLOGY OPTIMIZATION

Abstract Topology optimization has emerged as a popular approach to refine a component’s design and increasing its performance. However, current state-of-the-art topology optimization frameworks are computein-tensive, mainly due to multiple finite element analysis iterations required to evaluate the component’s performance during the optimization process. Recently, machine learning-based topology optimization methods have been explored by researchers to alleviate this issue. However, previous approaches have mainly been demonstrated on simple two-dimensional applications with low-resolution geometry. Further, current approaches are based on a single machine learning model for end-to-end prediction, which requires a large dataset for training. These challenges make it non-trivial to extend the current approaches to higher resolutions. In this paper, we explore a deep learning-based framework for performing topology optimization for three-dimensional geometries with a reasonably fine (high) resolution. We are able to achieve this by training multiple networks, each trying to learn a different aspect of the overall topology optimization methodology. We demonstrate the application of our framework on both 2D and 3D geometries. The results show that our approach predicts the final optimized design better than current ML-based topology optimization methods.


Introduction
Over the past few decades, there has been an increased emphasis on designing components with optimal performance, especially using topology optimization 14,17 . Topology optimization (a subset of design optimization methods), initially developed by Bendsøe and Kikuchi 3 , refers to a set of numerical design optimization methods developed to find appropriate material distribution in a prescribed design domain to obtain geometric shapes with optimal performances. Here, the performance could be any physical phenomenon such as structural strength (or mechanical design), heat transfer, fluid flow, acoustic properties, electromagnetic properties, optical properties, etc. 24 . The domain refers either to a 2D or 3D mesh representation of the CAD geometry, typically used for finite element analysis. Among the different topology optimization methods, some of the most prominent approaches are (i) solid isotropic material with penalization (SIMP) 2 , (ii) level sets 28 , and (iii) evolutionary optimization 7,29 . These approaches are used for several topological design problems where structural, acoustic, or optical performance need to be optimal 8,24 while removing the material to satisfy a total material(or volume) constraint.
One of the main challenges in performing topology optimization is the high computational cost associated with it. The performance measure that is being optimized needs to be computed after each iteration of the optimization process. These performance measures are usually obtained from physics simulations (often using numerical solution approaches, such as finite element analysis), which are usually computeintensive. Due to this computational challenge, performing topology optimization for a fine (high resolution) topological mesh could take a few hours to even days. This computational challenge has inspired several researchers to develop deep learning-based topology optimization to reduce or eliminate the need for numerical simulations.
Although deep learning has many diverse applications and has demonstrated extraordinary results in several real-world scenarios, our focus in this paper is the recent application of deep learning to learn a system's underlying physics. There has been an increased interest in learning physical phenomena with neural networks in order to reduce the data requirement and achieve better performance with very little or no data 4,9,10,12,15,[18][19][20][21]23,27,31,32 . One method by which this can be achieved is by modifying the loss function We propose a deep learning based topology optimization framework. The input to this framework is the compliance of the initial geometry along with the target volume fraction. Using the DLTO framework, we predict the optimal density of the geometry without any requirement of iterative finite element evaluations. We then convert the predicted optimal density of the geometry and convert it into triangular surface mesh representation using the marching cubes algorithm to give the final optimal design geometry.
to ensure that a set of physical constraints (boundary conditions) are satisfied. This approach has been especially successful in using deep learning to solve partial differential equations such as Burger's equation, Navier-Stokes equation, and Cahn-Hilliard's equation 12,15,19,23,25,31,32 . However, extending such physicsaware deep learning approaches to solve the structural topology optimization is not straightforward.
A physics-consistent deep learning framework for the structural topology optimization need to (i) learn about the underlying physics for computing the compliance, (ii) concurrently learn the topological changes that occur during the optimization process, and (iii) produce results that respect the different geometric constraints and boundary conditions imposed on the domain. To simplify the problem, we first discuss three essential elements that form the backbone of any data-driven approach: (i) the data representation, (ii) training algorithms, and (iii) model representation. For physics-consistent learning, each of these three elements must be consistent with classical structural topology optimization.
The first element is the identification of a physics-consistent representation for structural topology optimization. Structural topology optimization is an iterative process where the design is modified through several iterations until the objective function (the compliance) converges to an optimal value. Further, each element's compliance is used in the sensitivity analysis and updating the element densities at each iteration. Therefore, the element compliance of the optimization process is a valid and more consistent representation of the geometry (compared to the state-of-the-art deep learning approaches). Therefore, in the proposed framework, we use the element compliance as the CAD model representation of the geometry, loading, and boundary conditions (as shown in Figure 1). Note that, unlike the use of strain tensor and displacement tensor as proposed by Zhang et al. 33 , this representation is compact, leading to more natural learning when scaled to higher resolutions.
The next element in the physics-consistent deep learning for structural topology optimization is training and inference pipelines, which need to be consistent with the classical structural topology optimization pipeline. In our experiments, we observe a non-trivial transformation of the densities from the first iteration to the final converged one. Due to this non-trivial transformation, learning the mapping between the initial topology and the final optimized topology is not a trivial one-step learning task. Therefore, we use the intermediate densities obtained during the process of data generation to enhance the performance of our proposed framework along with the initial compliance and target volume fraction as input and the final optimal density as the target.
Finally, a physics-consistent deep learning framework should simultaneously satisfy two constraints for structural topology optimization: the topological constraint of matching the target volume (often prescribed as a volume fraction or percentage of volume removed) and the physical constraint of minimizing the compliance. While computing the volume fraction is trivial, computing the compliance involves performing a finite element analysis. To avoid this computation, we propose developing a surrogate model for learning the mapping of a given intermediate density to its corresponding intermediate compliance.
In summary, we propose two approaches for physics-consistent deep learning framework, namely, the Density Sequence (DS) prediction and the Coupled Density and Compliance Sequence (CDCS) prediction. The first approach uses a sequential prediction model approach to transform the densities without any additional information about the compliance. In the second approach, we add intermediate compliance to train a compliance-predicting surrogate model for improving the results. We compare the proposed approaches with the baseline method of Direct Optimal Density (DOD) prediction. Direct optimal density prediction is an end-to-end learning approach where the final optimal density is directly predicted using just the initial compliance and target volume fraction. The DS prediction involves two convolutional neural networks for obtaining the final prediction. In CDCS prediction, we use three convolutional neural networks iteratively during inference to predict the final optimal density.

Contributions
We develop a physics-consistent, scalable, deep-learning-based framework for both 2D and 3D structural topology optimization. The main contributions of our work include: 1. Developing two novel physics-consistent deep learning based topology optimization algorithms.

2.
A physics-consistent representation for structural topology optimization using the initial compliance of the design and the target volume fraction.
3. Using the intermediate densities and intermediate compliance data from the different optimization iterations obtained while generating the dataset to enhance the performance of our framework.
4. Performance comparison of our proposed methods on both 2D and 3D geometries. We also validate and compare the performance of our approaches with the baseline SIMP-based topology optimization results.
The rest of the paper is arranged as follows. First, we discuss the formulation and related works to this paper in Section 2. Next, we explain the deep learning methods proposed in our paper in Section 3. We cover the details of the data generation process in Section 4, which is used as training data for our proposed approaches. In Section 5, we show the statistical results from our experiments and demonstrate the performance of our proposed methods on both 2D and 3D structural topology optimization. Finally, we conclude this work with some future directions of research in Section 6.

Formulation
Formally, topology optimization is represented as: Here, C(U) refers to the objective function of topology optimization. In the case of structural topology optimization, this is the compliance of the system, where b represents the body forces, u displacements, t surface traction, and Ω and τ are volume and surface representations of solid. The constraint g i (U) includes a volume fraction constraint, Since, this optimization is performed for every element in the mesh, the combinatorial optimization is computationally intractable. Naturally, an alternative solution is to represent the same set of equations above as a function of density ρ for every element.
Minimize: C(ρ, U) Algorithm 1: Traditional topology optimization Input : S, L, BC, V 0 Output: D f in (set of all densities for each element, ρ) Load design; apply loads and boundary conditions Initialize: Assemble global stiffness matrix K for element stiffness matrix k e (ρ e ) Solve for U, using K, loads (L) and boundary conditions (BC) Compute objective function, C = U T KU = ∑ N e=1 ρ p u T k e u Perform sensitivity analysis, ∂c ∂e = −pρ (p−1) u T k e u Update the densities (D i ) using a optimality criterion This design problem is relaxed using solid isotropic material condition with penalization (often called SIMP 2 ), where the stiffness for each element may be described as, E = E min + ρ p (E max − E min ). Here, p is the parameter used for penalizing the element density to be closer to 1.0. A typical SIMP-based topology optimization pipeline is shown in Algorithm 1. While this is a naive implementation, more sophisticated methods for structural topology optimization such as level-set methods 28 and evolutionary optimization methods 7,29 are also popularly employed. Despite several advancements in structural topology optimization, a common challenge in all these approaches is that it requires several iterations of the finite element queries to converge on the final density distribution. Different optimization methods result in different, yet comparable, optimal solutions alluding to the fact that multiple optimal solutions exist for the same topology optimization problem. Deep learning-based methods are a natural fit for accelerating this task, which has been explored in this work.

Deep Learning for Topology Optimization
Several deep learning-based topology optimization frameworks have been proposed recently Banga et al. 1 , Chandrasekhar and Suresh 5 , Nie et al. 16 , Sosnovik and Oseledets 26 , Yu et al. 30 , Zhang et al. 33 . Banga et al. 1 , Sosnovik and Oseledets 26 propose to perform the fine refinement of the design using deep convolutional autoencoders since the fine refinement stage usually requires several finite element iterations during the optimization process. Sosnovik and Oseledets 26 use the densities obtained after five iterations of the SIMP-based structural topology optimization as input to a deep learning network that directly predicts the final density. Banga et al. 1 extend this idea to 3D design geometries, along with an additional input of the boundary conditions, but for a very coarse geometric resolution (12 × 12 × 24). Yu et al. 30 developed a framework that takes the input design, boundary conditions, and the prescribed volume fraction and predicts the final target shape. They also create a generative framework where they generate several optimal designs. However, their research was restricted to only one type of boundary condition. A more generic framework to accommodate all possible boundary conditions using this method would require an impractically large dataset. Therefore, Zhang et al. 33 developed an improved representation of the geometry, loading conditions, and boundary conditions using the strain tensor and displacement tensor as input. They demonstrate this framework using 2D geometries and represent each component of the strain tensor and displacement tensor as a different channel of the 2D image input. Using convolutional neural networks, they predict the final density. While their results are an improvement over earlier methods, this representation is not scalable to 3D. The strain tensor has three more components in addition to the increase in overall data size due to representing the geometry using 3D voxels, leading to several computational challenges. Recently, Chandrasekhar and Suresh 5 propose a topology optimization algorithm using neural networks where the neural network is used for identifying the density for each element at each iteration of the optimization process. This approach produces faster convergence and comparable results with SIMP-based structural topology optimization. However, the main drawback of this approach is that the finite element evaluations are still needed (although lesser than SIMP-based structural topology optimization). To the best knowledge of the authors, very few researchers touch the idea of using compliance and the intermediate densities and compliances for improving the learning of structural topology optimization. Further, most of the efforts in the area has been in 2D representation of geometries and very low resolution 3D representation of geometries. Therefore, a scalable 3D framework for physics-consistent deep learning framework for structural topology optimization is needed.

Physics Consistent Deep Learning
In this section, we first explain the baseline deep learning approach which we use to compare our results against it. We also compare the performance of our proposed approaches and the baseline against the classical SIMP-based structural topology optimization method. After explaining the baseline, we explain the two proposed approaches density sequence (DS) prediction and coupled density and compliance sequence (CDCS) prediction.

Baseline Direct Optimal Density Prediction
Recently, U-Nets 6,22 have been known to be effective for applications such as semantic segmentation and image reconstruction. Due to its success in several applications, we chose a U-Net for this task. The input to U-Net is a tuple of two tensors. The first is the initial compliance (represented in the voxel or pixel space), and the other is a constant tensor of the same shape as the compliance tensor and each element in the tensor initialized as the target volume fraction, a number between [0, 1]. First, a block of convolution, batch normalization is applied. Then, the output is saved for later use during the skip-connection. This intermediate output is then downsampled to a lower resolution for a subsequent block of convolution, batch normalization layers. This process is continued two more times. The upsampling starts where the saved outputs of similar dimensions are concatenated with upsampling output for creating the skip-connections followed by a convolution layer. This is repeated until the final image shape is reached. At this point, the network utilizes a final convolution layer before producing the Final Density. The network architecture is shown in Figure 2.
We first normalize the compliance by dividing each element's value by the maximum compliance in that sample. This is necessary to ensure that the representation is dimensionless and scales independently of the mesh size. After converting it to a dimensionless number for each element, the values range from 10 −25 to 1.0. In order to represent the complete spectrum of compliance, we convert it to a log 10 scale (making the range [−25, 0]) and then add 25. Finally, we normalize the processed value between [0, 1] by dividing by 25.
To train the neural network model such that it is robust to the load locations applied on the input geometry, we augment the inputs by rotating the input tensor by 90 • clockwise and counter-clockwise around all three axes. Also, mirroring the tensor along the X-Y plane, X-Z plane and, Y-Z plane. We threshold the final target density to get a binary density with a value of 0 and 1. The density value 1 corresponds to the element where the material is present, while density value 0 corresponds to the element where the material is absent or removed.   In this framework, we perform the task in two phases. In the first phase, we take the initial compliance and volume fraction initialization to predict an initial density map. Using the initial density and the volume fraction initialization, we predict a series of densities similar to the prediction from a SIMP topology optimizer to finally predict the optimal density.The details of the training process is covered in the text.
network as it is end-to-end learning; we only need initial compliance and final optimal density. We use Adam 13 optimizer for optimization during the training phase. Also, we use adaptive learning rate which helps the optimization process. To guide the optimizer we use the binary cross-entropy function to calculate loss between predicted and target density.

Density Sequence Prediction
Learning structural topology optimization from compliance of the initial geometry as the data representation is physics consistent. However, the compliance keeps evolving during the iterations since the densities also change during optimization. Therefore, the mapping between the original compliance and the final density is not trivial and may not directly correlate with the final density. To improve the performance, we develop the framework in two phases, as shown in Figure 3. The first phase is called an initial density prediction network (IDPN), which predicts the topology's initial density distribution based on the initial compliance per element obtained for the original geometry. With initial density, we use the iterative density transformation information available from the topology optimization process to transform the initially proposed density to the final optimized density. We perform this transformation using another network (density transformation network, DTN). The DTN does not use any information about the compliances. Therefore, using IDPN and DTN, we can predict the final densities for a given initial design and its corresponding original compliances. This process is shown in Figure 3.
The two phases of the Density Sequence Prediction method require two different network architectures, with each performing physics-consistent transformations of the given input information to obtain the final optimized shape. The first architecture corresponds to the first phase, where the task is to predict an initial density. The second architecture corresponds to the second phase, where the density obtained from phase 1 is transformed to a final density.

Phase 1: Initial Density Prediction:
As a first phase of the method, IDPN uses the initial elemental compliances and initialized volume fraction as input and predicts an initial density. We use U-Net 6,22 network architecture for this phase. The architecture is similar to the architecture described in Section 3.1 and is shown in the left part of the Figure 3.
For phase 1 (IDPN), for 2D, the initial compliance and the volume fraction constraint are represented as a two-channel "image", and the target is a one-channel "image" of the element densities obtained after the first iteration of structural topology optimization. For 3D structural topology optimization, the input is a fourdimensional tensor with two 3D inputs concatenated along the fourth axis, and the target is a 3D element density. An additional data processing step on the compliance is necessary for the efficient performance of IDPN. The operation performed is described in Section 3.1.

Phase 2: Density transformation:
The training of phase 2 is more involved than phase 1. We train a convolutional neural network with long short term memory cells (CNN-LSTMs). Long short term memory cells (LSTMs) are helpful in learning from data with temporal history. In phase 2, there is a sequence of density transformations from the beginning to the end. Given these transformations are non-linear, a short term history is not sufficient for robust prediction of the transformation. Capturing both long term and short term temporal dependencies is one of the salient features of LSTMs. Therefore, we use LSTMs along with CNNs (traditionally used for spatial data such as images) to transform the densities. The architecture of the CNN-LSTM used for DTN is shown in the right part of the Figure 3.
The CNN-LSTM architecture starts with a set of convolution, max pooling, and batch normalization layers (called the encoder), which is used to transform the image to a latent space flattened embedding used by the LSTM. A sequence of LSTM layers is used to obtain a transformed latent layer. A set of deconvolution and upsampling layers (called Decoder) is used to obtain an image (representing the element densities after one iteration of structural topology optimization). The LSTM is unrolled for predicting a sequence in order to provide back-propagation through time. So, the intermediate densities of the structural topology optimization process are loaded as a sequence and processed to obtain the transformed density during the training process.
For phase 2 (DTN), the intermediate densities (each represented as a one-channel image) are used for performing the training. However, all the iterations of topology optimization are not significant in the learning process. Therefore, we curate the intermediate densities to only have unique densities (defined by a metric of L 2 norm). This uniquely curated set of densities are used for performing the training of DTN. Since DTN only deals with densities, no processing is required. To make the neural network more robust, we implement on the fly data augmentation, as discussed in Section 3.1.

Training Algorithms
For training IDPN, we use two different loss functions: (i) the mean-squared error between the predicted and target densities and (ii) the mean-squared error between the mean of the predicted and target densities. The second loss function ensures that the volume fraction of the target and predicted densities are the same. While training DTN, an additional loss function is added. Since the final geometry cannot have densities between (0.0, 1.0), the densities should belong to the set {0, 1} because of solid isotropic material. To impose this condition, we use the binary cross-entropy loss function and the two loss functions used for IDPN. In addition to loss functions, stochastic gradient descent based optimizers such as Adam 13 were used for performing the optimization.
Once the training is performed, the learnt parameters for both the networks are joined such that an end-toend inference scheme may be implemented. This inference scheme only requires the initial compliance and the volume fraction constraint (input to IDPN). The output of IDPN is used as input to DTN, to get the final density without any additional information required. This end-to-end scheme makes it applicable to any generic design.

Coupled Density and Compliance Sequence Prediction
Taking inspiration from the iterative SIMP method, we use deep neural networks to develop a coupled density and compliance sequence prediction framework. In our dataset, we observed that the first five density iterations from the SIMP-based topology optimization method underwent the more significant transformations when compared to later iterations (also referred to as coarse and fine refinement by Sosnovik and Oseledets 26 ). We design three network architectures that use the intermediate compliances and intermediate densities to predict the final optimal density. The first two networks, namely, compliance prediction network (CPN) and density prediction network (DPN), feed their output as an input to each other as coupled interaction, and the third network, final density prediction network (FDPN), uses the last output of density prediction network to produce the final optimal density (similar to the approach taken by Sosnovik and Oseledets 26 ).
As the name suggests, the compliance prediction network predicts the elemental compliance for a given iteration's density. It uses initial elemental compliance and the current iteration density obtained from the DPN. For CPN, we use Encoder-Decoder architecture. In the encoder, we use blocks of two convolutional layers followed by batch-normalization. Similarly, we use an upsampling layer, two convolutional layers, and batch-normalization blocks for the decoder. The encoder encodes the input to the lower resolution latent space, and the decoder then decodes the encoded input to the next elemental compliance.
We use the current iteration elemental compliance and the current iteration density to predict the next iteration density for the density prediction network. We use U-SE-ResNet 16 architecture for the DPN. Adding SE-ResNet 16 blocks in the bottleneck region of U-Net architecture, in addition to the skip connections of U-Net from the encoder to the decoder, builds the U-SE-ResNet. The SE-ResNet block consists of two convolutional layers followed by SE(Squeeze-and-Excitation) block 11 with residual skip-connection from the input of the block. The encoder and decoder of U-SE-ResNet are the same as used in CPN architecture.
The final model in this method is FDPN. As mentioned earlier, the elemental density has undergone a significant transformation during the first five iterations. So, taking advantage of the neural network, we avoid the further iterative process to obtain the final density. We only use the fifth iteration density to predict the final optimal density directly. For FDPN we implement U-Net 6,22 architecture. The encoder and decoder part of the U-Net used here is the same as discussed in CPN architecture.
We pre-process the compliance to transform it to [0, 1] range. We first take the log 10 of the compliance and then normalize it by subtracting the minimum value and then dividing by the difference of maximum and minimum values to scale the log values to [0, 1] range, so all the inputs are in the same range. In addition to this, we perform all the data augmentation techniques discussed in Section 3.1 for all three networks.

Training Algorithms
All three networks are trained independently. During the training phase, we use Adam 13 optimizer for all three networks. For more efficient training, we use adaptive learning rate. The mean absolute error loss function is used for CPN. Moreover, for DPN and FDPN, the binary cross-entropy loss function is used since they are predicting the densities.
During inference, the first two networks are used in a loop. At inference, we start with the initial compliance and initial density, which is initialized with a volume fraction value as a tensor with the same shape as the initial compliance tensor. Using the density prediction network, we predict the subsequent iteration's density and feed it as input to the compliance prediction network, producing the compliance corresponding to the new predicted density. This loop is executed five times, so we get the fifth iteration's density prediction at the end of the loop. We use this predicted fifth iteration density as input to the final density prediction network and directly predict the final optimal density. The inference pipeline may be seen in Figure 4.

2D Data Generation:
The data required for training the networks is obtained by performing several simulations of topology optimization on different designs and volume fraction constraints. We represent each design using a 2D mesh made up of quadrilateral elements. The nodes of the mesh form a regular grid such that each element  In this framework, the initial compliance (see text for more details) and volume fraction initialization is transformed by an iterative coupled prediction from a density prediction network (DPN) and compliance prediction network (CPN). Five iterations of this process is performed to finally get the density and predicting the optimal density using a final density prediction network (FDPN). The details of the training process is covered in the text.
represents a square element. With this representation, we can directly convert the elements of the mesh to pixels of an image. Therefore, we represent the geometry as an image such that the pixel intensity values represent the element compliances and the element densities of the 2D mesh.
For training data, we need raw compliance values, the volume fraction constraint, the intermediate element densities obtained during the intermediate iterations of the structural topology optimization process, and the final element densities. We generated 30,141 simulations of the structural topology optimization with different randomly generated load values, loading directions, load locations, and a randomly generated set of nodes in the mesh, fixed with zero displacements. We performed each simulation for 150 iterations of SIMP-based structural topology optimization. All the relevant information from each structural topology optimization simulation is stored for its use during the training process.

3D Data Generation:
The 3D data used for DLTO is generated using ANSYS Mechanical APDL v19.2. We use a cube of length 1 meter in the form of 3D mesh as an initial design domain. The mesh created has 31093 nodes and 154,677 elements, and each element consists of 8 nodes. To ensure we sample a diverse set of topologies from the complete distribution of topologies originating from the cube, we use several available sets of boundary and load conditions in ANSYS software such as Nodal Force, Surface Force, Remote Force, Pressure, Moment, Displacement. First, we randomly sample three non-collinear points on one side of the cube, and we define zero displacements for these points, so they are fixed. This is necessary to avoid any rigid body motion of the geometry. The next step is to randomly select the load location, which is not close to the fixed support nodes. The nature of the load (nodal, surface, remote, pressure, or moment), the value, and direction is sampled randomly. We employ a rejection sampling strategy to ensure that each sampled topology is unique. We obtained a total of 1500 configurations of load and boundary conditions, and then by sampling the volume fraction, we generated a total of 13500 samples. In our dataset, the topology optimization took an average of 13 iterations, the minimum number of iterations is 6, and the maximum is 72; this number depends on several factors such as the mesh resolution, boundary conditions, and the target volume fraction.
In ANSYS, we store the topology optimization output, the original strain energy, and the intermediate results stored using the starting mesh representation. We now need to convert the mesh representation to a voxel representation for training 3D CNN models. This conversion process involves first discretizing the axis-aligned bounding box into a regular structured grid of voxels based on the grid's grid size/resolution. We compute the barycentric coordinates for each of the tetrahedra in the mesh for each of the voxel centers. Using the barycentric coordinates, we can estimate if the grid point is inside the tetrahedron or not. If the grid point is inside that tetrahedron, we now interpolate the field values (such as density, strain energy, etc.) from the tetrahedron nodes to the voxel centers. Through this process, we obtain the voxel-based representation of the topology optimization data. Each sample's voxelization takes about 5-15 minutes, depending on the resolution and the number of tetrahedral elements. We parallelize this process using GNU parallel to complete this process in a few hours (depending on compute nodes' availability). To calculate the element compliance, we multiply strain energy obtained from ANSYS with the cube of the density to obtain the compliance (C = ρ p uk e u = ρ p * SE, where p is the penalty of the SIMP approach, set Initialize geometry and discretize into a tetrahedral mesh

Perform topology optimization
Perform voxel interpolation of all quantities Figure 5: 3D data generation pipeline: Each sample in the dataset if generated using this data generation pipeline. First we initialize the geometry (a cube with side length of 1 meter). This geometry is discretized into tetrahedrons to get the mesh. On this mesh, we define three non-collinear nodes to fix the mesh from any rigid body motion. Then we apply randomly generated boundary conditions and loading conditions with different magnitude and direction. to 3 in our data generation process, SE refers to the elemental strain energy).
Once the voxel-based representation is obtained, we also perform other pre-processing steps such as normalizing the compliance by the maximum value of the compliance, converting the compliances to log scale for better learning. We even perform on-the-fly data augmentation by rotating the model in any of the six possible orientations. Thus we finally get the data for training the neural network.

Results and Discussion
In order to compare the performance of our proposed methods with the baseline DOD, we start with the volume fraction (VF) constraint of structural topology optimization. We compute the predicted volume fraction of the final predicted topology by summing up the density values over the whole design domain and then dividing it by the total number of pixels or voxels in 2D or 3D, respectively. We compute MSE loss between the predicted VF and the actual VF on the test data. From the Table 1 and Table 2, we observe that the CDCS method performs better than other two methods in order to satisfy VF constraint. In 3D, the MSE of VF for CDCS is 8× lower. Further from the histogram plots in Figure 6, we see many samples satisfy the topological constraint (VF) predicted using our method. To further evaluate the performance of our method to satisfy VF we plot the correlation plot in Figure 7 and Figure 8 for both 2D and 3D, respectively, and also compute the Pearson correlation coefficient between the predicted VF and actual VF for both 2D and 3D test data in Table 3 and Table 4. We see comparable values for DOD(R = 0.8986) and CDCS (R = 0.8945) method in the case of 2D data. In the case of 3D data, we see that the predicted VF using CDCS is highly correlated(R=0.9947) with the actual VF.
The next metric we use to test our method's performance is the MSE of the total compliance (TC). To determine the TC of the predicted final density, we use the CPN, part of the CDCS framework, to predict the    elemental compliance and take a sum of it over the whole design domain. We sum the actual elemental compliance to get the ground truth total compliance value, an objective function value of the structural topology optimization. This is the optimal minimum value achieved by the end of the SIMP method. From Table 1 and Table 2, we observe a 10x times lesser error value when we compare the MSE between the predicted and the actual total compliance for both DS and CDCS. To support this statement, we plot the histogram of the MSE values for both on 2D and 3D in Figure 9. We can see that most test samples predict the TC very close to the predicted optimal TC minimum value using both of our proposed methods, DS and CDCS. We also compute Pearson correlation coefficient between predicted total compliance and actual total compliance and the correlation plot ( Figure 10 and Figure 11). From Table 3 and Table 4, in case of 2D, predicted total compliance by DS (R = 0.9551) and CDCS (R = 0.8926) is highly correlated with actual total compliance than the baseline DOD approach. For 3D test data, we see similar results that the CDCS prediction (R = 0.9578) is closer to the actual total compliance values and outperforms the DOD (R = 0.8766).     In addition to the results above, we also conduct the statistical analysis on MSE loss between predicted and actual values of both topological constraints (VF) and physics constraints (TC). We summarize the minimum, median and maximum value of MSE for both 2D and 3D data in Table 5 and Table 6, respectively. For volume fraction constraint, in the case of 2D, we see that all the three metrics listed have comparable values for DOD and CDCS and slightly better than the DS. Although, for 3D data, the median value of MSE by CDCS is 5× lower, and the maximum value is almost 2× lower than the DOD method while the minimum values are comparable to each other. For the MSE values of total compliance, for 2D data, we see that both DS and CDCS perform much better than the DOD in all three statistics, and DS and CDCS have comparable median and maximum values. However, DS has a minimum loss value in all three methods. For 3D test data, we see the minimum value of MSE for DOD is 200× times larger, and the median value is 50× larger. The maximum is 10× larger than the CDCS values, which affirms the greater performance of CDCS over the baseline DOD approach in satisfying the physics constraint (TC).
Apart from the numerical analysis, to further qualify the performance of our method, we compare the visualizations of the predicted final topology, obtained by performing end-to-end prediction using all three methods, with ground truth final optimal topology. Additionally, we have calculated the total compliance value for each sample shown in the visualization and printed it just below the visuals. In the ground truth column, we also demonstrate the boundary and load conditions applied for each sample, giving a slight idea about how the final topology has obtained that particular shape. In Figure 12, we have shown the 2D test data visualization for the prediction of each method and compared it with the ground truth.
We also see that the CDCS predicts the final shape significantly closer to the ground truth, and the total predicted compliance value is much closer to the actual value. Although there are some cases where the shape predicted by DOD and DS is slightly better than the CDCS, the predicted total compliance value is  much higher than the actual value. For 3D visualizations, we use marching cube methods to visualize the final topologies shapes. CDCS performs consistently as well as significantly better than the baseline DOD. We see much smoother shapes, even smoother than actual ground truth was obtained by CDCS.
We further evaluate the CDCS method by visualizing the evolution of intermediate iteration densities predicted by the DPN. As we discussed in Section 3.3, the DPN predicts the next iteration density using current iteration compliance and current iteration density. We first use initial compliance and actual current iteration density to predict the next iteration compliance using CPN. Using the predicted compliance and actual iteration density, DPN predicts the next iteration density. We visualize the iteration-wise prediction in Figure 14. Looking at the visualizations, it is evident that the DPN is efficient in predicting the next iteration density. Also, it depicts the non-trivial transformation flow of the initial topology shape towards the final optimal shape.
From the numerical analysis performed and supported by the visualizations, we claim that the performance of the CDCS is better than the baseline DOD and DS. Although DS satisfies the physics constraint better, it does not satisfy the topological constraint to the same extent. On the other hand, CDCS accomplishes the best balance in satisfying volume fraction constraint and achieving the total compliance value near the actual optimal minimum value.
To get more insights on the network architectures of CPN, DPN, and FDPN used in CDCS, please refer to Appendix C. For more training performance results, please see Appendix A and Appendix B.

Conclusion and Future Work
In this paper, we explore application of physics-consistent deep learning methods for topology optimization. We develop two approaches (DS and CDCS) which are consistent with the physics constraints, topological constraints and the topological optimization process. We generate dataset for topology optimization in both 2D and 3D representations and then demonstrate the superior performance of our proposed approach over the baseline approach. Finally, we visualize a few anecdotal topologies to visually compare the three methods with baseline SIMP-based topology optimization process. Future works, include 3D topology optimization performed on a generic 3D CAD model and learning the PDE underlying the structural Fixed Support Load Figure 12: Visualization of testdata in 2D: (i) Method 1: Baseline direct optimal density prediction, (ii) Method 2: Density sequence prediction, (iii) Method 3: Coupled density and compliance sequence prediction. The results show the target design and the predicted design.
analysis to reduce the data requirements for training. Load Fixed Support Figure 13: Visualization of testdata in 3D: (i) Method 1: Baseline direct optimal density prediction, (ii) Method 3: Coupled density and compliance sequence prediction. The results show the target design and the predicted design.