Example #1
0
    def displayPressures(self,
                         caption,
                         fUnitConv,
                         unitDescription,
                         rgMinMax=None,
                         fileName=None):
        '''Display foundation pressures for a single load case.
        :param rgMinMax: range (vmin,vmax) with the maximum and minimum values  
              of the scalar field (if any) to be represented. All the values 
              less than vmin are displayed in blue and those greater than vmax 
              in red (defaults to None)
        :param fileName: file name (defaults to None -> screen display)
        '''
        reac = self.calcPressures()

        field = Fields.ExtrapolatedScalarField('soilPressure',
                                               'getProp',
                                               self.foundationSet,
                                               component=2,
                                               fUnitConv=fUnitConv,
                                               rgMinMax=rgMinMax)
        defDisplay = vtk_FE_graphic.RecordDefDisplayEF()
        field.display(defDisplay,
                      caption=caption + ' ' + unitDescription,
                      fName=fileName)
Example #2
0
    def displayMaxPressures(self,
                            FEcase,
                            combs,
                            caption,
                            fUnitConv,
                            unitDescription,
                            rgMinMax=None,
                            fileName=None):
        '''Calculate and display the maximum earth pressures (Z direction)
        obtained from the group of load combinations passed as paremeter.

        :param FEcase: finite element problem
        :param combs: load cases to analyze and compare to obtain the maximum 
                    pressures.
        :param caption: caption text to diaplay.
        :param fUnitConv: factor to apply to results (unit conversion)
        :param unitDescription: text to display as unit description.
        :param rgMinMax: range (vmin,vmax) with the maximum and minimum values  
              of the scalar field (if any) to be represented. All the values 
              less than vmin are displayed in blue and those greater than vmax 
              in red (defaults to None)
        :param fileName: file name (defaults to None -> screen display)
        '''
        #Init max. pressures
        nodSet = self.foundationSet.getNodes
        for n in nodSet:
            n.setProp('maxSoilPressure', -1e10)
        #Calculate max. pressures
        for lc in combs:
            lcs = QGrph.QuickGraphics(FEcase)
            lcs.solve(loadCaseName=combs[lc].name, loadCaseExpr=combs[lc].expr)
            reac = self.calcPressures()
            for n in nodSet:
                prs = n.getProp('soilPressure')[2]
                if prs > n.getProp('maxSoilPressure'):
                    n.setProp('maxSoilPressure', prs)
        #Display max. pressures
        field = Fields.ExtrapolatedScalarField(name='maxSoilPressure',
                                               functionName='getProp',
                                               xcSet=self.foundationSet,
                                               component=None,
                                               fUnitConv=fUnitConv,
                                               rgMinMax=rgMinMax)
        defDisplay = vtk_FE_graphic.RecordDefDisplayEF()
        field.display(defDisplay,
                      caption=caption + ' ' + unitDescription,
                      fName=fileName)