Presentation is loading. Please wait.

Presentation is loading. Please wait.

WS2-1 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2 EXPRESSIONS: OVERVIEW.

Similar presentations


Presentation on theme: "WS2-1 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2 EXPRESSIONS: OVERVIEW."— Presentation transcript:

1 WS2-1 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2 EXPRESSIONS: OVERVIEW

2 WS2-2 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation

3 WS2-3 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW n Problem statement u Test your knowledge of expressions and database objects using the given model

4 WS2-4 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW n Model description u The model is made up of linkages that move based on various joints, motions, and springs n Getting to know expressions u Before you import the model, take a quiz on the different data types that you’ll investigate in this model. It is okay if you’re unsure, just guess. By the end of this workshop, you’ll have a better understanding of the data types.

5 WS2-5 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW MSC.ADAMS model characteristics: 1. An entity’s ID 2. Material type for a part 3. Comments for a design variable 4. Name of I marker for a joint 5. Stiffness coefficient for a spring 6. The joint that is used by a motion 7. Diagonal for a box Data types: String Integer Object Real String Matrix (Array of reals) Object n Quiz u Match the items in the left column with the choices in the right column. We’ve done one for you.

6 WS2-6 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW n Getting started To set up the model: 1. Start ADAMS/View from the directory exercise_dir/mod_02_expressions. Throughout the rest of the course we will not refer to exercise_dir. All workshops can be found in the same path. 2. From this directory, import the model command file express_test.cmd. 3. To get familiar with the model, simulate it: l End time: 1.25 l Steps: 50 l Reset the model

7 WS2-7 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW 4. Shade the model by selecting Render from the Main Toolbox. 5. Perform a looped animation: l From the Main toolbox, select the Animation tool. l At the bottom of the container, select Loop, and then select the Play tool. 6. Stop the animation using the Stop tool. 7. Select to exit the animation mode.

8 WS2-8 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW n Using full names u In ADAMS/View, the default name setting is to display short names. This means that the full names will not be shown in the various text boxes and functions. Instead, the shortest unique name will be shown whenever possible. Since you’re here to learn about the details of expressions, you need to reset the default to full names. You may want to do this later in the course as well. To use full names: 1. From the Settings menu, select Names. 2. In the Default Names dialog box, select Full names. 3. Select OK.

9 WS2-9 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW n Accessing the Expression Builder To access the Expression Builder: 1. From the Build menu, point to Design Variable, and then select New. 2. Right-click the Standard Value text box, point to Parameterize, and then select Expression Builder. The Expression Builder appears. 3. Clear the 0 from the Expression work area. Expression work area

10 WS2-10 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW n Find the material of part: rt_base u You will now use the Expression Builder to find various object data. There are three major steps to finding object data in the Expression Builder, as shown in the following figure: Step 1 Find the object Step 2 Get the data owned by the object Step 3 Evaluate the data Step 1 - Find Object Step 2 – Get Data Step 3 - Evaluate

11 WS2-11 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW n Step 1 -To find the part: 1. Under the Getting Object Data section, change the menu that has Markers currently selected to Parts. 2. Right-click the text box to the right of that menu, point to Part, and then select Browse. The Database Navigator appears. 3. Under the model name, express_test, select rt_base. 4. Select OK. The text box now has.express_test.rt_base in it.

12 WS2-12 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW n Step 2 - To get data owned by the part, in this case, material: 1. Select Get Data Owned By Object. A Selection menu appears. It is often referred to as the database dictionary. 2. From that menu, select material. 3. Click OK. Notice that the work area section of the Expression Builder now has.express_test.rt_base.material in it.

13 WS2-13 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW n Step 3 - To evaluate the expression: 1. Select Evaluate. 2. Use the value that is in the Function Value: section, below the work area, to answer the first part of Question 1 in the Module review section.

14 WS2-14 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW n Checking the data type u Before you can use the object data, often you may need to understand its data type. In this section, you’ll check the data type of the object you found. To check the data type: 1. Select OK in the Expression Builder to close it. 2. Notice the following in the Create Design Variable dialog box: l The material is now in the Standard Value text box as: (.express_test.rt_base.material) l The Type menu is set to Real. Now you’ll use warning messages as an indirect way of learning an object’s type.

15 WS2-15 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW 3. Right-click the Standard Value text box, point to Field Info, and then select Validate. A Warning window appears with the message: Invalid conversion from database object to real number The message indicates that the text box expects a real number, but you entered a database object, and that it is trying but unable to convert it. This exercise just shows you how to tell which data type it is: database object. 4. Return to Question 1 in the Module review section to answer the last part of the question.

16 WS2-16 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW n Getting more component values of database objects u Now you’ll practice finding component values of database objects, including design variables, diagonals of geometry, and more. To find the comments that are part of design variable.wing_length: 1. Open the Expression Builder again. 2. Clear the information in the work area. 3. In the Getting Object Data section, change the menu to Design Variables. 4. Right-click in the text box to the right of that menu, point to Variable, and then select Browse. The Database Navigator appears. 5. Under the model name, express_test, select wing_length. 6. Select OK. The text box now has.express_test.wing_length in it.

17 WS2-17 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW n To get the data owned by the object, in this case, comments: 1. Select Get Data Owned By Object. 2. From the Selection menu, select comments. 3. Select OK. Notice that the work area section of the Expression Builder now has.express_test.wing_length.comments in it. n To evaluate that expression: u Select Evaluate.

18 WS2-18 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW n To check the data type: 1. Select OK in the Expression Builder to close it. 2. Notice the following in the Create Design Variable dialog box: l The comments are now in the Standard Value text box as: (.express_test.wing_length.comments) l The Type menu is set to Real. 3. Right-click the Standard Value text box, point to Field Info, and then select Validate. A Warning window appears with the message: Invalid conversion from character string to real number The message indicates that the text box expects a real number, but you entered a character string, and it is trying but unable to convert it. This exercise just shows you how to tell which data type it is: character string.

19 WS2-19 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW 4. Answer Question 2 in the Module review section using the information you found. 5. Now repeat these steps to find the following database objects and answer the associated question in Module review section. Hint: You can also access the Function Builder directly by selecting Function Builder from the Tools menu. It is a quick way to test out function syntax when writing macros.

20 WS2-20 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW Find the database object:Tips:Use the value to answer: I marker for the joint: jt_rt_pillarUse the i choice.Question 3 Diagonals for the box geometry:.rt_base. BOX_2 Use the diag choice in the data dictionary. Question 4 Stiffness coefficient for the spring: spring_piston_cylind Because the spring owns this component value directly, you must browse one level deeper in the Database Navigator to find stiffness_coefficient and then get the data owned by the element. Question 5 Name of the joint that is used by motion: mot_rt_pillar Use the.name operator.Question 6 ADAMS ID for the part:.lt_wingUse the.id operator. Use the Type of design variable of Object instead of Real. Question 7

21 WS2-21 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW n Module review 1. What is the material for the part:.rt_base? What is its data type? ___________________________________________________________ ___________________________________________________________ ___________________________________________________________ 2. What is the comment that is part of the design variable:.wing_length? What is its data type? ___________________________________________________________ ___________________________________________________________ ___________________________________________________________ 3. What is the I marker for the joint: jt_rt_pillar? What is its data type? ___________________________________________________________ ___________________________________________________________ ___________________________________________________________

22 WS2-22 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2—EXPRESSIONS: OVERVIEW 4. What are the diagonals for the box geometry:.rt_base. BOX_2? What is their data type? ____________________________________________________________ ____________________________________________________________ ____________________________________________________________ 5. What is the stiffness coefficient for the spring: spring_piston_cylind? What is its data type? ____________________________________________________________ ____________________________________________________________ ____________________________________________________________ 6. What is the name of the joint that is used by motion:.mot_rt_pillar? What is its data type? ____________________________________________________________ ____________________________________________________________ ____________________________________________________________ 7. What is the ADAMS ID for the part:.lt_wing? What is its data type? ____________________________________________________________ ____________________________________________________________ ____________________________________________________________


Download ppt "WS2-1 ADM704-705, Workshop 2, August 2005 Copyright  2005 MSC.Software Corporation WORKSHOP 2 EXPRESSIONS: OVERVIEW."

Similar presentations


Ads by Google