Project

Program for analysis of data Using an Input IC-engine Data file

Objective- Program for analysis of data, Using an Input IC-engine Data file.

import math
import matplotlib.pyplot as plt
import numpy as np

#  values

crank=[]
pressure=[]
temperature=[]
volume=[]

# File Parsing
for line in open(\"engine_data.out\"):
	if \"#\" not in line:
		value=line.split()
		crank.append(float(value[0]))
		pressure.append(float(value[1]))
		temperature.append(float(value[4]))
		volume.append(float(value[7]))

		
plt.plot(volume,pressure)
plt.title(\"Pressure(MPa) vs Volume(M^3)\")
plt.ylabel(\"Pressure(MPa)\")
plt.xlabel(\"Volume(M^3)\")
plt.savefig(\"P_V Diagram\")
plt.show()
plt.plot(crank,pressure)
plt.title(\"Pressure(MPa) vs Crank angle(Deg)\")
plt.xlabel(\"crank(Deg)\")
plt.ylabel(\"Pressure(MPa)\")
plt.savefig(\"P_C Diagram\")
plt.show()
plt.plot(crank,temperature)
plt.title(\'Temperature(K) vs Crank angle(Deg)\')
plt.xlabel(\"crank(Deg)\")
plt.ylabel(\"temperature(K)\")
plt.savefig(\"T_C Diagram\")
plt.show()


# Area under P_V diagram by using Trapezoidal rule
Area=np.trapz(pressure,volume)
workdone=Area*pow(10,6)          # we can multiply 10^6 to convert into joul
print(\"workdone = \"+str(workdone) +\" Joul\")


#Power Output
RPM=1500
speed=1500/60
Power=workdone*speed/1000
print(\"Power outpot = \"+str(Power)+\" KW\")

#Specific fuel Consumption
Fuel_mass=20*pow(10,-9)      #convert microgram into gram 
scf=(Fuel_mass/Power)*3600
print(\"Specific fuel Consumption = \"+str(scf)+\" Kg/kw-hr\") 

        

Basic performance calculation

  • Calculate the area under the P-V diagram. P is in column 2 and V is in column 8.
  • Calculate the power output of this engine. Assume that RPM is 1500
  • This engine consumed 20 micro grams of fuel (per 1 stroke cycle). Calculate its specific fuel consumption.

Note:- For calculating area under curve we use Trapezodial rule.

Results

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.