pytabs.analysis_results

  1# pyTABS - ETABS .NET API python wrapper
  2# AnalysisResults - cAnalysisResults interface
  3__all__ = ['AnalysisResults']
  4
  5# import ETABS namespace and pyTABS error handler
  6from pytabs.etabs_config import *
  7from pytabs.error_handle import *
  8
  9
 10# import custom enumerations
 11from pytabs.enumerations import (eResultsSetupStepOutOption, eResultsSetupComboOutOption)
 12
 13
 14# import typing
 15from typing import TypedDict
 16
 17
 18class BaseReact(TypedDict):
 19    """TypedDict class for base_react return"""
 20    number_results : int
 21    load_case : list[str]
 22    step_type : list[str]
 23    step_number : list[float]
 24    force_x : list[float]
 25    force_y : list[float]
 26    force_z : list[float]
 27    moment_x : list[float]
 28    moment_y : list[float]
 29    moment_z : list[float]
 30    x_coordinate : list[float]
 31    y_coordinate : list[float]
 32    z_coordinate : list[float]
 33
 34
 35class BaseReactWithCentroid(TypedDict):
 36    """TypedDict class for base_react_with_centroid return"""
 37    number_results : int
 38    load_case : list[str]
 39    step_type : list[str]
 40    step_number : list[float]
 41    force_x : list[float]
 42    force_y : list[float]
 43    force_z : list[float]
 44    moment_x : list[float]
 45    moment_y : list[float]
 46    moment_z : list[float]
 47    x_coordinate : list[float]
 48    y_coordinate : list[float]
 49    z_coordinate : list[float]
 50    x_centroid_for_force_x : list[float]
 51    y_centroid_for_force_x : list[float]
 52    z_centroid_for_force_x : list[float]
 53    x_centroid_for_force_y : list[float]
 54    y_centroid_for_force_y : list[float]
 55    z_centroid_for_force_y : list[float]
 56    x_centroid_for_force_z : list[float]
 57    y_centroid_for_force_z : list[float]
 58    z_centroid_for_force_z : list[float]
 59
 60
 61class BucklingFactor(TypedDict):
 62    """TypedDict class for buckling_factor return"""
 63    number_results : int
 64    load_case : list[str]
 65    step_type : list[str]
 66    step_number : list[float]
 67    factor : list[float]
 68
 69
 70class JointDisplacement(TypedDict):
 71    """TypedDict class for joint_displacement return"""
 72    number_results : int
 73    object_name : list[str]
 74    element_name : list[str]
 75    load_case : list[str]
 76    step_type : list[str]
 77    step_number : list[float]
 78    delta_1 : list[float]
 79    delta_2 : list[float]
 80    delta_3 : list[float]
 81    rotation_1 : list[float]
 82    rotation_2 : list[float]
 83    rotation_3 : list[float]
 84
 85
 86class ModalLoadParticipationRatios(TypedDict):
 87    """Typed class for modal_load_participation_ratios"""
 88    number_results : int
 89    load_case : list[str]
 90    item_type : list[str]
 91    item : list[str]
 92    static_ratios : list[float]
 93    dynamic_ratios : list[float]
 94
 95
 96class ModalParticipatingMassRatios(TypedDict):
 97    """TypedDict class for modal_participating_mass_ratios"""
 98    number_results : int
 99    load_case : list[str]
100    step_type : list[str]
101    step_number : list[float]
102    period : list[float]
103    delta_x : list[float]
104    delta_y : list[float]
105    delta_z : list[float]
106    sum_delta_x : list[float]
107    sum_delta_y : list[float]
108    sum_delta_z : list[float]
109    rotation_x : list[float]
110    rotation_y : list[float]
111    rotation_z : list[float]
112    sum_rotation_x : list[float]
113    sum_rotation_y : list[float]
114    sum_rotation_z : list[float]
115
116
117class ModalParticipationFactors(TypedDict):
118    """TypedDict class for modal_participation_factors"""
119    number_results : int
120    load_case : list[str]
121    step_type : list[str]
122    step_number : list[float]
123    period : list[float]
124    delta_x : list[float]
125    delta_y : list[float]
126    delta_z : list[float]
127    rotation_x : list[float]
128    rotation_y : list[float]
129    rotation_z : list[float]
130    modal_mass : list[float]
131    modal_stiff : list[float]
132
133
134class ModalPeriod(TypedDict):
135    """TypedDict class for modal_period return"""
136    number_results : int
137    load_case : list[str]
138    step_type : list[str]
139    step_number : list[int]
140    period : list[float]
141    frequency : list[float]
142    circular_frequency : list[float]
143    eigen_value : list[float]
144
145
146class PierForce(TypedDict):
147    """TypedDict class for pir_force return"""
148    number_results : int
149    story_name : list[str]
150    pier_name : list[str]
151    load_case : list[str]
152    location : list[str]
153    axial : list[float]
154    shear_2 : list[float]
155    shear_3 : list[float]
156    torsion : list[float]
157    moment_2 : list[float]
158    moment_3 : list[float]
159
160
161class SectionCutAnalysis(TypedDict):
162    """TypedDict class for section_cut_analysis return"""
163    number_results : int
164    section_cut : list[str]
165    load_case : list[str]
166    step_type : list[str]
167    step_number : list[float]
168    force_1 : list[float]
169    force_2 : list[float]
170    force_3 : list[float]
171    moment_1 : list[float]
172    moment_2 : list[float]
173    moment_3 : list[float]
174
175
176class SectionCutDesign(TypedDict):
177    """TypedDict class for section_cut_design return"""
178    number_results : int
179    section_cut : list[str]
180    load_case : list[str]
181    step_type : list[str]
182    step_number : list[float]
183    axial : list[float]
184    shear_2 : list[float]
185    shear_3 : list[float]
186    torsion : list[float]
187    moment_2 : list[float]
188    moment_3 : list[float]
189
190
191class SpandrelForce(TypedDict):
192    """TypedDict class for spandrel_force return"""
193    number_results : int
194    story_name : list[str]
195    spandrel_name : list[str]
196    load_case : list[str]
197    location : list[str]
198    axial : list[float]
199    shear_2 : list[float]
200    shear_3 : list[float]
201    torsion : list[float]
202    moment_2 : list[float]
203    moment_3 : list[float]
204
205
206class StoryDrift(TypedDict):
207    """TypedDict class for story_drift return"""
208    number_results : int
209    story : list[str]
210    load_case : list[str]
211    step_type : list[str]
212    step_number : list[float]
213    direction : list[str]
214    drift : list[float]
215    label : list[str]
216    delta_x : list[float]
217    delta_y : list[float]
218    delta_z : list[float]
219
220
221class AnalysisResults:
222    """AnalysisResults interface"""
223    def __init__(self, sap_model : etabs.cSapModel) -> None:
224        # link of SapModel interface
225        self.sap_model = sap_model
226        # create AnalysisResultsSetup interface
227        self.analysis_results_setup = etabs.cAnalysisResultsSetup(sap_model.Results.Setup)
228        # create AnalysisResults interface
229        self.analysis_results = etabs.cAnalysisResults(sap_model.Results)
230        
231        # relate custom enumerations
232        self.eResultsSetupStepOutOption = eResultsSetupStepOutOption
233        self.eResultsSetupComboOutOption =  eResultsSetupComboOutOption
234
235
236    # Analysis Results Methods
237    # TODO: AreaForceShell
238    # TODO: AreaJointForceShell
239    # TODO: AreaStrainShell
240    # TODO: AreaStrainShellLayered
241    # TODO: AreaStressShell
242    # TODO: AreaStressShellLayered,
243    # TODO: AssembledJoinMass
244    
245    
246    def base_react(self) -> BaseReact:
247        """Reports the structure total base reactions.
248        
249        :return: total base reactions analysis results 
250        :rtype: BaseReact
251        """
252        number_results = int()
253        load_case = [str()]
254        step_type = [str()]
255        step_number = [float()]
256        force_x = [float()]
257        force_y = [float()]
258        force_z = [float()]
259        moment_x = [float()]
260        moment_y = [float()]
261        moment_z = [float()]
262        x_coordinate = [float()]
263        y_coordinate = [float()]
264        z_coordinate = [float()]
265        
266        [ret, number_results, load_case, step_type, step_number, force_x,
267        force_y, force_z, moment_x, moment_y,
268        moment_z, x_coordinate, y_coordinate, z_coordinate] = self.analysis_results.BaseReact(number_results, load_case, step_type, step_number, force_x, force_y, 
269                                                                                            force_z, moment_x, moment_y, moment_z, x_coordinate, y_coordinate, z_coordinate)
270        handle(ret)
271        return{'number_results': number_results,
272                'load_case': list(load_case),
273                'step_type': list(step_type),
274                'step_number': list(step_number),
275                'force_x': list(force_x),
276                'force_y': list(force_y),
277                'force_z': list(force_z),
278                'moment_x': list(moment_x),
279                'moment_y': list(moment_y),
280                'moment_z': list(moment_z),
281                'x_coordinate': list(x_coordinate),
282                'y_coordinate': list(y_coordinate),
283                'z_coordinate': list(z_coordinate)}
284
285
286    def base_react_with_centroid(self) -> BaseReactWithCentroid:
287        """Reports the structure total base reactions and includes information on the centroid of the translational reaction forces.
288        
289        :return: Base reaction with centriod analysis results 
290        :rtype: BaseReactWithCentroid
291        """
292        number_results = int()
293        load_case = [str()]
294        step_type = [str()]
295        step_number = [float()]
296        force_x = [float()]
297        force_y = [float()]
298        force_z = [float()]
299        moment_x = [float()]
300        moment_y = [float()]
301        moment_z = [float()]
302        x_coordinate = [float()]
303        y_coordinate = [float()]
304        z_coordinate = [float()]
305        x_centroid_for_force_x = [float()]
306        y_centroid_for_force_y = [float()]
307        z_centroid_for_force_x = [float()]
308        x_centroid_for_force_y = [float()]
309        y_centroid_for_force_y = [float()]
310        z_centroid_for_force_y = [float()]
311        x_centroid_for_force_z = [float()]
312        y_centroid_for_force_z = [float()]
313        z_centroid_for_force_z = [float()]
314        
315        [ret, number_results, load_case, step_type, step_number,
316            force_x, force_y, force_z, moment_x, moment_y, moment_z,
317            x_coordinate, y_coordinate, z_coordinate,
318            x_centroid_for_force_x, y_centroid_for_force_y, z_centroid_for_force_x,
319            x_centroid_for_force_y, y_centroid_for_force_y, z_centroid_for_force_y,
320            x_centroid_for_force_z, y_centroid_for_force_z, z_centroid_for_force_z] = self.analysis_results.BaseReactWithCentroid(number_results, load_case, step_type, step_number,
321                                                                                                                                force_x, force_y, force_z, moment_x, moment_y, moment_z,
322                                                                                                                                x_coordinate, y_coordinate, z_coordinate,
323                                                                                                                                x_centroid_for_force_x, y_centroid_for_force_y, z_centroid_for_force_x,
324                                                                                                                                x_centroid_for_force_y, y_centroid_for_force_y, z_centroid_for_force_y,
325                                                                                                                                x_centroid_for_force_z, y_centroid_for_force_z, z_centroid_for_force_z)
326        handle(ret)
327        return {'number_results': number_results,
328                'load_case': list(load_case),
329                'step_type': list(step_type),
330                'step_number': list(step_number),
331                'force_x': list(force_x),
332                'force_y': list(force_y),
333                'force_z': list(force_z),
334                'moment_x': list(moment_x),
335                'moment_y': list(moment_y),
336                'moment_z': list(moment_z),
337                'x_coordinate': list(x_coordinate),
338                'y_coordinate': list(y_coordinate),
339                'z_coordinate': list(z_coordinate), 
340                'x_centroid_for_force_x': list(x_centroid_for_force_x),
341                'y_centroid_for_force_x': list(y_centroid_for_force_y),
342                'z_centroid_for_force_x': list(z_centroid_for_force_x),
343                'x_centroid_for_force_y': list(x_centroid_for_force_y),
344                'y_centroid_for_force_y': list(y_centroid_for_force_y),
345                'z_centroid_for_force_y': list(z_centroid_for_force_y),
346                'x_centroid_for_force_z': list(x_centroid_for_force_z),
347                'y_centroid_for_force_z': list(y_centroid_for_force_z),
348                'z_centroid_for_force_z': list(z_centroid_for_force_z)}
349
350
351    def buckling_factor(self) -> BucklingFactor:
352        """Reports buckling factors obtained from buckling load cases. 
353        
354        :return: Buckling factors analysis results 
355        :rtype: BucklingFactor
356        """
357        number_results = int()
358        load_case = [str()]
359        step_type = [str()]
360        step_number = [float()]
361        factor = [float()]
362        
363        [ret, number_results, load_case,
364            step_type, step_number, factor] = self.analysis_results.BucklingFactor(number_results, load_case,
365                                                                                step_type, step_number, factor)
366        handle(ret)
367        return {'number_results': number_results,
368                'load_case': list(load_case),
369                'step_type': list(step_type),
370                'step_number': list(step_number),
371                'factor': list(factor)}
372
373
374    # TODO: FrameForce
375    # TODO: FrameJointForce
376    # TODO: GeneraliszeDispl
377    # TODO: JointAcc
378    # TODO: JointAccAbs
379
380
381    def joint_displacement(self, name : str, item_type_element : etabs.eItemTypeElm) -> JointDisplacement:
382        """Reports the joint displacements for the specified point elements.
383        The displacements reported by this function are relative displacements.
384
385        :param name: The name of an existing point object, point element, or group of objects depending on the value of the ItemTypeElm item
386        :type name: str
387        :param item_type_element: one of the following items in the `eItemTypeElm` enumeration.
388        `ObjectElm` - the point element corresponding to the point object specified by the `name`
389        `Element` - the point element specified by `name`
390        `GroupElm` - all point elements directly or indirectly specified in the group specified by `name`
391        `SelectionElm` - all point elements directly or indirectly selected and `name` is ignored
392        :type item_type_element: etabs.eItemTypeElm
393        :return: Joint Displacement analysis results 
394        :rtype: JointDisplacement
395        """
396        number_results = int()
397        object_name = [str()]
398        element_name = [str()]
399        load_case = [str()]
400        step_type = [str()]
401        step_number = [float()]
402        delta_1 = [float()]
403        delta_2 = [float()]
404        delta_3 = [float()]
405        rotation_1 = [float()]
406        rotation_2 = [float()]
407        rotation_3 = [float()]
408        
409        [ret, number_results, object_name, element_name,
410        load_case, step_type, step_number,
411        delta_1, delta_2, delta_3,
412        rotation_1, rotation_2, rotation_3] = self.analysis_results.JointDispl(name, item_type_element, number_results,
413                                                                               object_name, element_name, 
414                                                                               load_case, step_type, step_number,
415                                                                               delta_1, delta_2, delta_3,
416                                                                               rotation_1, rotation_2, rotation_3)
417        handle(ret)
418        return {'number_results': number_results, 
419                'object_name': list(object_name),
420                'element_name': list(element_name), 
421                'load_case': list(load_case),
422                'step_type': list(step_type),
423                'step_number': list(step_number), 
424                'delta_1': list(delta_1), 
425                'delta_2': list(delta_2),
426                'delta_3': list(delta_3),
427                'rotation_1': list(rotation_1), 
428                'rotation_2': list(rotation_2),
429                'rotation_3': list(rotation_3)}
430
431
432    # TODO: JointDisplAbs
433    # TODO: JointDrifts
434    # TODO: JointReact
435    # TODO: JointVel
436    # TODO: JointVelAbs
437    # TODO: LinkDeformation
438    # TODO: LinkForce
439    # TODO: LinkJointForce
440
441
442    def modal_load_participation_ratios(self) -> ModalLoadParticipationRatios:
443        """Reports the modal load participation ratios for each selected modal analysis case
444        
445        :return: Modal load participation ratios analysis results 
446        :rtype: ModalLoadParticipationRatios
447        """
448        number_results = int()
449        load_case = [str()]
450        item_type = [str()]
451        item = [str()]
452        static_ratios = [float()]
453        dynamic_ratios = [float()]
454
455        [ret, number_results, 
456            load_case,item_type, item,
457            static_ratios, dynamic_ratios] = self.analysis_results.ModalLoadParticipationRatios(number_results, load_case,
458                                                                                                item_type, item,
459                                                                                                static_ratios, dynamic_ratios)
460        handle(ret)
461        return {'number_results': number_results,
462                'load_case': list(load_case),
463                'item_type': list(item_type),
464                'item': list(item),
465                'static_ratios': list(static_ratios),
466                'dynamic_ratios': list(dynamic_ratios)}
467
468
469    def modal_participating_mass_ratios(self) -> ModalParticipatingMassRatios:
470        """Reports the modal participating mass ratios for each mode of each selected modal analysis case.
471        
472        :return: Modal participating mass ratios analysis results 
473        :rtype: ModalParticipatingMassRatios
474        """
475        number_results = int()
476        load_case = [str()]
477        step_type = [str()]
478        step_number = [float()]
479        period = [float()]
480        delta_x = [float()]
481        delta_y = [float()]
482        delta_z = [float()]
483        sum_delta_x = [float()]
484        sum_delta_y = [float()]
485        sum_delta_z = [float()]
486        rotation_x = [float()]
487        rotation_y = [float()]
488        rotation_z = [float()]
489        sum_rotation_x = [float()]
490        sum_rotation_y = [float()]
491        sum_rotation_z = [float()]
492
493        [ret, number_results, load_case,
494         step_type, step_number, period,
495         delta_x, delta_y, delta_z,
496         sum_delta_x, sum_delta_y, sum_delta_z,
497         rotation_x, rotation_y, rotation_z,
498         sum_rotation_x, sum_rotation_y, sum_rotation_z] = self.analysis_results.ModalParticipatingMassRatios(number_results, load_case,
499                                                                                                              step_type, step_number, period,
500                                                                                                              delta_x, delta_y, delta_z,
501                                                                                                              sum_delta_x, sum_delta_y, sum_delta_z,
502                                                                                                              rotation_x, rotation_y, rotation_z,
503                                                                                                              sum_rotation_x, sum_rotation_y, sum_rotation_z)
504        handle(ret)
505        return {'number_results': number_results,
506                'load_case': list(load_case),
507                'step_type': list(step_type),
508                'step_number': list(step_number),
509                'period': list(period),
510                'delta_x': list(delta_x),
511                'delta_y': list(delta_y),
512                'delta_z': list(delta_z),
513                'sum_delta_x': list(sum_delta_x),
514                'sum_delta_y': list(sum_delta_y),
515                'sum_delta_z': list(sum_delta_z),
516                'rotation_x': list(rotation_x),
517                'rotation_y': list(rotation_y),
518                'rotation_z': list(rotation_z),
519                'sum_rotation_x': list(sum_rotation_x),
520                'sum_rotation_y': list(sum_rotation_y),
521                'sum_rotation_z': list(sum_rotation_z)}
522
523
524    def modal_participation_factors(self) -> ModalParticipationFactors:
525        """Reports the modal participation factors for each mode of each selected modal analysis case.
526        
527        :return: Modal participation factors analysis results
528        :rtype: ModalParticipationFactors
529        """
530        number_results = int()
531        load_case = [str()]
532        step_type = [str()]
533        step_number = [float()]
534        period = [float()]
535        delta_x = [float()]
536        delta_y = [float()]
537        delta_z = [float()]
538        rotation_x = [float()]
539        rotation_y = [float()]
540        rotation_z = [float()]
541        modal_mass = [float()]
542        modal_stiff = [float()]
543
544        [ret, number_results, load_case,
545            step_type, step_number, period,
546            delta_x, delta_y, delta_z,
547            rotation_x, rotation_y, rotation_z,
548            modal_mass, modal_stiff] = self.analysis_results.ModalParticipationFactors(number_results, load_case,
549                                                                                    step_type, step_number, period,
550                                                                                    delta_x, delta_y, delta_z,
551                                                                                    rotation_x, rotation_y, rotation_z,
552                                                                                    modal_mass, modal_stiff)
553        handle(ret)
554        return {'number_results': number_results,
555                'load_case': list(load_case),
556                'step_type': list(step_type),
557                'step_number': list(step_number),
558                'period': list(period),
559                'delta_x': list(delta_x),
560                'delta_y': list(delta_y),
561                'delta_z': list(delta_z),
562                'rotation_x': list(rotation_x),
563                'rotation_y': list(rotation_y),
564                'rotation_z': list(rotation_z),
565                'modal_mass': list(modal_mass),
566                'modal_stiff': list(modal_stiff)}
567
568
569    def modal_period(self) -> ModalPeriod:
570        """Reports the modal period, cyclic frequency, circular frequency and eigenvalue for each selected modal load case.
571        
572        :return: Modal period analysis results
573        :rtype: ModalPeriod
574        """
575        number_results = int()
576        load_case = [str()]
577        step_type = [str()]
578        step_number = [int()]
579        period = [float()]
580        frequency = [float()]
581        circular_frequency = [float()]
582        eigen_value = [float()]
583        
584        [ret, number_results, load_case, step_type, step_number,
585         period, frequency, circular_frequency, eigen_value] = self.analysis_results.ModalPeriod(number_results, load_case, step_type, step_number,
586                                                                                                 period, frequency, circular_frequency, eigen_value)
587        handle(ret)
588        return {'number_results': number_results,
589                'load_case': list(load_case),
590                'step_type': list(step_type),
591                'step_number': list(step_number),
592                'period': list(period),
593                'frequency': list(frequency),
594                'circular_frequency': list(circular_frequency),
595                'eigen_value': list(eigen_value)}
596
597
598    # TODO: ModalShape
599    # TODO: PanelZoneDeformation
600    # TODO: PanelZoneForce
601
602
603    def pier_force(self) -> PierForce:
604        """Retrieves pier forces for any defined pier objects in the model.
605        
606        :return: Pier force analysis results
607        :rtype: PierForce
608        """
609        number_results = int()
610        story_name = [str()]
611        pier_name = [str()]
612        load_case = [str()]
613        location = [str()]
614        axial = [float()]
615        shear_2 = [float()]
616        shear_3 = [float()]
617        torsion = [float()]
618        moment_2 = [float()]
619        moment_3 = [float()]
620        
621        [ret, number_results, story_name, pier_name,
622         load_case, location, axial, shear_2, shear_3, torsion, moment_2, moment_3] = self.analysis_results.PierForce(number_results, story_name, pier_name,
623                                                                                      load_case, location, axial, shear_2, shear_3, torsion, moment_2, moment_3)
624        handle(ret)
625        return {'number_results': number_results,
626                'story_name': list(story_name),
627                'pier_name': list(pier_name),
628                'load_case': list(load_case),
629                'location': list(location),
630                'axial': list(axial),
631                'shear_2': list(shear_2),
632                'shear_3': list(shear_2),
633                'torsion': list(torsion),
634                'moment_2': list(moment_2),
635                'moment_3': list(moment_3)}
636
637
638    def section_cut_analysis(self) -> SectionCutAnalysis:
639        """Reports the section cut force for sections cuts that are specified to have an analysis 
640        (force_1, force_2, force_3, moment_1, moment_2, moment_3) result type.
641        
642        :return: section cut analysis results
643        :rtype: SectionCutAnalysis
644        """
645        number_results = int()
646        section_cut = [str()]
647        load_case = [str()]
648        step_type = [str()]
649        step_number = [float()]
650        force_1 = [float()]
651        force_2 = [float()]
652        force_3 = [float()]
653        moment_1 = [float()]
654        moment_2 = [float()]
655        moment3 = [float()]
656
657        [ret, number_results, section_cut,
658         load_case, step_type, step_number,
659         force_1, force_2, force_3,
660         moment_1, moment_2, moment3] = self.analysis_results.SectionCutAnalysis(number_results, section_cut,
661                                                                                 load_case, step_type, step_number,
662                                                                                 force_1, force_2, force_3,
663                                                                                 moment_1, moment_2, moment3)
664        handle(ret)
665        return {'number_results': number_results,
666                'section_cut': list(section_cut),
667                'load_case': list(load_case),
668                'step_type': list(step_type),
669                'step_number': list(step_number),
670                'force_1': list(force_1),
671                'force_2': list(force_2),
672                'force_3': list(force_3),
673                'moment_1': list(moment_1),
674                'moment_2': list(moment_2),
675                'moment_3': list(moment3)}
676
677
678    def section_cut_design(self) -> SectionCutDesign:
679        """Report the section cut force for sections cuts that are specified to have a design 
680        (axial force, shear force 2, shear force 3, torsion, moment 2, moment 3) result type.
681        
682        :return: Section cut design results 
683        :rtype: SectionCutDesign
684        """
685        number_results = int()
686        section_cut = [str()]
687        load_case = [str()]
688        step_type = [str()]
689        step_number = [float()]
690        axial = [float()]
691        shear_2 = [float()]
692        shear_3 = [float()]
693        torsion = [float()]
694        moment_2 = [float()]
695        moment_3 = [float()]
696
697        [ret, number_results, section_cut,
698        load_case, step_type, step_number,
699        axial, shear_2, shear_3,
700        torsion, moment_2, moment_3] = self.analysis_results.SectionCutAnalysis(number_results, section_cut,
701                                                                                load_case, step_type, step_number,
702                                                                                axial, shear_2, shear_3,
703                                                                                torsion, moment_2, moment_3)
704        handle(ret)
705        return {'number_results' : number_results, 
706                'section_cut' : list(section_cut),
707                'load_case' : list(load_case),
708                'step_type' : list(step_type),
709                'step_number' : list(step_number),
710                'axial' : list(axial), 
711                'shear_2' : list(shear_2),
712                'shear_3' : list(shear_3),
713                'torsion' : list(torsion),
714                'moment_2' : list(moment_2), 
715                'moment_3' : list(moment_3)}
716
717
718    def spandrel_force(self) -> SpandrelForce:
719        """Retrieves spandrel forces for any defined spandrel objects in the model.
720        
721        :return: Spandrel force analysis results 
722        :rtype: SpandrelForce
723        """
724        number_results = int()
725        story_name = [str()]
726        spandrel_name = [str()]
727        load_case = [str()]
728        location = [str()]
729        axial = [float()]
730        shear_2 = [float()]
731        shear_3 = [float()]
732        torsion = [float()]
733        moment_2 = [float()]
734        moment_3 = [float()]
735
736        [ret, number_results, story_name,
737            spandrel_name, load_case, location,
738            axial, shear_2, shear_3,
739            torsion, moment_2, moment_3] = self.analysis_results.SpandrelForce(number_results, story_name,
740                                                                            spandrel_name, load_case, location,
741                                                                            axial, shear_2, shear_3,
742                                                                            torsion, moment_2, moment_3)
743        handle(ret)
744        return {'number_results': number_results,
745                'story_name': list(story_name),
746                'spandrel_name': list(spandrel_name),
747                'load_case': list(load_case),
748                'location': list(location),
749                'axial': list(axial), 
750                'shear_2': list(shear_2),
751                'shear_3': list(shear_3),
752                'torsion': list(torsion),
753                'moment_2': list(moment_2), 
754                'moment_3': list(moment_3)}
755
756
757    def story_drifts(self) -> StoryDrift:
758        """Reports the story drifts.
759        
760        :return: Story drifts analysis results 
761        :rtype: StoryDrift
762        """
763        number_results = int()
764        story = [str()]
765        load_case = [str()]
766        step_type = [str()]
767        step_number = [float()]
768        direction = [str()]
769        drift = [float()]
770        label = [str()]
771        delta_x = [float()]
772        delta_y = [float()]
773        delta_z = [float()]
774
775        [ret, number_results, story, load_case,
776        step_type, step_number,
777        direction, drift, label,
778        delta_x, delta_y, delta_z] = self.analysis_results.StoryDrifts(number_results, story, load_case,
779                                                                                   step_type, step_number,
780                                                                                   direction, drift, label,
781                                                                                   delta_x, delta_y, delta_z)
782        handle(ret)
783        return {'number_results': number_results,
784                'story': list(story), 
785                'load_case': list(load_case),
786                'step_type': list(step_type),
787                'step_number': list(step_number),
788                'direction': list(direction),
789                'drift': list(drift),
790                'label': list(label),
791                'delta_x': list(delta_x),
792                'delta_y': list(delta_y),
793                'delta_z': list(delta_z)}
class AnalysisResults:
222class AnalysisResults:
223    """AnalysisResults interface"""
224    def __init__(self, sap_model : etabs.cSapModel) -> None:
225        # link of SapModel interface
226        self.sap_model = sap_model
227        # create AnalysisResultsSetup interface
228        self.analysis_results_setup = etabs.cAnalysisResultsSetup(sap_model.Results.Setup)
229        # create AnalysisResults interface
230        self.analysis_results = etabs.cAnalysisResults(sap_model.Results)
231        
232        # relate custom enumerations
233        self.eResultsSetupStepOutOption = eResultsSetupStepOutOption
234        self.eResultsSetupComboOutOption =  eResultsSetupComboOutOption
235
236
237    # Analysis Results Methods
238    # TODO: AreaForceShell
239    # TODO: AreaJointForceShell
240    # TODO: AreaStrainShell
241    # TODO: AreaStrainShellLayered
242    # TODO: AreaStressShell
243    # TODO: AreaStressShellLayered,
244    # TODO: AssembledJoinMass
245    
246    
247    def base_react(self) -> BaseReact:
248        """Reports the structure total base reactions.
249        
250        :return: total base reactions analysis results 
251        :rtype: BaseReact
252        """
253        number_results = int()
254        load_case = [str()]
255        step_type = [str()]
256        step_number = [float()]
257        force_x = [float()]
258        force_y = [float()]
259        force_z = [float()]
260        moment_x = [float()]
261        moment_y = [float()]
262        moment_z = [float()]
263        x_coordinate = [float()]
264        y_coordinate = [float()]
265        z_coordinate = [float()]
266        
267        [ret, number_results, load_case, step_type, step_number, force_x,
268        force_y, force_z, moment_x, moment_y,
269        moment_z, x_coordinate, y_coordinate, z_coordinate] = self.analysis_results.BaseReact(number_results, load_case, step_type, step_number, force_x, force_y, 
270                                                                                            force_z, moment_x, moment_y, moment_z, x_coordinate, y_coordinate, z_coordinate)
271        handle(ret)
272        return{'number_results': number_results,
273                'load_case': list(load_case),
274                'step_type': list(step_type),
275                'step_number': list(step_number),
276                'force_x': list(force_x),
277                'force_y': list(force_y),
278                'force_z': list(force_z),
279                'moment_x': list(moment_x),
280                'moment_y': list(moment_y),
281                'moment_z': list(moment_z),
282                'x_coordinate': list(x_coordinate),
283                'y_coordinate': list(y_coordinate),
284                'z_coordinate': list(z_coordinate)}
285
286
287    def base_react_with_centroid(self) -> BaseReactWithCentroid:
288        """Reports the structure total base reactions and includes information on the centroid of the translational reaction forces.
289        
290        :return: Base reaction with centriod analysis results 
291        :rtype: BaseReactWithCentroid
292        """
293        number_results = int()
294        load_case = [str()]
295        step_type = [str()]
296        step_number = [float()]
297        force_x = [float()]
298        force_y = [float()]
299        force_z = [float()]
300        moment_x = [float()]
301        moment_y = [float()]
302        moment_z = [float()]
303        x_coordinate = [float()]
304        y_coordinate = [float()]
305        z_coordinate = [float()]
306        x_centroid_for_force_x = [float()]
307        y_centroid_for_force_y = [float()]
308        z_centroid_for_force_x = [float()]
309        x_centroid_for_force_y = [float()]
310        y_centroid_for_force_y = [float()]
311        z_centroid_for_force_y = [float()]
312        x_centroid_for_force_z = [float()]
313        y_centroid_for_force_z = [float()]
314        z_centroid_for_force_z = [float()]
315        
316        [ret, number_results, load_case, step_type, step_number,
317            force_x, force_y, force_z, moment_x, moment_y, moment_z,
318            x_coordinate, y_coordinate, z_coordinate,
319            x_centroid_for_force_x, y_centroid_for_force_y, z_centroid_for_force_x,
320            x_centroid_for_force_y, y_centroid_for_force_y, z_centroid_for_force_y,
321            x_centroid_for_force_z, y_centroid_for_force_z, z_centroid_for_force_z] = self.analysis_results.BaseReactWithCentroid(number_results, load_case, step_type, step_number,
322                                                                                                                                force_x, force_y, force_z, moment_x, moment_y, moment_z,
323                                                                                                                                x_coordinate, y_coordinate, z_coordinate,
324                                                                                                                                x_centroid_for_force_x, y_centroid_for_force_y, z_centroid_for_force_x,
325                                                                                                                                x_centroid_for_force_y, y_centroid_for_force_y, z_centroid_for_force_y,
326                                                                                                                                x_centroid_for_force_z, y_centroid_for_force_z, z_centroid_for_force_z)
327        handle(ret)
328        return {'number_results': number_results,
329                'load_case': list(load_case),
330                'step_type': list(step_type),
331                'step_number': list(step_number),
332                'force_x': list(force_x),
333                'force_y': list(force_y),
334                'force_z': list(force_z),
335                'moment_x': list(moment_x),
336                'moment_y': list(moment_y),
337                'moment_z': list(moment_z),
338                'x_coordinate': list(x_coordinate),
339                'y_coordinate': list(y_coordinate),
340                'z_coordinate': list(z_coordinate), 
341                'x_centroid_for_force_x': list(x_centroid_for_force_x),
342                'y_centroid_for_force_x': list(y_centroid_for_force_y),
343                'z_centroid_for_force_x': list(z_centroid_for_force_x),
344                'x_centroid_for_force_y': list(x_centroid_for_force_y),
345                'y_centroid_for_force_y': list(y_centroid_for_force_y),
346                'z_centroid_for_force_y': list(z_centroid_for_force_y),
347                'x_centroid_for_force_z': list(x_centroid_for_force_z),
348                'y_centroid_for_force_z': list(y_centroid_for_force_z),
349                'z_centroid_for_force_z': list(z_centroid_for_force_z)}
350
351
352    def buckling_factor(self) -> BucklingFactor:
353        """Reports buckling factors obtained from buckling load cases. 
354        
355        :return: Buckling factors analysis results 
356        :rtype: BucklingFactor
357        """
358        number_results = int()
359        load_case = [str()]
360        step_type = [str()]
361        step_number = [float()]
362        factor = [float()]
363        
364        [ret, number_results, load_case,
365            step_type, step_number, factor] = self.analysis_results.BucklingFactor(number_results, load_case,
366                                                                                step_type, step_number, factor)
367        handle(ret)
368        return {'number_results': number_results,
369                'load_case': list(load_case),
370                'step_type': list(step_type),
371                'step_number': list(step_number),
372                'factor': list(factor)}
373
374
375    # TODO: FrameForce
376    # TODO: FrameJointForce
377    # TODO: GeneraliszeDispl
378    # TODO: JointAcc
379    # TODO: JointAccAbs
380
381
382    def joint_displacement(self, name : str, item_type_element : etabs.eItemTypeElm) -> JointDisplacement:
383        """Reports the joint displacements for the specified point elements.
384        The displacements reported by this function are relative displacements.
385
386        :param name: The name of an existing point object, point element, or group of objects depending on the value of the ItemTypeElm item
387        :type name: str
388        :param item_type_element: one of the following items in the `eItemTypeElm` enumeration.
389        `ObjectElm` - the point element corresponding to the point object specified by the `name`
390        `Element` - the point element specified by `name`
391        `GroupElm` - all point elements directly or indirectly specified in the group specified by `name`
392        `SelectionElm` - all point elements directly or indirectly selected and `name` is ignored
393        :type item_type_element: etabs.eItemTypeElm
394        :return: Joint Displacement analysis results 
395        :rtype: JointDisplacement
396        """
397        number_results = int()
398        object_name = [str()]
399        element_name = [str()]
400        load_case = [str()]
401        step_type = [str()]
402        step_number = [float()]
403        delta_1 = [float()]
404        delta_2 = [float()]
405        delta_3 = [float()]
406        rotation_1 = [float()]
407        rotation_2 = [float()]
408        rotation_3 = [float()]
409        
410        [ret, number_results, object_name, element_name,
411        load_case, step_type, step_number,
412        delta_1, delta_2, delta_3,
413        rotation_1, rotation_2, rotation_3] = self.analysis_results.JointDispl(name, item_type_element, number_results,
414                                                                               object_name, element_name, 
415                                                                               load_case, step_type, step_number,
416                                                                               delta_1, delta_2, delta_3,
417                                                                               rotation_1, rotation_2, rotation_3)
418        handle(ret)
419        return {'number_results': number_results, 
420                'object_name': list(object_name),
421                'element_name': list(element_name), 
422                'load_case': list(load_case),
423                'step_type': list(step_type),
424                'step_number': list(step_number), 
425                'delta_1': list(delta_1), 
426                'delta_2': list(delta_2),
427                'delta_3': list(delta_3),
428                'rotation_1': list(rotation_1), 
429                'rotation_2': list(rotation_2),
430                'rotation_3': list(rotation_3)}
431
432
433    # TODO: JointDisplAbs
434    # TODO: JointDrifts
435    # TODO: JointReact
436    # TODO: JointVel
437    # TODO: JointVelAbs
438    # TODO: LinkDeformation
439    # TODO: LinkForce
440    # TODO: LinkJointForce
441
442
443    def modal_load_participation_ratios(self) -> ModalLoadParticipationRatios:
444        """Reports the modal load participation ratios for each selected modal analysis case
445        
446        :return: Modal load participation ratios analysis results 
447        :rtype: ModalLoadParticipationRatios
448        """
449        number_results = int()
450        load_case = [str()]
451        item_type = [str()]
452        item = [str()]
453        static_ratios = [float()]
454        dynamic_ratios = [float()]
455
456        [ret, number_results, 
457            load_case,item_type, item,
458            static_ratios, dynamic_ratios] = self.analysis_results.ModalLoadParticipationRatios(number_results, load_case,
459                                                                                                item_type, item,
460                                                                                                static_ratios, dynamic_ratios)
461        handle(ret)
462        return {'number_results': number_results,
463                'load_case': list(load_case),
464                'item_type': list(item_type),
465                'item': list(item),
466                'static_ratios': list(static_ratios),
467                'dynamic_ratios': list(dynamic_ratios)}
468
469
470    def modal_participating_mass_ratios(self) -> ModalParticipatingMassRatios:
471        """Reports the modal participating mass ratios for each mode of each selected modal analysis case.
472        
473        :return: Modal participating mass ratios analysis results 
474        :rtype: ModalParticipatingMassRatios
475        """
476        number_results = int()
477        load_case = [str()]
478        step_type = [str()]
479        step_number = [float()]
480        period = [float()]
481        delta_x = [float()]
482        delta_y = [float()]
483        delta_z = [float()]
484        sum_delta_x = [float()]
485        sum_delta_y = [float()]
486        sum_delta_z = [float()]
487        rotation_x = [float()]
488        rotation_y = [float()]
489        rotation_z = [float()]
490        sum_rotation_x = [float()]
491        sum_rotation_y = [float()]
492        sum_rotation_z = [float()]
493
494        [ret, number_results, load_case,
495         step_type, step_number, period,
496         delta_x, delta_y, delta_z,
497         sum_delta_x, sum_delta_y, sum_delta_z,
498         rotation_x, rotation_y, rotation_z,
499         sum_rotation_x, sum_rotation_y, sum_rotation_z] = self.analysis_results.ModalParticipatingMassRatios(number_results, load_case,
500                                                                                                              step_type, step_number, period,
501                                                                                                              delta_x, delta_y, delta_z,
502                                                                                                              sum_delta_x, sum_delta_y, sum_delta_z,
503                                                                                                              rotation_x, rotation_y, rotation_z,
504                                                                                                              sum_rotation_x, sum_rotation_y, sum_rotation_z)
505        handle(ret)
506        return {'number_results': number_results,
507                'load_case': list(load_case),
508                'step_type': list(step_type),
509                'step_number': list(step_number),
510                'period': list(period),
511                'delta_x': list(delta_x),
512                'delta_y': list(delta_y),
513                'delta_z': list(delta_z),
514                'sum_delta_x': list(sum_delta_x),
515                'sum_delta_y': list(sum_delta_y),
516                'sum_delta_z': list(sum_delta_z),
517                'rotation_x': list(rotation_x),
518                'rotation_y': list(rotation_y),
519                'rotation_z': list(rotation_z),
520                'sum_rotation_x': list(sum_rotation_x),
521                'sum_rotation_y': list(sum_rotation_y),
522                'sum_rotation_z': list(sum_rotation_z)}
523
524
525    def modal_participation_factors(self) -> ModalParticipationFactors:
526        """Reports the modal participation factors for each mode of each selected modal analysis case.
527        
528        :return: Modal participation factors analysis results
529        :rtype: ModalParticipationFactors
530        """
531        number_results = int()
532        load_case = [str()]
533        step_type = [str()]
534        step_number = [float()]
535        period = [float()]
536        delta_x = [float()]
537        delta_y = [float()]
538        delta_z = [float()]
539        rotation_x = [float()]
540        rotation_y = [float()]
541        rotation_z = [float()]
542        modal_mass = [float()]
543        modal_stiff = [float()]
544
545        [ret, number_results, load_case,
546            step_type, step_number, period,
547            delta_x, delta_y, delta_z,
548            rotation_x, rotation_y, rotation_z,
549            modal_mass, modal_stiff] = self.analysis_results.ModalParticipationFactors(number_results, load_case,
550                                                                                    step_type, step_number, period,
551                                                                                    delta_x, delta_y, delta_z,
552                                                                                    rotation_x, rotation_y, rotation_z,
553                                                                                    modal_mass, modal_stiff)
554        handle(ret)
555        return {'number_results': number_results,
556                'load_case': list(load_case),
557                'step_type': list(step_type),
558                'step_number': list(step_number),
559                'period': list(period),
560                'delta_x': list(delta_x),
561                'delta_y': list(delta_y),
562                'delta_z': list(delta_z),
563                'rotation_x': list(rotation_x),
564                'rotation_y': list(rotation_y),
565                'rotation_z': list(rotation_z),
566                'modal_mass': list(modal_mass),
567                'modal_stiff': list(modal_stiff)}
568
569
570    def modal_period(self) -> ModalPeriod:
571        """Reports the modal period, cyclic frequency, circular frequency and eigenvalue for each selected modal load case.
572        
573        :return: Modal period analysis results
574        :rtype: ModalPeriod
575        """
576        number_results = int()
577        load_case = [str()]
578        step_type = [str()]
579        step_number = [int()]
580        period = [float()]
581        frequency = [float()]
582        circular_frequency = [float()]
583        eigen_value = [float()]
584        
585        [ret, number_results, load_case, step_type, step_number,
586         period, frequency, circular_frequency, eigen_value] = self.analysis_results.ModalPeriod(number_results, load_case, step_type, step_number,
587                                                                                                 period, frequency, circular_frequency, eigen_value)
588        handle(ret)
589        return {'number_results': number_results,
590                'load_case': list(load_case),
591                'step_type': list(step_type),
592                'step_number': list(step_number),
593                'period': list(period),
594                'frequency': list(frequency),
595                'circular_frequency': list(circular_frequency),
596                'eigen_value': list(eigen_value)}
597
598
599    # TODO: ModalShape
600    # TODO: PanelZoneDeformation
601    # TODO: PanelZoneForce
602
603
604    def pier_force(self) -> PierForce:
605        """Retrieves pier forces for any defined pier objects in the model.
606        
607        :return: Pier force analysis results
608        :rtype: PierForce
609        """
610        number_results = int()
611        story_name = [str()]
612        pier_name = [str()]
613        load_case = [str()]
614        location = [str()]
615        axial = [float()]
616        shear_2 = [float()]
617        shear_3 = [float()]
618        torsion = [float()]
619        moment_2 = [float()]
620        moment_3 = [float()]
621        
622        [ret, number_results, story_name, pier_name,
623         load_case, location, axial, shear_2, shear_3, torsion, moment_2, moment_3] = self.analysis_results.PierForce(number_results, story_name, pier_name,
624                                                                                      load_case, location, axial, shear_2, shear_3, torsion, moment_2, moment_3)
625        handle(ret)
626        return {'number_results': number_results,
627                'story_name': list(story_name),
628                'pier_name': list(pier_name),
629                'load_case': list(load_case),
630                'location': list(location),
631                'axial': list(axial),
632                'shear_2': list(shear_2),
633                'shear_3': list(shear_2),
634                'torsion': list(torsion),
635                'moment_2': list(moment_2),
636                'moment_3': list(moment_3)}
637
638
639    def section_cut_analysis(self) -> SectionCutAnalysis:
640        """Reports the section cut force for sections cuts that are specified to have an analysis 
641        (force_1, force_2, force_3, moment_1, moment_2, moment_3) result type.
642        
643        :return: section cut analysis results
644        :rtype: SectionCutAnalysis
645        """
646        number_results = int()
647        section_cut = [str()]
648        load_case = [str()]
649        step_type = [str()]
650        step_number = [float()]
651        force_1 = [float()]
652        force_2 = [float()]
653        force_3 = [float()]
654        moment_1 = [float()]
655        moment_2 = [float()]
656        moment3 = [float()]
657
658        [ret, number_results, section_cut,
659         load_case, step_type, step_number,
660         force_1, force_2, force_3,
661         moment_1, moment_2, moment3] = self.analysis_results.SectionCutAnalysis(number_results, section_cut,
662                                                                                 load_case, step_type, step_number,
663                                                                                 force_1, force_2, force_3,
664                                                                                 moment_1, moment_2, moment3)
665        handle(ret)
666        return {'number_results': number_results,
667                'section_cut': list(section_cut),
668                'load_case': list(load_case),
669                'step_type': list(step_type),
670                'step_number': list(step_number),
671                'force_1': list(force_1),
672                'force_2': list(force_2),
673                'force_3': list(force_3),
674                'moment_1': list(moment_1),
675                'moment_2': list(moment_2),
676                'moment_3': list(moment3)}
677
678
679    def section_cut_design(self) -> SectionCutDesign:
680        """Report the section cut force for sections cuts that are specified to have a design 
681        (axial force, shear force 2, shear force 3, torsion, moment 2, moment 3) result type.
682        
683        :return: Section cut design results 
684        :rtype: SectionCutDesign
685        """
686        number_results = int()
687        section_cut = [str()]
688        load_case = [str()]
689        step_type = [str()]
690        step_number = [float()]
691        axial = [float()]
692        shear_2 = [float()]
693        shear_3 = [float()]
694        torsion = [float()]
695        moment_2 = [float()]
696        moment_3 = [float()]
697
698        [ret, number_results, section_cut,
699        load_case, step_type, step_number,
700        axial, shear_2, shear_3,
701        torsion, moment_2, moment_3] = self.analysis_results.SectionCutAnalysis(number_results, section_cut,
702                                                                                load_case, step_type, step_number,
703                                                                                axial, shear_2, shear_3,
704                                                                                torsion, moment_2, moment_3)
705        handle(ret)
706        return {'number_results' : number_results, 
707                'section_cut' : list(section_cut),
708                'load_case' : list(load_case),
709                'step_type' : list(step_type),
710                'step_number' : list(step_number),
711                'axial' : list(axial), 
712                'shear_2' : list(shear_2),
713                'shear_3' : list(shear_3),
714                'torsion' : list(torsion),
715                'moment_2' : list(moment_2), 
716                'moment_3' : list(moment_3)}
717
718
719    def spandrel_force(self) -> SpandrelForce:
720        """Retrieves spandrel forces for any defined spandrel objects in the model.
721        
722        :return: Spandrel force analysis results 
723        :rtype: SpandrelForce
724        """
725        number_results = int()
726        story_name = [str()]
727        spandrel_name = [str()]
728        load_case = [str()]
729        location = [str()]
730        axial = [float()]
731        shear_2 = [float()]
732        shear_3 = [float()]
733        torsion = [float()]
734        moment_2 = [float()]
735        moment_3 = [float()]
736
737        [ret, number_results, story_name,
738            spandrel_name, load_case, location,
739            axial, shear_2, shear_3,
740            torsion, moment_2, moment_3] = self.analysis_results.SpandrelForce(number_results, story_name,
741                                                                            spandrel_name, load_case, location,
742                                                                            axial, shear_2, shear_3,
743                                                                            torsion, moment_2, moment_3)
744        handle(ret)
745        return {'number_results': number_results,
746                'story_name': list(story_name),
747                'spandrel_name': list(spandrel_name),
748                'load_case': list(load_case),
749                'location': list(location),
750                'axial': list(axial), 
751                'shear_2': list(shear_2),
752                'shear_3': list(shear_3),
753                'torsion': list(torsion),
754                'moment_2': list(moment_2), 
755                'moment_3': list(moment_3)}
756
757
758    def story_drifts(self) -> StoryDrift:
759        """Reports the story drifts.
760        
761        :return: Story drifts analysis results 
762        :rtype: StoryDrift
763        """
764        number_results = int()
765        story = [str()]
766        load_case = [str()]
767        step_type = [str()]
768        step_number = [float()]
769        direction = [str()]
770        drift = [float()]
771        label = [str()]
772        delta_x = [float()]
773        delta_y = [float()]
774        delta_z = [float()]
775
776        [ret, number_results, story, load_case,
777        step_type, step_number,
778        direction, drift, label,
779        delta_x, delta_y, delta_z] = self.analysis_results.StoryDrifts(number_results, story, load_case,
780                                                                                   step_type, step_number,
781                                                                                   direction, drift, label,
782                                                                                   delta_x, delta_y, delta_z)
783        handle(ret)
784        return {'number_results': number_results,
785                'story': list(story), 
786                'load_case': list(load_case),
787                'step_type': list(step_type),
788                'step_number': list(step_number),
789                'direction': list(direction),
790                'drift': list(drift),
791                'label': list(label),
792                'delta_x': list(delta_x),
793                'delta_y': list(delta_y),
794                'delta_z': list(delta_z)}

AnalysisResults interface

AnalysisResults(sap_model: ETABSv1.cSapModel)
224    def __init__(self, sap_model : etabs.cSapModel) -> None:
225        # link of SapModel interface
226        self.sap_model = sap_model
227        # create AnalysisResultsSetup interface
228        self.analysis_results_setup = etabs.cAnalysisResultsSetup(sap_model.Results.Setup)
229        # create AnalysisResults interface
230        self.analysis_results = etabs.cAnalysisResults(sap_model.Results)
231        
232        # relate custom enumerations
233        self.eResultsSetupStepOutOption = eResultsSetupStepOutOption
234        self.eResultsSetupComboOutOption =  eResultsSetupComboOutOption
def base_react(self) -> pytabs.analysis_results.BaseReact:
247    def base_react(self) -> BaseReact:
248        """Reports the structure total base reactions.
249        
250        :return: total base reactions analysis results 
251        :rtype: BaseReact
252        """
253        number_results = int()
254        load_case = [str()]
255        step_type = [str()]
256        step_number = [float()]
257        force_x = [float()]
258        force_y = [float()]
259        force_z = [float()]
260        moment_x = [float()]
261        moment_y = [float()]
262        moment_z = [float()]
263        x_coordinate = [float()]
264        y_coordinate = [float()]
265        z_coordinate = [float()]
266        
267        [ret, number_results, load_case, step_type, step_number, force_x,
268        force_y, force_z, moment_x, moment_y,
269        moment_z, x_coordinate, y_coordinate, z_coordinate] = self.analysis_results.BaseReact(number_results, load_case, step_type, step_number, force_x, force_y, 
270                                                                                            force_z, moment_x, moment_y, moment_z, x_coordinate, y_coordinate, z_coordinate)
271        handle(ret)
272        return{'number_results': number_results,
273                'load_case': list(load_case),
274                'step_type': list(step_type),
275                'step_number': list(step_number),
276                'force_x': list(force_x),
277                'force_y': list(force_y),
278                'force_z': list(force_z),
279                'moment_x': list(moment_x),
280                'moment_y': list(moment_y),
281                'moment_z': list(moment_z),
282                'x_coordinate': list(x_coordinate),
283                'y_coordinate': list(y_coordinate),
284                'z_coordinate': list(z_coordinate)}

Reports the structure total base reactions.

Returns

total base reactions analysis results

def base_react_with_centroid(self) -> pytabs.analysis_results.BaseReactWithCentroid:
287    def base_react_with_centroid(self) -> BaseReactWithCentroid:
288        """Reports the structure total base reactions and includes information on the centroid of the translational reaction forces.
289        
290        :return: Base reaction with centriod analysis results 
291        :rtype: BaseReactWithCentroid
292        """
293        number_results = int()
294        load_case = [str()]
295        step_type = [str()]
296        step_number = [float()]
297        force_x = [float()]
298        force_y = [float()]
299        force_z = [float()]
300        moment_x = [float()]
301        moment_y = [float()]
302        moment_z = [float()]
303        x_coordinate = [float()]
304        y_coordinate = [float()]
305        z_coordinate = [float()]
306        x_centroid_for_force_x = [float()]
307        y_centroid_for_force_y = [float()]
308        z_centroid_for_force_x = [float()]
309        x_centroid_for_force_y = [float()]
310        y_centroid_for_force_y = [float()]
311        z_centroid_for_force_y = [float()]
312        x_centroid_for_force_z = [float()]
313        y_centroid_for_force_z = [float()]
314        z_centroid_for_force_z = [float()]
315        
316        [ret, number_results, load_case, step_type, step_number,
317            force_x, force_y, force_z, moment_x, moment_y, moment_z,
318            x_coordinate, y_coordinate, z_coordinate,
319            x_centroid_for_force_x, y_centroid_for_force_y, z_centroid_for_force_x,
320            x_centroid_for_force_y, y_centroid_for_force_y, z_centroid_for_force_y,
321            x_centroid_for_force_z, y_centroid_for_force_z, z_centroid_for_force_z] = self.analysis_results.BaseReactWithCentroid(number_results, load_case, step_type, step_number,
322                                                                                                                                force_x, force_y, force_z, moment_x, moment_y, moment_z,
323                                                                                                                                x_coordinate, y_coordinate, z_coordinate,
324                                                                                                                                x_centroid_for_force_x, y_centroid_for_force_y, z_centroid_for_force_x,
325                                                                                                                                x_centroid_for_force_y, y_centroid_for_force_y, z_centroid_for_force_y,
326                                                                                                                                x_centroid_for_force_z, y_centroid_for_force_z, z_centroid_for_force_z)
327        handle(ret)
328        return {'number_results': number_results,
329                'load_case': list(load_case),
330                'step_type': list(step_type),
331                'step_number': list(step_number),
332                'force_x': list(force_x),
333                'force_y': list(force_y),
334                'force_z': list(force_z),
335                'moment_x': list(moment_x),
336                'moment_y': list(moment_y),
337                'moment_z': list(moment_z),
338                'x_coordinate': list(x_coordinate),
339                'y_coordinate': list(y_coordinate),
340                'z_coordinate': list(z_coordinate), 
341                'x_centroid_for_force_x': list(x_centroid_for_force_x),
342                'y_centroid_for_force_x': list(y_centroid_for_force_y),
343                'z_centroid_for_force_x': list(z_centroid_for_force_x),
344                'x_centroid_for_force_y': list(x_centroid_for_force_y),
345                'y_centroid_for_force_y': list(y_centroid_for_force_y),
346                'z_centroid_for_force_y': list(z_centroid_for_force_y),
347                'x_centroid_for_force_z': list(x_centroid_for_force_z),
348                'y_centroid_for_force_z': list(y_centroid_for_force_z),
349                'z_centroid_for_force_z': list(z_centroid_for_force_z)}

Reports the structure total base reactions and includes information on the centroid of the translational reaction forces.

Returns

Base reaction with centriod analysis results

def buckling_factor(self) -> pytabs.analysis_results.BucklingFactor:
352    def buckling_factor(self) -> BucklingFactor:
353        """Reports buckling factors obtained from buckling load cases. 
354        
355        :return: Buckling factors analysis results 
356        :rtype: BucklingFactor
357        """
358        number_results = int()
359        load_case = [str()]
360        step_type = [str()]
361        step_number = [float()]
362        factor = [float()]
363        
364        [ret, number_results, load_case,
365            step_type, step_number, factor] = self.analysis_results.BucklingFactor(number_results, load_case,
366                                                                                step_type, step_number, factor)
367        handle(ret)
368        return {'number_results': number_results,
369                'load_case': list(load_case),
370                'step_type': list(step_type),
371                'step_number': list(step_number),
372                'factor': list(factor)}

Reports buckling factors obtained from buckling load cases.

Returns

Buckling factors analysis results

def joint_displacement( self, name: str, item_type_element: ETABSv1.eItemTypeElm) -> pytabs.analysis_results.JointDisplacement:
382    def joint_displacement(self, name : str, item_type_element : etabs.eItemTypeElm) -> JointDisplacement:
383        """Reports the joint displacements for the specified point elements.
384        The displacements reported by this function are relative displacements.
385
386        :param name: The name of an existing point object, point element, or group of objects depending on the value of the ItemTypeElm item
387        :type name: str
388        :param item_type_element: one of the following items in the `eItemTypeElm` enumeration.
389        `ObjectElm` - the point element corresponding to the point object specified by the `name`
390        `Element` - the point element specified by `name`
391        `GroupElm` - all point elements directly or indirectly specified in the group specified by `name`
392        `SelectionElm` - all point elements directly or indirectly selected and `name` is ignored
393        :type item_type_element: etabs.eItemTypeElm
394        :return: Joint Displacement analysis results 
395        :rtype: JointDisplacement
396        """
397        number_results = int()
398        object_name = [str()]
399        element_name = [str()]
400        load_case = [str()]
401        step_type = [str()]
402        step_number = [float()]
403        delta_1 = [float()]
404        delta_2 = [float()]
405        delta_3 = [float()]
406        rotation_1 = [float()]
407        rotation_2 = [float()]
408        rotation_3 = [float()]
409        
410        [ret, number_results, object_name, element_name,
411        load_case, step_type, step_number,
412        delta_1, delta_2, delta_3,
413        rotation_1, rotation_2, rotation_3] = self.analysis_results.JointDispl(name, item_type_element, number_results,
414                                                                               object_name, element_name, 
415                                                                               load_case, step_type, step_number,
416                                                                               delta_1, delta_2, delta_3,
417                                                                               rotation_1, rotation_2, rotation_3)
418        handle(ret)
419        return {'number_results': number_results, 
420                'object_name': list(object_name),
421                'element_name': list(element_name), 
422                'load_case': list(load_case),
423                'step_type': list(step_type),
424                'step_number': list(step_number), 
425                'delta_1': list(delta_1), 
426                'delta_2': list(delta_2),
427                'delta_3': list(delta_3),
428                'rotation_1': list(rotation_1), 
429                'rotation_2': list(rotation_2),
430                'rotation_3': list(rotation_3)}

Reports the joint displacements for the specified point elements. The displacements reported by this function are relative displacements.

Parameters
  • name: The name of an existing point object, point element, or group of objects depending on the value of the ItemTypeElm item
  • item_type_element: one of the following items in the eItemTypeElm enumeration. ObjectElm - the point element corresponding to the point object specified by the name Element - the point element specified by name GroupElm - all point elements directly or indirectly specified in the group specified by name SelectionElm - all point elements directly or indirectly selected and name is ignored
Returns

Joint Displacement analysis results

def modal_load_participation_ratios(self) -> pytabs.analysis_results.ModalLoadParticipationRatios:
443    def modal_load_participation_ratios(self) -> ModalLoadParticipationRatios:
444        """Reports the modal load participation ratios for each selected modal analysis case
445        
446        :return: Modal load participation ratios analysis results 
447        :rtype: ModalLoadParticipationRatios
448        """
449        number_results = int()
450        load_case = [str()]
451        item_type = [str()]
452        item = [str()]
453        static_ratios = [float()]
454        dynamic_ratios = [float()]
455
456        [ret, number_results, 
457            load_case,item_type, item,
458            static_ratios, dynamic_ratios] = self.analysis_results.ModalLoadParticipationRatios(number_results, load_case,
459                                                                                                item_type, item,
460                                                                                                static_ratios, dynamic_ratios)
461        handle(ret)
462        return {'number_results': number_results,
463                'load_case': list(load_case),
464                'item_type': list(item_type),
465                'item': list(item),
466                'static_ratios': list(static_ratios),
467                'dynamic_ratios': list(dynamic_ratios)}

Reports the modal load participation ratios for each selected modal analysis case

Returns

Modal load participation ratios analysis results

def modal_participating_mass_ratios(self) -> pytabs.analysis_results.ModalParticipatingMassRatios:
470    def modal_participating_mass_ratios(self) -> ModalParticipatingMassRatios:
471        """Reports the modal participating mass ratios for each mode of each selected modal analysis case.
472        
473        :return: Modal participating mass ratios analysis results 
474        :rtype: ModalParticipatingMassRatios
475        """
476        number_results = int()
477        load_case = [str()]
478        step_type = [str()]
479        step_number = [float()]
480        period = [float()]
481        delta_x = [float()]
482        delta_y = [float()]
483        delta_z = [float()]
484        sum_delta_x = [float()]
485        sum_delta_y = [float()]
486        sum_delta_z = [float()]
487        rotation_x = [float()]
488        rotation_y = [float()]
489        rotation_z = [float()]
490        sum_rotation_x = [float()]
491        sum_rotation_y = [float()]
492        sum_rotation_z = [float()]
493
494        [ret, number_results, load_case,
495         step_type, step_number, period,
496         delta_x, delta_y, delta_z,
497         sum_delta_x, sum_delta_y, sum_delta_z,
498         rotation_x, rotation_y, rotation_z,
499         sum_rotation_x, sum_rotation_y, sum_rotation_z] = self.analysis_results.ModalParticipatingMassRatios(number_results, load_case,
500                                                                                                              step_type, step_number, period,
501                                                                                                              delta_x, delta_y, delta_z,
502                                                                                                              sum_delta_x, sum_delta_y, sum_delta_z,
503                                                                                                              rotation_x, rotation_y, rotation_z,
504                                                                                                              sum_rotation_x, sum_rotation_y, sum_rotation_z)
505        handle(ret)
506        return {'number_results': number_results,
507                'load_case': list(load_case),
508                'step_type': list(step_type),
509                'step_number': list(step_number),
510                'period': list(period),
511                'delta_x': list(delta_x),
512                'delta_y': list(delta_y),
513                'delta_z': list(delta_z),
514                'sum_delta_x': list(sum_delta_x),
515                'sum_delta_y': list(sum_delta_y),
516                'sum_delta_z': list(sum_delta_z),
517                'rotation_x': list(rotation_x),
518                'rotation_y': list(rotation_y),
519                'rotation_z': list(rotation_z),
520                'sum_rotation_x': list(sum_rotation_x),
521                'sum_rotation_y': list(sum_rotation_y),
522                'sum_rotation_z': list(sum_rotation_z)}

Reports the modal participating mass ratios for each mode of each selected modal analysis case.

Returns

Modal participating mass ratios analysis results

def modal_participation_factors(self) -> pytabs.analysis_results.ModalParticipationFactors:
525    def modal_participation_factors(self) -> ModalParticipationFactors:
526        """Reports the modal participation factors for each mode of each selected modal analysis case.
527        
528        :return: Modal participation factors analysis results
529        :rtype: ModalParticipationFactors
530        """
531        number_results = int()
532        load_case = [str()]
533        step_type = [str()]
534        step_number = [float()]
535        period = [float()]
536        delta_x = [float()]
537        delta_y = [float()]
538        delta_z = [float()]
539        rotation_x = [float()]
540        rotation_y = [float()]
541        rotation_z = [float()]
542        modal_mass = [float()]
543        modal_stiff = [float()]
544
545        [ret, number_results, load_case,
546            step_type, step_number, period,
547            delta_x, delta_y, delta_z,
548            rotation_x, rotation_y, rotation_z,
549            modal_mass, modal_stiff] = self.analysis_results.ModalParticipationFactors(number_results, load_case,
550                                                                                    step_type, step_number, period,
551                                                                                    delta_x, delta_y, delta_z,
552                                                                                    rotation_x, rotation_y, rotation_z,
553                                                                                    modal_mass, modal_stiff)
554        handle(ret)
555        return {'number_results': number_results,
556                'load_case': list(load_case),
557                'step_type': list(step_type),
558                'step_number': list(step_number),
559                'period': list(period),
560                'delta_x': list(delta_x),
561                'delta_y': list(delta_y),
562                'delta_z': list(delta_z),
563                'rotation_x': list(rotation_x),
564                'rotation_y': list(rotation_y),
565                'rotation_z': list(rotation_z),
566                'modal_mass': list(modal_mass),
567                'modal_stiff': list(modal_stiff)}

Reports the modal participation factors for each mode of each selected modal analysis case.

Returns

Modal participation factors analysis results

def modal_period(self) -> pytabs.analysis_results.ModalPeriod:
570    def modal_period(self) -> ModalPeriod:
571        """Reports the modal period, cyclic frequency, circular frequency and eigenvalue for each selected modal load case.
572        
573        :return: Modal period analysis results
574        :rtype: ModalPeriod
575        """
576        number_results = int()
577        load_case = [str()]
578        step_type = [str()]
579        step_number = [int()]
580        period = [float()]
581        frequency = [float()]
582        circular_frequency = [float()]
583        eigen_value = [float()]
584        
585        [ret, number_results, load_case, step_type, step_number,
586         period, frequency, circular_frequency, eigen_value] = self.analysis_results.ModalPeriod(number_results, load_case, step_type, step_number,
587                                                                                                 period, frequency, circular_frequency, eigen_value)
588        handle(ret)
589        return {'number_results': number_results,
590                'load_case': list(load_case),
591                'step_type': list(step_type),
592                'step_number': list(step_number),
593                'period': list(period),
594                'frequency': list(frequency),
595                'circular_frequency': list(circular_frequency),
596                'eigen_value': list(eigen_value)}

Reports the modal period, cyclic frequency, circular frequency and eigenvalue for each selected modal load case.

Returns

Modal period analysis results

def pier_force(self) -> pytabs.analysis_results.PierForce:
604    def pier_force(self) -> PierForce:
605        """Retrieves pier forces for any defined pier objects in the model.
606        
607        :return: Pier force analysis results
608        :rtype: PierForce
609        """
610        number_results = int()
611        story_name = [str()]
612        pier_name = [str()]
613        load_case = [str()]
614        location = [str()]
615        axial = [float()]
616        shear_2 = [float()]
617        shear_3 = [float()]
618        torsion = [float()]
619        moment_2 = [float()]
620        moment_3 = [float()]
621        
622        [ret, number_results, story_name, pier_name,
623         load_case, location, axial, shear_2, shear_3, torsion, moment_2, moment_3] = self.analysis_results.PierForce(number_results, story_name, pier_name,
624                                                                                      load_case, location, axial, shear_2, shear_3, torsion, moment_2, moment_3)
625        handle(ret)
626        return {'number_results': number_results,
627                'story_name': list(story_name),
628                'pier_name': list(pier_name),
629                'load_case': list(load_case),
630                'location': list(location),
631                'axial': list(axial),
632                'shear_2': list(shear_2),
633                'shear_3': list(shear_2),
634                'torsion': list(torsion),
635                'moment_2': list(moment_2),
636                'moment_3': list(moment_3)}

Retrieves pier forces for any defined pier objects in the model.

Returns

Pier force analysis results

def section_cut_analysis(self) -> pytabs.analysis_results.SectionCutAnalysis:
639    def section_cut_analysis(self) -> SectionCutAnalysis:
640        """Reports the section cut force for sections cuts that are specified to have an analysis 
641        (force_1, force_2, force_3, moment_1, moment_2, moment_3) result type.
642        
643        :return: section cut analysis results
644        :rtype: SectionCutAnalysis
645        """
646        number_results = int()
647        section_cut = [str()]
648        load_case = [str()]
649        step_type = [str()]
650        step_number = [float()]
651        force_1 = [float()]
652        force_2 = [float()]
653        force_3 = [float()]
654        moment_1 = [float()]
655        moment_2 = [float()]
656        moment3 = [float()]
657
658        [ret, number_results, section_cut,
659         load_case, step_type, step_number,
660         force_1, force_2, force_3,
661         moment_1, moment_2, moment3] = self.analysis_results.SectionCutAnalysis(number_results, section_cut,
662                                                                                 load_case, step_type, step_number,
663                                                                                 force_1, force_2, force_3,
664                                                                                 moment_1, moment_2, moment3)
665        handle(ret)
666        return {'number_results': number_results,
667                'section_cut': list(section_cut),
668                'load_case': list(load_case),
669                'step_type': list(step_type),
670                'step_number': list(step_number),
671                'force_1': list(force_1),
672                'force_2': list(force_2),
673                'force_3': list(force_3),
674                'moment_1': list(moment_1),
675                'moment_2': list(moment_2),
676                'moment_3': list(moment3)}

Reports the section cut force for sections cuts that are specified to have an analysis (force_1, force_2, force_3, moment_1, moment_2, moment_3) result type.

Returns

section cut analysis results

def section_cut_design(self) -> pytabs.analysis_results.SectionCutDesign:
679    def section_cut_design(self) -> SectionCutDesign:
680        """Report the section cut force for sections cuts that are specified to have a design 
681        (axial force, shear force 2, shear force 3, torsion, moment 2, moment 3) result type.
682        
683        :return: Section cut design results 
684        :rtype: SectionCutDesign
685        """
686        number_results = int()
687        section_cut = [str()]
688        load_case = [str()]
689        step_type = [str()]
690        step_number = [float()]
691        axial = [float()]
692        shear_2 = [float()]
693        shear_3 = [float()]
694        torsion = [float()]
695        moment_2 = [float()]
696        moment_3 = [float()]
697
698        [ret, number_results, section_cut,
699        load_case, step_type, step_number,
700        axial, shear_2, shear_3,
701        torsion, moment_2, moment_3] = self.analysis_results.SectionCutAnalysis(number_results, section_cut,
702                                                                                load_case, step_type, step_number,
703                                                                                axial, shear_2, shear_3,
704                                                                                torsion, moment_2, moment_3)
705        handle(ret)
706        return {'number_results' : number_results, 
707                'section_cut' : list(section_cut),
708                'load_case' : list(load_case),
709                'step_type' : list(step_type),
710                'step_number' : list(step_number),
711                'axial' : list(axial), 
712                'shear_2' : list(shear_2),
713                'shear_3' : list(shear_3),
714                'torsion' : list(torsion),
715                'moment_2' : list(moment_2), 
716                'moment_3' : list(moment_3)}

Report the section cut force for sections cuts that are specified to have a design (axial force, shear force 2, shear force 3, torsion, moment 2, moment 3) result type.

Returns

Section cut design results

def spandrel_force(self) -> pytabs.analysis_results.SpandrelForce:
719    def spandrel_force(self) -> SpandrelForce:
720        """Retrieves spandrel forces for any defined spandrel objects in the model.
721        
722        :return: Spandrel force analysis results 
723        :rtype: SpandrelForce
724        """
725        number_results = int()
726        story_name = [str()]
727        spandrel_name = [str()]
728        load_case = [str()]
729        location = [str()]
730        axial = [float()]
731        shear_2 = [float()]
732        shear_3 = [float()]
733        torsion = [float()]
734        moment_2 = [float()]
735        moment_3 = [float()]
736
737        [ret, number_results, story_name,
738            spandrel_name, load_case, location,
739            axial, shear_2, shear_3,
740            torsion, moment_2, moment_3] = self.analysis_results.SpandrelForce(number_results, story_name,
741                                                                            spandrel_name, load_case, location,
742                                                                            axial, shear_2, shear_3,
743                                                                            torsion, moment_2, moment_3)
744        handle(ret)
745        return {'number_results': number_results,
746                'story_name': list(story_name),
747                'spandrel_name': list(spandrel_name),
748                'load_case': list(load_case),
749                'location': list(location),
750                'axial': list(axial), 
751                'shear_2': list(shear_2),
752                'shear_3': list(shear_3),
753                'torsion': list(torsion),
754                'moment_2': list(moment_2), 
755                'moment_3': list(moment_3)}

Retrieves spandrel forces for any defined spandrel objects in the model.

Returns

Spandrel force analysis results

def story_drifts(self) -> pytabs.analysis_results.StoryDrift:
758    def story_drifts(self) -> StoryDrift:
759        """Reports the story drifts.
760        
761        :return: Story drifts analysis results 
762        :rtype: StoryDrift
763        """
764        number_results = int()
765        story = [str()]
766        load_case = [str()]
767        step_type = [str()]
768        step_number = [float()]
769        direction = [str()]
770        drift = [float()]
771        label = [str()]
772        delta_x = [float()]
773        delta_y = [float()]
774        delta_z = [float()]
775
776        [ret, number_results, story, load_case,
777        step_type, step_number,
778        direction, drift, label,
779        delta_x, delta_y, delta_z] = self.analysis_results.StoryDrifts(number_results, story, load_case,
780                                                                                   step_type, step_number,
781                                                                                   direction, drift, label,
782                                                                                   delta_x, delta_y, delta_z)
783        handle(ret)
784        return {'number_results': number_results,
785                'story': list(story), 
786                'load_case': list(load_case),
787                'step_type': list(step_type),
788                'step_number': list(step_number),
789                'direction': list(direction),
790                'drift': list(drift),
791                'label': list(label),
792                'delta_x': list(delta_x),
793                'delta_y': list(delta_y),
794                'delta_z': list(delta_z)}

Reports the story drifts.

Returns

Story drifts analysis results