function [ MaxStress ] = Modified_Mohr( S1, S2, S3, Sut, Suc )
%
%  This function computes the maximum stress on a brittle material using
%  techniques developed by N. E. Dowling.  These equations simplify the
%  computational process when used with computers.
%
%  Arguments
%     S1              the first principal stress
%     S2              the second principal stress
%     S3              the third principal stress
%     Sut             the ultimate tensile stress
%     Suc             the ultimate compressive stress
%

Fac = (2*Sut - abs(Suc))/(-abs(Suc));

C(1) = 0.5*(abs(S1 - S2) + Fac * (S1 + S2));
C(2) = 0.5*(abs(S2 - S3) + Fac * (S2 + S3));
C(3) = 0.5*(abs(S3 - S1) + Fac * (S3 + S1));

C(4) = S1;
C(5) = S2;
C(6) = S3;

MaxStress = max(C);

if (MaxStress < 0) MaxStress = 0;

end

