0 calificaciones0% encontró este documento útil (0 votos)

22 vistas114 páginasmathcad

TRN-4010-003-02_SG-Ins_Exc_EN

© © All Rights Reserved

PDF, TXT o lea en línea desde Scribd

mathcad

© All Rights Reserved

0 calificaciones0% encontró este documento útil (0 votos)

22 vistas114 páginasTRN-4010-003-02_SG-Ins_Exc_EN

mathcad

© All Rights Reserved

Está en la página 1de 114

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

Welcome to PTC University!

With an unmatched depth and breadth of product development knowledge, PTC University helps

you realize the most value from PTC products. Only PTC University offers:

se

nl

proprietary approach used by PTC to develop and deliver learning solutions.

Flexible Delivery Options PTC University ensures you receive the same quality training programs

regardless of the learning style. Our extensive experience, innovative learning techniques, and

targeted learning modules facilitate the rapid retention of concepts, and higher user productivity.

Premier Content and Expertise A thorough instructor certification process and direct access to the

PTC product development and PTC consulting organizations means that only PTC courses can

give you highly-qualified instructors, the most up-to-date product information and best practices

derived from thousands of deployments.

Global Focus PTC University delivers training where and when you need it by providing over 100

training centers located across 35 countries offering content in nine languages.

Delivering Value A role-based learning design ensures the right people have the right tools to do

their jobs productively while supporting the organizations overall performance goals.

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.

North America

se

nl

Tel: (888) 782-3773

Fax: (781) 370-5307

Technical Support (Monday - Friday)

Tel: (800) 477-6435

Fax: (781) 707-0328

License Management and Contracts

Tel: 877-ASK-4-PTC (877-275-4782)

Fax: (781) 707-0331

Europe

Tel: +800-PTC-4-HELP (00-800-78-24-43-57)

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

Live Classroom (either in-center or on-site)

Virtual Class (live training delivered over the Web)

Web-based Training

Assessing using Pro/FICIENCY, PTCs Web-based skills assessment and development planning

tool.

Improving through the review of self-paced learning materials available in PTC University.

rn

self-paced and virtual courses corresponding to PTC products.

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.

Each student that enrolls in a PTC class has a PTC University account. This account will be

automatically created if you do not already have one. As part of the class, you receive additional

content in your account:

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.

PTC uses a role-based training approach. The roles and the associated training

are graphically displayed in a curriculum map. Curriculum maps are available

for numerous PTC products and versions in the training section of PTC.com at

http://www.ptc.com/services/edserv/learning/paths/index.htm.

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.

Guide Layout

The information in this guide is organized as topics to aid students in finding information after the

class is complete. Each topic is divided into the following sections:

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

Typing Math ........................................................................................................................ 3-2

Typing Math ........................................................................................................................ 3-3

nl

Defining and Evaluating a Variable........................................................................................ 4-2

Functions..................................................................................................................................... 5-1

Define and Evaluate a Function ............................................................................................ 5-2

se

Using a Range Variable........................................................................................................ 6-2

Using A Range Variable ....................................................................................................... 6-4

al

Defining and Extracting Elements from an Array .................................................................... 8-2

Using Arrays ....................................................................................................................... 8-5

te

rn

Using Units ......................................................................................................................... 9-2

Using Units ......................................................................................................................... 9-3

Using Temperature Units...................................................................................................... 9-5

In

Plotting Functions in 2-D .................................................................................................... 10-2

TC

Structural Engineering Project Day 1................................................................................ 11-2

Mechanical Engineering Project Day 1 ............................................................................. 11-6

rP

Plotting Multiple Traces ...................................................................................................... 12-2

Plotting Multiple Traces ...................................................................................................... 12-5

Fo

Using Piecewise Continuous Functions ............................................................................... 13-2

Using Piecewise Continuous Functions ............................................................................... 13-4

Symbolics.................................................................................................................................. 14-1

Symbolic Calculation.......................................................................................................... 14-2

Symbolic Calculation.......................................................................................................... 14-4

Solving ...................................................................................................................................... 15-1

Solving for Roots of Equations............................................................................................ 15-2

Solving for Roots of Equations............................................................................................ 15-4

Numerically Solving Systems of Linear Equations ................................................................ 15-5

Numerically Solving Systems of Nonlinear Equations ........................................................... 15-8

Constrained Optimization ................................................................................................... 16-2

Differential Equations ................................................................................................................ 17-1

Ordinary Differential Equations ........................................................................................... 17-2

Programming............................................................................................................................. 18-1

Looping Constructs............................................................................................................ 18-2

Looping Constructs............................................................................................................ 18-5

nl

Interpolating Data .............................................................................................................. 20-2

Regressing Data................................................................................................................ 20-3

se

Structural Engineering Project Day 2................................................................................ 21-2

Mechanical Engineering Project Day 2 ............................................................................. 21-3

Fo

rP

TC

In

te

rn

al

Typing Math: Solution ......................................................................................................... A-2

Define and Evaluate a Function: Solution............................................................................. A-4

Using a Range Variable: Solution ........................................................................................ A-5

Using Arrays: Solution ........................................................................................................ A-7

Using Units: Solution .......................................................................................................... A-9

Using Piecewise Continuous Functions: Solution.................................................................A-12

Solving for Roots of Equations: Solution .............................................................................A-14

Numerically Solving Systems of Nonlinear Equations: Solution.............................................A-15

Looping Constructs: Solution..............................................................................................A-18

Interpolating Data: Solution ................................................................................................A-20

y

nl

O

se

U

al

Module 3

Fo

rP

TC

In

te

rn

2013 PTC

Module 3 | Page 1

Objectives

After successfully completing this exercise, you will be able to:

Type a mathematical expression in Mathcad.

Scenario

Task 1:

nl

al

2. Type 1.

each step sequentially without exiting

the Math region created.

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

operator.

5. Type x+ y in the placeholder. To type the

Fo

operator.

expression. Insert the Multiplication

operator.

operator.

8. Type x+ in the argument placeholder.

9. Type cos. Insert the Parentheses

10. Type x in the argument placeholder.

operator.

Module 3 | Page 2

2013 PTC

Objectives

After successfully completing this exercise, you will be able to:

Type a mathematical expression in Mathcad.

Evaluate a mathematical expression in Mathcad.

Scenario

nl

Insert the mathematical expression shown.

Task 1:

se

2. Fill in the empty placeholders of the expression with the math shown.

To insert the Greek letters, you can use the keyboard shortcuts. Alternately, you can

rP

TC

In

te

rn

al

select the desired Greek letter.

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

Objectives

After successfully completing this exercise, you will be able to:

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

Math tab. In the Operators and Symbols group,

TC

To insert you can select the Math

, and select

rP

Pi

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

blank space in the worksheet below or to the

right of the variable definition. Type Var and

press =.

This completes the exercise.

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

(CHALLENGE)

Objectives

After successfully completing this exercise, you will be able to:

nl

Insert a built-in function.

Evaluate a function.

Scenario

rn

Task 1:

al

se

In

te

using the values listed above. Note the angle

must be in radians.

The expression for area in terms of a, b, and ,

is shown.

Fo

rP

TC

function AREA with arguments a, b, and .

3. Evaluate the function using the values shown:

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

Objectives

After successfully completing this exercise, you will be able to:

Define and evaluate a range variable.

Use a range variable in a function calculation.

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

the range variable name y.

te

,

In

and selecting the desired operator.

TC

comma, -1,. Two placeholders and the Range

operator appear.

rP

first placeholder, and type the last value in the

range, 1, in the second placeholder.

Task 2:

Fo

Module 6 | Page 2

2013 PTC

nl

Fo

rP

TC

In

te

rn

al

se

2013 PTC

Module 6 | Page 3

Objectives

After successfully completing this exercise, you will be able to:

Evaluate a range variable.

Define and evaluate a function using a range variable.

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

I = 10.5

L = Length of the shaft (in)

L = 16

E = Modulus of Elasticity (psi)

E = 10 x 106

W = Load (lbs)

W varies from 1 to 5 lbs in 0.2 lb increments

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

Array

Objectives

After successfully completing this exercise, you will be able to:

nl

Extract columns from an array.

Recombine the columns to form a new array.

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

columns, going from 1 to 3 in increments of 1.

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

symbol by selecting the Math tab,

, and selecting

TC

clicking Operators

Range

rP

Matrix Index

operator.

Fo

the rows and columns of the matrix.

operator.

placeholder.

Module 8 | Page 2

2013 PTC

operator to evaluate

the matrix.

operator.

operator.

al

se

Task 2:

nl

subscripts when displaying an array.

The subscripts are not part of the

variable name and force Mathcad to

display the array in a table by stacking

the rows into a column.

In

te

rn

column. Evaluate the variable C1.

Fo

rP

TC

C2 and C3.

Task 3:

Add the extracted columns together and assign the result to a new vector.

operator.

2013 PTC

Module 8 | Page 3

to evaluate the vector MV.

operator

Fo

rP

TC

In

te

rn

al

se

nl

Module 8 | Page 4

2013 PTC

Objectives

After successfully completing this exercise, you will be able to:

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

Objectives

After successfully completing this exercise, you will be able to:

Evaluate a function using units.

Define a custom unit.

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.

V (voltage) and i (current) as arguments.

rn

al

mA.

te

arguments, but format the result such that the

units are not simplified.

TC

Task 2:

In

mA. Display the result in k.

rP

mA.

Fo

Module 9 | Page 2

2013 PTC

Objectives

After successfully completing this exercise, you will be able to:

Define variables using units.

Evaluate a function using units.

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

Objectives

After successfully completing this exercise, you will be able to:

Define a temperature unit.

Rescale a temperature unit.

Task 1:

se

Celsius.

Use implied multiplication when

inserting degrees Celsius.

al

nl

Scenario

rn

Task 2:

te

In

defined to define the temperature at which the

component fails.

Fo

rP

TC

degrees Celsius, and degrees Fahrenheit.

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

Objectives

After successfully completing this exercise, you will be able to:

Plot functions in 2-D.

Scenario

nl

Task 1:

Define the function and the range of frequency.

In

Select the Plots tab.

te

Task 2:

rn

, representing the plot range. Note the

incorporation of into the range.

rP

TC

Select XY Plot

appears.

al

se

represents the frequency of the system.

represents the damping coefficient.

Fo

Module 10 | Page 2

2013 PTC

additional placeholders.

Select the Plots tab.

se

Fo

rP

TC

In

te

rn

al

Zill, Dennis G. and Michael R. Cullen.

Advanced Engineering Mathematics.

PWS Publishing Company, Boston:

1992. 197.

using five different values of , as shown in the

figure. Click outside of the plot region to display

the plot.

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

(CHALLENGE)

Objectives

After successfully completing this exercise, you will be able to:

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

beam shown using a table.

t=20.2 mm

h=903.3 mm

b=303.3 mm

s= 15.1 mm

Ix=325253 cm4

E=120 kN/mm2

Fo

shown.

L=15 m

a= 5 m

W=18 kN

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.

equation for slope as shown.

2013 PTC

Module 11 | Page 3

equation for moment as shown.

Plot the shear, moment, slope, and deflection along the length of the beam.

nl

Task 3:

equation for shear as shown.

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

of the beam on a 2D plot. Format the plot as

shown.

of the beam on a 2D plot. Format the plot as

shown.

In

1. Assign the maximum shear force, Vmax equal to the reaction at the left support, R1.

Fo

rP

TC

the equations shown.

intersection between the flange and the web

using the equation shown.

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

(CHALLENGE)

Objectives

After successfully completing this exercise, you will be able to:

Define variables.

Create and evaluate equations.

Use operators.

Define range variables.

Create and use matrices.

Create a 2D plot.

nl

Scenario

rn

Youngs Modulus, E = 210 GPA

Outer Diameter, D = 10 cm

Inner Diameter, d = 9 cm

Shaft Length, l = 1 m

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

shown.

Mass, M = 10 kg

Load Location, a = 50 cm

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

Objectives

After successfully completing this exercise, you will be able to:

Plot data on a 3-D plot.

Plot a function on a 3-D plot.

Format a 3-D plot.

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

Select the Plots tab.

TC

. A blank plot region

rP

Select 3D Plot

appears.

Fo

3. Add a second trace.

Select the Plots tab.

. A

In the Traces group, click Add Trace

second placeholder appears.

Type the function name only, S, with no

arguments, in the placeholder. Click outside

the plot to display the plots.

A QuickPlot always appears over the

default domain of 10 to 10 for the

independent variables.

Module 12 | Page 2

2013 PTC

Task 3:

Click in the plot region and select the first

trace, Data.

Select the Plots tab.

In the Styles group, click Trace Thickness

se

te

rn

al

Click the x-axis in the axis selector. The

x-axis in the axis selector and in the plot are

highlighted in blue.

Click the tick mark values and edit them to

range from 0 to 3 in steps of 1.

Click the y-axis in the axis selector. The

y-axis in the axis selector and in the plot are

highlighted in blue.

Click the tick mark values and edit them to

range from 0 to 3 in steps of 1.

3. Click outside the region to view the modified plot.

nl

Rotate the plot to view the data points, if

necessary.

TC

In

Click in the plot region and select the second

trace, S.

Select the Plots tab.

In the Styles group, click Trace Color

and select red.

Fo

rP

and select red.

5. Click outside the region.

2013 PTC

Module 12 | Page 3

Click in the plot region.

Select the Plots tab.

In the Axes group, click Axis Expressions

nl

to de-select.

7. Click outside the region.

Fo

rP

TC

In

te

rn

al

se

Module 12 | Page 4

2013 PTC

Objectives

After successfully completing this exercise, you will be able to:

Scenario

nl

Plot data in three dimensions.

Format a three dimensional plot.

Task 1:

te

rn

al

3. Format the plot as follows:

Scale the z axis to range from -75 to 75.

Scale the x axis to range from -4 to 4.

Scale the y axis to range from -4 to 4.

Fill the plot surface with the color red.

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

3. Format the plot so each plot is visible.

Increase the size of the data points.

Edit the color of the data points to red.

Task 3:

This completes the exercise.

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

Objectives

After successfully completing this exercise, you will be able to:

Create a Piecewise Continuous function.

Plot a Piecewise Continuous function.

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

location along the beam length. The range

variable increases in increments of 0.1 in.

2. Validate the range variable by evaluating it.

Fo

rP

inches.

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

function.

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

function.

2013 PTC

Module 13 | Page 3

(CHALLENGE)

Objectives

After successfully completing this exercise, you will be able to:

nl

Integrate the Piecewise Continuous function.

Plot the function and the integrated function.

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

2. Define a range variable for time. Use 0.1 second as the first value in the range.

3. Verify the resulting equation for velocity is correct by graphing it.

Task 2:

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

Objectives

After successfully completing this exercise, you will be able to:

Solve an expression using symbolics.

Use multiple symbolic keywords in a symbolic calculation.

Retroactively assign and evaluate the results.

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

Remember to insert the Equal To

operator.

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

Objectives

After successfully completing this exercise, you will be able to:

Retroactively assign and evaluate the solution results.

Plot the solution.

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

operator to extract each root.

2. Use the built-in Re and Im functions to plot the imaginary part verses the real part of each root.

3. Format the plot such that each pole appears as a red X. You might have to modify the window

of the plot to provide a good view.

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

Objectives

After successfully completing this exercise, you will be able to:

Find multiple roots of a function using the built-in root function.

Scenario

nl

Task 1:

Solve for multiple roots of a function using the built-in root function.

Define and plot the function.

se

in increments of 0.01.

Task 2:

TC

In

te

rn

al

Fo

rP

of the root function with a guess value of 0.1.

value of t to 1.5.

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

(CHALLENGE)

Objectives

After successfully completing this exercise, you will be able to:

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

Equations

Objectives

After successfully completing this exercise, you will be able to:

nl

Scenario

Use units in the solve block.

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

a solve block.

Select the Math tab.

.

Fo

A blank solve block region appears.

2013 PTC

Module 15 | Page 5

nl

type dimensionally-appropriate guess values for

the 3 currents, as shown. Use the unit milliamps,

mA.

rn

al

operator in

the constraint equations.

se

the equations shown describing the relationship

between the voltage, resistance, and current in

the circuit for the three loops.

rP

TC

In

te

solve block with a vector containing the unknown

variables assigned to the Find function.

Fo

Module 15 | Page 6

2013 PTC

nl

values and observe the results.

Fo

rP

TC

In

te

rn

al

se

2013 PTC

Module 15 | Page 7

Equations (CHALLENGE)

Objectives

After successfully completing this exercise, you will be able to:

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

Objectives

After successfully completing this exercise, you will be able to:

Solve a constrained optimization problem.

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

Select the Math tab.

Fo

rP

A blank solve block region appears.

Module 16 | Page 2

2013 PTC

nl

define dimensionally-appropriate guess values

for L, W, and H, as shown.

te

rn

al

se

define the constraints shown using Boolean

operators.

In

a vector assignment to the minimize function.

TC

by selecting the Functions tab. In the

,

Fo

rP

and select minimize.

2013 PTC

Module 16 | Page 3

nl

satisfied.

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

Objectives

After successfully completing this exercise, you will be able to:

Solve an ordinary differential equation.

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

Select the Math tab.

al

In

te

rn

A blank solve block appears.

Fo

rP

TC

define the equation for a spring-mass system

without damping. Use the prime notation, where

y(t) represents the displacement of the spring

at time t.

velocity for the system. Assume that initial

displacement and initial velocity are not placed

on the spring.

Module 17 | Page 2

2013 PTC

function of the forcing constant, , to the function

odesolve. Solve the system for t over the range

0 to 60.

nl

for each value of the parameter .

Task 2:

se

assigning the label Y1 to the function of t

denoted by Y(0.8), and similarly Y2 to Y(1) as

shown.

Solve the system for two values of the parameter and plot.

rn

al

0.1.

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

Objectives

After successfully completing this exercise, you will be able to:

Create a program using for loops.

Scenario

Select the Calculation tab.

In the Worksheet Settings group, click ORIGIN.

Select 1.

al

where M is the array to be passed to the

program.

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

and summing variable within the program.

Select the Math tab.

In the Operators and Symbols group, click

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

by selecting the Math tab, clicking

, and selecting the

Fo

Programming

desired operator.

a nested for loop.

Insert a new line.

Insert a for loop operator.

Click in the indented placeholder and insert

another for loop operator.

Module 18 | Page 2

2013 PTC

and j respectively, by typing them in the first

placeholder of each for loop as shown. The

outer index, i, iterates over the rows while the

inner index, j, iterates over the columns.

nl

variable operator. You can type the built-in

functions rows(M) and cols(M) in the worksheet.

In

te

rn

al

by pressing ENTER.

On the first line, insert an if operator.

On the second line, insert an else operator.

Add a second line to the indented if construct.

The programming construct appears as shown.

se

, and

selecting Range

operator by typing .., or by selecting the

TC

the built-in mod function. The mod function

divides its first argument by its second argument

and returns the remainder. To determine if

an element is odd, compare the element of M

with 2 to see if the remainder is 1. Type the

programming expressions shown.

Fo

rP

The subscripts used are Matrix Index

2013 PTC

subscripts.

A Boolean Equal To

used.

operator is

Module 18 | Page 3

Type in the expressions shown to increment c

by 1 and add the element of M to s.

The subscripts used are Matrix Index

nl

subscripts.

statement. The else statement should cause the

program to increment the inner loop, j. This is

accomplished using the continue operator.

se

the keyboard. You must insert it using

the Programming operators.

In

te

rn

al

program.

Press SPACEBAR until the entire outer for

loop highlights.

Press ENTER to add a new line.

Insert a 2x1 matrix in the placeholder.

Type s and type c in the two empty

placeholders that appear.

To insert the matrix, select the

Matrices/Tables tab, click Insert

, and select a 2x1 matrix.

TC

Matrix

Fo

rP

shown and passing it to the program.

Module 18 | Page 4

2013 PTC

Objectives

After successfully completing this exercise, you will be able to:

Create a Mathcad program using looping constructs.

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.

Accepts a vector, v, as an argument.

Sorts the vector into increasing order.

Removes repeated values from the vector.

Returns the sorted, cleaned up vector.

se

al

rP

TC

In

te

rn

Fo

2013 PTC

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

Objectives

After successfully completing this exercise, you will be able to:

Interpolate a set of data using linear interpolation.

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

Objectives

After successfully completing this exercise, you will be able to:

Regress a set of data using the polyfit function.

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

Select the Input/Output tab.

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

operator.

In

Select the Functions tab.

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.

operator, extract

the first column of the data and assign it to the

variable X4. Extract the second column of the

data and assign it to the variable Y4.

4. Create a range variable, range4. Use the built-in functions min and max as shown.

2013 PTC

Module 20 | Page 3

Task 2:

Regress the original data using both a third and fourth order polynomial.

and Fit4, representing third and fourth degree

polynomials as shown.

nl

regressed polynomial, assign the polyfitc

function to a variable P.

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

(CHALLENGE)

Objectives

After successfully completing this exercise, you will be able to:

the Excel component.

the READEXCEL function.

matrices and matrix functions.

the programming functionality.

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

Maximum allowable deflection: ymax = 4 mm

Maximum width of beam: bmax = 300 mm

In

te

3. Output the following from the Excel component:

The beam section designation.

The depth of the section, h.

The width of the section, b.

The second moment of the area, Ix.

Select the sections that satisfy the design criteria and calculate the bending stress.

TC

Task 2:

1. Using the programming functionality, identify the sections that satisfy the design criteria.

Fo

rP

satisfy the design criteria, using the equations

shown.

Task 3:

Structural_Analysis_Prime2.mcdx

This completes the exercise.

Module 21 | Page 2

2013 PTC

(CHALLENGE)

Objectives

After successfully completing this exercise, you will be able to:

nl

Create a program.

Create and use matrices and matrix functionality.

Scenario

Task 1:

the threshold limit specification.

rP

Task 2:

TC

In

te

rn

al

the shaft, Rlimit, to be equal to 1.946x104 rpm.

2. Define a spec table as shown.

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

Mechanical_shaft_bearing_Prime2.mcdx

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

Objectives

After successfully completing this exercise, you will be able to:

Type a mathematical expression in Mathcad.

Evaluate a mathematical expression in Mathcad.

Scenario

Insert the mathematical expression.

Task 1:

nl

se

the double integral symbols.

Select the Math tab.

In the Operators and Symbols group, click

rn

Integral

integral.

al

.

Place the cursor in the expression placeholder

of the integral operator and select Definite

Operators

te

placeholders and typing the numerical values

for the limits.

In

tab. In the Operators and Symbols

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

(CHALLENGE)

Objectives

After successfully completing this exercise, you will be able to:

Scenario

se

Calculate the area of the following parallelogram using the values shown:

nl

Insert a built-in function.

Evaluate a function.

al

Calculate the area of the parallelogram shown using the values listed

above. Note the angle must be in radians.

rn

Task 1:

te

, as shown.

rP

TC

In

variables as shown.

Fo

shown.

Appendix A | Page 4

2013 PTC

(CHALLENGE)

Objectives

After successfully completing this exercise, you will be able to:

nl

Evaluate a range variable.

Define and evaluate a function using a range variable.

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

I = 10.5

L = Length of the shaft (in)

L = 16

E = Modulus of elasticity (psi)

E = 10 x 106

W = Load (lb)

W varies from 1 to 5 lb in 0.2 lb increments

rP

Fo

Task 1:

2013 PTC

Appendix A | Page 5

se

nl

evaluate to validate the values.

TC

In

te

rn

values of W.

al

load W.

Fo

rP

Appendix A | Page 6

2013 PTC

Objectives

After successfully completing this exercise, you will be able to:

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

equal to 1.

2. Create a range variable, t, as shown.

Task 2:

te

In

range variable, t, to a matrix, T.

Task 3:

TC

subscript.

Define and evaluate the function.

Fo

rP

2013 PTC

Appendix A | Page 7

Task 4:

al

se

nl

f(T) and press =.

Create a single matrix containing the vector T and the results of the function f(T).

operator.

te

a Definition

rn

In

with the vectors T and f(T) as the arguments.

Fo

rP

TC

Appendix A | Page 8

2013 PTC

Objectives

After successfully completing this exercise, you will be able to:

Define variables using units.

Evaluate a function using units.

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

constants:

Area moment of inertia, I.

Length of beam, L.

Distance from left edge of beam to load, a.

Modulus of elasticity, E.

Load, W.

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

beam.

Reaction, RA.

Moment, MA.

Slope, A.

Deflection, yA.

2013 PTC

Appendix A | Page 9

Task 3:

se

nl

beam.

Reaction, RB.

Moment, MB.

Slope, B.

Deflection, yB.

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

result in inches and millimeters.

Fo

the beam, beginning at x = 0 ft and stopping at

x = L = 30 ft. Use a total of 51 points over the

range.

Define a range variable x in terms of L.

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

Solution (CHALLENGE)

Objectives

After successfully completing this exercise, you will be able to:

nl

Integrate the Piecewise Continuous function.

Plot the function and the integrated function.

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.

to 5 sec, in increments of 0.1 sec.

Appendix A | Page 12

2013 PTC

Task 2:

se

particle as a function of time using the integral of

the velocity equation created in Task 1.

nl

al

sec.

rn

graph created in the previous task.

TC

In

te

can view the entire graph.

Fo

rP

2013 PTC

Appendix A | Page 13

(CHALLENGE)

Objectives

After successfully completing this exercise, you will be able to:

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

increments of 1.0.

al

Task 1:

In

te

Fo

rP

TC

5. Use the root function to evaluate the root.

Appendix A | Page 14

2013 PTC

Equations: Solution (CHALLENGE)

Objectives

After successfully completing this exercise, you will be able to:

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:

Pipe diameter, D.

Pipe roughness, .

Reynolds number, Re.

2013 PTC

Appendix A | Page 15

nl

factor, f.

rn

2. Define a range variable, i, from 1 to 20 in

increments of 1.0.

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

range variable, i.

te

subscripts.

Fo

rP

TC

In

factors, f.

Appendix A | Page 16

2013 PTC

nl

number, Re.

Fo

rP

TC

In

te

rn

al

se

2013 PTC

Appendix A | Page 17

Objectives

After successfully completing this exercise, you will be able to:

Create a Mathcad program using looping constructs.

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.

argument v, cleanup(v).

operator.

rn

3. Insert a Program

operator.

al

2. Insert a Definition

se

argument, sorts the vector into increasing order, removes repeated values from

the vector, and returns the sorted, cleaned up vector.

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

Objectives

After successfully completing this exercise, you will be able to:

Interpolate a set of data using linear interpolation.

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

function, as shown.

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

increments of 0.1.

Fo

rP

verses H, and interpolated line T1 verses h(T1).

2013 PTC

Appendix A | Page 21

se

nl

Fo

rP

TC

In

te

rn

al

Appendix A | Page 22

2013 PTC

- Compartir en Facebook, abre una nueva ventanaFacebook
- Compartir en Twitter, abre una nueva ventanaTwitter
- Compartir en LinkedIn, abre una nueva ventanaLinkedIn
- Copiar dirección de enlace en el portapapelesCopiar dirección de enlace
- Compartir por correo electrónico, abre un cliente de correo electrónicoCorreo electrónico