示例#1
0
def getSlidingVectorsSystemfromSlidingVector(DOFs,coo,v):
  '''Returns a sliding vector system equivalent to the sliding vector.

  Parameters:
  :param DOFs: degrees of freedom.
  :param coo: coordinates of a point in the vector line of action.
  :param v: vector.
  '''
  if(DOFs=="UV"):
    return geom.SlidingVectorsSystem2d(geom.Pos2d(coo[0],coo[1]),geom.Vector2d(v[0],v[1]))
  elif(DOFs=="UVR"):
    return geom.SlidingVectorsSystem2d(geom.Pos2d(coo[0],coo[1]),geom.Vector2d(v[0],v[1]),v[2])
  elif(DOFs=="UVW"):
    return geom.SlidingVectorsSystem3d(geom.Pos3d(coo[0],coo[1],coo[2]),geom.Vector3d(v[0],v[1],v[2]))
  elif(DOFs=="UVWRxRyRz"):
    return geom.SlidingVectorsSystem3d(geom.Pos3d(coo[0],coo[1],coo[2]),geom.Vector3d(v[0],v[1],v[2]),geom.Vector3d(v[3],v[4],v[5]))
示例#2
0
  x.append(z)r
  results5_16.append(sigma_h)

totalEarthPressure= scipy.integrate.simps(results5_16,x)

earthPressurePolygon=geom.Polygon2d()

for cx,cy in zip(x,results5_16):
  earthPressurePolygon.appendVertex(geom.Pos2d(cx,cy))

earthPressurePolygon.appendVertex(geom.Pos2d(x[-1],0.0))
earthPressurePolygon.appendVertex(geom.Pos2d(0,0))
earthPressurePolygonCentroid= earthPressurePolygon.getCenterOfMass()
earthPressureVector= geom.Vector2d(-totalEarthPressure,-Fv)
earthPressureTail= geom.Pos2d(foundationWidth,H-earthPressurePolygonCentroid.x)
earthPressureSVS= geom.SlidingVectorsSystem2d(geom.SlidingVector2d(earthPressureTail,earthPressureVector))
print 'earthPressureSVS: ', earthPressureSVS

'''
print 'B/H= 0.1', results5_16
'''

# Spandrel wall.
foundationCenter= geom.Pos2d(foundationWidth/2.0,0.0)
spandrelWallPolygon= geom.Polygon2d()
spandrelWallPolygon.appendVertex(geom.Pos2d(0.0,0.0))
spandrelWallPolygon.appendVertex(geom.Pos2d(foundationWidth,0.0))
spandrelWallPolygon.appendVertex(geom.Pos2d(1.05,H))
spandrelWallPolygon.appendVertex(geom.Pos2d(0.00,H))
spandrelWallPolygonCentroid= spandrelWallPolygon.getCenterOfMass()
spandrelWallPolygonArea= spandrelWallPolygon.getArea()
示例#3
0
# -*- coding: utf-8 -*-
from __future__ import print_function
import xc_base
import geom
svd1 = geom.SlidingVectorsSystem2d()
ptoAplic = geom.Pos2d(1, 1)
vectorDir = geom.Vector2d(1, 0)
vec = geom.SlidingVector2d(ptoAplic, vectorDir)
svd1 += vec
ptoAplic = geom.Pos2d(1, -1)
vec = geom.SlidingVector2d(ptoAplic, vectorDir)
svd1 += vec

zml1 = svd1.zeroMomentLine()
vDir1 = zml1.getVDir()

svd2 = geom.SlidingVectorsSystem2d()
ptoAplic = geom.Pos2d(0, 0)
vectorDir = geom.Vector2d(0, 1)
vec = geom.SlidingVector2d(ptoAplic, vectorDir)
svd2 += vec
ptoAplic = geom.Pos2d(-1, 0)
vec = geom.SlidingVector2d(ptoAplic, vectorDir)
svd2 += vec

zml2 = svd2.zeroMomentLine()
vDir2 = zml2.getVDir()
ratio = (vDir1.x - 1.0)**2 + vDir1.y**2 + vDir2.x**2 + (vDir2.y - 1.0)**2

# print('zml1= ', zml1)
# print('vDir1= ', vDir1)
示例#4
0
# -*- coding: utf-8 -*-
''' Trivial verification test for sliding vector system 
    load distribution.'''

from __future__ import print_function
import xc_base
import geom
import math

# Sliding vector system.
O = geom.Pos2d(0.0, 1.0)
V = geom.Vector2d(1.0, 0.0)
svs1 = geom.SlidingVectorsSystem2d(O, V, 0.0)

# Points and weights.
points = [geom.Pos2d(-1.0, 0.0), geom.Pos2d(1.0, 0.0)]
weights = [1.0, 1.0]

vectors1 = svs1.distribute(points, weights)

error = (vectors1[0].getVector2d() - geom.Vector2d(0.5, 0.5)).getModulus()
error += (vectors1[1].getVector2d() - geom.Vector2d(0.5, -0.5)).getModulus()

vectors2 = svs1.distribute(points)
error += (vectors2[0].getVector2d() - geom.Vector2d(0.5, 0.5)).getModulus()
error += (vectors2[1].getVector2d() - geom.Vector2d(0.5, -0.5)).getModulus()
'''
print(points)
print(weights, len(weights))
print(error)
'''
示例#5
0
    x.append(z)
    earth_pressure.append(sigma_h)

totalEarthPressure = scipy.integrate.simps(earth_pressure, x)

earthPressurePolygon = geom.Polygon2d()

for cx, cy in zip(x, earth_pressure):
    earthPressurePolygon.appendVertex(geom.Pos2d(cx, cy))

earthPressurePolygon.appendVertex(geom.Pos2d(x[-1], 0.0))
earthPressurePolygon.appendVertex(geom.Pos2d(0, 0))
earthPressurePolygonCentroid = earthPressurePolygon.getCenterOfMass()
earthPressureVector = geom.Vector2d(-totalEarthPressure, -Fv)
earthPressureTail = geom.Pos2d(B, H - earthPressurePolygonCentroid.x)
earthPressureSVS = geom.SlidingVectorsSystem2d(
    geom.SlidingVector2d(earthPressureTail, earthPressureVector))
print 'earthPressureSVS: ', earthPressureSVS

# Gravity wall.
foundationCenter = geom.Pos2d(B / 2.0, 0.0)
gravityWallPolygon = geom.Polygon2d()
gravityWallPolygon.appendVertex(geom.Pos2d(0.0, 0.0))
gravityWallPolygon.appendVertex(geom.Pos2d(B, 0.0))
gravityWallPolygon.appendVertex(geom.Pos2d(B, H))
gravityWallPolygon.appendVertex(geom.Pos2d(0.00, H))
gravityWallPolygonCentroid = gravityWallPolygon.getCenterOfMass()
gravityWallPolygonArea = gravityWallPolygon.getArea()
gravityWallUnitWeight = 24e3
gravityWallPolygonWeight = gravityWallUnitWeight * gravityWallPolygonArea
gravityWallWeightSVS = geom.SlidingVectorsSystem2d(
    geom.SlidingVector2d(gravityWallPolygonCentroid,