May 10, 2023
Benefits of optimization with parametric mesh morphing: ANSA and META integration in pSeven
Industry: Automotive | Product: pSeven | Company: BETA CAE Systems
This use case demonstrates the benefits of parametric mesh morphing in optimization studies compared to the typical CAD-based parameterization of geometry modifications. Typical CAD-based parameterization of geometry in most cases is complex, which might lead to errors during rebuilding. With traditional CAD-based parameterization, automating the meshing is a tricky process that requires additional efforts. Moreover, meshing of the new configuration is always a source of instability (in both boundary conditions and solver setup) making post-processing difficult.
Figure 1. Drawbacks of CAD-based parameterization
Mesh morphing allows to avoid these drawbacks suggesting the users to work on the finite-element mesh directly reducing time taken to go back to update the geometry. This approach does not need the geometry at all. So, all the parameters are updated simultaneously without rebuilding errors. Based on mesh associativity the parametric mesh morphing provides seamless post-processing.
Figure 2. Features of mesh morphing
Advantages of mesh morphing in ANSA pre-processor by BETA CAE Systems and optimization in pSeven are shown on the example of mass optimization of a bus front axle beam. It has 8 geometry parameters and the following stress and deformation constraints:
- Static vertical load: ES < 480 MPa, DP1 < 10 mm
- Braking load: ES < 480 MPa, DP2 < 55 mm
The loads applied to the region of contact with the pin have the following values:
- a. Vertical load condition: Fz = 61 kN, Mx = -14e6 Nmm
- b. Braking load condition: Fz = 29 kN, Fx = 31 kN, My = 14e6 Nmm, Mx = -3.3e6 Nmm
- c. Horizontal region of contact with spring is constrained
- d. Symmetry area is rigidly constrained in Y direction
Figure 3. Pre-processing (mesh morphing and boundary conditions) in ANSA
- Many design parameters for optimization study if using a typical CAD-parameterization of geometry.
- Narrow searching area for mass reduction due to constraints.
Mesh morphing in ANSA
8 parameters allow to define a great variety of geometries. For straightforward definition of the parameters, morphboxes are used. Each box has independent parameterization. Box continuity guarantees that the shape is maintained. The fact that there is no remeshing simplifies the application of boundary conditions and reduces the risk of causing problems for solver.
Figure 4. Geometry modification (mesh morphing) in ANSA
Post-processing in META
After defining the mesh and solver, it is necessary to setup post-processing output file. This file is created in META (a post-processor also developed by BETA CAE Systems) and is used in the optimization loop in pSeven, which extracts the structural responses after the solution.
Figure 5. Post-processor interface in META
Automation and optimization in pSeven
At this stage, we have a complete parameterized model with mesh morphing prepared in ANSA and solver automation performed in META. The next step is integration and automation in pSeven.
Integration with ANSA/META can be organized in two ways:
1. Generic integration with input text file and execution from command line (Text – Program – Text) integration.
- Setup optimization study in ANSA.
- Define input parameters in DVfile that will be updated by pSeven.
- Add a compatible with ANSA solver to the workflow if needed. In this case, Ansys was used.
- Define output parameters in a results text file created by solver.
Figure 6. Generic integration in pSeven
2. Direct integration using API:
- No need to deal with the text files and complicated workflow setup.
- Full control of optimization study in ANSA using API to update parameters and execute ANSA and META routines.
Figure 7. Direct integration in pSeven
The second way is simpler and was used in this case. The only input in the direct integration block to specify is the ANSA project path.
Figure 8. Optimization study in ANSA (left), User block interface in pSeven (right)
Note: Originally, the User block in pSeven was used for integration of ANSA/META. User block is a template block where user can implement his own logic in order to connect his favorite tools with minimal effort and then use it later in any other workflow. User block for ANSA/META integration was developed approximately in 2 days and went out so well, that we added it as a direct integration block to the product.
After the automation is ready, the optimization study can be setup. Design space exploration (DSE) block is used for this. It is recommended to conduct a Design of Experiments (DoE) study before the optimization in order to explore the available parametric space.
The problem is not expected to be complicated, so the explicit budget for the optimization is only 200 points. SmartSelection selected Surrogate-Based Optimization (SBO) as the best algorithm for this specific task.
Figure 9. Optimization setup in pSeven (Design space exploration block)
To evaluate the linear constraint before the optimization study, a Python script block with a linear formula is used. On this level, the model is considered as a blackbox. It expects 8 input parameters and provides 5 responses. Finally, we have a close loop, which is controlled by the DSE block.
After the workflow is finished, we can analyze the results and make some decisions for a following study. Optimal geometry became much more elegant than the initial one. And that is what expected after the mass reduction optimization study but still with respecting all the constraints.
Figure 10. Optimal (upper) vs. initial geometry (bottom)
Optimization history is also available and represented as a 2D plot with number of points (index) on X-axis and mass values on Y-axis. After the initial DoE, study the algorithm converged fast to get a good result.
Figure 11. Optimization results
The axle mass was reduced by 6.418 kg (12 %) in comparison with the original geometry. Two constraints and some of the variables for optimal point reached the bounds. This means that it might make sense to expand the design space in order to have even better results. In order to perform additional analytics, parallel coordinates can be used for visualization. This approach helps to understand what parameters can be modified even further. In addition, in order to understand which parameters affect the output/constraints the most a dependency analysis should be done.
Figure 12. Parallel coordinates and dependency analysis in pSeven
On the figure below, we see that the variable H1 has low influence on the constraint function but strongly affects the response of the mass function.
Figure 13. Result of the dependency analysis
Therefore, if limits of variable H1 are changed from 5 to 7 then we get the following results:
Figure 14. Results with modified limits of variable H1
This way, we can reduce mass of the axle even more and satisfy all the constraints.