Challenge

Week 2 Air standard Cycle

AIM : To calculate the drag force against a cyclist.

Objective : The factors involved are Velocity,Drag coefficient,Frontal Area,Density of air.

    • Write a program to plot Velocity vs Drag force.
    • Write a program to plot Drag Co-efficient vs Drag force.
  • The Air standard cycle assumptions are as follows:-
    • Air is considered as working fluid.
    • Air has constant specific heat.
    • Air behave as ideal gas.
    • All processes in cycle as internally reversible.
    • For air Change in K.E.= 0, Change in P.E.= 0
    • No internal heat generation.
    • heat is added & rejected externally.
    • The cycle is closed & processes are non-flow processes.
    • There is no frictional losses.

Program/Code :


"""
# Air standard Cycle
"""
import math
import matplotlib.pyplot as plt

# Inputs
P1 = 101325
T1 = 300
Gamma = 1.4
T3 = 2800

# Geometric parameters
Bore = 0.1
Stroke = 0.1
Connecting_rod = 0.15
CR = 12

# Volume computatin - state 1
Vs = (math.pi/4)*pow(Bore,2)*Stroke
Vc = Vs/(CR-1)
V1 = Vc + Vs

# state 2
V2 = Vc

# P2V2^Gamma = P1V1^Gamma
P2 = P1*pow(V1,Gamma)/pow(V2,Gamma)

# P2V2/T2 = P1V1/T1 | rhs = P1V1/T1 | P2V2/T2 = rhs | T2 = P2V2/rhs
rhs = P1*V1/T1
T2 = P2*V2/rhs

# state 3
V3 = V2

# P3V3/T3 = P2V2/T2 | rhs = P2V2/T2 | P3 = rhs*T3/V3
rhs = P2*V2/T2
P3 = rhs*T3/V3

# state 4
V4 = V1

# P2V2^Gamma = P1V1^Gamma
P4 = P3*pow(V3,Gamma)/pow(V4,Gamma)

# P4*V4/T4 = rhs
T4 = P4*V4/rhs

plt.plot([V1,V2,V3,V4,V1],[P1,P2,P3,P4,P1])
plt.xlabel('Volume (m^3)')
plt.ylabel('Presser (Pa)')
plt.title("Presser Vs Volume (PV) Diagram")

plt.show()

# Efficiency
n_eff = 1 - (T1/T2)

# n_eff in Percentage
Pn_eff = n_eff*100

print(Pn_eff )
print("in Percentage")


# End of the code
# Thank you

Result / Output Of the code :

Efficiency :- 0.62 or 62.98928275128466% in Percentage

Figure - PV Diagram

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.