fläche einer hysteresekurve mit python integrieren
Verfasst: Samstag 8. Dezember 2012, 19:48
moin, ich habe eine spannungs-dehnungskurve mit dem folgenden text in phyton dargestellt. jetzt möchte ich die fläche der hystereseschleife integrieren, kann mir da jemand helfen, ich weiss nicht, wie ich die befehle für die integration formulieren soll!
die formel für die integration lautet:
Integral(von Dmin nach Dmax)S(t)dD
vielen dank im vorraus
die formel für die integration lautet:
Integral(von Dmin nach Dmax)S(t)dD
Code: Alles auswählen
#---------------------------------------------------
from scipy import *
from scipy import integrate
import numpy
import math
from scipy.integrate import odeint
from scipy.integrate import quad
from scipy.interpolate import interp1d as interp
Temp_t=[0.0,27.125*60,37.125*60,57.125*60,67.125*60,87.125*60]
Temp=[490.15,273.15,273.15,353.15,353.15,273.15]
T=interp(Temp_t,Temp,bounds_error=False)
alfa=24.5E-6
T_ref=292.15
C=[3.2E4,0.037,5.1,6524.7]
E=52600
def dSdt(S,t):
dTdt=(T(t+1.0E-2)-T(t))/1.0E-2
dEpsThdt=alfa*dTdt
dEpsKrdt=sign(S)*C[0]*sinh(C[1]*abs(S))**C[2]*exp(-C[3]/T(t))
return -E*dEpsKrdt-E*dEpsThdt
S0,t=0.0,arange(0.0,87.125*60,1.0)
S=odeint(dSdt,S0,t) #S=Spannung
"""def dDdt(D,t):
dTdt=(T(t+1.0E-2)-T(t))/1.0E-2
dEpsThdt=alfa*dTdt
return -dEpsThdt
D0=0.0
D=odeint(dDdt,D0,t)
"""
D = -alfa*(T(t)-T_ref) #D=Dehnung
import pylab
pylab.plot(D,S,'r-')
#pylab.ylim([-30.,30.])
pylab.xlabel('Dehnung')
pylab.ylabel('Spannung[MPa]')
pylab.savefig('ode.pdf')
pylab.show()
#-----------------------------------------------Ende