0% found this document useful (0 votes)
43 views30 pages

Ajuste de Modelos

Uploaded by

DCRAING2016
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views30 pages

Ajuste de Modelos

Uploaded by

DCRAING2016
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

SETTINGS OF MODELS

DINÁMICA ESTRUCTURAL

Michel Bolaños Guerrero, Mag.


Estudiante de Doctorado en Ingeniería

Grupo de Investigación en Ingenierías Sísmica, Eólica,


Geotécnica y Estructural (G-7)
eicg.univalle.edu.co/G-7
Universidad del Valle
THEORY, LIMITS AND PRECISION

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab
THEORY, LIMITS AND PRECISION

Ec vs (u1=2.4mm)
• Theory and more
• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab
OAPI IN SAP2000
Documentation about OAPI of SAP2000:

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab

[ret, NumberResults, Obj, Elm, ACase, StepType, StepNum,...


U1, U2, U3, R1, R2,R3] = ...
Results.JointDispl(nud, ...
GroupElm,...
NumberResults,...
Obj,...
Elm,...
LoadCase,...
StepType,...
StepNum,...
U1, U2, U3, R1, R2, R3);
OAPI IN SAP2000

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab
OAPI IN SAP2000

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab
OAPI IN SAP2000

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab
OAPI IN SAP2000

• Theory and more %% object SAP


• Oapi
pathDir='C:\Program Files\Computers and Structures\SAP2000 19\';
• Ej 1 Sap
ProgramSap=strcat(pathDir,'SAP2000.exe');
• Ej. 2 Sap APIDLL=strcat(pathDir,'SAP2000v19.dll');
• Algorithm
• Local minimus a = NET.addAssembly(APIDLL); % Microsoft® .NET Framework
• Matlab helper = SAP2000v19.Helper;
helper = NET.explicitCast(helper,'SAP2000v19.cHelper');
• Ej. Matlab
%creating an instance of the Sap2000 object
SapObject = helper.CreateObject(ProgramSap);
SapObject = NET.explicitCast(SapObject,'SAP2000v19.cOAPI');
helper = 0;

SapModel = NET.explicitCast(SapObject.SapModel,'SAP2000v19.cSapModel');
File = NET.explicitCast(SapModel.File,'SAP2000v19.cFile');
PropFrame = NET.explicitCast(SapModel.PropFrame,'SAP2000v19.cPropFrame');
PropMaterial = NET.explicitCast(SapModel.PropMaterial,'SAP2000v19.cPropMaterial');
Analyze = NET.explicitCast(SapModel.Analyze,'SAP2000v19.cAnalyze');
Results = NET.explicitCast(SapModel.Results,'SAP2000v19.cAnalysisResults');
ResultsSetup = NET.explicitCast(Results.Setup,'SAP2000v19.cAnalysisResultsSetup');
OAPI IN SAP2000

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap %% start of aplication
SapObject.ApplicationStart;
• Algorithm
ret = SapModel.InitializeNewModel;
• Local minimus
• Matlab %% opening data file
• Ej. Matlab
% Example of task 6
pathModel='D:\Google Drive\DOCTORADO\Asignaturas\2\Dinámica
Estructural\Ajuste de modelos\Modelo SAP2000\';
ModelName=strcat(pathModel,'Tarea6.sdb');

ret = File.OpenFile(ModelName);
ret = SapModel.SetPresentUnits(SAP2000v19.eUnits.Ton_mm_C); % Unidades
OAPI IN SAP2000
%% Ciclo en Sap2000

Ec = 9.5; %Tnf/mm2
U1_obj=2.4; %measured in laboratory 2.4mm. It's the target in task 6
Dif=+inf;
maxSteps=50;
Dif_obj=U1_obj*.01; %1% of objetive-value
• Theory and more step=1;
• Oapi
mod=Ec;
• Ej 1 Sap while Dif>Dif_obj && step<=maxSteps
• Ej. 2 Sap % Desbloquea el modelo
ret = SapModel.SetModelIsLocked(false);
• Algorithm ret=PropMaterial.SetMPIsotropic('E=21e3 Kgf/mm2', mod, 0.3, 9.900E-06);
• Local minimus
% Corre modelo
• Matlab
ret=Analyze.RunAnalysis;
• Ej. Matlab % Selecciona el CASE del cual desea obtener los datos
ret = ResultsSetup.DeselectAllCasesAndCombosForOutput;
ret = ResultsSetup.SetCaseSelectedForOutput('F-rigidez');
nud='248';
NumberResults = 0;
GroupElm=SAP2000v19.eItemTypeElm.ObjectElm;
Obj = {''};
Elm = {''};
LoadCase = {''};
StepType = {''};
StepNum = 0;
U1 = 0; U2 = 0; U3 = 0; R1 = 0; R2 = 0; R3 = 0;

[ret, NumberResults, Obj, Elm, ACase, StepType, StepNum,...


U1, U2, U3, R1, R2,R3] = ...
Results.JointDispl(nud, GroupElm, NumberResults, Obj, Elm, LoadCase, StepType, StepNum,...
U1, U2, U3, R1, R2, R3);
Dif=U1(1)-U1_obj;
if abs(Dif)>Dif_obj
mod=mod+mod*.5*Dif/U1_obj;
end
disp(strcat('step ',num2str(step),' u1=',num2str(U1(1)),' dif=',num2str(Dif)))
step=step+1;
end
OAPI IN SAP2000

step:1 E=15.3444 u1=5.353 dif=2.953


step:2 E=18.2666 u1=3.3141 dif=0.91412
step:3 E=19.7277 u1=2.7839 dif=0.38394
• Theory and more
• Oapi
step:4 E=20.4583 u1=2.5778 dif=0.17775
• Ej 1 Sap step:5 E=20.8236 u1=2.4857 dif=0.085702
• Ej. 2 Sap step:6 E=21.0062 u1=2.4421 dif=0.0421
• Algorithm
• Local minimus
step:7 E=21.0975 u1=2.4209 dif=0.020867
• Matlab step:8 E=21.0975 u1=2.4104 dif=0.010388
• Ej. Matlab
Ec (Tonf/mm2) = 21.0975

%% Best way to close SAP2000


%set the objects to Nothing
%at the end of your program ALWAYS terminate
the objects in this manner
ret = SapObject.ApplicationExit(false());
SapModel = 0;
SapObject = 0;
VIBRATION MODES WITH SAP2000

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab
VIBRATION MODES WITH SAP2000

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab
VIBRATION MODES WITH SAP2000

RoW=0;RoM=0;
[ret,RoW,RoM]=PropMaterial.GetWeightAndMass('E=21e3 Kgf/mm2',RoW,RoM);
%frecuency 3
f1_obj=14.5; %measured in laboratory Hz. It's the target in task 6
• Theory and more
• Oapi Dif=+inf;
• Ej 1 Sap maxSteps=50;
• Ej. 2 Sap Dif_obj=max(f1_obj)*.01/100; %0.1% of objetive-value
• Algorithm step=1;
• Local minimus
• Matlab mod=RoW;
• Ej. Matlab while Dif>Dif_obj && step<=maxSteps
% Desbloquea el modelo
ret = SapModel.SetModelIsLocked(false);

ret=PropMaterial.SetWeightAndMass('E=21e3 Kgf/mm2',... %name


1,... %option weight (2=mass)
mod); %value of weight

% Corre modelo
ret=Analyze.RunAnalysis;
% Selecciona el CASE del cual desea obtener los datos
ret = ResultsSetup.DeselectAllCasesAndCombosForOutput;
VIBRATION MODES WITH SAP2000

ret = ResultsSetup.SetCaseSelectedForOutput('MODAL');
• Theory and more
NumberResults = 0;
• Oapi
GroupElm=SAP2000v19.eItemTypeElm.ObjectElm;
• Ej 1 Sap Obj = {''}; Elm = {''}; LoadCase = {''}; StepType = {''}; StepNum = 0;
• Ej. 2 Sap Period=0; Frequency=0; CircFreq=0; EigenValue=0;
• Algorithm
• Local minimus [ret, NumberResults,LoadCase,StepType,StepNum,...
• Matlab Period,Frequency,CircFreq,EigenValue] = ...
• Ej. Matlab Results.ModalPeriod(NumberResults, LoadCase, StepType, StepNum,...
Period, Frequency, CircFreq, EigenValue);
F=[Frequency(1) Frequency(2) Frequency(3)];
Dif=max(F(3)-f1_obj);
disp(strcat('step:',num2str(step),' W=',num2str(mod),' F=',num2str(F),...
' dif=',num2str(Dif)))
if abs(Dif)>Dif_obj
mod=mod+mod*.5*Dif/max(f1_obj);
end
step=step+1;
end
VIBRATION MODES WITH SAP2000

• Theory and more


• Oapi
• Ej 1 Sap step:1 W=7 F=4.2327 11.6297 16.2975 dif=1.7975
• Ej. 2 Sap step:2 W=7.4339 F=4.12829 11.3489 15.9218 dif=1.4218
• Algorithm step:3 W=7.7983 F=4.04631 11.1283 15.6257 dif=1.1257
• Local minimus
step:4 W=8.101 F=3.9818 10.9545 15.3921 dif=0.89208
• Matlab
step:5 W=8.3502 F=3.93095 10.8175 15.2075 dif=0.7075
• Ej. Matlab

step:30 W=9.3923 F=3.73758 10.2958 14.5023 dif=0.0023211


step:31 W=9.3931 F=3.73745 10.2955 14.5018 dif=0.0018475
step:32 W=9.3937 F=3.73735 10.2952 14.5015 dif=0.0014706
step:33 W=9.3942 F=3.73727 10.295 14.5012 dif=0.0011705
ALGORITHM

E=Eo

• Theory and more


• Oapi Loop over E
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus


Matlab
Ej. Matlab
u=f(E)

u= si
target

no
next

end
ALGORITHM

Most simple loop:


• Theory and more
• Oapi
• Ej 1 Sap Loop over E
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab E=Eo:(Ef-Eo)/steps:Ef
• Ej. Matlab

Dif(=(U1-U1_obj)

U1fin=U1(find(min(Dif)))

Slower
not necessarily most precisely
LOCAL MINIMUMS AND MAXIMUMS

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab
MATLAB

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab

fun='x^4-x^3-4*x^2+4*x-3'
x = fmincon(fun,x0,A,b)
A*x ≤ b.x0
MATLAB

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab

fun='x^4-x^3-4*x^2+4*x-3'
X0=-10;A=1; b=1/20; %A*x≤b.x0
x = fmincon(fun,x0,A,b)
x = -1.3263
MATLAB

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab

fun='x^4-x^3-4*x^2+4*x-3'
X0=0.8;A=-1; b=1; %A*x≤b.x0
x = fmincon(fun,x0,A,b)
x = 1.6073
MATLAB

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab

fun='x^4-x^3-4*x^2+4*x-3'
x = fminmax(fun,x0,A,b,Aeq,beq,lb,ub)
A=[]; b=[]; Aeq=[]; beq=[];
lb=1; ub=2;
x = 1.6073
MATLAB

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab

fun='x^4-x^3-4*x^2+4*x-3‘
nfun=['-(',fun,')'];
x = fminmax(nfun,x0,A,b,Aeq,beq,lb,ub)
A=[]; b=[]; Aeq=[]; beq=[];
lb=-0.5; ub=1.5;
x = 0.4691
MORE FUNCTIONS OF MATLAB

• Theory and more





Oapi
Ej 1 Sap
Ej. 2 Sap
• fgoalattain • linprog


Algorithm
Local minimus • fmincon • lsqcurvefit
• Matlab
• Ej. Matlab
• fminimax • lsqlin
• fminunc • lsqnonlin
• fseminf • particleswarm
• fsolve • quadprog
• intlinprog
THEORETICAL VIBRATION MODES

%ajuste de la inercia para acercarse a la 1a frecuencia de 3.5 Hz


dif_obj=0.00001*3.5;
• Theory and more
dif=+inf;
• Oapi I=I_ini;
• Ej 1 Sap iteracion=1;
• Ej. 2 Sap while ((dif>dif_obj) && (iteracion<200))
• Algorithm K=(E*I/h^3)*[24 -12 0;
• Local minimus -12 24 -12;
• Matlab 0 -12 12];
• Ej. Matlab Kmed=mean(abs(K(find(reshape(K,size(K,1)*size(K,2),1)~=0))));
[phi,wn2]=eig(K,M); % Vectores y valores propios
f=wn/(2*pi); % Frecuencias (Hertz)
dif=3.5-f(1,1);
if abs(dif)>abs(dif_obj)
I=I+.1*dif*I;
end

disp(strcat(num2str(iteracion),';',num2str(f(1,1)),';',num2str(I)));
iteracion=iteracion+1;
end
f
THEORETICAL VIBRATION MODES

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab
THEORETICAL VIBRATION MODES

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab
MINIMUM SECTIONS

• Theory and more


• Oapi
• Ej 1 Sap
• Ej. 2 Sap
• Algorithm
• Local minimus
• Matlab
• Ej. Matlab

?
THANKS

Michel Bolaños Guerrero, Mag.


Estudiante Doctorado en Ingeniería
http://Michel.Udenar.edu.co
[email protected]

Grupo de Investigación en Ingenierías Sísmica, Eólica,


Geotécnica y Estructural (G-7)
eicg.univalle.edu.co/G-7
Universidad del Valle

You might also like