STR N 215 - Computational Engineering: Lecture No. 1 Moment Curvature Analysis
STR N 215 - Computational Engineering: Lecture No. 1 Moment Curvature Analysis
Engineering
Lecture No. 1
Moment Curvature Analysis
• Steel strain and concrete strain at a given distance from neutral axis are
identical.
Stress (fc )
2
-400 15 f c f cu
0 . 002 0 . 002
-500
10
f c f cu
5
fcu = 25 MPa and fy = 400 MPa f c 0 .0
0
0 0.002 0.004 0.006
Strain (ec)
10 STR N 215 – Computetional Enginnering 3/24/2019
11 STR N 215 – Computetional Enginnering 3/24/2019
STR N 215 – Computational
Engineering
Lecture No. 2
MATLAB Fundamentals
• plot (x,y)
where the index variable takes on successive values in the vector created
using the : operator.
4000
Summation of “F” (kN)
3000
2000
1000
0
0 200 400 600 800 1000
-1000
Location of N.A. (mm)
37 STR N 215 – Computetional Enginnering 3/24/2019
Bracketing Methods
• Bracketing methods are based on making two initial guesses that
“bracket” the root - that is, are on either side of the root.
• Brackets are formed by finding two guesses xl and xu where the sign of
the function changes; that is, where f(xl ) f(xu ) < 0
150
Summation of “F” (kN)
100
50
0
50 70 90
-50
-100
Location of N.A. (mm)
41 STR N 215 – Computetional Enginnering 3/24/2019
Bisection
YES
NO
Check
b=c
f(a) x f(c)>0
END
YES
NO
Check a=c
ROOT=c
Abs(a-b)>tolerance
L
Moment Shear dx
0
f x dx
b
I
a
f a f b
I b a
2
I f n x dx f n x dx f n x dx f n x dx
xn x1 x2 xn
x0 x0 x1 xn1
fn x
x x1 x x2
f x0
x x0 x x2
f x1
x x0 x x1
f x2
x0 x1 x0 x2 x1 x0 x1 x2 x2 x0 x2 x1
Integration over the three points simplifies to:
x2
I fn x dx
x0
h
I f x0 4 f x1 f x2
3
55 STR N 215 – Computetional Enginnering 3/24/2019
Error of Simpson’s 1/3 Rule
• An estimate for the local truncation error of a single application of Simpson’s
1/3 rule is:
1
Et f4
b a
5
2880
where is somewhere between a and b.
• This formula indicates that the error is dependent upon the fourth-derivative of
the actual function as well as the distance between the points.
• Note that the error is dependent on the fifth power of the step size (rather than
the third for the trapezoidal rule).
• Error can thus be reduced by breaking the curve into parts.
x0 x0 x2 x n 2
h
I f x0 4 f x1 f x2 h f x2 4 f x3 f x4 h f xn2 4 f xn1 f xn
3 3 3
n 1 n2
h
I f x0 4 f xi 2 f xi f xn
3 i 1 j 2
i , odd j , even
3h
I
8
f x0 3 f x1 3 f x2 f x3
• Simpson’s 3/8 rule is generally used in concert
with Simpson’s 1/3 rule when the number of
segments is odd
I f n x dx f n x dx f n x dx f n x dx
xn x1 x2 xn
x0 x0 x1 xn1
f x0 f x1 f x1 f x2 f xn 1 f xn
I x1 x0 x2 x1 xn xn 1
2 2 2
R
ij 99 i 91 Ci 91
K U
ij 22 i 22 Ci 22
68 STR N 215 – Computetional Enginnering 3/24/2019
Stress of a Uniform Rod
• Recall from elementary mechanics of solids that a uniform rod of
length L, cross sectional area A, and elastic modulus E can be modeled
as a linear spring of stiffness keq
f j k u j ui
• These relations can be written in matrix form as:
fi k k ui
f j k k u j
u2 u (j1) ui( 2)
where the subscript denotes the global node number, the superscript
denotes the global element number, and I and j denote local node numbers
F1 k1 k1 0 u1
F2 k1 k1 k 2 k 2 u2
F 0 k2 k 2 u3
3
75 STR N 215 – Computetional Enginnering 3/24/2019
76 STR N 215 – Computetional Enginnering 3/24/2019
Graphical Method
• For small sets of simultaneous equations,
graphing them and determining the location of
the intercept provides a solution.
• Graphing the equations can also show systems
where:
a) No solution exists
b) Infinite solutions
exist
a) System is
ill-conditioned
• “Naïve” Gauss elimination simply means the process does not check for
potential problems resulting from division by zero.
Lecture No. 5
LU Factorization &
Matrix Inverse and Condition
• The main advantage is once [A] is decomposed, the same [L] and [U]
can be used for multiple {b} vectors.
1
0
0
Ax1 0 Ax 2 1 Ax 3 0
0
0
1
A x1 x3
1
x2
A 2 max
1/2
spectral norm (2 norm)
• Note - max is the largest eigenvalue of [A]T[A].
Predictor : yi01 yi f ( xi , yi )h
f ( xi , yi ) f ( xi 1 , yi01 )
Corrector : yi 1 yi h
2
yi 1 yi f ( xi 1/ 2 , yi 1/ 2 )h
yi 1 yi (a1k1 a2 k 2 )h a1 a2 1 A value is
assumed
1
k1 f ( x i , yi ) a 2 p1 for a2 to
2 solve for
k 2 f ( xi p1h, yi q11k1h) 1 the other
a2 q11
2 three.
a11
b2 a21 x1j a23 x3j1
x
j
2
a22
b3 a31 x1j a32 x2j
x
j
3
a33
124 STR N 215 – Computetional Enginnering 3/24/2019
125 STR N 215 – Computetional Enginnering 3/24/2019
126 STR N 215 – Computetional Enginnering 3/24/2019
Jacobi Iteration
xij xij1
e a,i j
100%
xi
• The method is ended when all elements have converged to a set
tolerance.
[A] {x} = 0
Trivial solution:
{x} = 0
Is there another way of formulating the system
132 so that the solution would be meaningful???
STR N 215 – Computetional Enginnering 3/24/2019
Mathematics
What about a homogeneous system like:
(a11 – l) x1 + a12 x2 + a13 x3 = 0
a21 x1 + (a22 – l) x2 + a23 x3 = 0
a31 x1 + a32 x2 + (a33 – l) x3 = 0
or in matrix form
[[A] – lI ]{x} = 0
For this case, there could be a value of l that
makes the equations equal zero for non-zero x. This
133
is called an eigenvalue.
STR N 215 – Computetional Enginnering 3/24/2019
Physical Background:
Oscillations or Vibrations of Mass-
Spring Systems
d 2x 2
m2 = – k(x2 – x1) – kx2
dt 2
Collect terms:
d 2x1
m1 – k (– 2x1 + x2) = 0
dt 2
d 2x 2
m2 – k (x1 – 2x2) = 0
135
dt 2 215 – Computetional Enginnering
STR N 3/24/2019
Assume a Sinusoidal Solution
2p
xi = Xi sin (w t) where w=
Tp
Differentiate twice:
(10 – w2) X1 – 5 X2 = 0
– 5 X1 + (10 – w2) X2 = 0
(10 – 5) X1 – 5 X2 = 0 (10 – 15) X1 – 5 X2 = 0
– 5 X1 + (10 – 5) X2 = 0 – 5 X1 + (10 – 15) X2 = 0
5 X1 – 5 X2 = 0 – 5 X1 – 5 X 2 = 0
– 5 X 1 + 5 X2 = 0 – 5 X1 – 5 X 2 = 0
X1 = X2 X1 = –X2
–0.7071 –0.7071
V= V=
139 –0.7071 STR N 215 – Computetional Enginnering 0.7071 3/24/2019
Principle Modes of Vibration
Tp = 1.62
Tp = 2.81
[[A] l[I]]]{x} = 0
[A]{x} = l{x}
Simple Algorithm:
Second iteration:
40 20 0 1 40 1
20 40 20 0 = 20 = 40 1
0 20 40 1 40 1
40 20
|ea| = 40 100% = 50%
143 STR N 215 – Computetional Enginnering 3/24/2019
Example: The Power Method
Third iteration:
40 20 0 1 60 0.75
20 40 20 1 = 80 = 80 1
0 20 40 1 60 0.75
80 40
|ea| = 80 100% = 150%
Fourth iteration:
40 20 0 0.75 50 0.71429
20 40 20 1 = 70 = 70 1
0 20 40 0.75 50 0.71429
70 80)
| e a| = 70 100% = 214%
144 STR N 215 – Computetional Enginnering 3/24/2019
Example: The Power Method
Fifth iteration:
| ea | = 68.51714 70
70 100% = 2.08%
Linear Regression
• Fitting a straight line to a set of paired observations: (x1, y1), (x2,
y2),…,(xn, yn).
y=a0+a1x+e
a1- slope
a0- intercept
e- error, or residual, between the model and the observations
e (y
i 1
i
i 1
i ao a1 xi )
n = total number of points
• However, this is an
inadequate criterion, so is the
sum of the absolute values
n n
e y
i 1
i
i 1
i a0 a1 xi
152 STR 215- Computational Engineering 3/24/2019
• Best strategy is to minimize the sum of the squares of
the residuals between the measured y and the y
calculated with the linear model:
n n n
S r e ( yi , measured yi , model) ( yi a0 a1 xi ) 2
2
i
2
i 1 i 1 i 1
a 0 na0
na0 xi a1 yi
Normal equations, can be
solved simultaneously
n xi yi xi yi
a1
n x xi
2 2
i Mean values
154 a0 y a1 x STR 215- Computational Engineering 3/24/2019
155 STR 215- Computational Engineering 3/24/2019
“Goodness” of fit
Total sum of the squares around the mean for the
dependent variable, y, is St
• Sum of the squares of residuals around the regression
line is Sr
• St-Sr quantifies the improvement or error reduction
due to describing data in terms of a straight line rather
than as an average value.
St S r
r
2
St
r2-coefficient of determination