import numpy as np 
import matplotlib.pyplot as plt


#jakob
#h = np.array([13,12.6,10.9,10,9.1,8.4,8.1,7.1,6.4,5.6,5.2,4.6,4.3,3.7,3.2,2.9,2.5,2.3,2,1.5,1.3,1.2,.9,.8])
#tid = np.linspace(0,23,24)
#alpha = .1162

#eilertsen fra troms
h = np.array([13,12,11.5,10.5,10,9,8.5,7.3,6.8,6.1,5.5,5,4.5,4,3.5,3.2,2.7,2.4,2,1.8,1.5,1.3,1.1,1])
tid = np.linspace(0,23,24)

#måle-linus
#h = np.array([11.5,10.7,9.8,9,8.2,7.5,6.8,6.2,5.8,5,4.5,4,3.5,3,2.5,2.2])
#tid = np.linspace(0,15,16)
#alpha = .105

#isabell fra bygg
h = np.array([10,9,8,7,6,5,4,3,2,1,0])
tid = np.array([.8,2.5,3.8,4.9,6.5,8.25,10,12.75,14.75,19.75,31])
alpha = .1162

#jorun fra tegning form og farge
h = np.array([11,10.7,9,8,7.5,6.8,6,5.5,4.5,4,3.5,3,2.5,2.4,2.3,2,1.5,1.3])
tid = np.array([0,2,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])
alpha = .1162

t=np.linspace(0,22,1000)

h_eksp = h[0]*np.exp(-alpha*t)

A_1=65
A_2=7
h_torricelli=(2*np.sqrt(h[0])-A_2/A_1*np.sqrt(2*9.81)*t)**2/4


plt.plot(t,h_eksp)
plt.plot(t,h_torricelli)
plt.plot(tid,h)
plt.savefig('torricelli.png')

