Data Input

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

27/05/19 16.53 C:\Users\user\Desktop\...\data_input.

m 1 of 3

function[...
... % solution parameters
sol_param, ...
... % data relative to nodes and nodal loads
n_n, coor_n, load_n, ...
... % data relative to nodal constraints
cons, ...
... % data relative to element materials
tab_mat, ...
... % data relative to element and element loads
element, n_el, conn, mat, load, ...
... % postprocessing parameters
postpro_param] = data_input()

% measure unit: N, m

% GENERAL ANALYSIS DATA

% job
job = 'plane_linear_elastic_frame';

switch job

case 'plane_linear_elastic_frame'

% collect into solution parameters


sol_param.job = job;

% DATA RELATIVE TO NODES

% number of nodes
n_n = 6;
% nodal coordinates
coor_n = [0,0; 0,3.5; 3.5,7; 8.5,7; 8.5,3.5; 13.5,7]';
% connectivity matrix
conn = [1,2; 2,3; 3,4; 4,5; 4,6]';

% nodal constraints
cons = [ ...
1, 0, 0, 0, 1, 1; ...
1, 0, 0, 0, 0, 1; ...
1, 0, 0, 0, 1, 0; ...
];

% nodal load (in global reference)


load_n = zeros(3,n_n);
% orizontal force at node 1
F = 14; % [kN]
load_n(1,2) = F;
% couple at node 2
27/05/19 16.53 C:\Users\user\Desktop\...\data_input.m 2 of 3

m = 0; % [kN*m]
load_n(3,1) = m;

% DATA RELATIVE TO ELEMENT TYPE

% routine handling beam elements


element = 'lin_el_beam';

% DATA RELATIVE TO ELEMENT MATERIAL

% number of element materials


n_mat = 1;
% Young modulus
E = 3e7; % [kPa]
% cross section area
A = 0.4*0.4; % [m^2]
% cross section inertia momentum
I = 0.3^4/12; % [m^4]
% material
mat_1 = [E; A; I];
% all elements of same material
tab_mat = repmat(mat_1, n_mat, 1);

% DATA RELATIVE TO ELEMENTS

% number of elements
n_el = 5;

% material type of each element


mat = ones(1,n_el);

% uniformly distributed loads (in local reference)


load = zeros(2,n_el);
% transverse uniform load at element 1
q = -9; % [kN/m]
load(2,3) = q;

% POST-PROCESSING PARAMETERS

% save useful model parameters for postprocessing


% maximum distance of sampling points over element axis
d_max_sampling = 0.1;
% scales
displ_scale = 0.5 * 1e3; % displacement scale
axial_scale = 0.5 * 1e-1; % axial force scale
moment_scale = 1 * 1e-1; % momentum scale
shear_scale = 2.5 * 1e-1; % shear force scale
%collect into postpro_param struct
postpro_param.d_max_sampling = d_max_sampling;
27/05/19 16.53 C:\Users\user\Desktop\...\data_input.m 3 of 3

postpro_param.displ_scale = displ_scale;
postpro_param.axial_scale = axial_scale;
postpro_param.moment_scale = moment_scale;
postpro_param.shear_scale = shear_scale;

end

You might also like