Step 13. Add an Animation Next to the Plot

Download Report

Transcript Step 13. Add an Animation Next to the Plot

WORKSHOP 3
ADAMS/POSTPROCESSOR OVERVIEW
Rocker
Rod
Guide (ground)
Valve
Cam
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 1
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 2
• Workshop Objectives
– Use Adams/View to manipulate, review, and refine the results of the
valvetrain model, which you simulated in the previous workshop.
• Software Version
– Adams 2013
• Files Required
– valve.cmd
– Located in the directory:
exercise_dir/mod_02_aview_interface/completed
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 3
• Problem Description
–
–
–
–
–
–
–
The model represents a valvetrain mechanism.
The cam is being rotated at a given velocity.
The rod (follower) moves translationally based on its constraint to the cam.
The rocker pivots about a pin attached to the engine block.
The spring is always in compression to try and keep the rod in contact with the cam.
The valve moves vertically as the rocker rotates.
When the valve moves, it lets small amounts of air into the chamber below it (not
modeled here).
Rocker
Rod
Guide (ground)
Valve
Cam
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 4
• Suggested Steps
1. Import the file valve.cmd.
2. Simulate the model.
3. Plot the Displacement vs Time.
4. Plot the Force in Spring vs Time.
5. Find the spring coefficient.
6. Modify the spring coefficient and simulate.
7. Overlay the plots for force in spring for both simulations.
8. Use the on-line help to get plot statistics.
9. Modify the plot title.
10. Modify the vertical axis label
11. Modify the legend text and placement.
12. Add an animation next to the plot.
13. Adjust the view of the animation model.
14. Play an animation of the results.
15. Change the color of the cam.
16. Modify the animation window view.
17. Enlarge the graphics that illustrate force.
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 5
Step 1. Import File
To import the file.
a. Start Adams/View.
b. From the Welcome dialog box, select
Existing Model.
c. Click the file folder icon, and the Select
Directory dialog box appears.
d. Find and select the directory
Exercise_dir/mod_2_aview_interface.
e. Click OK .
f. Click on the file folder icon of the File
Name , select the file valve.cmd and
click Open.
b
d
e
f
c
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 6
Step 1. Import File (Cont.)
g. Click OK on the Open Existing
Model dialog box.
g
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 7
Step 2. Simulate the Model
a
b
To run a simulation:
a. Select the ribbon Simulation.
b. From the options available
select “Run an Interactive
Simulation.”
c. In the Simulation Control
dialog box select End Time.
d. In the text box adjacent to End
Time, enter 2.
e. In the text box adjacent to
Steps enter 100.
f. Click on the Play tool.
g. When the simulation is
complete, click the Reset tool.
h. Save the simulation results with
the name second_results just
as you did in Workshop 2, page
WS2-15.
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
f
g
c
d
e
WS3 - 8
Step 3. Plot Displacement vs Time
To Plot Displacement of the Valve
verses Time:
a. From the ribbon Results, select
the Adams/PostProcessor
tool, or press F8.
b. In the dashboard at the bottom
of the window, in the simulation
section, select the name of the
results set you just saved
(second_results) in the previous
step.
c. In the same section of
Simulation, set Source to
Measures.
d. From the Measure list, select
Valve_Displacement.
e. In the right corner of the
dashboard, click Add Curves.
a
b
d
c
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 9
e
Step 4. Plot the Force in Spring vs Time
To Plot the Force in the Spring
verse Time:
a. From the toolbar, select the
Create a New Page tool.
b. Notice that now in the treeview,
on the left side of the
Adams/PostProcessor window,
you have two pages.
c. From the Measures list, select
Force_in_Spring.
d. Click Add Curves.
e. To return to Adams/View, in the
upper right corner of the main
toolbar, select the Adams/View
tool or press F8.
f. Note: if you resized the
Adams/PostProcessor window
the Adams/View tool may no
longer be visible. If this
happens, then stretch the
window to see the tool again.
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
a
e
b
d
c
WS3 - 10
Step 5. Find the Spring Coefficient value
a
To find the spring stiffness
coefficient:
a. In the Model Browser, Under
Forces, find and select
SPRING_1. The related spring
will be highlighted as shown in
the snapshot.
b. Right-click the SPRING_1 and
select Info.
c. The information window
appears.
d. Note the value of the spring
stiffness coefficient. Use that
value to answer Question 2 in
the Workshop 2, Review
section, page WS3-27.
e. Click Close on the information
window.
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
a
b
c
e
d
WS3 - 11
Step 6. Modify the Spring Coefficient value and
Simulate
To modify the spring stiffness to
200 lb/foot:
a. Right-click the SPRING_1 in
Model Browser as done in
previous step and then select
Modify. The Modify a SpringDamper Force dialog box
appears.
b. In the Stiffness Coefficient
text box, enter 200 (lbf/foot).
Note: in this case the
parentheses for the units are
necessary because they are
compound fractional units.
c. Click OK.
d. Run a simulation, similar to how
you did earlier in workshop 2
(page WS2-14), for 2 seconds
with 100 steps, and then save
the simulation results as
third_results, similar to how
you did in workshop 2, page
WS-15.
a
b
c
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 12
Step 7. Overlay Plots of Force in Spring for Both
Simulations
a
To overlay plots:
a. From the ribbon Results, select
the Adams/PostProcessor
tool.
b. From the toolbar, select the
Create a New Page tool.
c. From the Simulation list, select
both the second_results and
the third_results.
d. Set the Source to Measures
e. From the Measure list, select
Force_in_Spring.
f. In the bottom right corner of the
dashboard, under Independent
Axis, ensure that Time is
selected.
g. Click Add Curves.
b
g
c
e
f
d
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 13
Step 8. Zoom & Pan Within a Plot
To Zoom a plot:
a. From the toolbar, select the
Zoom Into Area tool or use
keyboard shortcut “w”.
b. Click and drag a box to zoom in
that area.
a
e
c
To Pan within a plot
c. From the toolbar, select the Pan
Plot tool or use keyboard
shortcut “p”.
d. Pan the plot by mouse left click,
drag and release or with
keyboard arrow keys.
e. From the toolbar, select the Fit
tool or use keyboard shortcut “f”
to refit the plot to its extent.
b
d
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 14
Step 9. Use On-Line Help to get Plot Statistics
To use the help to get the Plot
statistics tool:
a. From the Adams/Post
Processor’s help menu, select
Adams/PostProcessor Help.
b. Select Building Plots>Plot
Basics > Displaying Plot
Statisics About Curves.
c. After reading the information,
use the Plot Statistics toolbar to
find the maximum
Force_in_Spring value in the
third simulation, when the spring
coefficient was 200 lbf/foot.
d. Once you find the
Force_in_Spring value, use it to
answer Question 3 in the
Workshop 3, Review section,
page WS3-27
a
b
c
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 15
Step 10. Modify the Plot Title
To modify the plot title:
a. In the treeview, click on the + sign to
expand page_3.
b. Click on the + sign to expand plot_3.
c. Select title.
d. In the property editor below the
treeview, clear the current title valve,
and then enter the new title Spring
Force vs. Time
c
a
b
d
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 16
Step 11. Modify the Vertical Axis Label
To change the vertical axis label:
a. In the tree view, select vaxis for page_3.
b. In the Property editor, select the Labels tab.
c. Change the label to Spring Force (lbf).
a
b
c
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 17
Step 12. Modify the Legend Text and Placement
To modify the Legend Text:
a. In the treeview, select curve_1 for page_3.
b. In the property editor below, change the Legend
text box to k=100(lbf/foot)
c. Repeat steps a and b for curve_2, only change
the Legend text box to k=200 (lbf/foot).
a
To modify the legend placement:
d. In the treeview, select legend_object, for page 3.
e. In the property editor below, set Placement to
Top right.
d
b
e
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 18
Step 13. Add an Animation Next to the Plot
To add an animation next to your plot:
a. In the treeview, select page_2
b. Split the screen by right-clicking on the
Page Layout tool stack in the main
toolbar.
c. Select the Split Screen tool.
b
a
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 19
c
Step 13. Add an Animation Next to the Plot (Cont.)
a. Set the new viewport to Animation
by right-clicking in the viewport and
choosing Load Animation from the
pop-up menu.
b. From the Database Navigator, select
the third_results.
c. Click OK
b
a
c
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 20
Step 14. Adjust the View of the Animation model
To adjust the view of the animation model:
a. Adjust your view of the model on your
screen using the tools in the main
toolbar. The figure below highlights the
tools that are available. Try
experimenting with these tools.
Dynamic Translate
Center
View Zoom
View Fit
Dynamic Rotate
Front, top, side, back, bottom, and
isometric views
Select
Wireframe/Shaded toggle
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 21
Icon Visibility toggle
Step 15. Play an animation of the Results
To play an animation of the results:
a. Make sure that the animation window is selected.
b. To play the animation, press the play button.
c. To pause the animation, press the pause button.
d. To Play the animation backwards, press the Rewind button.
e. When finished animating the results, press the reset button.
e d c b
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 22
Step 16. Change the Color of the Cam
To change the color of the Cam:
a. Make sure that you have the animation window
selected. From the treeview, expand the model
by clicking on the + sign next to the model
named valve.
b. Select Cam.
c. In the property editor, set Color to Coral.
b
a
c
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 23
Step 17. Modify the Animation Window View
a
b
c
d
e
f
•
g
l
h
i
j
k
To modify the animation window view:
a. Click on the View Tab.
b. Check the Display Icons box , and notice the icons are now displayed on the model.
c. Check the Perspective box, and see that the model now has perspective added to it.
d. Check the Title box, and the title is added to the window in the upper left corner.
e. Check the FPS in Title box, and the frames per second is displayed with the title.
f. Check the Display Triad box, and the triad is displayed in the lower right corner.
g. Left click and drag the Light intensity slide bar to change the light intensity, you may also enter a value to the
right.
h. Left click and drag the Ambient Light slide bar to change the ambient light, you may also enter a value to the right.
i. Left Click and drag the Light Angle slide bar to change the light angle, you may also enter a value to the right.
j. To toggle light reflections check the Light Reflections check box.
k. To toggle two-sided lighting, check the Two-Sided Lighting box.
l. You can change the light source by clicking on the light source direction that you desire. Note: This will affect the
Light Intensity value.
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 24
Step 18. Create Appearance rule
l
a
b
•
c
d
e
f
g
i
h
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
j
k
To create an Appearance rule which will change the color of Valve
part, when spring force is non-zero:
a. Click on the Appearance Tab.
b. Click on New Rule, which displays the Create Animation
Appearance Rule dialog box.
c. Fill an appearance rule description, as
Valve_Movement_Color.
d. Right click in Entity to Modify field and pick Valve.
e. Select Attribute to Modify as Color from the drop down
menu.
f. Right click in Modified Setting field and select color as red.
g. Set Persistence as Re-Evaluate from the drop down menu.
h. Set Quantity as Result-Set from the drop down menu.
i. Right click and select result set component as
Force_in_Spring.
j. Set Condition as > from the drop down.
k. Set Value as 0.
l. Play the animation again to check the effect of Appearance
rule.
WS3 - 25
Step 19. Enlarge the Graphics that Illustrate Force
To Enlarge the graphics that illustrate
force:
a. From the Edit menu, select
Preferences. The PPT
Preferences dialog box appears.
b. In the Force Scale text box, enter
a value of 100.
c. Click Save.
d. Note: Make sure that you save
your changes in this dialog box
before you close it. If you do not
save your changes, they will not
be made.
f
a
Spring
Force
g
b
c
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
e
WS3 - 26
e. Click Close.
f. On the main toolbar, click
Wireframe/Shaded.
g. Now you can animate (play button)
the model and view the position and
direction of the reaction force.
h. Return to Adams/View, and Save
your work.
Workshop 3, Review
• Workshop Questions
1. What is the mass of the valve? What is this mass currently based on?
____________________________________________________
____________________________________________________
2. What was the stiffness coefficient of the spring when you first opened the
model?
____________________________________________________
____________________________________________________
3. What was the maximum spring force when the spring coefficient was 200
lbf/foot?
____________________________________________________
____________________________________________________
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 27
ADM702, Workshop 3, May 2013
Copyright© 2013 MSC.Software Corporation
WS3 - 28