Example #1
0
def staggeredPatternType2(lIndX, lIndY, indZ):
    '''return a list of grid ranges that delimit a set of staggered 
    patterned surfaces, i.e. in a floor of a buildin from the following parameters:

    :parameter lIndX: list of X-index that point to the X-coordinates of the strips edges.
    :parameter lIndY: list of Y-index that point to the Y-coordinates of the strips edges.
    :parameter indZ: Z-index that points to the Z-coordinate of all the surfaces

    The first vertex considered is (lIndX[0],lIndY[1],indZ)
    '''
    indSupPatt = []
    for i in range(0, len(lIndX) - 1, 2):
        for j in range(1, len(lIndY) - 1, 2):
            inds = gm.IJKRange([lIndX[i], lIndY[j], indZ],
                               [lIndX[i + 1], lIndY[j + 1], indZ])
            indSupPatt.append(inds)
    for i in range(1, len(lIndX) - 1, 2):
        for j in range(0, len(lIndY) - 1, 2):
            inds = gm.IJKRange([lIndX[i], lIndY[j], indZ],
                               [lIndX[i + 1], lIndY[j + 1], indZ])
            indSupPatt.append(inds)
    return indSupPatt
Example #2
0
def def_rg_cooLim(XYZLists,Xcoo,Ycoo,Zcoo):
    '''Return an XYZ range given the three lists of coordinates of the grid
    and the limit coordinates.

    :param XYZList: (xList,yList,zList)
    :param Xcoo: (xmin,xmax)
    :param Ycoo: (ymin,ymax)
    :param Zcoo: (zmin,zmax)
    '''
    xLst=XYZLists[0]
    yLst=XYZLists[1]
    zLst=XYZLists[2]
    rg=gm.IJKRange((xLst.index(Xcoo[0]),yLst.index(Ycoo[0]),zLst.index(Zcoo[0])),(xLst.index(Xcoo[1]),yLst.index(Ycoo[1]),zLst.index(Zcoo[1])))
    return rg
Example #3
0
#       z_scaled=zOrig+scale*(z_inic-zOrig)
#syntax: scaleCoorZPointsRange(ijkRange,zOrig,scale)
#     ijkRange: range for the search.
#     zOrig: origin Z to apply scale (point in axis Z=zOrig)
#            are not affected by the transformation
#     scale: scale to apply to Z coordinate

#Ranges for lines and surfaces
# extractIncludedIJranges(step): subranges index K=constant (default step=1)
# extractIncludedIKranges((step): subranges index J=constant (default step=1)
# extractIncludedJKranges((step): subranges index I=constant (default step=1)
# extractIncludedIranges(stepJ,stepK): subranges indexes J,K=constant (default
#                                      stpes= 1)
# idem for J and K ranges
beamXconcr_rg = gm.IJKRange(
    (0, 1, lastZpos),
    (lastXpos, lastYpos, lastZpos)).extractIncludedIranges(stepJ=2, stepK=1)
beamY_rg = gm.IJKRange(
    (0, 1, lastZpos),
    (lastXpos, lastYpos, lastZpos)).extractIncludedJranges(stepI=2, stepK=1)
columnZconcr_rg = gm.IJKRange(
    (0, 1, 0), (lastXpos, 1, lastZpos)).extractIncludedKranges(stepI=2)
columnZsteel_rg = gm.IJKRange(
    (0, lastYpos, 0), (lastXpos, lastYpos, lastZpos)).extractIncludedJKranges(
        step=2) + [gm.IJKRange((1, lastYpos, 0), (1, lastYpos, 1))]
decklv1_rg = gm.IJKRange(
    (0, 1, 1), (lastXpos, lastYpos, lastZpos)).extractIncludedIJranges(step=2)
foot_rg = [
    gut.def_rg_cooLim(XYZLists=(xList, yList, zList),
                      Xcoo=(0, LbeamX),
                      Ycoo=(-Wfoot / 2., Wfoot / 2.),
Example #4
0
#Only Z coordinate of points is modified in the following way:
#       z_scaled=zOrig+scale*(z_inic-zOrig)
#syntax: scaleCoorZPointsRange(ijkRange,zOrig,scale)
#     ijkRange: range for the search.
#     zOrig: origin Z to apply scale (point in axis Z=zOrig)
#            are not affected by the transformation 
#     scale: scale to apply to Z coordinate

#Ranges for lines and surfaces
# extractIncludedIJranges(step): subranges index K=constant (default step=1)
# extractIncludedIKranges((step): subranges index J=constant (default step=1)
# extractIncludedJKranges((step): subranges index I=constant (default step=1)
# extractIncludedIranges(stepJ,stepK): subranges indexes J,K=constant (default
#                                      stpes= 1)
# idem for J and K ranges
beamX_rg=gm.IJKRange((0,1,lastZpos),(lastXpos,lastYpos,lastZpos)).extractIncludedIranges(stepJ=1,stepK=1)
beamY_rg=gm.IJKRange((0,1,lastZpos),(lastXpos,lastYpos,lastZpos)).extractIncludedJranges(stepI=2,stepK=1)
columnZ_rg=gm.IJKRange((0,1,0),(lastXpos,lastYpos,lastZpos)).extractIncludedKranges(stepI=2,stepJ=2)+[gm.IJKRange((1,lastYpos,0),(1,lastYpos,1))]
decklv1_rg=gm.IJKRange((0,1,1),(lastXpos,lastYpos,lastZpos)).extractIncludedIJranges(step=2)
decklv2_rg=gm.IJKRange((0,lastYpos-1,lastZpos),(1,lastYpos,lastZpos))
wall_rg=gm.IJKRange((0,1,0),(lastXpos,1,1))
#foot_rg=[gm.IJKRange((0,0,0),(lastXpos,2,0))]
foot_rg=[gut.def_rg_cooLim(XYZLists=(xList,yList,zList),Xcoo=(0,LbeamX),Ycoo=(-Wfoot/2.,Wfoot/2.),Zcoo=(0,0))]
#Lines generation
beamX=gridGeom.genLinMultiRegion(lstIJKRange=beamX_rg,nameSet='beamX')
beamY=gridGeom.genLinMultiRegion(lstIJKRange=beamY_rg,nameSet='beamY')
columnZ=gridGeom.genLinMultiRegion(lstIJKRange=columnZ_rg,nameSet='columnZ')
#Surfaces generation
decklv1=gridGeom.genSurfMultiRegion(lstIJKRange=decklv1_rg,nameSet='decklv1')
decklv2=gridGeom.genSurfOneRegion(ijkRange=decklv2_rg,nameSet='decklv2')
wall=gridGeom.genSurfOneRegion(ijkRange=wall_rg,nameSet='wall')
Example #5
0
# *** GEOMETRY ***

# coordinates in global X,Y,Z axes for the generation of grid
xList = [i for i in range(11)]
yList = [i for i in range(21)]
zList = [i for i in range(6)]

#Points' generation
gridGeom = gm.GridModel(prep, xList, yList, zList)
gridGeom.generatePoints()

# Parameters

# Ranges to be used lately
floor1_rg = gm.IJKRange((2, 5, 2), (8, 15, 2))

# Surfaces' generation
floor1 = gridGeom.genSurfOneRegion(ijkRange=floor1_rg, setName='floor1')
# for s in floor1.getSurfaces:
#     print(s.name, s.tag, s, s.getKPoints())

floor1.fillDownwards()
sz = floor1.getLines.size

# print('Lines in set floor1: ', sz)
# for l in floor1.getLines:
#     print(l.name, l.tag, l.getKPoints(), l)

import os
from misc_utils import log_messages as lmsg
Example #6
0
yList = [i * incr for i in range(ndiv + 1)]  #angular coordinate
zList = [zBaseCyl, zBaseCyl + height]  #level coordinate
#auxiliary data
lastXpos = len(xList) - 1
lastYpos = len(yList) - 1
lastZpos = len(zList) - 1

# grid model definition
gridGeom = gm.GridModel(prep, xList, yList, zList)

# Grid geometric entities definition (points, lines, surfaces)
# Points' generation
gridGeom.generateCylZPoints(xCent=0, yCent=0)

# ranges
tankwall_rg = [gm.IJKRange((0, 0, 0), (lastXpos, lastYpos, lastZpos))]

#Surfaces generation
tankwall = gridGeom.genSurfMultiRegion(lstIJKRange=tankwall_rg,
                                       setName='tankwall')
'''
tankwall.description='Cylindrical wall'
tankwall.color=cfg.colors['purple02']
'''

#                         *** MATERIALS ***
steelProp = tm.MaterialData(name='steelProp',
                            E=steel.E,
                            nu=steel.nu,
                            rho=steel.rho)
# Isotropic elastic section-material appropiate for plate and shell analysis
Example #7
0
# coordinates in global X,Y,Z axes for the generation of grid
xList = [i for i in range(11)]
yList = [i for i in range(21)]
zList = [i for i in range(6)]

#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)
Example #8
0
# grid model definition
gridGeom= gm.GridModel(prep,xList,yList,zList)

# Grid geometric entities definition (points, lines, surfaces)
# Points' generation
gridGeom.generatePoints()


#Ranges for lines and surfaces
# extractIncludedIJranges(step): subranges index K=constant (default step=1)
# extractIncludedIKranges((step): subranges index J=constant (default step=1)
# extractIncludedJKranges((step): subranges index I=constant (default step=1)
# extractIncludedIranges(stepJ,stepK): subranges indexes J,K=constant (default
#                                      stpes= 1)
# idem for J and K ranges
beamY_rg=gm.IJKRange((0,0,0),(0,lastYpos,0))
#Lines generation
beamY=gridGeom.genLinOneRegion(ijkRange=beamY_rg,setName='beamY')

#                         *** MATERIALS *** 
S235JR= EC3_materials.S235JR
S235JR.gammaM= 1.00


# Steel material-section appropiate for 3D beam analysis, including shear
  # deformations.
  # Attributes:
  #   steel:         steel material (
  #   name: name of the standard steel profile. Types: IPEShape, HEShape,
  #         UPNShape, AUShape, CHSShape
  #      (defined in materials.sections.structural_shapes.arcelor_metric_shapes)
Example #9
0
    0, 0.2 * totalHeightCrochy, 0.8 * totalHeightCrochy, totalHeightCrochy
]
#auxiliary data
lastXpos = len(xList) - 1
lastYpos = len(yList) - 1
lastZpos = len(zList) - 1

# grid model definition
gridGeom = gm.GridModel(prep, xList, yList, zList)

# Grid geometric entities definition (points, lines, surfaces)
# Points' generation
gridGeom.generatePoints()
#Displacements of the grid points in a range
for i in range(1, len(xList)):
    r = gm.IJKRange((i, 0, lastZpos), (i, lastYpos, lastZpos))
    gridGeom.movePointsRange(r, xc.Vector([0.0, 0.0, -trSlope * xList[i]]))

for j in range(1, len(yList)):
    r = gm.IJKRange((0, j, 0), (lastXpos, j, 0))
    gridGeom.movePointsRange(r, xc.Vector([0.0, 0.0, lnSlope * yList[j]]))

#Ranges for lines and surfaces
foundExtSlab_rg = [
    gm.IJKRange([0, 0, 0], [1, lastYpos, 0]),
    gm.IJKRange([2, 0, 0], [lastXpos, lastYpos, 0])
]
foundIntSlab_rg = [gm.IJKRange([1, 0, 0], [2, lastYpos, 0])]
leftWall_rg = [gm.IJKRange([0, 0, 0], [0, lastYpos, lastZpos])]
rightWall_rg = [gm.IJKRange([lastXpos, 0, 0], [lastXpos, lastYpos, lastZpos])]
deckExtSlab_rg = [
Example #10
0
    gridGeom.movePointsRange(r,xc.Vector([0.0,0.0,lnSlope*yList[j]]))

#Slope (in X direction, Y direction or both) the grid points in a range
#syntax: slopePointsRange(ijkRange,slopeX,xZeroSlope,slopeY,yZeroSlope)
#     ijkRange: range for the search.
#     slopeX: slope in X direction, expressed as deltaZ/deltaX 
#                       (defaults to 0 = no slope applied)
#     xZeroSlope: coordinate X of the "rotation axis".
#     slopeY: slope in Y direction, expressed as deltaZ/deltaY)
#                       (defaults to 0 = no slope applied)
#     yZeroSlope: coordinate Y of the "rotation axis".

'''

#Ranges for lines and surfaces
losCimExt_rg= [ gm.IJKRange((0,0,0),(lastXpos,pyhast1+1,0)), gm.IJKRange((0,pyhast2-1,0),(lastXpos,lastYpos,0)) ]
losCimCent_rg= [ gm.IJKRange((0,pyhast1+1,0),(lastXpos,pyhast2-1,0))]
hastIzqInf_rg= [ gm.IJKRange((0,pyhast1,0),(lastXpos,pyhast1,1))]
hastIzqCent_rg= [ gm.IJKRange((0,pyhast1,1),(lastXpos,pyhast1,2))]
hastIzqSup_rg= [ gm.IJKRange((0,pyhast1,2),(lastXpos,pyhast1,lastZpos))]

hastDerInf_rg= [ gm.IJKRange((0,pyhast2,0),(lastXpos,pyhast2,1))]
hastDerCent_rg= [ gm.IJKRange((0,pyhast2,1),(lastXpos,pyhast2,2))]
hastDerSup_rg= [ gm.IJKRange((0,pyhast2,2),(lastXpos,pyhast2,lastZpos))]

dintExt_rg= [ gm.IJKRange((0,pyhast1,lastZpos),(lastXpos,pyhast1+1,lastZpos)), gm.IJKRange((0,pyhast2-1,lastZpos),(lastXpos,pyhast2,lastZpos)) ]
dintCent_rg= [ gm.IJKRange((0,pyhast1+1,lastZpos),(lastXpos,pyhast2-1,lastZpos))]
murete_i_rg=[gm.IJKRange((0,pyhast1,lastZpos),(0,pyhast2,lastZpos))]
murete_d_rg=[gm.IJKRange((lastXpos,pyhast1,lastZpos),(lastXpos,pyhast2,lastZpos))]

#Surfaces generation
Example #11
0
# for i in range(1,len(xList)):
#     r= gm.IJKRange((i,0,lastZpos),(i,lastYpos,lastZpos))
#     gridGeom.movePointsRange(r,xc.Vector([0.0,0.0,-trSlope*xList[i]]))

#Scale in X with origin xOrig (fixed axis: X=xOrig) to the points in a range
#Only X coordinate of points is modified in the following way:
#       x_scaled=xOrig+scale*(x_inic-xOrig)
#syntax: scaleCoorXPointsRange(ijkRange,xOrig,scale)
#     ijkRange: range for the search.
#     xOrig: origin X to apply scale (point in axis X=xOrig)
#            are not affected by the transformation
#     scale: scale to apply to X coordinate
scaleX = (xArranqVoladz - xAlmasAlig[1] - ladoCartab) / (xArranqVoladz -
                                                         xAlmasAlig[1])
gridTabl.scaleCoorXPointsRange(ijkRange=gm.IJKRange(
    (xListTabl.index(-xArranqVoladz), 0, zListTabl.index(zLosInf)),
    (xListTabl.index(-xAlmasAlig[1]), len(yListTabl) - 1,
     zListTabl.index(zLosInf))),
                               xOrig=-xAlmasAlig[1],
                               scale=scaleX)
gridTabl.scaleCoorXPointsRange(ijkRange=gm.IJKRange(
    (xListTabl.index(xAlmasAlig[1]), 0, zListTabl.index(zLosInf)),
    (xListTabl.index(xArranqVoladz), len(yListTabl) - 1,
     zListTabl.index(zLosInf))),
                               xOrig=xAlmasAlig[1],
                               scale=scaleX)

scaleX = (xArranqVoladz - xAlmasAlig[1] -
          2 * ladoCartab / 3.) / (xArranqVoladz - xAlmasAlig[1])
gridTabl.scaleCoorXPointsRange(ijkRange=gm.IJKRange(
    (xListTabl.index(-xArranqVoladz), 0, zListTabl.index(zinterm1)),
    (xListTabl.index(-xAlmasAlig[1]), len(yListTabl) - 1,
Example #12
0
# coordinates in global X,Y,Z axes for the grid generation
xList = [0]
yList = [0, 1, 3, 6, 7]
zList = [0]
lastYpos = len(yList) - 1

eSize = 0.2  #length of elements

# grid model definition
gridGeom = gm.GridModel(prep, xList, yList, zList)

# Grid geometric entities definition (points, lines, surfaces)
# Points' generation
gridGeom.generatePoints()

gridGeom.movePointsRange(gm.IJKRange((0, 1, 0), (0, 1, 0)),
                         xc.Vector([0.0, 0, 1.0]))
gridGeom.movePointsRange(gm.IJKRange((0, 2, 0), (0, 3, 0)),
                         xc.Vector([0.0, 0, 1.5]))

beamY_rg = gm.IJKRange((0, 0, 0), (0, lastYpos, 0))
beamY = gridGeom.genLinOneRegion(ijkRange=beamY_rg, setName='beamY')
#                         *** MATERIALS ***
S235JR = EC3_materials.S235JR
S235JR.gammaM = 1.00

# Steel material-section appropiate for 3D beam analysis, including shear
# deformations.
# Attributes:
#   steel:         steel material (
#   name: name of the standard steel profile. Types: IPEShape, HEShape,
Example #13
0
# grid model definition
gridGeom = gm.GridModel(prep, xList, yList, zList)

#Displacements of the grid points in a range
# for i in range(1,len(xList)):
#   r= ijkGrid.IJKRange([i,0,lastZpos],[i,lastYpos,lastZpos])
#   mr= ijkGrid.moveRange(r,[0.0,0.0,trSlope*xList[i]])
#   rejXYZ.rangesToMove.append(mr)

# Grid geometric entities definition (points, lines, surfaces)
# Points' generation
gridGeom.generatePoints()

#Displacements of the grid points in a range
for i in range(1, len(xList)):
    r = gm.IJKRange((i, 0, lastZpos), (i, lastYpos, lastZpos))
    gridGeom.movePointsRange(r, xc.Vector([0.0, 0.0, trSlope * xList[i]]))

#Ranges for lines and surfaces
foundExtSlab_rg = [
    gm.IJKRange([0, 0, 0], [1, lastYpos, 0]),
    gm.IJKRange([2, 0, 0], [lastXpos, lastYpos, 0])
]
foundIntSlab_rg = [gm.IJKRange([1, 0, 0], [2, lastYpos, 0])]
leftWall_rg = [gm.IJKRange([0, 0, 0], [0, lastYpos, lastZpos])]
rightWall_rg = [gm.IJKRange([lastXpos, 0, 0], [lastXpos, lastYpos, lastZpos])]
deckExtSlab_rg = [
    gm.IJKRange([0, 0, lastZpos], [1, lastYpos, lastZpos]),
    gm.IJKRange([2, 0, lastZpos], [lastXpos, lastYpos, lastZpos])
]
deckIntSlab_rg = [gm.IJKRange([1, 0, lastZpos], [2, lastYpos, lastZpos])]
Example #14
0
gridGeom= gm.GridModel(prep,xList,yList,zList)

# Grid geometric entities definition (points, lines, surfaces)
# Points' generation
gridGeom.generatePoints()

#Slope (in X direction, Y direction or both) the grid points in a range
#syntax: slopePointsRange(ijkRange,slopeX,xZeroSlope,slopeY,yZeroSlope)
#     ijkRange: range for the search.
#     slopeX: slope in X direction, expressed as deltaZ/deltaX 
#                       (defaults to 0 = no slope applied)
#     xZeroSlope: coordinate X of the "rotation axis".
#     slopeY: slope in Y direction, expressed as deltaZ/deltaY)
#                       (defaults to 0 = no slope applied)
#     yZeroSlope: coordinate Y of the "rotation axis".
r=gm.IJKRange((0,0,lastZpos),(lastXpos,0,lastZpos))
gridGeom.slopePointsRange(ijkRange=r,slopeX=deltaH/Lx,xZeroSlope=0)
r=gm.IJKRange((0,lastYpos,lastZpos),(lastXpos,lastYpos,lastZpos))
gridGeom.slopePointsRange(ijkRange=r,slopeX=-deltaH/Lx,xZeroSlope=Lx)

# ranges
roof_rg=[gm.IJKRange((0,0,lastZpos),(lastXpos,lastYpos,lastZpos))]

#Surfaces generation
roof=gridGeom.genSurfMultiRegion(lstIJKRange=roof_rg,setName='roof')

roof.description='Roof'
roof.color=cfg.colors['purple01']

#                         *** MATERIALS *** 
concrProp=tm.MaterialData(name='concrProp',E=concrete.Ecm(),nu=concrete.nuc,rho=concrete.density())
Example #15
0
# Grid geometric entities definition (points, lines, surfaces)
# Points' generation
gridGeom.generatePoints()

#Slope (in X direction, Y direction or both) the grid points in a range
#syntax: slopePointsRange(ijkRange,slopeX,xZeroSlope,slopeY,yZeroSlope)
#     ijkRange: range for the search.
#     slopeX: slope in X direction, expressed as deltaZ/deltaX
#                       (defaults to 0 = no slope applied)
#     xZeroSlope: coordinate X of the "rotation axis".
#     slopeY: slope in Y direction, expressed as deltaZ/deltaY)
#                       (defaults to 0 = no slope applied)
#     yZeroSlope: coordinate Y of the "rotation axis".

r = gm.IJKRange((0, 0, 0), (lastXpos, 4, lastZpos))
deltZ = 1.5 / 2.0 - 0.6 / 2.0
deltY = yList[0] - yList[4]
gridGeom.slopePointsRange(ijkRange=r,
                          slopeY=deltZ / deltY,
                          yZeroSlope=yList[4])

r = gm.IJKRange((0, 15, 0), (lastXpos, lastYpos, lastZpos))
deltZ = 1.5 / 2.0 - 0.6 / 2.0
deltY = yList[lastYpos] - yList[15]
gridGeom.slopePointsRange(ijkRange=r,
                          slopeY=deltZ / deltY,
                          yZeroSlope=yList[15])

#Ranges for lines and surfaces
slab_unif_rg = gm.IJKRange((0, 0, lastZpos), (lastXpos, lastYpos, lastZpos))
Example #16
0
gA_nbPoints=gridA.pointCounter
ratio0=gA_nbPoints-len(xListA)*len(yList)*len(zList)
# print(ratio0)


# grid B is = grid A moved 10 units in X direction
xListB=[i+10 for i in range(6)]
gridB=gm.GridModel(prep,xListB,yList,zList)

gridB.generatePoints()
gB_nbPoints=gridB.pointCounter
ratio1=gB_nbPoints-len(xListB)*len(yList)*len(zList)
# print(ratio1)

# Ranges to be used lately
planesXY_2_3level=gm.IJKRange((0,0,2),(lastXpos,lastYpos,3)).extractIncludedIJranges()
planesYZ_1_4level=gm.IJKRange((0,0,0),(lastXpos,lastYpos,4)).extractIncludedJKranges(step=3)
planesXZ_0_floor=gm.IJKRange((0,0,0),(lastXpos,lastYpos,1)).extractIncludedIKranges(step=1)
planesYZ_3_floor=gm.IJKRange((0,0,3),(lastXpos,lastYpos,4)).extractIncludedJKranges(step=3)
beams_3_4_floor=gm.IJKRange((0,0,3),(lastXpos,lastYpos,4)).extractIncludedIranges(stepJ=2,stepK=1)
beams_2_3_floor=gm.IJKRange((0,0,2),(lastXpos,lastYpos,3)).extractIncludedJranges(stepI=2,stepK=1)
colums_1_4_floor=gm.IJKRange((0,0,0),(lastXpos,lastYpos,lastZpos)).extractIncludedKranges(stepI=2,stepJ=3)

#Surfaces and lines' generation gridA
set01=gridA.genSurfMultiRegion(lstIJKRange=planesXY_2_3level,setName='set01')
set_planesXY_2_3level=gridA.getSetSurfMultiRegion(lstIJKRange=planesXY_2_3level,setName='set_planesXY_2_3level')
nsurf01=(set_planesXY_2_3level.getSurfaces.size+set01.getSurfaces.size)/2
ratio2=nsurf01-(len(xListA)-1)*(len(yList)-1)*2
# print(ratio2)

set02=gridA.genSurfMultiRegion(lstIJKRange=planesYZ_1_4level,setName='set02')
Example #17
0
# *** GEOMETRY ***

# coordinates in global X,Y,Z axes for the generation of grid
xList = [i for i in range(11)]
yList = [i for i in range(21)]
zList = [i for i in range(6)]

#Points' generation
gridGeom = gm.GridModel(prep, xList, yList, zList)
gridGeom.generatePoints()

# Parameters

# Ranges to be used lately
floor1_rg = gm.IJKRange((2, 5, 2), (8, 15, 2))
floor2_rg = [gm.IJKRange((0, 0, 4), (10, 20, 4))]
wall_rg = gm.IJKRange((2, 10, 2), (8, 10, 5))
columns_rg = gm.IJKRange((2, 5, 0),
                         (8, 15, 4)).extractIncludedKranges(stepI=6, stepJ=10)

#Surfaces' generation
floor1 = gridGeom.genSurfOneRegion(ijkRange=floor1_rg, nameSet='floor1')
floor1.description = 'Floor 1'
floor2 = gridGeom.genSurfMultiRegion(lstIJKRange=floor2_rg, nameSet='floor2')
floor2.description = 'Floor 2'
wall = gridGeom.genSurfOneRegion(ijkRange=wall_rg, nameSet='wall')
wall.description = 'Wall'

#Lines' generation
columns = gridGeom.genLinMultiRegion(lstIJKRange=columns_rg, nameSet='columns')
Example #18
0
lastXpos = len(xList) - 1
lastYpos = len(yList) - 1
lastZpos = len(zList) - 1

# grid model definition
gridGeom = gm.GridModel(prep, xList, yList, zList)

# grid model definition
gridGeom = gm.GridModel(prep, xList, yList, zList)

# Points' generation
gridGeom.generatePoints()

#Displacements of the grid points in a range
for i in range(1, len(xList)):
    r = gm.IJKRange((i, 0, 0), (i, lastYpos, lastZpos))
    gridGeom.movePointsRange(
        r, xc.Vector([0.0, xList[i] / math.tan(fleetAngle), 0.0]))

#Ranges for lines and surfaces
foundExtSlab_rg = [
    gm.IJKRange([0, 0, 0], [1, lastYpos, 0]),
    gm.IJKRange([2, 0, 0], [lastXpos, lastYpos, 0])
]
foundIntSlab_rg = [gm.IJKRange([1, 0, 0], [2, lastYpos, 0])]
leftDownWall_rg = [gm.IJKRange([0, 0, 0], [0, lastYpos, 3])]
leftUpWall_rg = [gm.IJKRange([0, 5, 3], [0, lastYpos, lastZpos])]
rightDownWall_rg = [gm.IJKRange([lastXpos, 0, 0], [lastXpos, lastYpos, 3])]
rightUpWall_rg = [
    gm.IJKRange([lastXpos, 5, 3], [lastXpos, lastYpos, lastZpos])
]
Example #19
0
#        vDisp: xc vector displacement
# for i in range(1,len(xList)):
#     r= gm.IJKRange((i,0,lastZpos),(i,lastYpos,lastZpos))
#     gridGeom.movePointsRange(r,xc.Vector([0.0,0.0,-trSlope*xList[i]]))

#Scale in X with origin xOrig (fixed axis: X=xOrig) to the points in a range
#Only X coordinate of points is modified in the following way:
#       x_scaled=xOrig+scale*(x_inic-xOrig)
#syntax: scaleCoorXPointsRange(ijkRange,xOrig,scale)
#     ijkRange: range for the search.
#     xOrig: origin X to apply scale (point in axis X=xOrig)
#            are not affected by the transformation
#     scale: scale to apply to X coordinate
scaleX = (xArranqVoladz - xAlig2 - ladoCartab) / (xArranqVoladz - xAlig2)
gridGeom.scaleCoorXPointsRange(ijkRange=gm.IJKRange(
    (xList.index(-xArranqVoladz), 0, zList.index(zLosInf)),
    (xList.index(-xAlig2), lastYpos, zList.index(zLosInf))),
                               xOrig=-xAlig2,
                               scale=scaleX)
gridGeom.scaleCoorXPointsRange(ijkRange=gm.IJKRange(
    (xList.index(xAlig2), 0, zList.index(zLosInf)),
    (xList.index(xArranqVoladz), lastYpos, zList.index(zLosInf))),
                               xOrig=xAlig2,
                               scale=scaleX)

scaleX = (xArranqVoladz - xAlig2 - 2 * ladoCartab / 3.) / (xArranqVoladz -
                                                           xAlig2)
gridGeom.scaleCoorXPointsRange(ijkRange=gm.IJKRange(
    (xList.index(-xArranqVoladz), 0, zList.index(zinterm1)),
    (xList.index(-xAlig2), lastYpos, zList.index(zinterm1))),
                               xOrig=-xAlig2,
Example #20
0
    gridGeom.movePointsRange(r,xc.Vector([0.0,0.0,lnSlope*yList[j]]))

#Slope (in X direction, Y direction or both) the grid points in a range
#syntax: slopePointsRange(ijkRange,slopeX,xZeroSlope,slopeY,yZeroSlope)
#     ijkRange: range for the search.
#     slopeX: slope in X direction, expressed as deltaZ/deltaX 
#                       (defaults to 0 = no slope applied)
#     xZeroSlope: coordinate X of the "rotation axis".
#     slopeY: slope in Y direction, expressed as deltaZ/deltaY)
#                       (defaults to 0 = no slope applied)
#     yZeroSlope: coordinate Y of the "rotation axis".

'''

#Ranges for lines and surfaces
losCimExt_M1_rg= [ gm.IJKRange((0,0,0),(pxmn_M2-1,pyhast1+1,0)), gm.IJKRange((0,pyhast2-1,0),(pxmn_M2-1,lastYpos,0)) ]
losCimExt_M2_rg= [ gm.IJKRange((pxmn_M2,0,0),(pxmx_M2,pyhast1+1,0)), gm.IJKRange((pxmn_M2,pyhast2-1,0),(pxmx_M2,lastYpos,0)) ]
losCimExt_M3_rg= [ gm.IJKRange((pxmx_M2+1,0,0),(lastXpos,pyhast1+1,0)), gm.IJKRange((pxmx_M2+1,pyhast2-1,0),(lastXpos,lastYpos,0)) ]

losCimCent_M1_rg= [ gm.IJKRange((0,pyhast1+1,0),(pxmn_M2-1,pyhast2-1,0))]
losCimCent_M2_rg= [ gm.IJKRange((pxmn_M2,pyhast1+1,0),(pxmx_M2,pyhast2-1,0))]
losCimCent_M3_rg= [ gm.IJKRange((pxmx_M2+1,pyhast1+1,0),(lastXpos,pyhast2-1,0))]

hastIzq_M1_rg= [ gm.IJKRange((0,pyhast1,0),(pxmn_M2-1,pyhast1,lastZpos))]
hastIzq_M2_rg= [ gm.IJKRange((pxmn_M2,pyhast1,0),(pxmx_M2,pyhast1,lastZpos))]
hastIzq_M3_rg= [ gm.IJKRange((pxmx_M2+1,pyhast1,0),(lastXpos,pyhast1,lastZpos))]

hastDer_M1_rg= [ gm.IJKRange((0,pyhast2,0),(pxmn_M2-1,pyhast2,lastZpos))]
hastDer_M2_rg= [ gm.IJKRange((pxmn_M2,pyhast2,0),(pxmx_M2,pyhast2,lastZpos))]
hastDer_M3_rg= [ gm.IJKRange((pxmx_M2+1,pyhast2,0),(lastXpos,pyhast2,lastZpos))]
Example #21
0
zList_deck = [0, 0.4]
#auxiliary data
lastXpos = len(xList_deck) - 1
lastYpos = len(yList_deck) - 1
lastZpos = len(zList_deck) - 1

# grid model definition
gridDeck = gm.GridModel(prep, xList_deck, yList_deck, zList_deck)

# Grid geometric entities definition (points, lines, surfaces)
# Points' generation
gridDeck.generatePoints()

#Displacements of the grid points in a range
# deltZ_max=L_long_side_Y*math.tan(alpha)
r = gm.IJKRange((0, 0, 0), (1, 0, lastZpos))
gridDeck.movePointsRange(r,
                         xc.Vector([0.0, delta_Y, delta_Y * math.tan(alpha)]))
r = gm.IJKRange((0, lastYpos, 0), (1, lastYpos, lastZpos))
gridDeck.movePointsRange(
    r, xc.Vector([0.0, -delta_Y, (L_long_side_Y - delta_Y) * math.tan(alpha)]))

for i in range(1, lastYpos):
    deltZ = yList_deck[i] * math.tan(alpha)
    r = gm.IJKRange((0, i, 0), (lastXpos, i, lastZpos))
    gridDeck.movePointsRange(r, xc.Vector([0.0, 0, deltZ]))

r = gm.IJKRange((2, lastYpos, 0), (lastXpos, lastYpos, lastZpos))
gridDeck.movePointsRange(
    r, xc.Vector([0.0, 0, yList_deck[lastYpos] * math.tan(alpha)]))
r = gm.IJKRange((lastXpos, 0, 0), (lastXpos, lastYpos, lastZpos))
Example #22
0
                    yCentCoo=yCent,
                    semiYellipList=semiAxisYList)

grid.generateEllipZPoints()
pCent = geom.Pos3d(xCent, yCent, 0)

pnt0 = grid.getPntXYZ((semi_x0, 0, 0))
ratio0 = pnt0.getPos.dist(pCent) - semi_x0
pnt90 = grid.getPntXYZ((semi_x0, 90, 0))
ratio1 = pnt90.getPos.dist(pCent) - semi_y0
pnt180 = grid.getPntXYZ((semi_x0, 180, 0))
ratio2 = pnt180.getPos.dist(pCent) - semi_x0
pnt270 = grid.getPntXYZ((semi_x0, 270, 0))
ratio3 = pnt270.getPos.dist(pCent) - semi_y0

grid.movePointsEllipse(ijkRange=gm.IJKRange((0, 0, 0),
                                            (0, len(angList) - 1, 0)),
                       semiAxX=semi_x1,
                       semiAXY=semi_y1)
pnt0 = grid.getPntXYZ((semi_x0, 0, 0))
ratio4 = pnt0.getPos.dist(pCent) - semi_x1
pnt90 = grid.getPntXYZ((semi_x0, 90, 0))
ratio5 = pnt90.getPos.dist(pCent) - semi_y1
pnt180 = grid.getPntXYZ((semi_x0, 180, 0))
ratio6 = pnt180.getPos.dist(pCent) - semi_x1
pnt270 = grid.getPntXYZ((semi_x0, 270, 0))
ratio7 = pnt270.getPos.dist(pCent) - semi_y1

ratio8 = 0
for ang in angList:
    p = grid.getPntXYZ((semi_x0, ang, 0)).getPos
    ratio8 += (p.x - xCent)**2 / semi_x1**2 + (p.y - yCent)**2 / semi_y1**2 - 1
Example #23
0
lastZpos = len(zList) - 1

# grid model definition
gridGeom = gm.GridModel(prep, xList, yList, zList)

# Grid geometric entities definition (points, lines, surfaces)
# Points' generation
gridGeom.generatePoints()

#Displacements of the grid points in a range to make them belong to
#a vertical axis cylinder
#syntax: movePointsRangeToZcylinder(ijkRange,xCent,yCent,R)
#        ijkRange: range for the search
#        R: cylinder radius
#        xCent,yCent: coordinates of the cylinder axis
r = gm.IJKRange((1, 0, 0), (lastXpos - 1, 0, 2))
gridGeom.movePointsRangeToZcylinder(ijkRange=r,
                                    xCent=4,
                                    yCent=4 * math.cos(math.asin(2 / 4.)),
                                    R=4)

#Displacements of the grid points in a range to make them belong to
#a cylinder with axis parallel to X
#syntax: movePointsRangeToXcylinder(ijkRange,yCent,zCent,R)
#        ijkRange: range for the search
#        R: cylinder radius
#        yCent,zCent: coordinates of the cylinder axis
r = gm.IJKRange((0, 1, lastZpos), (lastXpos, lastYpos - 1, lastZpos))
gridGeom.movePointsRangeToXcylinder(ijkRange=r,
                                    yCent=3,
                                    zCent=zList[lastZpos] - 1,
Example #24
0
zList = [0, baseSlabTh / 2 + GV + deckTh / 2]
#auxiliary data
lastXpos = len(xList) - 1
lastYpos = len(yList) - 1
lastZpos = len(zList) - 1

# grid model definition
gridGeom = gm.GridModel(prep, xList, yList, zList)

# Grid geometric entities definition (points, lines, surfaces)
# Points' generation
gridGeom.generatePoints()

#Ranges for lines and surfaces
losCim_rg = [gm.IJKRange((0, 0, 0), (lastXpos, lastYpos, 0))]
hastiales_rg = [
    gm.IJKRange((0, 0, 0), (lastXpos, 0, lastZpos)),
    gm.IJKRange((0, lastYpos, 0), (lastXpos, lastYpos, lastZpos))
]
dintel_rg = [gm.IJKRange((0, 0, lastZpos), (lastXpos, lastYpos, lastZpos))]
murete_i_rg = [gm.IJKRange((0, 0, lastZpos), (0, lastYpos, lastZpos))]
murete_d_rg = [
    gm.IJKRange((lastXpos, 0, lastZpos), (lastXpos, lastYpos, lastZpos))
]

#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')
Example #25
0
# Problem type
modelSpace= predefined_spaces.StructuralMechanics3D(nodes) #Defines the
# dimension of the space: nodes by three coordinates (x,y,z) and 
# six DOF for each node (Ux,Uy,Uz,thetaX,thetaY,thetaZ)
# 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])
Example #26
0
# Grid geometric entities definition (points, lines, surfaces)
# Points' generation
gridGeom.generatePoints()

#Slope (in X direction, Y direction or both) the grid points in a range
#syntax: slopePointsRange(ijkRange,slopeX,xZeroSlope,slopeY,yZeroSlope)
#     ijkRange: range for the search.
#     slopeX: slope in X direction, expressed as deltaZ/deltaX
#                       (defaults to 0 = no slope applied)
#     xZeroSlope: coordinate X of the "rotation axis".
#     slopeY: slope in Y direction, expressed as deltaZ/deltaY)
#                       (defaults to 0 = no slope applied)
#     yZeroSlope: coordinate Y of the "rotation axis".

r = gm.IJKRange((0, 0, 0), (lastXpos, 4, lastZpos))
deltZ = 1.5 / 2.0 - 0.6 / 2.0
deltY = yList[0] - yList[4]
gridGeom.slopePointsRange(ijkRange=r,
                          slopeY=deltZ / deltY,
                          yZeroSlope=yList[4])

r = gm.IJKRange((0, 15, 0), (lastXpos, lastYpos, lastZpos))
deltZ = 1.5 / 2.0 - 0.6 / 2.0
deltY = yList[lastYpos] - yList[15]
gridGeom.slopePointsRange(ijkRange=r,
                          slopeY=deltZ / deltY,
                          yZeroSlope=yList[15])

#Ranges for lines and surfaces
slab_unif_rg = gm.IJKRange((0, 0, lastZpos), (lastXpos, lastYpos, lastZpos))
Example #27
0
# coordinates in global X,Y,Z axes for the grid generation
xList=[0]
yList=[0,1,3,6,7]
zList=[0]
lastYpos=len(yList)-1

eSize= 0.2     #length of elements

# grid model definition
gridGeom= gm.GridModel(prep,xList,yList,zList)

# Grid geometric entities definition (points, lines, surfaces)
# Points' generation
gridGeom.generatePoints()

gridGeom.movePointsRange(gm.IJKRange((0,1,0),(0,1,0)),xc.Vector([0.0,0,1.0]))
gridGeom.movePointsRange(gm.IJKRange((0,2,0),(0,3,0)),xc.Vector([0.0,0,1.5]))

beamY_rg=gm.IJKRange((0,0,0),(0,lastYpos,0))
beamY=gridGeom.genLinOneRegion(ijkRange=beamY_rg,setName='beamY')
#                         *** MATERIALS *** 
S235JR= EC3_materials.S235JR
S235JR.gammaM= 1.00


# Steel material-section appropiate for 3D beam analysis, including shear
  # deformations.
  # Attributes:
  #   steel:         steel material (
  #   name: name of the standard steel profile. Types: IPEShape, HEShape,
  #         UPNShape, AUShape, CHSShape
Example #28
0
zList_deck = [0, 0.4]
#auxiliary data
lastXpos = len(xList_deck) - 1
lastYpos = len(yList_deck) - 1
lastZpos = len(zList_deck) - 1

# grid model definition
gridDeck = gm.GridModel(prep, xList_deck, yList_deck, zList_deck)

# Grid geometric entities definition (points, lines, surfaces)
# Points' generation
gridDeck.generatePoints()

#Displacements of the grid points in a range
# deltZ_max=L_long_side_Y*math.tan(alpha)
r = gm.IJKRange((0, 0, 0), (1, 0, lastZpos))
gridDeck.movePointsRange(r,
                         xc.Vector([0.0, delta_Y, delta_Y * math.tan(alpha)]))
r = gm.IJKRange((0, lastYpos, 0), (1, lastYpos, lastZpos))
gridDeck.movePointsRange(
    r, xc.Vector([0.0, -delta_Y, (L_long_side_Y - delta_Y) * math.tan(alpha)]))

r = gm.IJKRange((0, 1, 0), (lastXpos, 1, lastZpos))
gridDeck.movePointsRange(r,
                         xc.Vector([0.0, 0, yList_deck[1] * math.tan(alpha)]))
r = gm.IJKRange((0, 2, 0), (lastXpos, 2, lastZpos))
gridDeck.movePointsRange(r,
                         xc.Vector([0.0, 0, yList_deck[2] * math.tan(alpha)]))

r = gm.IJKRange((2, lastYpos, 0), (lastXpos, lastYpos, lastZpos))
gridDeck.movePointsRange(