Steam Engine Design/Free Piston Steam Hydraulic/SpiceCode
LTSpice IV code for Free Piston Steam Engine simulation
FreePiston.asc 20-Nov-2011
Version 4 SHEET 1 2028 680 WIRE 1072 -480 1008 -480 WIRE 1120 -480 1072 -480 WIRE 1008 -448 1008 -480 WIRE 1520 -400 1424 -400 WIRE 1728 -400 1520 -400 WIRE 1744 -400 1728 -400 WIRE 1760 -352 1744 -352 WIRE 1008 -336 1008 -368 WIRE 1424 -320 1424 -400 WIRE 1520 -320 1520 -400 WIRE 1744 -320 1744 -352 WIRE 448 -288 336 -288 WIRE 1088 -288 1008 -288 WIRE 1008 -272 1008 -288 WIRE 336 -256 336 -288 WIRE 1520 -208 1520 -240 WIRE 1744 -208 1744 -240 WIRE 1008 -176 1008 -192 WIRE 336 -144 336 -176 WIRE 992 -96 944 -96 WIRE 1008 -96 992 -96 WIRE 448 -64 448 -288 WIRE 1008 -64 1008 -96 WIRE 64 -48 -32 -48 WIRE 288 -48 192 -48 WIRE 400 -48 288 -48 WIRE 1152 -48 1056 -48 WIRE 1168 -48 1152 -48 WIRE 1424 -48 1424 -256 WIRE 1424 -48 1168 -48 WIRE 1424 -32 1424 -48 WIRE 1744 -32 1424 -32 WIRE 400 0 384 0 WIRE 1088 0 1056 0 WIRE 384 16 384 0 WIRE -32 32 -32 -48 WIRE 1152 32 1152 -48 WIRE 1744 32 1744 -32 WIRE 1696 48 1584 48 WIRE 128 64 128 32 WIRE 1008 64 1008 16 WIRE 448 80 448 16 WIRE 832 80 448 80 WIRE 896 80 832 80 WIRE 960 80 896 80 WIRE 1424 112 1424 -32 WIRE 1696 128 1696 96 WIRE -32 144 -32 112 WIRE 1152 160 1152 112 WIRE 1584 160 1584 48 WIRE 1744 160 1744 112 WIRE 896 176 896 80 WIRE 960 176 960 128 WIRE 1088 176 1088 0 WIRE 1088 176 960 176 WIRE 1088 192 1088 176 WIRE 448 272 448 80 WIRE 1424 272 1424 176 WIRE 224 288 -112 288 WIRE 400 288 224 288 WIRE 1088 288 1088 272 WIRE 1008 304 1008 144 WIRE 1584 304 1584 240 WIRE 400 336 384 336 WIRE 896 336 896 240 WIRE 384 352 384 336 WIRE -112 368 -112 288 WIRE 448 400 448 352 WIRE 1008 448 1008 384 WIRE -112 480 -112 448 WIRE 448 512 448 480 WIRE 1008 560 1008 528 FLAG 448 512 0 FLAG 336 -144 0 FLAG 832 80 CYL_PR FLAG 1424 272 0 FLAG 1744 160 0 FLAG 1520 -208 0 FLAG 1168 -48 HYDR_PR FLAG 1008 560 0 FLAG 992 -96 NET_FORCE FLAG 896 336 0 FLAG 384 16 0 FLAG 384 352 0 FLAG 1696 128 0 FLAG 1152 160 0 FLAG 1008 -336 0 FLAG 1072 -480 CYL_POSN FLAG 224 288 exh_open FLAG 288 -48 inlet_open FLAG 1584 304 0 FLAG -32 144 0 FLAG 128 64 0 FLAG -112 480 0 FLAG 1008 -176 0 FLAG 1088 -288 CYL_VELOC FLAG 1728 -400 H_OUT FLAG 1088 288 0 FLAG 1744 -208 0 FLAG 1744 -352 AVG_FLOW SYMBOL voltage 336 -272 R0 WINDOW 3 -128 105 Left 2 SYMATTR Value {Pb + Patm} SYMATTR InstName V1 SYMBOL sw 448 368 M180 WINDOW 3 9 106 Left 2 SYMATTR InstName S1 SYMATTR Value SteamExh SYMBOL sw 448 32 M180 SYMATTR InstName S2 SYMATTR Value SteamIn SYMBOL diode 1440 -256 R180 WINDOW 0 24 64 Left 2 WINDOW 3 24 0 Left 2 SYMATTR InstName D1 SYMATTR Value OutCheck SYMBOL diode 1440 176 R180 WINDOW 0 24 64 Left 2 WINDOW 3 24 0 Left 2 SYMATTR InstName D2 SYMATTR Value SuctionCheck SYMBOL sw 1744 128 M180 SYMATTR InstName S3 SYMATTR Value SuctionValve SYMBOL voltage 1520 -336 R0 WINDOW 123 0 0 Left 2 WINDOW 39 24 44 Left 2 SYMATTR InstName V2 SYMATTR Value {Pacc+Patm} SYMBOL e 1008 48 R0 WINDOW 3 12 103 Left 2 SYMATTR InstName E1 SYMATTR Value {Asp} SYMBOL e 1008 -80 M0 SYMATTR InstName E2 SYMATTR Value {-Ahp} SYMBOL cap 880 176 R0 WINDOW 3 -413 4 Left 2 SYMATTR InstName C1 SYMATTR Value Q={Rbp*pow(Ahp*V(cyl_posn),gam)*x} SYMATTR Value2 ic=0 SYMBOL bi 1152 32 R0 WINDOW 0 10 -22 Left 2 WINDOW 3 11 100 Left 2 SYMATTR InstName B2 SYMATTR Value I=-Ahp*V(cyl_veloc) SYMBOL voltage 448 384 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V6 SYMATTR Value {Pc+Patm} SYMBOL bv 1008 -464 R0 SYMATTR InstName B1 SYMATTR Value V={ idt(V(cyl_veloc),Drb)} SYMATTR Value2 ic=0 SYMBOL bv 1584 144 R0 SYMATTR InstName B3 SYMATTR Value V=V(cyl_posn)<Dh SYMBOL voltage 1008 432 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V8 SYMATTR Value {-Ag*Mp} SYMBOL bv 1008 288 R0 SYMATTR InstName B4 SYMATTR Value V=if(V(cyl_posn)<Drb,-(V(cyl_posn)-Drb)*Krb,0) SYMBOL bv -32 16 R0 SYMATTR InstName B5 SYMATTR Value V=V(cyl_posn)<10m SYMBOL local\\Monostable 128 -16 R0 WINDOW 39 20 66 Left 2 SYMATTR InstName X2 SYMATTR SpiceLine width=Tco SYMBOL bv -112 352 R0 SYMATTR InstName B6 SYMATTR Value V=(V(cyl_veloc)<0.1)&(V(cyl_posn)>50m) SYMBOL bv 1008 -288 R0 SYMATTR InstName B7 SYMATTR Value V=idt(V(net_force))/Mp SYMBOL voltage 1088 176 R0 WINDOW 3 35 62 Left 2 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V3 SYMATTR Value {Patm} SYMBOL bv 1744 -336 R0 SYMATTR InstName B8 SYMATTR Value V=idt(I(V2))/time TEXT 680 216 Left 2 ;steam expansion TEXT 328 256 Left 2 ;exh valve TEXT 464 -104 Left 2 ;inlet valve TEXT -792 -424 Left 2 !.param Ahp=2.5e-4; area of hydraulic piston in m^2 TEXT -792 -456 Left 2 !.param Asp=.005; area of steam piston in m^2 TEXT -792 248 Left 2 !.model SteamIn SW(Ron=Rsv, Vt=0.5) TEXT -792 280 Left 2 !.model SteamExh SW(Ron=Rsv, Vt=0.5) TEXT -792 312 Left 2 !.model OutCheck D(Ron=1 Roff=1e16) TEXT -792 344 Left 2 !.model SuctionCheck D(Ron=1) TEXT -792 376 Left 2 !.model SuctionValve SW(Ron=1, Vt=0.5) TEXT -792 424 Left 2 !.tran 2 uic TEXT -792 -392 Left 2 !.param Mp=40; moving mass of piston in kg TEXT -792 -360 Left 2 !.param Pb=400kPa; boiler pressure (gage) in Pa TEXT -792 -264 Left 2 !.param Patm=100kPa; atm pressure in Pa TEXT -792 -296 Left 2 !.param Pc=-50kPa; condenser pressure (gage) in Pa TEXT -792 -232 Left 2 !.param Pacc=10MegPa; hydraulic accumulator pressure (gage) in Pa TEXT -792 -200 Left 2 !.param Ag=9.86; accel of gravity in m/s^2 TEXT 1048 480 Left 2 ;piston deadweight TEXT 1048 344 Left 2 ;piston bottom rebound stop TEXT -792 -168 Left 2 !.param Drb=10mm; rebound stop distance in m TEXT -792 -136 Left 2 !.param Krb=1meg; rebound spring stiffness in N/m TEXT -792 -104 Left 2 !.param gam=1.3; adiabatic expansion exponent (gamma) TEXT 288 -232 Right 2 ;Boiler\npressure TEXT 512 416 Left 2 ;Condenser\npressure TEXT 1192 40 Left 2 ;hydraulic fluid\nvolumetric\ndisplacement TEXT 1616 280 Left 2 ;hydraulic free-flow\ncontrol logic TEXT 1480 -424 Left 2 ;hydraulic output TEXT 648 32 Left 2 ;steam side pressure TEXT 1080 -96 Left 2 ;hydraulic side pressure TEXT -16 -120 Left 2 ;inlet valve\ncontrol logic TEXT -48 384 Left 2 ;exhaust valve\ncontrol logic TEXT -792 -328 Left 2 !.param Rbp=2.3; steam density at boiler pressure in kg/m^3 TEXT -792 -72 Left 2 !.param Rsv=2000; pressure drop at steam valves in Pa/(kg/s) TEXT -792 -40 Left 2 !.param Tco=40ms; inlet valve cutoff in seconds TEXT 504 104 Left 2 ;"current" = mass flow in kg/s TEXT 688 152 Left 2 ;"charge" Q in kg TEXT -792 -8 Left 2 !.param Dh=100mm; hydraulic engagement distance in m TEXT 8 -616 Left 5 ;Vertical Free-Piston Steam Engine with Hydraulic Load TEXT 1264 -560 Left 2 ;20-Nov-2011
monostable.asc 20-Nov-2011
Version 4 SHEET 1 936 680 WIRE 368 -80 272 -80 WIRE 272 -64 272 -80 WIRE 368 32 368 -80 WIRE -160 48 -208 48 WIRE 32 48 -64 48 WIRE 160 48 96 48 WIRE 224 48 160 48 WIRE 320 48 224 48 WIRE 752 48 608 48 WIRE 160 80 160 48 WIRE 224 80 224 48 WIRE 320 96 304 96 WIRE -160 112 -160 48 WIRE -64 128 -64 48 WIRE 368 144 368 112 WIRE 432 144 368 144 WIRE 464 144 432 144 WIRE 608 144 608 48 WIRE 464 160 464 144 WIRE 368 176 368 144 WIRE -160 256 -160 192 WIRE -160 256 -208 256 WIRE -64 256 -64 208 WIRE -64 256 -160 256 WIRE 160 256 160 144 WIRE 160 256 -64 256 WIRE 224 256 224 160 WIRE 224 256 160 256 WIRE 272 256 272 16 WIRE 272 256 224 256 WIRE 304 256 304 96 WIRE 304 256 272 256 WIRE 368 256 368 240 WIRE 368 256 304 256 WIRE 464 256 464 240 WIRE 464 256 368 256 WIRE 608 256 608 224 WIRE 608 256 464 256 FLAG -208 48 TR FLAG -208 256 G FLAG 752 48 OUT FLAG 432 144 Vt SYMBOL cap 96 32 R90 WINDOW 0 0 32 VBottom 2 WINDOW 3 32 32 VTop 2 SYMATTR InstName C1 SYMATTR Value 10n SYMBOL diode 176 144 R180 WINDOW 0 24 64 Left 2 WINDOW 3 24 0 Left 2 SYMATTR InstName D1 SYMBOL res 208 64 R0 SYMATTR InstName R1 SYMATTR Value 1k SYMBOL sw 368 128 M180 SYMATTR InstName S1 SYMBOL cap 352 176 R0 SYMATTR InstName C2 SYMATTR Value 1µ SYMBOL res 448 144 R0 SYMATTR InstName R2 SYMATTR Value {width*1Meg} SYMBOL voltage 272 -80 R0 WINDOW 123 0 0 Left 2 WINDOW 39 0 0 Left 2 SYMATTR InstName V1 SYMATTR Value 1 SYMBOL bv 608 128 R0 SYMATTR InstName B1 SYMATTR Value V={if(V(Vt)>exp(-1),1,0)} SYMBOL bv -64 112 R0 SYMATTR InstName B2 SYMATTR Value V=V(TR)>0.5 SYMBOL res -176 96 R0 SYMATTR InstName R3 SYMATTR Value 100K TEXT -24 176 Left 2 !.model D D(Ron=1) TEXT -168 -48 Left 2 !.param width=200m TEXT 400 -8 Left 2 !.model SW SW(Vt=0.8)
monostable.asy 20-Nov-2011 (one-shot symbol)
Version 4 SymbolType BLOCK RECTANGLE Normal 64 48 -64 -48 TEXT -50 -3 Left 2 one-shot PIN -64 -32 LEFT 8 PINATTR PinName TR PINATTR SpiceOrder 1 PIN 64 -32 RIGHT 8 PINATTR PinName OUT PINATTR SpiceOrder 2 PIN 0 48 BOTTOM 8 PINATTR PinName G PINATTR SpiceOrder 3