Question

In: Mechanical Engineering

Matlab assignment. The objectives of this project are (1) to introduce the students to scripting applied...

Matlab assignment.

The objectives of this project are (1) to introduce the students to scripting applied to solution of mechanical engineering problems and (2) to create a Matlab script that allows the computation of principal stresses and strains starting from a generic state of stress and that automates the drawing of 3D Mohr circles

Assignment

1) Read from input a stress tensor (3D);

2) For any state of 3D stress compute the principal stress values (σ1, σ2, σ3) with σ1 > σ2 > σ3;

3) Calculate the maximum shear stress (radius of the three circles);

4) Draws the correspondent Mohr circles;

5) Given the principal stresses (computed at point 2) use the Hooke’s law to calculate the correspondent principal strains;

6) Create a flowchart correspondent to this code (Points 1 to 5).

Solutions

Expert Solution

function []=mohrs(StressState, option, angle)
%MOHRS Draws a Mohr's circle.
%   MOHRS([SIGMAX,SIGMAY,TAUXY],OPTION,ANGLE) Calculates principle stresses,
%   maximum shear, and normal and shear stress on a requested plane.  All of
%   these are presented graphically on a Mohr's circle diagram that can be
%   easily printed out.
%
%   SIGMAX:  Normal stress in the X direction.
%   SIGMAY:  Normal stress in the Y direction.
%   TAUXY:   Shear on the X-Y plane.
%   Together these three are gathered as the STRESSSTATE.
sx=StressState(1);
sy=StressState(2);
txy=StressState(3);
center=mean([sx,sy]);
[PrincipleStresses, IPShearMax, ShearMax]=pristress(StressState, option);
PP=ppstress(StressState)';
radius=IPShearMax;
clf
showcirc(radius,[center,0],'r');
hold on
showcirc(PrincipleStresses(1)/2,[PrincipleStresses(1)/2,0],'r--');
showcirc(PrincipleStresses(2)/2,[PrincipleStresses(2)/2,0],'r--');
showcirc(PrincipleStresses(3)/2,[PrincipleStresses(3)/2,0],'r--');
axis ('equal')
edges=axis;
le=edges(1);
hs=(edges(2)-edges(1))/2;
plot ([edges(1)-0.1*edges(1) edges(2)+0.1*edges(2)],[0 0],'b')
plot ([0,0],[edges(3) edges(4)],'b')
plot (center,0,'ro')
plot ([sx,sy],[-txy,txy],'k')
colA=strvcat('Center:','Maximum In Plane Shear:','Maximum Total Shear:');
colA=strvcat(colA,'Principle Stresses:','Principle Planes:');
colB=strvcat(num2str(center,4),num2str(IPShearMax,4),num2str(ShearMax,4));
colB=strvcat(colB,num2str(PrincipleStresses,4),num2str(RD(PP),4));
if nargin==3
  AngleToHorPlane=atan2(txy,(sy-center));
  AngleToRequestPlane=AngleToHorPlane + 2*angle;
  rn=center + radius * cos(AngleToRequestPlane);
  rs=radius * sin(AngleToRequestPlane);
  plot ([center,rn],[0,rs],'r',rn,rs,'rd')
  colA=strvcat(colA,'At angle:','**Normal Stress:','**Shear Stress:');
  colB=strvcat(colB,num2str(RD(angle),4),num2str(rn,4),num2str(rs,4));
end
axis ('equal')
colA=strvcat(colA,'Negative shear causes CCW rotation of element.');
colB=strvcat(colB,' ');
expandaxis (30, 30)
titleblock(colA,colB);
xlabel ('Normal Stress')
ylabel ('Shear Stress')
title (strcat('Mohrs circle:   ',option))
text (sx,-txy,'V')
text (sy,txy,'H')
hold off

Related Solutions

1. One of the objectives of corporate governance reform is to, A. introduce expensive and burdensome...
1. One of the objectives of corporate governance reform is to, A. introduce expensive and burdensome accounting reforms. B. strengthen the protection of outside investors from expropriation by managers and controlling insiders. C. none of the options D. provide taxpayer financing for corporate raiders to strengthen the discipline of the marketplace. 2. Free cash flow refers to A. a firm's cash reserve in excess of tax obligation. B. a firm's income tax refund that is due to interest payments on...
Explain why the SMART principle often applied to objectives, is important when tendering for a project...
Explain why the SMART principle often applied to objectives, is important when tendering for a project that will not get additional funds once approved.
EENG 1910: Project I – Introduction to Electrical Engineering Assignment-8 1. Create a MATLAB function that...
EENG 1910: Project I – Introduction to Electrical Engineering Assignment-8 1. Create a MATLAB function that will take as inputs the radius (r) and height (h) of a cone and calculate its volume. The formula to compute the volume of a cone is as follows. 1 ? = 3 ??2ℎ Write a descriptive comment on the use of the function so that the user by typing help nameofyourfunction has all the necessary information to use your function. In each of...
Use Matlab to introduce arow vector,f,and define it as a 1 by 4 vector showing values...
Use Matlab to introduce arow vector,f,and define it as a 1 by 4 vector showing values of 1, 2, 3and 4. Now try to build matrix D, using the following 2 commands a.D = [f ; A] b.D= [f , A] c.Which one can be built,and which one cannot be built? Explain your answer. Matrix A, which is a 4by 4 matrix, (The first, second, third and fourth column values are:2,4,6,8and 1,3,5,7 and 8,6,4,2 and 7,5,3,1 , respectively.
MATLAB 1. Introduce some if-statements into your energy.m code by considering the following items: Ask the...
MATLAB 1. Introduce some if-statements into your energy.m code by considering the following items: Ask the user to enter the mass of the object (mention that they can either enter a scalar or a vector). Then the if-statement defines if the input is a scalar or a vector. If it is a scalar, then use fprintf to show the calculated energy in Joule. If it is a vector, sort the mass vector and then plot energy versus mass. Plot for...
Project Assignment Construct the Y_bus matrix of a given power network by computer programming, preferably MATLAB....
Project Assignment Construct the Y_bus matrix of a given power network by computer programming, preferably MATLAB. Note that the necessary data are available in the IEEE common data format; and as the working data, you can use the IEEE 14-bus system data. Due Date: December 26, 2019. IEEE-Format Data for 14-Bus System 08/19/93 UW ARCHIVE 100.0 1962 W IEEE 14 Bus Test Case BUS DATA FOLLOWS 14 ITEMS 1 Bus 1 HV 1 1 3 1.060 0.0 0.0 0.0 232.4...
Assignment OverviewUnit 2 - Individual Project ASSIGNMENT DESCRIPTIONDeliverable Length: 5–7 pages OBJECTIVES Additional Information After completing...
Assignment OverviewUnit 2 - Individual Project ASSIGNMENT DESCRIPTIONDeliverable Length: 5–7 pages OBJECTIVES Additional Information After completing your stakeholder analysis and developing your stakeholder register, you started working on your next project, which will be to develop a project charter. You started to gather information from various stakeholders via interviews and e-mails. The latest e-mail you sent caused quite a response. Several meetings were centered on the project charter, statement of work (SOW), work breakdown structure (WBS), and enterprise environmental factors...
Assignment #3 – Geometry Calculator Assignment Objectives Task #1 void Methods 1. Name the program file...
Assignment #3 – Geometry Calculator Assignment Objectives Task #1 void Methods 1. Name the program file Geometry.java. This program will compile, but, when you run it, it doesn’t appear to do anything except wait. That is because it is waiting for user input, but the user doesn’t have the menu to choose from yet. We will need to create it. 2. Below the main method, but in the Geometry class,create a static method called printMenu that has no parameter list...
MATLAB Assignment 8 Introduction to Linear Algebra (Weeks 11 and 12) Spring, 2018 1. MATLAB Submission...
MATLAB Assignment 8 Introduction to Linear Algebra (Weeks 11 and 12) Spring, 2018 1. MATLAB Submission Problem 3 ( Due Date : May 24 (Thu) ) Referring to the instruction below, you are required to submit this problem. A common problem in experimental work is to find a curve y = f(x) of a specified form corresponding to experimentally determined values of x and y, say (x1, y1), (x2, y2), · · · , (xn, yn). The followings are the...
(1)Using the Matlab code developed in Software Assignment #1: a. Convert the code that generates the...
(1)Using the Matlab code developed in Software Assignment #1: a. Convert the code that generates the random number (H,T) with equal probabilities into a function called myBernolli(p, S) that takes as an input the probability of success p and S is the outcome defined as success (either T or H) and returns the outcome of the trial (either T or H). b. Test that your function is actually producing the successful outcome with probability p by running the function in...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT