Presentation is loading. Please wait.

Presentation is loading. Please wait.

WORKSHOP 3 PARAMETRICS In each module, review the problem statement and explain that you will use the concepts described below to solve it. Return to the.

Similar presentations


Presentation on theme: "WORKSHOP 3 PARAMETRICS In each module, review the problem statement and explain that you will use the concepts described below to solve it. Return to the."— Presentation transcript:

1 WORKSHOP 3 PARAMETRICS In each module, review the problem statement and explain that you will use the concepts described below to solve it. Return to the problem statement after each concept to make the connection.

2

3 Workshop Objectives Software Version Files Required car_suspension.cmd
Use the parametrics in ADAMS/View to prepare a model for use in an ADAMS/Insight DOE study Software Version Adams 2012 Files Required car_suspension.cmd

4 Suggested Steps Import the car_suspension.cmd model
Run the first simulation for 1 second and 50 steps Make a Quick Modeling Change in ADAMS/View Perform Parametrics by Hand Performing a Design Study Investigate Parametrics within ADAMS/View Creating Objectives Based on: Measures, Result Set Component, ADAMS/View Function, and ADAMS/View Variable and Macro

5 Import the Model First you will start ADAMS/View.
Change to the exercise_dir/mod_05_parametrics directory (where exercise_dir is the directory where your exercise files are installed). Start ADAMS/View from the command line as follows (append _x64 if 64-bit): UNIX: adams2012 -c aview ru-s i Windows: adams2012 aview ru-s i Import the model, car_suspension.cmd.

6 Run the First Simulation
Next you will run several simulations. To run the first simulation: Simulate the model for 1 second and 50 steps. The model goes through a simple parallel wheel travel maneuver. The purpose of a simulation like this is to verify the kinematics of the suspension system. Of particular interest is the orientation of the wheel as it translates up and down. Changes in the model geometry affect the wheel orientation-to- displacement relationship. Verify this by doing two simulations with different mechanism geometries.

7 Make a Quick Modeling Change in ADAMS/View
Run a dynamic simulation with the default model for 2 seconds and output time steps. Inspect the simulation results in ADAMS/PostProcessor by pressing F8 and then plotting the x-component (U2) of the TCC (pseudo toe caster camber) user-defined REQUEST. Return to ADAMS/View (press F8 in ADAMS/PostProcessor). From the Tools menu, select Table Editor. Modify the suspension geometry by filtering the table editor on Points (in the lower left corner of the window), and change the x-location of hpl_tierod_outer from 417 to 422.

8 Make a Quick Modeling Change in ADAMS/View (Cont.)
Simulate the model again and overlay the new plot with the original from step 2, above. Your plot should look something like the one shown below. This verifies how easy it is to make modeling changes in the parametric ADAMS/View environment. Next you will repeat this manually to get a feel for how difficult this process is without a parametric modeling tool.

9 Performing Parametrics by Hand
To get an idea of how a DOE study might have been conducted in the past, you will alter the model by hand. You will then explore the design space for the mechanism to determine settings for a baseline, or nominal, model from which to start a future DOE. Performing the process manually requires an ADAMS/Solver dataset model (.adm) file. For each configuration of the model that must be analyzed, you will alter this dataset file and run it through ADAMS/Solver to generate results. You can then analyze the resulting set of output files for all of the configurations.

10 Modify Parametrics By Hand
Reset the tierod location to have an x-value of 417. Write out a dataset .adm model file that ADAMS/Solver can understand by doing the following: From the File menu, select Export. Select ADAMS/Solver Data Set as the file type. Keep the default file and model names and select OK. Run the dataset file through ADAMS/Solver to generate results for the original model. The file run_default.acf has commands to load the model file named car_suspension.adm, run the simulation for 2 seconds and 100 steps, and save the results with a filename prefix of default_results. Ensure you’ve written the .adm file out as car_suspension.adm and then simulate from the command line as follows (_x64 if 64-bit): UNIX: adams2012 -c ru-s run_default Windows: adams2012 ru-s run_default

11 Modify Parametrics By Hand (Cont.)
You should now have results files with .out, .gra, .msg, and .req extensions. Open the .adm file in a text editor. You will change the model geometry by editing the .adm file and running the simulation again. There are two markers in the model that are affected by the location of the point hpl_tierod_outer in the ADAMS/View model. These are MARKER/18 on PART/6 (the left tierod) and MARKER/17 on the left knuckle part. When you changed the location of hpl_tierod_outer, these two markers changed locations due to the parametrics that have been set up. The ADAMS/Solver dataset doesn’t contain any parametrics; to mimic a hardpoint change that you would make in ADAMS/View, change the marker locations in the .adm file. Change the x-location of MARKER/17 and MARKER/18 from 417 to 418. MARKER/17, for example, would become: MARKER/17, PART=8, QP = 418, -750, 330

12 Modify Parametrics By Hand (Cont.)
Save this modified dataset file as car_suspension1.adm. Change the x-location to 419, 420, and 421, saving the files as car_suspension2.adm, car_suspension3.adm, and car_suspension4.adm, respectively. Each of these will be simulated, yielding 4 sets of ADAMS/Solver output files that you can analyze. Run the run_all.acf file through ADAMS/Solver using the same commands as in step 3. Did all of the simulations run successfully? ________________________ To investigate this, look at the output in the .msg files. There shouldn’t be any errors or warnings for these models. In general, do the variable values affect the probability of a simulation running successfully? ___________________________________________

13 Modify Parametrics By Hand (Cont.)
Should a simulation run for any variable value, or should there be a range limiting the variable values? __________________________________________ At this point, if you were really doing a DOE by hand, you would likely import the results file data into a statistical package of some sort and set up the relationships of interest. We won’t go into this level of detail at this time. As you can see, performing parametrics by hand is quite a chore.

14 Performing a Design (Or Sweep) Study
You can run a design, or sweep, study in ADAMS/Insight to see what happens when you run a factor linearly through a range of values. This is often done when initially exploring the design space of a model to help understand how a design variable influences a particular aspect of the model. To run a study that is similar to the previous command-line and text editor process from ADAMS/Insight: Import a new copy of car_suspension.cmd, deleting the existing database. Export the model to ADAMS/Insight, specifying the following: Experiment: sweep_test Model: specify current model name Script: Last_Sim

15 Performing a Design (Or Sweep) Study (Cont.)
Promote only the hpl_tierod_outer.x factor. Promote both candidate responses to be inclusions. Set the Design Specification as follows: Study - Sweep Linear Number of Runs: 5 Select Apply. Build the workspace and run the models. Return to ADAMS/Insight by displaying the experiment sweep_test. Fit the results, then review the workspace: Look at the Terms Display for each of the responses in the Regression list. Note the coefficient (Coeff) values displayed for the tierod x-location for each response. Is it reasonable that the right toe angle is not dependent on the left tierod location? _____________________

16 Performing a Design (Or Sweep) Study (Cont.)
Learning about nominal models Any kind of design study, be it a DOE, optimization, variable sweep, and so on, requires bounds for the variables that are being investigated. A nominal model is one that represents a typical solution within the design space, and is also robust when changes are made to it, meaning that it still solves in ADAMS/Solver correctly and the results make physical sense. Using the Table Editor as in the first section of the module, verify that you can alter the location of the hpl_tierod_outer hard point by +/- 10 units in any direction, and the model will solve without problems.

17 Investigate Parametrics within ADAMS/View
Only certain entities inside of ADAMS/View are automatically identified by ADAMS/Insight as potential factors. These are construction points (or hard points) and design variables. Other entities, such as marker locations or geometry attributes, aren’t inherently parametric, so they aren’t considered factors in ADAMS/Insight. If a model doesn’t contain the parametrics that you need, you can always add the required parametric relationships. Import a new copy of car_suspension.cmd, deleting the existing database. Run a simulation for 2 seconds and 100 steps to create a simulation script in the background. Export the model to ADAMS/Insight, specifying the current model and Last_Sim as the simulation script.

18 Investigate Parametrics within ADAMS/View (Cont.)
How many potential factors are reported by ADAMS/Insight? __________ All of the entities are children of which body? __________________ Close the ADAMS/Insight window, returning to ADAMS/View. Open the Table Editor (From the Tools menu, select Table Editor) and filter on Points in the lower left corner. How many construction point entities are in the suspension model? _______________________ Does this correspond to the number of factors reported in ADAMS/Insight? ____________________________________

19 Investigate Parametrics within ADAMS/View (Cont.)
Delete the construction point hpl_tierod_outer as follows: Click on the toolbox pointer to clear any selections in ADAMS/View. From the Edit menu, select Delete. Select the construction point under the ground part. Select Remove Parametric Expressions. Note that this will remove the parametric dependency of the elements that use the construction point location and delete the construction point only. Selecting Delete All deletes the construction point and any entity that uses the construction point. How many potential factors are there now that one of the construction points is gone? _______________________________________

20 Investigate Parametrics within ADAMS/View (Cont.)
Return to ADAMS/View and add a design variable to the model. Create a design variable that specifies the tire thickness as follows: Right-click on the tire geometry and modify the wheel cylinder. Right-click in the Length text box, select Parameterize, and then select Create Design Variable. This creates a design variable having the current length value of the cylinder. From the Build menu, point to Design Variable, and then select Modify. Change the standard value of the design variable and the wheel width should update accordingly. As design variables form the basis of parametrics within ADAMS/View, ADAMS/Insight knows to include these as potential factors. Verify this by exporting the model to ADAMS/Insight again. The number of potential factors should have increased by one.

21 View the Existing Objectives within the car_suspension Model
ADAMS/Insight looks for all of the defined design objectives withing ADAMS/View model to determine candidate responses. The objective entity can be created in a number of different ways within ADAMS/View. You can view these methods in the Modify Design Objective dialog box. Modify the toe_left_REQ objective in the model by doing the following: From the Simulate menu, point to Design Objective, and then select Modify. As in the previous module, list the five ways in which a design objective can be defined: 1. _____________________ _____________________ 3. _____________________ _____________________ 5. _____________________

22 Evaluate the Objectives
Because a proper objective formulation is important in correctly defining your DOE study, you’ll create one objective of each type for this model. Before creating the objectives, you need a method to evaluate an objective value. If a simulation doesn’t exist, run one to generate a results set. Use the menu pick: Simulate -> Design Objective -> Evaluate to evaluate the objective toe_left_REQ.

23 Creating Objectives You can create an objective based on the following: Measures Result set components ADAMS/View functions ADAMS/View variable and macro results Objectives based on measures Objectives based on measures are one of the simplest kind of objectives to create: make a measure object in ADAMS/View, then create an objective and reference the measure object. Select from properties of the measure such as maximum value, last value, average value, and so on. In this section you’ll create an objective of this type that measures the maximum displacement magnitude in the upper left ball joint, joint jl_uca_ball.

24 Objectives Based on Measures
To create the objective: Right-click on the ball joint jl_uca_ball and create a measure on the marker gel_upper_control_arm.marker_10 that measures the displacement magnitude. Name the measure meas_marker_displacement. From the Simulate menu, point to Design Objective, and then select New. Create an objective with the following parameters: Name: obj_max_displacement Definition: Measure Measure: meas_marker_displacement Value: max. value during simulation Rerun the simulation and evaluate this objective on the command line to verify that it works as expected. What is the maximum displacement value? ___________________________________

25 Objectives Based On Result Set Component
Creating objectives based on result set component and existing result set component These are simple objectives to create as well. Instead of getting data from a measure object, the objective gets data from a REQUEST or an existing result set. The existing results set method is a newer way to create objectives. It can access the same data as REQUESTs, but it gives you the advantage of browsing through a results set in ADAMS/View, looking for the component you want. The existing objectives in the model, toe_left_REQ and toe_right_REQ, are based on REQUESTs. To create an objective based on REQUESTs: In the Result Set Component text box, specify the REQUEST name.

26 Objectives Based On Result Set Component (Cont.)
To create an objective based on an existing result set component: Right-click in the text box, and select Result Set Component. Use the Browse option to navigate through the result set objects to specify the result you want.

27 Objectives Based On ADAMS/View Functions
Creating objectives based on ADAMS/View functions: These are more powerful, but somewhat difficult to create. An ADAMS/View function can operate on the data returned from a simulation, accessing the rich functions available in ADAMS/View (see the guide, Using the ADAMS/View Function Builder, for a reference of all available functions). You would use an ADAMS/View function to calculate a quantity that isn’t a minimum, maximum, last, or average value that is provided with the REQUEST- and measure- based techniques. For example, you use a function if you want to calculate a quantity in the frequency domain. A Fast Fourier Transform (FFT) can be done on a dataset using the ADAMS/View function FFTMAG(). Because the FFT must be done on a complete dataset, the calculation must be done after a simulation is run, which is the case with an ADAMS/View function-based objective.

28 Objectives Based On ADAMS/View Functions (Cont.)
To get the maximum magnitude in the frequency domain of a joint angle measure named JointAngle, for example, the ADAMS/View expression language would be: AmpMax = MAX(FFTMAG(JointAngle, COLS(JointAngle))) where the variable AmpMax stores the result. You’ll create a similar objective in the model that calculates the maximum amplitude in the frequency spectrum for a measure of the upper control arm angle at the revolute joint. While not the most exciting measurement, it is simple to visualize.

29 Objectives Based On ADAMS/View Functions (Cont.)
To create an objective Create a measure named meas_uca_angle that tracks the joint angle in the revolute joint jl_uca. Create an objective named obj_max_freq_mag based on an ADAMS/View function. You need to create the ADAMS/View function now. In the Function text box, right-click and create a new function. The Function Builder appears. Create the function by specifying the following: Function: MAX(FFTMAG(meas_uca_angle, COLS(meas_uca_angle))) Arguments: analysis Passing ‘analysis’ as the argument to the function is essential because the objective calls the function and passes into it the analysis object containing all results from the last simulation. Without this analysis object, the function wouldn’t know from which analysis to extract the meas_uca_angle data.

30 Objectives Based On ADAMS/View Functions (Cont.)
Test the function by selecting Evaluate. Name the function func_max_fft_mag and select OK. The Create Design Objective dialog box should now look as shown next. Select OK to create the objective. Ensure that there are simulation results in the model, then test the objective by evaluating it.

31 Objectives Based On ADAMS/View Variable and Macro
This is probably the most powerful way to create an objective, as macros allow for a lot of flexibility in calculating quantities. While an ADAMS/View function is a single function expression that can get long and complicated, a macro can contain lines of computations in the same manner that a FORTRAN or C subroutine does. Macros are, therefore, more readable than an ADAMS/View function expression. In addition, macros can directly interact with the ADAMS/View environment. For example, a macro could run the model for a bit longer if the simulation didn’t reach a desired configuration within the simulation time. For more information on creating macros, see Automating Your Work Using Macros, in the guide, Customizing ADAMS/View. To illustrate this, you’ll create an objective based on a macro that does the same computation as the ADAMS/View function example did.

32 Objectives Based On ADAMS/View Variable and Macro (Cont.)
To create the objective: Create a new objective named obj_max_freq_mag_macro that is defined by an ADAMS/View variable and macro. Because there is no macro created yet, right-click on the Macro text box and select Create. Name the macro mac_find_max_freq_mag and enter commands that are equivalent to the ADAMS/View expression presented previously. Here’s what the macro commands could look like, splitting up the expression and adding comments to make things more readable: Comment lines in macros start with exclamation points, with the exception of the very first line which defines the type and name of any arguments passed into the macro.

33 Objectives Based On ADAMS/View Variable and Macro (Cont.)
Specify the variable name that the objective uses. This must be the same name as the result variable, var_max_mag. The Create Design Objective dialog box should now have these parameters: Again, check the objective value. It should return the same result as the ADAMS/View function objective definition.

34 Objectives Based On ADAMS/View Variable and Macro (Cont.)
Export the model to ADAMS/Insight to check that the new objective appears as expected. There are several ways to create objectives in ADAMS/View. The higher complexity in ADAMS/View functions and macros offers powerful flexibility for creating very specific measures. Standard Adams quantities are very easy to capture using the Measure and Request methods.


Download ppt "WORKSHOP 3 PARAMETRICS In each module, review the problem statement and explain that you will use the concepts described below to solve it. Return to the."

Similar presentations


Ads by Google