Difference between revisions of "Muhammad Shidqy Wasis"

From ccitonlinewiki
Jump to: navigation, search
(Link YouTube Presentasi Assignment 1)
 
(38 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
=Biodata=
 
=Biodata=
 
[[File:Shidqy w Background.png|left|220 px]]
 
[[File:Shidqy w Background.png|left|220 px]]
'''Nama:'''           
+
'''Name:'''           
 
:Muhammad Shidqy Wasis
 
:Muhammad Shidqy Wasis
'''NPM:'''           
+
'''Student Number (NPM):'''           
 
:2106727935
 
:2106727935
'''Lahir:'''         
+
'''Born:'''         
:2 September 2004 (18 tahun)
+
:2 September 2004 (18 years)
 
:Bandung, Indonesia
 
:Bandung, Indonesia
'''Program Studi:'''  
+
'''Major:'''  
:Teknik Mesin (angkatan 2021)
+
:Mechanical Engineering (class of 2021)
  
 
 
 
 
 
__TOC__
 
__TOC__
  
=Konsep Mekanika Fluida=
+
=Assignment 1: Design and Optimization of Compressed Hydrogen Storage=
: '''Pengertian Mekanika Fluida'''
 
: Mekanika fluida adalah cabang ilmu teknik yang mempelajari perilaku fluida (zat yang dapat mengalir, seperti gas dan cairan) dalam keadaan diam dan bergerak. Ilmu ini mencakup studi tentang sifat-sifat fluida, seperti kepadatan, tekanan, viskositas, dan aliran fluida di dalam sistem tertentu.
 
: Mekanika fluida penting dalam banyak aplikasi teknik, seperti dalam perancangan alat transportasi (seperti pesawat terbang, mobil, dan kapal), pembangunan infrastruktur (seperti jembatan dan bendungan), pengolahan bahan baku industri (seperti proses pengolahan minyak dan gas), dan pemodelan lingkungan (seperti pengelolaan air dan cuaca). Dalam mekanika fluida, terdapat dua cabang utama yaitu mekanika fluida teoretis dan mekanika fluida eksperimental.
 
  
 
+
[[File: Hidrogen satu.png|500px|thumb|middle|Compressed Hydrogen Tank Scheme (source: energy.gov)]]
 
 
: '''Pengertian Kinematika'''
 
: Kinematika adalah cabang ilmu fisika yang mempelajari gerakan benda tanpa mempertimbangkan penyebab gerakan tersebut, seperti gaya dan momentum. Ilmu ini mencakup studi tentang posisi, kecepatan, dan percepatan benda dalam ruang dan waktu. Kinematika seringkali digunakan dalam perhitungan pergerakan benda, baik dalam bidang fisika, matematika, maupun teknik.
 
 
 
=Tugas 1: ChatGPT=
 
: '''Tell me what manometer is'''
 
 
 
: A manometer is a device used to measure pressure of a fluid. It consists of a tube, typically made of glass or transparent plastic, partially filled with a liquid (such as water or mercury) and connected to the system or equipment being measured. When the pressure inside the system changes, the liquid in the tube will move up or down, indicating the pressure difference between the system and atmospheric pressure.
 
 
 
: There are various types of manometers, including U-tube manometer, inclined-tube manometer, and well-type manometer. U-tube manometer is the most common type, which consists of a U-shaped tube with one end connected to the system being measured and the other end open to atmospheric pressure. The difference in liquid level between the two sides of the tube indicates the pressure difference between the system and atmospheric pressure.
 
 
 
: Manometers are commonly used in industries such as chemical, petroleum, and HVAC (heating, ventilation, and air conditioning) to measure pressure of fluids in various equipment, such as pipelines, tanks, and heat exchangers. They are also used in laboratory experiments and scientific research to measure pressure of gases and liquids.
 
 
 
 
 
 
 
: '''How does it work'''
 
: The principle of operation of a manometer is based on the fact that the pressure exerted by a fluid is directly proportional to the height of the fluid column. When a manometer is connected to a system with an unknown pressure, the fluid in the tube will move to a certain height due to the pressure difference between the system and atmospheric pressure.
 
 
 
: The height of the fluid column in the tube is measured and converted to the pressure value using the appropriate conversion factor. The conversion factor depends on the fluid properties (such as density) and the unit of measurement used.
 
 
 
: For example, in a U-tube manometer, the height difference (h) between the two sides of the tube is measured and converted to pressure using the formula P = ρgh, where P is the pressure difference between the system and atmospheric pressure, ρ is the density of the fluid in the tube, g is the acceleration due to gravity, and h is the height difference.
 
  
: In general, manometers require calibration to ensure accurate and reliable measurements. Calibration involves comparing the readings of the manometer to a known pressure standard and adjusting the calibration factor if necessary.
+
'''Compressed Hydrogen Definitions'''
 +
:Compressed hydrogen storage refers to the method of storing hydrogen gas by compressing it to high pressures and storing it in specially designed containers or tanks. The process involves increasing the pressure of hydrogen gas, typically to levels between 350 and 700 bar (5,000 to 10,000 pounds per square inch, or psi), in order to achieve a higher density and maximize the amount of hydrogen that can be stored within a given volume.
 +
:Compressed hydrogen storage offers a practical and established solution for storing hydrogen in various applications, including hydrogen fuel cell vehicles, stationary energy storage, and industrial processes. It provides advantages such as high energy density, quick refueling times, and a reliable and well-established technology. However, it also poses challenges related to the storage pressure, safety considerations, and energy losses during compression.
  
 
 
 
 
  
: '''What if the room is in vaccuum condition does manometer still working?'''
+
'''Specification of Compressed Hydrogen Tank'''
: If the room is in a vacuum condition, a conventional manometer, which relies on the difference in pressure between the system being measured and atmospheric pressure, will not work. This is because there is no atmospheric pressure to provide a reference point for the pressure measurement.
+
:Volume: 1 liter
 
+
:Pressure rate: 8 bar (800 kPa)
: However, there are specialized types of manometers that are designed to measure pressures in vacuum conditions. These include absolute pressure manometers and vacuum gauges.
+
:Production cost:  IDR 500.000
 
+
:Objectives: Minimize surface area and material thickness that can withstand an 8 bar pressure
: An absolute pressure manometer measures the pressure of a system relative to a perfect vacuum (zero pressure). This type of manometer is used in applications where the pressure measurement needs to be independent of the atmospheric pressure, such as in vacuum systems or high-altitude testing.
+
:Design variables: Geometry and material selection (included thickness and strength aspect)
 
 
: A vacuum gauge, on the other hand, is specifically designed to measure low pressures in a vacuum. There are several types of vacuum gauges, including thermal conductivity gauges, ionization gauges, and capacitance manometers.
 
 
 
: In summary, a conventional manometer will not work in a vacuum condition, but specialized types of manometers and vacuum gauges can be used to measure pressure in such conditions.
 
  
 
 
 
 
  
: '''What differs conventional manometer and specialized manometer beside that?'''
+
'''Factors and Processes Involved in Designing Compressed Hydrogen Tank'''
: The main difference between a conventional manometer and a specialized manometer is the type of pressure measurement they are designed for.
+
:Designing and optimizing hydrogen storage involves considering various factors and processes to ensure safe and efficient storage of hydrogen. Here are some key considerations:
 
+
:1. Storage Method: There are different methods for storing hydrogen, including compressed gas, liquid hydrogen, and solid-state storage. Each method has its own advantages and challenges, and the choice depends on factors such as energy density, safety, and cost.
: A conventional manometer, such as a U-tube manometer, measures the difference in pressure between a system being measured and atmospheric pressure. It works by comparing the pressure of the fluid in the system to the pressure of the fluid in the open end of the manometer, which is exposed to atmospheric pressure.
+
:2. Energy Density: The energy density of the storage system determines the amount of hydrogen that can be stored per unit volume or mass. Higher energy density enables greater storage capacity and longer operating range. Designing storage systems with high energy density is crucial for practical applications.
 +
:3. Safety: Hydrogen is highly flammable and requires careful handling and storage to ensure safety. Designing storage systems with appropriate safety measures, such as leak detection, pressure relief mechanisms, and robust materials, is essential to mitigate the risks associated with hydrogen.
 +
:4. Efficiency: Optimizing hydrogen storage involves maximizing the efficiency of the storage system. This includes minimizing energy losses during storage and retrieval, as well as minimizing any leakage or degradation of stored hydrogen over time. Efficient storage systems help reduce overall energy consumption and increase the viability of hydrogen as an energy carrier.
 +
:5. Materials Selection: The choice of materials used in storage systems is crucial. They need to be compatible with hydrogen, have high strength, and exhibit low permeability to prevent hydrogen leakage. Research and development efforts focus on developing advanced materials, such as carbon fibers, metal hydrides, and porous materials, to enhance storage capabilities.
 +
:6. Temperature and Pressure Management: Hydrogen storage often involves managing temperature and pressure conditions. Depending on the storage method, maintaining the appropriate temperature and pressure ranges can impact the performance, safety, and longevity of the storage system.
 +
:7. System Integration: Designing and optimizing hydrogen storage also involves considering the integration of storage systems with other components, such as hydrogen production, transportation, and utilization. Ensuring compatibility and efficiency among different system components is crucial for overall system performance.
 +
:8. Cost: The cost of hydrogen storage is a significant factor in its widespread adoption. Designing storage systems that are cost-effective and scalable is essential for the commercial viability of hydrogen as an energy carrier. Research and technological advancements aim to reduce the costs associated with materials, manufacturing, and infrastructure required for hydrogen storage.
 +
:9. Environmental Impact: Evaluating the environmental impact of hydrogen storage systems is important. This includes considering the energy requirements for manufacturing and maintaining the storage systems, as well as any potential emissions or waste generated during the process.
 +
:10. Regulatory Compliance: Designing hydrogen storage systems must adhere to relevant safety standards and regulations. Compliance with codes and regulations ensures the safe operation and deployment of hydrogen storage technologies.
 +
:Optimizing hydrogen storage involves a multidisciplinary approach, combining engineering, materials science, safety considerations, and system integration to develop efficient, safe, and economically viable storage solutions. Ongoing research and technological advancements continue to enhance the performance and viability of hydrogen storage systems.
  
: On the other hand, specialized manometers are designed for specific pressure ranges or conditions. For example, an absolute pressure manometer measures the pressure of a system relative to a perfect vacuum, while a vacuum gauge is designed to measure low pressures in a vacuum.
+
== Optimasi Penyimpanan ==
 +
Ada beberapa tahapan dalam mendesain dan mengoptimasi sistem penyimpanan, dari yang sudah ada menjadi yang sesuai dengan batasan maksimal yang diinginkan.<br>
  
: Specialized manometers may also use different measurement principles and techniques. For example, a capacitance manometer measures pressure by detecting the change in capacitance caused by the deflection of a diaphragm due to pressure changes. An ionization gauge measures pressure by detecting the ionization of gas molecules in a vacuum.
+
1. Tentukan ukuran pelat yang akan digunakan berdasarkan volume yang dibutuhkan, yaitu 1 liter, namun menggunakan luas pelat seminimal mungkin menggunakan perhitungan sebagai berikut:<br>
 +
import math
 +
from scipy.optimize import minimize
 +
 +
def objective(x):
 +
    radius, height = x
 +
    return 2 * math.pi * radius**2 + 2 * math.pi * radius * height
 +
 +
def constraint(x):
 +
    radius, height = x
 +
    return math.pi * radius**2 * height - 1000
 +
 +
initial_guess = [1, 10]  # Initial guess for the radius and height
 +
 +
# Define the bounds for the radius and height
 +
bounds = [(0, None), (0, None)]
 +
 +
# Define the volume constraint
 +
volume_constraint = {'type': 'eq', 'fun': constraint}
 +
 +
# Minimize the surface area subject to the volume constraint
 +
result = minimize(objective, initial_guess, method='SLSQP', bounds=bounds,                                                                       
 +
constraints=volume_constraint)
 +
 
 +
optimal_radius = result.x[0]
 +
optimal_height = result.x[1]
 +
min_surface_area = result.fun
 +
 +
print(f"\n\nOptimal Radius: {optimal_radius} cm")
 +
print(f"Optimal Height: {optimal_height} cm")
 +
print(f"Minimum Surface Area: {min_surface_area} cm²\n\n")
  
: Another difference is in their accuracy and precision. Specialized manometers may have higher accuracy and precision than conventional manometers, but they may also be more expensive and require more maintenance and calibration.
+
Dari perhitungan tersebut, didapatkan beberapa nilai ukuran berikut ini,<br>
 
+
● Optimal Radius: 5.419261255088046 cm<br>
: In summary, the main differences between a conventional manometer and a specialized manometer are the type of pressure measurement, measurement principles and techniques, and accuracy and precision.
+
● Optimal Height: 10.838519182022262 cm<br>
 
+
● Minimum Surface Area: 553.5810443894838 cm²<br>
=Tugas 2: Manometer=
 
&nbsp;
 
:'''Pertanyaan:'''
 
:1. Jelaskan mekanisme kerja manometer analog
 
:2. Jelaskan mekanisme kerja manometer tipe U (fluida air)
 
:3. Tuliskan hasil pengukuran P1, P2, dan P2 (ketika menggunakan manometer tipe U)
 
:4. Faktor apa yang mempengaruhi tinggi rendahnya tekanan
 
:5. Tuliskan satuan yang ada pada manometer tersebut dan konversi ke dalam satuan SI
 
:6. Buatlah skala tekanan pada manometer tersebut
 
 
 
&nbsp;
 
&nbsp;
 
 
 
:'''Jawaban:'''
 
:1. Manometer analog menggunakan prinsip Keseimbangan Hidrostatik, dimana cairan pada tabung akan mengendap pada ketinggian yang sama di setiap kaki tabung ketika kedua ujungnya terbuka terhadap tekanan atmosfer. Penunjuk biasanya terdiri dari jarum yang menunjukkan tekanan pada skala yang terukir pada layar manometer. Semakin besar tekanan yang diterapkan pada tabung, semakin besar pula sudut yang dibentuk oleh tabung tersebut, dan semakin jauh jarum bergerak di sepanjang skala.
 
&nbsp;
 
:2. Mekanisme kerja manometer tipe U terdiri dari dua kolom pipa U yang terisi dengan air, terhubung pada bagian bawah dan atasnya. Tekanan yang diberikan pada salah satu ujung manometer akan menyebabkan perbedaan ketinggian kolom air pada dua sisi manometer. Skala pada manometer tipe U biasanya diberi nilai dalam satuan tekanan yang diukur, seperti psi atau pascal. Dalam pengukuran tekanan fluida, manometer tipe U sering digunakan untuk mengukur tekanan statis atau tekanan dalam pipa yang tidak bergerak.
 
&nbsp;
 
:3. Awal =  P1: 10 mbar, P2 (analog): 1,5 mbar, P2 (tipe U): 9 mmH2O
 
:  Akhir = P1: 8,5 mbar, P2 (analog): 1,2 mbar, P2 (tipe U): 12 mmH2O
 
&nbsp;
 
:4. Volume, Sifat dan Jenis zat, ketinggian zat, suhu, dan Luas permukaan
 
&nbsp;
 
:5. Manometer = Milibar, SI = Pascal Konversi : P1 = 10 kPa P2 =150 Pa
 
&nbsp;
 
:6. 1 milibar = 100 pascal
 
 
 
=Tugas 3: Hasil Praktikum Alat Pengukur Tekanan=
 
 
 
:'''Macam-Macam Alat Ukur'''
 
:Pada praktikum di hari Sabtu, 4 Maret 2023 kami mempelajari mengenai macam-macam alat pengukur tekanan, alat pengukur tersebut antara lain:
 
:1. Manometer U
 
:Mekanisme kerja manometer tipe U terdiri dari dua kolom pipa U yang terisi dengan air, terhubung pada bagian bawah dan atasnya. Tekanan yang diberikan pada salah satu ujung manometer akan menyebabkan perbedaan ketinggian :kolom air pada dua sisi manometer. Skala pada manometer tipe U biasanya diberi nilai dalam satuan tekanan yang diukur, seperti psi atau pascal. Dalam pengukuran tekanan fluida, manometer tipe U sering digunakan untuk mengukur :tekanan statis atau tekanan dalam pipa yang tidak bergerak.
 
 
 
:2. Manometer Analog
 
:Manometer analog menggunakan prinsip Keseimbangan Hidrostatik, dimana cairan pada tabung akan mengendap pada ketinggian yang sama di setiap kaki tabung ketika kedua ujungnya terbuka terhadap tekanan atmosfer. Penunjuk :biasanya terdiri dari jarum yang menunjukkan tekanan pada skala yang terukir pada layar manometer. Semakin besar tekanan yang diterapkan pada tabung, semakin besar pula sudut yang dibentuk oleh tabung tersebut, dan semakin :jauh jarum bergerak di sepanjang skala.
 
 
 
:3. Pressure Transducer
 
:Pressure transducer adalah alat yang digunakan untuk mengukur tekanan suatu fluida atau gas dan mengubahnya menjadi sinyal listrik. Cara kerja pressure transducer adalah dengan menggunakan sensor tekanan yang sensitif :terhadap perubahan tekanan, kemudian mengubah perubahan tekanan menjadi sinyal elektronik yang dapat diproses oleh sistem kontrol atau perangkat pengukur. Output yang dihasilkan oleh pressure transducer dapat berupa sinyal :listrik seperti tegangan atau arus, atau dapat berupa output digital seperti pulsa.
 
 
 
&nbsp;
 
 
 
:'''Studi Kasus'''
 
:Berapa ketinggian fluida (air, raksa, minyak) yang bisa ditimbulkan akibat dari tekanan sebesar 3 mBar?
 
 
 
:P = 300 Pa
 
:ρ(air) = 1000 kg/m^3
 
:ρ(raksa) = 13.600 kg/m^3
 
:ρ(minyak) = 800 kg/m^3
 
 
 
:g = 9,81 m/s^2
 
:ΔP = ρ.g.Δh
 
 
 
&nbsp;
 
  
:Jawab:
+
2. Selanjutnya, dilakukan perhitungan dengan variabel budget (AISI 316) yang telah ditetapkan, yaitu Rp. 500.000. Untuk perhitungannya, digunakan perhitungan sebagai berikut menggunakan python:
:• Air
+
from scipy.optimize import minimize
:Δh = ΔP/ρ.g
+
:h = 300/1000 x 9,81
+
# Harga dan kapasitas yang dibutuhkan
:h = 0,0306 m ≈ 3,06 cm
+
harga_per_unit = 500000  # Rupiah
 +
kapasitas_per_unit = 1  # Liter
 +
 +
# Anggaran maksimal
 +
anggaran_maksimal = 500000
 +
 +
# Fungsi Akhir
 +
def fungsi_akhir(x):
 +
    return -x * kapasitas_per_unit
 +
 +
# Kendala yang terjadi
 +
def kendala(anggaran):
 +
    return anggaran_maksimal - (harga_per_unit * anggaran)
 +
 +
kendala_anggaran = {'type': 'ineq', 'fun': kendala}
 +
 +
# Nilai awal
 +
x0 = 0
 +
 +
# Batasan
 +
batas = [(0, None)]
 +
 +
# Menyelesaikan masalah optimisasi
 +
solusi = minimize(fungsi_akhir, x0, method='SLSQP', bounds=batas, constraints=[kendala_anggaran])
 +
 +
# Menampilkan hasil
 +
print("Status:", solusi.success and "Biaya Optimal" or "Tidak ditemukan solusi")
 +
print("Jumlah unit yang bisa dibeli:", solusi.x[0])
 +
print("Total kapasitas penyimpanan yang didapat:", solusi.x[0] * kapasitas_per_unit, "liter")
 +
print("Total anggaran:", solusi.x[0] * harga_per_unit, "Rupiah")
  
:• Raksa
+
Hasil yang didapatkan adalah:<br>
:Δh = ΔP/ρ.g
+
● Status: Biaya Optimal<br>
:h = 300/13.600 x 9,81
+
● Jumlah unit yang bisa dibeli: 1<br>
:h = 0,00225 m ≈ 0,22 cm
+
● Total kapasitas penyimpanan yang didapat: 1.0 liter<br>
 +
● Total anggaran: 500000.0 Rupiah<br><br>
  
:• Minyak
+
=Link YouTube Presentasi Assignment 1=
:Δh = ΔP/ρ.g
+
<youtube width="200" height="100">v=RC1jOJA5Zxc</youtube>
:h = 300/800 x 9,81
 
:h = 0,0382 m ≈ 3,82 cm
 

Latest revision as of 09:46, 27 June 2023

Header AIR.png

Biodata

Shidqy w Background.png

Name:

Muhammad Shidqy Wasis

Student Number (NPM):

2106727935

Born:

2 September 2004 (18 years)
Bandung, Indonesia

Major:

Mechanical Engineering (class of 2021)

 

Assignment 1: Design and Optimization of Compressed Hydrogen Storage

Compressed Hydrogen Tank Scheme (source: energy.gov)

Compressed Hydrogen Definitions

Compressed hydrogen storage refers to the method of storing hydrogen gas by compressing it to high pressures and storing it in specially designed containers or tanks. The process involves increasing the pressure of hydrogen gas, typically to levels between 350 and 700 bar (5,000 to 10,000 pounds per square inch, or psi), in order to achieve a higher density and maximize the amount of hydrogen that can be stored within a given volume.
Compressed hydrogen storage offers a practical and established solution for storing hydrogen in various applications, including hydrogen fuel cell vehicles, stationary energy storage, and industrial processes. It provides advantages such as high energy density, quick refueling times, and a reliable and well-established technology. However, it also poses challenges related to the storage pressure, safety considerations, and energy losses during compression.

 

Specification of Compressed Hydrogen Tank

Volume: 1 liter
Pressure rate: 8 bar (800 kPa)
Production cost: IDR 500.000
Objectives: Minimize surface area and material thickness that can withstand an 8 bar pressure
Design variables: Geometry and material selection (included thickness and strength aspect)

 

Factors and Processes Involved in Designing Compressed Hydrogen Tank

Designing and optimizing hydrogen storage involves considering various factors and processes to ensure safe and efficient storage of hydrogen. Here are some key considerations:
1. Storage Method: There are different methods for storing hydrogen, including compressed gas, liquid hydrogen, and solid-state storage. Each method has its own advantages and challenges, and the choice depends on factors such as energy density, safety, and cost.
2. Energy Density: The energy density of the storage system determines the amount of hydrogen that can be stored per unit volume or mass. Higher energy density enables greater storage capacity and longer operating range. Designing storage systems with high energy density is crucial for practical applications.
3. Safety: Hydrogen is highly flammable and requires careful handling and storage to ensure safety. Designing storage systems with appropriate safety measures, such as leak detection, pressure relief mechanisms, and robust materials, is essential to mitigate the risks associated with hydrogen.
4. Efficiency: Optimizing hydrogen storage involves maximizing the efficiency of the storage system. This includes minimizing energy losses during storage and retrieval, as well as minimizing any leakage or degradation of stored hydrogen over time. Efficient storage systems help reduce overall energy consumption and increase the viability of hydrogen as an energy carrier.
5. Materials Selection: The choice of materials used in storage systems is crucial. They need to be compatible with hydrogen, have high strength, and exhibit low permeability to prevent hydrogen leakage. Research and development efforts focus on developing advanced materials, such as carbon fibers, metal hydrides, and porous materials, to enhance storage capabilities.
6. Temperature and Pressure Management: Hydrogen storage often involves managing temperature and pressure conditions. Depending on the storage method, maintaining the appropriate temperature and pressure ranges can impact the performance, safety, and longevity of the storage system.
7. System Integration: Designing and optimizing hydrogen storage also involves considering the integration of storage systems with other components, such as hydrogen production, transportation, and utilization. Ensuring compatibility and efficiency among different system components is crucial for overall system performance.
8. Cost: The cost of hydrogen storage is a significant factor in its widespread adoption. Designing storage systems that are cost-effective and scalable is essential for the commercial viability of hydrogen as an energy carrier. Research and technological advancements aim to reduce the costs associated with materials, manufacturing, and infrastructure required for hydrogen storage.
9. Environmental Impact: Evaluating the environmental impact of hydrogen storage systems is important. This includes considering the energy requirements for manufacturing and maintaining the storage systems, as well as any potential emissions or waste generated during the process.
10. Regulatory Compliance: Designing hydrogen storage systems must adhere to relevant safety standards and regulations. Compliance with codes and regulations ensures the safe operation and deployment of hydrogen storage technologies.
Optimizing hydrogen storage involves a multidisciplinary approach, combining engineering, materials science, safety considerations, and system integration to develop efficient, safe, and economically viable storage solutions. Ongoing research and technological advancements continue to enhance the performance and viability of hydrogen storage systems.

Optimasi Penyimpanan

Ada beberapa tahapan dalam mendesain dan mengoptimasi sistem penyimpanan, dari yang sudah ada menjadi yang sesuai dengan batasan maksimal yang diinginkan.

1. Tentukan ukuran pelat yang akan digunakan berdasarkan volume yang dibutuhkan, yaitu 1 liter, namun menggunakan luas pelat seminimal mungkin menggunakan perhitungan sebagai berikut:

import math
from scipy.optimize import minimize

def objective(x):
    radius, height = x
    return 2 * math.pi * radius**2 + 2 * math.pi * radius * height

def constraint(x):
    radius, height = x
    return math.pi * radius**2 * height - 1000

initial_guess = [1, 10]  # Initial guess for the radius and height

# Define the bounds for the radius and height
bounds = [(0, None), (0, None)]

# Define the volume constraint
volume_constraint = {'type': 'eq', 'fun': constraint}

# Minimize the surface area subject to the volume constraint
result = minimize(objective, initial_guess, method='SLSQP', bounds=bounds,                                                                         
constraints=volume_constraint)
  
optimal_radius = result.x[0]
optimal_height = result.x[1]
min_surface_area = result.fun

print(f"\n\nOptimal Radius: {optimal_radius} cm")
print(f"Optimal Height: {optimal_height} cm")
print(f"Minimum Surface Area: {min_surface_area} cm²\n\n")

Dari perhitungan tersebut, didapatkan beberapa nilai ukuran berikut ini,
● Optimal Radius: 5.419261255088046 cm
● Optimal Height: 10.838519182022262 cm
● Minimum Surface Area: 553.5810443894838 cm²

2. Selanjutnya, dilakukan perhitungan dengan variabel budget (AISI 316) yang telah ditetapkan, yaitu Rp. 500.000. Untuk perhitungannya, digunakan perhitungan sebagai berikut menggunakan python:

from scipy.optimize import minimize

# Harga dan kapasitas yang dibutuhkan
harga_per_unit = 500000  # Rupiah
kapasitas_per_unit = 1  # Liter

# Anggaran maksimal
anggaran_maksimal = 500000

# Fungsi Akhir
def fungsi_akhir(x):
    return -x * kapasitas_per_unit

# Kendala yang terjadi
def kendala(anggaran):
    return anggaran_maksimal - (harga_per_unit * anggaran)

kendala_anggaran = {'type': 'ineq', 'fun': kendala}

# Nilai awal
x0 = 0

# Batasan
batas = [(0, None)]

# Menyelesaikan masalah optimisasi
solusi = minimize(fungsi_akhir, x0, method='SLSQP', bounds=batas, constraints=[kendala_anggaran])

# Menampilkan hasil
print("Status:", solusi.success and "Biaya Optimal" or "Tidak ditemukan solusi")
print("Jumlah unit yang bisa dibeli:", solusi.x[0])
print("Total kapasitas penyimpanan yang didapat:", solusi.x[0] * kapasitas_per_unit, "liter")
print("Total anggaran:", solusi.x[0] * harga_per_unit, "Rupiah")

Hasil yang didapatkan adalah:
● Status: Biaya Optimal
● Jumlah unit yang bisa dibeli: 1
● Total kapasitas penyimpanan yang didapat: 1.0 liter
● Total anggaran: 500000.0 Rupiah

Link YouTube Presentasi Assignment 1