86 lines
1.8 KiB
Plaintext
86 lines
1.8 KiB
Plaintext
# H2/O2 Volume Pump Gas Mixer
|
|
|
|
# Uses 2 Volume pumps instead of a gas mixer
|
|
# No need to worry about temperatures throwing...
|
|
#...mix ratios off. -Prevents Over pressure.
|
|
# You will need 1 Pipe Analyser and 2 Volume pumps.
|
|
|
|
alias H2o2Analyser d0
|
|
alias O2Pump d1
|
|
alias H2Pump d2
|
|
|
|
# ----------Change desired values here-------------
|
|
# Currently set for H2/o2 fuel mix.
|
|
# If you adujst the max tank pressure then you must
|
|
#...modify the the settings below that accordingly.
|
|
|
|
define O2Ratio 0.34#Set desired O2 ratio
|
|
define H2Ratio 0.66 #Set desired H2 ratio
|
|
define MaxPres 20000 #Set desired tank pressure
|
|
define MaxH2Pres 19800 #Keep below MaxPres
|
|
define MinTransPres 19500 #Keep below MaxH2Pres
|
|
define MinPres 19000 # Set tank minimum pressure
|
|
define PumpHighSetting 10.0 #H2Pump max setting
|
|
#--------------------------------------------------
|
|
|
|
alias O2 r0 #Ratio
|
|
alias H2 r1 #Ratio
|
|
alias Pres r2 #Pressure
|
|
alias H2PumpSetting r3
|
|
alias CurrentO2Setting r4
|
|
alias CurrentH2Setting r5
|
|
alias LowH2Setting r6
|
|
|
|
checkO2:
|
|
s d0 On 1
|
|
l H2PumpSetting d2 Setting
|
|
mul CurrentO2Setting H2PumpSetting 0.75
|
|
s d1 Setting CurrentO2Setting
|
|
l O2 d0 RatioOxygen
|
|
blt O2 O2Ratio o2PumpON
|
|
bgt O2 O2Ratio o2PumpOFF
|
|
j checkH2
|
|
|
|
checkH2:
|
|
l Pres d0 Pressure
|
|
bge Pres MinTransPres setLOW
|
|
blt Pres MinTransPres setHIGH
|
|
resumePresCheck:
|
|
l Pres d0 Pressure
|
|
bge Pres MaxH2Pres h2PumpOFF
|
|
H2RatioCheck:
|
|
l H2 d0 RatioVolatiles
|
|
blt H2 H2Ratio h2PumpON
|
|
bgt H2 H2Ratio h2PumpOFF
|
|
j checkO2
|
|
|
|
o2PumpON:
|
|
s d1 On 1
|
|
j checkH2
|
|
|
|
o2PumpOFF:
|
|
s d1 On 0
|
|
j checkH2
|
|
|
|
h2PumpON:
|
|
s d2 On 1
|
|
j checkO2
|
|
|
|
h2PumpOFF:
|
|
s d2 On 0
|
|
j checkO2
|
|
|
|
pumpsOFF:
|
|
s d1 On 0
|
|
s d2 On 0
|
|
j checkO2
|
|
|
|
setLOW:
|
|
abs CurrentH2Setting PumpHighSetting
|
|
mul LowH2Setting CurrentH2Setting 0.5
|
|
s d2 Setting LowH2Setting
|
|
j resumePresCheck
|
|
|
|
setHIGH:
|
|
s d2 Setting PumpHighSetting
|
|
j resumePresCheck |