# Truss Bridge

# Equilibrium equations

## a

$
\begin{align}
-f_1 \cos(45) - f_2 +r_{ax} & = 0 \\
-f_1 \cos(45) + r_{ay} & = 0 
\end{align}
$

## b

$
\begin{align}
f_1 \cos(45) - f_4 & = 0 \\
f_1 \sin(45) + f_3 & = 0 \\ 
\end{align}
$

## c

$
\begin{align}
f_2 - f_5 \cos(45) - f_6 & = 0 \\
-f_3 - f_5 \cos(45) & = -T_c \\
\end{align}
$

## d

$
\begin{align}
f_4 + f_5 \cos(45) - f_8 \cos(45) & = 0 \\
f_8 \sin(45) + f_5 \sin(45) + f_7 & = 0 \\
\end{align}
$

## e

$
\begin{align}
f_6 - f_9 & = 0 \\
- f_7 & = - T_e \\ 
\end{align}
$

## f

$
\begin{align}
f_8 \cos(45) + f_9 & = 0 \\
-f_8 \cos(45) + r_{fy} & = 0 
\end{align}
$

# Matrix equation

$
\begin{align}
f_i &= [f_1,f_2,f_3,f_4,f_5,f_6,f_7,f_8,f_9, r_{ax}, r_{ay}, r_{fy}]^T \\
f_e &= [0,0,0,0,0,T_c,0,0,0, T_e, 0, 0]^T \\
\end{align}
$


$$ A_{12 \times 12} = 
\begin{bmatrix} 
-\frac{\sqrt(2)}{2} & -1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 
-\frac{\sqrt(2)}{2} & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\ 
\frac{\sqrt(2)}{2} & 0 & 0 & -1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 
\frac{\sqrt(2)}{2} & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 1 & 0 & 0 & -\frac{\sqrt(2)}{2} & -1 & 0 & 0 & 0 & 0 & 0 & 0\\ 
0 & 0 & -1 & 0 & -\frac{\sqrt(2)}{2} & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 1 & \frac{\sqrt(2)}{2} & 0 & 0 & -\frac{\sqrt(2)}{2} & 0 & 0 & 0 & 0\\ 
0 & 0 & 0 & 0 & \frac{\sqrt(2)}{2} & 0 & 1 & \frac{\sqrt(2)}{2} & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & -1 & 0 & 0 & 0\\ 
0 & 0 & 0 & 0 & 0 & 0 & -1 & 0 & 0 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & \frac{\sqrt(2)}{2} & 1 & 0 & 0 & 0\\
0 & 0 & 0 & 0 & 0 & 0 & 0 & -\frac{\sqrt(2)}{2} & 0 & 0 & 0 & 1
\end{bmatrix}
$$

# Solution


```julia
A = [-sqrt(2)/2  -1  0  0  0  0  0  0  0  1  0  0 ; 
-sqrt(2)/2  0  0  0  0  0  0  0  0  0  1  0 ; 
sqrt(2)/2  0  0  -1  0  0  0  0  0  0  0  0; 
sqrt(2)/2  0  1  0  0  0  0  0  0  0  0  0;
0  1  0  0  -sqrt(2)/2  -1  0  0  0  0  0  0; 
0  0  -1  0  -sqrt(2)/2  0  0  0  0  0  0  0;
0  0  0  1  sqrt(2)/2  0  0  -sqrt(2)/2  0  0  0  0; 
0  0  0  0  sqrt(2)/2  0  1  sqrt(2)/2  0  0  0  0;
0  0  0  0  0  1  0  0  -1  0  0  0; 
0  0  0  0  0  0  -1  0  0  0  0  0;
0  0  0  0  0  0  0  sqrt(2)/2  1  0  0  0;
0  0  0  0  0  0  0  -sqrt(2)/2  0  0  0  1];

fₑ = [0,0,0,0,0,7.5,0,0,0, 7.5, 0, 0]

fᵢ = fₑ \ A;
fᵢ'
```




    12-element Array{Float64,1}:
      0.0
      0.0
     -0.06666666666666667
      0.0
     -0.04714045207910317
      0.0
     -0.06666666666666667
      0.0
      0.0
      0.0
      0.0
      0.0



## Will the bridge collapse? 

No, and not even with 20 ton truck. 


```julia
fₑ = [0,0,0,0,0,10,0,0,0, 10, 0, 0]
fᵢ = fₑ \ A;
fᵢ'
```




    12-element Array{Float64,1}:
      0.0
      0.0
     -0.05
      0.0
     -0.03535533905932738
      0.0
     -0.05
      0.0
      0.0
      0.0
      0.0
      0.0



## Adjourn


```julia
using Dates
println("mahdiar")
Dates.format(now(), "Y/U/d HH:MM")  
```

    mahdiar





    "2021/February/11 14:51"



7501457f58f537c270e3d2eaea75aa2bc5a99d95
ipynb
Jupyter Notebook
HW03/3.ipynb
mahdiarsadeghi/NumericalAnalysis
95a0914c06963b0510971388f006a6b2fc0c4ef9
MIT
HW03/3.ipynb
mahdiarsadeghi/NumericalAnalysis
95a0914c06963b0510971388f006a6b2fc0c4ef9
MIT
HW03/3.ipynb
mahdiarsadeghi/NumericalAnalysis
95a0914c06963b0510971388f006a6b2fc0c4ef9
MIT
Qwen/Qwen-72B
1. YES
2. YES