f1 etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
f1 etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

Python: Motor/Silindir Hacmi Hesaplama Programı

Python Programına henüz yeni başlamış olan ve başlar başlamaz Otomotiv Mühendisliği'nde öğrenmiş olduğu bazı formülleri Python ile birleştirerek 'Python ve Otomotiv' adlı (başlangıç düzeyinde) bir kaynak çıkarmayı hedefleyen 4. sınıf mühendislik öğrencisiyim. Elbette yalnızca Otomotiv ile sınırlı kalmayacak ve temel mühendislik bilgi ve formüllerini kullanarak özgün kodlar ve programlar çıkarmaya çabalayacağım. 

Motor/Silindir Hacmi Hesaplama Programının Python koduna aşağıdan ulaşabilirsiniz. Program ile ilgili tüm açıklamalar görsellerde ve kod içerisinde yer almaktadır. 

İşlem 1:Kurs Boyu 5.3 cm, silindir çapı 8 cm olan 6 silindirlik F1 motorunun silindir hacmi değeri:

Formula 1 Motoru(Değerlere bu linkten ulaşabilirsiniz.)



İşlem 2 :Kurs Boyu 5.3 cm, silindir hacmi 1598.44 cm3 olan 6 silindirlik F1 motorunun silindir çapı değeri:


İşlem 3:Silindir çapı 8 cm, silindir hacmi 1598.44 cm3 olan 6 silindirlik F1 motorunun kurs boyu değeri:


Programın Python Kodu

print("""********************
Motor/Silindir Hacmi Hesaplama

V=Tek bir silindirin strok hacmi(cm3 = cc)
D=Silindirin Çapı (cm)
L=Kurs boyu(cm)

********************
Lütfen Yapmak İstediğiniz İşlemi Seçiniz:

1-Kurs boyu ve silindir çapını girerek silindir hacmini hesaplama

2-Silindir hacmi ve kurs Boyunu girerek silindir çapını hesaplama

3-Silindir hacmi ve silindir çapını girerek kurs boyunu hesaplama

*******BY*************
""")
import math

while True:
İşlem = input("İşlemi seçiniz:")
Silindir_Sayısı = int(input("Toplam Silindir Sayısı Değerini Giriniz:"))
if (İşlem == "1"):
D = float(input("Silindir Çapı Değerini Giriniz:"))
L = float(input("Kurs Boyu Değerini Giriniz:"))
V = (math.pi * D ** 2) * L * 0.25 * Silindir_Sayısı
print("Toplam Strok Hacmi Değeri:",V,"cc")
elif (İşlem == "2"):
V = float(input("Toplam Strok Hacmi Değerini Giriniz:"))
L = float(input("Kurs Boyu Değerini Giriniz:"))
D = ((V / (L * 0.25 * Silindir_Sayısı * math.pi))) ** 0.5
print("Silindir Çapı Değeri:", D, "cm")
elif (İşlem == "3"):
V = float(input("Toplam Strok Hacmi Değerini Giriniz:"))
D = float(input("Silindir Çapı Değerini Giriniz:"))
L = (((4 * V ) / (math.pi * D ** 2) / Silindir_Sayısı))
print("Kurs Boyu Değeri:", L, "cm")














Python: Engine / Cylinder Volume Calculation Program

I am a 4th year engineering student who has just started the Python Program and aims to extract a resource called 'Python and Automotive' (beginner level) by combining some formulas that he has learned in Automotive Engineering with Python. Of course, I will not be limited to Automotive only and will try to create original codes and programs using basic engineering knowledge and formulas.

You can find the Python code of the Engine/Cylinder Volume Calculation Program below. All explanations about the program are included in the pictures and code.

Process 1: The cylinder volume value of the 6-cylinder F1 engine with a stroke length of 5.3 cm and a cylinder diameter of 8 cm:

Formula 1 Motoru(You can see the values with this link.)


Process 2: The cylinder diameter value of the 6-cylinder F1 engine with a stroke length of 5.3 cm and a cylinder volume of 1598.44 cm3:


Process 3: The stroke length of the 6-cylinder F1 engine with a cylinder diameter of 8 cm and a cylinder volume of 1598.44 cm3:



Program's Python Code

print("""********************
Engine / Cylinder Volume Calculation

V=Stroke volume of a single cylinder(cm3 = cc)
D=Diameter of the cylinder(cm)
L=Stroke length(cm)

********************
Please Select What You Want to Do:

1-Calculating the cylinder volume by entering the stroke length and the cylinder diameter

2-Calculating the cylinder diameter by entering the cylinder volume and the stroke length

3-Calculating the stroke length by entering the cylinder volume and the cylinder diameter

*******BY*************
""")
import math

while True:
Operation = input("Select the Operation:")
Number_of_Cylinders = int(input("Please Enter the Total Number of Cylinders Value:"))
if (Operation == "1"):
D = float(input("Please Enter the Cylinder Diameter Value:"))
L = float(input("Please Enter the Stroke Length Value:"))
V = (math.pi * D ** 2) * L * 0.25 * Number_of_Cylinders
print("Total Stroke Volume Value:",V,"cc")
elif (Operation == "2"):
V = float(input("Please Enter the Total Stroke Volume Value:"))
L = float(input("Please Enter the Stroke Length Value:"))
D = ((V / (L * 0.25 * Number_of_Cylinders * math.pi))) ** 0.5
print("Cylinder Diameter Value:", D, "cm")
elif (Operation == "3"):
V = float(input("Please Enter the Total Stroke Volume Value:"))
D = float(input("Please Enter the Cylinder Diameter Value:"))
L = (((4 * V ) / (math.pi * D ** 2) / Number_of_Cylinders))
print("Stroke Length Value:", L, "cm")