2015-07-24 18:37:16 +01:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
***********************************************************************************
|
|
|
|
c172p, June 2015
|
|
|
|
Fuel system for 2 different engines at choice, JSBSim FDM
|
|
|
|
***********************************************************************************
|
|
|
|
-->
|
|
|
|
|
|
|
|
<system name="fuel">
|
2018-05-17 12:58:44 +01:00
|
|
|
<property type="bool" value="0">/engines/active-engine/already-started-in-session</property>
|
2015-07-24 18:37:16 +01:00
|
|
|
|
|
|
|
<!-- *********************************************************************************** -->
|
2021-09-14 19:34:27 +01:00
|
|
|
<!-- Main tanks: 0 and 1, Integral 2 and 3 -->
|
|
|
|
<!-- Collector Tanks: 4, constant-level intermediate float chamber -->
|
2015-07-24 18:37:16 +01:00
|
|
|
<!-- Fuel Flow Rates in pounds per second -->
|
|
|
|
<!-- *********************************************************************************** -->
|
|
|
|
|
2021-09-14 19:34:27 +01:00
|
|
|
<channel name="Float Chamber">
|
|
|
|
<!-- Give tank[4] priority regardless of engine is used -->
|
|
|
|
<switch name="Float Chamber From Engine 0">
|
|
|
|
<output>propulsion/tank[4]/priority</output>
|
2015-07-24 18:37:16 +01:00
|
|
|
<default value="0"/>
|
|
|
|
<test logic="AND" value="1">
|
|
|
|
/engines/active-engine/killed EQ 0
|
|
|
|
</test>
|
|
|
|
</switch>
|
|
|
|
</channel>
|
|
|
|
|
|
|
|
<!-- ****************************************************** -->
|
2021-09-14 19:34:27 +01:00
|
|
|
<!-- Collector Tank 4 level-maintenance -->
|
2015-07-24 18:37:16 +01:00
|
|
|
<!-- ****************************************************** -->
|
2021-09-14 19:34:27 +01:00
|
|
|
<channel name="To Tank6">
|
|
|
|
<!-- from Tank 0 (to Collector Tank 4) -->
|
|
|
|
<switch name="fuel/from-tank0-to-tank4">
|
2015-07-24 18:37:16 +01:00
|
|
|
<default value="0"/>
|
|
|
|
<test logic="AND" value="0.1">
|
|
|
|
propulsion/tank[0]/priority EQ 1
|
2023-10-22 22:09:11 +01:00
|
|
|
/consumables/fuel/tank[0]/level-gal_us GT /consumables/fuel/tank[0]/unusable-vol-gal
|
2021-09-14 19:34:27 +01:00
|
|
|
/consumables/fuel/tank[4]/level-lbs LT 0.05
|
|
|
|
propulsion/tank[4]/priority EQ 1
|
2015-07-24 18:37:16 +01:00
|
|
|
accelerations/Nz GE 0
|
2021-09-14 19:34:27 +01:00
|
|
|
fuel/tank EQ 0
|
2015-07-24 18:37:16 +01:00
|
|
|
</test>
|
|
|
|
</switch>
|
|
|
|
|
2021-09-14 19:34:27 +01:00
|
|
|
<!-- from Tank 1 (to Collector Tank 4) -->
|
|
|
|
<switch name="fuel/from-tank1-to-tank4">
|
2015-07-24 18:37:16 +01:00
|
|
|
<default value="0"/>
|
|
|
|
<test logic="AND" value="0.1">
|
|
|
|
propulsion/tank[1]/priority EQ 1
|
2023-10-22 22:09:11 +01:00
|
|
|
/consumables/fuel/tank[1]/level-gal_us GT /consumables/fuel/tank[1]/unusable-vol-gal
|
2021-09-14 19:34:27 +01:00
|
|
|
/consumables/fuel/tank[4]/level-lbs LT 0.05
|
|
|
|
propulsion/tank[4]/priority EQ 1
|
2015-07-24 18:37:16 +01:00
|
|
|
accelerations/Nz GE 0
|
2021-09-14 19:34:27 +01:00
|
|
|
fuel/tank EQ 0
|
2015-07-24 18:37:16 +01:00
|
|
|
</test>
|
|
|
|
</switch>
|
|
|
|
|
2021-09-14 19:34:27 +01:00
|
|
|
<!-- from Tank 2 (to Collector Tank 4) -->
|
|
|
|
<switch name="fuel/from-tank2-to-tank4">
|
2015-07-24 18:37:16 +01:00
|
|
|
<default value="0"/>
|
|
|
|
<test logic="AND" value="0.1">
|
2021-09-14 19:34:27 +01:00
|
|
|
propulsion/tank[2]/priority EQ 1
|
2023-10-22 22:09:11 +01:00
|
|
|
/consumables/fuel/tank[2]/level-gal_us GT /consumables/fuel/tank[2]/unusable-vol-gal
|
2021-09-14 19:34:27 +01:00
|
|
|
/consumables/fuel/tank[4]/level-lbs LT 0.05
|
|
|
|
propulsion/tank[4]/priority EQ 1
|
2015-07-24 18:37:16 +01:00
|
|
|
accelerations/Nz GE 0
|
2021-09-14 19:34:27 +01:00
|
|
|
fuel/tank EQ 1
|
2015-07-24 18:37:16 +01:00
|
|
|
</test>
|
|
|
|
</switch>
|
|
|
|
|
2021-09-14 19:34:27 +01:00
|
|
|
<!-- from Tank 3 (to Collector Tank 4) -->
|
|
|
|
<switch name="fuel/from-tank3-to-tank4">
|
2015-07-24 18:37:16 +01:00
|
|
|
<default value="0"/>
|
|
|
|
<test logic="AND" value="0.1">
|
|
|
|
propulsion/tank[3]/priority EQ 1
|
2023-10-22 22:09:11 +01:00
|
|
|
/consumables/fuel/tank[3]/level-gal_us GT /consumables/fuel/tank[3]/unusable-vol-gal
|
2021-09-14 19:34:27 +01:00
|
|
|
/consumables/fuel/tank[4]/level-lbs LT 0.05
|
|
|
|
propulsion/tank[4]/priority EQ 1
|
2015-07-24 18:37:16 +01:00
|
|
|
accelerations/Nz GE 0
|
2021-09-14 19:34:27 +01:00
|
|
|
fuel/tank EQ 1
|
2015-07-24 18:37:16 +01:00
|
|
|
</test>
|
|
|
|
</switch>
|
2021-09-14 19:34:27 +01:00
|
|
|
|
2015-07-24 18:37:16 +01:00
|
|
|
</channel>
|
|
|
|
|
2021-09-14 19:34:27 +01:00
|
|
|
<!-- Total from Tank 0 and Tank 1 to Collector Tank 4 -->
|
|
|
|
<channel name="Total flow rate into tank 4">
|
|
|
|
<summer name="tank0 and 1 to tank4">
|
|
|
|
<input>fuel/from-tank0-to-tank4</input>
|
|
|
|
<input>fuel/from-tank1-to-tank4</input>
|
|
|
|
<input>fuel/from-tank2-to-tank4</input>
|
|
|
|
<input>fuel/from-tank3-to-tank4</input>
|
|
|
|
<output>propulsion/tank[4]/external-flow-rate-pps</output>
|
2015-07-24 18:37:16 +01:00
|
|
|
</summer>
|
|
|
|
</channel>
|
|
|
|
|
2021-09-14 19:34:27 +01:00
|
|
|
|
2015-07-24 18:37:16 +01:00
|
|
|
<!-- ****************************************************** -->
|
|
|
|
<!-- FLOW RATE from each MAIN TANK (consumption) -->
|
|
|
|
<!-- ****************************************************** -->
|
|
|
|
|
|
|
|
<channel name="Total flow rates">
|
|
|
|
<summer name="fuel/tank0-flow-rate">
|
2021-09-14 19:34:27 +01:00
|
|
|
<input>-fuel/from-tank0-to-tank4</input>
|
2015-07-24 18:37:16 +01:00
|
|
|
<output>propulsion/tank[0]/external-flow-rate-pps</output>
|
|
|
|
</summer>
|
|
|
|
<summer name="fuel/tank1-flow-rate">
|
2021-09-14 19:34:27 +01:00
|
|
|
<input>-fuel/from-tank1-to-tank4</input>
|
2015-07-24 18:37:16 +01:00
|
|
|
<output>propulsion/tank[1]/external-flow-rate-pps</output>
|
|
|
|
</summer>
|
2021-09-14 19:34:27 +01:00
|
|
|
|
|
|
|
<summer name="fuel/tank2-flow-rate">
|
|
|
|
<input>-fuel/from-tank2-to-tank4</input>
|
|
|
|
<output>propulsion/tank[2]/external-flow-rate-pps</output>
|
|
|
|
</summer>
|
|
|
|
<summer name="fuel/tank3-flow-rate">
|
|
|
|
<input>-fuel/from-tank3-to-tank4</input>
|
|
|
|
<output>propulsion/tank[3]/external-flow-rate-pps</output>
|
|
|
|
</summer>
|
2015-07-24 18:37:16 +01:00
|
|
|
</channel>
|
2018-05-17 12:58:44 +01:00
|
|
|
|
|
|
|
<channel name="fuel-system">
|
|
|
|
<switch name="/engines/active-engine/already-started-in-session">
|
|
|
|
<default value="0"/>
|
|
|
|
<test logic="AND" value="/engines/active-engine/already-started-in-session">
|
|
|
|
/engines/active-engine/already-started-in-session GT 0
|
|
|
|
</test>
|
|
|
|
<test logic="AND" value="1">
|
|
|
|
/controls/engines/active-engine EQ 0
|
|
|
|
/fdm/jsbsim/propulsion/engine[0]/set-running GT 0
|
|
|
|
</test>
|
|
|
|
<test logic="AND" value="1">
|
|
|
|
/controls/engines/active-engine EQ 1
|
|
|
|
/fdm/jsbsim/propulsion/engine[1]/set-running GT 0
|
|
|
|
</test>
|
|
|
|
<output>/engines/active-engine/already-started-in-session</output>
|
|
|
|
</switch>
|
|
|
|
</channel>
|
2015-07-24 18:37:16 +01:00
|
|
|
</system>
|