This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: largest=abs(EIvpp) Sheet1 Page 2 max_loc = x2 max_mom = largest Endif Write(6,5) x2, EIvpp Enddo Write(6,150) max_mom, max_loc,L 5 format(f5.4,5x,f8.3) 150 Format (2/,'Max bending moment is ',f8.2,' and occurs at ', f8.2,' for L=',f3.1) return end subroutine Differ2(L,h,q) implicit none real x, x0, x1, x2, x3, x4,x5,x6,h,max_mom,max_loc,largest,L,q,EIv,EIvpp,EIvppp integer i,num EIv(x)=q*L*x**3/12.-q*x**4/24.-q*L**3*x/24. num=int(L/h) largest=0. Do i=3, num-3 x0 = h*(i-3) x1 = x0+h x2 = x1+h x3 = x2+h x4 = x3+h x5 = x4+h x6 = x5+h EIvpp = (-EIv(x5)+16*EIv(x4)-30*EIv(x3)+16*EIv(x2)-EIv(x1))/(12*h**2) EIvppp = (-EIv(x6)+8*EIv(x5)-13*EIv(x4)+13*EIv(x2)-8*EIv(x1)+EIv(x0))/(8*h**3) If(abs(EIvpp).gt.largest) then largest=abs(EIvpp) max_loc = x3 max_mom = largest Endif Write(7,5) x3, EIvpp Enddo Write(7,150) max_mom, max_loc,L 5 format(f5.4,5x,f8.3) 150 Format (2/,'Max bending moment is ',f8.2,' and occurs at ', f8.2,' for L=',f3.1) return end...
View Full Document
This note was uploaded on 07/17/2008 for the course CE 311K taught by Professor Liljestrand during the Spring '08 term at University of Texas at Austin.
- Spring '08