Tutorial I4 IsightAbaqus Script Excel

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

Isight Tutorial Number 4: Isight

optimization, Abaqus scripting


and Microsoft Excel integration
Stefano Morlacchi
January 2015

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 this tutorial, you will combine Abaqus and Microsoft Excel within an
optimization Isight workflow. Also, you will write (or copy) a user defined python
script to retrieve from the Abaqus .odb file new customized output variables
which are not directly calculated by Abaqus.

In this example, a structure composed by two beams (Fig. 1) is loaded with a


vertical concentrated load (15 N) at its central point (A). Vertical restraints are
applied at the lower of vertexes (B1 and B2) of the structure to simulate rollers. Aim
of the optimization is to minimize the structure volume keeping the resulting angle
α of the deformed configuration between 18.9 and 19 degrees.

Microsoft Excel is used to calculate the volume of the structure. This task can be
performed with a basic calculator component as well. Instructions for both
approaches will be provided to allow the completion of the tutorial also to those
who do not have Microsoft Excel available.
A Python script will be used to calculate the final angle α retrieving the nodal
coordinated of vertexes A and B2 from the .odb file.

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


- Include a Microsoft Excel component .
- Use a post-processing script within the Abaqus component which calculates
user-defined parameters.

Figure 1. Sketch of the beam simulation.

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
Preliminaries

1. Open the Abq_Beam.cae Abaqus file and look at the structural model
previously created. Note in particular the profile properties of the beams and
boundary conditions. Run the job called BEAM and look at the analysis results.

2. The python script called userscript_odb.py is used to open the .odb file,
retrieve information on the final geometrical configuration of the structure and
then calculate the angle α. This result is both printed at screen and written in the
user_params.txt file. Parameters written on this file are directly parsed and
recognized by the Abaqus component as output parameters. Once the analysis is
finished, run this script by clicking on FileRun script. Look at the results
printed in the command area and in the user_params.txt file.

3. Open the Excel datasheet called Beam_Volume.xls and look at the beam
volume calculation.

Figure 2. Example of beam loading analysis. Deformed and undeformed


configurations.

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
2. Setting up the Isight workflow
- Open a new standalone Isight Design Gateway.

- Sequentially, drag an Abaqus and a Microsoft Excel component (or calculator


if Excel is not available) from the Application Components Tab onto the lower black
arrow, reproducing the same setup as the picture shown below.

- Change the Task1 process component to an optimization 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. 3).

Figure 3. Definition of the Isight workflow.

3. Edit the Abaqus Component


1. Double-click the Abaqus Component and enter the Input Tab. Browse to open
the Abq_Beam.cae file and click on Read 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. Select the horizontal (Model_Beam_Profile_Rect_A) and vertical
dimension (Model_Beam_Profile_Rect_B) of the beam profile.

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. Move to the Execution Tab. Check that the execution command is correct
according to the setup of your system.
abaqus.bat input=BEAM.inp job=BEAM interactive

3. Enter the Output Tab and browse to select the BEAM.odb results file
previously created. Click on Read File and look at the list of variables
automatically identified by Isight. Now, click on Use Custom Scripts and the
reread the file (Fig. 4). A new variable called Angle is now included in the
variables list. Select it and click OK.

Figure 4. Configuration of the Abaqus 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
5
4. Edit the Microsoft Excel component
The Microsoft Excel component is used to calculate the volume of the structure.
If you’d rather use the Calculator component, go to Section 5.

1. Enter the dataflow tab and select the Abaqus component from the Model
selection area on the left. Select the profile parameter
Model_Beam_Profile_Rect_A as shown in Fig. 5 and change the mode from Input
to In/Out parameters. Map the parameter to the Excel component by dragging it
towards the Excel component on the right. A new blue dotted line will create
automatically (Fig. 5). Repeat the same process for the parameter
Model_Beam_Profile_Rect_B.

2. Double-click on the Excel component. Browse to open the Beam_Volume.xls


file. Now, select the cell F6 corresponding to the horizontal dimension of the beam
profile, select the parameter called Model_Beam_Profile_Rect_a in the drop down
menu and click on the red plus button to map the parameter. Repeat the process
for the vertical dimension b. Now, highlight the cell F12 with the volume calculation
output, enter the name Volume in the Parameter field and click the red plus. In the
Action column, change the action for Volume parameter from Map to Excel (yellow
arrow) to Map from Excel (Blue arrow). The final result is shown in Fig. 6. Move
to the Advanced tab and untick the Show Excel during execution option.

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 5. Editing the dataflow from the Abaqus component to the Excel
component.

Figure 6. Configuration of the Excel 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
7
5. Edit the Calculator Component
If you have already used the Excel component. Go to Section 6.

1. Enter the dataflow tab and select the Abaqus component from the Model
selection area on the left. Select the profile parameter
Model_Beam_Profile_Rect_A as shown in Fig. 5 and change the mode from Input
to In/Out parameters. Map the parameter to the Calculator component by
dragging it towards the Calculator component on the right. A new blue dotted line
will create automatically (Fig. 5). Repeat the same process for the parameter
Model_Beam_Profile_Rect_B.

2. Go back to the Sim-flow tab, double-click on the calculator component and write
the following command to create a new Volume parameter. Click on the
parameters when you want to include them in the string.

VOLUME= ‘Model_Beam_Profile_Rect_a'*‘Model_Beam_Profile_Rect_a'*29.15

6. Edit the Optimization component and run the model


1. Double-click on the Optimization component. Select NLPQLP as Optimization
technique in the drop down menu. Move to the Variables tab and select both
geometric parameters as variables. For both, enter 0.8 as lower bound and 1.1 as
upper bound. Switch to the Constraints tab, select the parameter Angle and enter
18.9 as lower bound and 19 as upper bound (Fig.7). Move to the Objectives tab,
select the parameter Volume and minimize as direction. Click OK.

2. Save (FileSave) and run (RunRun Model) the model. The model should
complete in about 25 runs.

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
Figure 7. Configuration of the Optimization component: constraints tab.

7. Optimization Post-Processing
Once the Isight run is completed, enter the History tab of the Isight Run Gateway
and make sure the Optimization component is selected in the left model tree (Fig.
8). Every line corresponds to a workflow run and shows the input and output
parameters used together with objective and penalty functions. Design feasibility
is coded by colour: red lines identify a run which does not meet the constraints
defined while the green line is the optimal solution found so far. The final optimal
geometry should resemble the one shown in Fig. 9.

Figure 8. History of the optimization 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
9
Figure 9. Final optimized geometry.

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy