Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Mathcad Tutorial on Eigenvalues and Eigenvectors & Programing

Consider a stress state in 2D

x xy

=
yx y

2.8 7.2

MPa

7.2

6.4

Principal Stresses are the eigenvalues

eigenvals ( )

6.744

MPa
10.344

Consider a 5 dof mechanical system


k1 40000 k2 25000
m1 20

m2 10

k3 27000 k4 32000 k5 20000 k6 10000

m3 25

m4 30

m5 20

0
0
0

k1 k2 k2

0
0
k2 k2 k3 k3

k3 k3 k4 k4
0
K 0

0
k4 k4 k5 k5
0

0
0
k5 k5 k6
0

M diag m1 m2 m3 m4 m5

N/m

kg

0
0
6.5 104 2.5 104
0

4 5.2 10 4 2.7 10 4
0

2.5

10
0

K
0
2.7 10 4 5.9 104 3.2 10 4
0

4
4
4

0
3.2 10 5.2 10
2 10
0

0
2 104 3 10 4
0
0

20

0
M0
0
0

10

25

30

0
0

20
0

to determine the natural frequencies and mode shapes of a system we need to


1
determine eigenvalues and eigenvectors of M K
Middle East Technical University, METU, Ankara/TURKEY
1

Dr. Ender CEROLU

Mathcad Tutorial on Eigenvalues and Eigenvectors & Programing

eigenvals M 1 K

sort eigenvals M 1 K

Natural Frequencies are

6.786 103

3
3.353 10
2.321 103

228.015

1.355 103

U eigenvecs M 1 K

228.015

1.355
10

3
2.321 10

3.353 103

6.786 103

1st
15.1

2nd
36.812
3rd
48.174 rad/s
57.905
4th
82.38
5th

0.591 0.625
0.323

0.914
0.049
0.465

0.238
0.083
0.58
U

0.052
0.491 0.395

9.747 10 3 0.265 0.481

0.152

0.324

0.368

0.491

0.537

0.399

0.584

0.101

0.459

0.696

These are the eigenvectors or the mode shapes


i 0 4

1st

2nd

3rd

4 th

5th

0.323
0.152 0.324 0.625 0.591

0.368 0.491 0.465 0.049

0.914

0.238
U i eigenvec M 1 K i U 0.537 0.399 0.083 0.58

0.584 0.101 0.395 0.491

0.052

0.459 0.696 0.481 0.265 9.747 10 3

Middle East Technical University, METU, Ankara/TURKEY


2

Dr. Ender CEROLU

Mathcad Tutorial on Eigenvalues and Eigenvectors & Programing

Programing in Mathcad
I ( f N a b)

sum 0
h

A program which calculates the integral


of a function between points a and b by
using trapezoidal rule.

ba
N

Always use the "Programing Toolbar to


insert programing keywords such as:
"for, while, if, otherwise, break, return,
sum sum 2 f ( i h)
continue, on error". writing them will
sum sum f ( a) f ( b) result in error.
h
sum
The last line will give the output value of
2
a function. If you would like something
else to be the output you also use
"return" keyword which may be helpful
in debugging your code
for i 1 N 1

f ( x) e

I ( f 10 0 ) 22.322494

Program Result

f ( x) dx 22.140693
0

Numerical Integration of Mathcad

NOTE: The values defined in a function will only be known in the function and they
cannot be called in the Mathcad file outside of function block. However, any value
defined above and outside of the function can be used in the function.

Middle East Technical University, METU, Ankara/TURKEY


3

Dr. Ender CEROLU

You might also like