Anda di halaman 1dari 13

UNIVERSIDAD NACIONAL DE SAN CRISTBAL DE

HUAMANGA
ESCUELA DE FORMACIN PROFESIONAL DE INGENIERA CIVIL

PROGRAMACIN DIGITAL (IC-246)


TEMA
ANLISIS ESTRUCTURAL DE VIGAS
ALUMNO: CRDENAS MENDOZA, Kevin Edgard.
CDIGO: 16110670

.1.

OBJETIVO

Presentar en formas generales algunas de las posibles aplicaciones que puede tener
MATLAB en la Ingeniera Estructural.

Motivar al estudiante al uso de MATLAB en la solucin de estructuras civiles.

.2.

APLICACIN

Este artculo de MATLAB orientado a estudiantes de ingeniera civil que hayan terminado
el ciclo de cursos bsicos en esttica y resistencia de materiales. Los temas propuestos
que conforman la base del conjunto de herramientas necesarias para analizar estructuras
civiles.
Se denomina viga aun elemento constructivo lineal que trabaja principalmente a flexin. En
las vigas, la longitud predomina sobre las otras dos dimensiones y suele ser horizontal. El
esfuerzo de flexin provoca tensiones de traccin y compresin, producindose las
mximas en el cordn inferior y en el cordn superior respectivamente, las cuales se
calculan relacionando el momento flector y el segundo momento de inercia. En las zonas
cercanas a los apoyos se producen esfuerzos cortantes o punzonamiento. Tambin pueden
producirse tensiones por torsin, sobre todo en las vigas que forman el permetro exterior
1

de un forjado. Estructuralmente el comportamiento de una viga se estudia mediante un


modelo de prisma.
A.2.1. Datos Requeridos
Los argumentos necesarios para la aplicacin de cambio de unidades, son:

Un nmero real, que representa la magnitud deseada.


Una unidad de medida, en este caso newton (N)

A.2.2. Resultados
Las anteriores aplicaciones no son las nicas existentes. la versatilidad de MATLAB
permite aplicaciones tan simples como la solucin de una sencilla ecuacin no lineal
hasta modelaciones de complejos sistemas estructurales.
Antes que querer volverse un experto en el manejo de un programa en especial,
resulta ms importante comprender los fundamentos y principios fsicos de la teora
estructural. Obtenemos:
Las reacciones de la viga.
La fuerza cortante y el momento flector

.3.

PROCEDIMIENTO

El procedimiento a seguir es:


1.
2.
3.
4.
5.

Crear la aplicacin desde el entorno de desarrollo integrado de MATLAB.


Disear la ventana principal de la aplicacin utilizando los controles necesarios.
Asignar cdigos a los eventos de los controles utilizados.
Declarar las variables a nivel de funciones y como variables globales.
Implementar la aplicacin con el uso de las instrucciones de decisin.

A.3.1. Diagrama de flujo


El diagrama de flujo est representado por la siguiente figura

.4 .

VENTANA PRINCIPAL DE LA APLICACIN

.5.

CDIGO FUENTE

function varargout = viga(varargin)


% VIGA MATLAB code for viga.fig
%
VIGA, by itself, creates a new VIGA or raises the existing
%
singleton*.
%
%
H = VIGA returns the handle to a new VIGA or the handle to
%
the existing singleton*.
%
%
VIGA('CALLBACK',hObject,eventData,handles,...) calls the local
%
function named CALLBACK in VIGA.text_m with the given input
arguments.
%
%
VIGA('Property','Value',...) creates a new VIGA or raises the
%
existing singleton*. Starting from the left, property value pairs
are
%
applied to the GUI before viga_OpeningFcn gets called. An
%
unrecognized property name or invalid value makes property
application
%
stop. All inputs are passed to viga_OpeningFcn via varargin.
%
%
*See GUI Options on GUIDE's Tools menu. Choose "GUI allows only
one
%
instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help viga
% Last Modified by GUIDE v2.5 20-May-2013 00:36:00
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',
mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @viga_OpeningFcn, ...
'gui_OutputFcn', @viga_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback',
[]);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% --- Executes just before viga is made visible.

function viga_OpeningFcn(hObject, eventdata, handles, varargin)


%Centrar la GUI
movegui(hObject,'center')
z=imread('esquema.jpg');
image(z)
axis off
% This function has no output args, see OutputFcn.
% hObject
handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% varargin
command line arguments to viga (see VARARGIN)
% Choose default command line output for viga
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes viga wait for user response (see UIRESUME)
% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
function varargout = viga_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject
handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;

function ra_Callback(hObject, eventdata, handles)


% hObject
handle to ra (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of ra as text
%
str2double(get(hObject,'String')) returns contents of ra as a
double

% --- Executes during object creation, after setting all properties.


function ra_CreateFcn(hObject, eventdata, handles)
% hObject
handle to ra (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called
% Hint: edit controls usually have a white background on Windows.
%
See ISPC and COMPUTER.

if ispc && isequal(get(hObject,'BackgroundColor'),


get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function rb_Callback(hObject, eventdata, handles)


% hObject
handle to rb (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of rb as text
%
str2double(get(hObject,'String')) returns contents of rb as a
double

% --- Executes during object creation, after setting all properties.


function rb_CreateFcn(hObject, eventdata, handles)
% hObject
handle to rb (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called
% Hint: edit controls usually have a white background on Windows.
%
See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function l_Callback(hObject, eventdata, handles)


% hObject
handle to l (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of l as text
%
str2double(get(hObject,'String')) returns contents of l as a
double

% --- Executes during object creation, after setting all properties.


function l_CreateFcn(hObject, eventdata, handles)
% hObject
handle to l (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called
% Hint: edit controls usually have a white background on Windows.
%
See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');

end

function ma_Callback(hObject, eventdata, handles)


% hObject
handle to ma (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of ma as text
%
str2double(get(hObject,'String')) returns contents of ma as a
double

% --- Executes during object creation, after setting all properties.


function ma_CreateFcn(hObject, eventdata, handles)
% hObject
handle to ma (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called
% Hint: edit controls usually have a white background on Windows.
%
See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function mb_Callback(hObject, eventdata, handles)


% hObject
handle to mb (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of mb as text
%
str2double(get(hObject,'String')) returns contents of mb as a
double

% --- Executes during object creation, after setting all properties.


function mb_CreateFcn(hObject, eventdata, handles)
% hObject
handle to mb (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called
% Hint: edit controls usually have a white background on Windows.
%
See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function w_Callback(hObject, eventdata, handles)


% hObject
handle to w (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of w as text
%
str2double(get(hObject,'String')) returns contents of w as a
double

% --- Executes during object creation, after setting all properties.


function w_CreateFcn(hObject, eventdata, handles)
% hObject
handle to w (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called
% Hint: edit controls usually have a white background on Windows.
%
See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function a_Callback(hObject, eventdata, handles)


% hObject
handle to a (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of a as text
%
str2double(get(hObject,'String')) returns contents of a as a
double

% --- Executes during object creation, after setting all properties.


function a_CreateFcn(hObject, eventdata, handles)
% hObject
handle to a (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called
% Hint: edit controls usually have a white background on Windows.
%
See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function b_Callback(hObject, eventdata, handles)


% hObject
handle to b (see GCBO)

% eventdata
% handles

reserved - to be defined in a future version of MATLAB


structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of b as text


%
str2double(get(hObject,'String')) returns contents of b as a
double

% --- Executes during object creation, after setting all properties.


function b_CreateFcn(hObject, eventdata, handles)
% hObject
handle to b (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called
% Hint: edit controls usually have a white background on Windows.
%
See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function dL_Callback(hObject, eventdata, handles)


% hObject
handle to dL (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of dL as text
%
str2double(get(hObject,'String')) returns contents of dL as a
double

% --- Executes during object creation, after setting all properties.


function dL_CreateFcn(hObject, eventdata, handles)
% hObject
handle to dL (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called
% Hint: edit controls usually have a white background on Windows.
%
See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

% --- Executes on button press in calcular.


function calcular_Callback(hObject, eventdata, handles)
%Datos de los edit-text
L
=str2double(get(handles.l,'String'));
Ma=str2double(get(handles.ma,'String'));
Mb=str2double(get(handles.mb,'String'));

10

w =str2double(get(handles.w,'String'));
a
=str2double(get(handles.a,'String'));
b =str2double(get(handles.b,'String'));
dL =str2double(get(handles.dL,'String'));
%verificacin de las celdas de entrada
if isempty(L)|isnan(L)
msgbox('El parmetro est vaco o no es un valor numrico')
return
end
if isempty(Ma)|isnan(Ma)
msgbox('El parmetro est vaco o no es un valor numrico')
return
end
if isempty(Mb)|isnan(Mb)
msgbox('El parmetro est vaco o no es un valor numrico')
return
end
if isempty(w)|isnan(w)
msgbox('el parmetro est vaco o no es un valor numrico')
return
end
if isempty(a)|isnan(a)
msgbox('El parmetro est vaco o no es un valor numrico')
return
end
if isempty(L)|isnan(L)
msgbox('el parmetro est vaco o no es un valor numrico')
return
end
if isempty(b)|isnan(b)
msgbox('El parmetro est vaco o no es un valor numrico')
return
end
if isempty(dL)|isnan(dL)
msgbox('El parmetro est vaco o no es un valor numrico')
return
end
% Clculo de Ra y Rb
Rb=(1/L)*(Ma-Mb+0.5*w*(b^2-a^2));
Ra=w*(b-a)-Rb;
set(handles.ra,'String',[num2str(Ra),'N'])
set(handles.rb,'String',[num2str(Rb),'N'])
% Ejecucin del algoritmo
n=L/dL;
X=[ ];
for i=0:n

11

x=dL*i;
X=[X x];
if x>=a
stpa=1;
else
stpa=0;
end
if x>=b
stpb=1;
else
stpb=0;
end
V(i+1)=Ra-w*(x-a)*stpa + w*(x-b)*stpb;
M(i+1)=Ma+(Ra*x)-(0.5*w*(x-a)^2*stpa)+(0.5*w*(x-b)^2*stpb);

end
% Salida de resultados
set(handles.V,'String',V(i+1));
set(handles.M,'String',M(i+1));

% hObject
% eventdata
% handles

handle to calcular (see GCBO)


reserved - to be defined in a future version of MATLAB
structure with handles and user data (see GUIDATA)

function M_Callback(hObject, eventdata, handles)


% hObject
handle to text_m (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of text_m as text
%
str2double(get(hObject,'String')) returns contents of text_m as
a double

% --- Executes during object creation, after setting all properties.


function text_m_CreateFcn(hObject, eventdata, handles)
% hObject
handle to text_m (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called
% Hint: edit controls usually have a white background on Windows.
%
See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

function V_Callback(hObject, eventdata, handles)


% hObject
handle to tex_v (see GCBO)

12

% eventdata
% handles

reserved - to be defined in a future version of MATLAB


structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of tex_v as text


%
str2double(get(hObject,'String')) returns contents of tex_v as a
double

% --- Executes during object creation, after setting all properties.


function tex_v_CreateFcn(hObject, eventdata, handles)
% hObject
handle to tex_v (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles
empty - handles not created until after all CreateFcns
called
% Hint: edit controls usually have a white background on Windows.
%
See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'),
get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

.6.

BIBLIOGRAFA

http://es.scribd.com/doc/114353300/Matlab-en-El-Analisis-Estructural
http://www.fundibeq.org/opencms/export/sites/default/PWF/downloads/ga
llery/methodology/tools/diagrama_de_flujo.pdf
http://blogs.technet.com/b/msvisio2010/archive/2010/11/22/plantillasde-diagrama-de-flujo-en-visio-2010.aspx
http://mis-algoritmos.com/aprenda-a-crear-diagramas-de-flujo

13

Anda mungkin juga menyukai