📄 hr_dad.m
字号:
%HR_DAD.m
%Starts High-Rise Database-Assisted Design program.
%Establishes all global variables, opens all ten pages and initializes all variables.
clear all;
clc;
close all;
global textA axesA_text textB axesB_text input_coords pos_on pos_off fig
% 1. Building Information
global Nfloors H_bldg Fdofs Ndofs RNmodes AnL_A AnL_B anal
global T T_str D D_str flnMode_shape evectors omega h
%% 2. Wind Tunnel Information
global Ntaps flnTaps flnCp Vm freq ms Npoints
% 3. Program Inputs
global flnMem flDif flnProps mem_list props WS WS_str WD WD_str
global MRI MRI_str mri IMdir_A IMdir_B intmeth mem_out
% 4. Loads and Reactions
global flnMass DL SDL LL
global flnDLr flnSDLr flnLLr frames_DL frames_SDL frames_LL
global DLf SDLf LLf WLf
% 5. Wind Effect Selection
global WLE Hmp Hfile flHfile Vth rf tstep Npointsout
global Qs
% 6. Calculations
global saveBij flnSaveBij flnSavemaxBij flnSaveMRI
% 7. Calculations MRI's
global AnL_A AnL_B IMdir_A IMdir_B Hmp Vth DLf SDLf LLf WLf
global mem_out mem_list
% 8. Save/Load Data
global fnSAVE flSAVE flnSAVE fnLOAD flLOAD flnLOAD
axesA_text = ['This software computes the maximum wind effect of interest for a high-rise '...
'building as a function of mean-recurrence interval (MRI).' char(10) char(10) 'The main '...
'menu to the left proceeds through the gathering of required information: (1) Building '...
'Information includes basic inputs, dynamic properties and loads for analysis; (2) Wind '...
'Tunnel Information includes pressure tap information and pressure coefficient time '...
'histories; (3) Program Inputs includes member/frame information, wind speed and '...
'direction values, and interpolation method for direction; (4) Loads & Reactions includes'...
'the mass matrix, the static load reactions (calculated in a seperate analysis) and '...
'load factors for dynamic model; (5) Wind Effect Selection includes the wind load effect '...
'of interest (currently only one option), the wind speed database and the points '...
'considered in the time histories (sampling rate); (6) Calculations includes the wind '...
'load effect peaks and the mean recurrence intervals of wind effects; (7) Output '...
'summarizes key inputs and an output button for graphical results; and (8) Save/'...
'Load Data provides the option to save the current input data set or load a presaved set.'];
axesB_text = ['Be sure to proceed through the whole menu or else the default values '...
'specified in the HR_DAD.m file will be used!' char(10) char(10) 'You may click on any '...
'menu item at any time to either view the respective information or change them. The '...
'purple information icons [?] provide the variable name, variable size and a '...
'description about the particular parameter(s).' char(10) char(10) 'You may return to '...
'this page at any time using the ''Main Menu'' button at the bottom without losing any '...
'changed information, or you can simply navigate through the menu in any order.'...
char(10) char(10) 'You can return to the very first page by hitting the ''Go Back'' '...
'button from this page only.'];
%%%%%%%%%%%%%%%% Page_One.fig %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Nfloors = []; % Number of stories
H_bldg = []; % Building height (m)
Fdofs = []; % No. dynamic degrees of freedom (d.o.f.) per floor
Ndofs = Nfloors*Fdofs; % Total no. of d.o.f.
RNmodes = []; % Number of eigenmodes of vibration considered
T_str = ''; % Modal period values (sec) - string
T = str2num(T_str); % Modal period values (sec) - numeric
T_all = diag(T); % Modal period matrix (diagonal)
f = inv(T_all); % Modal frequency matrix (diagonal)
omega = 2*pi*f; % Natural circular frequencies matrix (diagonal)
D_str = ''; % Modal damping ratios (%) - string
D = str2num(D_str); % Modal damping ratios (%) - numeric
D_all = D/100; % Convert percentage to decimal
h = diag(D_all); % Modal damping matrix (diagonal)
flnMode_shape = ''; % Mode Shape, contains variable 'evectors'
AnL_A = 1; % Analysis Loads A: applied & inertial (default)
AnL_B = 0; % Analysis Loads B: applied only
anal = 'A'; % Default for 'Loads for Analysis' = A
Page_One;
%%%%%%%%%%%%%%%% Page_Two.fig %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Ntaps = []; % No. of pressure taps on wind tunnel model used
flnTaps = ''; % File location\name, contains variable 'taps'
flnCp = ''; % File location, contains variable 'Cp_tr'
Vm = []; % Wind speed @ model roof (m/s, mean hourly)
freq = []; % Model scale sampling rate (Hz)
ms = []; % Model scale (ms:1)
Npoints = []; % No. of sample points per tap
Page_Two;
%%%%%%%%%%%%%% Page_Three.fig %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
flnMem = ''; % File location\name, contains variable 'mem_list'
mem = []; % Current member number in analysis, from mem_list
mem_out = []; % Member number for output, from mem_list
flDif = ''; % File location of 'dir_mem', contains variable dif
flnProps = ''; % File location\name, contains variable 'props'
WS_str = ''; % Wind speeds (m/s) - string
WS = str2num(WS_str); % Wind speeds (m/s) - numeric
WD_str = ''; % Wind directions (degrees) - string
WD = str2num(WD_str); % Wind directions (degrees) - numeric
MRI_str = ''; % Mean recurrence intervals (yr) - string
MRI = str2num(MRI_str); % Mean recurrence intervals (yr) - numeric
mri = []; % Specific MRI for output
IMdir_A = 0; % Interpolation Method A: between WS and WD
IMdir_B = 1; % Interpolation Method B: between WS, larger WD (default)
intmeth = 'B'; % Default for 'Interpolation Method' = B
Page_Three;
%%%%%%%%%%%%%%% Page_Four.fig %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
flnMass = ''; % File location\name, contains variable 'mass'
flnDLr = ''; % File location\name, contains variable 'frames_DL'
flnSDLr = ''; % File location\name, contains variable 'frames_SDL'
flnLLr = ''; % File location\name, contains variable 'frames_LL'
DLf = []; % Load factor - Dead load (DL)
SDLf = []; % Load factor - Superimposed Dead load (SDL)
LLf = []; % Load factor - Live load (LL)
WLf = []; % Load factor - Wind load (WL)
Page_Four;
%%%%%%%%%%%%%%% Page_Five.fig %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
WLE = 1; % Wind load effect of interest
Hmp = []; % Hurricane milepost corresponding to NIST database
Hfile = []; % Associated hurricane file no. for database lookup
Vth = []; % Minimum threshold of wind speeds (database lookup)
rf = []; % No. points considered in time histories
tstep = []; % Sampling steps of time histories
Qs = 1; % Calculate estimated peaks (default)
Page_Five;
%%%%%%%%%%%%%%%% Page_Six.fig %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
saveBij = 0; % Save time history for each (WS,WD) combination (default)
flnSaveBij = ''; % File location\name, for saveBij
flnSavemaxBij = ''; % File location\name, wind effect peaks per (WS,WD)
flnSaveMRI = ''; % File location\name, mean recurrence intervals
Page_Six;
%%%%%%%%%%%%%%%% Page_Seven.fig %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Page_Seven;
%%%%%%%%%%%%%%%% Page_Eight.fig %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 8. Save/Load Data
flnSAVE = ''; % File location\name, save current variables
flnLOAD = ''; % File location\name, load saved variables
Page_Eight;
%%%%%%%%%%%%%%%% Open All Pages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Open the first two pages last so they are on top
Page_Main
Page_Open
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -