#Local axes beam3dZ
lAxBeamZ = matrixUtils.matrixToNumpyArray(beam3dZ.getLocalAxes(True))
#Loads [Fx,Fy,Fz] applied on the element (GCS)
FbeamZGCS = np.array([F / math.sqrt(2), -F / math.sqrt(2), 0])
#internal forces read from the results file for elem2, section1
IFbeamZsec1 = matIntForc[4]
ratio3_0 = sum(np.dot(IFbeamZsec1, lAxBeamZ) - FbeamZGCS)
#internal forces read from the results file for elem2, section2
IFbeamZsec2 = matIntForc[5]
ratio3_1 = sum(np.dot(IFbeamZsec2, lAxBeamZ) - FbeamZGCS)

#results checks
# Internal forces (expressed in local axes) must give the same
# values for the RC section 1 in all the three beams
elsec1x = FMeBx[0]
Rsec1beamX = matrixUtils.vectorToNumpyArray(elsec1x.getResistingForce())
elsec1y = FMeBy[0]
Rsec1beamY = matrixUtils.vectorToNumpyArray(elsec1y.getResistingForce())
elsec1z = FMeBz[0]
Rsec1beamZ = matrixUtils.vectorToNumpyArray(elsec1z.getResistingForce())

ratio1 = (Rsec1beamX - Rsec1beamY).sum() + (Rsec1beamX - Rsec1beamZ).sum() + (
    Rsec1beamY - Rsec1beamZ).sum()

# Internal forces (expressed in local axes) must give the same
# values for the RC section 2 in all the three beams
elsec2x = FMeBx[1]
Rsec2beamX = matrixUtils.vectorToNumpyArray(elsec2x.getResistingForce())
elsec2y = FMeBy[1]
Rsec2beamY = matrixUtils.vectorToNumpyArray(elsec2y.getResistingForce())
elsec2z = FMeBz[1]
Exemplo n.º 2
0
angularFrequencies = analysis.getAngularFrequencies()
aceleraciones = [2.27, 2.45, 6.98]
crossCQCCoefficients = analysis.getCQCModalCrossCorrelationCoefficients(
    xc.Vector([0.05, 0.05, 0.05]))

from misc import matrixUtils
eigNod3 = nod3.getNormalizedEigenvectors
eigenvectors = matrixUtils.matrixToNumpyArray(eigNod3)
modos = eigenvectors[0:3, 0:3]  #eigenvectors.getBox(0,0,2,2)
modo1 = modos[:, 0]  #.getCol(1)
modo2 = modos[:, 1]  #.getCol(2)
modo3 = modos[:, 2]  #.getCol(3)

factoresParticipacionModalX = nod3.getModalParticipationFactorsForDOFs([0])
factoresDistribucion = nod3.getDistributionFactors
A1 = matrixUtils.vectorToNumpyArray(
    nod3.getMaxModalDisplacementForDOFs(1, aceleraciones[0], [0]))
maxDispMod1 = A1[0:3]  #getBox(A1,1,1,3,1)
A2 = matrixUtils.vectorToNumpyArray(
    nod3.getMaxModalDisplacementForDOFs(2, aceleraciones[1], [0]))
maxDispMod2 = A2[0:3]  #getBox(A2,1,1,3,1)
A3 = matrixUtils.vectorToNumpyArray(
    nod3.getMaxModalDisplacementForDOFs(3, aceleraciones[2], [0]))
maxDispMod3 = A3[0:3]  #getBox(A3,1,1,3,1)

# Theorethical values taken from the exampleE26.8 of the book: Clough, R. W., and Penzien, J., Dynamics of Structures
angularFrequenciesTeor = xc.Vector([4.59, 4.83, 14.56])
theorPeriods = xc.Vector(
    [2 * math.pi / 4.59, 2 * math.pi / 4.83, 2 * math.pi / 14.56])
ratio0 = (angularFrequencies - angularFrequenciesTeor).Norm()
theorFrequencies = [
    4.59 / 2 / math.pi, 4.83 / 2 / math.pi, 14.56 / 2 / math.pi
#Local axes beam3dZ 
lAxBeamZ=matrixUtils.matrixToNumpyArray(beam3dZ.getLocalAxes(True))
#Loads [Fx,Fy,Fz] applied on the element (GCS)
FbeamZGCS=np.array([F/math.sqrt(2),-F/math.sqrt(2),0])
#internal forces read from the results file for elem2, section1
IFbeamZsec1=matIntForc[4]
ratio3_0=sum(np.dot(IFbeamZsec1,lAxBeamZ)-FbeamZGCS)
#internal forces read from the results file for elem2, section2
IFbeamZsec2=matIntForc[5]
ratio3_1=sum(np.dot(IFbeamZsec2,lAxBeamZ)-FbeamZGCS)

#results checks
# Internal forces (expressed in local axes) must give the same
# values for the RC section 1 in all the three beams
elsec1x=FMeBx[0]
Rsec1beamX=matrixUtils.vectorToNumpyArray(elsec1x.getResistingForce())
elsec1y=FMeBy[0]
Rsec1beamY=matrixUtils.vectorToNumpyArray(elsec1y.getResistingForce())
elsec1z=FMeBz[0]
Rsec1beamZ=matrixUtils.vectorToNumpyArray(elsec1z.getResistingForce())

ratio1=(Rsec1beamX-Rsec1beamY).sum()+(Rsec1beamX-Rsec1beamZ).sum()+(Rsec1beamY-Rsec1beamZ).sum()

# Internal forces (expressed in local axes) must give the same
# values for the RC section 2 in all the three beams
elsec2x=FMeBx[1]
Rsec2beamX=matrixUtils.vectorToNumpyArray(elsec2x.getResistingForce())
elsec2y=FMeBy[1]
Rsec2beamY=matrixUtils.vectorToNumpyArray(elsec2y.getResistingForce())
elsec2z=FMeBz[1]
Rsec2beamZ=matrixUtils.vectorToNumpyArray(elsec2z.getResistingForce())
Exemplo n.º 4
0
angularFrequencies= analysis.getAngularFrequencies()
aceleraciones= [2.27,2.45,6.98]
crossCQCCoefficients= analysis.getCQCModalCrossCorrelationCoefficients(xc.Vector([0.05,0.05,0.05]))


from misc import matrixUtils
eigNod3= nod3.getNormalizedEigenvectors
eigenvectors= matrixUtils.matrixToNumpyArray(eigNod3)
modos= eigenvectors[0:3,0:3] #eigenvectors.getBox(0,0,2,2)
modo1= modos[:,0] #.getCol(1)
modo2= modos[:,1] #.getCol(2)
modo3= modos[:,2] #.getCol(3)

factoresParticipacionModalX= nod3.getModalParticipationFactorsForDOFs([0])
factoresDistribucion= nod3.getDistributionFactors
A1= matrixUtils.vectorToNumpyArray(nod3.getMaxModalDisplacementForDOFs(1,aceleraciones[0],[0]))
maxDispMod1= A1[0:3] #getBox(A1,1,1,3,1)
A2= matrixUtils.vectorToNumpyArray(nod3.getMaxModalDisplacementForDOFs(2,aceleraciones[1],[0]))
maxDispMod2= A2[0:3] #getBox(A2,1,1,3,1)
A3= matrixUtils.vectorToNumpyArray(nod3.getMaxModalDisplacementForDOFs(3,aceleraciones[2],[0]))
maxDispMod3= A3[0:3] #getBox(A3,1,1,3,1)


# Theorethical values taken from the exampleE26.8 of the book: Clough, R. W., and Penzien, J., Dynamics of Structures
angularFrequenciesTeor= xc.Vector([4.59,4.83,14.56])
periodosTeor= xc.Vector([2*math.pi/4.59,2*math.pi/4.83,2*math.pi/14.56])
ratio0= (angularFrequencies-angularFrequenciesTeor).Norm()
frecuenciasTeor= [4.59/2/math.pi,4.83/2/math.pi,14.56/2/math.pi]
ratio1= (periodos-periodosTeor).Norm()
modosTeor= numpy.matrix([[-0.731,0.271,-1],
                         [0.232,1,0.242],