for lst in internalForcesListing:
    if (len(lst) > 0):  #lst: list of internal forces for each combination and
        #element
        nrow = 2 * (int(lst[1]) - 1) + int(
            lst[2])  #lst[1]= number of element, lst[2]=number of
        #section (0 o 1)
        matIntForc[nrow] = np.array(
            [float(lst[3]), float(lst[4]),
             float(lst[5])])  #[Fx,Fy,Fz]

f.close()

#We'll check the result of applying the coord. matrix to the vector of forces
#applied in the GCS is equal to the internal forces read from the file
#Local axes beam3dX
lAxBeamX = matrixUtils.matrixToNumpyArray(beam3dX.getLocalAxes(True))
#Loads [Fx,Fy,Fz] applied on the element (GCS)
FbeamXGCS = np.array([0, 0, F])
#internal forces read from the results file for elem1, section1
IFbeamXsec1 = matIntForc[0]
ratio1_0 = sum(np.dot(IFbeamXsec1, lAxBeamX) - FbeamXGCS)
#internal forces read from the results file for elem1, section2
IFbeamXsec2 = matIntForc[1]
ratio1_1 = sum(np.dot(IFbeamXsec2, lAxBeamX) - FbeamXGCS)

#Local axes beam3dY
lAxBeamY = matrixUtils.matrixToNumpyArray(beam3dY.getLocalAxes(True))
#Loads [Fx,Fy,Fz] applied on the element (GCS)
FbeamYGCS = np.array([F, 0, 0])
#internal forces read from the results file for elem2, section1
IFbeamYsec1 = matIntForc[2]
Ejemplo n.º 2
0
integ = analysisAggregation.newIntegrator("eigen_integrator", xc.Vector([]))

soe = analysisAggregation.newSystemOfEqn("full_gen_eigen_soe")
solver = soe.newSolver("full_gen_eigen_solver")

analysis = solu.newAnalysis("modal_analysis", "analysisAggregation", "")
analOk = analysis.analyze(3)
periods = analysis.getPeriods()
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]))
                                           #each element
internalForcesListing= csv.reader(f)
internalForcesListing.next()
for lst in internalForcesListing:
  if (len(lst)>0): #lst: list of internal forces for each combination and
                   #element
    nrow=2*(int(lst[1])-1)+int(lst[2])  #lst[1]= number of element, lst[2]=number of
                              #section (0 o 1)
    matIntForc[nrow]=np.array([float(lst[3]),float(lst[4]),float(lst[5])]) #[Fx,Fy,Fz]
    
f.close()

#We'll check the result of applying the coord. matrix to the vector of forces
#applied in the GCS is equal to the internal forces read from the file
#Local axes beam3dX 
lAxBeamX=matrixUtils.matrixToNumpyArray(beam3dX.getLocalAxes(True))
#Loads [Fx,Fy,Fz] applied on the element (GCS)
FbeamXGCS=np.array([0,0,F])
#internal forces read from the results file for elem1, section1
IFbeamXsec1=matIntForc[0]
ratio1_0=sum(np.dot(IFbeamXsec1,lAxBeamX)-FbeamXGCS)
#internal forces read from the results file for elem1, section2
IFbeamXsec2=matIntForc[1]
ratio1_1=sum(np.dot(IFbeamXsec2,lAxBeamX)-FbeamXGCS)

#Local axes beam3dY 
lAxBeamY=matrixUtils.matrixToNumpyArray(beam3dY.getLocalAxes(True))
#Loads [Fx,Fy,Fz] applied on the element (GCS)
FbeamYGCS=np.array([F,0,0])
#internal forces read from the results file for elem2, section1
IFbeamYsec1=matIntForc[2]
Ejemplo n.º 4
0
integ= analysisAggregation.newIntegrator("eigen_integrator",xc.Vector([1.0,1,1.0,1.0]))

soe= analysisAggregation.newSystemOfEqn("full_gen_eigen_soe")
solver= soe.newSolver("full_gen_eigen_solver")

analysis= solu.newAnalysis("modal_analysis","analysisAggregation","")
analOk= analysis.analyze(3)
periodos= analysis.getPeriods()
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)