Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %% PROBLEM 1: Document Information
- % Modified by C2C Connor Neal
- % Created by Lt Col Jim Westfall
- % ME 330 Spring 2020 Section M6A
- % CAE 2
- clear;
- close all;
- clc;
- %% Given
- % The figure as shown is given.
- % The following section properties are given:
- % Aluminum Pipe
- E1 = 53e6; % Modulus of Elasticity in psi
- A1 = 5.6; % Area in inches^2
- L1 = 120; % Length in inches
- % Steel Pipe
- E2 = 14.75e6; % Modulus of Elasticity in psi
- A2 = 4.4; % Area in inches^2
- L2 = 144; % Length in inches
- % External Loading
- P = -60e3; % Total load in lbs and negative indicates to the left
- %% Find
- % Find the normal force in pipe 1.
- %% System of Equations
- % There are two unknown forces and two equations.
- % Define the unkown forces in the pipes
- syms F1 F2
- % Sum Forces in X - in lbs
- Sum_F_x = -F1 + F2 + P == 0;
- % Compatibility Equation - in inches
- Compatibility = F1*L1/(A1*E1) + F2*L2/(A2*E2) == 0;
- %% Solve System of Equations
- % The unknowns in the system of equations are solved in this section.
- Solution = solve([Sum_F_x, Compatibility], [F1, F2]);
- % Redefine the variable solution to the answers
- F1 = double(Solution.F1);
- F2 = double(Solution.F2);
- %% Post-process
- % Compute the problem solutions based on answers from Sys of Eqn.
- % No post processing needed for this problem, but some example post
- % processing that might be needed is provided
- % Compute stresses in each pipe
- Stress1 = F1/A1; % in psi
- Stress2 = F2/A2; % in psi
- % Compute the deflection of point B
- Delta1 = F1*L1/(A1*E1); % in inches
- %% Print out the answers
- % Display the answers to questions asked in the problem statement.
- % Report the force and divide by 1e3 to convert to kips
- fprintf('The force in pipe 1 is %0.4f kips\n',F1/1e3);
- % This part is not required for question 1.
- % Report the stresses and divide by 1e3 to convert to ksi units
- fprintf('The stress in pipe 1 is %0.4f ksi\n',Stress1/1e3);
- fprintf('The stress in pipe 2 is %0.4f ksi\n',Stress2/1e3);
- % Report the deflection
- 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