Example #1
0
    def runChecking(self,limitStateData,matDiagType,threeDim= True,outputCfg= lsd.VerifOutVars()):
        '''Creates the phantom model and runs the verification on it.

        :param limitStateData: object that contains the name of the file
                               containing the internal forces 
                               obtained for each element 
                               for the combinations analyzed and the
                               controller to use for the checking.
        :param matDiagType: type of the material diagram (d: design, 
               k: characteristic).
        :param threeDim: true if it's 3D (Fx,Fy,Fz,Mx,My,Mz) 
               false if it's 2D (Fx,Fy,Mz).
        :param outputCfg: instance of class 'VerifOutVars' which defines the 
                   variables that control the output of the checking (set of 
                   elements to be analyzed, append or not the results to a file,
                   generation or not of lists, ...)
        '''
        feProblem= xc.FEProblem()
        preprocessor= feProblem.getPreprocessor
        if 'straight' in str(limitStateData.controller).lower():
             for s in self.sectionDefinition.sections:
                 s.fiberSectionParameters.concrType.initTensStiff='Y'
        self.sectionDefinition.createRCsections(preprocessor,matDiagType) #creates
                          #for each element in the container the fiber sections
                          #(RCsimpleSections) associated with it.
        if(threeDim):
            self.sectionDefinition.calcInteractionDiagrams(preprocessor,matDiagType)
        else:
            self.sectionDefinition.calcInteractionDiagrams(preprocessor,matDiagType,'NMy')
        limitStateData.controller.solutionProcedure= limitStateData.controller.solutionProcedureType(feProblem)
        phantomModel= phm.PhantomModel(preprocessor,self)
        result= phantomModel.runChecking(limitStateData,outputCfg)
        return (feProblem, result)
Example #2
0
lsd.LimitStateData.envConfig = cfg

#choose env_config file:
execfile("../env_config_deck.py")
#execfile("../env_config_abutment.py")
#
#Reinforced concrete sections on each element.
#reinfConcreteSections=RC_material_distribution.RCMaterialDistribution()
#reinfConcreteSections.mapSectionsFileName='./mapSectionsReinforcement.pkl'
reinfConcreteSections = RC_material_distribution.loadRCMaterialDistribution()
#stcalc=setArmadosEstr
#stcalc=setArmVol
#stcalc=setArmCart
#stcalc=setArmLosa
#stcalc=setArmPil
stcalc = setArmados
#stcalc=setArmadosEstr
#stcalc=setArmZapEstr
#stcalc=setArmMurEstr
# variables that control the output of the checking (setCalc,
# appendToResFile .py [defaults to 'N'], listFile .tex [defaults to 'N']
outCfg = lsd.VerifOutVars(setCalc=stcalc,
                          appendToResFile='N',
                          listFile='N',
                          calcMeanCF='N')

limitState = lsd.normalStressesResistance
limitState.controller = lscheck.BiaxialBendingNormalStressController(
    limitState.label)
lsd.normalStressesResistance.check(reinfConcreteSections, outCfg)
Example #3
0
                               verifPath='results/verifications/',
                               reportPath='./',
                               resultsPath='annex/',
                               grWidth='120mm')
cfg.projectDirTree.workingDirectory = '/tmp/' + os.path.splitext(fname)[0]
cfg.projectDirTree.createTree(
)  # To allow copying existing internal force data into.
lsd.LimitStateData.envConfig = cfg
shutil.copy(pth + '/intForce_ULS_normalStressesResistance.csv',
            lsd.normalStressesResistance.getInternalForcesFileName())
#lsd.LimitStateData.internal_forces_results_directory= pth+'/'
#lsd.LimitStateData.check_results_directory= '/tmp/'
#lsd.normalStressesResistance.outputDataBaseFileName= 'ppTN'
#intForceFileName= lsd.normalStressesResistance.getInternalForcesFileName()

outCfg = lsd.VerifOutVars(listFile='N', calcMeanCF='Y')

meanFCs = reinfConcreteSections.internalForcesVerification3D(
    lsd.normalStressesResistance, "d", outCfg)

#print("mean FCs: ", meanFCs)

meanFC0Teor = 0.64702580108264973
ratio1 = abs(meanFCs[0] - meanFC0Teor) / meanFC0Teor
meanFC1Teor = 0.84660274501497856
ratio2 = abs(meanFCs[1] - meanFC1Teor) / meanFC1Teor
'''
print("meanFCs[0]= ", meanFCs[0])
print("ratio1= ",ratio1)
print("meanFCs[1]= ", meanFCs[1])
print("ratio2= ",ratio2)
Example #4
0
  pth= "."
fname= os.path.basename(__file__)

limit_state_data.shearResistance.controller= EHE_limit_state_checking.ShearController(limitStateLabel= limit_state_data.shearResistance.label)
limit_state_data.shearResistance.controller.verbose= False # Don't display log messages.
limit_state_data.shearResistance.controller.analysisToPerform=custom_newton_raphson
cfg=default_config.EnvConfig(language='en',intForcPath= 'results/internalForces/',verifPath= 'results/verifications/',annexPath= 'annex/',grWidth='120mm')
cfg.projectDirTree.workingDirectory= '/tmp/'+os.path.splitext(fname)[0]
cfg.projectDirTree.createTree()
limit_state_data.LimitStateData.envConfig= cfg
shutil.copy(pth+'/intForce_ULS_shearResistance.csv',limit_state_data.shearResistance.getInternalForcesFileName())
#limit_state_data.LimitStateData.internal_forces_results_directory= pth+'/'
#limit_state_data.LimitStateData.check_results_directory= '/tmp/'
#limit_state_data.normalStressesResistance.outputDataBaseFileName= 'resVerif'

outCfg= limit_state_data.VerifOutVars(listFile='N',calcMeanCF='Y')

(FEcheckedModel,meanFCs)= reinfConcreteSectionDistribution.runChecking(limit_state_data.shearResistance, matDiagType="d",threeDim= True,outputCfg=outCfg)  

ratio1= (meanFCs[0]-0.51922390249173578)/0.51922390249173578
ratio2= (meanFCs[1]-0.51808548496704088)/0.51808548496704088

'''
print('meanFCs= ',meanFCs)
print("ratio1= ",ratio1)
print("ratio2= ",ratio2)
'''

import os
from misc_utils import log_messages as lmsg
if (ratio1<1e-4) and (ratio2<1e-4):
Example #5
0
# -*- coding: utf-8 -*-
from postprocess import limit_state_data as lsd
from postprocess import RC_material_distribution
from materials.sia262 import SIA262_limit_state_checking as lschck  #Checking material for cracking limit state according to SIA262

execfile("../model_gen.py")  #FE model generation
lsd.LimitStateData.envConfig = cfg

#choose env_config file:
execfile("../env_config_deck.py")
execfile("../env_config_abutment.py")
#
# variables that control the output of the checking (setCalc,
# appendToResFile .py [defaults to 'N'], listFile .tex [defaults to 'N']
outCfg = lsd.VerifOutVars(setCalc=decks, appendToResFile='N', listFile='N')

#Reinforced concrete sections on each element.
reinfConcreteSections = RC_material_distribution.loadRCMaterialDistribution()

#Checking material for limit state.
limitStress = 350e6  #XXX
limitStateLabel = lsd.freqLoadsCrackControl.label
lsd.freqLoadsCrackControl.controller = lschck.CrackControlSIA262PlanB(
    limitStateLabel, limitStress)
lsd.freqLoadsCrackControl.check(reinfConcreteSections, outCfg)
    
maxValue= stability.setImperfectionsXY(xcTotalSet,slopeX=1/500,slopeY=0)
print('max. imperfection displacement: ', maxValue,'m')

# Backup stiffness
stability.backupStiffness(allMemberSet)

## Compute internal forces for each combination

### Limit states to calculate internal forces for.
limitStates= [lsd.normalStressesResistance, # Normal stresses resistance.
lsd.shearResistance, # Shear stresses resistance (IS THE SAME AS NORMAL STRESSES, THIS IS WHY IT'S COMMENTED OUT).
] 
for ls in limitStates:
    loadCombinations= preprocessor.getLoadHandler.getLoadCombinations
    #Putting combinations inside XC.
    loadCombinations= ls.dumpCombinations(combContainer,loadCombinations)
    stability.calcInternalForces(modelSpace, calcSet, allMemberSet, [], aiscMembers, loadCombinations, ls, joints, writer,mxNumIter= 15, convergenceTestTol= .01)

f.close()

outCfg= lsd.VerifOutVars(setCalc=calcSet, appendToResFile='N', listFile='N', calcMeanCF='Y')
limitState= lsd.normalStressesResistance
limitState.controller= aisc.BiaxialBendingNormalStressController(limitState.label)
average= limitState.runChecking(outCfg)

limitState=lsd.shearResistance
limitState.controller= aisc.ShearController(limitState.label)
average=limitState.runChecking(outCfg)
Example #7
0
#Steel beams definition
#exec(open(workingDirectory+'steel_beams_def.py').read())

# Bolted plate
bolt= ASTM_materials.M22
bolt.steelType= ASTM_materials.A325
boltArray= ASTM_materials.BoltArray(bolt, nRows= 2, nCols= 3)
boltedPlate= ASTM_materials.BoltedPlate(boltArray, thickness= 20e-3, steelType= ASTM_materials.A36)

#setCalc=suppFrame
setCalc= diagonalSet

# variables that control the output of the checking (setCalc,
# appendToResFile .py [defaults to 'N'], listFile .tex [defaults to 'N']
outCfg= limit_state_data.VerifOutVars(setCalc=setCalc,appendToResFile='N',listFile='N',calcMeanCF='Y')

limitState= limit_state_data.normalStressesResistance
intForcesFileName= limitState.getInternalForcesFileName()
controller= cd.BoltedPlateController(boltedPlate)
worstCase= controller.predimConnection(intForcesFileName, setCalc)
print('bolted plate: ', boltedPlate)
print('worst case: ', worstCase)
outputFileName= 'base_plates/diagonal_fastener.json'
with open(outputFileName, 'w') as outfile:
    json.dump(boltedPlate.getDict(), outfile)
outfile.close()