Вы находитесь на странице: 1из 14

PAMANTASAN NG LUNGSOD NG MAYNILA

University of the City of Manila


College of Engineering and Technology
Department of Chemical Engineering

CHE 514: Computer Applications in ChE

MATHCAD

Submitted by:
Sison, Bren A.
BSChE V

Submitted to:
Engr. Kim Bryan Dueñas
FACULTY ADVISER

August 18, 2018

CHE 514 | Computer Applications in ChE | Mathcad 1


PAMANTASAN NG LUNGSOD NG MAYNILA
University of the City of Manila
College of Engineering and Technology
Department of Chemical Engineering

TABLE OF CONTENTS

Overview .............................................................................................................................. 3
Summary of Capabilities ................................................................................................... 4
Reasons to Utilize PTC Mathcad ...................................................................................... 6
User Interface: Menus and Toolbars................................................................................ 7
Entering Equations .............................................................................................................. 8
Equations .......................................................................................................................... 8
Units ................................................................................................................................. 11
Functions ............................................................................................................................ 11
Built-In Functions ............................................................................................................ 12
User-Defined Functions ................................................................................................ 12
Matrices.............................................................................................................................. 13
Graphing ............................................................................................................................ 13
References......................................................................................................................... 14

CHE 514 | Computer Applications in ChE | Mathcad 2


PAMANTASAN NG LUNGSOD NG MAYNILA
University of the City of Manila
College of Engineering and Technology
Department of Chemical Engineering

MATHCAD
Mathcad is a product of MathSoft Inc.
The Mathcad can help us to calculate,
graph, and communicate technical ideas. It
lets us work with mathematical expressions
using standard math notation - but with the
added ability to recalculate, view, present, and publish with ease, even to the
Web. The following functionalities are provided by Mathcad:

• Numeric operators perform summations, products, derivatives, integrals


and Boolean operations.
• Numeric functions apply trigonometric, exponential, hyperbolic and other
functions and transforms.
• Symbolics simplify, differentiate, integrate, and transform expressions
algebraically.
• Vectors and Matrices manipulate arrays and perform various linear algebra
operations, such as finding eigenvalues and eigenvectors, and looking up
values in arrays.
• Differential Equation Solvers support ordinary differential equations, systems
of differential equations, and boundary value problems both at the
command line and in solve blocks that use natural notation to specify the
differential equations and constraints.

OVERVIEW

Mathcad, Parametric Technology Corporation’s


engineering calculation solution, is used by engineers
and scientists in various disciplines – most often those of
mechanical, chemical, electrical, and civil engineering.
Originally conceived and written by Allen Razdow (of
MIT, co-founder of Mathsoft), Mathcad is now owned by
PTC and is generally accepted as the first computer
application to automatically compute and check
consistency of engineering units such as the International
System of Units (SI), throughout the entire set of

CHE 514 | Computer Applications in ChE | Mathcad 3


PAMANTASAN NG LUNGSOD NG MAYNILA
University of the City of Manila
College of Engineering and Technology
Department of Chemical Engineering

calculations. Mathcad today includes some of the capabilities of a computer


algebra system, but remains oriented towards ease of use and simultaneous
documentation of numerical engineering applications.

Mathcad is oriented around a worksheet, in which equations and


expressions are created and manipulated in the same graphical format in which
they are presented - as opposed to authoring in plain text, an approach later
adopted by other systems such as Mathematica and Maple.

Mathcad is part of a broader product development system developed by


PTC, and often utilized for the many analytical touch points within the systems
engineering processes. It integrates with PTC’s other solutions that aid product
development, including Creo Elements/Pro, Windchill, and Creo Elements/View.
Its live feature-level integration with Creo Elements/Pro enables Mathcad
analytical models to be directly used in driving CAD geometry, and its structural
awareness within Windchill allows live calculations to be re-used and re-applied
toward multiple design models.

SUMMARY OF CAPABILITIES

The Mathcad interface allows users to combine a variety of different


elements (mathematics, descriptive text, and supporting imagery) into the form
of a worksheet, which is naturally readable. Because the mathematics are core
to the program, the math is inherently live, dynamically recalculating as upstream
values are altered. This allows for simple manipulation of input variables,

CHE 514 | Computer Applications in ChE | Mathcad 4


PAMANTASAN NG LUNGSOD NG MAYNILA
University of the City of Manila
College of Engineering and Technology
Department of Chemical Engineering

assumptions, and expressions, which in turn update in real-time. The examples


below serve to outline the scope of Mathcad’s capabilities, rather than to give
specific details on the individual product functionality.

• Utilize numerous numeric functions, across examples such as statistics, data


analysis, image processing, and signal processing
• Automatically manage units throughout the worksheet, preventing
improper operations and performing automatic unit-reduction
• Solve systems of equations, such as ODEs and PDEs through the use of
several methods
• Find roots of polynomials and functions
• Calculate and manipulate expressions symbolically, including within
systems of equations
• Create parametric 2D and 3D plot types, as well as discrete data plots
• Leverage standard, readable mathematical expressions within embedded
program constructs
• Perform vector and matrix operations, including eigenvalues and
eigenvectors
• Perform curve fitting and regression analysis on experimental datasets
• Utilize statistical and Design of Experiments functions and plot types, and
evaluate probability distributions
• Import from, and export to, other applications and file types, such as
Microsoft Excel and MathML.
• Include references to other Mathcad worksheets to re-use common
engineering methods
• Integrate with other engineering applications, such as CAD, FEM, BIM, and
Simulation tools, to aid in product design, like Autocad, Ansys, Revit

Although Mathcad is mostly oriented to non-programming users, it is also


used in more complex projects to visualize results of mathematical modeling by
using distributed computing and coupling with programs written using more
traditional languages such as C++.

CHE 514 | Computer Applications in ChE | Mathcad 5


PAMANTASAN NG LUNGSOD NG MAYNILA
University of the City of Manila
College of Engineering and Technology
Department of Chemical Engineering

REASONS TO UTILIZE MATHCAD

Mathcad is math software that allows you to solve, analyze and share your
most vital engineering calculations. Here are five main reasons to utilize Mathcad
to complement your current engineering education or any class that you offer:

• Easy to Learn — Perform the basics using standard notation in an intuitive


interface. Students can easily create and understand worksheets with very
little training because PTC Mathcad utilizes known standards and
conventions and complements other math notation tools.
• Powerful Tools — Excellent computer algebra systems (CAS), graphics, text
and programming capabilities and improved processing power. PTC
Mathcad combines numerical and symbolic tools and deep text
formatting capabilities in a single document interface.
• Broadens Student Thinking — PTC Mathcad offers documentation and
communication capabilities that foster creativity, flexibility, multiple
representations and precision by putting the tools in one interface ― using
standard syntax and easy to access toolbars.
• Supports Teaching Excellence — PTC Mathcad provides a content
development environment for intellectual property. Transparency in early
iterations and the final product creates an environment that enables broad
distribution of content that facilitates professional collaboration and
continuous improvement.
• Supports Real-World Skills — Real-world skills needed by employers go
beyond the ability to program into the realm of proper and efficient
communication. Students must be able to demonstrate that an analysis has
been done — using more than just a notepad, pencil or spreadsheet —
that proves the product's viability in a real-world environment.

CHE 514 | Computer Applications in ChE | Mathcad 6


PAMANTASAN NG LUNGSOD NG MAYNILA
University of the City of Manila
College of Engineering and Technology
Department of Chemical Engineering

USER INTERFACE: MENUS AND TOOLBARS

MathCad is a window program, as shown in the following figure. The


Mathcad window basically includes the work area and the main menu bar.

Mathcad Window

The blank area is the work area that allow us typing and evaluating
mathematical expression, graphing, symbolic computing, entering and running
Mathcad scripting codes, and entering ordinary text.

It has standard main menu bar at the top of the window as most window
programs do that is shown in the following screen shot.

Main Menu Bar

CHE 514 | Computer Applications in ChE | Mathcad 7


PAMANTASAN NG LUNGSOD NG MAYNILA
University of the City of Manila
College of Engineering and Technology
Department of Chemical Engineering

ENTERING EQUATIONS

EQUATIONS

There are often many ways to access tools in Mathcad: through a menu at
the top of the screen, a toolbar, a right click with the mouse, or a shortcut
keystroke.

• Entering Text

To enter simple text anywhere on the screen, click at the desired spot (a
red plus sign will appear) and do one of the following:

❖ Type “ (the region will become a text region). Then type your text.
❖ Use the menu: Insert > Text Region
❖ Start typing text (the region will become a text region after the first word).

• Different uses of the equals sign

To enter equations in Mathcad, it is a bit trickier. There are in fact four


different ways to use an equals sign:

1. Evaluation Equals Sign (=)

Mathcad can be used as a simple calculator. To compute 1 + 1, 210, or 50.5,


we type these, as one might expect, in the normal way and then type =.

CHE 514 | Computer Applications in ChE | Mathcad 8


PAMANTASAN NG LUNGSOD NG MAYNILA
University of the City of Manila
College of Engineering and Technology
Department of Chemical Engineering

2. Assignment Equals Sign (:=)

It is often useful to assign values to variables that can be used later. This is
done with the assignment equals sign, created not by using the = key, but by
typing a colon (:).

For example, suppose we wanted to find the area of a circle of radius 5


meters. We could of course do the calculation “pi r squared” but we will instead
store the value 5m in the variable radius and then compute and store the area in
the variable Area. Make sure to type a colon instead of = in order to get the
symbol :=.

Note that with the assignment equals, you don’t see the actual value of
Area. To see the actual value, you need to either put in an additional line

3. Symbolic Equals Sign (=)

The symbolic equals sign (an equals sign appearing in bold font) is used in
setting up an equation without actually providing any values for the variables. For
example, in computing the area of a circle, we may not necessarily know the
value of the radius, but want to use the equation “A equals pi r squared.” If we try
to enter this with the assignment equals (without providing the radius value), we
get an error (the variable radius is in red)

CHE 514 | Computer Applications in ChE | Mathcad 9


PAMANTASAN NG LUNGSOD NG MAYNILA
University of the City of Manila
College of Engineering and Technology
Department of Chemical Engineering

To fix this, we use the symbolic equals sign (a bold equals sign) by typing
Ctrl + =.

One reason for using the symbolic equals is that you might want to later
solve (symbolically) for the radius in terms of the area.

4. Global Equals Definition (≡)

Consider the following example:

Why is the word radius in red? All of the parts of the computation are
present, but for Mathcad, this is not enough. The order of the computations is
important (as we will discuss further). Mathcad computations have the order “left
to right, top to bottom” meaning that any variable used in a calculation must be
defined previously (either higher up on the page, or to the left on the page). There
is one exception to this rule - the global equals definition. The global equals
definition is created using the tilde (∼) symbol. A variable that is defined with the
global equals definition can be used in any other equation, regardless of its
location on the page.

CHE 514 | Computer Applications in ChE | Mathcad 10


PAMANTASAN NG LUNGSOD NG MAYNILA
University of the City of Manila
College of Engineering and Technology
Department of Chemical Engineering

UNITS

A very powerful part of Mathcad comes from its ability to handle units and
unit conversions. When entering an equation, you can access the complete set
of units under the menu at Math > Units

or if you know the name of the unit, you can just type it in:

FUNCTIONS

Mathcad has a large library of built-in functions (logarithms, trigonometric


functions, statistical functions, etc), but we can create new functions as well.

CHE 514 | Computer Applications in ChE | Mathcad 11


PAMANTASAN NG LUNGSOD NG MAYNILA
University of the City of Manila
College of Engineering and Technology
Department of Chemical Engineering

Built-in Functions

To access the complete list of built-in functions in Mathcad, use the menu
with Functions.

User-Defined Functions

Sometimes you will need to create your own function in Mathcad, perhaps
for repeated use throughout a worksheet. The syntax looks very similar to the way
a function might appear in a math textbook. The function name is followed
immediately by the input variables (in parentheses and separated by commas),
a definition equals sign (colon), and then the expression in terms of the input
variables. When the function is executed, the input variables are replaced with
constants, including units as desired, and followed by the evaluation equals sign.
Consider the following example.

Example: Create a function for the volume of a cylinder

The function, called Volume, is defined in terms of the variables radius and
height (don’t forget to use the assignment equals, created with a colon :).

Volume(radius,height):=π radius2 height

The symbol for π can be created on the Greek toolbar, or with the keyboard
shortcut Ctrl + Shift + p. Now, when we want to compute with the function, we
substitute values for radius and height (including any unit) into the function

Volume(2ft,3ft):= 1.068 × 103 L


or
Volume(500cm,2000cm):= 1.571 × 106 L

Note that Mathcad converts to the metric unit L (liters) as default.

CHE 514 | Computer Applications in ChE | Mathcad 12


PAMANTASAN NG LUNGSOD NG MAYNILA
University of the City of Manila
College of Engineering and Technology
Department of Chemical Engineering

MATRICES

Solving Systems of Linear Equations

Suppose we have the following system of linear equations.

The goal is to solve them simultaneously for the variables w, x, y and z.


Assuming that there is exactly one answer (i.e. one quadruple for w, x, y, z) then
there are many ways to do this. Here we use rref, lsolve and the matrix inverse as
examples.

GRAPHING

Graphing is a great way for interpreting technical and scientific data. The
easiest way to begin a plot is to use the graphing toolbox.

CHE 514 | Computer Applications in ChE | Mathcad 13


PAMANTASAN NG LUNGSOD NG MAYNILA
University of the City of Manila
College of Engineering and Technology
Department of Chemical Engineering

REFERENCES

"PTC Mathcad - PTC". Archived from the original on 2009-10-11.

"Archived copy". Archived from the original on 2011-09-16. Retrieved 2011-09-09.

Mathcad. (n.d.). Introduction to Mathcad, pp. 1-2.

PTC. (2018). Retrieved from Mathcad for Students:


https://www.ptc.com/en/academic-program/products/ptc-mathcad

Siemers, Ph. D., T. (2011). An Introduction to Matlab and Mathcad. pp. 70-101.

CHE 514 | Computer Applications in ChE | Mathcad 14

Вам также может понравиться