Difference between revisions of "Final Report of Hydrogen Storage Optimization Project, Darell Jeremia Sitompul, 6 Juni 2023"
Darell0306 (talk | contribs) (Created page with "Test") |
Darell0306 (talk | contribs) m |
||
Line 1: | Line 1: | ||
− | + | Requirement: | |
+ | |||
+ | - Capacity = 1 Liter | ||
+ | - Budget = Rp.500.000,00 (Lima ratus ribu rupiah) | ||
+ | |||
+ | |||
+ | DRAFT PROGRAM | ||
+ | import numpy as np | ||
+ | |||
+ | |||
+ | print(": Radius : Surface Area :") | ||
+ | |||
+ | r_max = 20 | ||
+ | a = np.zeros((r_max, 2)) | ||
+ | for r in range (1, r_max + 1): | ||
+ | flat_tube_height = (1000-((4*np.pi*r**3)/3))/(np.pi*(r)**2) | ||
+ | sur_area = ((2*np.pi*r) * flat_tube_height) + ((2*np.pi*r**2)*2) | ||
+ | a[r-1][0] = int(r) | ||
+ | a[r-1][1] = np.round(sur_area, 5) | ||
+ | print(": ", a[r-1][0], " "*(6 - len(str(a[r-1][0]))), | ||
+ | " : ", a[r-1][1], " "*(12 - len(str(a[r-1][1]))), " :") | ||
+ | |||
+ | for i in range(len(a)): | ||
+ | for j in range (len(a)): | ||
+ | if a[i][1] < a[j][1]: | ||
+ | for n in range (2): | ||
+ | temp = a[i][n] | ||
+ | a[i][n] = a[j][n] | ||
+ | a[j][n] = temp | ||
+ | |||
+ | print("Minimum surface area will be found when") | ||
+ | print("Radius = ", a[0][0]) | ||
+ | print("Surface Area : ", a[0][1]) |
Revision as of 23:55, 8 June 2023
Requirement:
- Capacity = 1 Liter - Budget = Rp.500.000,00 (Lima ratus ribu rupiah)
DRAFT PROGRAM
import numpy as np
print(": Radius : Surface Area :")
r_max = 20
a = np.zeros((r_max, 2)) for r in range (1, r_max + 1):
flat_tube_height = (1000-((4*np.pi*r**3)/3))/(np.pi*(r)**2) sur_area = ((2*np.pi*r) * flat_tube_height) + ((2*np.pi*r**2)*2) a[r-1][0] = int(r) a[r-1][1] = np.round(sur_area, 5) print(": ", a[r-1][0], " "*(6 - len(str(a[r-1][0]))), " : ", a[r-1][1], " "*(12 - len(str(a[r-1][1]))), " :")
for i in range(len(a)):
for j in range (len(a)): if a[i][1] < a[j][1]: for n in range (2): temp = a[i][n] a[i][n] = a[j][n] a[j][n] = temp
print("Minimum surface area will be found when") print("Radius = ", a[0][0]) print("Surface Area : ", a[0][1])