For electromechanical simulations, the values are varied from 0.1 to 0.9 for all pupils except for the square openings whose values were varied from 0.1 to 0.7. Beyond , the case-2 square pupil will cross the diaphragm boundaries. Figure 3 shows how the variational solutions (with ) for all cases match with FEM simulations. Thus, they qualitatively provide good prediction for deflection to be used subsequently in optical simulations. The presented modeling framework provides a fast tool, compared to FEM, to perform optimization and exploration of different materials, layer thicknesses, and pupil geometries. For example, on our computer (Intel i7-4940MX, 3.1 GHz, 64-bit OS), the software package MATLAB18 solves Eq. (6) in 1.3 s while it takes 1.5 min to solve the corresponding problem with FEM (using COMSOL Multiphysics v4.419).