예제 #1
0
  # 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

geomBotCol=rectSect.RectangularSection(name='geomBotCol',b=BCside-0.1,h=BCside)
#b has been deliberately reduced its size to ensure b<h, otherwise the
#display of results occurs in a direction other than expected. In the particular
#case when b==h the routine isn't able to represent any result
geomGlsCol=rectSect.RectangularSection(name='geomGlsCol',b=0.2,h=0.5)
  #I sections
from materials.sections import section_properties
geomTopCol=section_properties.ISection(name='geomTopCol',wdTopFlange=TCwidthSupFlange,thTopFlange=TCthickSupFlange,thWeb=TCthickWeb,hgWeb=TCheightWeb,wdBotFlange=TCwidthInfFlange,thBotFlange=TCthickInfFlange)

# Elastic material-section appropiate for 3D beam analysis, including shear deformations.
  # Attributes:
  #   name:         name identifying the section
  #   section:      instance of a class that defines the geometric and mechanical characteristiscs
  #                 of a section (e.g: RectangularSection, CircularSection, ISection, ...)
  #   material:     instance of a class that defines the elastic modulus, shear modulus
  #                 and mass density of the material
예제 #2
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  # 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")
예제 #3
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()
예제 #4
0
from solution import predefined_solutions
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)
예제 #5
0
        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,
                                       beamConcr.density()))

braceBeamsConcr = deckConcr
pierBraceBeamSection = section_properties.RectangularSection(
    'pierBraceBeamSection', 0.4, 0.65).defElasticShearSection3d(
        preprocessor,
        typical_materials.MaterialData('tmp', braceBeamsConcr.Ecm(),
                                       braceBeamsConcr.nuc,
                                       braceBeamsConcr.density()))
abutmentBraceBeamSection = section_properties.RectangularSection(
    'abutmentBraceBeamSection', 0.89, 0.65).defElasticShearSection3d(
        preprocessor,
        typical_materials.MaterialData('tmp', braceBeamsConcr.Ecm(),
                                       braceBeamsConcr.nuc,
예제 #6
0
import csv
import numpy
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 
예제 #7
0
from __future__ import division
from __future__ import print_function
from materials.awc_nds import AWCNDS_materials as mat
from materials.sections import section_properties as sp
from rough_calculations import ng_simple_beam as sb

__author__ = "Luis Claudio Pérez Tato (LCPT"
__copyright__ = "Copyright 2015, LCPT"
__license__ = "GPL"
__version__ = "3.0"
__email__ = "*****@*****.**"

L = 30 * 47.88026  # Live load N/m2
D = 10 * 47.88026  # Dead load N/m2
joistSpacing = 16 * 0.0254  # Space between joists
joistSection = sp.RectangularSection('joistSection', 1.5 * 0.0254,
                                     7.25 * 0.0254)
Ss = joistSection.getElasticSectionModulusZ()
SsRef = 13.14 * 0.0254**3
ratio1 = (Ss - SsRef) / SsRef
Is = joistSection.Iz()
IsRef = 47.63 * 0.0254**4
ratio2 = (Is - IsRef) / IsRef

# Tabulated design values
Fb = 975 * 6894.76  # Bending stress (Pa)
E = 1.5e6 * 6894.76  # Modulus of elasticity (Pa)
Fv = 75 * 6894.76  # Shear stress (Pa)
FcT = 405 * 6894.76

CD = mat.getLoadDurationFactor(10)
ratio3 = (CD - 1.0)
예제 #8
0
from model.geometry import geom_utils

deck = xc.FEProblem()
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)
예제 #9
0
from materials.sections import section_properties
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))
예제 #10
0
                               material=concrProp)
deck_mat.setupElasticSection(preprocessor=prep)  #creates the section-material
wall_mat = tm.DeckMaterialData(name='wall_mat',
                               thickness=wallTh,
                               material=concrProp)
wall_mat.setupElasticSection(preprocessor=prep)  #creates the section-material
foot_mat = tm.DeckMaterialData(name='foot_mat',
                               thickness=footTh,
                               material=concrProp)
foot_mat.setupElasticSection(preprocessor=prep)  #creates the section-material

#Geometric sections
#rectangular sections
from materials.sections import section_properties as sectpr
geomSectBeamX = sectpr.RectangularSection(name='geomSectBeamX',
                                          b=wbeamX,
                                          h=hbeamX)
geomSectBeamY = sectpr.RectangularSection(name='geomSectBeamY',
                                          b=wbeamY,
                                          h=hbeamY)
geomSectColumnZ = sectpr.RectangularSection(name='geomSectColumnZ',
                                            b=wcolumnZ,
                                            h=hcolumnZ)

# Elastic material-section appropiate for 3D beam analysis, including shear
# deformations.
# Attributes:
#   name:         name identifying the section
#   section:      instance of a class that defines the geometric and
#                 mechanical characteristiscs
#                 of a section (e.g: RectangularSection, CircularSection,
예제 #11
0
out=outHndl.OutputHandler(modelSpace,sty)
xList=[0,Lsquare/5,Lsquare]
yList=[0,Lsquare/3,Lsquare]
zList=[1]
gridGeom= gm.GridModel(prep,xList,yList,zList)
gridGeom.generatePoints()

loadedSurf=gridGeom.genSurfOneXYZRegion(xyzRange=((0,0,1),(1,1,1)),setName='loadedSurf')

beams=gridGeom.genLinOneXYZRegion(((0,0,1),(1,1,1)),'beams')

concrete=EHE_materials.HA30
concrProp=tm.MaterialData(name='concrProp',E=concrete.Ecm(),nu=concrete.nuc,rho=concrete.density())

from materials.sections import section_properties as sectpr
geomSect=sectpr.RectangularSection(name='geomSect',b=0.2,h=0.2)

linel_mat= tm.BeamMaterialData(name= 'linel_mat', section=geomSect, material=concrProp)
linel_mat.setupElasticShear3DSection(preprocessor=prep)

beams_mesh=fem.LinSetToMesh(linSet=beams,matSect=linel_mat,elemSize=0.5,vDirLAxZ=xc.Vector([0,0,1]),elemType='ElasticBeam3d',coordTransfType='linear')
beams_mesh.generateMesh(prep)


surfUnifLoad= loads.UnifLoadSurfNodesDistributed(name= 'surfUnifLoad',surfSet=loadedSurf,loadVector=xc.Vector([0,0,-qUnif,0,0,0]))

LC1=lcases.LoadCase(preprocessor=prep,name="LC1",loadPType="default",timeSType="constant_ts")
LC1.create()
LC1.addLstLoads([surfUnifLoad])

modelSpace.addLoadCaseToDomain('LC1')
예제 #12
0
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)

# Elastic material-section appropiate for 3D beam analysis, including shear
# deformations.
# Attributes:
#   name:         name identifying the section
#   section:      instance of a class that defines the geometric and
#                 mechanical characteristiscs
#                 of a section (e.g: RectangularSection, CircularSection,
#                 ISection, ...)
#   material:     instance of a class that defines the elastic modulus,
#                 shear modulus and mass density of the material

muretes_mat = tm.BeamMaterialData(name='muretes_mat',
                                  section=geomSectMuretes,
예제 #13
0
feProblem = xc.FEProblem()
preprocessor = feProblem.getPreprocessor
nodes = preprocessor.getNodeHandler

modelSpace = predefined_spaces.StructuralMechanics3D(nodes)
n1 = nodes.newNodeXYZ(0.0, 0.0, 0.0)
n2 = nodes.newNodeXYZ(l, 0.0, 0.0)

strand = EHE_materials.Y1860S7Strand_15_3
strandInitialStress = 1395e6 - 41.4e6
prestressingSteel = strand.defDiagK(preprocessor, strandInitialStress)

elements = preprocessor.getElementHandler
# Concrete
lin = modelSpace.newLinearCrdTransf("lin", xzVector=xc.Vector([0, 1, 0]))
sectionProperties = section_properties.RectangularSection(
    name="rectang", b=.10, h=.10)  # Section geometry.
concreteSection = concrete.defElasticShearSection3d(preprocessor,
                                                    sectionProperties)
elements.defaultMaterial = concreteSection.name
elements.defaultTransformation = lin.name
concreteBeam = elements.newElement("ElasticBeam3d", xc.ID([n1.tag, n2.tag]))

# Prestressing steel.
elements.dimElem = 3  # Bars defined in a two dimensional space.
elements.defaultMaterial = prestressingSteel.name
strandTruss = elements.newElement("Truss", xc.ID([n1.tag, n2.tag]))
strandTruss.sectionArea = strand.area

# Constraints
modelSpace.fixNode('000_0FF', n1.tag)
modelSpace.fixNode('F00_FFF', n2.tag)
예제 #14
0
#Lines generation
muretes=gridGeom.genLinMultiRegion(lstIJKRange=muretes_rg,setName='muretes')
muretes.description='Muretes'


#                         *** 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=emuret,h=hmuret)

# Elastic material-section appropiate for 3D beam analysis, including shear
  # deformations.
  # Attributes:
  #   name:         name identifying the section
  #   section:      instance of a class that defines the geometric and
  #                 mechanical characteristiscs
  #                 of a section (e.g: RectangularSection, CircularSection,
  #                 ISection, ...)
  #   material:     instance of a class that defines the elastic modulus,
  #                 shear modulus and mass density of the material

muretes_mat= tm.BeamMaterialData(name= 'muretes_mat', section=geomSectMuretes, material=concrDeck)
muretes_mat.setupElasticShear3DSection(preprocessor=prep)
예제 #15
0
# 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

geomBeam = rectSect.RectangularSection(name='geomBeam', b=wbeam, h=hbeam)

# Elastic material-section appropiate for 3D beam analysis, including shear deformations.
# Attributes:
#   name:         name identifying the section
#   section:      instance of a class that defines the geometric and mechanical characteristiscs
#                 of a section (e.g: RectangularSection, CircularSection, ISection, ...)
#   material:     instance of a class that defines the elastic modulus, shear modulus
#                 and mass density of the material

matBeam = gm.BeamMaterialData(name='matBeam',
                              section=geomBeam,
                              material=concrete)

#  Dictionary of materials
matElMembPlat = model.setMaterials([matBeam])
예제 #16
0
#
#    ^ 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
seedElemHandler.defaultTransformation = lin.getName(
)  # Orientation of the element axis.
seedElemHandler.defaultMaterial = beamSection.name  # Material name.
예제 #17
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)
pileBC.generateSpringsPile(alphaKh_x=1,alphaKh_y=1,alphaKv_z=1)
springs=pileBC.springs
springSet=preprocessor.getSets.defSet('springSet')
for e in springs:
예제 #18
0
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
geomSectColumns = sectpr.RectangularSection(name='geomSectColumns',
                                            b=0.25,
                                            h=0.25)
columns_mat = tm.BeamMaterialData(name='columns_mat',
                                  section=geomSectColumns,
                                  material=mat_cols)
columns_mat.setupElasticShear3DSection(preprocessor=prep)

#                         ***FE model - MESH***
eSize = 0.5
floor1_mesh = fem.SurfSetToMesh(surfSet=floor1,
                                matSect=deck_mat,
                                elemSize=eSize,
                                elemType='ShellMITC4')
floor2_mesh = fem.SurfSetToMesh(surfSet=floor2,
                                matSect=deck_mat,
                                elemSize=eSize,
예제 #19
0
from materials.sections import section_properties
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.
예제 #20
0
#Hide logging messages from modules.
rootLogger = logging.getLogger()
lhStdout = rootLogger.handlers[0]  # stdout is the only handler initially
fileHandler = logging.FileHandler("{0}/{1}.log".format('/tmp/', 'test'))
rootLogger.addHandler(fileHandler)
rootLogger.removeHandler(lhStdout)

# Geometry
L = 1.0  # Bar length (m)

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

# Materials
crossSection = section_properties.RectangularSection("test", b=.3, h=.4)
concr = EHE_materials.HA25
concr.alfacc = 0.85  #f_maxd= 0.85*fcd concrete long term compressive strength factor (normally alfacc=1)
concr.initTensStiff = 'Y'  #initialize concrete with tension-stiffening branch
#(diagram of type concrete02)

section = concr.defElasticShearSection3d(preprocessor, crossSection)

# Problem type
modelSpace = predefined_spaces.StructuralMechanics3D(nodes)

#Mesh.
n1 = nodes.newNodeXYZ(0, 0.0, 0.0)
n2 = nodes.newNodeXYZ(L / 2.0, 0.0, 0.0)
n3 = nodes.newNodeXYZ(L, 0.0, 0.0)
예제 #21
0
__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
#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
예제 #22
0
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)
slabs_mat= gm.DeckMaterialData(name= 'slabs', thickness= thickSlabs, material=concrForAll)


  # Elastic section appropiate for 3D beam analysis, including shear deformations. 
#Rectangular sections:
  # Attributes:
  #   name:         name identifying the section
  #   b:            cross-section width (parallel to local z axis)
  #   h:            cross-section height (parallel to local y axis)
  #   E:            Young’s modulus of the material
  #   nu:           Poisson’s ratio
from materials.sections import section_properties as sp
sqrColumns_sect=sp.RectangularSection(name='sqrColumns_sect',b=lenghtSquareColumns,h=lenghtSquareColumns)  #section definition
sqrColumns_mat=gm.BeamMaterialData(name='sqrColumns',section=sqrColumns_sect,material=concrForAll) #material definition (rho: mass density)

#Circular sections:
  # Attributes:
  #  name:      name identifying the section
  #  r:         radius
  #  E:         Young’s modulus of the material
  #  nu:        Poisson’s ratio
# from materials.sections import section_properties
# sect_beamR0_5=section_properties.CircularSection(name='sect_beamR0_5',r=0.5)  #section definition
# beamR0_5=gm.BeamMaterialData(name='beamR0_5',section=sect_beamR0_5,material=concrDeckBeam) #material definition (rho: mass density)

#I sections:
  #  name:         name identifying the section
  #  wdTopFlange:  width of the top flange (parallel to local z-axis)
예제 #23
0
from materials.sections import section_properties

__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]"

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

# Rectangular cross-section definition
b = 10  # Cross section width  [cm]
h = 20  # Cross section depth [cm]
scc10x20 = section_properties.RectangularSection('scc10x20', b, h)
scc10x20.nDivIJ = 32  # number of cells in IJ direction
scc10x20.nDivJK = 32  # number of cells in JK direction

import os
pth = os.path.dirname(__file__)
if (not pth):
    pth = "."
#print "pth= ", pth
execfile(pth + "/fiber_section_test_macros.py")

fy = 2600  # Yield stress of the material expressed in kp/cm2.
E = 2.1e6  # Young modulus of the material en kp/cm2.

# Materials definition:
epp = typical_materials.defElasticPPMaterial(preprocessor, "epp", E, fy, -fy)
예제 #24
0
                                         wdTopFlange=BCwidthSupFlange,
                                         thTopFlange=BCthickSupFlange,
                                         thWeb=BCthickWeb,
                                         hgWeb=BCheightWeb,
                                         wdBotFlange=BCwidthInfFlange,
                                         thBotFlange=BCthickInfFlange)
geomTopCol = section_properties.ISection(name='geomTopCol',
                                         wdTopFlange=TCwidthSupFlange,
                                         thTopFlange=TCthickSupFlange,
                                         thWeb=TCthickWeb,
                                         hgWeb=TCheightWeb,
                                         wdBotFlange=TCwidthInfFlange,
                                         thBotFlange=TCthickInfFlange)
#rectangular sections
from materials.sections import section_properties as rectSect
geomCurvCol = rectSect.RectangularSection(name='geomCurvCol', b=0.2, h=0.5)
#Fictitious geometric section to represent rigid motion
geomFictBeam = rectSect.RectangularSection(name='geomFictBeam', b=5, h=5)

# Elastic material-section appropiate for 3D beam analysis, including shear deformations.
# Attributes:
#   name:         name identifying the section
#   section:      instance of a class that defines the geometric and mechanical characteristiscs
#                 of a section (e.g: RectangularSection, CircularSection, ISection, ...)
#   material:     instance of a class that defines the elastic modulus, shear modulus
#                 and mass density of the material

matBotCol = gm.BeamMaterialData(name='matBotCol',
                                section=geomBotCol,
                                material=concrete)
matTopCol = gm.BeamMaterialData(name='matTopCol',
예제 #25
0
import geom
import xc
from solution import predefined_solutions
from model import predefined_spaces
from materials import typical_materials

__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]"

# Rectangular cross-section definition
b= 1 # Cross section width [cm]
h= 1 # Cross section depth [cm]
scc1x1= section_properties.RectangularSection('scc1x1',b,h)
scc1x1.nDivIJ= 32 # number of cells in IJ direction  
scc1x1.nDivJK= 32 # number of cells in JK direction

import os
pth= os.path.dirname(__file__)
if(not pth):
  pth= "."
#print "pth= ", pth
execfile(pth+"/macros_test_fiber_section.py")

fy= 2600 # yield strength [kp/cm2].
E= 1e6   # elastic moculus [kp/cm2].

feProblem= xc.FEProblem()
feProblem.logFileName= "/tmp/borrar.log" # Ignore warning messages
예제 #26
0
diafRP_mat.setupElasticSection(preprocessor=prep)

murExtAlig_mat=tm.DeckMaterialData(name='murExtAlig_mat',thickness=espExtAlig,material=concrProp)
murExtAlig_mat.setupElasticSection(preprocessor=prep)   #creates the section-material

voladzCent_mat=tm.DeckMaterialData(name='voladzCent_mat',thickness= espVoladzMax,material=concrProp)
voladzCent_mat.setupElasticSection(preprocessor=prep)   #creates the section-material

voladzExtr_mat=tm.DeckMaterialData(name='voladzExtr_mat',thickness= espVoladzMin,material=concrProp)
voladzExtr_mat.setupElasticSection(preprocessor=prep)   #creates the section-material


#Geometric sections
#rectangular sections
from materials.sections import section_properties as sectpr
geomSectRiostrEstr=sectpr.RectangularSection(name='geomSectRiostrEstr',b=LriosrEstr,h=cantoRiostrEstr)
# Elastic material-section appropiate for 3D beam analysis, including shear
  # deformations.
  # Attributes:
  #   name:         name identifying the section
  #   section:      instance of a class that defines the geometric and
  #                 mechanical characteristiscs
  #                 of a section (e.g: RectangularSection, CircularSection,
  #                 ISection, ...)
  #   material:     instance of a class that defines the elastic modulus,
  #                 shear modulus and mass density of the material
riostrEstr_mat= tm.BeamMaterialData(name= 'riostrEstr_mat', section=geomSectRiostrEstr, material=concrProp)
riostrEstr_mat.setupElasticShear3DSection(preprocessor=prep)


#                         ***FE model - MESH***
예제 #27
0
        beamLines.append(l)
#Points and lines tendon
tendonSet = sets.defSet('tendonSet')
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]),
예제 #28
0
concrDiagram = concrete.defDiagK(preprocessor)
#We add some properties to concrete in order to define the beam material data
concrete.E = concrete.Ecm()
concrete.nu = 0.2  #Poisson's coefficient of concrete
concrete.rho = 2500  #specific mass of concrete (kg/m3)
concrete.G = concrete.Gcm()

#Reinforcing steel.
rfSteel = EC2_materials.S450C  #reinforcing steel according to EC2 fyk=450 MPa
steelDiagram = rfSteel.defDiagK(
    preprocessor)  #Definition of steel stress-strain diagram in XC.

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

# Elastic material-section appropiate for 3D beam analysis, including shear
beam_mat = typical_materials.defElasticShearSection3d(
    preprocessor=preprocessor,
    name='beam_mat',
    A=geomSectBeam.A(),
    E=concrete.Ecm(),
    G=concrete.Gcm(),
    Iz=geomSectBeam.Iz(),
    Iy=geomSectBeam.Iy(),
    J=geomSectBeam.J(),
    alpha=geomSectBeam.alphaY())

lin = modelSpace.newLinearCrdTransf("lin", xc.Vector([0, 0, 1]))
예제 #29
0
#Hide logging messages from modules.
rootLogger = logging.getLogger()
lhStdout = rootLogger.handlers[0]  # stdout is the only handler initially
fileHandler = logging.FileHandler("{0}/{1}.log".format('/tmp/', 'test'))
rootLogger.addHandler(fileHandler)
rootLogger.removeHandler(lhStdout)

# Geometry
L = 1.0  # Bar length (m)

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

# Materials
sectionGeometry = section_properties.RectangularSection("test", b=.3, h=.4)
concr = EHE_materials.HA25
concr.alfacc = 0.85  #f_maxd= 0.85*fcd concrete long term compressive strength factor (normally alfacc=1)
section = concr.defElasticShearSection3d(preprocessor, sectionGeometry)

# Problem type
modelSpace = predefined_spaces.StructuralMechanics3D(nodes)

#Mesh.
n1 = nodes.newNodeXYZ(0, 0.0, 0.0)
n2 = nodes.newNodeXYZ(L / 2.0, 0.0, 0.0)
n3 = nodes.newNodeXYZ(L, 0.0, 0.0)

lin = modelSpace.newLinearCrdTransf("lin", xc.Vector([0, 1, 0]))

elements = preprocessor.getElementHandler
예제 #30
0
phi = mat.getResistanceFactor('Fb')
L = 18 * 0.3048
b = 6.75 * 0.0254
h = 13.5 * 0.0254
CV = mat.getVolumeFactor(L, b, h)
ratio = (CD - 1.0)**2
ratio += (Ct - 1.0)**2
ratio += (CM - 1.0)**2
ratio += (KF - 2.54)**2
ratio += (phi - 0.85)**2
ratio += (CV - 0.98)**2

# Bending
Fb = 2400.0 * 6.89476e3  # Tabulated bending stress N/m2
Fv = 265 * 6.89476e3  # Tabulated shear stress
section = sp.RectangularSection('s', b, h)
Ss = section.getElasticSectionModulusZ()
SRef = 205 * (0.0254)**3
ratio += abs(Ss - SRef) / SRef

Fb_adj = Fb * CD * CM * Ct * CV
Fb_adjRef = 2343 * 6.89476e3
ratio += (Fb_adj - Fb_adjRef) / Fb_adjRef
Mu = Fb_adj * Ss
MuRef = 40032 * 1.355818  # N.m
ratio += abs(Mu - MuRef) / MuRef

# Shear
As = section.A()
Fv_adjRef = 265 * 6.89476e3
Fv_adj = Fv * CD * CM * Ct