Fo
rP
TC
In
te
rn
al
se
nl
In
te
rn
al
se
nl
Copyright 2013 PTC Inc. and/or Its Subsidiary Companies. All Rights Reserved.
User and training guides and related documentation from PTC Inc. and its subsidiary companies (collectively
"PTC") are subject to the copyright laws of the United States and other countries and are provided under a license
agreement that restricts copying, disclosure, and use of such documentation. PTC hereby grants to the licensed
software user the right to make copies in printed form of this documentation if provided on software media, but
only for internal/personal use and in accordance with the license agreement under which the applicable software
is licensed. Any copy made shall include the PTC copyright notice and any other proprietary notice provided
by PTC. Training materials may not be copied without the express written consent of PTC. This documentation
may not be disclosed, transferred, modified, or reduced to any form, including electronic media, or transmitted or
made publicly available by any means without the prior written consent of PTC and no authorization is granted
to make copies for such purposes.
Information described herein is furnished for general information only, is subject to change without notice, and
should not be construed as a warranty or commitment by PTC. PTC assumes no responsibility or liability for any
errors or inaccuracies that may appear in this document.
The software described in this document is provided under written license agreement, contains valuable trade
secrets and proprietary information, and is protected by the copyright laws of the United States and other
countries. It may not be copied or distributed in any form or medium, disclosed to third parties, or used in any
manner not provided for in the software licenses agreement except with written prior approval from PTC.
UNAUTHORIZED USE OF SOFTWARE OR ITS DOCUMENTATION CAN RESULT IN CIVIL DAMAGES AND
CRIMINAL PROSECUTION. PTC regards software piracy as the crime it is, and we view offenders accordingly.
We do not tolerate the piracy of PTC software products, and we pursue (both civilly and criminally) those who do
so using all legal means available, including public and private surveillance resources. As part of these efforts,
PTC uses data monitoring and scouring technologies to obtain and transmit data on users of illegal copies of our
software. This data collection is not performed on users of legally licensed software from PTC and its authorized
distributors. If you are using an illegal copy of our software and do not consent to the collection and transmission
of such data (including to the United States), cease using the illegal version, and contact PTC to obtain a legally
licensed copy.
Important Copyright, Trademark, Patent, and Licensing Information: See the About Box, or copyright notice,
of your PTC software.
UNITED STATES GOVERNMENT RESTRICTED RIGHTS LEGEND
This document and the software described herein are Commercial Computer Documentation and Software,
pursuant to FAR 12.212(a)-(b) (OCT95) or DFARS 227.7202-1(a) and 227.7202-3(a) (JUN95), and are provided
to the US Government under a limited commercial license only. For procurements predating the above clauses,
use, duplication, or disclosure by the Government is subject to the restrictions set forth in subparagraph (c)(1)(ii)
of the Rights in Technical Data and Computer Software Clause at DFARS 252.227-7013 (OCT88) or Commercial
Computer Software-Restricted Rights at FAR 52.227-19(c)(1)-(2) (JUN87), as applicable. 01282013
PTC Inc., 140 Kendrick Street, Needham, MA 02494 USA
TC
PRINTING HISTORY
Document No.
TRN-4010-M02-EN-LM-P01
Fo
rP
Date
10/21/2013
Description
Initial Printing of:
Mathcad Prime 3.0 Essentials
se
nl
al
The course you are about to take will expose you to a number of learning offerings that PTC
University has available. These include:
In
te
rn
Instructor-led Training (ILT) - The ideal blend of classroom lectures, personal demonstrations,
hands-on workshops, assessments, and post-classroom tools.
Pro/FICIENCY - This Web-based, skills assessment and development-planning tool will help
improve your skills and productivity.
eLearning Libraries - 24/7 access to Web-based training that will compliment your instructor-led
course.
Precision LMS - A powerful learning management system that will manage your eLearning Library
and Pro/FICIENCY assessments.
TC
PTC University additionally offers Precision Learning Programs. These are corporate learning
programs designed to your organizations specific goals, current skills, desired competencies and
training preferences.
Fo
rP
Whatever your learning needs are, PTC University can help you get the most out of your PTC
products.
se
nl
Europe
Asia
al
Fo
rP
TC
In
te
rn
In addition, you can access the PTC Web site at www.ptc.com. Our Web site contains the latest
training schedules, registration information, directions to training facilities, and course descriptions.
You can also reach technical support, and register for online service options such as knowledge
base searches, reference libraries and documentation. You can also find general information about
PTC, PTC Products, Consulting Services, Customer Support, and PTC Partners.
Precision Learning
The Precision Learning Methodology
PTC developed the Precision Learning methodology to provide you with an effective, comprehensive
learning experience. This methodology is based on a cycle of learn, assess and improve.
al
se
nl
rn
te
Precision Learning Programs offer you the ability to create a customized training program, focused
on measuring the increase in your effectiveness with PTC products.
In
More information is available for all of these offerings in the training section of PTC.com at
http://www.ptc.com/services/training/index.htm.
TC
PTCs classes are based on the proven instructional design principal of Tell Me, Show Me, Let
Me Do:
rP
Topics are introduced through a short presentation, highlighting the key concepts.
These key concepts are then reinforced by seeing them applied in the software application.
You then apply the concepts through structured exercises.
Fo
After the course, a Pro/FICIENCY assessment is provided in order for you to assess your
understanding of the materials. The assessment results will also identify the class topics that
require further review.
At the end of the class, you will either take a Pro/FICIENCY assessment via your PTC University
account, or your instructor will provide training on how to do this after the class.
A Pro/FICIENCY assessment from the course content that generates a Recommended Learning
Report based on your results.
A Web-based training version of the course, based on the same instructional approach of lecture,
demonstration and exercise. The Recommended Learning Report will link directly to sections
of this training that you may want to review.
Please note that Web-based training may not be available in all languages. The Web-based training
is available in your account for one year after the live class.
nl
Please note that a localized map may not be available in every language and that the map above is
partial and for illustration purposes only.
Fo
rP
TC
In
te
rn
al
se
Before the end of the class, your instructor will review the map corresponding to the course you
are taking. This review, along with instructor recommendations, should give you some ideas for
additional training that corresponds to your role and job functions.
se
nl
Concept this section contains the initial introduction to the topic and is presented during the
class lecture.
Theory this sections provides detailed information introduced in the Concept.
Procedure This section provides step-by-step instructions on how to complete the topic within
MATHCAD. Procedures are short, focused, and simple exercises that cover the specific
topics to which they apply. Procedures are found in this Student Handbook only. Not every topic
has a Procedure as there are knowledge topics that can not be exercised.
Exercise Exercises are longer than procedures, and may cover multiple topics, so not every
topic will have an associated exercise. Exercises are typically more involved and use more
complicated models. Exercises are found in the printed Exercise Guide and the online exercise
HTML files.
Additionally, these topics are organized into modules. Except for the first module, all modules are
grouped to keep similar functionality together.
Fo
rP
TC
In
te
rn
al
The first module is a process module. In this module, you will find the generic process used to solve
the common types of Behavioral Modeling problems.
Training Agenda
12
13
14
15
16
17
18
19
20
21
22
3-D Plotting
Boolean Conditions
Symbolics
Solving
Optimization
Differential Equations
Programming
Data Exchange
Data Analysis
Project Day 2
Challenge Exercise Solutions
nl
Getting Started
Documenting and Formatting
Entering and Editing Math
Variables
Functions
Range Variables
Controlling Calculations
Vectors and Matrices
Units
2-D Plotting
Project Day 1
01
02
03
04
05
06
07
08
09
10
11
se
Module
Module
Module
Module
Module
Module
Module
Module
Module
Module
Module
Day 1
al
rn
te
In
Fo
rP
TC
Module
Module
Module
Module
Module
Module
Module
Module
Module
Module
Module
Day 2
Table of Contents
Mathcad Prime 3.0 Essentials
nl
Functions..................................................................................................................................... 5-1
Define and Evaluate a Function ............................................................................................ 5-2
se
al
te
rn
In
TC
rP
Fo
Programming............................................................................................................................. 18-1
Looping Constructs............................................................................................................ 18-2
Looping Constructs............................................................................................................ 18-5
nl
se
Fo
rP
TC
In
te
rn
al
y
nl
O
se
U
al
Module 3
Fo
rP
TC
In
te
rn
2013 PTC
Module 3 | Page 1
Scenario
Task 1:
nl
al
2. Type 1.
se
.
.
In
Select Division
te
Operators
rn
operator.
3. Insert the Division
Select the Math tab.
In the Operators and Symbols group, click
TC
, and
tab, clicking Operators
selecting the desired operator.
rP
Fo
operator.
2013 PTC
Scenario
nl
Task 1:
se
To insert the Greek letters, you can use the keyboard shortcuts. Alternately, you can
rP
TC
In
te
rn
al
Fo
2013 PTC
Module 3 | Page 3
y
nl
O
se
U
al
rn
te
In
TC
rP
Fo
Module 3 | Page 4
2013 PTC
y
nl
U
se
O
Variables
Fo
rP
TC
In
te
rn
al
Module 4
2013 PTC
Module 4 | Page 1
Define an expression.
Evaluate an expression.
Retroactively assign a variable name to an expression.
Evaluate a variable.
nl
Scenario
rn
Task 1:
al
se
Type the expression shown, evaluate it, retroactively assign the expression to a variable, and
evaluate the variable.
In
click Operators
te
TC
rP
Fo
Module 4 | Page 2
2013 PTC
rn
al
se
nl
Task 2:
2. Select the Math tab. In the Operators and Symbols group, click Operators
.
rP
TC
In
te
Definition
and select
Fo
2013 PTC
Module 4 | Page 3
y
nl
O
se
U
al
rn
te
In
TC
rP
Fo
Module 4 | Page 4
2013 PTC
y
nl
U
se
O
Functions
Fo
rP
TC
In
te
rn
al
Module 5
2013 PTC
Module 5 | Page 1
nl
Scenario
rn
Task 1:
al
se
In
te
Fo
rP
TC
Module 5 | Page 2
2013 PTC
y
nl
O
U
se
Range Variables
Fo
rP
TC
In
te
rn
al
Module 6
2013 PTC
Module 6 | Page 1
nl
Scenario
Task 1:
You must also define a function and use the range variable in the function evaluation.
Define the range variable.
al
Select Definition
rn
Operators
operator.
2. Insert the Definition
Select the Math tab.
In the Operators and Symbols group, click
se
te
In
TC
rP
Fo
Module 6 | Page 2
2013 PTC
nl
Fo
rP
TC
In
te
rn
al
se
2013 PTC
Module 6 | Page 3
nl
Scenario
al
se
Evaluate the centerline deflection of a shaft that is loaded with a concentrated load at the center.
The load varies from 1 to 5 lbs in 0.2 lb increments.
Where:
TC
In
te
rn
rP
Fo
Module 6 | Page 4
2013 PTC
y
nl
O
se
U
al
Module 8
Fo
rP
TC
In
te
rn
2013 PTC
Module 8 | Page 1
nl
Scenario
Define a 3-by-3 array, M, whose elements are equal to the sum of their corresponding indices.
se
After defining and evaluating array M, extract each of the three columns individually, assign each of
them to a variable, and then add them together, resulting in a vector MV.
Task 1:
rn
al
te
operator.
Type i and insert the Definition
Type the range variable definition, 1..3, in the
placeholder.
Repeat to define the range variable j.
In
, and selecting
TC
clicking Operators
Range
rP
operator.
Fo
operator.
Module 8 | Page 2
2013 PTC
operator.
operator.
al
se
Task 2:
nl
In
te
rn
Fo
rP
TC
Task 3:
Add the extracted columns together and assign the result to a new vector.
operator.
2013 PTC
Module 8 | Page 3
operator
Fo
rP
TC
In
te
rn
al
se
nl
Module 8 | Page 4
2013 PTC
Define an array.
Evaluate a function using an array.
Create a new array containing the original array and the function results using the augment function.
nl
Scenario
When evaluating a function over a range, Mathcad creates two matrices. One contains the range
variable and one contains the function results. A single matrix containing both is a more desirable
output.
se
In the following exercise, define a range variable t, from 1 to 10 in increments of 0.5. Place the
range variable, t, in a matrix and use it in the following function:
Fo
rP
TC
In
te
rn
al
2013 PTC
Module 8 | Page 5
y
nl
O
se
U
al
rn
te
In
TC
rP
Fo
Module 8 | Page 6
2013 PTC
y
nl
U
se
O
Units
Fo
rP
TC
In
te
rn
al
Module 9
2013 PTC
Module 9 | Page 1
nl
Scenario
se
Task 1:
Define a function for resistance using voltage (V) and current (i) as arguments. Evaluate this
function using variables with units assigned. Then define a custom unit and reevaluate the function
using this custom unit.
rn
al
te
TC
Task 2:
In
rP
Fo
Module 9 | Page 2
2013 PTC
Scenario
se
nl
Study the deflection of a beam with both ends simply supported with a concentrated intermediate
load, W, applied a distance, a, from the left end of the beam.
Task 1:
al
rP
TC
In
te
rn
Define the reaction forces, moments, slopes, and deflections at the left and
right ends of the beam, denoted by A and B respectively.
Fo
Task 2:
1. Define the following for the left (A) end of the beam:
2013 PTC
Module 9 | Page 3
Task 3:
nl
2. Define the following for the right (B) end of the beam:
se
1. Define the following formula for the deflection of the beam at point x, where 0 < x < L:
al
The final term in the definition of y(x) is included when the Boolean term, x > a, is
true (or equal to 1 internally). Think of this term as an on/off switch.
te
rn
2. Calculate the deflection at x = L/2. Display the result in inches and millimeters.
3. Calculate a table of deflections for points along the beam, beginning at x = 0 ft and stopping
at x = L = 30 ft. Use a total of 51 points over the range. Display the result in inches and
millimeters.
In
This example was adapted from the Mathcad electronic book Roark's Formulas
for Stress & Strain.
Fo
rP
TC
Module 9 | Page 4
2013 PTC
Task 1:
se
al
nl
Scenario
rn
Task 2:
te
In
Fo
rP
TC
2013 PTC
Module 9 | Page 5
y
nl
O
se
U
al
rn
te
In
TC
rP
Fo
Module 9 | Page 6
2013 PTC
y
nl
O
U
se
2-D Plotting
Fo
rP
TC
In
te
rn
al
Module 10
2013 PTC
Module 10 | Page 1
Scenario
nl
Task 1:
In
te
Task 2:
rn
rP
TC
Select XY Plot
appears.
al
se
Fo
Module 10 | Page 2
2013 PTC
se
Fo
rP
TC
In
te
rn
al
nl
four
In the Traces group. click Add Trace
times to add four additional placeholders.
2013 PTC
Module 10 | Page 3
y
nl
O
se
U
al
rn
te
In
TC
rP
Fo
Module 10 | Page 4
2013 PTC
y
nl
O
U
se
Project Day 1
Fo
rP
TC
In
te
rn
al
Module 11
2013 PTC
Module 11 | Page 1
nl
Define variables.
Define and use a table.
Create and evaluate equations.
Define range variables.
Use calculus operators.
Create a 2D plot.
se
Scenario
In this project, you analyze a simply supported beam.
al
Task 1:
Save the completed file. You will use it for the project in day 2.
rP
TC
In
te
rn
Fo
Module 11 | Page 2
2013 PTC
se
nl
3. Create the equations and calculate the reaction, moment, slope, and deflection at the left
support using the equations shown.
rP
TC
In
te
rn
al
4. Create the equations and calculate the reaction, moment, slope, and deflection at the right
support using the equations shown.
Task 2:
Calculate the deflection, slope, moment, and shear along the length of the beam.
Fo
1. Calculate the deflection along the length of the beam using the equation shown.
2013 PTC
Module 11 | Page 3
Plot the shear, moment, slope, and deflection along the length of the beam.
nl
Task 3:
se
U
Calculate the average shear stress at the intersection between the flange
and the web at the location of maximum shear.
te
Task 4:
rn
al
In
1. Assign the maximum shear force, Vmax equal to the reaction at the left support, R1.
Fo
rP
TC
Module 11 | Page 4
2013 PTC
Task 5:
1. In the header of the Mathcad document, type Structural Project: Beam Structural
Analysis.
2. In the footer of the document, insert the data and page number.
3. Save the completed file to use in day 2.
Fo
rP
TC
In
te
rn
al
se
nl
2013 PTC
Module 11 | Page 5
Define variables.
Create and evaluate equations.
Use operators.
Define range variables.
Create and use matrices.
Create a 2D plot.
nl
Scenario
rn
al
Task 1:
se
In this project, you calculate the critical speed of a shaft bearing with an asymmetrical load, and
how the critical speed varies with load location.
Save the completed file. You will use it for the project in day 2.
TC
In
te
Fo
rP
3. Calculate the critical speed of the shaft using the equations shown.
Task 2:
Calculate how the critical speed varies with load position and plot the results.
1. Calculate the critical speed of the shaft with changes on load position.
2. Plot the load location vs. critical speed of the shaft.
Module 11 | Page 6
2013 PTC
Task 3:
1. In the header of the Mathcad document, type Mechanical Project: Critical Speed of Shaft
Bearing.
2. In the footer of the document, insert the data and page number.
3. Save the completed file to use in day 2.
Fo
rP
TC
In
te
rn
al
se
nl
2013 PTC
Module 11 | Page 7
y
nl
O
se
U
al
rn
te
In
TC
rP
Fo
Module 11 | Page 8
2013 PTC
y
nl
O
U
se
3-D Plotting
Fo
rP
TC
In
te
rn
al
Module 12
2013 PTC
Module 12 | Page 1
Scenario
Define the function and data to plot.
Task 1:
nl
Plot a set of data and plot a surface that passes through the data points. The plots are formatted
such that the prominent features of both appear.
se
In
Task 2:
te
rn
al
TC
rP
Select 3D Plot
appears.
Fo
Module 12 | Page 2
2013 PTC
Task 3:
se
te
rn
al
nl
TC
In
Fo
rP
2013 PTC
Module 12 | Page 3
nl
to de-select.
7. Click outside the region.
Fo
rP
TC
In
te
rn
al
se
Module 12 | Page 4
2013 PTC
Scenario
nl
Task 1:
te
rn
al
se
Plot data and a function on the same three dimensional plot and format the plot.
Task 2:
In
Plot data on the same plot used in task 1 and format the plot.
rP
TC
1. Define the data shown in three separate matrices and augment the results into one matrix.
Fo
Task 3:
2013 PTC
Module 12 | Page 5
y
nl
O
se
U
al
rn
te
In
TC
rP
Fo
Module 12 | Page 6
2013 PTC
y
nl
O
se
U
Boolean Conditions
Fo
rP
TC
In
te
rn
al
Module 13
2013 PTC
Module 13 | Page 1
Scenario
al
se
nl
The simple beam shown has a length equal to 25 inches. It is loaded with a 10 pound concentrated
load, resulting in the shear diagram shown. Integrating the shear equation results in the moment
equation. The following steps are necessary to create and plot a Piecewise Continuous function to
validate the moment equation:
Create the equation for the shear diagram.
Calculate the moment along the beam by integrating the shear equation.
Plot both equations.
te
Shear Diagram
Create the equation for the shear diagram and plot the equation.
In
Task 1:
rn
Simple Beam
TC
Fo
rP
Module 13 | Page 2
2013 PTC
3. Create the equation for the shear diagram as a function of Lx. Use Boolean operators to
represent the entire shear diagram in one equation.
se
nl
Task 2:
Calculate the moment along the beam by integrating the shear equation.
Fo
rP
TC
In
te
rn
al
1. Integrate the shear function to determine the moment along the length. Because the shear
function is a step function, it must be integrated in two parts.
First Section
Second Section
Module 13 | Page 3
nl
Scenario
Task 1:
TC
In
te
rn
al
se
Use Boolean operators to create a Piecewise Continuous function of the velocity of a particle
traveling in the positive x direction at 10 m/sec. As shown in the graph, the particle begins
decelerating at a rate of 20 m/sec2. Then determine the equation for the displacement of the particle
by integrating the velocity equation, and plot both the velocity and displacement curves.
Fo
rP
1. Create the equation for the displacement of the particle as a function of time by integrating
the equation for velocity created in Task 1. Integrate the equation from 0 to t.
2. Calculate the displacement of the particle at 5 sec.
3. Plot the displacement of the particle on the same graph created in the previous task.
Module 13 | Page 4
2013 PTC
y
nl
O
U
se
Symbolics
Fo
rP
TC
In
te
rn
al
Module 14
2013 PTC
Module 14 | Page 1
Scenario
Symbolically solve for a variable using the solve keyword.
Task 1:
nl
Use the solve and float keywords in a symbolic solution, and retroactively assign and evaluate
the results.
se
In
Task 2:
te
rn
al
2. Place the cursor to the right of the expression and insert the solve keyword. Click outside the
region to evaluate.
rP
TC
1. Using the existing expression, position the cursor to the right of the solve keyword as shown.
Fo
3. Type 4 in the placeholder to approximate the solution to four floating point digits of accuracy.
Click outside the region to evaluate.
Module 14 | Page 2
2013 PTC
Task 3:
operator.
se
nl
1. Using the existing expression, position the cursor to the left of the expression, as shown.
rn
al
operator.
te
TC
In
Fo
rP
2013 PTC
Module 14 | Page 3
nl
Scenario
Task 1:
Use the solve and invlaplace keywords to solve a transfer function and calculate the response in
the time domain.
Type the transfer function in Mathcad and perform the calculations described.
se
rn
te
Task 2:
al
2. Insert the solve keyword to calculate the poles of the function; that is, the values of s for
which T(s) is undefined.
3. Retroactively assign the result of the previous step to a variable P.
In
Insert the invlaplace keyword to calculate the response in the time domain.
Retroactively assign the result of the previous step to a function R(t).
Define a range variable for t from 0 to 20 in increments of 0.1.
Create a 2-D X-Y plot of R(t) verses t.
rP
1.
2.
3.
4.
TC
Task 3:
Fo
Task 4:
Module 14 | Page 4
2013 PTC
y
nl
O
U
se
Solving
Fo
rP
TC
In
te
rn
al
Module 15
2013 PTC
Module 15 | Page 1
Scenario
nl
Task 1:
Solve for multiple roots of a function using the built-in root function.
Define and plot the function.
se
Task 2:
TC
In
te
rn
al
Fo
rP
Module 15 | Page 2
2013 PTC
se
nl
4. Plot the function g(t) and add two vertical markers to the plot, one at each root.
Fo
rP
TC
In
te
rn
al
2013 PTC
Module 15 | Page 3
Solve for the roots of an equation using the built-in root function.
nl
Scenario
se
The following function, M(x), represents the moment equation for a concrete beam. The beam is
200 units long.
The roots of this function represent a change in sign for the internal moment in the beam. This is
important in the design of the beam because it identifies where the sections of the beam change
from tension to compression, or compression to tension.
Plot the moment function, and evaluate the roots using the built-in root function.
Fo
rP
TC
In
te
rn
al
Module 15 | Page 4
2013 PTC
nl
Scenario
al
se
Following Kirchhoffs Law, use a solve block with units to calculate the current traveling in the three
loops of the circuit shown.
Task 1:
rn
TC
In
te
rP
Fo
2013 PTC
Module 15 | Page 5
nl
rn
al
se
rP
TC
In
te
Fo
Module 15 | Page 6
2013 PTC
nl
Fo
rP
TC
In
te
rn
al
se
2013 PTC
Module 15 | Page 7
nl
Scenario
se
It is known that friction factor, f, pipe roughness, , pipe diameter, D, and Reynolds number, Re,
are related by the following equation.
Using a numeric solve block, calculate the friction factor, assuming the following known quantities:
rn
al
Pipe Diameter
D = 2.5 in
Pipe Roughness
= 8.5 x 10-4 in
Reynolds Number
Re = 104
TC
In
te
Create a plot of friction factor versus Reynolds numbers by calling the solve block iteratively using
the vector of Reynolds numbers provided in the expression shown.
rP
Note that you must establish the call to Find as a function of Reynolds number. For
example: MyFunc(Re) := find( f ).
Fo
Module 15 | Page 8
2013 PTC
y
nl
O
U
se
Optimization
Fo
rP
TC
In
te
rn
al
Module 16
2013 PTC
Module 16 | Page 1
Scenario
rn
Task 1:
al
se
nl
The desired state is a paper grocery bag with a volume of 1.5 ft3. Calculate the necessary
dimensions of the bag to use the least amount of paper. To simplify the problem, ignore all overlap
used to glue the bags together.
In
te
1. Define the objective function shown for the surface area of the bag (in terms of L, W, and
H) as the area of the base plus the area of the four sides.
TC
Fo
rP
Module 16 | Page 2
2013 PTC
nl
te
rn
al
se
In
TC
Fo
rP
2013 PTC
Module 16 | Page 3
nl
Fo
rP
TC
In
te
rn
al
se
Module 16 | Page 4
2013 PTC
y
nl
O
se
U
al
Module 17
Fo
rP
TC
In
te
rn
Differential Equations
2013 PTC
Module 17 | Page 1
Scenario
Define and solve the ordinary differential equation for the system.
nl
Task 1:
Solve an ordinary differential equation for a simple spring-mass system with several values of a
forcing function constant, .
se
al
In
te
rn
Fo
rP
TC
Module 17 | Page 2
2013 PTC
nl
Task 2:
se
Solve the system for two values of the parameter and plot.
rn
al
rP
TC
In
te
Fo
2013 PTC
Module 17 | Page 3
y
nl
O
se
U
al
rn
te
In
TC
rP
Fo
Module 17 | Page 4
2013 PTC
y
nl
O
U
se
Programming
Fo
rP
TC
In
te
rn
al
Module 18
2013 PTC
Module 18 | Page 1
Scenario
al
se
Task 1:
nl
Create a Mathcad program using for loops that takes an arbitrary m-by-n array as an argument,
and then calculates the number of odd elements and their sum.
In
Programming
te
rn
TC
.
Select Program
Initialize c and s to 0 respectively, as the first
two lines of code, by selecting the Local
operator. To insert a new
Assignment
line, highlight the previous line and press
ENTER.
rP
Fo
Programming
desired operator.
Module 18 | Page 2
2013 PTC
nl
In
te
rn
al
se
, and
TC
Fo
rP
2013 PTC
subscripts.
A Boolean Equal To
used.
operator is
Module 18 | Page 3
nl
subscripts.
se
In
te
rn
al
TC
Matrix
Fo
rP
Module 18 | Page 4
2013 PTC
Scenario
Create a Mathcad program using looping constructs and use the program to create a customized
function that sorts and removes repeated values from a vector of data.
Task 1:
nl
This kind of function is useful with built-in interpolation functions like cspline, which require a vector
that is monotonically increasing.
se
al
rP
TC
In
te
rn
Fo
Module 18 | Page 5
y
nl
O
se
U
al
rn
te
In
TC
rP
Fo
Module 18 | Page 6
2013 PTC
y
nl
O
U
se
Data Analysis
Fo
rP
TC
In
te
rn
al
Module 20
2013 PTC
Module 20 | Page 1
Scenario
Use the following set of data to create an ammonia enthalpy function using linear interpolation.
In
te
rn
al
se
nl
For a constant pressure of 10 psia, the enthalpy in BTU/lb of ammonia for temperature, T, in
degrees, F, is given:
rP
Task 1:
TC
Temperature is listed in the first column, and enthalpy is listed in the second column.
Do not use units in this exercise.
Fo
1. Begin by typing the data into your worksheet in two separate vectors, T and H.
2. Define a function h(T), using linear interpolation, which represents the enthalpy of ammonia,
h, at temperature T.
3. Calculate the enthalpy at T = 38 F.
4. Create a 2-D plot showing the data and the function on the same set of axes. Use a range
variable T1 from 0 to 50 in increments of 0.1.
5. Plot the point calculated in the previous step at T = 38 F.
Module 20 | Page 2
2013 PTC
Scenario
nl
Regress a set of data using the polyfit function. Use a set of data in the Excel format,
datastep_07.xlsx, and fit several polynomials to the data. To begin, set the array origin equal to 1.
Task 1:
operator.
se
Import a set of data and create a range variable to use in the regression functions.
.
In the Data Import/Export group, click Data Filename
The Browser dialog box appears. Browse to the file datastep_07.xlsx. Click Open.
rn
al
te
In
TC
.
In the Functions group, click File Access
Select the READFILE function.
Complete the first two placeholders as shown. Delete the remaining placeholders.
Fo
rP
The second argument is a string variable that may have one of the following values:
delimited, fixed, or Excel.
2013 PTC
Module 20 | Page 3
Task 2:
Regress the original data using both a third and fourth order polynomial.
nl
se
rn
al
4. Write the regressed function using the second column of the P matrix. The second column
contains the coefficients listed in increasing powers of xx, beginning with the coefficient of xx0.
Fo
rP
TC
In
te
Module 20 | Page 4
2013 PTC
y
nl
O
U
se
Project Day 2
Fo
rP
TC
In
te
rn
al
Module 21
2013 PTC
Module 21 | Page 1
Use
Use
Use
Use
nl
Scenario
se
In this project, you import a table of beam sections for the beam used in the Structural Engineering
Day 1 project and select the sections that satisfies given design criteria.
Task 1:
rn
al
In
te
TC
Task 2:
1. Using the programming functionality, identify the sections that satisfy the design criteria.
Fo
rP
Task 3:
Module 21 | Page 2
2013 PTC
nl
Scenario
Task 1:
rP
Task 2:
TC
In
te
rn
al
se
In this project you set a threshold limit for the critical speed and vary the inner and outer diameter of
the shaft used in the Mechanical Engineering Day 1 project.
Fo
1. Create a program using for loops to determine what combination of inner and outer diameters
meets the threshold limit specifications.
2. Output the final results in rpm.
3. Create a frequency table/matrix, as shown.
2013 PTC
Module 21 | Page 3
Task 3:
Plot the shaft thickness versus critical speed for the thickness.
nl
Fo
rP
TC
In
te
rn
al
Task 4:
se
1. Using only the combinations of inner and outer diameter that satisfy the critical speed
threshold limit specification, plot the shaft thickness versus the critical speed for each
thickness of the shaft.
Module 21 | Page 4
2013 PTC
y
nl
O
se
U
al
Appendix A
Fo
rP
TC
In
te
rn
2013 PTC
Appendix A | Page 1
Scenario
Insert the mathematical expression.
Task 1:
nl
se
rn
Integral
integral.
al
Operators
te
In
Pi
, and select
TC
rP
3. Type the expression in the appropriate placeholder and type and to complete the integral.
To insert the Greek letters, select the Math tab. In the Operators and Symbols
, and select the appropriate symbol.
Fo
Appendix A | Page 2
2013 PTC
4. When the entire expression has been inserted, click anywhere inside the region and evaluate
operator.
se
nl
Fo
rP
TC
In
te
rn
al
2013 PTC
Appendix A | Page 3
Scenario
se
Calculate the area of the following parallelogram using the values shown:
nl
al
Calculate the area of the parallelogram shown using the values listed
above. Note the angle must be in radians.
rn
Task 1:
te
rP
TC
In
Fo
2013 PTC
nl
Scenario
rn
al
se
Evaluate the centerline deflection of a shaft that is loaded with a concentrated load at the center.
The load varies from 1 lb to 5 lb in 0.2 lb increments.
Where:
TC
In
te
rP
Fo
Task 1:
2013 PTC
Appendix A | Page 5
se
nl
TC
In
te
rn
al
Fo
rP
Appendix A | Page 6
2013 PTC
Define an array.
Evaluate a function using an array.
Create a new array containing the original array and the function results using the augment function.
nl
Scenario
When evaluating a function over a range, Mathcad creates two matrices. One contains the range
variable and one contains the function results. A single matrix containing both is a more desirable
output.
Task 1:
se
Define a range variable, t, from 1 to 10 in increments of 0.5. Place the range variable, t, in a matrix
and use it in the following function:
al
rn
te
In
Task 3:
TC
Fo
rP
2013 PTC
Appendix A | Page 7
Task 4:
al
se
nl
Create a single matrix containing the vector T and the results of the function f(T).
operator.
te
a Definition
rn
In
Fo
rP
TC
2013 PTC
Scenario
se
nl
Study the deflection of a beam with both ends simply supported with a concentrated intermediate
load, W, applied a distance, a, from the left end of the beam.
Task 1:
rP
TC
In
te
rn
al
Task 2:
Define the reaction forces, moments, slopes, and deflections at the left and
right ends of the beam, denoted by A and B respectively.
Fo
2013 PTC
Appendix A | Page 9
Task 3:
se
nl
1. Define the following formula for the deflection of the beam at point x, where 0 < x < L.
te
rn
al
The final term in the definition of y(x) is included when the Boolean term, x > a, is
true (or equal to 1 internally). Think of this term as an on/off switch.
rP
TC
In
Fo
Appendix A | Page 10
2013 PTC
nl
This example was adapted from the Mathcad electronic book Roark's Formulas
for Stress & Strain.
Fo
rP
TC
In
te
rn
al
se
2013 PTC
Appendix A | Page 11
nl
Scenario
Task 1:
TC
In
te
rn
al
se
Use Boolean operators to create a Piecewise Continuous function of the velocity of a particle
traveling in the positive x direction at 10 m/sec. As shown in the graph, the particle begins
decelerating at a rate of 20 m/sec2. Then determine the equation for the displacement of the particle
by integrating the velocity equation, and plot both the velocity and displacement curves.
Fo
rP
1. Type the equation for the velocity of the particle as a function of time.
Appendix A | Page 12
2013 PTC
Task 2:
se
nl
al
rn
TC
In
te
Fo
rP
2013 PTC
Appendix A | Page 13
Solve for the roots of an equation using the built-in root function.
nl
Scenario
se
The following function, M(x), represents the moment equation for a concrete beam. The beam is
200 units long.
The roots of this function represent a change in sign for the internal moment in the beam. This is
important in the design of the beam because it identifies where the sections of the beam change
from tension to compression, or compression to tension.
Plot the moment function, and evaluate the roots using the built-in root function.
Plot the moment function and use it to estimate the roots of the equation.
rn
al
Task 1:
In
te
Fo
rP
TC
Appendix A | Page 14
2013 PTC
nl
Scenario
se
It is known that friction factor, f, pipe roughness, , pipe diameter, D, and Reynolds number, Re,
are related by the following equation:
rn
te
Pipe diameter
D = 2.5 in
Pipe roughness
= 8.5 x 10-4 in
Reynolds number
Re = 104
al
Using a numeric solve block, calculate the friction factor assuming the following known quantities:
rP
TC
In
Create a plot of friction factor versus Reynolds numbers by calling the solve block iteratively using
the vector of Reynolds numbers provided in the expression shown.
Fo
Note that the call to Find must be set up as a function of the Reynolds number. For
example: MyFunc(Re) := find( f ).
Task 1:
2013 PTC
Appendix A | Page 15
nl
rn
Create a plot of friction factor versus Reynolds numbers by calling the solve block
iteratively using the vector of Reynolds numbers provided below. Note that the call to
Find must be set up as a function of the Reynolds number; that is, MyFunc(Re) := find( f ).
al
Task 2:
se
te
Fo
rP
TC
In
Appendix A | Page 16
2013 PTC
nl
Fo
rP
TC
In
te
rn
al
se
2013 PTC
Appendix A | Page 17
Scenario
nl
Create a Mathcad program using looping constructs and use the program to create a customized
function that sorts and removes repeated values from a vector of data.
operator.
rn
3. Insert a Program
operator.
al
2. Insert a Definition
se
Task 1:
This kind of function is useful with built-in interpolation functions like cspline, which require a vector
that is monotonically increasing.
Fo
rP
TC
In
te
Appendix A | Page 18
2013 PTC
nl
Fo
rP
TC
In
te
rn
al
se
2013 PTC
Appendix A | Page 19
Scenario
Use the following set of data to create an ammonia enthalpy function using linear interpolation.
In
te
rn
al
se
nl
For a constant pressure of 10 psia, the enthalpy in BTU/lb of ammonia for temperature, T, in
degrees, F, is given:
Fo
rP
TC
Temperature is listed in the first column, and enthalpy is listed in the second column.
Do not use units in this exercise.
Appendix A | Page 20
2013 PTC
Task 1:
se
nl
1. Type the data into your worksheet in two separate vectors, T and H.
rn
al
te
Task 2:
In
Create a 2-D plot showing the data and the function on the same set of axes.
Use a range variable, T1, from 0 to 50 in increments of 0.1.
TC
Fo
rP
2013 PTC
Appendix A | Page 21
se
nl
Fo
rP
TC
In
te
rn
al
Appendix A | Page 22
2013 PTC