I am doing API matlab-etabs and i want to know how can i get the displacements in a point for all de modal cases
22 次查看(过去 30 天)
显示 更早的评论
I am working in some API interaction with matlab and ETABS and i want to extract a modal matrix, and i have two problems. First, i have been using the function ModeShape for extracting the modal displacements of my interest points, but aparently i can only have the displacement for the first modal form and no for every modal form that etabs can show.
Here i put the part of the code where i extract the modal displacements for one point (i have to do it for multiple)
AnalysisResultsSetup.DeselectAllCasesAndCombosForOutput;
AnalysisResultsSetup.SetCaseSelectedForOutput('Modal');
formas = zeros(9,3);
PointName= 'C1-4';
ObjectElem = ETABSv1.eItemTypeElm.ObjectElm;
Obj = {''};
Elm = {''};
StepType = {''};
LoadCase = {''};
StepNum = 0;
NumberResults = 0;
U1 = 0;
U2 = 0;
U3 = 0;
R1 = 0;
R2 = 0;
R3 = 0;
[~,~,NumberResults,~,~,~,~,U1,U2,U3,~,~,~] = Results.ModeShape(PointName, ObjectElem, NumberResults,...
Obj, Elm, LoadCase, StepType,StepNum, U1, U2, U3, R1, R2, R3);
0 个评论
回答(1 个)
Dolon Mandal
2023-9-12
To extract the modal displacements for all modal forms, you need to iterate through each mode and retrieve the displacements individually. Here's an example of how you can modify your code to extract the modal displacements for all modes.
AnalysisResultsSetup.DeselectAllCasesAndCombosForOutput;
AnalysisResultsSetup.SetCaseSelectedForOutput('Modal');
PointName = 'C1-4';
ObjectElem = ETABSv1.eItemTypeElm.ObjectElm;
Obj = {''};
Elm = {''};
StepType = {''};
LoadCase = {''};
StepNum = 0;
NumberResults = 0;
U1 = 0;
U2 = 0;
U3 = 0;
R1 = 0;
R2 = 0;
R3 = 0;
% Get the number of modes
numModes = Results.ModeCount;
% Initialize the modal displacements matrix
modalDisplacements = zeros(9, 3, numModes);
% Iterate through each mode
for modeIndex = 1:numModes
[~, ~, NumberResults, ~, ~, ~, ~, U1, U2, U3, ~, ~, ~] = Results.ModeShape(PointName, ObjectElem, NumberResults, ...
Obj, Elm, LoadCase, StepType, StepNum, U1, U2, U3, R1, R2, R3);
% Store the modal displacements for the current mode
modalDisplacements(:, :, modeIndex) = [U1, U2, U3];
end
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!