Introducing the Tutorial

Overview

This chapter introduces you to the tutorial and gets you started. The tutorial demonstrates how the Adams Insight and ASCII conduit can be used in conjunction with Adams Solver simulation files.
The sections in this tutorial are:
This tutorial takes about one hour to complete.

About this Tutorial

In this tutorial, you will use Adams Insight ASC with Adams Insight. You will start with two text files that describe a dynamics system. These text files are Adams Solver input files that represent a bungy-jump event. An Adams model file (.adm) describes the dynamics system and the Adams control file (.acf) provides instructions to Adams Solver of how to run the particular job. You will import the two text files into Adams Insight ASC, making them ASC templates. Then, you will parameterize the two ASC templates (referencing attributes such as, numerical values of mass, free length, and stiffness). You will also parameterize text fields, such as simulation titles and simulation names. Finally, you will use Adams Insight to create a Web page, where you can interactively adjust the free length of a bungy cord to limit the travel distance of a jumper when he or she jumps.

About Adams Insight with ASCII Conduit

Adams Insight is a stand-alone product that also works with Adams Car, Adams Controls, Adams Durability, and Adams View. Adams Insight lets you design sophisticated experiments for measuring the performance of your mechanical system. It also provides a collection of statistical tools for analyzing the results of your experiments so that you can better understand how to refine and improve your system.
Within the Adams analysis environment, there are conduits between Adams Insight and the other Adams products (for example, Adams Car). These conduits streamline the process by taking advantage of the inherent parametric strengths of the vertical application.
When these parametric applications are not accessible, you can use the Adams Insight ASCII Conduit (Adams Insight ASC). It provides the power of a streamlined parametric investigation process for systems that are defined by text files. For example, if you only have an .adm and .acf file of an analytical Adams Solver system, you could use Adams Insight ASC to easily execute various Adams Insight investigation strategies. Adams Insight ASC has an editor that enables you to import the ASCII files (.adm, .acf) and turn them into ASC templates, which together define an ASC system.
Adams Insight ASC is a general-purpose tool that helps you work with various analysis environments, from your own or inhouse-developed applications to commercial applications which accept an ASCII input deck.

Getting Started

Here you will create your working directory and copy over the necessary files.
Note:  
On Windows, you may need to set the permissions to Full Control to edit the tutorial files.
To get started:
Note:  
You can skip steps 1-3 below if you previously used the Help ‡ Copy Examples to feature to copy all of the tutorials for Adams Insight.
1. Create a working directory called ain_examples/asc. This directory will contain all of the files for this tutorial.
2. Copy the following files from <install_dir>/ainsight/examples to the newly created working directory:
ain_tut_101_asc_adm.acf
ain_tut_101_asc_adm.adm
3. Copy the two Adams simulation files by performing one of the following from a command prompt in the ain_examples/asc directory:
On Windows:
copy ain_tut_101_asc_adm.acf bungy.acf
copy ain_tut_101_asc_adm.adm bungy.adm
On Linux:
cp ain_tut_101_asc_adm.acf bungy.acf
cp ain_tut_101_asc_adm.adm bungy.adm
4. Ensure that the simulation runs by submitting bungy.acf to Adams Solver by entering the following from your working directory in the command window:
On Windows: adams2024_1 ru-s bungy.acf
On Linux: adams2024_1 -c ru-standard i bungy.acf exit

Parameterizing the System

Here, you will create an Adams Insight ASC system. You will first start the Adams ASC editor and import two text files, bungy.adm and bungy.acf. You create an ASC template by importing a text file(s) into an ASC system. In this tutorial, you import two text files, which results in two ASC templates. (An Adams Insight ASC system can have many ASC templates.)
Once you’ve created these ASC templates, you will use the Adams Insight ASC editor to parameterize the ASC templates by annotating them. This process involves delineating regions of text in the templates. In this way, you can identify parts of the template that will subsequently be replaced. This substitution process occurs when variants of the nominal system are automatically generated as part of an investigation strategy.
To parameterize the system:
1. From the command prompt, start the Adams Insight ASC Editor from the working directory as follows:
On Windows: adams2024_1 ainsight -ascg
On Linux: adams2024_1 -c ainsight -ascg exit
2. Do one of the following:
From the File menu, select Import.
Select the Import text file tool .
3. Select the file bungy.acf.
4. Select Open.
5. Using the same process, import the file bungy.adm.
Next, you will annotate the two ASCII templates by identifying the regions that will be substituted, as follows:
Highlight the text that is to be substituted.
Associate a variable with the highlighted text.
For example, if you have a string such as, 'PART/02 , MASS = 160.0, CM = 0203' and you want to alter the mass of the part, you would first highlight the numeric value of '160.0', and then right-click and assign the highlighted text to a variable (by either creating a new variable, or referencing an existing variable displayed in the shortcut menu). When creating a new variable, you can define the following:
Name: Descriptive name of the variable.
Format: Controls how the value will be printed. The convention follows the C printf() convention of %d for integer, %f for float, %e scientific, and %s for string. On Linux, use the man printf command to get more information on this numeric formatting convention. In most cases, you don’t need to modify the default value.
Value: Default value that was originally highlighted.
Description: Optional supplemental information regarding the particular variable.
Note:  
The double curly brace delimiters '{{' '}}' that appear in the text file are the default delimiters. You can change them on a template-by-template basis in the template properties.
6. From the Template menu, select bungy.adm.
7. Highlight the numeric value of the mass of the jumper (160.0).
8. Right-click and select Create.
The Create Variable dialog box appears.
9. Change the value of the Name text box from F_05 to mass.
10. Leave the default values in the remaining text boxes.
11. Select OK.
The corresponding text is modified as follows:
From: PART/02 , MASS = 160.0, CM = 0203
To: PART/02 , MASS = {{mass=160.000000}}, CM = 0203
12. Highlight the numeric value of the function of the free-length variable.
13. Right-click and select Create.
14. In the Name text box, enter free_length.
15. Select OK.
16. Select the IC value of the free-length variable.
17. Right-click, point to Replace, and then select the variable free_length.
The following shows how the corresponding text was modified:
From: VARIABLE/01, IC=100.0, FUNCTION=100.0
To: VARIABLE/01, IC={{free_length}}, FUNCTION={{free_length=100.000000}}
18. Create another variable for the stiffness by repeating the steps above, using the following parameters:
From: VARIABLE/02, IC=4.0, FUNCTION=4.0
To: VARIABLE/02, IC={{stiffness}}, FUNCTION={{stiffness=4.000000}}
19. To parameterize the title of the simulation, add the predefined variable of ascTrialName to the title description so that the first line of bungy.adm ASC Template looks as follows:
Bungy Jump (Adams Insight ASCII Conduit) {{ascTrialName}}__bungy.adm
Note:  
Be sure that there are two underscores between the closing curly brace and bungy.
The parameterization of the bungy.adm ASC template is complete. Now, you parameterize the analysis names specified in the bungy.acf ASC template (first you open the appropriate ASC template and then parameterize it).
20. From the Template menu, select bungy.acf.
21. Parameterize the first two lines of the bungy.acf ASC template so they look like the following:
{{ascTrialName}}__bungy.adm
{{ascTrialName}}__bungy
Note:  
Be sure that there are two underscores between the closing curly brace and bungy.
22. Specify ASC template properties specific to the bungy.acf ASC template: from the Edit menu, select Template Properties.
The Template Properties dialog box appears.
23. Now you will specify how the simulations will be run. Do this by completing the following text boxes:
On Windows:
Execution Prefix: adams2024_1 ru-s
On Linux:
Execution Prefix: adams2024_1 -c ru-stan i
Execution Postfix: exit
24. Enter a Python dictionary definition in the Post Operations (Dict) text box. For this example, copy and paste the following:
{'total_length':'adams_r.Fetch_req(1,3,"max")','max_acc':'adams_r.Fetch_req(1,4,"max")'}
This string specifies what happens after the simulations are complete. Specifically, what parts of the simulation results files will be interrogated or how the postprocessing will occur. The results are retrieved from the solver files and specific values are placed in the Work Space.
 
Note:  
You can also see an example of this string on a commented-out line in the bungy.adm file.
25. Select OK.
Now you will specify some optional ASC system attributes, such as a name and description. This can be helpful for future reference.
26. From the File menu, select ASC Properties.
The ASC System Properties dialog box appears.
27. Complete the text boxes as follows:
Name: Jump
Description: Bungy jump tutorial example
28. To save the ASC system properties, select OK.
29. Save the ASC system to disk.
a. From the File menu, select Save As.
b. In the File name text box, enter j_asc.
c. Select Save.
This creates a file on disk called j_asc.xml. This is the ASC system with the two ASC templates. You can view this file using a text editor or a browser.
30. From the File menu select Export Experiment.
This automatically generates an Adams Insight experiment with the factors and responses you defined in the ASC system. The default Adams Insight experiment file is called j_asc_exp.xml.
Note:  
Look in the window that you used to start the Adams Insight ASC editor for warning messages. Make corrections as necessary.
31. Perform one of the following:
To continue with the tutorial, see Creating the Experiment.
To quit the tutorial and exit the ASC Editor, from the File menu, select Exit.