n=1.0; R=0.082057338;Th=1000;Tc=300;Vmin=1;Vmax=10;C1=0;C2=Pi;C3=Pi+0.2;C4=2Pi-0.2;C5=2Pi;Cv=5/2;

ph[V_]:=((n R Th)/(V+1));pc[V_]:=((n R Tc)/(V+1));

point[t_]:=({{\[Piecewise], ({{{Rescale[t,{C1,C2},{Vmin,Vmax}],ph[Rescale[t,{C1,C2},{Vmin,Vmax}]]}, C1<=t<C2}, {{Vmax,Rescale[t,{C2,C3},{ph[Vmax],pc[Vmax]}]}, C2<=t<=C3}, {{Rescale[t,{C3,C4},{Vmax,Vmin}],pc[Rescale[t,{C3,C4},{Vmax,Vmin}]]}, C3<t<C4}, {{Vmin,Rescale[t,{C4,C5},{pc[Vmin],ph[Vmin]}]}, C4<=t<=C5}})}})

PV[t_]:=Plot[{pc[V],ph[V]},{V,Vmin,Vmax},ColorFunction->Function[{x,y},ColorData["TemperatureMap"][1-x]],Epilog ->{PointSize[0.015],Gray,Point[point[t]]},Prolog->{{Thick,,Line[{{Vmin,ph[Vmin]},{Vmin,pc[Vmin]}}]},{Thick,,Line[{{Vmax,ph[Vmax]},{Vmax,pc[Vmax]}}]}},PlotStyle->{{Thick,Black},{Thick,Black}},PlotTheme->"Scientific",PlotLabel->"P-V diagram",FrameLabel->"Stirling Cycle",Frame->True,PlotRange->{{0,Vmax+1},All},ImageSize->Medium,FrameTicksStyle->Directive[FontOpacity->0,FontSize->0]];
PV1[t_]:=Plot[{pc[V],ph[V]},{V,Vmin,Vmax},ColorFunction->Function[{x,y},ColorData["TemperatureMap"][1-x]],Epilog ->{PointSize[0.015],Gray,Point[point[t]]},Prolog->{{Thick,,Line[{{Vmin,ph[Vmin]},{Vmin,pc[Vmin]}}]},{Thick,,Line[{{Vmax,ph[Vmax]},{Vmax,pc[Vmax]}}]}},PlotStyle->{{Thick,Black},{Thick,Black}},PlotTheme->"Scientific",PlotLabel->"P-V diagram",FrameLabel->"Stirling Cycle",Frame->True,PlotRange->{{0,Vmax+1},All},ImageSize->Medium]

pumpFrame = {
FaceForm[Gray],EdgeForm[Black],
Disk[{0,2},0.36],
Disk[{0,2}, 0.1],
Red,
Rectangle[{-.5,-.7},{-.6,-.15},RoundingRadius->.02],
Rectangle[{.5,-.7},{.6,-.15},RoundingRadius->.02],
Blue,
Rectangle[{-.5,-.7+1.2},{-.6,-.15+1.2},RoundingRadius->.02],
Rectangle[{.5,-.7+1.2},{.6,-.15+1.2},RoundingRadius->.02],
RGBColor[.3,.3,.3],
EdgeForm[Black],
Rectangle[{-.5,-.75},{-.45,0.35+1}],
Rectangle[{.5,-.75},{.45,0.35+1}],
Rectangle[{-.5,-.75},{.5,-.7}]
};

Stir[t_]:=Graphics[{Polygon[{{-.45,-.75},{.45,-.75},{.45,.3Sin[t]+1},{-.45,.3Sin[t]+1}},VertexColors->{Red,Red,Blue,Blue}],
EdgeForm[{Black,Thick}],
Gray,
Rotate[Rectangle[{.3Cos[t - Pi]*.87-0.05,.3Sin[t]+0.9},{.3Cos[t - Pi]*.87+0.05,.3Sin[t ]+2.05},RoundingRadius->0.03],-0.3Cos[t-Pi]*.87,{.3Cos[t - Pi]+0.05,.3Sin[t ]+2.00}],
Blue,
Rectangle[{-0.45, -0.37+.3Sin[t]+1},{0.45,0+.3Sin[t]+1}],
Gray,
Rotate[Disk[{.3Cos[t - Pi]*.87,.3Sin[t]+2.},0.005],-0.3Cos[t-Pi]*.87,{.3Cos[t - Pi]+0.05,.3Sin[t ]+2.00}],
Rotate[Disk[{0,.3Sin[t]+.95},0.005],0,{.3Cos[t - Pi]+0.05,.3Sin[t ]+2.00}],pumpFrame,
EdgeForm[{Black,Thick}],

Rotate[Rectangle[{.3Cos[t - Pi+Pi/2]*.5 -0.05,.3Sin[t+Pi/2]-.1},{.3Cos[t - Pi+Pi/2]*.5+0.05,.3Sin[t +Pi/2]+2.05},RoundingRadius->0.03],-0.3Cos[t-Pi+Pi/2]*.5],
RGBColor[Red],
Rectangle[{-0.4, -0.37+.3Sin[t+Pi/2]},{0.4,0+.3Sin[t+Pi/2]},RoundingRadius->0.03],
Rotate[Disk[{.3Cos[t - Pi+Pi/2],.3Sin[t+Pi/2]+2.},0.005],-0.3Cos[t-Pi+Pi/2],{.3Cos[t - Pi+Pi/2],.3Sin[t+Pi/2]+2}],
Disk[{0,.3Sin[t+Pi/2]-0.05},0.005]

} ,ImageSize->Medium]

Str1[t_]:=Stir[t-Pi/2]

work[Vmax_,Vmin_]:=Integrate[ph[V]+pc[V],{V,Vmin,Vmax}];eff[Tc_,Th_]:=1-(Tc/Th);

Animate[PV[t],{t,C1,C5,AnimationRate->0.5}]

Animate[Str1[t],{t,C1,C5,AnimationRate->0.5}]

Manipulate[Grid[{{PV1[t],Str1[t]},{Text[Style[Row[{"Efficiency:"}]]] Text[Style[Row[{eff[Tc,Th]*100, " %"}]]]},{Text[Style[Row[{"Work per cycle:"}]]] Text[Style[Row[{work[Vmax,Vmin], " J"}]]]}}],{Vmin,1,Vmax-1},{{Vmax,10},Vmin+1,40},{{Tc,300},300,500},{{Th,1000},Tc+1,2000},Control[{{t,0,"cycle progress"},C1,C5,Animator, AnimationRunning->False,AnimationRate->.5}]]