Академический Документы
Профессиональный Документы
Культура Документы
(*Input Variables*)
Module{t, Vt, Xde, Xdc, Xr, a, S, B, c, P, Ve, Vc, v, We, Wc, Wi, Li, e, Ptot, Pe, Pc},
(*Phase Angle*)
dx = 90;
(*Temperature Ratio*)
Tc
t= ;
Te
Vse
Ve[x_] = 1 - Cos[x] + Vde ;
2
(*Indicated Pressure*)
Pe = We * n;
Pc = Wc * n;
TextGrid[
{
{Style["Results for 100% Regenerator Efficiency", 18], SpanFromLeft},
{Style["Work of Expansion", 18],
Style["=", 18], Style[We, 18], Style["Joules", 18]},
{Style["Work of Compression", 18], Style["=", 18],
Style[Wc, 18], Style["Joules", 18]},
{Style["Total Work Done", 18, Red], Style["=", 18, Red],
Style[Wi, 18, Red], Style["Joules", 18, Red]},
{Style["Pressure", 18], Style["=", 18], Style[P[x], 18], Style["Pa", 18]},
{Style["Volume", 18], Style["=", 18], Style[Vt[x], 18], Style["m^3", 18]},
{Style["Power", 18, Red],
Style["=", 18, Red], Style[Ptot, 18, Red], Style["W", 18, Red]},
Stirling Simulation.nb 3
}, Frame → All]
(*This code below calculates the change in pressure and volume as the
crank rotates from 0 to 90 degrees and displays the PV diagram*)
GraphicsGridShow
ParametricPlot[{Vt[a], P[a]}, {a, 0, 90},
PlotRange → Directive[Red, Thick], Exclusions → None],
Axes → False, Frame → True, PlotRangePadding → Scaled[0.1],
FrameLabel → "Volume (m3 )", "Pressure (Pa)", AspectRatio → 1,
Epilog → Dynamic[{PointSize[0.05], Black, Point[{Vt[x], P[x]}]}],
LabelStyle → 14, ImageSize → 400, FrameLabel → Automatic, GridLines →
{{0.00155, 0.00364}, {}}, GridLinesStyle → Directive[Black, Thick],
(*Crank Mechanism*)
Opacity[0.8], Gray, Cylinder[{{0.2, 0, 0}, {0.4, 0, 0}}, .65],
Opacity[0.8], Gray, Cylinder[{{- 0.2, 0, 0}, {- 0.4, 0, 0}}, .65],
4 Stirling Simulation.nb
(*Crank Shafts*)
Opacity[0.8], Gray, Cylinder[{{- 0.4, 0, 0}, {- 0.8, 0, 0}}, .2],
Opacity[0.8], Gray, Cylinder[{{0.4, 0, 0}, {0.7, 0, 0}}, .2],
(*Flywheel*)
Opacity[0.8], Gray, Cylinder[{{- 0.8, 0, 0}, {- 1.1, 0, 0}}, 1],
π π
Gray, Cylinder- 0.8, - .8 Sinx - , 0.8 Sinx + ,
4 4
π π
- 1.1, - 0.8 Sinx - , 0.8 Sinx + , .1,
4 4
(*Crank Pin*)
π π
Gray, Cylinder0.4, - .5 Sinx - , .5 Sinx + ,
4 4
π π
- 0.4, - .5 Sinx - , .5 Sinx + , .1,
4 4
(*Regenerator*)
Opacity[0.8], Blue, Cylinder[{{0, - .5, 2.2}, {0, .5, 2.2}}, .2],
(*Connecting Pipes*)
Opacity[0.2], Red, Tube[BSplineCurve[
{{0, - 1.5, 1.6}, {0, - 2, 2.4}, {0, - 1.6, 2.1}, {0, - .5, 2.2}}, 0.1]],
Opacity[0.2], Blue, Tube[BSplineCurve[{{0, 1.5, 1.6},
{0, 2, 2.4}, {0, 1.6, 2.1}, {0, .5, 2.2}}, 0.1]],
(*Cylinder 1*)
Opacity[0.2], Blue, Cylinder[{{0, .62, .75}, {0, 1.48, 1.6}}, 0.41],
(*Cylinder 2*)
Opacity[0.2], Red, Cylinder[{{0, - .62, .75}, {0, - 1.48, 1.6}}, 0.41]
(*Gray, Cuboid0,0,0.1,1,3,2*)
, PlotRange → {{- 1, 1}, {- 2, 2}, {- 1, 2.5}},
ViewPoint → {6, 0, 2}, ImageSize → {350, 350}
,
Stirling Simulation.nb 5
Revolutions 0.658607