fehlermeldung bei phyton eingabe
Verfasst: Mittwoch 5. Dezember 2012, 20:25
moin moin,
ich habe folgendes in phyton eingegeben, bekomme aber immer ein fehlermeldung,wenn ich debug auswähle, kann mir da jemand helfen!?
#----------------------------------------------------------------
from scipy import sin
from scipy import cos
from scipy import sinh
from scipy import exp
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,20.0*60,30.0*60,50.0*60] #sek.
Temp=[273.15,353.15,353.15,273.15] #Kelvin
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 #MPa
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,40.0*60,1.0)
S=odeint(dSdt,S0,t)
import pylab
pylab.plot(t,S,'r-')
pylab.xlabel('Zeit$t$[s]')
pylab.ylabel('Temp.$T(t)$[k]')
pylab.savefig('ode.pdf')
pylab.show()
#---------------------------------------------------------------------------Ende
also bei from scipy import sin sagt er exeptions.Name ERROR:name'arrange'is not defined
bei return sagt er outside of function
für jede hilfe bin ich dankbar, ist auch das erste mal das ich mit phyton arbeite, bin also absoluter anfänger
gruß carstello
ich habe folgendes in phyton eingegeben, bekomme aber immer ein fehlermeldung,wenn ich debug auswähle, kann mir da jemand helfen!?
#----------------------------------------------------------------
from scipy import sin
from scipy import cos
from scipy import sinh
from scipy import exp
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,20.0*60,30.0*60,50.0*60] #sek.
Temp=[273.15,353.15,353.15,273.15] #Kelvin
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 #MPa
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,40.0*60,1.0)
S=odeint(dSdt,S0,t)
import pylab
pylab.plot(t,S,'r-')
pylab.xlabel('Zeit$t$[s]')
pylab.ylabel('Temp.$T(t)$[k]')
pylab.savefig('ode.pdf')
pylab.show()
#---------------------------------------------------------------------------Ende
also bei from scipy import sin sagt er exeptions.Name ERROR:name'arrange'is not defined
bei return sagt er outside of function
für jede hilfe bin ich dankbar, ist auch das erste mal das ich mit phyton arbeite, bin also absoluter anfänger
gruß carstello
