You are on page 1of 11

PTC Mathcad

www.ptc.com/product/mathcad/

Cr
ea Natural Math and Units in Mathcad
do
co worksheet explores two distinguishing features of Mathcad that are critical to performing engineering
This Mathcad
n and accurately. These two features are Natural Math Notation and Units Intelligence.
P
calculations clearly
TC
Ma into three sections. Within each section, we consider a simple case from the disciplines of
This worksheet is partitioned
strucural, mechanical, andthelectrical engineering. The three sections of this worksheet are:
ca
d
1. Discussion Ex
p
re and Units Intelligence in Mathcad
Overview of Natural Math Notation
ss
.C
2. Case Examples: Step-by-Step on
Step-by-step examples on working withsNatural
u Math Notation and Units Intelligence
lte
ww
3. Case Appendices: Streamlined Calculations
Condensed versions of the case examples without w .m
discussion or step-by-step guide, so that changes to
a
calculated results can easily be seen when inputs are modified.
th
ca
d.
co
m
pa
ra
ob
te
ne
rm
ás
inf
or
ma
ció
n.
Discussion
Página 1 de 11
PTC Mathcad
www.ptc.com/product/mathcad/

Cr
Discussion
e adoMath Notation
Natural
co Notation refers to the notion of representing formulas and equations in their native mathematical format.
Natural Math
n
The cases belowPshow basic equations from structural, mechanical, and electrical disciplines. Notice that Mathcad writes
Ttheir natural, authentic formats. Mathcad applies this approach to all engineering math, and never
these equations in C
Ma of characters to represent math expressions.
uses script, code, or strings
th
c
To write expressions such as athe
d ones below, we use operators from the Operators panel and symbols/characters from
the Symbols panel, in conjunctionEx
with input from the keyboard (i.e. numeric values, addition, subraction, multiplication,
pr panel and Symbols panel are located on the Mathcad ribbon:
es
division operators, etc). The Operators
Math tab/Operators button s.
Math tab/Symbols button Co
ns
ult
Case 1: Deflection of a beam at position x as aeload
w W is placed at position a along the beam
w
Equation for calculating deflection at position x on thewbeam
.m when a load is placed at
position a along the beam a th
ca
W ⋅ ((L - a)) ⋅ x ⎛ 2 ⎛ W
d.⎞c
y ((x)) = -――――― ⎝L - ((L - a)) - x ⎞⎠ - ((x > a)) ⋅ ⎜―――
2 2
⋅ ((x - a)) 3 ⎟ om
6⋅E⋅I⋅L ⎝6⋅E⋅I ⎠
pa
ra
ob
te
ne
Case 2: Surface area of a threaded bolt rm
Equation for calculating the surface area of a threaded bolt ás
inf
or
2 π ⋅ ((D - d)) ⋅ l
Asurface = ――――― ma
⎛ αT ⎞ ció
p ⋅ cos ⎜―⎟
⎝ 2 ⎠ n.
Case 3: Power dissipated across a resistor over time t
Página 2 de 11
2 π ⋅ ((D - d)) ⋅ l PTC Mathcad
Asurface = ―――――
⎛ αT ⎞ www.ptc.com/product/mathcad/
p ⋅ cos ⎜―⎟
⎝ 2 ⎠
Cr 3: Power dissipated across a resistor over time t
Case
ea
do
c on
Equations for calculating the power dissipated across a resistor in an electrical circuit at time t
PT
C
⎛ -t ⎞
⎜―― ⎟
I = i ((t)) = Io ⋅ eM
⎝ τ ⎠
current as a function of time
at
hc
ad
Ex
P ((I)) = I 2 ⋅ R pr dissipated across a resistor at
power
es value I (current)
s
calculated
.C
on
su
Note: In the formulas above, we did not use the definition operator to define the equations. Instead, we used a heavy bold equal sign. This
lte
heavy bold equal sign is called the boolean equal sign, and can be used to document formulas and math expressions that will not be calculated
ww
at that point in the worksheet. In order to calculate these formulas and obtain numerical results, we will redefine these same formulas below
using the definition operator (instead of the boolean equal sign).
w.
m
a button/Comparison section/= The keyboard shorcut for the
Ÿ The boolean equal sign is located here on the ribbon: Math tab/Operators
th
boolean equal sign is <Ctrl><=> ca
d
.co We are defining them twice within this
Ÿ It is not necessary to define the math expressions twice as we will do in this worksheet.
m
worksheet (using the boolean equal sign above and the definition operator below) only for purposes of documentation and clarity.
pa
ra
Natural Math Notation Help ob
For help with entering and editing expressions using Natural Math Notation, please refer totethe Tutorial located here:
From the Mathcad ribbon: Getting Started tab/Tutorial/Tutorials Section/Task 2-1 & Task 2-2 er
n

Units Intelligence si
nf are included
or
Mathcad provides a library of units, and understands how to incorporate units into calculations. When units
m
on input variables, Mathcad recognizes the units and processes them according to the fundamental laws of units.
ac
ió n
.
Mathcad's units intelligence provides the following capabilities when working with units:
Página 3 de 11
Ÿ Carries units forward throughout all calculations
Ÿ Converts units on numerical results
Units Intelligence
Mathcad provides a library of units, and understands how to incorporate units into calculations. When units are included
PTC Mathcad
on input variables, Mathcad recognizes the units and processes them according to the fundamental laws of units.
www.ptc.com/product/mathcad/

C re
a units intelligence provides the following capabilities when working with units:
Mathcad's
do
co
Ÿ Carries units forward throughout all calculations
n
PT
Ÿ Converts units on numerical results
C
Ÿ Flags unit-related errors
Ma
th
Notes on how Mathcad calculates answers with units:
ca
d
Ex
Ÿ Mathcad will provide the numerical answer in the simplified base unit for the given unit dimension within the given unit system. The
default unit system is the SI system. pr
es
s.
Example: For the dimension of length, the calculated answer will be provided in meters (SI system)
Co
Example: For the dimension of force, the calculated answer will be provided in newtons (SI system)
ns
ult
Example: For the dimension of power, the calculated answer will be provided in watts (SI system)
ew
ww
Ÿ Once the answer is calculated, we can convert the answer to the desired units by replacing the default unit in the answer with the desired
unit. .m
at
The library of units is located here on the Mathcad ribbon: Math tab/Units button hc
ad
Units Help co .
m
For help with working with Units, please refer to the Tutorial located here: pa
From the Mathcad ribbon: Getting Started tab/Units Section ra
ob
te
ne
rm
ás
inf
or
ma
ció
n.
Case Examples: Step-by-Step
Página 4 de 11
PTC Mathcad
www.ptc.com/product/mathcad/

Cr Examples: Step-by-Step
Case
e a
docase above, we'll perform the calculation according to the formula written in Natural Math Notation, then
For each
convert theco
units on the result according to the following steps:
n
PT
C
1. Define input variables with units
Ma
th
To add units, simply type the numeric value followed by the unit.
ca
d the number and the unit.
Ÿ Do not enter a space inbetween Ex between the number and the unit (* on keyboard).
pr units and their proper formats: Math tab/Units button
Ÿ You may enter the multiplication operator
e
Ÿ Look here for a complete list of available
ss
.C
on
2. Write the formula using the definition operator (instead of the boolean equal sign - remember: we used the boolean
su
equal sign above to document the formulas for discussion purposes and now to calculate, we need to rewrite the formulas using
the definintion operator). lte
ww
w.
To define formulas/equations, we use the definition operator, which is represented by the := symbol

at m
Ÿ The definition operator is located on the Mathcad Ribbon here: Math tab/Operators
hc button/Definition and Evaluation section/:=
Ÿ The keyboard shortcut for the definition operator is colon character :
ad
. co
3. Execute the calculation to obtain a numerical answer m
pa
ra
To view numerical results, type the variable name or function name (with its required inputs) followed directly by the regular equal sign =
o
bt things, or making assignments.
Ÿ Do not use the definition operator := to view results. The definition operator is used only for defining
en
er
4. Convert the answer to desired units má
si
To convert units on the results, delete the default units in the answer, and replace with the desired units. nf
or
m unit of
Ÿ The desired units must be entered according to their proper format. Refer to the units library to find the proper format for the
ac
interest: From the Mathcad ribbon: Math tab/Units button ió n
.
Case 1: Deflection of a beam at position x as a load W is placed at position a along the beam

Página 5 de 11
PTC Mathcad
www.ptc.com/product/mathcad/

C 1: Deflection of a beam at position x as a load W is placed at position a along the beam


Case
re
ad 1. Define input variables with units
Step
o
co
n L ≔ 15 m total beam length
PaT≔ 11 m
C load position
MGPa
E ≔ 69 a Young's modulus
t4h
I ≔ 20 in ca d area moment of inertia
W ≔ 200 N
Eload
xp weight/force
re
ss
.
Step 2. Write the formula using theCdefinition operator
on
su
W ⋅ ((L - a)) x lte ⎛ W ⎞
y ((x)) ≔ -―――― ⎛⎝L 2 - ((L - a)) 2 - x 2 ⎞⎠ -
6⋅E⋅I⋅L
w ((x > a)) ⋅ ⎜―――
ww ⎝ 6 ⋅ E ⋅ I
⋅ ((x - a)) 3 ⎟

.m
at at the midpoint and at the load position
Step 3. Execute the calculation with the defined inputs hc
ad
. co
midpoint ≔ ―
L
midpoint = 7.5 m m
2 pa
ra
ob
te
y ((midpoint)) = -0.018 m y ((a)) = -0.015 m ne
r
Step 4. Convert the answer to desired units, and assign the results to variables má
si
nf
or
( )
ymidpoint ≔ y (midpoint) = -17.729 mm ( )
yloadposition ≔ y (a) = -14.98 mm ma
ció
n.
Case 2: Surface area of a threaded bolt

Página 6 de 11
PTC Mathcad
www.ptc.com/product/mathcad/

C 2: Surface area of a threaded bolt


Case
re
ad 1. Define input variables with units
Step
o
co
nd ≔ 0.86 mm Thread depth
P
l ≔T100
C mm Length of threaded part of bolt
Ma Thread angle (60deg for ISO)
th
αT ≔ 60 deg
D ≔ 4 mm c adNominal diameter
Ex thread pitch (unitless)
p ≔ 1.25 Coarsepr
es
s.
Co
Step 2. Write the formula using the definition ns operator
ult
2 π ⋅ ((D - d)) ⋅ l
ew
Asurface ≔ ―――――
⎛ αT ⎞ ww
p ⋅ cos ⎜―⎟ .m
⎝ 2 ⎠ at
h ca
d.
Step 3. Execute the calculation with the defined inputs co
m
2 pa
Asurface = 0.002 m
ra
ob
te
Step 4. Convert the answer to desired units ne
rm
Asurface = 1822.506 mm 2
Asurface = 18.225 cm 2
Asurface = 2.825 in 2 ás
inf
or
ma
ció
n.
Case 3: Power dissipated across a resistor over time t
Página 7 de 11
PTC Mathcad
www.ptc.com/product/mathcad/

Cr 3: Power dissipated across a resistor over time t


ea
Case
do
co
Step 1. n
Define input variables with units
PT
C
Io ≔ 30MmA initial current
at
hc
R ≔ 200 Ω
adresistor
τ≔5 s Ex constant
time
pr
es
s.
Step 2. Write the formulas using the Codefinition operator
ns
⎛ -t ⎞ ult
⎜――
τ
i ((t)) ≔ Io ⋅ e ⎝ ⎠

e w of time
current as a function
ww
.m
power dissipation across at at
resistor
calculated value for I (currenthat
2
P ((I)) ≔ I ⋅ R
catime t)
d.
co time t
Step 3. Execute the calculation with the defined inputs at a chosen m
pa
t ≔ 10 ms
ra
ob
I ≔ i (t) = 0.03 A
() te
ne
P ((I)) = 0.179 W rm
ás
Step 4. Convert the answer to desired units, and assign the power result to a variable inf
or
ma
I = 29.94 mA Rpower_dissipation ≔ P ((I)) = 179.281 mW ció
n.

Página 8 de 11
PTC Mathcad
www.ptc.com/product/mathcad/

Cr
e
adAppendices: Streamlined Calculations
Case o
co
n
P of a beam at position x as a load W is placed at position a along the beam
Case 1: Deflection
TC
M a total beam length
L ≔ 15 m
th
ca
a ≔ 11 m d load position
E ≔ 69 GPa
EYoung's
xp modulus
re
I ≔ 20 in 4 ss
area moment
. C of inertia
W ≔ 200 N on
load weight/force
su
lte
W ⋅ ((L - a)) x w
⎛ wW ⎞
y ((x)) ≔ -―――― ⎛⎝L 2 - ((L - a)) 2 - x 2 ⎞⎠ - ((x > a)) ⋅ ⎜―――
6⋅E⋅I⋅L
w
⎝ 6 ⋅ E ⋅.m
I
⋅ ((x - a)) 3 ⎟

at
h
y ((a)) = -0.015 m ca
⎛L⎞
y ⎜― ⎟ = -0.018 m d.
⎝2⎠ co
m
pa
⎛L⎞
ymidpoint ≔ y ⎜― yloadposition ≔ y ((a)) = -14.98
r
a omm
⎟ = -17.729 mm
⎝2⎠ bt
en
er

si
nf
or
ma
ció
n.
Case 2: Surface area of a threaded bolt
Página 9 de 11
PTC Mathcad
www.ptc.com/product/mathcad/

Cr 2: Surface area of a threaded bolt


ea
Case
do Thread depth
cod ≔ 0.86 mm
n 100 mm Length of threaded part of bolt
l≔
PT
αT ≔ 60Cdeg Thread angle (60deg for ISO)
M
D ≔ 4 mm at hcNominal diameter
p ≔ 1.25
ad thread pitch (unitless)
Coarse
Ex
pr
es
( )
2 π ⋅ (D - d) ⋅ l s.
Asurface ≔ ――――― C o Asurface = 0.002 m 2
⎛ αT ⎞ ns
p ⋅ cos ⎜―⎟ ult
⎝ 2 ⎠ ew
ww
Asurface = 1822.506 mm 2
Asurface = 18.225 cm 2.m Asurface = 2.825 in 2
a th
ca
d.
co
m
pa
ra
ob
te
ne
rm
ás
inf
or
ma
ció
n.
Case 3: Power dissipated across a resistor over time t
Página 10 de 11
PTC Mathcad
www.ptc.com/product/mathcad/

Cr 3: Power dissipated across a resistor over time t


ea
Case
do
co
n
PT R ≔ 200 Ω resistor
t ≔ 25 msC
Ma Io ≔ 30 mA initial current
th τ ≔ 5 s
ca time constant
d
⎛ -t ⎞
Ex
P ((I)) ≔pIr2 ⋅ R
⎜―― ⎟
τ
i ((t)) ≔ Io ⋅ e ⎝ ⎠
es
s.
C P ((I)) = 178.209 mW
Rpower_dissipationo≔
I ≔ i ((t)) = 29.85 mA ns
ult
ew
t ≔ 0 ms , 5 ms ‥ 100 ms Now,wdefine t as a sequence of inputs with a starting value of
wending
0ms, an .m value of 100ms, and a step size of 5ms so that
we can plot a
current against time.
th
ca
30.005

d.
29.945
29.885
co plot, we enter units of ms into the units
29.825 Note: In the m x-axis and units of mA into the units
29.765 placeholder on thep
placeholder on theay-axis.
29.705
i ((t)) ((mA )) ra Ifthe other units are desired
29.645
ob units of ms and mA with
within the plot, then replace
29.585 the desired units. te
29.525
ne
29.465
rm
29.405
ás
0 10 20 30 40 50 60 70 80 90 100
inf
t ((ms )) or
ma
ció
Thank you for your interest in PTC Mathcad! n .

Página 11 de 11

You might also like