import xc_base import geom import xc from model import predefined_spaces from solution import predefined_solutions from materials import typical_materials import math __author__ = "Luis C. Pérez Tato (LCPT)" __copyright__ = "Copyright 2014, LCPT" __license__ = "GPL" __version__ = "3.0" __email__ = "*****@*****.**" feProblem = xc.FEProblem() preprocessor = feProblem.getPreprocessor nodes = preprocessor.getNodeHandler # Problem type modelSpace = predefined_spaces.StructuralMechanics2D(nodes) n1 = nodes.newNodeXY(0, 0) n2 = nodes.newNodeXY(1, 1) setTotal = preprocessor.getSets.getSet("total") setTotal.genMesh(xc.meshDir.I) # Constraints constraints = preprocessor.getBoundaryCondHandler spc = constraints.newSPConstraint(n1.tag, 0, 0.0) # Node 1,gdl 0 translation X spc = constraints.newSPConstraint(n1.tag, 1, 0.0) # Node 1,gdl 1 translation Y spc = constraints.newSPConstraint(n1.tag, 2, 0.0) # Node 1,gdl 2 rotation.
__version__ = "3.0" __email__ = " [email protected], [email protected]" import xc_base import geom import xc from materials.astm_aisc import ASTM_materials from materials.astm_aisc import AISC_limit_state_checking as aisc from model import predefined_spaces from actions import load_cases from actions import combinations as combs from solution import predefined_solutions # from postprocess import output_handler # Problem type steelColumn = xc.FEProblem() steelColumn.title = 'AISC 360-16 benchmark problem Case 2 (3D corotational formulation)' preprocessor = steelColumn.getPreprocessor nodes = preprocessor.getNodeHandler #Materials ## Steel material steel = ASTM_materials.A992 steel.gammaM = 1.00 ## Profile geometry shape = ASTM_materials.WShape(steel, 'W14X48') xcSection = shape.defElasticShearSection3d(preprocessor) # Model geometry ## Points.
#diagonal cables material EdiagCable=210e9 #elastic modulus rhoDiagCable=0.0 # effective self weight (gravity component of weight per #volume transverse to the cable) sigmaPrestrDiagCable=1 #prestress diagArea=1 #saddle cables material EsaddCable=210e9 #elastic modulus rhoSaddCable=0.0 # effective self weight (gravity component of weight per #volume transverse to the cable) sigmaPrestrSaddCable=1 #prestress saddArea=1 from model import predefined_spaces test= xc.FEProblem() prep=test.getPreprocessor points= prep.getMultiBlockTopology.getPoints lines= prep.getMultiBlockTopology.getLines nodes= prep.getNodeHandler sets=prep.getSets # Problem type modelSpace= predefined_spaces.SolidMechanics3D(nodes) #Defines the dimension of #the space: nodes by three coordinates (x,y,z) and #three DOF for each node (Ux,Uy,Uz) #Joints generation jointsCCoor=genJointsCoor(n=nSidPol,r0=rBasCirc,rh=rTopCirc,b=lStruts) for i in jointsCCoor.index: points.newPntIDPos3d(int(float(i[2:])),geom.Pos3d(jointsCCoor.loc[i].X,jointsCCoor.loc[i].Y,jointsCCoor.loc[i].Z))
from materials.astm_aisc import ASTM_materials from materials.astm_aisc import AISC_limit_state_checking as aisc from model import predefined_spaces from actions import load_cases from actions import combinations as combs from solution import predefined_solutions inch2meter= 0.0254 MPa2ksi= 0.145038 kN2kips= 0.2248 kip2kN= 1.0/kN2kips foot2meter= 0.3048 m2Toin2= 1.0/inch2meter**2 # Problem type steelBeam= xc.FEProblem() steelBeam.title= 'Example F.2-1B' preprocessor= steelBeam.getPreprocessor nodes= preprocessor.getNodeHandler #Materials ## Steel material steel= ASTM_materials.A36 steel.gammaM= 1.00 ## Profile geometry shape= ASTM_materials.CShape(steel,'C15X33.9') xcSection= shape.defElasticShearSection2d(preprocessor) # Model geometry ## Points.
ro_s = A_s / width / depth #longitudinal steel ratio ro_s_eff = 0.113492250883 #effective ratio of reinforcement M_y = -600e3 #bending moment [Nm] #Other data nDivIJ = 20 #number of cells (fibers) in the IJ direction (cross-section coordinate Y) nDivJK = 20 #number of cells (fibers) in the JK direction (cross-section coordinate Z) areaFi26 = math.pi * (26e-3)**2 / 4.0 l = 1e-7 # Distance between nodes # Model definition problem = xc.FEProblem() #necesary to create this instance of #the class xc.FEProblem() preprocessor = problem.getPreprocessor nodes = preprocessor.getNodeHandler #nodes container modelSpace = predefined_spaces.StructuralMechanics3D( nodes ) #Defines the dimension of nodes three coordinates (x,y,z) and six DOF for each node (Ux,Uy,Uz,thetaX,thetaY,thetaZ) nodes.defaultTag = 1 #First node number. nod = nodes.newNodeXYZ(1.0, 0, 0) #node 1 defined by its (x,y,z) global coordinates nod = nodes.newNodeXYZ(1.0 + l, 0, 0) #node 2 defined by its (x,y,z) global coordinates # Materials definition concrete = EC2_materials.EC2Concrete(
fp01k = 1600e6 #0.1% proofstress (Pa) epspu = 0.035 #total elongation at maximum load Ep = 195e9 #modulus of elasticity (MPa) #Reinforcing steel, grade 500 fyk = 500e6 #characteristic strength (Pa) fyd = 434.8e6 #design strength (Pa) Es = 200e9 #modulus of elasticity (Pa) #concrete cover cnom = 0.035 #concrete cover (m) eSize = 1.0 #length of elements # *** GEOMETRIC model (points, lines, surfaces) - SETS *** FEcase = xc.FEProblem() preprocessor = FEcase.getPreprocessor prep = preprocessor #short name nodes = prep.getNodeHandler elements = prep.getElementHandler elements.dimElem = 3 # Problem type modelSpace = predefined_spaces.StructuralMechanics3D( nodes) #Defines the dimension of #the space: nodes by three coordinates (x,y,z) and #three DOF for each node (Ux,Uy,Uz) # coordinates in global X,Y,Z axes for the grid generation xList = [sum(xSpacGrid[:i + 1]) for i in range(len(xSpacGrid))] yList = [sum(ySpacGrid[:i + 1]) for i in range(len(ySpacGrid))] zList = [0]
''' Home made test.''' __author__ = "Luis C. Pérez Tato (LCPT) and Ana Ortega (A_OO)" __copyright__ = "Copyright 2015, LCPT and AO_O" __license__ = "GPL" __version__ = "3.0" __email__ = "[email protected] [email protected]" import xc_base import geom import xc from materials.sections import section_properties as sp from materials.ec3 import EC3_materials # Problem type mainBeam = xc.FEProblem() mainBeam.title = 'Falsework support beams' preprocessor = mainBeam.getPreprocessor #Materials S355JR = EC3_materials.S355JR S355JR.gammaM = 1.00 chsSection = EC3_materials.CHSShape(S355JR, 'CHS_48.3_5.0') # ^ Y # | # # o o o o # # -> Z #
import xc from model import predefined_spaces from solution import predefined_solutions from materials import typical_materials width= 1 depth= 2 areaTeor= width*depth iyTeor= 1/12.0*width*depth**3 izTeor= 1/12.0*depth*width**3 y0= 0 z0= 0 F= 1000 # Force. # Problem type prueba= xc.FEProblem() preprocessor= prueba.getPreprocessor # Materials definition E= 2.1e6 # steel Young modulus. elast= typical_materials.defElasticMaterial(preprocessor,"elast",E) # Section geomSCC= preprocessor.getMaterialHandler.newSectionGeometry("geomSCC") y1= width/2.0 z1= depth/2.0 regiones= geomSCC.getRegions rg= regiones.newQuadRegion("elast") rg.nDivIJ= 1 rg.nDivJK= 2
# QwheelExcTr=100e3 #load/wheel [N] # alphQExcTr=1.00 # #Braking load # brakingQhw=min(1.2*alphQ1hw*Qk1+0.1*alphq1hw*qk1*3*totalwidth,900e3) #in highway # brakingQsr=min(1.2*alphQ1sr*Qk1+0.1*alphq1sr*qk1*3*totalwidth,900e3) #in subsidiary road # #Road sub-base thickness # subbThHw=1.8 #mean sub-base thickness under the highway # subbThSr=1.2 #mean sub-base thickness under the subsidiary road # densSubb=2.2e3 #mass density (kg/m3) of the sub-base material # *** GEOMETRY *** TBBridge= xc.FEProblem() model= gm.GridModel(TBBridge) # coordinates in global X,Y,Z axes for the grid generation xList=[0,1.475,2.15,4.425,5.15,7.375,8.15,9.65,10.325,11.8] yList=[0,15,30,45] zList=[0,1.24-0.3,diaphHeight,diaphHeight+0.20+deckSlabTh/2.0] #auxiliary data lastXpos=len(xList)-1 lastYpos=len(yList)-1 lastZpos=len(zList)-1 # grid of X,Y,Z axes coordinates rejXYZ= model.setGrid(xList,yList,zList)
def createFEProblem(self, title): '''Create finite element problem.''' self.feProblem = xc.FEProblem() self.feProblem.title = title return self.feProblem
from materials.sections import section_properties #Parts definition import re #Mesh definition from model import predefined_spaces #Loads from actions import load_cases as lcm from actions import combinations as combs #Solution from solution import predefined_solutions gilamontDock = xc.FEProblem() execfile('./xc_model_blocks.py') xcTotalSet = preprocessor.getSets.getSet('total') quakeAccel = 1.25 #m/s2 #Material definition. concrete = SIA262_materials.c30_37 nu = 0.3 # Poisson coefficient. dens = 2500 # Density kg/m3. #Deck. #reductionFactor= 1.0 # reductionFactor = 7.0 #Reduction factor Econcrete = concrete.getEcm() / reductionFactor
from __future__ import print_function import xc_base import geom import xc from model import predefined_spaces from solution import predefined_solutions from materials.awc_nds import AWCNDS_materials from materials import typical_materials # Loads from actions import load_cases as lcm from actions import combinations as combs # Problem type sheathingBeam = xc.FEProblem() sheathingBeam.title = 'Sheating design' preprocessor = sheathingBeam.getPreprocessor nodes = preprocessor.getNodeHandler modelSpace = predefined_spaces.StructuralMechanics2D(nodes) # Materials # Mechanical properties taken from: # http://www.pfsteco.com/techtips/pdf/tt_plywooddesigncapacities structuralPanelGeom = AWCNDS_materials.PlywoodPanelSection('TECO 32/16', b=1.0, h=0.594 * 0.0254, shear_constant=3) plywood = typical_materials.MaterialData(name='TECO 32/16', E=4161501119.15, nu=0.2,