Question
Given A=[10 14 25; 14 7 15; 25 15 16] which is the same thing as A=[sigma(xx) sigma(xy) sigma(xz); sigma(xy) sigma(yy) sigma(yz); sigma(xz) sigma(yz) sigma(zz)]
To solve for the principal stresses, it is necessary to construct the following matrix (again in MPa). [10 - sigma 14 25 14 7 - sigma 15 25 15 16 - sigma] The principal stresses sigma1, sigma2, and sigma3 can be solved from the equation sigma3 - I sigma2 + II sigma - III = 0 where { I = sigmaxx + sigmayy + sigmazz II = sigmaxxsigmayy + sigmaxxsigmazz + sigmayysigmazz - sigma - sigma - sigma III = sigmaxxsigmayysigmazz - sigmaxxsigma - sigmayysigma - sigmazzsigma + 2sigmaxysigmaxzsigmayz I, II, and III are known as the stress invariants Write a MATLAB script that plots the function f(sigma) = sigma3 - I sigma2 + II sigma - III solves for the roots sigma1, sigma2, and sigma3 using a root finding technique (bisection, Regula-Falsi Newton, or the secant method). (Tour script should include comments explaning each and every major step).
Explanation / Answer
clear all
close all
clc
syms x
A=[10-x 14 25; 14 7-x 15; 25 15 16-x];
p=det(A);
s=char(p);
B=[-1 33 704 1859];
r=-80:0.1:100;
f=polyval(B,r);
plot(r,f);
ylabel('f','FontWeight','bold','FontSize',12);
xlabel('sigma','FontWeight','bold','FontSize',12);
x=roots(B);