Professional Documents
Culture Documents
In ME 314, you are usually going to be processing the ADAMS results with MATLAB, so I’ll focus on exporting to a
MATLAB-compatible format. This is the first format, “Numeric Data...”
22
ME 314 November 10, 1112 MST Fall 2011
Data in plot
If you open the datafile in a text editor (Notepad, for example), you will see that there is some alphanumerica content
at the beginning:
23
ME 314 November 10, 1112 MST Fall 2011
Since these data will be opened from MATLAB, this alphanumeric header must be removed. Do that (all the way down
to—and including—the A and B column titles) and resave the file.
Although this is an ADAMS Guide, I’ll show how to open the datafile we just exported from within MATLAB. Once
the file is in your working MATLABdirectory, simply load it:
Probably you would like to extract column 1 to a variable called theta2 and column 2 to variable theta4. Here’s how:
>> theta2 = freud_data(:,1); % The ":" operator means "all values", so these mean
>> theta4 = freud_data(:,2); % "column 1, all rows" and "column 2, all rows."
Now it may be comforting to plot θ4 vs θ2 and see the same thing as the ADAMS plot:
>> plot(theta2,theta4)
360
350
340
330
320
310
300
290
280
270
260
10 20 30 40 50 60 70
This is the same as the plot in Section 6.3.1. Of course, you can add labels, change the linestyle, fontsize, etc. But the
ADAMS data is now in MATLAB so you can do whatever you want with it.
• one body rolling on another without slip (e.g. disk rolling on plane)
24
ME 314 November 10, 1112 MST Fall 2011
f (q) = 0 (3)
where q are one (or more) generalized (linear or angular) displacements or velocities.
In this section I’ll develop the GCON for keeping the “pin” in the “slot” for the Geneva Stop mechanism.
From the ADAMS/View Command File, you have the following ADAMS/Viewwindow:
Notice that there are several markers (frames) near the pin—these will be important in creating the GCON that keeps
the pin in the slot.
You must first have an analytical understanding of the constraint under consideration. Consider the sketch of the
Geneva Stop below, where the link 3 c.m. marker is fixed to link 3 (of course). For the pin to remain in the slot:
The displacement of point C in the y direction of the c.m. marker MUST BE ZERO
Now we need to identify “point C” and the “c.m. marker of link 3” on the ADAMS/View model. Consider the “zoomed
in” area near the pin (left figure below):
25
ME 314 November 10, 1112 MST Fall 2011
The crank (link 2) is green, while the follower (slotted link 3) is yellow. The circular outline of the pin is clear in the
figure.
There are two markers of interest: (1) the marker at the center of the pin (point C), and a marker fixed to the slotted
link (the marker shown in the sketch above). To “examine” a marker, right-click near the origin of the marker, select
the marker, and select “Select.” I renamed the marker at the center of the pin “point C”, so we have
This will “highlight” the marker in ADAMS/View so you can see it (xyz axes are RGB respectively). See next page.
I don’t know why, but seems like you have to zoom the ADAMS/View window in or out to make the marker show up.
Once you do, you’ll see it as below (remember, xyz=RGB):
26
ME 314 November 10, 1112 MST Fall 2011
So this is the marker at “point C.” Click anywhere in the ADAMS/View window to deselect the marker.
We now need to find a marker attached to link 3 (the slotted link); the link 3 center-of-mass (c.m.) marker is a
convenient one (it’s actually just to the left of point C). In the same manner, select it (left figure below):
The highlighted link 3 c.m. marker is shown in the right figure above. So the link 3 c.m. marker has its y axis
perpendicular to the slot (like my drawing on the previous page). That’s the direction in which point C can have NO
motion.
Now we have the two necessary markers located. It is VERY IMPORTANT to identify these markers.
The displacement of point C in the y direction of the c.m. marker MUST BE ZERO
1. Select the GCON (f(q)=0) “joint” from the Main Toolbox palette
2. From the “Create General Constraint” dialog box, select the “...” button to activate the Function Builder
3. Select “Displacement” from among the Functions
4. Select “Distance along Y”
5. At the bottom of the Function Builder window, the format “DY(To Marker, From Marker, Along Marker”
appears
27
ME 314 November 10, 1112 MST Fall 2011
28
ME 314 November 10, 1112 MST Fall 2011
Selection of Markers. If you “hover” the cursor over the three panes of the box above, descriptions of the markers
will appear:
The displacement of point C in the y direction of the c.m. marker MUST BE ZERO
1. Measure the distance to this point: This will be the marker at point C on link 2, which I renamed “point C”
2. Measure the distance from this point: This will be the marker at the c.m. of link 3
3. Measure the distance along the Y-axis of this coordinate system: To guarantee no displacement in the y direction
of the c.m. marker, this marker will be the same as the previous: the c.m. marker of link 3.
I find it easiest to “Browse...” for the markers, so right-click in each pane and browse for the markers above. When
you finish, the “Function Builder” window will look like this (the upper left portion):
29
ME 314 November 10, 1112 MST Fall 2011
If there is a “zero” at the end of the string (a zero always occupies the window initially) be sure to delete it.
Click “OK” twice (both windows) and you’re DONE!! OOPS! This error may pop up...
The STUPID ADAMS/Solver always seems to be “stuck in Fortran” which isn’t compatible with GCONs. You have
to change the ADAMS/Solver to “C++” mode.
In the ADAMS/View window, select “Settings/Solver/Executable ...” and you will see this window:
Click the “C++” button and now you’re done. Resimulate the model and the pin should stay in the slot.
30