Sie sind auf Seite 1von 9

Mathcad_-_Truss2D1.

mcdx

Eng. Francesco Onorato

Page 1 of 9

Converted from "Using the Finite Element Method on Truss Structures" created by Franceso Onorato

TRUSS 2D
Program for solving 2D truss structures based on the Finite Element Method
author information

This work was in response to a need to design an industrial warehouse whose structure was based on steel beams.
Although the design of steel truss structures is a common analysis taught in engineering courses, and the theory
allows to get the solution by handmade calculations, the desire for a robust, error-checked design process that could
be performed repeatedly led me to code it in software. Typically, several iterations are common practice in the
design phase but they are time consuming and potential source of errors if the process is managed by handmade
calculations.

The finite element method used to design this structure was done in Mathcad for several reasons:
1. simplicity in writing the algorithm,
2. simplicity of debugging the algorithm,
3. easy customisation of the input data pre-processing and result post-processing.
4. low cost of the software for distribution to other users.

Mathcad's great flexibility in managing formulas, numerical and symbolic calculations, text and graphics in a single
user-friendly environment made it ideal for this task. It required only a few days to create the following program and
to validate its output against similar applications.

Input data:
This data corresponds to the following truss structure:

Created with PTC Mathcad Express. See www.mathcad.com for more information.

Mathcad_-_Truss2D1.mcdx

Page 2 of 9

Eng. Francesco Onorato

Input_N excel

Foglio1!C6:H16

Outputs

Outputs

The following is an Excel component, which will require you to have Excel on your system for it to operate.

Input_E excel

Foglio2!C5:E23

Processing input data

Plot of the structure

Created with PTC Mathcad Express. See www.mathcad.com for more information.

Mathcad_-_Truss2D1.mcdx

Page 3 of 9

Eng. Francesco Onorato

Undeformed structure
.7
.4
.1
.8

Constrained nodes
Loaded nodes
---- Structure

.5
.2
.9
.6
.3
0
.3
.6

-1.5

1.5

4.5

7.5

10.5

12

13.5

The following section contains the algorithm that allows to determine the tensional level of elements, the
displacements and the nodal forces of the structure is inside this area. This area must not be modified by the user.
Structure solving

For each element of the structure is computed

the length of the rod

the Young modulus, the rod stiffness

L
i

i 1 ne

2
2

+ N

N
N
N
T ,x
T ,y
i,2
i,2
Ti , 1 , x

Ti , 1 , y

E Ey
i

E A
i
i
k
i
L
i

and the stiffness matrix

i 1 nn

jxy

N
N
T ,x
T ,x

i,2
i,1
k (i) c
L
i

N
N
T ,y
T ,y

i,2
i,1
s

L
i

c c c s c c

c s s s c s
ki
c c c s c c

c s s s c s

|
|
|
|
|
|
|
|
c s |
s s |
cs |
s s |

Created with PTC Mathcad Express. See www.mathcad.com for more information.

Mathcad_-_Truss2D1.mcdx

onverting into vectors the matrixes that


efine the nodal constrains and loads

mputing the global stiffness matrix K

Page 4 of 9

Eng. Francesco Onorato

Vv

2 (i 1)) + j

i,j

Fv

2 (i 1)) + j

i,j

|
|
K for i 1 2 nn
|

|
for j 1 2 nn| |
|
|
K 0
|
|
i,j

|
||

||
for e 1 ne

||
i Te , 1
||

||
j Te , 2
||

|
K
K
+ k (e) |
2i1,2i1
2i1,2i1
1,1 |
|
K
)

K
+
k
e
(
||
2i1,2i
1,2
2i1,2i
||
K
K
+ k (e)
||
2i,2i1
2,1
2i,2i1
||
K2 i , 2 i K2 i , 2 i + k (e)2 , 2
||

||
K2 i 1 , 2 j 1 K2 i 1 , 2 j 1 + k (e)1 , 3 |
|

||
(
)
K
K
+k e
2i1,2j
2i1,2j
1,4
||
K
K
+ k (e)
||
2i,2j1
2,3
2i,2j1
||
K
K
+ k (e)
||
2i,2j
2,4
2i,2j
||
K
+ k (e)
K
|
2j1,2i1
2j1,2i1
3,1 |

||
K2 j 1 , 2 i K2 j 1 , 2 i + k (e)3 , 2
||

||
K
K
+ k (e)
2j,2i1
2j,2i1
4,1
||
K
K
+ k (e)
||
2j,2i
4,2
2j,2i
||
K
(
)
|
K
+k e
2j1,2j1
3,3|
2j1,2j1
||
K
+ k (e)
K
2j1,2j
2j1,2j
3,4
||

||
K2 j , 2 j 1 K2 j , 2 j 1 + k (e)4 , 3
||

||
K
K
+ k (e)
2j,2j
2j,2j
4,4

||

|
K

Created with PTC Mathcad Express. See www.mathcad.com for more information.

Mathcad_-_Truss2D1.mcdx

possible to assembly the reduced


ffness matrix Kr and the reduced
ad vector Fvr

Page 5 of 9

Eng. Francesco Onorato

|
Fvr ii 0
for i 1 2 n
||
n

|
|||
if Vvi 0
|||

|

ii ii + 1 | | |

Fvr Fv | |
ii
i

|||

Fvr
|

|
Kr ii 0
for i 1 2 n
||
n

|
|||
if Vvi 0
|||

|||
ii ii + 1

|||
jj 0
|

for j 1 2 nn
||||

| |

||||
if Vv 0

|
j
||||


|
|

jj jj + 1 | | |


|
|
Kr
K | |||

ii
,
jj
i
,
j


|| |


|||

Kr

e inverse of the reduced stiffness matrix R

R Kr

hich allows to define the reduced


ctor of nodal displacements Uvr

Uvr R Fvr
Uvr lsolve (Kr , Fvr)

hose knowledge makes possible


e calculation of the displacement
ctor Uv and the matrix U of nodal
splacements of the truss structure

|
Uv ii 0
for i 1 2 n
||
n

|
|||
if Vvi 0
|||

ii ii + 1 | |

||

Uv Uvr | | |
ii
i
| |

|||
else
|
Uv 0 | | |
i

|||

Uv
|

t the end the load matrix F is computed


ultiplying the stiffness matrix K of the full
ructure times the displacement one U

he knowledge of the nodal displacements u


nd of the orientation of the rod in the plane,
ows to define

Fv K Uv

U
T ,1
i,1

U
T ,2
i,1

u (i)
UT , 1
i,2
UT , 2
i,2

i,j

i,j

Uv

2 (i 1)) + j

Fv

2 (i 1)) + j

N
N
T ,x
T ,x |

i,2
i,1
(i) c |
L
i

|
N
N
T ,y
T ,y |

i,2
i,1
s
|
L
i

|
T

|
|
[ c s c s ]

Created with PTC Mathcad Express. See www.mathcad.com for more information.

Mathcad_-_Truss2D1.mcdx

Page 6 of 9

Eng. Francesco Onorato

e axial load f and the axial stress


r each rod of the truss structure.

f
i

i
A

f k u (i) (i)

i 1 ne

Norm (F) Fmax max (max (F) , min (F)) |

|
|
for i 1 nn
|
||
for j x y
|
|

|
14| |
|
|
|
if |Fi , j| < Fmax 10 | |
|
|
|

|
| |
F 0N
i,j
|

||

|

|

F
|

hould you need to suppress


e numeric noise generated by
gorithms, the usage of a "low
ass " filter is recommended.

F Norm (F)

Output data:
Magnification factor for displacements

zoom 30
Plot of the structure

Undeformed and formed structure

----Undeformed structure
---- Deformed strucure: rafters
---- Deformed structure: tie rods

.7

.4

.1

.8

.5

.2

.9

.6

.3

.3

.6

-1.5

1.5

4.5

7.5

10.5

12

13.5

Created with PTC Mathcad Express. See www.mathcad.com for more information.

Mathcad_-_Truss2D1.mcdx

Page 7 of 9

Eng. Francesco Onorato

Axial load
70

Compressed elements(rafters)
Streched elements(tie rods)

63

Absolute value

56
49
42
35
28
21
14
7
0
0

10

12

14

16

18

20

Number of element

Axial stress
10

Compressed elements(rafters)
Streched elements(tie rods)

00

90

80

Absolute value

70

60

50

40

30

20

10

0
0

10

12

14

16

18

20

Number of element
Output this data to an Excel component

Created with PTC Mathcad Express. See www.mathcad.com for more information.

Mathcad_-_Truss2D1.mcdx

Eng. Francesco Onorato

Output this data to an Excel component.

Output data

Created with PTC Mathcad Express. See www.mathcad.com for more information.

Page 8 of 9

Mathcad_-_Truss2D1.mcdx

Page 9 of 9

Eng. Francesco Onorato

Standard Output

Coordinates of nodes

N=

0
1.431
1.626
1.088
0.551

U = 0.746

2.176
3.03
2.059
0.117
0.854

cm

Ending nodes
of the element

T=

Displacements of nodes

1 2
2 3
3 4
4 5
5 6

6 7

7 8
8 9
9 10
10 11
11 1
2 11

Length of
the element

L=

206.2

Forces acting on nodes

0
7.849
11.11
11.442
11.11

7.849 mm

7.667
10.928
10.928
7.667

Area of the cross


section of the element

A=

f=

F=

[11 2]

Axial load
of the element

41231

Axial stress
in the element

Created with PTC Mathcad Express. See www.mathcad.com for more information.

51.5

2

mm

Das könnte Ihnen auch gefallen