www.kxcad.net Home > CAE Index > MSC Software Index > Adams MD R2 Index
Using Design VariablesDesign variables let you invent your own independent parameters and tie modeling objects to them. For example, if you have three cylinders in your model that you want to keep the same length, you can create a design variable called cylinder_length and control all three cylinder lengths with the design variable.Design variables also let you organize the critical parameters in your design into a concise list of values that you can easily review and modify. In addition, you can use parametric analyses to automatically execute a series of simulations that vary your design variables.Design variables are Adams/View variable objects. Variable objects are general-purpose places to store data or expressions. A design variable is a variable you use specifically to parameterize your model. This chapter and the parameterization tools use the term design variable. Some tools, such as the Command Navigator and the Table Editor, apply to all variables, however. In those contexts, you see just the term variable. It it applies to all variables, including design variables.You create design variables using the Create Design Variable dialog box or the Create Design Variable command that appears in the shortcut menu of any text box that accepts a design variable.
• The Create Design Variable dialog box lets you select the type of design variable you want and assign a value to the variable. It does not place the variable in your model where it is to be used, however.
• The Create Design Variable command on the shortcut menu lets you create a design variable and places the variable in your model where it will be used, all in one operation. It uses default values for your variable. You must modify the variable to change its type or name.
• Creating Design Variables using a Dialog BoxThe following procedure explains how to create a design variable using a dialog box. You can create a design variable of the following types: real, integer, string, and object. For real and integer variables, you can also specify information about how to vary the value during a parametric analysis. These options are described in Controlling Variable Values.
1.
2. In the Name text box, enter the name of the design variable. Adams/View creates a default name for you. Select the type of design variable to create.
4. Enter a standard value for the design variable, and set any other options as explained in the Create Design Variable dialog box.
5. Select OK.Now that you've created a design variable, you'll need to reference it in your model. You can enter the design variable directly, using the Reference Design Variable command, or you can type it into a text box. You can also use the Function Builder to create a more complex expression using the design variable. When you reference your design variable, Adams/View places parentheses () around the variable because you are creating a simple expression that references the value of the design variable.
• If you are creating a new object, select a tool from the Main toolbox to display a settings container or display the appropriate create dialog box.
•
2. Right-click the text box representing the value to be parameterized, point to Parameterize, and then select Reference Design Variable.You can use the Create Design Variable command on the shortcut menu to create a design variable and place the appropriate expression in a text box all in one operation. Adams/View uses the value currently in the text box as the standard value.
• If you are creating a new object, select a tool from the Main toolbox to display a settings container or display the appropriate create dialog box.
•
3. Adams/View creates a new design variable with a default name and the value that was in the text box and inserts an expression such as (.my_model.DV_1) into the text box.Modifying Design VariablesYou can modify a design variable, such as change its standard value. You can use the Modify Design Variable dialog box or the Table Editor.
1. Adams/View displays the Modify Design Variable dialog box and loads the current properties for the design variable you selected.
3. Change the properties as desired, following the instructions in the Modify Design Variable dialog box.
4. Select OK.If you changed the value of the design variable, Adams/View immediately updates any objects that refer to the design variable.
1.
2.
3.
4. Select OK.If you changed the value of a design variable, Adams/View immediately updates any objects that refer to the design variable.
By default, the Table Editor displays only variables of the type real in your model. You can display other types of variables, such as string, object, or integer, and control the columns that are displayed using the Filters button, which displays the Variables Table Editor Filters dialog box. Learn about Setting Types of Objects Displayed in the Table Editor.Using Design Variables with PointsAs explained in Using Points, points are an easy way to parameterize the geometry of your model. To vary a point in a parametric analysis, however, you must create design variables for one or more coordinates of the point.Adams/View displays the cell value in the Input text box.
3. Right-click the Input text box, point to Parameterize, point to Create Design Variable, and then select Real.Adams/View creates a new design variable with a default name and the value that was in the text box and inserts an expression, such as (.my_model.DV_1), into the text box.
4. Select OK.