def installULSControlRecorder(self, recorderType, elems, sectionClass=1, chiLT=1.0): '''Installs recorder for verification of ULS criterion. Preprocessor obtained from the set of elements. :param sectionClass: section classification (1,2,3 or 4) :param chiLT: lateral buckling reduction factor (default= 1.0). ''' preprocessor = elems.owner.getPreprocessor nodes = preprocessor.getNodeHandler domain = preprocessor.getDomain recorder = domain.newRecorder(recorderType, None) recorder.setElements(elems.getTags()) for e in elems: e.setProp('ULSControlRecorder', recorder) self.setupULSControlVars(elems, sectionClass, chiLT) if (nodes.numDOFs == 3): recorder.callbackRecord = EC3lsc.controlULSCriterion2D() else: recorder.callbackRecord = EC3lsc.controlULSCriterion() recorder.callbackRestart = "print(\"Restart method called.\")" return recorder
def getLateralBucklingIntermediateFactor(self,sectionClass,L,Mi,supportCoefs= EC3lsc.SupportCoefficients()): ''' Returns lateral torsional buckling intermediate factor value. :param sectionClass: section classification (1,2,3 or 4) :param Mi: ordinate for the moment diagram :param supportCoefs: coefficients that represent support conditions. ''' return EC3lsc.getLateralBucklingIntermediateFactor(self,sectionClass,L,Mi,supportCoefs)
def getLateralBucklingReductionFactor(self,sectionClass,L,Mi,supportCoefs= EC3lsc.SupportCoefficients()): ''' Returns lateral torsional buckling reduction factor value. :param sectionClass: section classification (1 to 3, 4 not yet implemented) :param Mi: ordinate for the moment diagram :param supportCoefs: coefficients that represent support conditions. ''' return EC3lsc.getLateralBucklingReductionFactor(self,sectionClass,L,Mi,supportCoefs)
def getLateralBucklingNonDimensionalBeamSlenderness( self, sectionClass, L, Mi, supportCoefs=EC3lsc.SupportCoefficients()): '''Return non dimensional beam slenderness for lateral torsional buckling see parameter definition on method getMcr. :param shape: cross section shape. :param sectionClass: section classification (1,2,3 or 4) :param Mi: ordinate for the moment diagram :param supportCoefs: coefficients that represent support conditions. ''' return EC3lsc.getLateralBucklingNonDimensionalBeamSlenderness( self, sectionClass, L, Mi, supportCoefs)
def getLateralTorsionalBucklingResistance(self,sectionClass,L,Mi,supportCoefs= EC3lsc.SupportCoefficients()): '''Return lateral torsional buckling resistance of this cross-section. Calculation is made following the paper: A. López, D. J. Yong, M. A. Serna, Lateral-torsional buckling of steel beams: a general expression for the moment gradient factor. (Lisbon, Portugal: Stability and ductility of steel structures, 2006). :param Mi: ordinate for the moment diagram :param supportCoefs: coefficients that represent support conditions. ''' return EC3lsc.getLateralTorsionalBucklingResistance(self,sectionClass,L,Mi,supportCoefs)
def getMcr(self,L,Mi,supportCoefs= EC3lsc.SupportCoefficients()): '''Return elastic critical moment about minor axis: y Calculation is made following the paper: A. López, D. J. Yong, M. A. Serna, Lateral-torsional buckling of steel beams: a general expression for the moment gradient factor. (Lisbon, Portugal: Stability and ductility of steel structures, 2006). :param Mi: ordinate for the moment diagram :param supportCoefs: coefficients that represent support conditions. ''' return EC3lsc.getMcr(self,L,Mi,supportCoefs)
def getMvRdz(self,sectionClass,Vd): '''Return the major bending resistance of the cross-section under a shear force of Vd. :param sectionClass: section classification (1,2,3 or 4) ''' return EC3lsc.getMvRdz(self,sectionClass,Vd)
def installULSControlRecorder(self,recorderType, elems,sectionClass= 1, chiLT=1.0): '''Installs recorder for verification of ULS criterion. Preprocessor obtained from the set of elements.''' preprocessor= elems.owner.getPreprocessor nodes= preprocessor.getNodeHandler domain= preprocessor.getDomain recorder= domain.newRecorder(recorderType,None) recorder.setElements(elems.getTags()) for e in elems: e.setProp('ULSControlRecorder',recorder) self.setupULSControlVars(elems,sectionClass,chiLT) if(nodes.numDOFs==3): recorder.callbackRecord= EC3lsc.controlULSCriterion2D() else: recorder.callbackRecord= EC3lsc.controlULSCriterion() recorder.callbackRestart= "print \"Restart method called.\"" return recorder
def __init__(self,name,ec3Shape,sectionClass=1,supportCoefs=EC3lsc.SupportCoefficients(ky=1.0,kw=1.0,k1=1.0,k2=1.0),typo= 'rolled',lstLines=None,lstPoints=None): self.name=name self.ec3Shape= ec3Shape self.sectionClass=sectionClass self.supportCoefs=supportCoefs self.typo=typo self.lstLines=lstLines self.lstPoints=lstPoints
def installULSControlRecorder(self,recorderType, chiLT=1.0): '''Install recorder for verification of ULS criterion.''' prep= self.getPreprocessor() nodes= prep.getNodeHandler domain= prep.getDomain recorder= domain.newRecorder(recorderType,None) eleTags= list() for e in self.elemSet: eleTags.append(e.tag) e.setProp('ULSControlRecorder',recorder) idEleTags= xc.ID(eleTags) recorder.setElements(idEleTags) self.ec3Shape.setupULSControlVars(self.elemSet,self.sectionClass,chiLT) if(nodes.numDOFs==3): recorder.callbackRecord= EC3lsc.controlULSCriterion2D() else: recorder.callbackRecord= EC3lsc.controlULSCriterion() # recorder.callbackRestart= "print \"Restart method called.\"" #20181121 return recorder
def getLateralBucklingNonDimensionalBeamSlenderness(self,sectionClass,L,Mi,supportCoefs= EC3lsc.SupportCoefficients()): '''Return non dimensional beam slenderness for lateral torsional buckling see parameter definition on method getMcr. :param shape: cross section shape. :param sectionClass: section classification (1,2,3 or 4) :param Mi: ordinate for the moment diagram :param supportCoefs: coefficients that represent support conditions. ''' return EC3lsc.getLateralBucklingNonDimensionalBeamSlenderness(self,sectionClass,L,Mi,supportCoefs)
def __init__(self, name, ec3Shape,sectionClass=1,supportCoefs=EC3lsc.SupportCoefficients(ky=1.0,kw=1.0,k1=1.0,k2=1.0), typo= 'rolled', lstLines=None, lstPoints=None): '''Constructor. :param name: object name. :param ec3Shape: cross-section shape (e.g. IPNShape, IPEShape, ...) :param sectionClass: section class (1 to 3, 4 not yet implemented) (defaults to 1). :param supportCoefs: instance of EC3_limit_state_checking.SupportCoefficients that wraps the support coefficients: ky, kw, k1 and k2; where ky is the lateral bending coefficient, kw the warping coefficient, k1 and the warping AND lateral bending coefficients at first and last ends respectively (1.0 => free, 0.5 => prevented). (Defaults to ky= 1.0, kw= 1.0, k1= 1.0, k2= 1.0) :param typo: 'rolled' or 'welded' (defaults to rolled) :param lstLines: ordered list of lines that make up the beam (defaults to None). :param lstPoints: ordered list of points that make up the beam. Ignored if lstLines is given (defaults to None) ''' super(EC3Beam,self).__init__(name, ec3Shape, lstLines, lstPoints) self.sectionClass= sectionClass self.supportCoefs= supportCoefs self.typo=typo
from materials.ec3 import EC3_limit_state_checking as EC3lsc from materials.ec3 import EC3_materials S355JR = EC3_materials.S355JR gammaM0 = 1.05 S355JR.gammaM = gammaM0 IPE400 = EC3_materials.IPEShape(S355JR, "IPE_400") # Geometry k1 = 1.0 k2 = 1.0 #Check results page 32 L = 6.0 # Bar length (m) x = [0.0, 0.25 * L, 0.5 * L, 0.75 * L, 1.0 * L] M = [-93.7, 0, 114.3, 0, 111.4] mgf = EC3lsc.MomentGradientFactorC1(x, M) Mcr1 = IPE400.getMcr(x, M) Mcr1Teor = 164.7e3 ratio1 = abs(Mcr1 - Mcr1Teor) / Mcr1Teor #NOTE: Here there is a big difference between the results # from Lopez-Serna method # 317 kN.m and those from the paper 164.7 kN.m # In theory results from Lopez-Serna method are safe enough. #Check results page 34 L = 3 # Bar length (m) x = [0.0, 0.25 * L, 0.5 * L, 0.75 * L, 1.0 * L] M = [-93.7e3, -93.7e3 / 2.0, 0.0, 114.3e3 / 2.0, 114.3e3] mgf = EC3lsc.MomentGradientFactorC1(x, M) Mcr2 = IPE400.getMcr(x, M)
from materials.ec3 import EC3Beam as ec3b from materials.ec3 import EC3_limit_state_checking as EC3lsc lstLines=gridGeom.getLstLinRange(beamY_rg) #lstPoints=gridGeom.getLstPntRange(beamY_rg) supCf_beam=EC3lsc.SupportCoefficients(ky=1.0,kw=1.0,k1=1.0,k2=1.0) beam01=ec3b.EC3Beam(name='beam01',ec3Shape=beamY_mat,sectionClass=1,supportCoefs=supCf_beam,lstLines=lstLines) #beam=ec3b.EC3Beam(ec3Shape=None,lstPoints=lstPoints) beam01.setControlPoints() beam01.installULSControlRecorder(recorderType="element_prop_recorder")
# -*- coding: utf-8 -*- from __future__ import print_function from materials.ec3 import EC3Beam as ec3b from materials.ec3 import EC3_limit_state_checking as EC3lsc from materials.astm_aisc import ASTM_materials from materials.astm_aisc import AISC_limit_state_checking as aisc # ** Steel beams # Support coefficients (1==free, 0.5==prevented) (all default to 1) # ky: lateral bending, kw: warping, k1: warping and lateral bending at left # end, k2: warping and lateral bending at right end supCf_free = EC3lsc.SupportCoefficients(ky=1.0, kw=1.0, k1=1.0, k2=1.0) supCf = EC3lsc.SupportCoefficients(ky=1.0, kw=1.0, k1=0.5, k2=1.0) def gen_EC3beams_from_lstSets(lstSets, mat, sectClass, suppCoef, prefName): '''Return a list of EC3beams generated from each set in lstSet :param lstSets: list of sets, each set contains the lines to generate one EC3beam :param mat: material for all beams :param sectClass: section class for all beams :param suppCoef: support coefficients for all beams :param prefName: prefix for the beam names ''' lstEC3beams = list() for i in range(len(lstSets)): lstSets[i].fillDownwards() lstLin = [l for l in lstSets[i].lines] nmBeam = prefName + str(i)
def getLateralTorsionalBucklingCurve(self): ''' Return the lateral torsional bukling curve name (a,b,c or d) depending of the type of section (rolled, welded,...). EC3 Table 6.4, 6.3.2.2(2).''' return EC3lsc.getLateralTorsionalBucklingCurve(self)
def getLateralBucklingImperfectionFactor(self): ''' Return lateral torsional imperfection factor depending of the type of section (rolled, welded,...). ''' return EC3lsc.getLateralBucklingImperfectionFactor(self)
def shearBucklingVerificationNeeded(self): '''Return true if shear buckling verification is needed EC3-1-5''' return EC3lsc.shearBucklingVerificationNeeded(self)
def getBendingResistanceReductionCoefficient(self,Vd): '''Return bending resistance reduction coefficient as in clause 6.2.8 of EC31-1''' return EC3lsc.getBendingResistanceReductionCoefficient(self,Vd)
from materials.ec3 import EC3_materials S355JR= EC3_materials.S355JR gammaM0= 1.05 S355JR.gammaM= gammaM0 IPE400= EC3_materials.IPEShape(S355JR,"IPE_400") # Geometry k1= 1.0; k2= 1.0 #Check results page 32 L= 6.0 # Bar length (m) x= [0.0,0.25*L,0.5*L,0.75*L,1.0*L] M= [-93.7,0,114.3,0,111.4] Mi=intp.interpEquidistPoints(xi=x,yi=M,nDiv=4) mgf= EC3lsc.MomentGradientFactorC1(Mi) Mcr1= IPE400.getMcr(L,Mi) Mcr1Teor= 164.7e3 ratio1= abs(Mcr1-Mcr1Teor)/Mcr1Teor #NOTE: Here there is a big difference between the results # from Lopez-Serna method # 317 kN.m and those from the paper 164.7 kN.m # In theory results from Lopez-Serna method are safe enough. #Check results page 34 L= 3 # Bar length (m) x= [0.0,0.25*L,0.5*L,0.75*L,1.0*L] M= [-93.7e3,-93.7e3/2.0,0.0,114.3e3/2.0,114.3e3] Mi=intp.interpEquidistPoints(xi=x,yi=M,nDiv=4) mgf= EC3lsc.MomentGradientFactorC1(Mi)
xx = (0, L) yy = (M, FF * M) f = scipy.interpolate.interp1d(xx, yy) x = list() M = list() xi = 0.0 Mi = 0.0 for i in range(1, nDiv + 2): Mi = f(xi) x.append(xi) M.append(float(Mi)) xi += step return [x, M] supportCoefs = EC3lsc.SupportCoefficients(k1=1.0, k2=1.0) nDiv = 20 step = 2 / nDiv psi = list() c1 = list() psii = -1.0 C1i = 0.0 for i in range(1, nDiv + 2): mD = caseASampleMoments(5.0, 10.0, psii) Mi = intp.interpEquidistPoints(xi=mD[0], yi=mD[1], nDiv=4) mgf = EC3lsc.MomentGradientFactorC1(Mi) C1i = mgf.getC1(supportCoefs) psi.append(psii) c1.append(C1i) psii += step
# -*- coding: utf-8 -*- from postprocess import limit_state_data as lsd from materials.ec3 import EC3_limit_state_checking as EC3lscheck execfile("../model_gen.py") #FE model generation lsd.LimitStateData.envConfig= cfg #Steel beams definition execfile("../steel_beams_def.py") # variables that control the output of the checking (setCalc, # appendToResFile .py [defaults to 'N'], listFile .tex [defaults to 'N'] outCfg= lsd.VerifOutVars(setCalc=beamY,appendToResFile='N',listFile='Y',calcMeanCF='Y') limitState=lsd.shearResistance limitState.controller= EC3lscheck.ShearController(limitState.label) a=limitState.runChecking(outCfg)
# -*- coding: utf-8 -*- from postprocess import limit_state_data as lsd from materials.ec3 import EC3_limit_state_checking as EC3lscheck execfile("../model_gen.py") #FE model generation lsd.LimitStateData.envConfig= cfg #Steel beams definition execfile("../steel_beams_def.py") # variables that control the output of the checking (setCalc, # appendToResFile .py [defaults to 'N'], listFile .tex [defaults to 'N'] outCfg= lsd.VerifOutVars(setCalc=beamY,appendToResFile='N',listFile='N',calcMeanCF='Y') limitState=lsd.normalStressesResistance limitState.controller= EC3lscheck.BiaxialBendingNormalStressController(limitState.label) a=limitState.runChecking(outCfg)