Post on 07-Jul-2018
8/18/2019 Mechanical Expressions Tutorials
1/26
— page 1 —
Mechanical Exp ress ions Tutorials
These tutorials are provided to help you get started using Mechanical
Expressions. They refer to the ideas discussed in Solving Geometry ProblemsUsing Mechanical Expressions, which we therefore recommend that you readfirst.
Contents
Tutorial 1: Define and solve a problem. ................................................................ 2
Explore the user interface. ................................................................................ 2
Define a problem. .............................................................................................. 5
Calculate output. ............................................................................................... 7
Resolve a constraint conflict. ............................................................................. 7
Make your own expression. ............................................................................. 10
Tutorial 2: Statics ................................................................................................ 12
Tutorial 3: Dynamics ........................................................................................... 15
Tutorial 4: Loci and Transformations. .................................................................. 21
Draw a locus.................................................................................................... 21
Lock a variable. ............................................................................................... 24
Animate a variable. .......................................................................................... 24
Calculate parametric and implicit equations. ................................................... 25
Make the locus reflection. ................................................................................ 25
Compare locus and reflection equations. ........................................................ 26
Explore on your own. ....................................................................................... 26
Documentat ion Convent ions
You see: It means:
Space Press the Space key.
Return the Return or Enter key
Enter Type the value or click to make the object, then press Return .
Control-Z Press Control and Z at the same time.
File > New Execute the New command from the File menu.
8/18/2019 Mechanical Expressions Tutorials
2/26
Mechanical Expressions Tutorials
— page 2 —
Tutorial 1: Define and solve a problem.
In this tutorial, you will:
explore the tools,
define a simple problem,
calculate the output,
resolve a constraint conflict, and
add and calculate an expression.
As you work, bear in mind that there’s no need to draw correctly the first time — Mechanical Expressions will correct the drawing as you work, based on theconstraints you add.
You don’t have to worry about making mistakes of other kinds, either. Multiple
levels of Edit > Undo (Control-Z) and Edit > Redo (Control-Y) let you go backand forth through a sequence of steps, so feel free to explore as you go.
Explor e the us er interface.
1. Start Mechanical Expressions, if you haven’t already.
2. File > New
A new blank page opens, occupying the left andcenter of the window.
To the right, from top down, are the palettes thatdefine the process of working geometry problems:
draw objects
constrain geometry
create constructions,
add annotations, and
calculate output.
8/18/2019 Mechanical Expressions Tutorials
3/26
Mechanical Expressions Tutorials
— page 3 —
Additional palettes provid ways to:
add forces, masses, and other mechanicalobjects
measure motion and acceleration
insert symbols and
control variable values.
Enlarge or maximize your window if some of thepalettes are obscured.
3. You can hide a palette individually by clicking theX at the upper right corner of the palette box. In this way, you can closepalettes that you won’t be using. These tutorials won’t be using the Symbols
palette, so you may close it now, if you wish. To display a hidden toolbox,select View > Tool Panels. The submenu lists the toolboxes and the MainToolbar (the icon strip at the top of the window). Boxes shown are precededby a check; those without a check are hidden.
You can customize the user interface in various ways. The options available inthe View menu control zooming, scaling, axes etc. and the items in Edit >Preferences, address other visual, text and mathematical properties.
Under the Math tab, for example, you can set the threshold for IntermediateVariable Complexity, which under some circumstances can significantly affect theactual expression that’s calculated. A low threshold tells the application tosubstitute only simple intermediate variables, so you'll see more of them. Aprogressively higher threshold results in the substitution of progressively largerand more complex intermediate variables, so you'll see fewer but more complexones.
8/18/2019 Mechanical Expressions Tutorials
4/26
Mechanical Expressions Tutorials
— page 4 —
4. In the Draw palette, choose the line segment tool.
5. Starting near the bottom left of the drawing, click and hold the mouse buttondown as you draw a line segment going upward and to the right. MechanicalExpressions places the first point where the cursor is when you first press themouse button, and the second point where you release it. It then labels thefirst point A and the second point B.
A
B
8/18/2019 Mechanical Expressions Tutorials
5/26
Mechanical Expressions Tutorials
— page 5 —
6. With the line segment tool still selected, move the mouse around the drawingarea, passing over one or both of these points. Mechanical Expressions tracks the location of the drawing cursor, snapping it to an existing geometryobject when the cursor gets close enough.
7. Try creating other kinds of geometry objects with some of the other drawing
tools. When you’re ready to go on, undo them all except the line AB.
Define a pro blem.
To start, we’ll use the first line segment and add three more to create somethinglike this:
1. Again using the line segment tool, snap the cursor to point B and draw threemore line segments; BC, AC, and then BD. (Remember, there’s no need todraw precisely.)
To ensure that point D lies along the line AC, move the cursor near enough to
AC that the line becomes selected, and D will snap to it automatically.
2. Change to the selection tool and select line AB by clicking the mouseanywhere along its length.
3. With one object selected, some of the tools in the Constrain Input palette areenabled. Click the Distance/Length constraint. (Tooltips give the name ofeach tool. You can use this to see what options are available.)
8/18/2019 Mechanical Expressions Tutorials
6/26
Mechanical Expressions Tutorials
— page 6 —
The constraint appears, along with the default variable name of a, selectedand ready to change. Press Return to accept it.
4. Select line BC and repeat the previous two steps to constrain its length to b.
5. You’ve now added two variables to your drawing. Go to the Variables paletteto see their names and values.
The values displayed in the Variables paletteare the current values, as taken from thedefault coordinate system. Notice that thesevalues will change as you vary the lengths ofthe sides. Vice versa, if you select a variableand change its value in the Variables palette,the geometry will change accordingly.
6. Select the variable a in the Variables list and,in the input field below, enter the nearest
round number.7. Select both lines AB and BC. (You can select
more than one object at a time by making thefirst selection, then holding down Shif t as youmake subsequent selections.)
8. With two objects selected, you’ll see adifferent set of constraint tools enabled. Click the Perpendicular constraint toconstrain the angle to 90º. ABC is now a right triangle.
Notice that point C moved, not point A, though either could have moved tosatisfy the constraint. Mechanical Expressions moves the more recently
added object when it can.
9. There’s one last constraint to add. Select both lines BD and AC, andconstrain their angle to be perpendicular as well.
A
B
C
ba
D
8/18/2019 Mechanical Expressions Tutorials
7/26
Mechanical Expressions Tutorials
— page 7 —
10.
Calculate outpu t.
Suppose you want to know the length of the line BD:
1. Select BD.
2. The Calculate palette offers output as both numeric — Real and expressions— Symbolic. Click on Symbolic if it’s not already in front, then click theDistance /Length calculation.
An expression appears, showing the requested length in terms of the twovariables, a and b. It’s selected, allowing you to move it wherever you wish.
A C
B
D
a b
Þ
a·b
a2
+b2
The double arrow => that appears to the left of the expression indicates that theexpression is an output that the application has calculated.
Resolve a con straint con f l ict .
With the lengths of two sides and the included angle already constrained, thetriangle is already fully defined; any new constraint you add will conflict with theexisting ones. While this may be obvious, you may later encounter conflicts that
are less obvious. This task takes you through the steps necessary to resolvesuch conflicts.
1. Select the line AC and add a length constraint. You’ll see this dialog:
8/18/2019 Mechanical Expressions Tutorials
8/26
Mechanical Expressions Tutorials
— page 8 —
2. The dialog offers you three choices:
Cancel out of the operation, leaving the drawing as it was.
Leave the other constraints in place and calculate the requested distancefrom them. This replaces the requested length constraint with a lengthmeasurement instead.
Relax one of the existing constraints so you can add the new one. Youcan then choose which to relax.
3. Click the second radio button, Calculate the distance from the other
constraints, and dismiss the dialog. You’ll see the expression appear with thearrow (=>) that indicates it’s an output. It may also be given a name. This willbe the case if the Show Name (in the Display Properties dialog box) is setto True.
8/18/2019 Mechanical Expressions Tutorials
9/26
Mechanical Expressions Tutorials
— page 9 —
4. Edit > Undo
5. Try to add the new constraint again. This time, click the third radio button,Relax other constraints so the distance is independent. As soon as you clickit, the conflicting constraints light up in red and the new one in yellow:
6. Click the angle at B. Its highlight changes to indicate it’s selected; theconflicting constraint highlights vanish, and the new one now is outlined in
green.
8/18/2019 Mechanical Expressions Tutorials
10/26
Mechanical Expressions Tutorials
— page 10 —
7. Click OK. Now the figure includes the length constraint c, while theperpendicular angle constraint at B is gone.
A C
B
D
a b
Þ
a+b+c · (a+b-c)·(a-b+c)·(-a+b+c)
2·c
c
8. Edit > Undo again. We’re going to need that perpendicular angle later. Leavethe drawing as it was, without length constraint c.
Make your own expression.
Mechanical Expressions can calculate output as expressions, but you can alsodefine and add your own expressions to a drawing.
1. Select the two points A and D.
2. Calculate the distance between them as a symbolic output.
3. Select the expression you’ve just output.
4. Right click and then select Output Properties > Show Name > Yes
To the left of the arrow, the name zn appears. (Because you may havecreated one or more of these already while exploring, we can’t predict theexact number in the subscript.) This is the symbol the application assigns bydefault as the name of the expression. You can change this label tosomething more meaningful by double-clicking the name and retyping.
5. Select the two points D and C, and repeat the previous three steps to get asecond expression, this one named zn+1. (Subscripts increase by one eachtime the symbol they apply to is reused.)
Using these names or whatever names you chose, make an expression usingthese distances. For example, you can calculate the ratio of the two lengths.
6. In the Draw palette, choose the Expression tool .
8/18/2019 Mechanical Expressions Tutorials
11/26
Mechanical Expressions Tutorials
— page 11 —
7. Click in the drawing where you want to put the expression. The expressionappears as a 0, selected for overwriting. To replace the zero, enter:
z[n]/z[n+1]
(Square brackets indicate subscripts. Or use whatever names you created.)
8. The expression is calculated and displayed.
A C
B
D
a b
Þ
a·b
a2
+b2
z1Þ
a2
a2
+b2
z2Þ
b2
a2
+b2
z1
z2
Þ
a2
b2
8/18/2019 Mechanical Expressions Tutorials
12/26
Mechanical Expressions Tutorials
— page 12 —
Tutorial 2: Statics
The first tutorial could be done in Geometry Expressions; this one uses newfeatures from Mechanical Expressions. For a first example, we will create aclassic plank-and-string problem:
The line AC represents a massless plank fixed to a wall at A and with a weight atC, supported by a string fixed to point B, also on the wall, and D, at the midpointof AC. To create this:
1. Enable the axes: the Axes/Grid icon, , on the main toolbar, or View >Axes, will enable them.
2. Place A at the origin and B along the y-axis. Place C near the x-axis butnot on it, and D along AC.
At this point, your diagram should look roughly like this:
8/18/2019 Mechanical Expressions Tutorials
13/26
Mechanical Expressions Tutorials
— page 13 —
3. Constrain the length AC to be L using the Distance/Length constraint ,then constrain the length AD to be L/2 the same way.
4. Constrain B using the coordinate constraint . Select B, then click thecoordinate constraint tool and replace the supplied coordinates (x0, y0) with (0, 3*L/8). Notice that we must not leave out the multiplicationsymbol, since Mx can take variables of any length. Also constrain A to(0,0); this will allow us to measure the force there later.
Note: Why do we constrain these differently? Mechanical Expressions treatsconstrained and unconstrained objects differently. Forces and torques may beapplied to any object, but constrained objects are assumed to have zero netforce, with the constraint itself making up the slack. Thus, forces, masses,and torques can only be usefully applied to unconstrained objects, and mayonly be measured on constrained objects. If we constrained C or D to lie onthe x-axis, no force would be conveyed.
5. Click point C, and then click the Mass tool on the Mechanics Input palette. The default value is m. (Select Edit > Mechanics Environment to check your System units.)
6. Constrain BD to have length 5*L/8 The legs are 3*L/8 and L/2=4*L/8, sothis sticks AC onto the x-axis without attaching it. (Thanks, Pythagoras!)
7. The last step is to calculate the forces. Select the length constraint (not
the line) of BD, and click the Reaction Force button . Then select thecoordinate constraint (not the point) for A, and do the same thing there,and repeat for the constraint at B. Your diagram should now look like this,
displaying the reaction forces in pink:
8/18/2019 Mechanical Expressions Tutorials
14/26
Mechanical Expressions Tutorials
— page 14 —
8. This isn’t the only way Mechanical Expressions can measure this system.It’s also possible to ask for the force on a point, if that point is treated as apin supporting an object. Edit > Undo the three reaction forces you addedto clean up the screen, then try it out. Select the object (line segment) and
the point, then click the Pin Reaction button: . Try this for the forces
AC exert on A; it will give the generic name z3 to these forces, but youshould change the name to A AC. Then try it for point D; calculate both DBD and D AC. You should observe Newton’s Third Law in action here.
8/18/2019 Mechanical Expressions Tutorials
15/26
Mechanical Expressions Tutorials
— page 15 —
Tutorial 3: Dynamics
Force and Torque
We haven’t used the torque or acceleration abilities of Mechanical
Expressions yet. Let’s work through an example that does: Twoidentical hanging bars, with the top bar attached to a fixed pin at
A and the bars connected by a pin at B. When a force of P lbs isapplied at C, the bottom of the lower bar, what is the angularacceleration on each bar?
0. To set up this problem correctly, we need to use poundsrather than kg. Open Edit > Mechanics Environment andchange Current > System from “SI (m/kg/sec)” to “FPS(ft/lb/sec)”.
1. Plant point A along the x-axis, and make line segments AB
and BC below it, unconstrained.2. To model the bars, we will need to give each a fixed
length, mass and moment of inertia. The moment formulafor a uniform bar is I=L2 w/12.
3. Constrain the length of each bar to be L. Then selecteach bar and Construct the midpoint.
4. At each midpoint, add a mass labeled w, representing theweight of the bar.
5. Select the bar itself and click the Moment icon . To
properly reflect the distribution of the mass, each barshould have moment L2 * w/12.
With this done, the diagram should appear like the example atleft. But there are more restrictions needed, and output tocalculate.
6. We want to have the system start at rest, which meansthat both bars will hang straight down. We can do this byconstraining the angles; Mechanical Expressions diagrams don’t nor mally evolve over time, so we areconstraining only the initial conditions. Constrain the
angle between AB and the axis to be π/2, and the angle ABC to be π.
7. Now, we add the pushing force incident at C, Applied
Force. Set this to be a purely horizontal force, .
8/18/2019 Mechanical Expressions Tutorials
16/26
Mechanical Expressions Tutorials
— page 16 —
8. Finally, we can measure the angular acceleration of each bar. Select an
angle constraint and output the Resultant Acceleration . Note thevalue, then select the other constraint and do the same. Notice that thefirst acceleration you measured changes; this is because a constraintwhose resultant acceleration is measured is no longer assumed to havezero net force, and changing the second angle from static to dynamicchanges the forces at play in the rest of the diagram. This gives a finaldiagram, seen below left.
9. It is also possible to measure the acceleration on the bars themselves. For
this, use the Velocity/Acceleration measurement , which works on all
8/18/2019 Mechanical Expressions Tutorials
17/26
Mechanical Expressions Tutorials
— page 17 —
objects, constrained or not. This is seen below right.
8/18/2019 Mechanical Expressions Tutorials
18/26
Mechanical Expressions Tutorials
— page 18 —
Models in Mot ion
So far, our models have been at rest, with forces disturbing them from it. It is alsopossible, however, to have a model which is in motion, or even undergoingconstant acceleration. As an example, consider this kinetics problem:
A cart is rolling freely along a flat surface. A bar is fixed at one endto a pivot on the bed on this cart, and its other end is fixed to aspring. The other end of the spring is fixed to a slider on a rigidupright bar (also fixed to the cart) so that the spring remainshorizontal. Assuming that when the cart is at rest the pivoting bar isupright, what is the resting angle of the bar when the cart isaccelerated by a m/s
2?
This apparatus wouldlook roughly like this,being accelerated tothe right. This is simple
to model.
1. Put the linesegment ABalong the x-axis,and draw ACupward from A.
2. Place D on linesegment AB anddraw DEupward.
3. Constrain AC tobe perpendicularto AB.
4. Select C and E, then select Spring from the Mechanics Input palette. You should disable the actuator and the damper. Thisleaves a spring with spring constant k and natural length L.
8/18/2019 Mechanical Expressions Tutorials
19/26
Mechanical Expressions Tutorials
— page 19 —
5. Select AD andconstrain its lengthto be L. Thisensures that whenthe cart is at rest,
DE‘s rest positionis vertical. Thediagram up to thispoint is shown atright.
6. Next, constrain DEto have length d.
7. Select DE againand construct amidpoint. Add amass m at thatpoint. (For easiermodification, youmay wish toincrease the size ofthis mass using theright-click menu orEdit>Properties)
8. Select DE oncemore and add aMoment of inertia.
Enter its value asd^2*m/12, theformula for themoment of a barabout its midpoint.It should nowappear as at right.
9. The final steps areto set the cart andthe bar in motion.Select DE and AB
and constrain theirangle to be θ.
10. Select C andconstrain itscoordinates to(x,d*sin(θ)). The y-coordinate here
8/18/2019 Mechanical Expressions Tutorials
20/26
Mechanical Expressions Tutorials
— page 20 —
guarantees that the spring will always remain horizontal, asspecified in the problem statement.
11. Select this coordinate constraint and add velocity/acceleration input
. Enter 0 for the velocities (or any other value; these are not
important) and for the y-direction acceleration, and a for theacceleration in the x direction.
12. Select the angle constraint and find the resultant acceleration. Thebar is now free to move, and the final diagram should match thediagram below.
Finding equilibrium states is then a simple matter of setting z0 to 0and using it to relate the acceleration of the cart a, the springconstant k , and the resting angle θ .
8/18/2019 Mechanical Expressions Tutorials
21/26
Mechanical Expressions Tutorials
— page 21 —
Tutorial 4: Loci and Transformations.
This tutorial lets you exercise some of the advanced geometry features ofMechanical Expressions. In this tutorial, you will:
create a locus,
lock a variable’s value to see the effect it has on the drawing,
animate the drawing by setting start and stop values for a variable,
calculate two kinds of equations for the locus,
make its reflection, and
compare the equations for the locus and its reflection.
Draw a locus .
We’re now going to re-create the old exercise of drawing an ellipse using apencil, two pins, and a piece of string.
1. Turn on the axes by clicking on the grid tool in the toolbar.
2. Make two line segments, AB and BC. Points A and C are the pins, while Brepresents the pencil.
1 2 3 4 5-1-2-3-4-5
1
2
3
4
1 2 3 4 5-1-2-3-4-5
1
2
3
4
A
B
C
3. Select point A.
4. Click the Constrain > Coordinate icon.
8/18/2019 Mechanical Expressions Tutorials
22/26
Mechanical Expressions Tutorials
— page 22 —
5. In the data entry box type (with or without the parentheses):
(-a,0)
6. Select point C and constrain its coordinates to be at (a,0).
1 2 3 4 5-1-2-3-4-5
1
2
3
4
1 2 3 4 5-1-2-3-4-5
1
2
3
4
A
B
C
(-a,0) (a,0)
7. Check the value of a in the Variables palette.
8. Reselect A and drag it to the right a short distance. As you drag, notice:
A is now constrained to lie along the X axis; moving it up or down has noeffect.
When you move A, C also moves.
When you move A, the value of the associated variable a changes in theVariables list.
9. Select the line AB and constrain its length to be distance t .
10. Select the line BC and constrain its length to be L –t . L now represents thelength of the string.
8/18/2019 Mechanical Expressions Tutorials
23/26
Mechanical Expressions Tutorials
— page 23 —
1 2 3 4 5-1-2-3-4-5
1
2
3
4
1 2 3 4 5-1-2-3-4-5
1
2
3
4
A
B
C
(-a,0) (a,0)
t L-t
11. Notice that the two new variables have appeared in the Variables list.
12. Select point B.
13. In the Construct palette, select Locus to construct a locus through B.
14. In the resulting dialog, choose t as the Parametric Variable, and enter startand end values of 0 –25, guesses that will probably produce a complete curve.
The locus appears — half of an ellipse, above the X axis.
1 2 3 4 5 6-1-2-3-4-5-6
1
2
3
4
1 2 3 4 5 6-1-2-3-4-5-6
1
2
3
4
A
B
C
(-a,0) (a,0)
tL-t
8/18/2019 Mechanical Expressions Tutorials
24/26
Mechanical Expressions Tutorials
— page 24 —
15. Now drag B up and down, the equivalent of changing the length of the string,and seeing how the ellipse changes. You can also drag A or C to change theposition of the pins.
Lock a var iable.When you draw an ellipse this way using real pins, pencil, and string, the lengthof the string can’t change. To emulate this real-world behavior, we can lock thevalue of the variable L.
1. In the Variables list, select L and click the lock icon below the list. A plus sign(+) appears next to the locked variable in the Locked column.
2. Select points A or C and drag them. With the length of the string constant, Btraces the same locus no matter which point you drag.
An imate a variable.
You can also animate the drawing. To do so, we can set start and stop values for
the variable t. 1. In the Variables list, select t .
2. The first input field below the video playback interface specifies the startvalue. Enter 1.5.
3. The middle field specifies the duration of the animation. Accept the defaultvalue of 4. The input field to its right specifies the stop value. Enter 12.
4. To animate the drawing, click Play button ( ).
8/18/2019 Mechanical Expressions Tutorials
25/26
Mechanical Expressions Tutorials
— page 25 —
NOTE: The start and stop values that yield an interesting animation depend tosome extent on where you’ve located objects in your drawing. Experiment to findvalues that make an interesting animation. Values that do not allow Gx to createa construction sequence will cause objects to disappear briefly, (e.g. if your startand stop values cause the string to break or the pins to pop out!) They’ll reappear
when values make sense again, or when the animation stops.
Calculate parametr ic and im pl ici t equat ions .
1. Select the curve. In the Calculate palette, chose Parametric equation. Theresulting expressions are the formulas for x and y as a function of t. Move theexpression wherever you wish on the drawing.
2. Select the curve again, and this time request the Implicit equation. Theresulting expression gives the forumla for the curve in terms of x and y.
Make the locus ref lect ion .
1. Select the curve.
2. In the Construct palette, choose Reflection. The status bar now shows amessage prompting you to choose the axis about which to reflect the curve.
3. Click the X axis.
1 2 3 4 5 6-1-2-3-4-5-6-7
1
2
3
4
5
-1
-2
-3
-4
1 2 3 4 5 6-1-2-3-4-5-6-7
1
2
3
4
5
-1
-2
-3
-4
A
B
C
(-a,0) (a,0)
tL-t
B'
Þ
X= L·(-L+2·t)
4·a
Y=L-2·t+2· a · L-2· a · L+2· a · -L+2·t+2· a
4·a
Þ -L4+4·L
2· Y
2+4·L
2·a
2+X
2· 4·L
2-16·a
2=0
8/18/2019 Mechanical Expressions Tutorials
26/26
Mechanical Expressions Tutorials
B is also reflected, its reflection appearing on the lower curve as B ’.
4. Select B and drag it; B’ follows. But, though you can select B ’, you can’t dragit; it’s locked to reflect the location of B.
Compare locu s and ref lect ion equat ions.1. Select the reflected curve and request its parametric equation (from the
Calculate palette).
2. Compare them side-by-side and you’ll see that they’re identical, except for theminus sign in front of the expression.
3. If you repeat the experiment for the implicit equation, you’ll see they areidentical.
Explore on yo ur own .
Congratulations on completing the introductory tutorials. We hope you’ll becomfortable exploring on your own now. If you wish, further interesting examplescan be found on our website, www.mechanicalexpressions.com.
http://www.mechanicalexpressions.com/http://www.mechanicalexpressions.com/http://www.mechanicalexpressions.com/http://www.mechanicalexpressions.com/