All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
AIM: DATA ANALYSIS USING PYTHON. Data analysis is the process of collecting and organizing data in order to draw helpful conclusions from it. The process of data analysis uses analytical and logical reasoning to gain information from the data. The main purpose of data analysis is to find meaning in data so that the derived…
NAVEEN SWAMI
updated on 25 May 2020
AIM: DATA ANALYSIS USING PYTHON.
Data analysis is the process of collecting and organizing data in order to draw helpful conclusions from it. The process of data analysis uses analytical and logical reasoning to gain information from the data. The main purpose of data analysis is to find meaning in data so that the derived knowledge can be used to make informed decisions. It is defined as a process of cleaning, transforming, and modelling data to discover useful information. The purpose of Data Analysis is to extract useful information from data and taking the decision based upon the data analysis.
Data Analysis consists of Data Requirement Gathering, Data Collection, Data Cleaning, Data Analysis, Data Interpretation, and Data Visualization.
OBJECTIVE:
GOVERNING EQUATION:
GIVEN: RPM = 1500 and engine consumes 20µ gm fuel per stroke cycle
PROGRAM:
import matplotlib.pyplot as plt
import numpy as np
import math
#initializing arrays and varaibles
column_no=[]
name=[]
unit=[]
results=[]
line_count=1
#reading data from txt file
try:
for line in open('engine_data.out'):
if line[0] == '#':
if line_count == 2:
line = line.split()[2::]
for value in line:
column_no.append(float(value))
if line_count == 3:
line=line.split()[1::]
for value in line:
name.append(value)
if line_count == 4:
line=line.split()[1::]
for value in line:
unit.append(value)
else:
line=line.split()
col=[]
for value in line:
col.append(float(value))
results.append(col)
line_count=line_count+1
#converting into useful form
data=[]
for i in range(0,len(column_no)):
col=[]
for j in range(0,len(results)):
col.append(results[j][i])
data.append(col)
#plotting all column_nos
for i in range(0,17):
plt.figure()
plt.plot(data[i],linewidth=4)
plt.ylabel(name[i] + ' ' + unit[i])
plt.savefig(name[i])
#plotting graphs between column_nos
a=8
b=2
plt.figure(18)
plt.plot(data[a-1],data[b-1],'*')
plt.xlabel(name[a-1] + ' ' + unit[a-1])
plt.ylabel(name[b-1] + ' ' + unit[b-1])
filename=name[b-1] + ' - ' + name[a-1]
plt.savefig(filename)
#area under curve
area = np.trapz(data[b-1],data[a-1])
print('Area under P-V: ',area)
#power calculation
rpm=1500/60
stroke_cycle=rpm/2
power = area*stroke_cycle*1000
print('power output of engine is :',str(power) + " KW")
#specific fuel consumption calculation
fuel=(20*pow(10,-6)*stroke_cycle*3600)/power
print('specific fuel consumption :',str(fuel) + ' kg/W.hr')
except:
print('File not recognized. Please provide a valid CONVERGE output file')
STEPS:
OUTPUT:
1. Auto-saving all plots
2. Plot between the pressure and volume columns (P-V diagram)
3. Compatibility Check:
4. Performance Check:
CONCLUSION:
Python is a very good tool for data analysis. A larger set of raw data can be visualized and processed for extracting useful information. The information extracted can be used for making crucial decisions by observing the behaviour of the data.
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
MBD Simulation on IC Engine Valve Train
AIM: MOTION ANALYSIS OF IC ENGINE VALVE TRAIN MECHANISM THEORY: Valve Train is a mechanical system in an IC engine that is responsible for controlling the intake and the exhaust of the combustion process. During the intake process, the intake valve opens to let air enter the combustion chamber and during the exhaust process,…
21 Jun 2020 08:00 AM IST
MOTION ANALYSIS OF IC ENGINE PISTON ASSEMBLY MECHANISM
AIM: MOTION ANALYSIS OF IC ENGINE PISTON ASSEMBLY MECHANISM. THEORY: In IC Engine, the combustion is driven by Slider Crank Mechanism. Inside the cylinder, the piston performs reciprocating motion which results in compression and expansion of gas inside the cylinder. This motion of the piston is guided by the Slider Crank…
18 Jun 2020 06:12 AM IST
MOTION ANALYSIS OF PLANETARY GEAR SYSTEM
AIM: MOTION ANALYSIS OF PLANETARY GEAR SYSTEM THEORY: A planetary gear mechanism also is known as Epicyclic Gear Train, is a gear mechanism consisting of 4 components, namely, sun gear A, several planet gears B, internal gear(ring gear) C and carrier D that connects planet gears as seen in the image below. It has a very…
11 Jun 2020 11:28 AM IST
MULTI-BODY DYNAMICS SIMULATION OF INTERNAL GENEVA MECHANISM IN SOLIDWORKS
AIM: MULTI-BODY DYNAMICS SIMULATION OF INTERNAL GENEVA MECHANISM IN SOLIDWORKS. THEORY: Geneva mechanism is the mechanism through which continuous rotation motion is converted into intermittent rotation motion. In this, the driver wheel rotates continuously and the driven wheel has rotation in regular intervals not continuously.…
02 Jun 2020 09:49 AM IST
Related Courses
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.