homework T06.3, a) and b)
a)
the code is:
import numpy as np
import matplotlib.pyplot as plt
R=8.314
T=300
N=1
Va=1
Vb=2*Va
g=5/3
Pa=N*R*T/Va
Pb=Pa*(Va**g)/(Vb**g)
l=np.arange(0,1,0.001)
P1=l*Pb+(1-l)*Pa
V1=l*Vb+(1-l)*Va
V2=np.zeros(1000)
P2=np.zeros(1000)
for i in range (0,len(V2)):
V2[i]=Vb-i/1000
P2[i]=Pa*(Va**g)/(V2[i]**g)
c=P1[500]*(V1[500])**g
V3=np.zeros(1000)
P3=np.zeros(1000)
for i in range (0,len(V2)):
V3[i]=Vb-i/1000
P3[i]=c/(V3[i]**g)
plt.plot(V1,P1)
plt.plot(V2,P2)
plt.plot(V3,P3)
plt.plot(V1[500],P1[500],"o")
plt.show()
and the plot is:
pd: i'm sorry i don't know how to pass some latex to html so i put it like images
the code is:
import numpy as np
import matplotlib.pyplot as plt
R=8.314
T=300
N=1
Va=1
Vb=2*Va
g=5/3
Pa=N*R*T/Va
Pb=Pa*(Va**g)/(Vb**g)
l=np.arange(0,1,0.001)
P1=l*Pb+(1-l)*Pa
V1=l*Vb+(1-l)*Va
V2=np.zeros(1000)
P2=np.zeros(1000)
for i in range (0,len(V2)):
V2[i]=Vb-i/1000
P2[i]=Pa*(Va**g)/(V2[i]**g)
c=P1[500]*(V1[500])**g
V3=np.zeros(1000)
P3=np.zeros(1000)
for i in range (0,len(V2)):
V3[i]=Vb-i/1000
P3[i]=c/(V3[i]**g)
plt.plot(V1,P1)
plt.plot(V2,P2)
plt.plot(V3,P3)
plt.plot(V1[500],P1[500],"o")
plt.show()
and the plot is:
pd: i'm sorry i don't know how to pass some latex to html so i put it like images




Hi, for the equations, you can use this: https://www.codecogs.com/latex/eqneditor.php?lang=es-es there you can write the equations with latex and that gives you an image.
ResponderBorrarThe limits of the integrals where you calculate the heat absorbed from and the heat delivered to the environment are correct. But the integral itself you should evaluate in terms of {V_A, p_A, V_C, p_C, V_B, P_B}. This would have resulted in much simpler expressions.
ResponderBorrarPlease remember that, when you are doing some calculation, simplicity is an important aspect. The more complicated an expression, the more likely it is that it is wrong. So keeping expressions simple is absolutely vital for being able to produce exact results.