Пример #1
0
 def getElasticMaterialData(self):
     '''Return the elastic material constitutive model.'''
     materialModelName = self.materialName + 'ElasticMaterialData'
     return typical_materials.MaterialData(name=materialModelName,
                                           E=self.getEcm(),
                                           nu=self.nuc,
                                           rho=self.density())
Пример #2
0
 def defXCMaterial(self):
     '''Defines the material in XC.'''
     if (not self.xc_wood_material):
         self.xc_wood_material = typical_materials.MaterialData(
             name=self.material.xc_material_name,
             E=self.material.E,
             nu=self.nu,
             rho=self.rho)
     return self.xc_wood_material
Пример #3
0
 def defElasticShearSection2d(self, preprocessor, angle=math.pi / 2.0):
     ''' Defines a elastic shear section for two-dimensional
         problems.'''
     matName = self.sectionName + '_' + 'osbMaterial'
     osbMaterial = typical_materials.MaterialData(name=matName,
                                                  E=self.getE(angle),
                                                  nu=0.2,
                                                  rho=self.rho)
     retval = super(OSBPanel,
                    self).defElasticShearSection2d(preprocessor,
                                                   osbMaterial)
     return retval
Пример #4
0
lastZpos = len(zList) - 1

# grid of X,Y,Z axes coordinates
rejXYZ = model.setGrid(xList, yList, zList)

#Displacements of the grid points in a range
#syntax: moveRange(ijkGrid.IJKRange([minIindex,minJindex,minKindex],[maxIindex,maxJindex,maxKindex],[dispX,dispY,dispZ])
# for k in range(3,lastZpos+1):
#   r= ijkGrid.IJKRange([lastXpos,0,k],[lastXpos,lastYpos,k])
#   deltaXPto=-RGlass*(1-math.cos((k-2)*incrAngRad))
#   mr= ijkGrid.moveRange(r,[deltaXPto,0.0,0.0])
#   rejXYZ.rangesToMove.append(mr)

# *** MATERIALS ***
concrete = typical_materials.MaterialData(name='concrete',
                                          E=concrete.Ecm(),
                                          nu=concrete.nuc,
                                          rho=2500)

# Isotropic elastic section-material appropiate for plate and shell analysis
# Attributes:
#   name:         name identifying the section
#   E:            Young’s modulus of the material
#   nu:           Poisson’s ratio
#   rho:          mass density
#   thickness:    overall depth of the section

#matDeck= gm.DeckMaterialData(name= 'matDeck',thickness= deckTh,material=concrete)

#Geometric sections
#rectangular sections
from materials.sections import section_properties as rectSect
Пример #5
0
# coordinates in global X,Y,Z axes for the grid generation
xList=[0]
yList=[0]
zList=[-Lpile,0]
# grid model definition
gridGeom= gm.GridModel(prep,xList,yList,zList)

# Grid geometric entities definition (points, lines, surfaces)
# Points' generation
gridGeom.generatePoints()
#Lines generation
pile_rg=gm.IJKRange((0,0,0),(0,0,1))
pile=gridGeom.genLinOneRegion(ijkRange=pile_rg,setName='pile')

#                         *** MATERIALS *** 
concrProp=tm.MaterialData(name='concrProp',E=concrete.Ecm(),nu=concrete.nuc,rho=concrete.density())
#Geometric sections
#rectangular sections
from materials.sections import section_properties as sectpr
geomSectPile=sectpr.RectangularSection(name='geomSectPile',b=LeqPile,h=LeqPile)
# Elastic material-section
pile_mat=tm.BeamMaterialData(name='pile_mat', section=geomSectPile, material=concrProp)
pile_mat.setupElasticShear3DSection(preprocessor=prep)

#                         ***FE model - MESH***
pile_mesh=fem.LinSetToMesh(linSet=pile,matSect=pile_mat,elemSize=eSize,vDirLAxZ=xc.Vector([0,1,0]),elemType='ElasticBeam3d',dimElemSpace=3,coordTransfType='linear')
fem.multi_mesh(preprocessor=prep,lstMeshSets=[pile_mesh])


#                       ***BOUNDARY CONDITIONS***
pileBC=sbc.PileFoundation(setPile=pile,pileDiam=fiPile,E=concrete.Ecm(),pileType='endBearing',pileBearingCapacity=bearCap,groundLevel=zGround,soilsProp=soils)
Пример #6
0
from model import fix_node_6dof
from materials import typical_materials
from materials import paramRectangularSection
from materials import defSeccAggregation

h = 0.30  # Beam cross-section depth.
b = 0.2  # Beam cross-section width.
E = 2e6  # Elastic modulus

prueba = xc.ProblemaEF()
preprocessor = prueba.getPreprocessor
nodes = preprocessor.getNodeLoader

seccPrueba = paramRectangularSection.RectangularSection("prueba", b, h)
matseccPrueba = typical_materials.MaterialData(name='mt',
                                               E=E,
                                               nu=0.3,
                                               rho=2500)

# Define materials
defSeccAggregation.defSeccAggregation2d(preprocessor, seccPrueba,
                                        matseccPrueba)
matPrueba = preprocessor.getMaterialLoader.getMaterial("prueba")
tang = matPrueba.getTangentStiffness()
EI = tang.at(1, 1)
EA = tang.at(0, 0)

EITeor = (1 / 12.0 * b * h**3 * E)
EITeor2 = matseccPrueba.E * seccPrueba.Iz()
ratio1 = ((EI - EITeor) / EITeor)
EATeor = (b * h * E)
ratio2 = ((EA - EATeor) / EATeor)
Пример #7
0
lastZpos=len(zList)-1

# grid of X,Y,Z axes coordinates
rejXYZ= model.setGrid(xList,yList,zList)

#Displacements of the grid points in a range
#syntax: moveRange(ijkGrid.IJKRange([minIindex,minJindex,minKindex],[maxIindex,maxJindex,maxKindex],[dispX,dispY,dispZ])
# for k in range(3,lastZpos+1):
#   r= ijkGrid.IJKRange([lastXpos,0,k],[lastXpos,lastYpos,k])
#   deltaXPto=-RGlass*(1-math.cos((k-2)*incrAngRad))
#   mr= ijkGrid.moveRange(r,[deltaXPto,0.0,0.0])
#   rejXYZ.rangesToMove.append(mr)


# *** MATERIALS *** 
concrete=typical_materials.MaterialData(name='concrete',E=EcConcr,nu=cpoisConcr,rho=densConcr)


  # Isotropic elastic section-material appropiate for plate and shell analysis
  # Attributes:
  #   name:         name identifying the section
  #   E:            Young’s modulus of the material
  #   nu:           Poisson’s ratio
  #   rho:          mass density
  #   thickness:    overall depth of the section

#matDeck= gm.DeckMaterialData(name= 'matDeck',thickness= deckTh,material=concrete)


  #Geometric sections
  #rectangular sections
Пример #8
0
__license__ = "GPL"
__version__ = "3.0"
__email__ = "*****@*****.**"

L = 2  # Bar length.
P = 10e3  # Transverse uniform load.
n = 1e6  # Axial uniform load.

feProblem = xc.FEProblem()
preprocessor = feProblem.getPreprocessor
nodes = preprocessor.getNodeHandler

sectionTest = section_properties.RectangularSection("sectionTest",
                                                    b=.20,
                                                    h=.30)  # Section geometry.
sectionTestMaterial = typical_materials.MaterialData(
    "sectionTestMaterial", E=7E9, nu=0.3, rho=2500)  # Section material.

# Problem type
modelSpace = predefined_spaces.StructuralMechanics2D(nodes)
# Definimos el material
def_secc_aggregation.def_secc_aggregation2d(preprocessor, sectionTest,
                                            sectionTestMaterial)
nodes.defaultTag = 1  # First node number.
nod = nodes.newNodeXY(0, 0)
nod = nodes.newNodeXY(L, 0.0)

# Geometric transformations
lin = modelSpace.newLinearCrdTransf("lin")

# Materials definition
scc = typical_materials.defElasticSection2d(preprocessor, "scc",
Пример #9
0
# grid model definition
Rcoo = [R]
Angcoo = [i * 360 / 25 for i in range(25)]
zTop = zBase + height
Zcoo = [zBase, zTop]
grid = gm.GridModel(prep, Rcoo, Angcoo, Zcoo, xCentCoo=xCent, yCentCoo=yCent)
grid.generateCylZPoints()

tank = grid.genSurfOneXYZRegion(xyzRange=((R, 0, zBase), (R, Angcoo[-1],
                                                          zTop)),
                                setName='tank',
                                closeCyl='Y')

steel = astm.A36
steel_prop = tm.MaterialData(name='steel',
                             E=steel.E,
                             nu=steel.nu,
                             rho=steel.rho)
tank_mat = tm.DeckMaterialData(name='tank_mat',
                               thickness=thickness,
                               material=steel_prop)
tank_mat.setupElasticSection(preprocessor=prep)  #creates the section-materia
tank_mesh = fem.SurfSetToMesh(surfSet=tank,
                              matSect=tank_mat,
                              elemSize=0.25,
                              elemType='ShellMITC4')
tank_mesh.generateMesh(prep)

# Boundary condition
nodBase = sets.get_set_nodes_plane_XY(setName='nodBase',
                                      setBusq=tank,
                                      zCoord=zBase,
Пример #10
0
from misc import scc2d_testing_bench

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

feProblem= xc.FEProblem()
feProblem.logFileName= "/tmp/erase.log" # Ignore warning messages
preprocessor=  feProblem.getPreprocessor


# Rectangular cross-section definition
scc10x20=  section_properties.RectangularSection(name="rectang",b=.10,h=.20) # Section geometry.
matscc10x20=typical_materials.MaterialData(name='mtrectang',E=2.1e6,nu=0.3,rho=2500) # Section material.

# Materials definition
matPoteau= scc10x20.defElasticSection2d(preprocessor,matscc10x20) 
elemZLS= scc2d_testing_bench.sectionModel(preprocessor, scc10x20.sectionName)

# Constraints
modelSpace= predefined_spaces.getStructuralMechanics2DSpace(preprocessor)
modelSpace.fixNode000(1)
spc= modelSpace.constraints.newSPConstraint(2,1,0.0)

# Loads definition
loadHandler= preprocessor.getLoadHandler
lPatterns= loadHandler.getLoadPatterns
#Load modulation.
ts= lPatterns.newTimeSeries("constant_ts","ts")
Пример #11
0
preprocessor = deck.getPreprocessor
nodes = preprocessor.getNodeHandler
elements = preprocessor.getElementHandler
groups = preprocessor.getSets

#Materials
# Concrete.
concrete = SIA262_materials.c25_30
Ec = concrete.getEcm()
deckThickness = 0.35
deckUnitWeight = deckThickness * 25e3
parapetUnitWeight = deckUnitWeight
sccDeck = section_properties.RectangularSection("sccDeck", 1.0,
                                                deckThickness)  #,Ec,0.2)
matData = typical_materials.MaterialData(name='deckConcrete',
                                         E=Ec,
                                         nu=0.2,
                                         rho=2500)
matDeck = sccDeck.defElasticShearSection2d(preprocessor, matData)

# Masonry bearing.
kSpandrel = 5e8
#kYSpandrel= typical_materials.defElastNoTensMaterial(preprocessor, "kYSpandrel",kSpandrel)
kYSpandrel = typical_materials.defElasticMaterial(preprocessor, "kYSpandrel",
                                                  kSpandrel)
kXSpandrel = typical_materials.defElasticMaterial(preprocessor, "kXSpandrel",
                                                  kSpandrel / 10.0)
kFill = 5e7
#kYFill= typical_materials.defElastNoTensMaterial(preprocessor, "kYFill",kFill)
kYFill = typical_materials.defElasticMaterial(preprocessor, "kYFill", kFill)
kXFill = typical_materials.defElasticMaterial(preprocessor, "kXFill",
                                              kFill / 10.0)
Пример #12
0
feProblem = xc.FEProblem()
preprocessor = feProblem.getPreprocessor
nodes = preprocessor.getNodeHandler
modelSpace = predefined_spaces.StructuralMechanics3D(nodes)
nodes.defaultTag = 1  #First node number.
nod = nodes.newNodeXYZ(0, 0.0, 0.0)
nod = nodes.newNodeXYZ(L, 0.0, 0.0)

lin = modelSpace.newLinearCrdTransf("lin", xc.Vector([0, 1, 0]))
S275JR = EC3_materials.S275JR
gammaM0 = 1.05
S275JR.gammaM = gammaM0
HE400B = structural_steel.SteelShape(
    S275JR, "HE_400_B", arcelor_metric_shapes.HE)  # Section geometry.
matHE400B = typical_materials.MaterialData(name='S275JR',
                                           E=S275JR.E,
                                           nu=S275JR.nu,
                                           rho=7850)  # Section material.
profil = HE400B.defElasticShearSection3d(preprocessor, matHE400B)

# Elements definition
elements = preprocessor.getElementHandler
elements.defaultTransformation = "lin"

elements.defaultMaterial = HE400B.sectionName
elem = elements.newElement("ElasticBeam3d", xc.ID([1, 2]))
elem.rho = HE400B.get('P')
vc.defSteelShapeElasticRangeElementParameters(elem, HE400B)
vc.defVarsControlTensRegElastico3d([elem])

recorder = feProblem.getDomain.newRecorder("element_prop_recorder", None)
recorder.setElements(xc.ID([0]))
Пример #13
0
ln = lines.newLine(pt0.tag, pt1.tag)  # From pt0 to pt1.

# Ascii art:
#
#    ^ y
#    |            ln
#    +-----------------------------+ ---> z
#   pt0                           pt1
#
# We have finished with the definition of the geometry.

# Material definition.
# We need a material to assign to the elements that we create
# with the mesh generation.
# Material properties
EL = typical_materials.MaterialData(name='EL', E=210000.0e6, nu=0.3, rho=0.0)

# Cross section properties (1x1 m square section)
crossSection = section_properties.RectangularSection("SQ_1x1", b=1.0, h=1.0)
beamSection = crossSection.defElasticShearSection3d(preprocessor, EL)

#########################################################
# Mesh generation.

# Definition of the "seed element": the element that will copied into each
# mesh cell.

# Orientation of the element axis:
lin = modelSpace.newLinearCrdTransf("lin", xc.Vector([1, 0, 0]))

seedElemHandler = preprocessor.getElementHandler.seedElemHandler
Пример #14
0
__author__= "Luis C. Pérez Tato (LCPT) and Ana Ortega (AOO)"
__copyright__= "Copyright 2015, LCPT and AOO"
__license__= "GPL"
__version__= "3.0"
__email__= "*****@*****.**"

L= 2 # Bar length.
P= 10e3 # Carga uniforme transversal.
n= 1e6 # Carga uniforme axial.

prueba= xc.ProblemaEF()
preprocessor=  prueba.getPreprocessor   
nodes= preprocessor.getNodeLoader

seccPrueba= paramRectangularSection.RectangularSection("prueba",b=.20,h=.30)
matSeccPrueba= typical_materials.MaterialData("matprueba",E=7E9,nu=0.3,rho=2500)



# Problem type
modelSpace= predefined_spaces.StructuralMechanics3D(nodes)
# Definimos el material
defSeccAggregation.defSeccAggregation3d(preprocessor, seccPrueba,matSeccPrueba)
nodes.defaultTag= 1 #First node number.
nod= nodes.newNodeXYZ(0,0,0)
nod= nodes.newNodeXYZ(L/2,0,0)
nod= nodes.newNodeXYZ(L,0,0)

# Geometric transformations
trfs= preprocessor.getTransfCooLoader
lin= trfs.newLinearCrdTransf3d("lin")
Пример #15
0
from solution import predefined_solutions

inchToMeter= 2.54/100.0
feetToMeter= 0.3048
psfTokNm2= 0.04788026
    
#########################################################
# Problem definition.
feProblem= xc.FEProblem()
preprocessor= feProblem.getPreprocessor
modelSpace= predefined_spaces.StructuralMechanics3D(preprocessor.getNodeHandler)

#########################################################
# Material definition.
lumber4x2= section_properties.RectangularSection("lumber4x2",b=3.5*inchToMeter,h=1.5*inchToMeter)
wood= typical_materials.MaterialData(name= 'wood',E=12.4e9,nu=0.33,rho=500)
chordSectionsGeometry= lumber4x2
chordsSection= chordSectionsGeometry.defElasticShearSection3d(preprocessor,wood)
diagonalSectionsGeometry= lumber4x2
diagonalsMaterial= typical_materials.defElasticMaterial(preprocessor,"diagonalsMaterial",wood.E)
postsSection= chordsSection

depth= 22*inchToMeter-chordSectionsGeometry.h
panelSize= 60*inchToMeter
span= feetToMeter*31.0+5*inchToMeter

#########################################################
# Mesh generation.
lowerChordAxis= geom.Segment3d(geom.Pos3d(0.0,0.0,0.0),geom.Pos3d(span,0.0,0.0))
upperChordAxis= geom.Segment3d(geom.Pos3d(0.0,0.0,depth),geom.Pos3d(span,0.0,depth))
truss= truss_generators.FanTruss(lowerChordAxis, upperChordAxis, trussModule= panelSize)
Пример #16
0
# 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.PlywoodPanel('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,rho=500)
section= structuralPanelGeom.defElasticShearSection2d(preprocessor,plywood)
EI= section.sectionProperties.EI()
EIRef= 126500*4.44822*(0.0254)**2/0.3048

ratio0= abs((EI-EIRef)/EIRef)

thickness= structuralPanelGeom.h

deflectionSpan= (32-1.5+0.25)*0.0254
internalForcesSpan= 32*0.0254 # 32
span= internalForcesSpan 
pointHandler= preprocessor.getMultiBlockTopology.getPoints
pt1= pointHandler.newPntFromPos3d(geom.Pos3d(0.0,0.0,0.0))
pt2= pointHandler.newPntFromPos3d(geom.Pos3d(span,0.0,0.0))
pt3= pointHandler.newPntFromPos3d(geom.Pos3d(2.0*span,0.0,0.0))
Пример #17
0
import xc_base
import geom
import xc
from model import predefined_spaces
from materials import typical_materials
from materials.sections import section_properties
from postprocess import control_vars as cv
from solution import predefined_solutions
from miscUtils import LogMessages as lmsg
from materials.sections import internal_forces
from collections import defaultdict

# Fake section (elements must have a stiffness)
sccFICT = section_properties.RectangularSection("rectang", b=.40, h=40)
matSccFICT = typical_materials.MaterialData("mrectang",
                                            E=2.1e6,
                                            nu=0.3,
                                            rho=2500)


class PhantomModel(object):
    def __init__(self, preprocessor, sectionDistribution):
        '''Extracts the element identifiers from a XC output file generated
    with the results for each conbination analyzed 
    
    :ivar preprocessor: preprocessor object (access to FE model -nodes, 
                        elements, loads,...)
    :ivar sectionsDistribution:  file containing the section definition for
                                 each element (this section will be 
                                 be employed in verifications).
    '''
        self.preprocessor = preprocessor
Пример #18
0
from model import predefined_spaces
from materials import typical_materials
from materials.sections import section_properties
from materials.sections import defSeccAggregation


h= 0.30 # Beam cross-section depth.
b= 0.2 # Beam cross-section width.
E= 2e6 # Elastic modulus

feProblem= xc.FEProblem()
preprocessor=  feProblem.getPreprocessor   
nodes= preprocessor.getNodeHandler

sectionTest= section_properties.RectangularSection("sectionTest",b,h) # Section geometry.
sectionTestMaterial=typical_materials.MaterialData(name='sectionTestMaterial',E=E,nu=0.3,rho=2500) # Section material.

# Define materials
defSeccAggregation.defSeccAggregation2d(preprocessor, sectionTest,sectionTestMaterial)
tang= preprocessor.getMaterialHandler.getMaterial("sectionTest").getTangentStiffness()
EI= tang.at(1,1)
EA= tang.at(0,0)




EITeor= (1/12.0*b*h**3*E)
EITeor2= sectionTestMaterial.E*sectionTest.Iz()
ratio1= ((EI-EITeor)/EITeor)
EATeor= (b*h*E)
ratio2= ((EA-EATeor)/EATeor)
Пример #19
0
#Points' generation
gridGeom = gm.GridModel(prep, xList, yList, zList)
gridGeom.generatePoints()

floor1 = gridGeom.genSurfOneXYZRegion(xyzRange=((2, 5, 2), (8, 15, 2)),
                                      setName='floor1')
#out.displayBlocks()
floor2 = gridGeom.genSurfOneXYZRegion(xyzRange=((0, 0, 4), (10, 20, 4)),
                                      setName='floor2')
#out.displayBlocks()
columns_rg = gm.IJKRange((2, 5, 0), (8, 15, 4)).extractIncludedKranges(stepI=2,
                                                                       stepJ=3)
columns = gridGeom.genLinMultiRegion(lstIJKRange=columns_rg, setName='columns')
#out.displayBlocks()
#                         *** MATERIALS (constitutive models) ***
mat_slabs = tm.MaterialData(name='mat_slabs', E=2.55e15, nu=0.2, rho=2500)
mat_walls = tm.MaterialData(name='mat_walls', E=2.55e15, nu=0.2, rho=2500)
mat_cols = tm.MaterialData(name='mat_cols', E=2.55e15, nu=0.2, rho=2500)

# Isotropic elastic section-material appropiate for plate and shell analysis
deck_mat = tm.DeckMaterialData(name='deck_mat',
                               thickness=0.25,
                               material=mat_slabs)
deck_mat.setupElasticSection(preprocessor=prep)  #creates de section-material
wall_mat = tm.DeckMaterialData(name='wall_mat',
                               thickness=0.15,
                               material=mat_walls)
wall_mat.setupElasticSection(preprocessor=prep)  #creates de section-material

#Sections geometry
#rectangular sections
Пример #20
0
#Surfaces generation
losCim = gridGeom.genSurfMultiRegion(lstIJKRange=losCim_rg, setName='losCim')
hastiales = gridGeom.genSurfMultiRegion(lstIJKRange=hastiales_rg,
                                        setName='hastiales')
dintel = gridGeom.genSurfMultiRegion(lstIJKRange=dintel_rg, setName='dintel')

#Lines generation
murete_i = gridGeom.genLinMultiRegion(lstIJKRange=murete_i_rg,
                                      setName='murete_i')
murete_d = gridGeom.genLinMultiRegion(lstIJKRange=murete_d_rg,
                                      setName='murete_d')

#                         *** MATERIALS ***

concrDeck = tm.MaterialData(name='concrDeck', E=EcDeck, nu=cpoish, rho=densh)
concrWalls = tm.MaterialData(name='concrWalls',
                             E=EcWalls,
                             nu=cpoish,
                             rho=densh)
concrFound = tm.MaterialData(name='concrFound',
                             E=EcFound,
                             nu=cpoish,
                             rho=densh)

#Geometric sections
#rectangular sections
from materials.sections import section_properties as sectpr
geomSectMuretes = sectpr.RectangularSection(name='geomSectMuretes',
                                            b=0.5,
                                            h=0.5)
Пример #21
0
__license__ = "GPL"
__version__ = "3.0"
__email__ = "*****@*****.**"

feProblem = xc.FEProblem()
feProblem.logFileName = "/tmp/erase.log"  # Ignore warning messages
preprocessor = feProblem.getPreprocessor

# Rectangular cross-section definition
#XXX Is not a rectangular sections so THE TEST SEEMS NOT HAVE MUCH SENSE
# At last we must create a class for this kind to be consistent with
# the classes already defined to deal with steel profiles.
SHS50x50x2_5 = section_properties.RectangularSection(
    "SHS50x50x2_5", b=0.05, h=0.05)  # Section geometry.
matSHS50x50x2_5 = typical_materials.MaterialData(name='matSec',
                                                 E=210000e6,
                                                 nu=0.3e6,
                                                 rho=2500)  #Section material.

SHS50x50x2_5.sectionName = "SHS50x50x2_5"
SHS50x50x2_5.b = 0.05
SHS50x50x2_5.h = 0.05
SHS50x50x2_5.e = 2.5e-3
SHS50x50x2_5.P = 3.54
#SHS50x50x2_5.A= 4.51e-4
#SHS50x50x2_5.Iz= 17.9e-8
#SHS50x50x2_5.Iy= 17.9e-8
SHS50x50x2_5.Wzel = 7.16e-6
SHS50x50x2_5.Wzpl = 8.47e-6
SHS50x50x2_5.iz = 1.99e-2
SHS50x50x2_5.iy = 1.99e-2
#SHS50x50x2_5.J= 26.8e-8
Пример #22
0
# grid of X,Y,Z axes coordinates
rejXYZ= model.setGrid(xList,yList,zList)

#Displacements of the grid points in a range
#syntax: moveRange(ijkGrid.IJKRange([minIindex,minJindex,minKindex],[maxIindex,maxJindex,maxKindex],[dispX,dispY,dispZ])
# for i in range(1,len(xList)):
#   r= ijkGrid.IJKRange([i,0,lastZind],[i,lastYpos,lastZind])
#   mr= ijkGrid.moveRange(r,[0.0,0.0,trSlope*xList[i]])
#   rejXYZ.rangesToMove.append(mr)



# *** MATERIALS *** 

concrForAll=typical_materials.MaterialData(name='concrForAll',E=Econcr,nu=cpoisC,rho=densC)
# S275JR= EC3_materials.S275JR
# S275JRbeam=typical_materials.MaterialData(name='S275JRbeam',E=S275JR.E,nu=S275JR.nu,rho=7850)

#geometric sections
  # Isotropic elastic section-material appropiate for plate and shell analysis
  # Attributes:
  #   name:         name identifying the section
  #   E:            Young’s modulus of the material
  #   nu:           Poisson’s ratio
  #   rho:          mass density
  #   thickness:    overall depth of the section

wallsBasement_mat= gm.DeckMaterialData(name= 'wallsBasement', thickness= thickWallsBasement, material=concrForAll)
facadeShearWall_mat= gm.DeckMaterialData(name= 'facadeShearWall', thickness= thickFacadeShearWalls, material=concrForAll)
shearWallStaircase_mat= gm.DeckMaterialData(name= 'shearWallStaircase', thickness= thickShearWallStaircase, material=concrForAll)
Пример #23
0
    geom.Pos2d(0.06, 0.52),
    geom.Pos2d(0.645, 0.59),
    geom.Pos2d(0.645, 0.65),
    geom.Pos2d(-0.645, 0.65),
    geom.Pos2d(-0.645, 0.59),
    geom.Pos2d(-0.06, 0.52),
    geom.Pos2d(-0.06, 0.14),
    geom.Pos2d(-0.23, 0.1),
    geom.Pos2d(-0.23, 0.0),
    geom.Pos2d(0.23, 0.0)
])

beamType4Section = section_properties.PolygonalSection(
    'beamType4Contour', geom.Polygon2d(polT4)).defElasticShearSection3d(
        preprocessor,
        typical_materials.MaterialData('tmp', beamConcr.Ecm(), beamConcr.nuc,
                                       beamConcr.density()))
beamType5Section = section_properties.PolygonalSection(
    'beamType5Contour', geom.Polygon2d(polT5)).defElasticShearSection3d(
        preprocessor,
        typical_materials.MaterialData('tmp', beamConcr.Ecm(), beamConcr.nuc,
                                       beamConcr.density()))
beamType6Section = section_properties.PolygonalSection(
    'beamType6Contour', geom.Polygon2d(polT6)).defElasticShearSection3d(
        preprocessor,
        typical_materials.MaterialData('tmp', beamConcr.Ecm(), beamConcr.nuc,
                                       beamConcr.density()))

beamWebSection = section_properties.RectangularSection(
    'beamWebSection', 0.5, 0.16).defElasticShearSection3d(
        preprocessor,
        typical_materials.MaterialData('tmp', beamConcr.Ecm(), beamConcr.nuc,
Пример #24
0
pnt2=points.newPntIDPos3d(2,geom.Pos3d(Lbeam,0,0)) #end point
beamSet.getPoints.append(pnt1)
beamSet.getPoints.append(pnt2)

#lines
lines= prep.getMultiBlockTopology.getLines
lines.defaultTag=1
ln1=lines.newLine(1,2)
beamSet.getLines.append(ln1)

#materials
concrete=EC2_materials.C30 #concrete according to EC2 fck=33 MPa
reinfSteel=EC2_materials.S450C #reinforcing steel according to EC2 fyk=450 MPa
concrete=EHE_materials.HA30 #concrete according to EC2 fck=33 MPa

concrdat=tm.MaterialData(name='concrdat',E=concrete.Ecm(),nu=0.2,rho=2500)

#Geometric sections
#rectangular sections
from materials.sections import section_properties as sectpr
geomSectBeam=sectpr.RectangularSection(name='geomSectBeam',b=width,h=depth)

# Elastic material-section appropiate for 3D beam analysis, including shear
  # deformations.
beam_mat= tm.BeamMaterialData(name= 'beam_mat', section=geomSectBeam, material=concrdat)
beam_mat.setupElasticShear3DSection(preprocessor=prep)

#                         ***FE model - MESH***

beam_mesh=fem.LinSetToMesh(linSet=beamSet,matSect=beam_mat,elemSize=eSize,vDirLAxZ=xc.Vector([0,-1,0]),elemType='ElasticBeam3d',dimElemSpace=3,coordTransfType='linear')
beam_mesh.generateMesh(prep)    # mesh this set of lines
Пример #25
0
tendonPoints = tendonSet.getPoints
tendonLines = tendonSet.getLines
for i in range(1, 3):
    p = points.newPntFromPos3d(geom.Pos3d(0, i * span / 3, -deltaTendon))
    tendonPoints.append(p)
tendonLines.append(lines.newLine(beamPoints[0].tag, tendonPoints[0].tag))
tendonLines.append(lines.newLine(tendonPoints[0].tag, tendonPoints[1].tag))
tendonLines.append(lines.newLine(tendonPoints[1].tag, beamPoints[3].tag))

#BEAM
#Geometric section
from materials.sections import section_properties as sectpr
geomSectBeam = sectpr.RectangularSection(name='geomSectBeam', b=wBeam, h=hBeam)

# Material definition
concrete = tm.MaterialData(name='concrete', E=Ec, nu=nuc, rho=densc)
beamMat = tm.BeamMaterialData(name='beamMat',
                              section=geomSectBeam,
                              material=concrete)
beamMat.setupElasticShear3DSection(prep)

#Meshing
for l in beamSet.getLines:
    l.nDiv = nDivLines
beam_mesh = fem.LinSetToMesh(linSet=beamSet,
                             matSect=beamMat,
                             elemSize=None,
                             vDirLAxZ=xc.Vector([1, 0, 0]),
                             elemType='ElasticBeam3d',
                             dimElemSpace=3,
                             coordTransfType='linear')
Пример #26
0
lastZpos = len(zList) - 1

# grid of X,Y,Z axes coordinates
rejXYZ = model.setGrid(xList, yList, zList)

#Displacements of the grid points in a range
#syntax: moveRange(ijkGrid.IJKRange([minIindex,minJindex,minKindex],[maxIindex,maxJindex,maxKindex],[dispX,dispY,dispZ])
for k in range(3, lastZpos + 1):
    r = ijkGrid.IJKRange([lastXpos, 0, k], [lastXpos, lastYpos, k])
    deltaXPto = -RGlass * (1 - math.cos((k - 2) * incrAngRad))
    mr = ijkGrid.moveRange(r, [deltaXPto, 0.0, 0.0])
    rejXYZ.rangesToMove.append(mr)

# *** MATERIALS ***
concrete = typical_materials.MaterialData(name='concrete',
                                          E=EcConcr,
                                          nu=cpoisConcr,
                                          rho=densConcr)
#Fictitious material to represent rigid motion
fictMat = typical_materials.MaterialData(name='fictMat',
                                         E=Efict,
                                         nu=cpoisFict,
                                         rho=densFict)
#fictMat.G=GFict

# Isotropic elastic section-material appropiate for plate and shell analysis
# Attributes:
#   name:         name identifying the section
#   E:            Young’s modulus of the material
#   nu:           Poisson’s ratio
#   rho:          mass density
#   thickness:    overall depth of the section
Пример #27
0
    geom.Pos3d(cantileverLength, 3 * cantileverWidth, 0.0))

surfaces = prep.getMultiBlockTopology.getSurfaces
s1 = surfaces.newQuadSurfacePts(pt1.tag, pt5.tag, pt6a.tag, pt2a.tag)
s2 = surfaces.newQuadSurfacePts(pt2b.tag, pt6b.tag, pt7a.tag, pt3a.tag)
s3 = surfaces.newQuadSurfacePts(pt3b.tag, pt7b.tag, pt8.tag, pt4.tag)

# **** Mesh parameters

# *** Materials ***
fcmConcr = 50e6
EcConcr = 8500 * (fcmConcr / 1e6)**(1 / 3.0) * 1e6
cpoisConcr = 0.2  #Poisson's coefficient of concrete
densConcr = 2500  #specific mass of concrete (kg/m3)
concrete = tm.MaterialData(name='concrete',
                           E=EcConcr,
                           nu=cpoisConcr,
                           rho=densConcr)

deckMat = tm.defElasticMembranePlateSection(prep, "deckMat", EcConcr,
                                            cpoisConcr, 0.0, deckTh)

# *** Meshing ***
seedElemHandler = prep.getElementHandler.seedElemHandler
seedElemHandler.defaultMaterial = "deckMat"
elem = seedElemHandler.newElement("ShellMITC4", xc.ID([0, 0, 0, 0]))

surfaces = [s1, s2, s3]

for s in surfaces:
    s.setElemSizeIJ(0.25, 0.25)
    s.genMesh(xc.meshDir.I)
Пример #28
0
__license__ = "GPL"
__version__ = "3.0"
__email__ = "*****@*****.**"

L = 2  # Bar length.
P = 10e3  # Transverse uniform load.
n = 1e6  # Axial uniform load.

feProblem = xc.FEProblem()
preprocessor = feProblem.getPreprocessor
nodes = preprocessor.getNodeHandler

seccTest = section_properties.RectangularSection("test", b=.20,
                                                 h=.30)  # Section geometry.
matSeccTest = typical_materials.MaterialData("mattest",
                                             E=7E9,
                                             nu=0.3,
                                             rho=2500)  # Section material.

# Problem type
modelSpace = predefined_spaces.StructuralMechanics3D(nodes)
# Definimos el material
def_secc_aggregation.def_secc_aggregation3d(preprocessor, seccTest,
                                            matSeccTest)
nodes.defaultTag = 1  #First node number.
nod = nodes.newNodeXYZ(0, 0, 0)
nod = nodes.newNodeXYZ(L, 0, 0)

# Geometric transformations
lin = modelSpace.newLinearCrdTransf("lin", xc.Vector([0, 0, 1]))
# Elements definition
elements = preprocessor.getElementHandler
Пример #29
0
    def genMesh(self, nodes, springMaterials):
        self.defineWireframeModel(nodes)
        nodes.newSeedNode()
        preprocessor = self.modelSpace.preprocessor
        trfs = preprocessor.getTransfCooLoader
        transformationName = self.name + 'LinearTrf'
        self.trf = trfs.newLinearCrdTransf2d(transformationName)
        wallMatData = typical_materials.MaterialData(name=self.name +
                                                     'Concrete',
                                                     E=self.concrete.getEcm(),
                                                     nu=0.2,
                                                     rho=2500)
        foundationSection = section_properties.RectangularSection(
            self.name + "FoundationSection", self.b, self.footingThickness)
        foundationMaterial = foundationSection.defElasticShearSection2d(
            preprocessor, wallMatData)  #Foundation elements material.
        elementSize = 0.2
        seedElemLoader = preprocessor.getElementLoader.seedElemLoader
        seedElemLoader.defaultMaterial = foundationSection.sectionName
        seedElemLoader.defaultTransformation = transformationName
        seedElem = seedElemLoader.newElement("ElasticBeam2d", xc.ID([0, 0]))
        self.wallSet = preprocessor.getSets.defSet("wallSet")
        self.heelSet = preprocessor.getSets.defSet("heelSet")
        self.toeSet = preprocessor.getSets.defSet("toeSet")
        self.foundationSet = preprocessor.getSets.defSet("foundationSet")
        for lineName in ['heel', 'toe']:
            l = self.wireframeModelLines[lineName]
            l.setElemSize(elementSize)
            l.genMesh(xc.meshDir.I)
            for e in l.getElements():
                self.foundationSet.getElements.append(e)
                self.wallSet.getElements.append(e)
                if (lineName == 'heel'):
                    self.heelSet.getElements.append(e)
                else:
                    self.toeSet.getElements.append(e)
        self.foundationSet.fillDownwards()

        stemSection = section_properties.RectangularSection(
            self.name + "StemSection", self.b,
            (self.stemTopWidth + self.stemBottomWidth) / 2.0)
        stemMaterial = stemSection.defElasticShearSection2d(
            preprocessor, wallMatData)  #Stem elements material.
        self.stemSet = preprocessor.getSets.defSet("stemSet")
        for lineName in ['stem']:
            l = self.wireframeModelLines[lineName]
            l.setElemSize(elementSize)
            seedElemLoader.defaultMaterial = stemSection.sectionName
            l.genMesh(xc.meshDir.I)
            for e in l.getElements():
                y = -e.getPosCentroid(True).y
                h = self.getDepth(y)
                stemSection.h = h
                e.sectionProperties = stemSection.getCrossSectionProperties2D(
                    wallMatData)
                self.stemSet.getElements.append(e)
                self.wallSet.getElements.append(e)
        # Springs on nodes.
        self.foundationSet.computeTributaryLengths(False)
        self.fixedNodes = []
        elasticBearingNodes = self.foundationSet.getNodes
        kX = springMaterials[0]  #Horizontal
        kSx = kX.E
        kY = springMaterials[1]  #Vertical
        kSy = kY.E
        lngTot = 0.0
        for n in elasticBearingNodes:
            lT = n.getTributaryLength()
            lngTot += lT
            #print "tag= ", n.tag, " lT= ", lT
            #print "before k= ", kY.E
            kX.E = kSx * lT
            kY.E = kSy * lT
            fixedNode, newElem = self.modelSpace.setBearing(
                n.tag, ["kX", "kY"])
            self.fixedNodes.append(fixedNode)
        self.stemSet.fillDownwards()
        self.wallSet.fillDownwards()
Пример #30
0
# grid of X,Y,Z axes coordinates
rejXYZ = model.setGrid(xList, yList, zList)

#Displacements of the grid points in a range
#syntax: moveRange(ijkGrid.IJKRange([minIindex,minJindex,minKindex],[maxIindex,maxJindex,maxKindex],[dispX,dispY,dispZ])
# mr= ijkGrid.moveRange( ijkGrid.IJKRange([1,0,1],[1,lastYpos,1]),[0.5,0.0,0.0])
# rejXYZ.rangesToMove.append(mr)

# *** MATERIALS ***
#*Auxiliary data
#fck=30e6  #characteristic strength of concrete (Pa)
#fcm=fck+8e6 #mean strength of concrete (Pa)
#Ec=8500*fcm/1e6**(1/3.0)*1e6 #modulus of elasticity of concrete

concrCantlv = typical_materials.MaterialData(name='concrCantlv',
                                             E=EcConcr,
                                             nu=cpoisConcr,
                                             rho=densConcr)

# Isotropic elastic section-material appropiate for plate and shell analysis
# Attributes:
#   name:         name identifying the section
#   E:            Young’s modulus of the material
#   nu:           Poisson’s ratio
#   rho:          mass density
#   thickness:    overall depth of the section

matCantlv = gm.DeckMaterialData(name='matCantlv',
                                thickness=hcantlv,
                                material=concrCantlv)

#Geometric sections