mathcad worksheet 2

advertisement
MathCAD worksheet 2 – Starting to walk
The aim of this worksheet is to introduce you to some more basic mathCAD concepts
By the end of the sheet you will know how to:
 Define variables in a mathCAD worksheet
 Choose acceptable names for physics problems
 Work with units
 Use text regions to explain your work
This worksheet takes the form of a number of examples which illustrate and introduce
these principles. Work through them all.
Example 1 – Surface area and volume of a cylinder
This example is a simple worksheet to calculate the surface area and volume of a
cylinder. It is based on the example on page 32 of the course text.
1. Log into the campus computer system
2. Start mathCAD
3. On the blank worksheet presented by mathCAD press “ to create a text region and
type the following to describe the problem:
Statement of problem
Determine the surface area and volume of a cylinder
with a radius of 7 cm and a length of 21 cm.
4. Enter the known values for the length and radius of the cylinder. Use rCyl and
lCyl for the radius and length respectively.
To enter the value for the radius type:
rCyl:7*cm
5.
6.
7.
8.
which mathCAD should display as rCyl := 7 cm
Position the cursor underneath this line and enter the value of lCyl
Position the cursor to the right of the definition of rCyl and create a text box to
explain that rCyl is the radius of the cylinder. Similarly create a text box to
explain lCyl.
Enter the variable name aCyl by typing aCyl
Press : to define the variable aCyl MathCAD will insert a := sign
Now enter the equation for the area of a cylinder. To enter a  in mathCAD you
can type <ctrl-shift-p> (keep the band j keys pressed until you let go of the p. To
get the first part of the equation, for the area of the two ends of the cylinder you
can type:
2*<ctrl-shift-p>*rCyl^2
9. The selection box will be positioned around the 2, so press k to enclose the rCyl2
term
10. Add the second term by typing:
+2*<ctrl-shift-p>*rCyl*lCyl
© dpl 2001, 3, 5,2006
1
PH15720
MathCAD Example Sheet 2
By now your result should look like this:
Statement of problem
Determine the surface area and volume of a cylinder with a radius of 7 cm and a length of 21 cm.
rCyl
7  cm
Radius of cylinder
lCyl
21  cm
Length of cylinder
aCyl
2    rCyl
2
2    rCyl lCyl
Having calculated the surface area of the cylinder and stored it in the variable aCyl, we
can ask mathCAD to print it out. To do this, position the cursor below the bottom line of
the sheet and type:
aCyl=
MathCAD will display the value of the variable acyl in its base units, which are m2 for
area.
2
aCyl  0.123 m
Surface area of cylinder
In order to display this result in cm2, select the placeholder (a black rectangle) that
appears after the base units and type:
cm^2
2
2
and
MathCAD
aCyl
 0.123 m will display the result in cm : Surface area of cylinder
aCyl  1.232  10 cm
3
2
Area in square cm
In a similar fashion, create an expression to calculate the volume of the cylinder, vCyl
and display the result in m3, cm3 and also cubic feet (ft3).
© dpl 2001, 3, 5,2006
2
PH15720
MathCAD Example Sheet 2
The following examples are based on the course text “An introduction to MathCAD
2000”, pp 36-43. You should get in the habit of using text areas to explain what you are
calculating and also positioning the various regions of your calculation (text areas,
comments, variable definitions, calculations and results) in such a way to make it clear
what you are doing.
Example 2 – Unit conversions
Perform the following unit conversions:
Property
Convert from
2.998 x 108 m/sec
Speed of light in a vacuum
62.3 lb/ft3
Density of water at 20ºC
1000 kg/m3
Density of water at 4ºC
Approx viscosity of water at room 0.01 poise
temp
70 miles per hour
Motorway speed limit
70 miles per hour
Motorway speed limit
To:
miles per hour
kg/m3
lb/gal
kg/m sec
m/s
Furlongs per fortnight 
In mathCAD13 c is already defined as the speed of light in a vacuum, so you should just
print it out and then convert it to mph
Example 3 – More Volume & Surface Area Calculations
Calculate the volume and surface area of a sphere of radius 3 cm. The formulae you will
need are:
and
4
A  4   r2
V    r3
3
The specific gravity of gold (Gold) is 19.32 gm/cm3. This can be found in the resource
centre.
Calculate the mass of the 3 cm radius gold sphere. Display your answer in kg and also in
lb.
Rho () may be selected from the Greek palette, or by typing r<ctrl-g>
© dpl 2001, 3, 5,2006
3
PH15720
MathCAD Example Sheet 2
Example 4 – Relating Force and Mass
MathCAD has a pre-defined constant, g, for the acceleration due to gravity.
A 150 kg mass is suspended from a hook by a wire of negligible mass. Use the equation
of Newtons law to calculate the force acting on the hook.
F  ma
The force on the hook is equal to the tension in the wire, in the case of a single wire. If
two wires are used, the force on the hook is unchanged but the tension in each wire is
halved. Calculate how many wires need to be used if the tension in each wire is not to
exceed 300N
Example 5 - Spring Constants
Hooke’s law states that the extension of a spring, x, is linearly related to the force, F,
applied to the spring.
F kx
where k is the spring constant. Use mathCAD to determine the spring constants for the
following springs:
Spring extension
12 cm
0.3 m
1.2 cm
4 inches
Applied Force
800N
1200N
100 dynes
2000 lbf
Example 6 – Chair Design
The backrest of a chair is spring loaded for comfort. The design specifications for a chair
call for a maximum deflection of 5 cm when a 70kg person applies 40% of their body
weight to the chair. (For this example assume that the weight is applied directly to the
spring, without any intervening levers).
Use Newton’s law to determine the force applied to the backrest when a 70kg person
leans 40% of their body weight against it.
Re-arrange Hooke’s law to determine the spring constant required for the spring in this
case.
Using the spring specified in part b), determine the extension when a 90kg person leans
70% of their body weight against the backrest.
© dpl 2001, 3, 5,2006
4
Download