Implement NEHRP 2020 Factory
Matlab code for computing sms, sm1
function [ SMs, SM1, SaM, SaDM ] = SMsSM1_Calculator_Ver190319( DetLL, SaMD, SaMP, T, Vs30 )
% Written by Sanaz Rezaeian 3/19/2019
%%% Input:
% DetLL: Deterministic Lower Limit (Det Floor)
% a vector of size 22 (i.e., 22periods) for a given site class
% SaMD: Maximum Direction Deterministic Ground Motion (without DetLL floor)
% a vector of size 22 (i.e., 22periods) for a given site class
% SaMP: Maximum Direction x Risk Targeted Ground Motion (Probabilistic GM)
% a vector of size 22 (i.e., 22periods) for a given site class
% T: a vector of the 22 periods (sec)
% T = [0 0.01 0.02 0.03 0.05 0.075 0.1 0.15 0.2 0.25 0.3 0.4 0.5 0.75 1 1.5 2 3 4 5 7.5 10];
% Vs30: Vs30 of the site class (m/s)
% {'A','AB','B','BC','C','CD','D','DE','E'} = [2000 1500 1080 760 530 365 260 185 150] m/s
%%% Output:
% SMs: Short period ground motion
% a scalar for the given site class
% in previous design codes: SMs=(Fa)x(Ss)=(Fa)x(min[(S_SUH x C_RS),S_SD])
% SM1: Long period ground motion
% a scalar for the given site class
% in previous design codes: SM1=(Fv)x(S1)=(Fv)x(min[(S_1UH x C_1S),S_1D])
% SaM: MultiPeriod Response Spectrum
% a vector of size 22 for the given site class
% SaDM: Design Response Spectrum (2/3 x SaM)
% a vector of size 22 for the given site class
%----------------------------------------------------------------------
% Calculate SaM: Cap ProbSpectrum w/ floored DetSpectrum (at every T)
flooredSaMD = max(DetLL,SaMD);
SaM = min(SaMP,flooredSaMD);
% Calculate SMs:
a = find(T==0.2);
b = find(T==5);
SMs = 0.9*(max(SaM(a:b)));
% Calculate SM1:
if Vs30>365.76 %m/s
a = find(T==1);
b = find(T==2);
SM1 = max(T(a:b).*SaM(a:b));
else
a = find(T==1);
b = find(T==5);
SM1 = max(T(a:b).*SaM(a:b));
end
% Calculate SaDM:
SaDM = 2/3 * SaM;
Edited by Martinez, Eric M.