1
0
Fork 0

APU bleed improvements; improvements to lower ECAM

This commit is contained in:
legoboyvdlp R 2020-05-05 21:58:50 +01:00
parent 42c1a86668
commit cb6fafd9c1
5 changed files with 237 additions and 72 deletions

View file

@ -837,6 +837,7 @@
<blower type="bool">0</blower>
<cabin-fans type="bool">0</cabin-fans>
<extract type="bool">0</extract>
<groundair type="bool">0</groundair>
<hot-air type="bool">0</hot-air>
<pack-1 type="bool">0</pack-1>
<pack-2 type="bool">0</pack-2>
@ -1044,6 +1045,8 @@
<apu-valve type="bool">0</apu-valve>
<bleed-1-valve type="bool">0</bleed-1-valve>
<bleed-2-valve type="bool">0</bleed-2-valve>
<bmc-1 type="bool">0</bmc-1>
<bmc-2 type="bool">0</bmc-2>
<cabin-fans type="bool">0</cabin-fans>
<hot-air-valve type="bool">0</hot-air-valve>
<pack-1-valve type="bool">0</pack-1-valve>
@ -1137,6 +1140,10 @@
</hydraulic>
<pneumatics>
<indicating>
<bmc1-working type="bool">0</bmc1-working>
<bmc2-working type="bool">0</bmc2-working>
</indicating>
<pack-1-out-temp type="double">0</pack-1-out-temp>
<pack-2-out-temp type="double">0</pack-2-out-temp>
<pack-1-comp-out-temp type="double">0</pack-1-comp-out-temp>
@ -1152,11 +1159,6 @@
<ovht-2 type="double">0</ovht-2>
</precooler>
<psi>
<apu type="double">0</apu>
<engine-1-lp-psi type="double">0</engine-1-lp-psi>
<engine-2-lp-psi type="double">0</engine-2-lp-psi>
<engine-1-hp-psi type="double">0</engine-1-hp-psi>
<engine-2-hp-psi type="double">0</engine-2-hp-psi>
<engine-1-psi type="double">0</engine-1-psi>
<engine-2-psi type="double">0</engine-2-psi>
<engine-1-upstream-prv type="double">0</engine-1-upstream-prv>
@ -1164,6 +1166,13 @@
<engine-1-upstream-src type="double">0</engine-1-upstream-src>
<engine-2-upstream-src type="double">0</engine-2-upstream-src>
</psi>
<source>
<apu-psi type="double">0</apu-psi>
<engine-1-lp-psi type="double">0</engine-1-lp-psi>
<engine-2-lp-psi type="double">0</engine-2-lp-psi>
<engine-1-hp-psi type="double">0</engine-1-hp-psi>
<engine-2-hp-psi type="double">0</engine-2-hp-psi>
</source>
<valves>
<apu-bleed-valve type="bool">0</apu-bleed-valve>
<crossbleed-valve type="bool">0</crossbleed-valve>

View file

@ -303,10 +303,10 @@
<checkbox>
<label>Enable External Air</label>
<halign>left</halign>
<property>/controls/pneumatic/switches/groundair</property>
<property>/controls/pneumatics/switches/groundair</property>
<binding>
<command>property-toggle</command>
<property>/controls/pneumatic/switches/groundair</property>
<property>/controls/pneumatics/switches/groundair</property>
</binding>
<enable>
<and>

View file

@ -65,7 +65,7 @@ var oil_qt1 = props.globals.getNode("/ECAM/Lower/Oil-QT[0]", 1);
var oil_qt2 = props.globals.getNode("/ECAM/Lower/Oil-QT[1]", 1);
var oil_psi1 = props.globals.getNode("/ECAM/Lower/Oil-PSI[0]", 1);
var oil_psi2 = props.globals.getNode("/ECAM/Lower/Oil-PSI[1]", 1);
var bleedapu = props.globals.getNode("/systems/pneumatics/psi/apu", 1);
var bleedapu = props.globals.getNode("/systems/pneumatics/source/apu-psi", 1);
var oil_psi_actual1 = props.globals.getNode("/engines/engine[0]/oil-psi-actual", 1);
var oil_psi_actual2 = props.globals.getNode("/engines/engine[1]/oil-psi-actual", 1);
var aileron_ind_left = props.globals.getNode("/ECAM/Lower/aileron-ind-left", 1);
@ -99,6 +99,8 @@ var precooler1_temp = props.globals.getNode("/systems/pneumatics/precooler/temp-
var precooler2_temp = props.globals.getNode("/systems/pneumatics/precooler/temp-2", 1);
var precooler1_ovht = props.globals.getNode("/systems/pneumatics/precooler/ovht-1", 1);
var precooler2_ovht = props.globals.getNode("/systems/pneumatics/precooler/ovht-2", 1);
var bmc1working = props.globals.getNode("/systems/pneumatics/indicating/bmc1-working", 1);
var bmc2working = props.globals.getNode("/systems/pneumatics/indicating/bmc2-working", 1);
var gs_kt = props.globals.getNode("/velocities/groundspeed-kt", 1);
var switch_wing_aice = props.globals.getNode("/controls/switches/wing", 1);
var deice_wing = props.globals.getNode("/controls/deice/wing", 1);
@ -674,13 +676,13 @@ var canvas_lowerECAM_apu = {
me["APUGenHz"].setText(sprintf("%s", math.round(apu_hz.getValue())));
# APU Bleed
#if (systems.ADIRS.Operating.adr[0].getValue() and (apu_master.getValue() == 1 or bleedapu.getValue() > 0)) {
# me["APUBleedPSI"].setColor(0.0509,0.7529,0.2941);
# me["APUBleedPSI"].setText(sprintf("%s", math.round(bleedapu.getValue())));
#} else {
if (systems.ADIRS.Operating.adr[0].getValue() and (systems.APUNodes.Controls.bleed.getValue() == 1 or bleedapu.getValue() > 0)) {
me["APUBleedPSI"].setColor(0.0509,0.7529,0.2941);
me["APUBleedPSI"].setText(sprintf("%s", math.round(bleedapu.getValue())));
} else {
me["APUBleedPSI"].setColor(0.7333,0.3803,0);
me["APUBleedPSI"].setText(sprintf("%s", "XX"));
#}
}
var apu_valve_state2 = apu_valve_state.getValue();
if (apu_valve_state2 == 1) {
@ -844,43 +846,63 @@ var canvas_lowerECAM_bleed = {
}
# Precooler inlet 1
var precooler_psi = precooler1_psi.getValue();
me["BLEED-Precooler-1-Inlet-Press"].setText(sprintf("%s", math.round(precooler_psi)));
if (precooler_psi < 4 or precooler_psi > 57) {
me["BLEED-Precooler-1-Inlet-Press"].setColor(0.7333,0.3803,0);
if (bmc1working.getValue()) {
var precooler_psi = precooler1_psi.getValue();
me["BLEED-Precooler-1-Inlet-Press"].setText(sprintf("%s", math.round(precooler_psi)));
if (precooler_psi < 4 or precooler_psi > 57) {
me["BLEED-Precooler-1-Inlet-Press"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Precooler-1-Inlet-Press"].setColor(0.0509,0.7529,0.2941);
}
} else {
me["BLEED-Precooler-1-Inlet-Press"].setColor(0.0509,0.7529,0.2941);
me["BLEED-Precooler-1-Inlet-Press"].setText(sprintf("%s", "XX"));
me["BLEED-Precooler-1-Inlet-Press"].setColor(0.7333,0.3803,0);
}
# Precooler inlet 2
var precooler_psi = precooler2_psi.getValue();
me["BLEED-Precooler-2-Inlet-Press"].setText(sprintf("%s", math.round(precooler_psi)));
if (precooler_psi < 4 or precooler_psi > 57) {
me["BLEED-Precooler-2-Inlet-Press"].setColor(0.7333,0.3803,0);
if (bmc2working.getValue()) {
var precooler_psi = precooler2_psi.getValue();
me["BLEED-Precooler-2-Inlet-Press"].setText(sprintf("%s", math.round(precooler_psi)));
if (precooler_psi < 4 or precooler_psi > 57) {
me["BLEED-Precooler-2-Inlet-Press"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Precooler-2-Inlet-Press"].setColor(0.0509,0.7529,0.2941);
}
} else {
me["BLEED-Precooler-2-Inlet-Press"].setColor(0.0509,0.7529,0.2941);
me["BLEED-Precooler-2-Inlet-Press"].setText(sprintf("%s", "XX"));
me["BLEED-Precooler-2-Inlet-Press"].setColor(0.7333,0.3803,0);
}
# Precooler outlet 1
var precooler_temp = precooler1_temp.getValue();
me["BLEED-Precooler-1-Outlet-Temp"].setText(sprintf("%s", math.round(precooler_temp, 5)));
if (precooler_temp < 150 or precooler1_ovht.getValue()) {
me["BLEED-Precooler-1-Outlet-Temp"].setColor(0.7333,0.3803,0);
if (bmc1working.getValue()) {
var precooler_temp = precooler1_temp.getValue();
me["BLEED-Precooler-1-Outlet-Temp"].setText(sprintf("%s", math.round(precooler_temp, 5)));
if (eng_valve1_state.getValue() == 1 and (precooler_temp < 150 or precooler1_ovht.getValue())) {
me["BLEED-Precooler-1-Outlet-Temp"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Precooler-1-Outlet-Temp"].setColor(0.0509,0.7529,0.2941);
}
} else {
me["BLEED-Precooler-1-Outlet-Temp"].setColor(0.0509,0.7529,0.2941);
me["BLEED-Precooler-1-Outlet-Temp"].setText(sprintf("%s", "XX"));
me["BLEED-Precooler-1-Outlet-Temp"].setColor(0.7333,0.3803,0);
}
# Precooler outlet 2
var precooler_temp = precooler2_temp.getValue();
me["BLEED-Precooler-2-Outlet-Temp"].setText(sprintf("%s", math.round(precooler_temp, 5)));
if (precooler_temp < 150 or precooler2_ovht.getValue() == 1) {
me["BLEED-Precooler-2-Outlet-Temp"].setColor(0.7333,0.3803,0);
if (bmc2working.getValue()) {
var precooler_temp = precooler2_temp.getValue();
me["BLEED-Precooler-2-Outlet-Temp"].setText(sprintf("%s", math.round(precooler_temp, 5)));
if (eng_valve2_state.getValue() == 1 and (precooler_temp < 150 or precooler2_ovht.getValue())) {
me["BLEED-Precooler-2-Outlet-Temp"].setColor(0.7333,0.3803,0);
} else {
me["BLEED-Precooler-2-Outlet-Temp"].setColor(0.0509,0.7529,0.2941);
}
} else {
me["BLEED-Precooler-2-Outlet-Temp"].setColor(0.0509,0.7529,0.2941);
me["BLEED-Precooler-2-Outlet-Temp"].setText(sprintf("%s", "XX"));
me["BLEED-Precooler-2-Outlet-Temp"].setColor(0.7333,0.3803,0);
}
# GND air
if (gs_kt.getValue() < 1) {
if (pts.Gear.wow[1].getValue()) {
me["BLEED-GND"].show();
} else {
me["BLEED-GND"].hide();

View file

@ -9,6 +9,8 @@ var PNEU = {
apu: props.globals.getNode("/systems/failures/pneumatics/apu-valve"),
bleed1: props.globals.getNode("/systems/failures/pneumatics/bleed-1-valve"),
bleed2: props.globals.getNode("/systems/failures/pneumatics/bleed-2-valve"),
bmc1: props.globals.getNode("/systems/failures/pneumatics/bmc-1"),
bmc2: props.globals.getNode("/systems/failures/pneumatics/bmc-2"),
cabinFans: props.globals.getNode("/systems/failures/pneumatics/cabin-fans"),
hotAir: props.globals.getNode("/systems/failures/pneumatics/hot-air-valve"),
pack1: props.globals.getNode("/systems/failures/pneumatics/pack-1-valve"),

View file

@ -240,6 +240,80 @@
<channel name="Source PSI">
<fcs_function name="/systems/pneumatics/source/apu-psi">
<function>
<ifthen>
<gt>
<property>/position/altitude-ft</property>
<value>20000</value>
</gt>
<value>0</value>
<ifthen>
<gt>
<property>/engines/engine[2]/n1</property>
<value>92</value>
</gt>
<difference>
<interpolate1d>
<property>/position/altitude-ft</property>
<value>0</value>
<table>
<independentVar lookup="row">/engines/engine[2]/n1</independentVar>
<independentVar lookup="column">/systems/pneumatics/valves/apu-bleed-valve</independentVar>
<tableData>
0 1
92 0 0
95 16.7 2.7
100 58.7 50.7
</tableData>
</table>
<value>10000</value>
<table>
<independentVar lookup="row">/engines/engine[2]/n1</independentVar>
<independentVar lookup="column">/systems/pneumatics/valves/apu-bleed-valve</independentVar>
<tableData>
0 1
92 0 0
95 6.7 0.1
100 48.7 40.7
</tableData>
</table>
<value>15000</value>
<table>
<independentVar lookup="row">/engines/engine[2]/n1</independentVar>
<independentVar lookup="column">/systems/pneumatics/valves/apu-bleed-valve</independentVar>
<tableData>
0 1
92 0 0
95 2.7 0
100 37.7 32.7
</tableData>
</table>
</interpolate1d>
<quotient>
<property>/systems/navigation/probes/static-1</property>
<value>2.036</value>
</quotient>
</difference>
<value>0</value>
</ifthen>
</ifthen>
</function>
<clipto>
<min>0</min>
<max>99999999</max>
</clipto>
</fcs_function>
<fcs_function name="/systems/pneumatics/source/gnd-psi">
<function>
<product>
<property>/controls/pneumatics/switches/groundair</property>
<value>34</value>
</product>
</function>
</fcs_function>
<fcs_function name="/systems/pneumatics/source/engine-1-hp-psi">
<function>
<table>
@ -355,7 +429,7 @@
</function>
</fcs_function>
<fcs_function name="/systems/pneumatics/psi/engine-1-upstream-prv">
<fcs_function name="/systems/pneumatics/psi/engine-1-downstream-prv">
<function>
<product>
<property>/systems/pneumatics/valves/engine-1-prv-valve</property>
@ -364,7 +438,7 @@
</function>
</fcs_function>
<fcs_function name="/systems/pneumatics/psi/engine-2-upstream-prv">
<fcs_function name="/systems/pneumatics/psi/engine-2-downstream-prv">
<function>
<product>
<property>/systems/pneumatics/valves/engine-2-prv-valve</property>
@ -373,47 +447,72 @@
</function>
</fcs_function>
<fcs_function name="/systems/pneumatics/psi/engine-1-psi">
<fcs_function name="/systems/pneumatics/psi/engine-1-psi"> <!-- measured pressure. Is essentially pressure of the entire left system -->
<function>
<product>
<property>/systems/pneumatics/valves/engine-1-opv-valve</property>
<property>/systems/pneumatics/psi/engine-1-upstream-prv</property>
</product>
<max>
<property>/systems/pneumatics/psi/crossbleed-duct-left</property>
<product>
<property>/systems/pneumatics/valves/engine-1-opv-valve</property>
<property>/systems/pneumatics/psi/engine-1-downstream-prv</property>
</product>
</max>
</function>
</fcs_function>
<fcs_function name="/systems/pneumatics/psi/engine-2-psi">
<function>
<product>
<property>/systems/pneumatics/valves/engine-2-opv-valve</property>
<property>/systems/pneumatics/psi/engine-2-upstream-prv</property>
<max>
<property>/systems/pneumatics/psi/crossbleed-duct-right</property>
<product>
<property>/systems/pneumatics/valves/engine-2-opv-valve</property>
<property>/systems/pneumatics/psi/engine-2-downstream-prv</property>
</product>
</max>
</function>
</fcs_function>
<fcs_function name="/systems/pneumatics/psi/crossbleed-duct-left">
<function>
<max>
<product>
<property>/systems/pneumatics/source/apu-psi</property>
<property>/systems/pneumatics/valves/apu-bleed-valve</property>
</product>
<property>/systems/pneumatics/source/gnd-psi</property>
</max>
</function>
</fcs_function>
<fcs_function name="/systems/pneumatics/psi/crossbleed-duct-right">
<function>
<product>
<property>/systems/pneumatics/valves/crossbleed-valve</property>
<max>
<product>
<property>/systems/pneumatics/source/apu-psi</property>
<property>/systems/pneumatics/valves/apu-bleed-valve</property>
</product>
<property>/systems/pneumatics/source/gnd-psi</property>
</max>
</product>
</function>
</fcs_function>
</channel>
<channel name="Precooler">
<channel name="Precooler Left" execute="/systems/pneumatics/indicating/bmc1-working"> <!-- These values come from BMC, so makes sense to not have them when BMC lacks power -->
<fcs_function name="/systems/pneumatics/precooler/temp-1">
<function>
<product>
<property>/systems/pneumatics/valves/engine-1-prv-valve</property>
<property>/systems/pneumatics/valves/engine-1-opv-valve</property>
<property>/engines/engine[0]/egt-actual</property>
<value>0.35</value>
</product>
</function>
</fcs_function>
<fcs_function name="/systems/pneumatics/precooler/temp-2">
<function>
<product>
<property>/systems/pneumatics/valves/engine-2-prv-valve</property>
<property>/systems/pneumatics/valves/engine-2-opv-valve</property>
<property>/engines/engine[1]/egt-actual</property>
<value>0.35</value>
</product>
<sum>
<property>/environment/temperature-degc</property>
<product>
<property>/systems/pneumatics/valves/engine-1-prv-valve</property>
<property>/systems/pneumatics/valves/engine-1-opv-valve</property>
<property>/engines/engine[0]/egt-actual</property>
<value>0.35</value>
</product>
</sum>
</function>
</fcs_function>
@ -456,6 +555,32 @@
<rate_limit sense="decr">100</rate_limit>
</actuator>
<switch name="/systems/pneumatics/precooler/ovht-1">
<default value="0"/>
<test logic="OR" value="1">
/systems/pneumatics/precooler/calc/ovht-5 eq 1
/systems/pneumatics/precooler/calc/ovht-15 eq 1
/systems/pneumatics/precooler/calc/ovht-55 eq 1
</test>
</switch>
</channel>
<channel name="Precooler Right" execute="/systems/pneumatics/indicating/bmc2-working"> <!-- These values come from BMC, so makes sense to not have them when BMC lacks power -->
<fcs_function name="/systems/pneumatics/precooler/temp-2">
<function>
<sum>
<property>/environment/temperature-degc</property>
<product>
<property>/systems/pneumatics/valves/engine-2-prv-valve</property>
<property>/systems/pneumatics/valves/engine-2-opv-valve</property>
<property>/engines/engine[1]/egt-actual</property>
<value>0.35</value>
</product>
</sum>
</function>
</fcs_function>
<switch name="/systems/pneumatics/precooler/calc/ovht-5-true-2">
<default value="0"/>
@ -495,16 +620,7 @@
<rate_limit sense="incr">0.018182</rate_limit>
<rate_limit sense="decr">100</rate_limit>
</actuator>
<switch name="/systems/pneumatics/precooler/ovht-1">
<default value="0"/>
<test logic="OR" value="1">
/systems/pneumatics/precooler/calc/ovht-5 eq 1
/systems/pneumatics/precooler/calc/ovht-15 eq 1
/systems/pneumatics/precooler/calc/ovht-55 eq 1
</test>
</switch>
<switch name="/systems/pneumatics/precooler/ovht-2">
<default value="0"/>
<test logic="OR" value="1">
@ -516,6 +632,22 @@
</channel>
<channel name="ECAM">
<switch name="/systems/pneumatics/indicating/bmc1-working">
<default value="0"/>
<test logic="AND" value="1">
/systems/electrical/bus/dc-ess-shed ge 25
/systems/failures/pneumatics/bmc-1 ne 1
</test>
</switch>
<switch name="/systems/pneumatics/indicating/bmc2-working">
<default value="0"/>
<test logic="AND" value="1">
/systems/electrical/bus/dc-2 ge 25
/systems/failures/pneumatics/bmc-2 ne 1
</test>
</switch>
<switch name="/systems/pneumatics/warnings/apu-bleed-not-on-cmd">
<default value="0"/>