Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1.  
  2. %% PROBLEM 1: Document Information
  3. % Modified by C2C Connor Neal
  4. % Created by Lt Col Jim Westfall
  5. % ME 330 Spring 2020 Section M6A
  6. % CAE 2
  7.  
  8. clear;
  9. close all;
  10. clc;
  11.  
  12. %% Given
  13.  
  14. % The figure as shown is given.
  15. % The following section properties are given:
  16.  
  17. % Aluminum Pipe
  18. E1 = 53e6; % Modulus of Elasticity in psi
  19. A1 = 5.6; % Area in inches^2
  20. L1 = 120; % Length in inches
  21.  
  22. % Steel Pipe
  23. E2 = 14.75e6; % Modulus of Elasticity in psi
  24. A2 = 4.4; % Area in inches^2
  25. L2 = 144; % Length in inches
  26.  
  27. % External Loading
  28. P = -60e3; % Total load in lbs and negative indicates to the left
  29.  
  30. %% Find
  31.  
  32. % Find the normal force in pipe 1.
  33.  
  34. %% System of Equations
  35.  
  36. % There are two unknown forces and two equations.
  37.  
  38. % Define the unkown forces in the pipes
  39. syms F1 F2
  40.  
  41. % Sum Forces in X - in lbs
  42. Sum_F_x = -F1 + F2 + P == 0;
  43.  
  44. % Compatibility Equation - in inches
  45. Compatibility = F1*L1/(A1*E1) + F2*L2/(A2*E2) == 0;
  46.  
  47. %% Solve System of Equations
  48.  
  49. % The unknowns in the system of equations are solved in this section.
  50. Solution = solve([Sum_F_x, Compatibility], [F1, F2]);
  51.  
  52. % Redefine the variable solution to the answers
  53. F1 = double(Solution.F1);
  54. F2 = double(Solution.F2);
  55.  
  56. %% Post-process
  57.  
  58. % Compute the problem solutions based on answers from Sys of Eqn.
  59.  
  60. % No post processing needed for this problem, but some example post
  61. % processing that might be needed is provided
  62.  
  63. % Compute stresses in each pipe
  64. Stress1 = F1/A1; % in psi
  65. Stress2 = F2/A2; % in psi
  66.  
  67. % Compute the deflection of point B
  68. Delta1 = F1*L1/(A1*E1); % in inches
  69.  
  70. %% Print out the answers
  71.  
  72. % Display the answers to questions asked in the problem statement.
  73.  
  74. % Report the force and divide by 1e3 to convert to kips
  75.  
  76. fprintf('The force in pipe 1 is %0.4f kips\n',F1/1e3);
  77.  
  78. % This part is not required for question 1.
  79.  
  80. % Report the stresses and divide by 1e3 to convert to ksi units
  81.  
  82. fprintf('The stress in pipe 1 is %0.4f ksi\n',Stress1/1e3);
  83. fprintf('The stress in pipe 2 is %0.4f ksi\n',Stress2/1e3);
  84.  
  85. % Report the deflection
  86. fprintf('The deflection of point B is %0.4f inches to the left\n',Delta1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement