2	Theory Manual
Symbol Legend
	N i – Node i
	B i – Bar i
	A – Cross-section area	               [250 mm2]
	F direction – General Force in direction
	P – Force Applied 	              [6•104 N]
	E – Young’s Modulus   [2•104 N/mm2]
	L – Length 	 	            [150 mm]
	Δ – ‘Gap’		              [1.2 mm]
	T – Tension
	C – Compression
	R location – Reaction at location
	k i – stiffness matrix for B i
	K – Global stiffness matrix
	u i – displacements at N i
	f i – forces at N i
Formula List
	ΣF_x=0
	k_i=(E_i A_i)/L_i  [■(1&-1@-1&1)]
	σ=Eε
	σ=P/A
	σ^((i) )=(u_(i+1)-u_i)/L
	ε=Δu/L
	|f_i |=|AE (u_i-u_(i-1))/L|
	f^((i) )=k^((i) ) d^((i) )

To approach this problem, there are some very important things to consider. The initial condition of the system is statically determinate; nonetheless if we attempt to solve for the deflection of N3 by considering it a sum for the deflection of N2 and N1, there is a total deflection of 1.8mm, which is greater than the distance from N3 to the wall, 1.2mm:
ε=σ/E=P/AE=3/250
Δu_2=εL=3/250 150 mm=1.8 mm
It is immediately noticeable that the resulting deflection is significantly larger than the gap. Thus, when approaching this problem, we must account for the reaction forces of the right wall, which is at distance 
1.2 mm. Therefore, our force-balance equation will need 2 reaction forces instead of one:
ΣF_x=0=P+R_(N_1 )-R_(N_3 )
P=R_(N_3 )-R_(N_1 )=6•10^4  N
Here we can note that we have two unknowns and only one equation, so in order to address this, we must use Compatibility Equations to derive an additional equation composed of pre-existing terms. This compatibility equation will be based on internal forces and preset properties of the beams. Upon doing this, we can use properties of linear systems to solve for R_(N_3 ) and R_(N_1 )
[■(f_1@f_2@f_3 )]=EA/L [■(1&-1&0@-1&2&-1@0&-1&1)][■(u_1@u_2@u_3 )]
The equation above is a linear combination of the forces at each node in terms of the behavior of the bars. Using that, we can solve for internal forces about nodes using displacements and the behavior of other nodes.
 
 
3	Programmer’s Manual
Refer to code comments.
 
 
4	Results and Analysis: 
This section will be referring to equations from the Theory Manual section. 

The theory manual grants insight into the process required to solve the problem statement manually, and this section will continue solving the problem and grant a solution. Observing eq.5 there are multiple variables, but truly, only one of them is unknown. u_1is known because the left-most node cannot be displaced, and u_3 can only be displaced by 1.2 mm before it collides against an unmovable wall. This information turns our equation into the following:
[■(f_1@f_2@f_3 )]=EA/L [■(1&-1&0@-1&2&-1@0&-1&1)][■(0@u_2@1.2 mm)]=EA/L [■(0&-u_2&0@0&2u_2&-1.2@0&-u_2&1.2)]
Additionally, we know the force acting on N2, 6•104 N, andEA/L=(2•10^4  N/mm^2 )(250mm^2 )/150mm=10^5/3  N/mm=H
[■(f_1@6•10^4@f_3 )]=10^5/3 [■(0&-u_2&0@0&2u_2&-1.2@0&-u_2&1.2)]=[■(0&-u_2 H&0@0&2u_2 H&-1.2H@0&-u_2 H&1.2H)]

Solving for u_2 yields:
u_2=1.5mm
f_1=5•10^5 N
f_3=-10^5 N
In this representation, f_1 and f_3are the reaction forces at both walls. Next, to find the internal forces at each element, we will use local stiffness matrices.
[■(f_i^((1) )@f_j^((1) ) )]=[■(H&-H@-H&H)][■(0@1.5)]  ,[■(f_i^((2) )@f_j^((2) ) )]=[■(H&-H@-H&H)][■(1.5@-0.3)]
f^((1) )=5•10^5 N ,f^((2) )=10^5 N
And the final major component of the lab is the stress at each element.
σ^((1) )=(5•10^5)/(250 mm^2 )  ,σ^((2) )=10^5/(250 mm^2 )
σ^((1) )=2000MPa ,σ^((2) )=400MPa

write a matlab code that can solve a general problem of n bars and n+1 nodes between two walls and find
• The support reaction forces at the two ends of the bar
• Internal forces at each element
• Stresses at each element
• Draw the internal axial force diagram (axial force vs. x)- this can be done by hand not
necessarily with your program.
• Verify your code for the problem below and compare with FEM hand calculations
Verify your code with the problem shown below. It consists of 2 bars (elements) and 3 nodes. A
load P is applied to node 2. Material properties, lengths, load and displacements are given.
Given:
• A= 250 mm 2
• L=150 mm
• E=2.0 x 10 4 N/mm 2
• P=6.0 x 104 N
• Δ =1.2 mm