sections.append(deckSections) import os pth = os.path.dirname(__file__) #print("pth= ", pth) if (not pth): pth = "." fname = os.path.basename(__file__) #Checking normal stresses. lsd.normalStressesResistance.controller = SIA262_limit_state_checking.BiaxialBendingNormalStressController( 'ULS_normalStress') cfg = default_config.EnvConfig(language='en', intForcPath='results/internalForces/', 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')
sys.path.insert(0, '/home/ebi/xc/my_models/sole_zeinali/local_modules/') import stability import base_plate_design as bpd import os import time import csv import math from postprocess.config import default_config from postprocess import limit_state_data as lsd from postprocess.reports import export_internal_forces as eif from materials.astm_aisc import AISC_limit_state_checking as aisc from solution import predefined_solutions # Setup the project working directory. cfg= default_config.EnvConfig(language='en', fNameMark= 'xc_model.py') wDir= cfg.projectDirTree.workingDirectory modelFiles= ['xc_model.py','loads.py','load_combinations.py']#'load_combinations.py'] modelModificationTime= 0.0 for f in modelFiles: filePath= wDir+'/'+f exec(open(filePath).read()) modification_time= os.path.getmtime(filePath) modelModificationTime= max(modification_time,modelModificationTime) # Compute internal forces. lsd.LimitStateData.envConfig= cfg ## Set combinations to compute. loadCombinations= preprocessor.getLoadHandler.getLoadCombinations
def __init__(self, modelSpace=None, envConfig=default_config.EnvConfig()): super(ReportGenerator, self).__init__(modelSpace, outputStyle=envConfig)
lPatterns.currentTimeSeries= "ts" #Load case definition lp0= lPatterns.newLoadPattern("default","lp0") lp0.newNodalLoad(n3.tag,xc.Vector([Fx,Fy,Fz,0,0,0])) #We add the load case to domain. lPatterns.addToDomain(lp0.getName()) # # Solution # analysis= predefined_solutions.simple_static_linear(feProblem) # result= analysis.analyze(1) # Load combinations combContainer= combs.CombContainer() combContainer.ULS.perm.add('allLoads', '1.0*lp0') totalSet= preprocessor.getSets.getSet('total') cfg=default_config.EnvConfig(language='en',intForcPath= '',verifPath= '') cfg.projectDirTree.workingDirectory= '/tmp/' lsd.LimitStateData.envConfig= cfg lsd.shearResistance.saveAll(combContainer,totalSet) # Define available sections for the elements (spatial distribution of RC sections). # It refers to the reinforced concrete sections associated with the element # (i.e. for shell elements we typically define two RC sections, one for each # main direction; in the case of beam elements the most common way is to define # RC sections in the front and back ends of the elements) reinfConcreteSectionDistribution= RC_material_distribution.RCMaterialDistribution() sections= reinfConcreteSectionDistribution.sectionDefinition #creates an RC sections container #Generic layers (rows of rebars). Other instance variables that we can define #for ReinfRows are coverLat and nRebars.If we define nRebars that #value overrides the rebarsSpacing
lp0 = lPatterns.newLoadPattern("default", "lp0") lp0.newNodalLoad(n3.tag, xc.Vector([Fx, Fy, Fz, 0, 0, 0])) #We add the load case to domain. lPatterns.addToDomain(lp0.getName()) # # Solution # analisis= predefined_solutions.simple_static_linear(feProblem) # result= analisis.analyze(1) # Load combinations combContainer = combs.CombContainer() combContainer.ULS.perm.add('allLoads', '1.0*lp0') totalSet = preprocessor.getSets.getSet('total') cfg = default_config.EnvConfig(language='en', intForcPath='', verifPath='', annexPath='annex/', grWidth='120mm') cfg.projectDirTree.workingDirectory = '/tmp/' lsd.LimitStateData.envConfig = cfg lsd.shearResistance.saveAll(feProblem, combContainer, totalSet) # Define available sections for the elements (spatial distribution of RC sections). # It refers to the reinforced concrete sections associated with the element # (i.e. for shell elements we typically define two RC sections, one for each # main direction; in the case of beam elements the most common way is to define # RC sections in the front and back ends of the elements) reinfConcreteSectionDistribution = RC_material_distribution.RCMaterialDistribution( ) sections = reinfConcreteSectionDistribution.sectionDefinition #creates an RC sections container
# lcbeams.newNodalLoad(3,xc.Vector([F/math.sqrt(2),-F/math.sqrt(2),0,M/math.sqrt(2),M/math.sqrt(2),0])) #loads applied at front end # # of beam Z # lPatterns.addToDomain("lcbeams") # Solution # analysis= predefined_solutions.simple_static_linear(feProblem) # result= analysis.analyze(1) # Load combinations combContainer = combs.CombContainer() combContainer.ULS.perm.add('allLoads', '1.0*lcXbeam+1.0*lcYbeam+1.0*lcZbeam') totalSet = preprocessor.getSets.getSet('total') cfg = default_config.EnvConfig(language='en', intForcPath='', verifPath='', reportPath='./', resultsPath='annex/', grWidth='120mm') cfg.projectDirTree.workingDirectory = '/tmp/' lsd.LimitStateData.envConfig = cfg lsd.normalStressesResistance.saveAll(combContainer, totalSet) # Spatial distribution of reinforced concrete sections. reinfConcreteSectionDistribution.assign(elemSet=totalSet.getElements, setRCSects=beamRCsect) #Checking normal stresses. limitStateLabel = lsd.normalStressesResistance.label lsd.normalStressesResistance.controller = SIA262_limit_state_checking.BiaxialBendingNormalStressController( limitStateLabel) lsd.normalStressesResistance.outputDataBaseFileName = 'resVerif'
from __future__ import print_function import json from postprocess import limit_state_data #from materials.ec3 import EC3_limit_state_checking as EC3lscheck from postprocess.config import default_config import sys sys.path.insert(0, './local_modules') import connection_design as cd #Verification of normal-stresses ULS for structural steel workingDirectory= default_config.findWorkingDirectory()+'/' exec(open(workingDirectory+'xc_model.py').read()) #FE model generation #exec(open(workingDirectory+'limit_states_def.py').read()) limit_state_data.LimitStateData.envConfig= default_config.EnvConfig(language='en', fNameMark= 'xc_model.py') #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']
# -*- coding: utf-8 -*- from postprocess.config import default_config # Default configuration of environment variables. cfg = default_config.EnvConfig( language='en', intForcPath=workingDirectory + 'results_abutment/internalForces/', verifPath=workingDirectory + 'results_abutment/verifications/', annexPath=workingDirectory + 'annex_abutment/', grWidth='120mm')