mathcad_-_truss2d1

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 fo r solving 2D tr uss structures ba sed on the Finite Eleme nt Method author information This work was in response to a need to design an industrial warehouse whose structure was based on steel beams.  Although th e design o f steel truss structures is a common analysis taugh t in engin eering courses, and the th eory allows to get the solution by handmade calculations, the desire for a robust, error-checked design process that could be perfor med repea tedly led me to code it in softwa re. Ty pically , several itera tions are common practice in th e design phase but they are time consu ming and potential sour ce of errors if the process is managed by handmad e 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-frien dly environme nt made it ideal for this task. It required on ly a few days to create the followin g program a nd 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.

Upload: yam-balaoing

Post on 07-Oct-2015

16 views

Category:

Documents


3 download

DESCRIPTION

_-_Truss2D

TRANSCRIPT

  • Mathcad_-_Truss2D1.mcdxEng. 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.mcdxEng. Francesco Onorato

    Page 2 of 9

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

    Outputs Input_N excel

    Foglio1!C6:H16

    Outputs 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.mcdxEng. Francesco Onorato

    Page 3 of 9

    0

    .3

    .6

    .9

    .2

    .5

    .8

    .1

    .4

    .6

    .3

    .7

    1.5 3 4.5 6 7.5 9 10.5 12-1.5 0 13.5

    Undeformed structure

    Constrained nodes

    Loaded nodes

    ---- Structure

    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 i 1 ne

    the length of the rod Li

    +

    N

    ,T,i 1

    xN

    ,T,i 2

    x

    2

    N,T

    ,i 1y

    N,T

    ,i 2y

    2

    the Young modulus, the rod stiffness Ei

    Ey ki

    EiAi

    Li

    and the stiffness matrixk ((i))

    |||||||||||

    |

    c

    N,T

    ,i 2x

    N,T

    ,i 1x

    Li

    s

    N,T

    ,i 2y

    N,T

    ,i 1y

    Li

    ki

    c c c s c c c sc s s s c s s sc c c s c c c sc s s s c s s s

    i 1 nn j x y

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

  • Mathcad_-_Truss2D1.mcdxEng. Francesco Onorato

    Page 4 of 9

    onverting into vectors the matrixes that efine the nodal constrains and loads Vv +2 (( i 1)) j v ,i j Fv +2 (( i 1)) j F ,i j

    mputing the global stiffness matrix K K

    |||||||||||||||||||||||||||||||||||||||

    |

    for |||||

    i 1 2 nn

    for ||

    |

    j 1 2 nn

    K,i j

    0

    for ||||||||||||||||||||||||||||||||||

    e 1 ne

    i T,e 1

    j T,e 2

    K,2 i 1 2 i 1

    +K,2 i 1 2 i 1

    k ((e)),1 1

    K,2 i 1 2 i

    +K,2 i 1 2 i

    k ((e)),1 2

    K,2 i 2 i 1

    +K,2 i 2 i 1

    k ((e)),2 1

    K,2 i 2 i

    +K,2 i 2 i

    k ((e)),2 2

    K,2 i 1 2 j 1

    +K,2 i 1 2 j 1

    k ((e)),1 3

    K,2 i 1 2 j

    +K,2 i 1 2 j

    k ((e)),1 4

    K,2 i 2 j 1

    +K,2 i 2 j 1

    k ((e)),2 3

    K,2 i 2 j

    +K,2 i 2 j

    k ((e)),2 4

    K,2 j 1 2 i 1

    +K,2 j 1 2 i 1

    k ((e)),3 1

    K,2 j 1 2 i

    +K,2 j 1 2 i

    k ((e)),3 2

    K,2 j 2 i 1

    +K,2 j 2 i 1

    k ((e)),4 1

    K,2 j 2 i

    +K,2 j 2 i

    k ((e)),4 2

    K,2 j 1 2 j 1

    +K,2 j 1 2 j 1

    k ((e)),3 3

    K,2 j 1 2 j

    +K,2 j 1 2 j

    k ((e)),3 4

    K,2 j 2 j 1

    +K,2 j 2 j 1

    k ((e)),4 3

    K,2 j 2 j

    +K,2 j 2 j

    k ((e)),4 4

    K

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

  • Mathcad_-_Truss2D1.mcdxEng. Francesco Onorato

    Page 5 of 9

    possible to assembly the reduced ffness matrix Kr and the reduced ad vector Fvr

    Kr

    ||||||||||||||

    |

    ii 0for |

    ||||||||||||

    i 1 2 nn

    |||||||||||

    if Vvi

    0

    ii +ii 1jj 0

    for |||||

    |

    j 1 2 nn

    |||||

    if Vvj

    0

    jj +jj 1Kr

    ,ii jjK

    ,i j

    Kr

    Fvr

    ||||||||

    |

    ii 0for |

    ||||

    |

    i 1 2 nn

    |||||

    if Vvi

    0

    ii +ii 1Fvr

    iiFv

    i

    Fvr

    e inverse of the reduced stiffness matrix R R Kr1

    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 0for |

    |||||||||

    i 1 2 nn

    |||||||

    |

    if

    else

    Vvi

    0

    ii +ii 1Uvi

    Uvrii

    Uvi

    0

    Uv

    U,i j

    Uv+2 (( i 1)) j

    t the end the load matrix F is computed ultiplying the stiffness matrix K of the full ructure times the displacement one U

    F,i j

    Fv+2 (( i 1)) jFv K Uv

    he knowledge of the nodal displacements und of the orientation of the rod in the plane, ows to define

    ((i))

    ||||||||||

    c

    N,T

    ,i 2x

    N,T

    ,i 1x

    Li

    s

    N,T

    ,i 2y

    N,T

    ,i 1y

    Li

    Tc s c s[[ ]]

    u ((i))

    U,T

    ,i 11

    U,T

    ,i 12

    U,T

    ,i 21

    U,T

    ,i 22

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

  • Mathcad_-_Truss2D1.mcdxEng. Francesco Onorato

    Page 6 of 9

    e axial load f and the axial stress r each rod of the truss structure. i 1 ne fi ki u

    ((i)) ((i)) i

    fi

    Ai

    Norm ((F))

    |||||||||

    |

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

    |||||

    |

    i 1 nn

    for ||||

    |

    j x y

    ||||

    if

  • Mathcad_-_Truss2D1.mcdxEng. Francesco Onorato

    Page 7 of 9

    14

    21

    28

    35

    42

    49

    56

    63

    0

    7

    70

    4 6 8 10 12 14 16 180 2 20

    Axial load

    Compressed elements(rafters) Streched elements(tie rods)

    Absolute value

    Number of element

    20

    30

    40

    50

    60

    70

    80

    90

    00

    0

    10

    10

    4 6 8 10 12 14 16 180 2 20

    Axial stress

    Compressed elements(rafters) Streched elements(tie rods)

    Absolute value

    Number of element

    Output this data to an Excel component

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

  • Mathcad_-_Truss2D1.mcdxEng. Francesco Onorato

    Page 8 of 9

    Output this data to an Excel component.

    Output data

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

  • Mathcad_-_Truss2D1.mcdxEng. Francesco Onorato

    Page 9 of 9

    Standard Output

    Coordinates of nodes Displacements of nodes Forces acting on nodes

    =U

    0 01.431 7.8491.626 11.111.088 11.4420.551 11.110.746 7.8492.176 03.03 7.6672.059 10.9280.117 10.928

    0.854 7.667

    mm =F[11 2]

    2

    =N0

    cm

    Ending nodesof the element

    Length of the element

    Area of the cross section of the element

    Axial loadof the element

    Axial stressin the element

    =L206.2

    =A8

    2=f

    41231

    =51.5

    mm

    2

    =T

    1 22 33 44 55 66 77 88 99 10

    10 1111 1

    2 11

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