Created
October 18, 2011 07:36
-
-
Save piti118/1294823 to your computer and use it in GitHub Desktop.
Script to estimate the effectiveness of using boat engines as water propeller (using energy budget).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t_flow = 3000.#m^3/s total chaopraya flow | |
t_area = 4000.#m^2 total crossection of chaopraya | |
rho = 1000.#kg/m^3 water density | |
#non interference | |
#P is power per boat (watts) | |
#A is effective area (m^3) | |
#n is number of boats | |
def flowdiff(P,A,n): | |
a_area = A #affected Area | |
a_flow = t_flow/t_area*A #flow in affected area | |
f_new = pow(a_flow**3 + 2*P*A**2/rho,1./3.) #new flow in affected area | |
print 'f_new-a_flow',(f_new-a_flow) #flow generated per boat | |
un_flow = t_flow/t_area*(t_area-n*A)#unaffected flow | |
new_total = f_new*n+un_flow #new total flow | |
flow_diff = new_total - t_flow | |
return flow_diff | |
#interfered flow | |
#P is power per boat (watts) | |
#A is effective area (m^3) | |
#n is number of boats | |
#assuming total affected area = n*A | |
#actually if you write downt he expression there is a magic factor of n^3 | |
#which makes it correct to add flow of 1000 boats | |
def interfered_flowdiff(P,A,n): | |
a_area = A #affected Area | |
a_flow = t_flow/t_area*(n*A) #flow in affected area | |
f_new = pow(a_flow**3 + 2*n*P*(n*A)**2/rho,1./3.) #new flow in affected area | |
print 'f_new-a_flow',(f_new-a_flow) #flow generated per boat | |
un_flow = t_flow/t_area*(t_area-n*A)#unaffected flow | |
new_total = f_new+un_flow #new total flow | |
flow_diff = new_total - t_flow | |
return flow_diff | |
#using estimated power and effective from K.Matipon | |
print '1000 small boats non interference' | |
print flowdiff(P=1000.,A=0.1,n=1000.) #198m^3/s | |
print '10 big ones non interference' | |
print flowdiff(P=2000000.,A=1.,n=10.) #151m^3/s | |
print '1000 small boats interfere' | |
print interfered_flowdiff(P=1000.,A=0.1,n=1000.) #198m^3/s | |
print '10 big ones interfere' | |
print interfered_flowdiff(P=2000000.,A=1.,n=10.) #151m^3/s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment