Project

Data Analysis of the Engine data for Finding Work Done Power Output and Specific Fuel consumption of the Vehicle

Introduction:

Data analysis is a process of inspecting, cleansing, transforming and modeling data with the goal of discovering useful information, informing conclusion and supporting decision-making. Data analysis has multiple facets and approaches, encompassing diverse techniques under a variety of names, and is used in different business, science, and social science domains. In today\'s business world, data analysis plays a role in making decisions more scientific and helping businesses operate more effectively.

Wrangling your data into a format you can use and fixing any problems with it.

Exploring the data, finding patterns in it, and building your intuition about it.

Drawing conclusions and/or making predictions.

Communicating your findings.

Here we have the data of an port fuel injector simulation , engine_data.out is the data file we have.

The below image is the sample of the data we have to analyse the data.

\"\"

THe python code for the above Data analysis :

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

#checking the compatibility of the file input
try:
	open(\'engine_data.out\')
except FileNotFoundError:
	print(\'File not recognized. Please provide a valid CONVERGE output file\')
	

linecount = 1
parameters = []

#extract the values of the parameters
linecount = 1
for line in open(\'engine_data.out\'):
	if linecount == 3:
		parameter = line.split()
		parameters.append(parameter)
	linecount = linecount+1

print(parameters[0][1:18])

#showing the parameters  along with the their column no
for i in range(1,18):
	print(i,parameter[i])

x = int(input(\'index of the parameter required in x_axis: \'))
y = int(input(\'index of the parameter required in y_axis: \'))


if x<1 or x>17 or y<1 or y>17:
	print(\'enter the valid index, provided in the list\')


X=[]
Y=[]

ct = 0
#extracting the column of the input of the user
for line in open(\'engine_data.out\',\'r\'):
	if line == 3:
		x_parameter = line.split()[x]
		y_parameter = line.split()[y]


	if \'#\' not in line:
			X.append(float(line.split()[x-1]))
			Y.append(float(line.split()[y-1]))

	ct = ct+1

#plotting 
plt.figure()
plt.plot(X,Y)
plt.xlabel(parameter[x])
plt.ylabel(parameter[y])
plt.savefig(parameter[x] + \'vs\' + parameter[y]+\'.png\')
plt.show()



#basic performance calculatiion

#area under the P-V diagram
area = np.trapz(Y,X)
print(\'Area under the curve= \',area)

#Calculating the power output this engine
power = 1000*area*1500/60
print(\'Power output= \',power)

#calculating the specific fuel cosumption
sfc = (20*3600*pow(10,-6))/(0.08*power)
print(\'Specific fuel consumption= \',sfc)



Explanation of the code:

Importing math. To perform the calculations, matplotlib.pyplot to plot the graph, numpy to to perform the area under the curve

Here we extract the parameter name which is in line 3 of the data, we use split command to split the data in the line, in whose columns the data is stored.

There are 17 columns of the data, we extract the parameter name and display it . then ask the user to enter the index of the respective parameters as the input required in x-axis and in y-axis.

Then I have written the code to extract the values of that parameter and plot the graph of those parameter as per the user entered index for x and y axis.

Performing the basic calculation as asked in the ,area under the P-V diagram,

Power output of the engine, and specific fuel consumption of the engine.

The output of the above programme:

\"\"

The graph plot of the above programe is :

\"\"

The plot of the pressure vs crank is :

\"\"

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.