All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
AIM: DATA VISUALIZATION, COMPATIBILITY CHECK, AND BASIC PERFORMANCE CALCULATION USING PYTHON. INTRODUCTION: Data analysis is a process of inspecting, cleansing, transforming, and modeling data with the goal of discovering useful information, informing conclusions, and supporting decision-making. Data analysis has…
Sidharth Kalra
updated on 12 Jul 2020
AIM: DATA VISUALIZATION, COMPATIBILITY CHECK, AND BASIC PERFORMANCE CALCULATION USING PYTHON.
INTRODUCTION: Data analysis is a process of inspecting, cleansing, transforming, and modeling data with the goal of discovering useful information, informing conclusions, 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.
The process of data analysis: -
OBJECTIVE:
GOVERNING EQUATIONS:
where,
T= Torque
FC= Fuel Consumption
SFC= Specific Fuel Consumption
PYTHON PROGRAM:
""" Data Analysis of Port fuel Injection data obtained using Converge """ # Importing required modules import numpy as np import matplotlib.pyplot as plt from scipy.integrate import simps # Code for successful file opening and reading try: open('engine_data.out') print('File opened successfully') print('\n') except: print('File not recognized. Please provide a valid CONVERGE output file') else: line_count = 1 column_num = [] column_name = [] column_units = [] # Empty arrays for values to be stored according to the varibles to be plotted X = [] Y = [] # The axes values defined according to the column number of the Converge output file x = 7 y = 1 for line in open('engine_data.out'): for i in range(0,19): if i >= 2: if line_count == 2: column_num.append(int(line.split()[i])) for j in range(0,18): if j>=1: if line_count == 3: column_name.append(line.split()[j]) elif line_count == 4: column_units.append(line.split()[j]) if '#' not in line: if line_count >= 6: X.append(float(line.split()[x])) Y.append(float(line.split()[y])) line_count = line_count + 1 # Plotting Graphs plt.figure() plt.plot(X, Y, linewidth=2, color = 'blue') plt.title(str(column_name[y]) + ' vs ' + str(column_name[x])) plt.xlabel(str(column_name[x]) + str(column_units[x])) plt.ylabel(str(column_name[y]) + str(column_units[y])) plt.savefig(str(column_name[y]) + ' vs ' + str(column_name[x]) + 'for Engine') plt.show() # The Results are as follows: print('RESULTS: -') # Area under curve area = simps(Y,X)*pow(10,6) print('Area under PV diagram (Joule) = ' + str(area) + ' J') # RPM N = 1500 # Fuel Consumption (g/stroke cycle) m = 20 # No. of Strokes s = 4 # No. of Cylinders c = 1 # 1 Power Cycle for every Two revolutions (constant for purpose) k = 2 power = (c*area*N)/(60*k*1000) print('Power output = ' + str(power) + ' kW') # Fuel Consumption (kg/hr) FC = N*60*m*pow(10,-9)/2 # Specific Fuel Consumption SFC = FC/power print('Specific Fuel Consumption = ' + str(SFC) + ' kg/hr/kW')
EXPLANATION OF PROGRAM:
RESULTS:
Area under PV Diagram = 500.587 J
Power Output = 6.257 kW
Specific Fuel Consumption = 0.0001438 kg/hr/kW
PLOTS:
PRESSURE VS VOLUME -
A typical Pressure vs Volume graph depicting the isentropic and isobaric processes.
PRESSURE VS CRANK ANGLE -
The Pressure reaches its peak at Crank angle slightly higher than 0.
VOLUME VS CRANK ANGLE -
The Volume varies as the Piston reciprocates to and fro thereby varying the Crank Angle.
Similarly, graphs for other parameters can be plotted by varying the "x & y values" which correspond to the column no. for the specific parameter.
CONCLUSION: The above analysis gives an elaborative idea of the file extraction and plotting the values with respect to one another. Also, the necessary performance parameters are calculated for development use.
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...
DATA ANALYSIS (PYTHON)
AIM: DATA VISUALIZATION, COMPATIBILITY CHECK, AND BASIC PERFORMANCE CALCULATION USING PYTHON. INTRODUCTION: Data analysis is a process of inspecting, cleansing, transforming, and modeling data with the goal of discovering useful information, informing conclusions, and supporting decision-making. Data analysis has…
12 Jul 2020 03:37 PM IST
CURVE FITTING (PYTHON)
AIM: TO PERFORM CURVE FITTING FOR THE GIVEN TEMPERATURE AND CP DATA IN PYTHON THEORY: Curve fitting is the process of constructing a curve, or mathematical function, that has the best fit to a series of data points, possibly subject to constraints. Curve fitting can involve either interpolation, where an exact fit…
09 Jul 2020 08:37 PM IST
BREAKING ICE WITH AIR CUSHIONED VEHICLE - FINDING MINIMUM PRESSURE WITH NEWTON-RAPHSON METHOD
AIM: TO CALCULATE THE MINIMUM PRESSURE OF AN ICE BREAKING AIR CUSHION VEHICLE USING NEWTON-RAPHSON METHOD THEORY: A hovercraft, also known as an air-cushion vehicle or ACV, is an amphibious craft capable of traveling over land, water, mud, ice, and other surfaces. Hovercraft use blowers to produce a large volume…
09 Jul 2020 03:04 PM IST
SOLVING SECOND ORDER ODE'S
AIM: TO SIMULATE THE TRANSIENT BEHAVIOUR OF A SIMPLE PENDULUM AND TO CREATE AN ANIMATION OF IT’S MOTION USING PYTHON THEORY: In Engineering, ODE is used to describe the transient behavior of a system. A simple example is a pendulum. The way the pendulum moves depends on Newton's second law. When this law is…
07 Jul 2020 09:03 PM 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.