In this blog post, we will introduce the concept of shape optimization for adjusting part dimensions by using analytic sensitivity methods. If you have a single objective function that you want to improve, a set of geometric parameters that you want to change, as well as a set of constraints, then you can use the functionality of the Optimization Module and the Deformed Geometry interface in COMSOL Multiphysics to find the optimal structure without any remeshing. Let’s find out how!
Optimizing a Parallel Plate Capacitor SimulationLet’s begin by referring back to a previous blog post on the computation of design sensitivities that shows how we can use the Deformed Geometry interface and the Sensitivity study to analytically evaluate the design sensitivities of a parallel plate capacitor. For that problem, we computed the change in the capacitance with respect to geometric and material property variations. We also computed the design sensitivities to geometric changes without altering the geometry or performing any remeshing. We now want to use that same framework to change the geometry of our capacitor with the objective of minimizing a particular quantity by using the functionality of the Optimization Module. We start with a simple extension to the previous example: a parallel plate capacitor of side length with two dielectrics, , each of the same initial thickness, . Further, we will neglect all fringing fields. This lets us model only the region between two parallel plates so that our computational model looks just like the figure shown below.
This model can be built by sketching two geometric blocks of dimensions, as described above. The Electrostatics physics interface allows us to apply a voltage and a Ground condition at the top and bottom faces as well as apply material dielectric properties. It is possible to compute the capacitance by integrating the electric energy density, as described in the previously mentioned blog post, and get a value of . Now, let’s suppose that we want to design a 100 pF capacitor by changing the thicknesses of the two layers, without altering the overall dimensions of the device. This can be posed as an optimization problem: That is, we want to get the capacitance to be as close to 100 pF as possible by varying the change in the dielectric thicknesses within limits such that neither dielectric is of zero thickness. The design parameter is the changing in the thicknesses of the two layers, as shown above. The objective function itself is formulated such that the absolute magnitude is on the order of unity. For numerical reasons, this form is preferred over or the absolute value function: . We can begin by defining the variation of the thickness of the dielectric layers using the Deformed Geometry interface. The Deformed Geometry interface is necessary because we want to compute the analytic sensitivities without having to remesh the geometry as we change the dimensions. Since we will be changing the sizes of the two dielectrics, we want to define these deformations as completely as possible. We will do this with a Prescribed Deformation domain feature, as shown below. The capacitor itself is originally sketched such that it is centered at the origin so the original, undeformed part has a coordinate system: (Xg,Yg,Zg). For this simple Cartesian geometry, we can use this coordinate system to directly define the deformation as the thicknesses of the dielectric layers are changed. The deformations of the bottom and top layer are dT*(1+Zg/T0) and dT*(1-Zg/T0), respectively, where dT and T0 are Global Parameters.
Next, let’s look at the optimization user interface. For this simple problem, we can just add an Optimization feature to our study sequence, as shown in the screenshot below. Similarly, it is good to apply an appropriate scaling to the design parameter. In this case, the magnitude of can be expected to be similar in magnitude to , the original thickness of the dielectric layers. This minimization problem statement and scaling can all be implemented within the Optimization study node, as shown below. The relevant settings are the Objective Function, which is the expression (C_computed/100[pF]-1)^2, and the Control Parameter, dT, which has an initial value of 0[m]. The upper and lower limits are specified to prevent an impossible case. Lastly, we apply a scaling such that the optimized value will have an order of magnitude near unity.
The SNOPT method is used to solve the optimization problem. Both the SNOPT and MMA methods use the analytically computed sensitivities, but SNOPT converges the fastest to within the default tolerance of 1E-6. The resultant device capacitance is 100 pF and the thickness of the dielectrics is D1 = 0.1542 m and D2 = 0.0458 m. The voltage field in the original model and the optimized structure are shown below, along with the finite element mesh. Observe that the finite element mesh is stretched, but that no remeshing has occurred.
Closing Remarks on Shape Optimization and Deformed GeometryWe’ve looked at a fairly straightforward example of shape optimization, and with a little effort, we could have found the solution to this problem by hand or by performing a parametric sweep. The geometric deformation demonstrated here is also quite simple. As you consider more complex geometries and more complex geometric changes, you will not always be able to directly use the undeformed spatial coordinates to define the deformation. In such cases, you will need to add equations to the model to help define the deformation. Of course, you may also want to consider more complex deformations, not just simple dimensional changes. We will cover this topic in an upcoming blog post on optimization. In the meantime, if you have any questions about this technique and would like to use the Optimization Module for your design needs, please contact us. |
|