Matlab assignment

profilejahguy
cp_2_properties_of_areas.pdf

CEE 213—Deformable Solids

© Keith D. Hjelmstad 2014

CP 2 Properties of polygonal plane areas

Keith D. Hjelmstad School for Sustainable Engineering and the Built Environment

Ira A. Fulton Schools of Engineering Arizona State University

CEE 213—Deformable Solids

CEE 213—Deformable Solids

© Keith D. Hjelmstad 2014

CP 2—Properties of Areas The properties of cross sections

The properties of cross sections. In the study of beams

(including the axial bar and torsion) it becomes evident

that much of the behavior is dictated by the properties of

the cross sectional geometry. In fact, the resistance to

deformation is always a function of the distribution of

material in a cross section. For the axial bar the cross

sectional area is key; for torsion the polar moment of

inertia shows up; for flexure the moment of inertia about

the axis of bending is an important property. These

properties are essential to determining the deformation

under load.

Most of the classical “tricks of the trade” that can be used

in service of the computation of geometric properties

amount to making use of the properties of simple

geometric pieces (often rectangles) to build up the overall

cross sectional properties. What we show in this set of

notes is that it is possible to derive the integrals needed to

compute the cross sectional properties for a general

triangle and then use that basic foundation to create a

method to compute the cross sectional properties of any

closed polygonal region. This approach is based on two

key observations: (1) all integrals can be divided into

pieces and (2) it is possible to add in an integral that is

not in the physical region as long as you subtract it right

back out.

Cross Section

x

Longitudinal Axis

Cross Section

y

z

CEE 213—Deformable Solids

© Keith D. Hjelmstad 2014

A dA J ρ ρ

CP 2—Properties of Areas The key cross sectional properties

The key cross sectional properties. Consider the

general cross section defined at left. We establish a (y, z) coordinate system with origin O, and imagine another

coordinate system (x, h) passing through the centroid C.

For beam theory we need to compute area and moment

of inertia (about the centroid). To compute the moment of

inertia we need the location of the centroid.

The area is simply defined as the sum of the infinitesimal

areas that make up the cross section:

y

z

x

h

c

ρ dA

2 e

3 e

r

O

C

A A dA 

The centroid of an area is defined as follows:

1

A dA

A  c r

In other words, it is the constant vector c that is the

average over the area of the position r of the infinitesimal

areas. Finally, the moment of inertia (tensor) is defined as

Where the vector r is the distance from the centroid C to

the infinitesimal area of integration.

  2

1 1 1 2

1 2 2 2 1 2 2

T

v v v v v v

v v v v

 

       

   

v v v v

The tensor (or outer) product of vectors

CEE 213—Deformable Solids

© Keith D. Hjelmstad 2014

 ρ r c

CP 2—Properties of Areas The moment of inertia tensor

The moment of inertia tensor. The problem with

computing J is that it is defined in terms of the centroidal

coordinate system. We can compute it in the regular

coordinates noting that (by vector addition)

y

z

x

h

c

ρ

dA

2 e

3 e

r

O

C

   

 

               

   

A

A

A

A A A A

A

A

dA

dA

dA

dA dA dA dA

dA A A A

dA A

 

   

       

       

       

   

   

J ρ ρ

r c r c

r r c r r c c c

r r c r r c c c

r r c c c c c c

r r c c

 

2

2

T

y y z

z

y y z

y z z

 

    

 

    

 

r r r r

  1

1 2

2

2

1 1 2

2

1 2 2

T

c c c

c

c c c

c c c

 

    

 

    

 

c c c c

Thus, we can compute

Therefore, we can compute the moment of inertia tensor

in the original coordinate system as

    A

dA A   J r r c c

We need the centroidal distance c, and we need to figure

out how to compute the integral of rr.

CEE 213—Deformable Solids

© Keith D. Hjelmstad 2014

CP 2—Properties of Areas The general triangular region

The general trianglular region. We can specialize the

notion of our cross sectional properties to a general

triangular region (shown at left). We will need to get

specific about how to do the integrals over this region.

Once we have found the results, we can use them as a

basic building block in an algorithm to compute the three

basic properties of any polygonal cross section (and, by

taking points close together we can approximate cross

sections with curved edges, too).

We will construct our concept of the triangle from the

position vectors of the two vertices i and j (which will lie

on an edge of the polygon later). These vectors are xi and

xj. From these vectors we can compute h, b, and the unit

vectors n and m (as shown in the box at left). y

z

c 2

e

3 e

i

j

h

b

O

y

z

j xix

j i x x

y

z

n

m i

j

h

b

O O

The basic triangle

i

j i

h

b

 

x n

x x m

i

j i

h

b

 

x

x x

All of these key quantities can be

computed from the vectors xi and xj

CEE 213—Deformable Solids

© Keith D. Hjelmstad 2014

   

 

 

1

1

1 2 3 3 2

sin

sin

dA d d

dA d d

d d

n m n m

x h

h x

 h x

 

  

    

e n m

n m e

n m e

CP 2—Properties of Areas Integration over the triangle Integration over the triangular region. It will

be convenient to set up the area integration in the

coordinate system n and m (which happens not to

be rectangular).

dAdxn

dhm

( )

0 0

0 0

( ) sin ( )

sin ( )

h w

A

b h

h

dA d d

d d

x

x

 h x

 h x

  

 

  

 

dA

x n

h m

( ) b

w h

x x

The variables of integration are x (measures distance in n direction) and h (measures distance in m direction), which are in the range

0 0h bx h   

Note how the limits of integration are done in

the box at right.

Thus, the element of integration is

And the integration over the area is done as

CEE 213—Deformable Solids

© Keith D. Hjelmstad 2014

 

0 0

00

0

21 2

0

1 2

sin

sin

sin

sin

sin

A

b h

h

bh h

h

h

A dA

d d

d

b d

h

b

h

b h

x

x

 h x

 h x

 x x

 x

   

 

CP 2—Properties of Areas Area of the general triangle

For beam theory we need to compute

area, centroidal location, and moment

of inertia (about the centroid): 1 2

sinA b h 

dA

x n

h m

( ) b

w h

x x

Area of the general triangle. We can compute area of

the triangle as follows:

Note how “one half base times height” still seems to be

part of the picture. The factor sin takes care of two things: (1) that the triangle is not a right triangle and (2)

if it turns out to be negative then the area is “negative.”

The area of the general triangle is

CEE 213—Deformable Solids

© Keith D. Hjelmstad 2014

 

   

0 0

21 2

00

2

2 21 2

0

2

3 31 1 3 6

0

2 21 1 3 6

2 1 3 3

sin

sin

sin

sin

sin

A

b h

h

b h

h

h

h

dA

d d

d

b b d

h h

b b

h h

b h b h

A h b

x

x

 x h h x

 xh h x

 x x x

 x x

 

   

          

     

          

     

 

 

 

p r

n m

n m

n m

n m

n m

n m

 2 13 3 A

dA A h b  p r n m

CP 2—Properties of Areas The centroid of the triangle

We will sum the contributions for

each triangle so we will not compute

c (the location of the centroid) for the

cross section until we add up all of

the p contributions.

dA

x n

h m

( ) b

w h

x x

The centroid of the triangle. We can compute the

integral of r over the triangle as follows:

Note that p is one third of the distance from the edges,

but adjusted by the general area A and measured in the

directions n and m. The location of the centroid of the

general triangle is

CEE 213—Deformable Solids

© Keith D. Hjelmstad 2014

    0 0

2 2

0 0

2 2 31 1 2 3

00

2 3

3 3 31 1 2 3

0

2

4 4 41 1 1 4 8 12

sin

sin

sin

sin

sin

b h

h

A

b h

h

b h

h

h

dA d d

d d

d

b b b d

h h h

b b

h h

x

x

x

 x h x h h x

 x xh h h x

 x h xh h x

 x x x x

 x x x

    

    

    

               

       

         

   

  

 

r r n m n m

A B C

A B C

A B C

A B

 

 

3

0

3 2 2 31 1 1 4 8 12

2 21 1 1 2 4 6

sin

h

b

h

b h b h b h

A h bh b

     

   

  

  

C

A B C

A B C

 

   

 

A n n

B n m m n

C m m

 2 21 1 12 4 6 A

dA A h bh b    R r r A B C

It is convenient to define tensors

CP 2—Properties of Areas The integral of r  r

The integral of r  r. We can compute the integral of the

outer product of r with itself for the triangular region as

follows:

Hence, we have the following result (which we will

eventually use to compute the moment of inertia)

These tensors are constant over the

triangle and therefore can be pulled out of

the integral.

Note that we will not compute the actual

moment of inertia about the centroid at

this point because we plan to add together

multiple pieces to construct the moment

of inertia for polygonal regions. So we

will simply compute (and accumulate) the

integrals of the outer product.

The vector r to the elemental point of

integration is

x h r n m

CEE 213—Deformable Solids

© Keith D. Hjelmstad 2014

CP 2—Properties of Areas Positive and negative regions

We can compute integrals over a cross section by considering positive and negative areas. In regions

where there are both, they cancel each other out. The I-beam, for example, can be constructed from the

large (positive) rectangle and the two smaller (negative) rectangles.

We will use this general idea to accumulate the contributions of the triangles that define the sides of the

polygon. If sin is greater than zero the area will be positive and if it is less than zero then the area will be negative. For any region that has both a positive and negative contribution the net effect (in all of our

integrals) will be zero. Hence, this is a good way to lay out the calculation.

  A A A

A A

w dA w dA w dA

w dA w dA

 

 

  

 

  

 

(-) (0)(+) + =

Zero

region

Actual cross

section

Positive

region

Negative

region

(+) (-) (-)

CEE 213—Deformable Solids

© Keith D. Hjelmstad 2014

CP 2—Properties of Areas Accumulation of properties

Consider the cross section shown at

right. Taking the points sequentially

we see the contributions of four

triangles. If nm is into the paper

then the area is negative (red),

otherwise it is positive (blue).

Notice how the areas outside the

cross section get exactly one positive

and one negative contribution. In the

end, only the blue region remains.

1

2

3

4

n

m

n

m

n

m

n

m

The Cross Section Triangle 1 (side 1-2)

Triangle 2 (side 2-3) Triangle 3 (side 3-4) Triangle 4 (side 4-1)

1

2

2

3 3

4

1

4

O O

O O O

CEE 213—Deformable Solids

© Keith D. Hjelmstad 2014

CP 2—Properties of Areas Positive regions and negative regions

Positive regions and negative regions. The power of the

approach we are taking is the ability to distinguish

between positive regions and negative regions. When we

use the general triangle as the building block for

computing integrals over a polygonal shape we must be

able to assign a positive or negative value to each piece

in accord with the need to either add that portion to the

sum or subtract it from the sum. The term sin takes care of this issue. Recall the definition

  1 2 3 3 2sin n m n m    n m e

According to the definition of cross product, the angle is

clockwise from the vector n to the vector m. You can see

how this plays out in the two examples below (the

triangles for sides 1-2 and 2-3 for our example).

The sine function is positive in the first and

second quadrant and negative in the third and

fourth, and this gives the integrals their

algebraic sign. Also, as the vectors tend to point

along the same line the magnitude gets smaller

(to reflect that the region of the triangle gets

smaller).

n

m

n

m

sin 0  sin 0 

n

m

2 e

3 e

CEE 213—Deformable Solids

© Keith D. Hjelmstad 2014

CP 2—Properties of Areas Algorithm

1 1

2 2

1 1

1. Store coordinates of vertices in array

2. Initialize properties 0, ,

3. Loop over the sides, 1:

a. Compute the unit vectors and from

b. Compute

N N

i i

x y

x y

x y

x y

A

i N

       

         

  

x

x

p 0 R 0

n m x

 

 

1 sin

c. Compute the triangle contributions

, , and

d. Add the contributions to the whole

, ,

4. Finish the computation of and

/ ,

5. Com

i i i

i i i

i i i A A A

i i i

A dA dA dA

A A A

A A

   

   

     

   

  

n m e

p r R r r

p p p R R R

c J

c p J R c c

pute principal values of

6. Print and plot results

J

1

2

3

4

The Cross SectionO

Algorithm. We can organize the computation as follows:

The process can be put into a program with

the steps outlined at right. In the loop we carry

out the computations associated with the

triangle whose edge is defined by the current

vertices. We then accumulate those into sums

for each of the properties (i.e., we are adding

up all of the contributions of all triangles).

Once the loop is complete we can finish the

computations of c and J, find the principal

values, and print and/or plot the results.

CEE 213—Deformable Solids

© Keith D. Hjelmstad 2014

CP 2—Properties of Areas Principal values of J

Principal values of J. When the off-diagonal elements of

the tensor J are not zero that implies that the Jyy and Jzz values are not the maximum or minimum moments of

inertia of the cross section.

The way we computed J had the first step of laying down

a coordinate system (y, z). We found the location of the centroid C and that allowed us to nail down the

coordinate system (x,h), which is simply a translation of the original coordinate system to pass through the

centroid. These two coordinate systems were probably

chosen because of some other aspect of the problem we

are trying to solve (e.g., bending about the y-axis). But,

as far as the properties of the cross section are concerned,

the choice is arbitrary.

An interesting question to ask is this: Could we pick a

coordinate system (x',h') in such a way that the values of Jyy and Jzz are the biggest or smallest possible? The

answer is “yes” and the coordinate system we need

points in the direction of the eigenvectors of J. Similarly,

the actual max/min values are the eigenvalues of J.

MATLAB gives us a very easy way to compute the

eigenvalues of a matrix:

2 e

3 e

C x

x 

h h

y

z

Jmax = eig(J)

The maximum and minimum values of the

inertia tensor J are its eigenvalues. These are

the values of J that we would compute in the

(x',h') coordinate system (if we knew what it was in advance). For a symmetric cross section

J is diagonal and the the max/min values are

equal to the diagonal elements of J.