jupytext | kernelspec | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Problems Part 1
- Consider the following pistons connected in series. You want to find the distance each piston moves when equal and opposite forces are applied to each side. In case 1, you consider the motion of all five pistons, but in case 2 you set the motion of piston 5 to 0.
Using a FBD for each piston, in case 1:
in matrix form:
$\left[ \begin{array}{ccccc}
k_1 & -k_1 & 0 & 0 & 0\
-k_1 & k_1+k_2 & -k_2 & 0 & 0 \
0 & -k_2 & k_2+k_3 & -k_3 & 0\
0 & 0 & -k_3 & k_3+k_4 & -k_4\
0 & 0 & 0 & -k_4 & k_4
\end{array} \right]
\left[ \begin{array}{c}
x_{1} \
x_{2} \
x_{3} \
x_{4} \
x_{5}\end{array} \right]=
\left[ \begin{array}{c}
F \
0 \
0 \
0 \
-F \end{array} \right]$
Try to use np.linalg.solve
to find the piston x-positions. Do you get
any warnings or errors? use stiffness values of $k* = 1$ and force of
Now, consider case 2,
Using a FBD for each piston, in case 2:
in matrix form:
$\left[ \begin{array}{cccc} k_1 & -k_1 & 0 & 0 \ -k_1 & k_1+k_2 & -k_2 & 0 \ 0 & -k_2 & k_2+k_3 & -k_3 \ 0 & 0 & -k_3 & k_3+k_4 \ \end{array} \right] \left[ \begin{array}{c} x_{1} \ x_{2} \ x_{3} \ x_{4} \end{array} \right]= \left[ \begin{array}{c} F \ 0 \ 0 \ 0 \end{array} \right]$
Try to use np.linalg.solve
to find the piston x-positions. Do you get
any warnings or errors? Why does this solution work better hint: check
condition
numbers
- In the figure above you have an idealized Heating, Ventilation and
Air conditioning (HVAC) system. In the current configuration, the
three-room building is being cooled off by
$T_{in}$ air fed into the building at $\dot{m}_1. Our goal is to determine the steady-state temperatures of the rooms given the following information
$\dot{m}_1=0.1~kg/s$ $\dot{m}_2=0.12~kg/s$ $\dot{m}_3=0.12~kg/s$ $\dot{m}_4=0.1~kg/s$ $\dot{m}_5=0.02~kg/s$ $\dot{m}_6=0.02~kg/s$ $C_p=1000~\frac{J}{kg-K}$ $\dot{Q}_{in} = 300~W$ $T_{in} = 12^{o} C$
The energy-balance equations for rooms 1-3 create three equations:
-
$\dot{m}1 C_p T{in}+\dot{Q}_{in}-\dot{m}2 C_p T{1}+\dot{m}6 C_p T{2} = 0$
-
$\dot{m}2 C_p T{1}+\dot{Q}_{in}+\dot{m}5 C_p T{3}-\dot{m}3 C_p T{2}-\dot{m}6 C_p T{2} = 0$
-
$\dot{m}3 C_p T{2}+\dot{Q}_{in}-\dot{m}5 C_p T{3}-\dot{m}4 C_p T{3} = 0$
Identify the unknown variables and constants to create a linear algebra problem in the form of
a. Create the matrix
b. Create the known vector
c. Solve for the unknown variables,
d. What are the warmest and coldest rooms? What are their temperatures?
- The Hilbert Matrix has a high condition number and as the matrix increases dimensions, the condition number increases. Find the condition number of a
a.
b.
c.
d.
e.
If the accuracy of each matrix element is
Problems Part 2
- 4 masses are connected in series to 4 springs with K=100N/m. What are the final positions of the masses?
The masses haves the following amounts, 1, 2, 3, and 4 kg for masses 1-4. Using a FBD for each mass:
in matrix form K=100 N/m:
$\left[ \begin{array}{cccc} 2k & -k & 0 & 0 \ -k & 2k & -k & 0 \ 0 & -k & 2k & -k \ 0 & 0 & -k & k \end{array} \right] \left[ \begin{array}{c} x_{1} \ x_{2} \ x_{3} \ x_{4} \end{array} \right]= \left[ \begin{array}{c} m_{1}g \ m_{2}g \ m_{3}g \ m_{4}g \end{array} \right]$
For problems 2-3, consider the simple 3-element triangular truss, shown above, with a point load applied at the tip. The goal is to understand what tension is in the horizontal element,
- In the truss shown above, calculate the tension in bar 1,
$P_1$ , when$\theta=0$ . When$\theta=0$ , the$\sum F=0$ at each corner creates 3 equations and 3 unknowns as such (here, you reduce the number of equations with symmetry, $P_2=P_3,~R_2=R_3,andR_1=0$ ).
$\left[ \begin{array}{ccc} 1 & \cos\alpha & 0 \ 0 & 2\sin\alpha & 0 \ 0 & -\sin\alpha & 1 \ \end{array} \right] \left[ \begin{array}{c} P_{1} \ P_{2} \ R_{2} \end{array} \right]= \left[ \begin{array}{c} 0 \ F \ 0 \end{array} \right]$
a. Create the system of equations, andR_2$. What is the resulting augmented matrix,
b. Solve for the
c. Use the vsF$.
- Using the same truss as shown above, let's calculate the tension in bar 1,
$P_1$ , when$\theta=[0...90^o]$ and$F=[100...1100]~kN$ . When$\theta\neq 0$ , the resulting 6 equations and 6 unknowns are given in the following matrix
$\left[ \begin{array}{ccc} 0 & \sin\alpha & 0 & 1 & 0 & 0 \ 1 & \cos\alpha & 0 & 0 & 1 & 0 \ 0 & \cos\beta/2 & \cos\beta/2 & 0 & 0 & 0 \ 0 & -\sin\beta/2 & \sin\beta/2 & 0 & 0 & 0 \ -1 & 0 & \cos\alpha & 0 & 0 & 0 \ 0 & 0 & \sin\alpha & 0 & 0 & 1 \ \end{array} \right] \left[ \begin{array}{c} P_{1} \ P_{2} \ P_{3} \ R_{1} \ R_{2} \ R_{3}\end{array} \right]= \left[ \begin{array}{c} 0 \ 0 \ F\cos\theta \ -F\sin\theta \ 0 \ 0 \end{array} \right]$
a. Create the system of equations, andR_3$. What is the resulting augmented matrix,
b. Solve for the
c. Use the vsF$.
Problems Part 3
Viscoelastic Prony series model and stress-vs-time relaxation curve of wheat kernels [3]. Stress relaxation curve of a wheat kernel from regressed equation data that illustrate where to locate relaxation times (vertical dotted lines) and stresses (horizontal black marks).
- Viscoelasticity is a property of materials that exhibit stiffness, but also tend to flow slowly. One example is Silly Putty, when you throw a lump it bounces, but if you leave it on a table it creeps, slowly flowing downwards. In the stress-vs-time plot above, a wheat kernel was placed under constant strain and the stress was recorded. In a purely elastic material, the stress would be constant. In a purely viscous material, the stress would decay to 0 MPa.
Here, you have a viscoelastic material, so there is some residual elastic stress as
a. Load the data from the graph shown above in the file ../data/stress_relax.dat
.
b. Create a
c. Solve for the constants, $a_1,~a_2,~a_3,a_4,a_5$
d. Plot the best-fit function and the data from ../data/stress_relax.dat
Use at least 50 points in time to get a smooth best-fit line.
- Load the '../data/primary-energy-consumption-by-region.csv' that has the energy consumption of different regions of the world from 1965 until 2018 Our world in Data.
You are going to compare the energy consumption of the United States to all of Europe. Load the data into a pandas dataframe. Note: you can get certain rows of the data frame by specifying what you're looking for e.g.
EUR = dataframe[dataframe['Entity']=='Europe']
will give us all the rows from Europe's energy consumption.
a. Use a piecewise least-squares regression to find a function for the energy consumption as a function of year
energy consumed =
c. What is your prediction for US energy use in 2025? How about European energy use in 2025?