Beispiel #1
0
    def importFaces(self):
        ''' Import 3D faces from DXF.'''
        self.facesByLayer = {}
        for name in self.layersToImport:
            self.facesByLayer[name] = dict()

        for obj in self.dxfFile.entities:
            type = obj.dxftype()
            layerName = obj.dxf.layer
            if (layerName in self.layersToImport):
                facesDict = self.facesByLayer[layerName]
                if (type == '3DFACE'):
                    vertices = list()
                    objPoints = [
                        obj.dxf.vtx0, obj.dxf.vtx1, obj.dxf.vtx2, obj.dxf.vtx3
                    ]
                    for pt in objPoints:
                        p = self.getRelativeCoo(pt)
                        idx = self.getIndexNearestPoint(p)
                        vertices.append(idx)
                    self.labelDict[obj.dxf.handle] = [layerName]
                    facesDict[obj.dxf.handle] = vertices
                elif (type == 'POLYFACE'):
                    count = 0
                    for q in self.polyfaceQuads[obj.dxf.handle]:
                        vertices = list()
                        for pt in q:
                            p = self.getRelativeCoo(pt)
                            idx = self.getIndexNearestPoint(p)
                            if not idx in vertices:
                                vertices.append(idx)
                            else:
                                lmsg.error('Point p: ' + str(p) + ' idx: ' +
                                           str(idx) + ' repeated in ' +
                                           str(q) + ' vertices: ' +
                                           str(vertices))
                        count += 1
                        id = obj.dxf.handle + '_' + str(count)
                        self.labelDict[id] = [layerName]
                        facesDict[id] = vertices
                elif ((type == 'POLYLINE') or (type == 'LWPOLYLINE')):
                    count = 0
                    if (self.polylinesAsSurfaces):  # Import as surfaces
                        for q in self.polylineQuads[obj.dxf.handle]:
                            vertices = list()
                            for pt in q:
                                p = self.getRelativeCoo(pt)
                                idx = self.getIndexNearestPoint(p)
                                if not idx in vertices:
                                    vertices.append(idx)
                                else:
                                    lmsg.error('Point p: ' + str(p) +
                                               ' idx: ' + str(idx) +
                                               ' repeated in ' + str(q) +
                                               ' vertices: ' + str(vertices))
                            count += 1
                            id = obj.dxf.handle + '_' + str(count)
                            self.labelDict[id] = [layerName]
                            facesDict[id] = vertices
                elif (type == 'LINE'):
                    count = 0
                    # Nothing to do with lines for the moment.
                elif (type == 'POINT'):
                    count = 0
                    # Nothing to do with points for the moment.
                else:
                    lmsg.log('Entity of type: ' + type + ' ignored.')
Beispiel #2
0
 def getDict(self):
     ''' Put member values in a dictionary.'''
     if (self.xc_material):
         lmsg.error('Cannot export xc materials yet.')
     retval = {'sectionName': self.sectionName, 'xc_material': None}
     return retval
Beispiel #3
0
 def defInteractionDiagramNMz(self,preprocessor):
     'Defines N-Mz interaction diagram.'
     if(not self.fiberSectionRepr):
         lmsg.error("defInteractionDiagramNMz: fiber section representation for section: "+ self.sectionName + ";  not defined yet; use defRCSection method.\n")
     self.defInteractionDiagramParameters(preprocessor)
     return preprocessor.getMaterialHandler.calcInteractionDiagramNMz(self.sectionName,self.fiberSectionParameters.idParams)
Beispiel #4
0
 def importLines(self):
     ''' Import lines from DXF.'''
     self.lines = {}
     self.polylines = {}
     for obj in self.dxfFile.entities:
         type = obj.dxftype()
         lineName = obj.dxf.handle
         layerName = obj.dxf.layer
         if (layerName in self.layersToImport):
             if (type == 'LINE'):
                 vertices = [-1, -1]
                 p1 = self.getRelativeCoo(obj.dxf.start)
                 p2 = self.getRelativeCoo(obj.dxf.end)
                 length = cdist([p1], [p2])[0][0]
                 # Try to have all lines with the
                 # same orientation.
                 idx0, idx1 = self.getOrientation(p1, p2, length)
                 # end orientation.
                 vertices[0] = idx0
                 vertices[1] = idx1
                 if (vertices[0] == vertices[1]):
                     lmsg.error('Error in line ' + lineName +
                                ' vertices are equal: ' + str(vertices))
                 if (length > self.threshold):
                     self.lines[lineName] = vertices
                     objLabels = [layerName]
                     # xdata
                     if (obj.has_xdata('XC')):
                         objLabels.extend(get_extended_data(obj))
                     # groups
                     if (lineName in self.entitiesGroups):
                         objLabels.extend(self.entitiesGroups[lineName])
                     self.labelDict[lineName] = objLabels
                 else:
                     lmsg.error('line too short: ' + str(p1) + ',' +
                                str(p2) + str(length))
             elif ((type == 'POLYLINE') or (type == 'LWPOLYLINE')):
                 if (not self.polylinesAsSurfaces):  # Import as lines
                     vertices = list()
                     for p in obj.points:
                         rCoo = self.getRelativeCoo(p)
                         vertices.append(self.getIndexNearestPoint(rCoo))
                     v1 = vertices[0]
                     for v2 in vertices[1:]:
                         if (vertices[0] == vertices[1]):
                             lmsg.error('Error in line ' + lineName +
                                        ' vertices are equal: ' +
                                        str(vertices))
                         else:
                             name = lineName + str(v1) + str(v2)
                             self.lines[name] = [v1, v2]
                             objLabels = [layerName]
                             # xdata
                             if (obj.has_xdata('XC')):
                                 objLabels.extend(get_extended_data(obj))
                             # groups
                             if (lineName in self.entitiesGroups):
                                 objLabels.extend(
                                     self.entitiesGroups[lineName])
                             self.labelDict[name] = objLabels
                         v1 = v2
Beispiel #5
0
    def getFb(self, angle=math.pi / 2.0):
        ''' Return the bending stress Fb or the panel according
            to the table A of the document:
            "Design Capacities for Oriented Strand Board V1.0 – 01/2008"
            from PFS TECO • 1507 Matt Pass, Cottage Grove, WI 53527, USA

            angle: angle of the stress with the strength axis.
        '''
        spanRating = self.getAPARatedSturdIFloor()
        FbS = 0.0
        if ((angle != 0.0) and (angle != math.pi / 2.0)):
            lmsg.error('angle must be 0 or PI/2')
        if (spanRating != 'unknown'):
            if (spanRating == '16oc'):
                if (angle == 0.0):
                    FbS = 500.0
                else:
                    FbS = 180.0
            elif (spanRating == '20oc'):
                if (angle == 0.0):
                    FbS = 575.0
                else:
                    FbS = 250.0
            elif (spanRating == '24oc'):
                if (angle == 0.0):
                    FbS = 770.0
                else:
                    FbS = 385.0
            elif (spanRating == '32oc'):
                if (angle == 0.0):
                    FbS = 1050.0
                else:
                    FbS = 685.0
            elif (spanRating == '48oc'):
                if (angle == 0.0):
                    FbS = 1900.0
                else:
                    FbS = 1200.0
        else:
            spanRating = self.getSpanRating()
            if (spanRating == '24/0'):
                if (angle == 0.0):
                    FbS = 300.0
                else:
                    FbS = 97.0
            elif (spanRating == '24/16'):
                if (angle == 0.0):
                    FbS = 385.0
                else:
                    FbS = 115.0
            elif (spanRating == '32/16'):
                if (angle == 0.0):
                    FbS = 445.0
                else:
                    FbS = 165.0
            elif (spanRating == '40/20'):
                if (angle == 0.0):
                    FbS = 750.0
                else:
                    FbS = 270.0
            elif (spanRating == '48/24'):
                if (angle == 0.0):
                    FbS = 1000.0
                else:
                    FbS = 405.0
        Fb = FbS / self.Wzel() * 4.44822 * 0.0254 / 0.3048
        return Fb
Beispiel #6
0
    def getE(self, angle=math.pi / 2.0):
        ''' Return the bending stress Fb or the panel according
            to the table A of the document:
            "Design Capacities for Oriented Strand Board V1.0 – 01/2008"
            from PFS TECO • 1507 Matt Pass, Cottage Grove, WI 53527, USA

            angle: angle of the stress with the strength axis.
        '''
        spanRating = self.getAPARatedSturdIFloor()
        EI = 0.0
        if ((angle != 0.0) and (angle != math.pi / 2.0)):
            lmsg.error('angle must be 0 or PI/2')
        if (spanRating != 'unknown'):
            if (spanRating == '16oc'):
                if (angle == 0.0):
                    EI = 150e3
                else:
                    EI = 34e3
            elif (spanRating == '20oc'):
                if (angle == 0.0):
                    EI = 210e3
                else:
                    EI = 40.5e3
            elif (spanRating == '24oc'):
                if (angle == 0.0):
                    EI = 300e3
                else:
                    EI = 80.5e3
            elif (spanRating == '32oc'):
                if (angle == 0.0):
                    EI = 650e3
                else:
                    EI = 235e3
            elif (spanRating == '48oc'):
                if (angle == 0.0):
                    EI = 1150e3
                else:
                    EI = 495e3
        else:
            spanRating = self.getSpanRating()
            if (spanRating == '24/0'):
                if (angle == 0.0):
                    EI = 60e3
                else:
                    EI = 11e3
            elif (spanRating == '24/16'):
                if (angle == 0.0):
                    EI = 78e3
                else:
                    EI = 16e3
            elif (spanRating == '32/16'):
                if (angle == 0.0):
                    EI = 115e3
                else:
                    EI = 25e3
            elif (spanRating == '40/20'):
                if (angle == 0.0):
                    EI = 225e3
                else:
                    EI = 56e3
            elif (spanRating == '48/24'):
                if (angle == 0.0):
                    EI = 400e3
                else:
                    EI = 91.5e3
        E = EI / self.Iz() * 4.44822 * 0.0254**2 / 0.3048
        return E
Beispiel #7
0
lp0.newNodalLoad(n2.tag, xc.Vector([F, 0]))

## Add the load pattern to the domain.
modelSpace.addLoadCaseToDomain(lp0.name)

# Solution
solProc = predefined_solutions.PenaltyNewtonLineSearch(
    feProblem,
    printFlag=0,
    convergenceTestTol=1e-7,
    maxNumIter=6,
    convTestType='norm_unbalance_conv_test')
analOk = solProc.solve(calculateNodalReactions=True,
                       reactionCheckTolerance=1e-10)
if (analOk != 0):
    lmsg.error('Failed to solve for: ' + lp0.name)
    quit()

# Results
ux_I = n2.getDisp[0]
ux_refI = F * l / (E * 2 * A)  # Both elements are active
R1_I = n1.getReaction[0]
R2_I = n2.getReaction[0]
NA_I = trussA.getN1
NB_I = trussB.getN1
halfF = F / 2.0

ratio0 = (ux_I - ux_refI) / ux_refI
ratio1 = (R1_I + F) / F
ratio2 = (R2_I)
ratio3 = (NA_I - halfF) / halfF
Beispiel #8
0
def getInternalForcesDict(nmbComb, elems):
    '''Creates a dictionary with the element's internal forces.

    :param nmbComb: combination name.
    :param elems: element set.
    :param fDesc: file descriptor to write internal forces on.
    '''
    combInternalForcesDict= dict()
    outDict= dict()
    combInternalForcesDict[nmbComb]= outDict
    for e in elems:
        elemDict= dict()
        outDict[e.tag]= elemDict
        elementType= e.type()
        elemDict['type']= elementType
        if('Shell' in elementType):
            internalForces= internal_forces.ShellMaterialInternalForces()
            internalForces.setFromAverageInShellElement(e)
            internalForces= internalForces.getWoodArmer()
            sz= len(internalForces)
            internalForcesDict= dict()
            for i in range(0,sz):
                nForceDict= dict()
                force= internalForces[i]
                internalForcesDict[i]= force.getDict()
            elemDict['internalForces']= internalForcesDict
        elif('Beam2d' in elementType):
            e.getResistingForce()
            internalForcesDict= dict()
            # Internal forces of the bar. 
            N1= 0.0; M1= 0.0; V1= 0.0
            N2= 0.0; M2= 0.0; V2= 0.0
            axialForces= e.getValuesAtNodes('N')
            if(len(axialForces)>1): # 'N' found.
                N1= axialForces[0]
                N2= axialForces[1]
            bending= e.getValuesAtNodes('M')
            if(len(bending)>1): # 'M' found.
                M1= bending[0]
                M2= bending[1]
            shear= e.getValuesAtNodes('V')
            if(len(shear)>1): # 'V' found.
                V1= shear[0]
                V2= shear[1]
            internalForces= internal_forces.CrossSectionInternalForces(N1,V1,0.0,0.0,0.0,M1) 
            internalForcesDict[0]= internalForces.getDict()
            internalForces= internal_forces.CrossSectionInternalForces(N2,V2,0.0,0.0,0.0,M2) # Internal forces at the end of the bar.
            internalForcesDict[1]= internalForces.getDict()
            elemDict['internalForces']= internalForcesDict
        elif('Beam' in elementType):
            e.getResistingForce()
            internalForcesDict= dict()
            N1= 0.0; My1= 0.0; Mz1= 0.0; Vy1= 0.0;
            N2= 0.0; My2= 0.0; Mz2= 0.0; Vy2= 0.0;
            axialForces= e.getValuesAtNodes('N')
            if(len(axialForces)>1): # 'N' found.
                N1= axialForces[0]
                N2= axialForces[1]
            shearY= e.getValuesAtNodes('Vy')
            if(len(shearY)>1): # 'Vy' found.
                Vy1= shearY[0]
                Vy2= shearY[1]
            shearZ= e.getValuesAtNodes('Vz')
            if(len(shearZ)>1): # 'Vz' found.
                Vz1= shearZ[0]
                Vz2= shearZ[1]
            torque= e.getValuesAtNodes('T')
            if(len(torque)>1): # 'T' found.
                T1= torque[0]
                T2= torque[1]
            bendingY= e.getValuesAtNodes('My')
            if(len(bendingY)>1): # 'My' found.
                My1= bendingY[0]
                My2= bendingY[1]
            bendingZ= e.getValuesAtNodes('Mz')
            if(len(bendingZ)>1): # 'Mz' found.
                Mz1= bendingZ[0]
                Mz2= bendingZ[1]
            internalForces= internal_forces.CrossSectionInternalForces(N1,Vy1,Vz1,T1,My1,Mz1) # Internal forces at the origin of the bar.
            internalForcesDict[0]= internalForces.getDict()
            if e.hasProp('chiLT'):   #steel beam
                internalForcesDict[0]['chiLT']= e.getProp('chiLT')
            if e.hasProp('chiN'):   #steel beam
                internalForcesDict[0]['chiN']= e.getProp('chiN')
            internalForces= internal_forces.CrossSectionInternalForces(N2,Vy2,Vz2,T2,My2,Mz2) # Internal forces at the end of the bar.
            internalForcesDict[1]= internalForces.getDict()
            if e.hasProp('chiLT'):
                internalForcesDict[1]['chiLT']= e.getProp('chiLT')
            if e.hasProp('chiN'):
                internalForcesDict[1]['chiN']= e.getProp('chiN')
            elemDict['internalForces']= internalForcesDict
        elif('Truss' in elementType):
            e.getResistingForce()
            internalForcesDict= dict()
            N1= 0.0
            N2= 0.0
            axialForces= e.getValuesAtNodes('N')
            if(len(axialForces)>1): # 'N' found.
                N1= axialForces[0]
                N2= axialForces[1]
            internalForces= internal_forces.CrossSectionInternalForces(N1) # Internal forces at the origin of the bar.
            internalForcesDict[0]= internalForces.getDict()
            if e.hasProp('chiLT'):   #steel beam
                internalForcesDict[0]['chiLT']= e.getProp('chiLT')
            if e.hasProp('chiN'):   #steel beam
                internalForcesDict[0]['chiN']= e.getProp('chiN')
            internalForces= internal_forces.CrossSectionInternalForces(N2) # Internal forces at the end of the bar.
            internalForcesDict[1]= internalForces.getDict()
            if e.hasProp('chiLT'):
                internalForcesDict[1]['chiLT']= e.getProp('chiLT')
            if e.hasProp('chiN'):
                internalForcesDict[1]['chiN']= e.getProp('chiN')
            elemDict['internalForces']= internalForcesDict
        elif('ZeroLength' in elementType):
          lmsg.warning("exportInternalForces for element type: '"+elementType+"' not implemented.")
        else:
          lmsg.error("exportInternalForces error; element type: '"+elementType+"' unknown.")
    return combInternalForcesDict
Beispiel #9
0
 def check(self, elements, nmbComb):
     '''Limit state control.'''
     lmsg.error('limit state check not implemented.')
Beispiel #10
0
 def getIyHomogenizedSection(self):
     '''returns the second moment of area about the axis parallel to 
     the section depth through the center of gravity'''
     lmsg.error('getIyHomogenizedSection not implemented yet.')
     # Need to compute the steel distribution along the z axis.
     return self.getIy()
Beispiel #11
0
 def check(self, elements, combName):
     '''Shear control.'''
     lmsg.error('shear limit state check not implemented.')
Beispiel #12
0
## Recorder for strand elements.
x = []
y = []
steelRecorder = feProblem.getDomain.newRecorder("element_prop_recorder", None)
steelElementTag = xc.ID(strandElementsSet.getElementTags())[1]
steelRecorder.setElements(xc.ID([steelElementTag]))
steelRecorder.callbackRecord = "x.append(self.getMaterial().getStrain()*1e3); y.append(self.getMaterial().getStress()/1e6)"
steelRecorder.callbackRestart = "print(\"Restart method called.\")"

## Solve for prestressing.
if (strandInitialStress > 0.0):
    #print('** Solve for presstressing.', flush= True)
    analOk = solProc1.solve(True)
    if (analOk != 0):
        lmsg.error('Failed to solve for prestressing.')
        quit()
    #print('** Solved.', flush= True)

R01 = getFixedNodesReaction()
ratio01 = abs(R01)
R02 = getFreeNodesReaction()
ratio02 = R02
strandInitStress0, strandStress0 = getStrandStresses()
concreteStress0 = getConcreteStress()
concreteStrain0, concreteInitialStrain0 = getConcreteStrain()

# Shrinkage.
concreteElementTags = list()
for e in s1.elements:
    concreteElementTags.append(e.tag)
Beispiel #13
0
def exportInternalForces(nmbComb, elems, fDesc):
    '''Writes a comma separated values file with the element's internal forces.

    :param nmbComb: combination name.
    :param elems: element set.
    :param fDesc: file descriptor to write internal forces on.'''
    errMsg= 'exportInternalForces deprecated use getInternalForcesDict'
    errMsg+= 'with apropriate arguments'
    for e in elems:
        elementType= e.type()
        if('Shell' in elementType):
          internalForces= internal_forces.ShellMaterialInternalForces()
          internalForces.setFromAverageInShellElement(e)
          forcesOnNodes= internalForces.getWoodArmer()
          sz= len(forcesOnNodes)
          for i in range(0,sz):
            force= forcesOnNodes[i]
            outStr= nmbComb+", "+str(e.tag)+", "+str(i)+", "+force.getCSVString()+'\n'
            fDesc.write(outStr)
        elif('Beam2d' in elementType):
            e.getResistingForce()
            # Internal forces at the origin of the bar. 
            N1= 0.0; M1= 0.0; V1= 0.0
            N2= 0.0; M2= 0.0; V2= 0.0
            axialForces= e.getValuesAtNodes('N')
            if(len(axialForces)>1): # 'N' found.
                N1= axialForces[0]
                N2= axialForces[1]
            bending= e.getValuesAtNodes('M')
            if(len(bending)>1): # 'M' found.
                M1= bending[0]
                M2= bending[1]
            shear= e.getValuesAtNodes('V')
            if(len(shear)>1): # 'V' found.
                V1= shear[0]
                V2= shear[1]
            internalForces= internal_forces.CrossSectionInternalForces(N1,V1,0.0,0.0,0.0,M1) 
            fDesc.write(nmbComb+", "+str(e.tag)+", 0, "+internalForces.getCSVString()+'\n')
            internalForces= internal_forces.CrossSectionInternalForces(N2,V2,0.0,0.0,0.0,M2) # Internal forces at the end of the bar.
            fDesc.write(nmbComb+", "+str(e.tag)+", 1, "+internalForces.getCSVString()+'\n')
        elif('Beam' in elementType):
            e.getResistingForce()
            N1= 0.0; Vy1= 0.0; Vz1= 0.0; T1= 0.0; My1= 0.0; Mz1= 0.0
            N2= 0.0; Vy2= 0.0; Vz2= 0.0; T2= 0.0; My2= 0.0; Mz2= 0.0 
            axialForces= e.getValuesAtNodes('N')
            if(len(axialForces)>1): # 'N' found.
                N1= axialForces[0]
                N2= axialForces[1]
            shearY= e.getValuesAtNodes('Vy')
            if(len(shearY)>1): # 'Vy' found.
                Vy1= shearY[0]
                Vy2= shearY[1]
            shearZ= e.getValuesAtNodes('Vz')
            if(len(shearZ)>1): # 'Vz' found.
                Vz1= shearZ[0]
                Vz2= shearZ[1]
            torque= e.getValuesAtNodes('T')
            if(len(torque)>1): # 'T' found.
                T1= torque[0]
                T2= torque[1]
            bendingY= e.getValuesAtNodes('My')
            if(len(bendingY)>1): # 'My' found.
                My1= bendingY[0]
                My2= bendingY[1]
            bendingZ= e.getValuesAtNodes('Mz')
            if(len(bendingZ)>1): # 'Mz' found.
                Mz1= bendingZ[0]
                Mz2= bendingZ[1]
            internalForces= internal_forces.CrossSectionInternalForces(N1,Vy1,Vz1,T1,My1,Mz1) # Internal forces at the origin of the bar.
            if e.hasProp('chiLT'):   #steel beam
                fDesc.write(nmbComb+", "+str(e.tag)+", 0, "+internalForces.getCSVString()+" , "+str(e.getProp('chiLT'))+'\n')
            else:
                fDesc.write(nmbComb+", "+str(e.tag)+", 0, "+internalForces.getCSVString()+'\n')
            internalForces= internal_forces.CrossSectionInternalForces(N2,Vy2,Vz2,T2,My2,Mz2) # Internal forces at the end of the bar.
            if e.hasProp('chiLT'):
                fDesc.write(nmbComb+", "+str(e.tag)+", 1, "+internalForces.getCSVString()+" , " + str(e.getProp('chiLT'))+'\n')
            else:
                fDesc.write(nmbComb+", "+str(e.tag)+", 1, "+internalForces.getCSVString()+'\n')
        elif('Truss' in elementType):
            e.getResistingForce()
            N1= 0.0
            N2= 0.0
            axialForces= e.getValuesAtNodes('N')
            if(len(axialForces)>1): # 'N' found.
                N1= axialForces[0]
                N2= axialForces[1]
            internalForces= internal_forces.CrossSectionInternalForces(N1) # Internal forces at the origin of the bar.
            if e.hasProp('chiLT'):   #steel beam
                fDesc.write(nmbComb+", "+str(e.tag)+", 0, "+internalForces.getCSVString()+" , "+str(e.getProp('chiLT'))+'\n')
            else:
                fDesc.write(nmbComb+", "+str(e.tag)+", 0, "+internalForces.getCSVString()+'\n')
            internalForces= internal_forces.CrossSectionInternalForces(N2) # Internal forces at the end of the bar.
            if e.hasProp('chiLT'):
                fDesc.write(nmbComb+", "+str(e.tag)+", 1, "+internalForces.getCSVString()+" , " + str(e.getProp('chiLT'))+'\n')
            else:
                fDesc.write(nmbComb+", "+str(e.tag)+", 1, "+internalForces.getCSVString()+'\n')
        elif('ZeroLength' in elementType):
            lmsg.warning("exportInternalForces for element type: '"+elementType+"' not implemented.")
        else:
            lmsg.error("exportInternalForces error; element type: '"+elementType+"' unknown.")
Beispiel #14
0
    if 'IfcType' in attributes:
        ifcType = attributes['IfcType']
        if (ifcType == 'Structural Point Connection'):
            connectedMemberLabel = attributes[
                'IfcDescription']  # Dirty solution indeed :(
            nearestMember, vertexIndex, minDist = reader_base.findConnectedMember(
                xcTotalSet.lines, connectedMemberLabel, p.getPos)
            modelSpace.releaseLineExtremities(
                nearestMember,
                stiffnessFactors=stiffnessFactors,
                extremitiesToRelease=[vertexIndex])

# Check for floating nodes.
floatingNodes = modelSpace.getFloatingNodes()
if (len(floatingNodes) > 0):
    lmsg.error('There are ' + str(len(floatingNodes)) +
               ' floating nodes. Can\'t compute solution.')
    quit()

# Skylight loaded set.
skyLightWidth = 1.022
skyLightLoadedLines = ['LongLVLBeam010', 'LongLVLBeam003', 'ShortLVLBeam007']

for l in xcTotalSet.lines:
    #print(l.getPropNames())
    labels = l.getProp('labels')
    for skyLL in skyLightLoadedLines:
        if skyLL in labels:
            skyLightLoadedSet.lines.append(l)

# Loads
Beispiel #15
0
    def getEffectiveLength(self,
                           numberOfConcentratedLoads=0,
                           lateralSupport=False,
                           cantilever=False):
        ''' Return the effective length of the beam according to table
            3.3.3 of NDS-2018.

           :param numberOfConcentratedLoads: number of concentrated loads equally
                                             spaced along the beam (0: uniform load).
           :param lateralSupport: if true beam has a lateral support on each load.
           :param cantilever: if true cantilever beam otherwise single span beam.
        '''
        retval = self.unbracedLength
        if (cantilever):
            if (numberOfConcentratedLoads == 0):
                retval *= 1.33  # Uniform load
            else:
                retval *= 1.87  # Concentrated load at unsupported end.
        else:
            ratio = self.unbracedLength / self.section.h
            if (numberOfConcentratedLoads == 0):
                if (ratio < 7.0):
                    retval *= 2.06  # Uniform load
                else:
                    retval = 1.63 * self.unbracedLength + 3.0 * self.section.h
            elif ((numberOfConcentratedLoads == 1) and (not lateralSupport)):
                if (ratio < 7.0):
                    retval *= 1.80  # Uniform load
                else:
                    retval = 1.37 * self.unbracedLength + 3.0 * self.section.h
            elif (numberOfConcentratedLoads == 1):
                if (lateralSupport):
                    retval *= 1.11
                else:
                    lmsg.error('Load case not implemented.')
                    retval *= 10.0
            elif (numberOfConcentratedLoads == 2):
                if (lateralSupport):
                    retval *= 1.68
                else:
                    lmsg.error('Load case not implemented.')
                    retval *= 10.0
            elif (numberOfConcentratedLoads == 3):
                if (lateralSupport):
                    retval *= 1.54
                else:
                    lmsg.error('Load case not implemented.')
                    retval *= 10.0
            elif (numberOfConcentratedLoads == 4):
                if (lateralSupport):
                    retval *= 1.68
                else:
                    lmsg.error('Load case not implemented.')
                    retval *= 10.0
            elif (numberOfConcentratedLoads == 5):
                if (lateralSupport):
                    retval *= 1.73
                else:
                    lmsg.error('Load case not implemented.')
                    retval *= 10.0
            elif (numberOfConcentratedLoads == 6):
                if (lateralSupport):
                    retval *= 1.78
                else:
                    lmsg.error('Load case not implemented.')
                    retval *= 10.0
            elif (numberOfConcentratedLoads == 7):
                if (lateralSupport):
                    retval *= 1.84
                else:
                    lmsg.error('Load case not implemented.')
                    retval *= 10.0
        return retval
Beispiel #16
0
from __future__ import division
from __future__ import print_function
from actions.railway_trafic import SIA_rail_load_models

__author__ = "Luis C. Pérez Tato (LCPT) and Ana Ortega (AOO)"
__copyright__ = "Copyright 2015, LCPT and AOO"
__license__ = "GPL"
__version__ = "3.0"
__email__ = "*****@*****.**"

LM1 = SIA_rail_load_models.LM1  # Load model.
qDerailmentModel2_25 = LM1.trainDerailmentModel2(25.0)
qDerailmentModel2_8_4 = LM1.trainDerailmentModel2(8.4)
qDerailmentModel2_6_4 = LM1.trainDerailmentModel2(6.4)
ratio1 = abs(qDerailmentModel2_25 - 145e3) / 145e3
ratio2 = abs(qDerailmentModel2_8_4 - 208.970588235e3) / 208.970588235e3
ratio3 = abs(qDerailmentModel2_6_4 - 220e3) / 220e3
'''
print("ratio1= ", ratio1)
print("ratio2= ", ratio2)
print("ratio3= ", ratio3)
'''

import os
from misc_utils import log_messages as lmsg
fname = os.path.basename(__file__)
if ((ratio1 < 1e-15) and (ratio2 < 1e-11) and (ratio3 < 1e-15)):
    print('test ' + fname + ': ok.')
else:
    lmsg.error(fname + ' ERROR.')
Beispiel #17
0
    def getYieldLimit(self,
                      mainMemberWood,
                      sideMemberWood,
                      lm,
                      ls,
                      theta_m,
                      theta_s,
                      doubleShear=False):
        ''' Return the yield limit according to table
            12.3.1B of NDS-2018.

        :param mainMemberWood: main member Wood object.
        :param mainMemberWood: side member Wood object.
        :param lm: main member dowel bearing length.
        :param ls: side member dowel bearing length.
        :param theta_m: angle between the direction of load and the
                        direction of grain of the main member.
        :param theta_s: angle between the direction of load and the
                        direction of grain of the side member.
        :param doubleShear: double shear plane in connection.
        '''
        if (lm < 0.0):
            lmsg.error('negative main member dowel bearing length: lm= ' +
                       str(lm))
        if (ls < 0.0):
            lmsg.error('negative side member dowel bearing length: ls= ' +
                       str(ls))
        D = self.getDiameterForYield()
        Fem = mainMemberWood.getDowelBearingStrenght(D, theta_m)
        Rd_Im = self.getReductionTerm(theta=0.0, yieldMode='Im')
        Z_Im = D * lm * Fem / Rd_Im  # Eq. (12.3-1 or 12.3-7)
        retval = Z_Im
        Rd_Is = self.getReductionTerm(theta=0.0, yieldMode='Is')
        Fes = sideMemberWood.getDowelBearingStrenght(D, theta_s)
        Z_Is = D * ls * Fes / Rd_Is  # Eq. (12.3-2)
        if (doubleShear):
            Z_Is *= 2.0  # Eq. (12.3-8)
        retval = min(retval, Z_Is)
        Rd_II = self.getReductionTerm(theta=0.0, yieldMode='II')
        k1 = self.getK1(mainMemberWood, sideMemberWood, lm, ls, theta_m,
                        theta_s)
        Z_II = k1 * D * ls * Fes / Rd_II  # Eq. (12.3-3)
        retval = min(retval, Z_II)
        Rd_IIIm = self.getReductionTerm(theta=0.0, yieldMode='IIIm')
        k2 = self.getK2(mainMemberWood, sideMemberWood, lm, ls, theta_m,
                        theta_s)
        Re = Fem / Fes
        Z_IIIm = k2 * D * lm * Fem / (1 + 2.0 * Re) / Rd_IIIm  # Eq. (12.3-4)
        retval = min(retval, Z_IIIm)
        Rd_IIIs = self.getReductionTerm(theta=0.0, yieldMode='IIIs')
        k3 = self.getK3(mainMemberWood, sideMemberWood, lm, ls, theta_m,
                        theta_s)
        Z_IIIs = k3 * D * ls * Fem / (2 + Re) / Rd_IIIs  # Eq. (12.3-5)
        if (doubleShear):
            Z_IIIs *= 2.0  # Eq. (12.3-9)
        retval = min(retval, Z_IIIs)
        Rd_IV = self.getReductionTerm(theta=0.0, yieldMode='IV')
        Z_IV = D**2 / Rd_IV * math.sqrt(2.0 * Fem * self.Fyb /
                                        (3.0 * (1 + Re)))  # Eq. (12.3-6)
        if (doubleShear):
            Z_IV *= 2.0  # Eq. (12.3-10)
        retval = min(retval, Z_IV)
        return retval