Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

Isight Tutorial Number i6.

Solidworks-Abaqus integration
within an Isight optimization
process of a soda can.
Stefano Morlacchi
December 2014

Simuleon B.V.
Sint Antoniestraat 7 5314 LG Bruchem
T. +31(0)418-644699 F. +31(0)418-644690 E. info@simuleon.com W. www.simuleon.com
1. Introduction
In previous tutorials, you learnt how an Abaqus component can be included into an
Isight workflow to directly drive some parameter models such as material data,
boundary conditions or part dimensions. Sometimes, however, complex CAD
geometries cannot be created directly within Abaqus but are imported into Abaqus
from other CAD software such as SolidWorks or ProEngineer and then used for
a FE simulation. For this reason, it could be useful to be able to combine together
Isight, a CAD software and Abaqus.

In this example, the height and radius of a soda can need to be optimized in order
to maximize its buckling strength under uniform external pressure, maintaining a
target volume of 33 cl. An Abaqus linear buckling procedure is used in order to
estimate the main buckling load.

When you complete this tutorial, you will be able to:


- Include a Solidworks component in an Isight process workflow.
- Use an automatic pre-processing script within the Abaqus component.
- Use the data exchange component to retrieve information from a text file.
- Use the calculator component.

Preliminaries

1. Open the CAD_Can.sldprt Solidworks file and look at the soda can model
previously created (Fig. 1). Note the two main dimensions that will be used as
input for the optimization process: the can’s height (100) and can’s radius (30).
The sketch is then revolved for 360 degrees to obtain a full 3D model of a soda
can.
2. Open the Abaqus_Can.cae Abaqus file and look at the soda can model
previously created. Note that in this case, the Abaqus .cae file is not complete but
only material and step definition is created. In particular, aluminium and a buckle
procedure have been predefined.

Simuleon B.V.
Sint Antoniestraat 7 5314 LG Bruchem
T. +31(0)418-644699 F. +31(0)418-644690 E.info@simuleon.com W. www.simuleon.com
2
Figure 1. 3D CAD model of a soda can.

3. The python script called userscript_cae_pre.py is used to complete the


model by automatically importing the CAD geometry obtained from the
Solidworks simulation as long as applying loads and boundary conditions (Fig. 2).
In particular:
- Regular S4R shell elements are used to discretize the soda can model.
- The bottom of the can is fully constrained.
- A uniform pressure is applied to the lateral surface of the can.

4. Open the userscript_cae_pre.py script file with Wordpad and edit the path
to the SLD_Can.sat file at line 32 according to the location of the file in your
computer (Fig. 2).

Figure 2. Edit the Abaqus pre-processing python file.

Simuleon B.V.
Sint Antoniestraat 7 5314 LG Bruchem
T. +31(0)418-644699 F. +31(0)418-644690 E.info@simuleon.com W. www.simuleon.com
3
5. Once opened the Abaqus_Can.cae file, run the userscript_cae_pre.py script
(FileRun script). You will see what Isight will automatically do to create the full
Abaqus model. Run the job called SIM_Can and look at the results. Close
Abaqus without saving the .cae file.

6. Main result of such analysis is the first Eigenvalue (Fig. 3, red circle) which
represents the theoretical load at which buckling of the structure will occur. Such
value is written as output in the data file (Fig. 3, left) but the Isight Abaqus
component does not recognize these results. For this reason, a Data Exchanger
component is required to retrieve such information from the .dat file and store it
in a parameter file used in the optimization process.

Figure 3. Example of soda can buckling analysis. On the left, results written in
the data file.

Simuleon B.V.
Sint Antoniestraat 7 5314 LG Bruchem
T. +31(0)418-644699 F. +31(0)418-644690 E.info@simuleon.com W. www.simuleon.com
4
2. Setting up the Isight workflow
- Open a new standalone Isight Design Gateway.
- Sequentially, drag a Solidworks, an Abaqus, a Data Exchanger and a
Calculator component from the Application Components Tab onto the lower black
arrow, reproducing the same setup as the picture shown in the title page.
- Change the Task1 process component to a Design Of Experiment (DOE)
component by right-clicking the Task1 palette and selecting Change To  New in
the menu and Optimization in the ‘Select New component’ dialog box (Fig. 4).

Figure 4. Definition of the Isight workflow.

3. Edit the Solidworks Component


1. Double-click the Solidworks Component and enter the Parameter Tab. Browse
to select the CAD_Can.sldprt file and click on Read File. As Isight finishes reading
the .sldprt file, select the sketch features called D1 and D4 (Fig. 5 left),
corresponding to the can radius and height respectively. Click the red plus button
to complete the selection process and switch to the Advanced tab to request Isight
to save the .sat file as file output of the Solidworks component (Fig. 5 right).

Simuleon B.V.
Sint Antoniestraat 7 5314 LG Bruchem
T. +31(0)418-644699 F. +31(0)418-644690 E.info@simuleon.com W. www.simuleon.com
5
Figure 5. Definition of the Solidworks component.

4. Edit the Abaqus Component


1. Double-click the Abaqus Component and enter the Input Tab. Browse to select
the Abaqus_Can.cae file and click on Use Custom Script before Read File. This
tells Isight to run the script file called userscript_cae_pre.py after opening the .cae
file. As Isight finishes reading the CAE file, some Abaqus features are recognized
as potential input parameters that can be used to modify the CAE file and can be
included in the Isight optimization workflow. Do not select any of these features
(Fig. 6).

2. Enter the Execution Tab. Check that the execution command is correct
according to the setup of your system. In this case, add cpus=2 at the end of the
command line to use two processors in parallel.
abaqus.bat input=SIM_Can.inp job=SIM_Can interactive

3. Enter the Output Tab and browse to select the SIM_Can.odb results file
previously created. Click on Read File and do not select any of the output results
available. Click OK and exit the Abaqus component editor.

Simuleon B.V.
Sint Antoniestraat 7 5314 LG Bruchem
T. +31(0)418-644699 F. +31(0)418-644690 E.info@simuleon.com W. www.simuleon.com
6
Figure 6. Configuration of the Abaqus component.

5. Solidworks-to-Abaqus file exchange


In order to pass the .sat output file from the Solidworks component into the Abaqus
component, a new file parameter has to be created and mapped from Solidworks
into Abaqus. Also, the file needs to be saved at every run in a specific absolute
location which is the one used in the Abaqus python script to import the geometric
model of the can.

1. Enter the Files tab, choose the Solidworks component in the Model Selection
area, select the CAD_Can_sat_Output parameter in the Output files tab and set
Destination as the specific location of the SLD_Can.sat file that will then be used
by the Abaqus script (Fig. 7).

2. Make sure that the path selected here is the same path written into the Abaqus
script called userscript_cae_pre.py.

Simuleon B.V.
Sint Antoniestraat 7 5314 LG Bruchem
T. +31(0)418-644699 F. +31(0)418-644690 E.info@simuleon.com W. www.simuleon.com
7
Figure 7. Configuration of the .sat file parameter.

6. Edit the Data Exchanger component


The Data exchanger component is needed since Abaqus writes the results of a
Buckling Eigenvalue analysis into the .dat file and the Abaqus component cannot
directly recognize them. In order to do that, three steps need to be taken:

1. In the first step, you create a new file parameter corresponding to the
SIM_Can.dat file obtained from the Abaqus simulation. Enter the Files tab and
then the Output files tab of the Abaqus component. Click on the Create a new file
parameter icon (Fig. 8, red circle), select Output as type, scalar as Structure, enter
SIM_Can.dat as file name and leave the runtime directory as file name path.
Select Text as File Content type, leave Isight File Manager as output destination
and enter SIM_Can_dat as name. Click Finish. When asked, choose to save the
file into the Isight database.

Simuleon B.V.
Sint Antoniestraat 7 5314 LG Bruchem
T. +31(0)418-644699 F. +31(0)418-644690 E.info@simuleon.com W. www.simuleon.com
8
2. Map this file from Abaqus component to the Data exchanger component. Enter
the Dataflow tab and click on the Abaqus component on the model selection
window. Drag the mouse to map the SIM_Can_dat file parameter from Abaqus
component to the Data Exchanger component (Fig. 9).

3. Double-click on the Data Exchanger component and click on the central grey
area to open a new Data source template. Request to read a file and select the
SIM_Can.dat file obtained as output of the Abaqus simulation in the sample file to
use box. Select the SIM_Can_dat parameter as file to read at runtime (Fig. 10).
Click next and select General text as type. Click Next.

4. Highlight the first Eigenvalue at the end of the .dat file and write the value as an
output parameter called EIGENVALUE. To do that, enter the name EIGENVALUE
in the parameter field and click on the green book icon (Fig. 11, red circle). A new
output parameter will be created on the right.

Figure 8. Creation of a new file parameter.

Simuleon B.V.
Sint Antoniestraat 7 5314 LG Bruchem
T. +31(0)418-644699 F. +31(0)418-644690 E.info@simuleon.com W. www.simuleon.com
9
Figure 9. File parameter mapping from Abaqus to Data exchanger.

Figure 10. Definition of the Data Exchanger component.

Simuleon B.V.
Sint Antoniestraat 7 5314 LG Bruchem
T. +31(0)418-644699 F. +31(0)418-644690 E.info@simuleon.com W. www.simuleon.com
10
Figure 11. Creation of the Eigenvalue output parameter.

7. Edit the Calculator Component


The calculator component is used to calculate the volume of the can.

1. Enter the Dataflow parameter and select the Solidworks component in the
Model Selection window on the left. Select the two CAD parameters (D1 radius and
D4 height), change them as In/Out parameters (Fig. 12, red circle) and then map
them into the Calculator component as done previously (Fig. 12).

2. Double click on the calculator component and write the following command to
create a new parameter resulting from the Volume calculation. Click on the
parameters when you want to include them in the string.

VOLUME=pi( )*'D1@Sketch2@CAD_Can_Part'^2*'D4@Sketch2@CAD_Can_Part'

Simuleon B.V.
Sint Antoniestraat 7 5314 LG Bruchem
T. +31(0)418-644699 F. +31(0)418-644690 E.info@simuleon.com W. www.simuleon.com
11
Figure 12. Mapping of parameters from Solidworks to the Calculator component.

Figure 13. Configuration of the Calculator component.

8. Edit the DOE process component and run the model


1. Double-click on the DOE component. Select Optimal Latin Hypercube and 21
design points. Move to the Factors tab and select both geometric parameters as
DOE factors, switch to the Postprocessing tab and select both the EIGENVALUE
and VOLUME parameters. Click OK.

2. Now, enter the Formulation tab and set the range values for the factors and the
objective functions as outlined in the following Fig. 14. As you notice, objectives
have different scale values and different weights.

Simuleon B.V.
Sint Antoniestraat 7 5314 LG Bruchem
T. +31(0)418-644699 F. +31(0)418-644690 E.info@simuleon.com W. www.simuleon.com
12
Figure 14. Definition of problem formulation.

3. Enter again in the DOE component to check that the new formulation has been
updated. Then, run the model.

9. DOE Post-Processing
With a DOE approach you basically look at the effect of the design variables on the
responses.
Once the Isight run is completed, enter the Graphs tab of the Isight Run Gateway
and make sure the Optimization component is selected in the left model tree. Click
on the icon ‘Constraint Overlay graph 3D’ and in the appearing dialog boxes,
select D1 (radius) as X data, D4 (height) as Y data and Eigenvalue as Z data (Fig.
15). Repeat the same process for the Volume parameter.
Take some time to explore other options such as Main Effects, Pareto plots etc.

Simuleon B.V.
Sint Antoniestraat 7 5314 LG Bruchem
T. +31(0)418-644699 F. +31(0)418-644690 E.info@simuleon.com W. www.simuleon.com
13
Figure 15. Results of DOE process.

10. Approximation and Design search


A typical use of DOE is as the first step of a following approximation and design
search. This approach could be used for mildly non linear fields that can be
accurately described by surface responses created with the few data points
examined during the DOE.

Using approximations, optimization processes are much faster since no actual


calculations of the single components need to be performed.

To create an approximation, enter the visual design tab and click on Create
Approximation at the centre of the viewport. This command performs a standard
approximations with default values while more options can be selected by clicking
on the ‘Create a new approximation’ icon just below the Visual Design tab. In the
visualization tab, you can view the 2D and 3D representations of the

Simuleon B.V.
Sint Antoniestraat 7 5314 LG Bruchem
T. +31(0)418-644699 F. +31(0)418-644690 E.info@simuleon.com W. www.simuleon.com
14
approximated response surface while you can use the Design search to perform
an optimization and search for a specific result.

1. Define the objectives in order to maximize the Eigenvalue (resistance to


buckling load) while keeping the volume at 33 cl (Fig. 16). Enter a scale factor of
0.01 and 330000 for the Eigenvalue and Volume parameters respectively. Enter a
value equal to 10 as weight factor for the volume parameter. Click Search.

Figure 16. Definition of the optimization objectives.

2. Once the analysis finished (a few seconds), click on the green point of the history
plots below and check the results obtained. It is possible to click on the ‘Compare
with actual...’ button below the history plots to execute the workflow and compare
exact and approximated outputs. The difference among the two values will be lower
as long as your approximation surface is correctly describing the effects of design
variables on the outputs.

3. By clicking on the ‘Options’ button, you can change the optimization algorithm
used. Take time to try different algorithms (gradient-based, direct, genetic) and
compare the results obtained. Values around 124 mm height and 27 mm radius
are obtained.

Simuleon B.V.
Sint Antoniestraat 7 5314 LG Bruchem
T. +31(0)418-644699 F. +31(0)418-644690 E.info@simuleon.com W. www.simuleon.com
15
11. Optional: Optimization workflow
As optional exercise, it could be possible to perform an optimization process
directly within the Isight workflow. Follow these steps:

1. Replace the DOE process component with an Optimization component, Right


click on the DOE component and select Change to  Optimization.

2. Enter the Optimization component and select the Hooke-Jeeves optimization


technique. Select the two geometric parameters as variables and the Eigenvalue
and Volume as Objectives. Maximize the Eigenvalue while set 330000 mm^3 as
target for the volume parameter. Enter the same scale and weight factors as
described in section 10.1. Click OK.

3. Run the component and look at the optimized results obtained. Are they
comparable to those obtained with the DOE + Approximation process?

Simuleon B.V.
Sint Antoniestraat 7 5314 LG Bruchem
T. +31(0)418-644699 F. +31(0)418-644690 E.info@simuleon.com W. www.simuleon.com
16

You might also like