A bar with uniform cross-sectional area, A, elastic modulus, E, and length, L, is loaded with distributed loads q(x). The bar is fixed on the right end and attached to the spring of stiffness, K, which is relaxed when the bar is undeformed.
Here, Cross-sectional area, A = 0.025 m^2, the Young's modulus, E = 70 GPa, K = 750 kN/m.
Spring constant K
q(x)
F(spring)e
Cross-sectional Area: A (m^2) L (m)
The governing equation for a 1-D bar is as follows: d^2u/dx^2 = AE/(7x) (x-b)
Where the distributed load, q(x), is defined below for the problem: q(x) = qo(2 - 2)
And the boundary condition for this particular problem is as follows: u(x=0) = 0, and F = -Ku(x=L)
Write a MATLAB program which:
- Takes as input: length of the bar, L, number of intervals, N, and qo.
- Assembles the FD matrices for governing equations and boundary condition.
- Plot the displacement solution against the length of the bar, i.e., (x) vs. x.
- Run your program using test input as L = 20 m, qo = 50 kN/m, and N = 5.
- Print out your coefficient matrix, equation constant vector, and displacement solution.