Ejemplo n.º 1
0
Archivo: test.py Proyecto: VSilva/DBELA
 def test_compute_periods(self):
     print 'test 7'
     periods = capacity_calculations.compute_periods(28.5,[1.0,1.78858,3.08728],'Bare_Frame')
     self.assertTrue(numpy.allclose(periods,[2.85000,3.81153,5.00764]))  
Ejemplo n.º 2
0
            es_ls3 = 0.060
        
        data.append(ec_ls2)
        data.append(ec_ls3)
        data.append(es_ls2)
        data.append(es_ls3)
        data.append(betas)
        
   #     print data
           
        collapse_type = capacity_calculations.compute_collapse_type(data)        
        collapse_type = 'Beam Sway'
        #Compute capacity displacement        
        capacityDisp = capacity_calculations.compute_disps(data,collapse_type)
        ductilities = capacity_calculations.compute_ductility(capacityDisp)           
        periods = capacity_calculations.compute_periods(data,ductilities) 
        elasticPeriods.append(periods[0])  
                 
        #Compute demand displacement
        demandDisp = demand_calculations.compute_demand_displacement(data,periods,spectraDisp,spectraPeriods,damping,ACCELEROGRAMS,ductilities)
        DSpositions = damage_allocator.damage_state_position(capacityDisp, demandDisp)
        damageStates=damageStates+DSpositions
        print capacityDisp
 #       print demandDisp
#        print ductilities
 #       print periods

# Compute the imls for each accelerogram    
imlDamageStates = demand_calculations.compute_imls_damage_states(elasticPeriods,ACCELEROGRAMS,IMTs,IMTVALUES)

# Compute the best logarithmic mean and standard deviation for each curve