Ajuste de Modelos
Ajuste de Modelos
DINÁMICA ESTRUCTURAL
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:
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
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;
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);
% 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
E=Eo
u= si
target
no
next
end
ALGORITHM
Dif(=(U1-U1_obj)
U1fin=U1(find(min(Dif)))
Slower
not necessarily most precisely
LOCAL MINIMUMS AND MAXIMUMS
fun='x^4-x^3-4*x^2+4*x-3'
x = fmincon(fun,x0,A,b)
A*x ≤ b.x0
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
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
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
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
disp(strcat(num2str(iteracion),';',num2str(f(1,1)),';',num2str(I)));
iteracion=iteracion+1;
end
f
THEORETICAL VIBRATION MODES
?
THANKS