Ejemplo n.º 1
0
def calc2(m,s,hoehe_,breite_,laenge,Slaenge):

    global Bs,SBs
    hoehe=hoehe_.mean()
    Sh   =hoehe_.std()
    breite=breite_.mean()
    Sbreite=breite_.std()
    #f=m*9.81
    (a,b,Sa,Sb,Sy)=mylib.gerade(m,s)
    #plt.scatter(m,s)
    plt.errorbar(m,s,yerr=Sm,xerr=Ss,fmt=',')
    plt.xlabel(ur"Masse m in g",fontsize=20)					#Kraft in $mm \cdot kg \cdot s^{-2}$
    plt.ylabel("Durchbiegung s in mm",fontsize=20)
    plt.title(u"Messung des Elastizitätsmodules, Ausrichtung des Stabprofiels")
    x=np.linspace(0,m.max()*1.1,1000)
    plt.xlim(0,2000)
    plt.ylim(0,2.5)
    plt.grid(True)
    plt.plot(x,a+b*x)
    E=(laenge**3*9.81)/(4*hoehe**3*breite*b)*9.81/1000
    #E=(1/s)*laenge**3/(4*hoehe**3*breite*b)*m*9,81
    SE=E*np.sqrt((3*Slaenge/laenge)**2+((3*Sh/hoehe)**2+(Sbreite/breite)**2+(Sb/b)**2+(0.01/9.81)**2)/(4*hoehe**3*breite*b*9.81)**2)
    print "(",E,"+-",SE,")N/mm^2"
    
    Bs+=[ b]
    SBs+=[Sb]
Ejemplo n.º 2
0
def plot11():
	(a,b,Sa,Sb,Sy)=mm.gerade(lambd,sina)
	print "a:",a,"+-",Sa
	print "b:",b,"+-",Sb
	t=np.linspace(min(lambd),max(lambd),1000)
	plt.figure()
	plt.title(ur"Bestätigung der Linearität der Beugungsordnungen")
	plt.xlabel(ur"Beugungsordnung $k$")
	plt.ylabel(ur"$sin(\alpha)$")
	plt.plot(t,b*t+a)
	plt.plot(t,(b+Sb)*t+a+Sa,"m--")
	plt.plot(t,(b-Sb)*t+a-Sa,"c--")
	plt.errorbar(lambd,sina,fmt=".",yerr=Ssina)
	plt.grid()
	plt.show()
Ejemplo n.º 3
0
def calc(m,s,hoehe_,breite_,laenge,Slaenge):
    hoehe=hoehe_.mean()
    Sh   =hoehe_.std()
    breite=breite_.mean()
    Sbreite=breite_.std()
    f=m*9.81
    (a,b,Sy,Sa,Sb)=mylib.gerade(f,s)
    plt.scatter(f,s)
    plt.xlabel(ur"Kraft in $mm \cdot kg \cdot s^{-2}$",fontsize=20)
    plt.ylabel("Durchbiegung in mm")
    plt.title(u"Messung des Elastizitätsmodules")
    x=np.linspace(0,f.max()*1.1,1000)
    plt.xlim(0,20000)
    plt.ylim(0,2)
    plt.grid(True)
    plt.plot(x,a+b*x)
    E=laenge**3/(4*hoehe**3*breite*b)/1000
    SE=E*np.sqrt((3*Slaenge/laenge)**2+((3*Sh/hoehe)**2+(Sbreite/breite)**2+(Sb/b)**2)/(4*hoehe**3*breite*b)**2)
    print "(",E,"+-",SE,")N/mm^2"
Ejemplo n.º 4
0
def calc(m,s,hoehe_,breite_,laenge,Slaenge):
    global Bs,SBs
    hoehe=hoehe_.mean()
    Sh   =hoehe_.std()
    breite=breite_.mean()
    Sbreite=breite_.std()
    #f=m*9.81
    (a,b,Sa,Sb,Sy)=mylib.gerade(m,s)
    #plt.scatter(m,s)
    plt.errorbar(m,s,yerr=Sm,xerr=Ss,fmt=',')
    plt.xlabel(ur"Masse m in g",fontsize=20)
    plt.ylabel("Durchbiegung s in mm",fontsize=20)
    plt.title(u"Messung des Elastizitätsmodules, Materialabhängigkeit")
    x=np.linspace(0,m.max()*1.1,1000)
    plt.xlim(0,2000)
    plt.ylim(0,2)
    plt.grid(True)
    plt.plot(x,a+b*x)
    E=(laenge**3*9.81)/(4*hoehe**3*breite*b)/1000
    SE=E*np.sqrt((3*Slaenge/laenge)**2+((3*Sh/hoehe)**2+(Sbreite/breite)**2+(Sb/b)**2+(0.01/9.81)**2)/(4*hoehe**3*breite*b*9.81)**2)
    print "(",E,"+-",SE,")N/mm^2"
    Bs+=[ b]
    SBs+=[Sb]
Ejemplo n.º 5
0
print "bestimmte Pendellänge", l2,"+-",Sl2,"cm"
print l2/l1*100-100,"%"
# 2.2 Mathematisches Pendel

## 2.2.2 Bestimmung der Messgenauigkeit

l=59.7
t=np.array([15.56,15.50,15.59,15.53,15.43,15.53,15.56,15.56])/10
St=t.std()

# 2.2.1 Abhängigkeit von der Pändellänge

l=np.array([96.00,71.30,63.40,53.60,42.10])
Sl=0.3
t=np.array([19.59,17.03,16.09,14.75,13.15])/10
(a,b,Sa,Sb,Sy)=mylib.gerade(l,t**2)
def plot_abh():
	plt.figure()
	plt.errorbar(l,t**2,xerr=Sl,yerr=2*St*t,fmt='.')
	plt.plot([0,l.max()*1.1],[a,a+b*l.max()*1.1])
	plt.plot([0,l.max()*1.1],[a+Sa,a+Sa+(b+Sb)*l.max()*1.1],"m--")
	plt.plot([0,l.max()*1.1],[a-Sa,a-Sa+(b-Sb)*l.max()*1.1],"c--")
	plt.plot([0,l.max()*1.1],[0,4*np.pi**2/9.81])
	plt.xlabel(ur"Länge in $cm$",fontsize=20)
	plt.ylabel(ur"$T^2$ in $s^2$",fontsize=20)
	plt.title(ur"Mathematisches Pendel- Abhängigkeit der Länge")
	plt.legend([ur"Messwerte",ur"Ausgleichsgerade $a+b\cdot l$",ur"Obere Grenze $a+Sa+(b+Sb)\cdot l$",ur"Untere Grenze $a-Sa+(b-Sb)\cdot l$",ur"theoretische Gerade $T^2=4\pi^2\frac{l}{g}$"],loc=2)
	plt.grid(True)
	plt.show()
print "a:",a,"+-",Sa,"b",b,"+-",Sb,"Sy:",Sy
l=(T2-a)/b
Ejemplo n.º 6
0
SG = G * np.sqrt((Sg / g) ** 2 + (Sm / m) ** 2)

wp = 2 * np.pi / Tp * Np
wf = 2 * np.pi / Tf * Nf
wp[21::] = wp[21::] * -1


Swp = wp * np.sqrt((ST / Tp) ** 2 + (Snp / Np) ** 2)
Swf = wf * np.sqrt((ST / Tf) ** 2 + (Snf / Nf) ** 2)

k = wp * wf / G
Sk = k * np.sqrt((Swp / wp) ** 2 + (Swf / wf) ** 2)
import mylib

# x=get("data.txt")
(a, b, Sa, Sb, Sy) = mylib.gerade(r, k)
print "a", a, "b", b, "Sa", Sa, "Sb", Sb, "Sy", Sy
SI = Sb / b ** 2
print "I=", 1 / b, "+-", SI
print "schwerpunkt bei", -a / b, "+-", -a / b * np.sqrt((Sa / a) ** 2 + (Sb / b) ** 2), "cm"


def plot1():
    plt.figure()
    plt.errorbar(r, k, xerr=Sr, yerr=Sk, fmt=".")
    plt.plot([r.min(), r.max()], [a + b * r.min(), a + b * r.max()])
    plt.plot([r.min(), r.max()], [a + Sa + (b + Sb) * r.min(), a + Sa + (b + Sb) * r.max()], "r--")
    plt.plot([r.min(), r.max()], [a - Sa + (b - Sb) * r.min(), a - Sa + (b - Sb) * r.max()], "r--")
    plt.grid(True)
    plt.xlabel("r in cm")
    plt.show()
Ejemplo n.º 7
0
theta=(d-b)/s
Stheta=theta*np.sqrt((Sd**2+Sb**2)/(d-b)**2+(Ss/s)**2)

k = np.cos(theta/2)
Sk= np.sin(theta/2)/2*Stheta

k=np.concatenate([k,-k])
Sk=np.concatenate([Sk,Sk])

theta=np.concatenate([theta,-theta])
Stheta=np.concatenate([Stheta,Stheta])

b=np.concatenate([b,-b])

(a,m,Sa,Sm,Sy)=mylib.gerade(k,b)
print "R=",m-r,"+-",Sm
print "max. fehler",m*np.sqrt((Sb/b)**2+(Sk/k)**2)

def plot1():
	plt.figure()
	plt.errorbar(k,b,xerr=Sk,yerr=Sb,fmt=".")
	plt.plot([k.min(),k.max()],[a+m*k.min(),a+m*k.max()])
	plt.ylabel(ur"Stoßparameter $b$ in $cm$",fontsize=20)
	plt.xlabel(ur"$\cos(\frac{\theta}{2})$",fontsize=20)
	plt.title(ur"Berechnung von $R$")
	plt.grid(True)
	plt.show()
def wirkungsquerschnitt():
	plt.figure()
	plt.errorbar(theta,b,Stheta,Sb,fmt=".")