function [ F11, F12, F13, U11, U12, U13, UNC, FNC, Sy, mass] = envelope( T1dej, agC, Rls, mi, sfth, S, Tb, Tc, Td )
%ENVELOPE Summary of this function goes here
%   Detailed explanation goes here

[Saec8NC Sdeec8NC] = EC8spec(T1dej, agC/(Rls*S*1.3), S, Tb, Tc, Td, 5);

if T1dej < Tc
    Sy = Saec8NC/(1+(mi-1)*T1dej/Tc);
else
    Sy = Saec8NC/mi;
end

if Sy>=1
    mass = 800;
elseif Sy>=0.8
    mass = 1000;
elseif Sy>=0.6
    mass = 1200;
elseif Sy>= 0.4
    mass = 1400;
elseif Sy>=0.2
    mass =1800;
else
    mass = 1800;
end

F11 = Sy*9.81*mass;
U11 = (T1dej/(2*pi))^2*F11/mass;
F12 = 1.01*F11;
F13 = 0.001*F12;
UNC = U11*mi;
FNC = 0.8*F12;
U12 = UNC*(F12-F13)/(F12-F13-F12*(1-sfth)+FNC*(1-sfth));
U13 = U12*sfth;

end