From 014edec64dbf9e3485998619882966d65acc0419 Mon Sep 17 00:00:00 2001 From: hbeni Date: Sat, 16 Mar 2024 01:22:30 +0100 Subject: [PATCH] Starter overheating simulation Fix #567 --- Documentation.md | 3 + Nasal/c182s-electrical.nas | 4 +- Nasal/c182t-electrical.nas | 4 +- Nasal/custom-failures.nas | 4 ++ Systems/engine.xml | 97 +++++++++++++++++++++++++++ c182s-set.xml | 5 ++ c182t-set.xml | 5 ++ gui/dialogs/aircraft-dialog.xml | 29 ++++++++ gui/dialogs/c182-extendedFailures.xml | 17 +++++ 9 files changed, 166 insertions(+), 2 deletions(-) diff --git a/Documentation.md b/Documentation.md index 1701d396..03711f9c 100644 --- a/Documentation.md +++ b/Documentation.md @@ -32,6 +32,7 @@ To prevent this, you should apply the plane cover when securing your craft. Unchecking `Complex engine procedures and failures` allows a fairly basic engine mode where no priming is needed (just activate battery, apply enough mixture and press `s` to start), and no further damage can occur. Otherwise you need to pay attention to varios engine related things: + - Priming for startup The priming procedure involves applying some fuel into the manifold by the fuel pump. The exact procedure is laid out in the checklist. The engine can be easily flooded, especially in cold weather (remedy actions also in the POH/Checklist). @@ -58,6 +59,8 @@ Otherwise you need to pay attention to varios engine related things: engine at 1200 RPM. Should a magneto check reveal spark plug problems, its most of the time some fouled plugs. Put the engine to 1800 RPM and 50° lean of peak EGT. Let it run for about 30 seconds, monitor CHT. This should clean the deposits which a second magneto check should verify. When parking the plane after flight, you should go to 1800 RPM and lean mix for 20 secs, then reduce throttle to 1000 RPM and then stop the engine by pulling mixture to the cut-off position. +- `Allow starter cycle limits` + If active, you need to observe the starter cycle, otherwise you risk burning trough the engine starter. - `Winter Kit` The winter kit is needed in cold weather (<20°F/-6°C) to reduce cooling air flow. If not supplied, the engine will possibly not get warm enough to develop good power, but be sure to remove it in hot weather, otherwise you risk too high CHT temps. diff --git a/Nasal/c182s-electrical.nas b/Nasal/c182s-electrical.nas index 77a2c3f7..1019f099 100644 --- a/Nasal/c182s-electrical.nas +++ b/Nasal/c182s-electrical.nas @@ -327,8 +327,10 @@ update_virtual_bus = func( dt ) { # starter motor var starter_switch = getprop("controls/switches/starter"); + var starter_svc = getprop("/engines/engine/starter/serviceable"); + var starter_molten = getprop("/engines/engine/starter/overheated"); var starter_volts = 0.0; - if ( starter_switch ) { + if ( starter_switch and starter_svc and !starter_molten ) { starter_volts = bus_volts; load += 22; } diff --git a/Nasal/c182t-electrical.nas b/Nasal/c182t-electrical.nas index e0d5a0ba..d3fbd5cb 100644 --- a/Nasal/c182t-electrical.nas +++ b/Nasal/c182t-electrical.nas @@ -352,8 +352,10 @@ update_virtual_bus = func( dt ) { # starter motor var starter_switch = getprop("controls/switches/starter"); + var starter_svc = getprop("/engines/engine/starter/serviceable"); + var starter_molten = getprop("/engines/engine/starter/overheated"); var starter_volts = 0.0; - if ( starter_switch ) { + if ( starter_switch and starter_svc and !starter_molten ) { starter_volts = bus_volts; load += 22; } diff --git a/Nasal/custom-failures.nas b/Nasal/custom-failures.nas index f246cce9..6cb5fa2b 100644 --- a/Nasal/custom-failures.nas +++ b/Nasal/custom-failures.nas @@ -398,6 +398,10 @@ customFailures_c182common = [ trigger: MtbfTrigger.new(0) }, + {id:"engine/starter", name:"Starter", + actuator: set_unserviceable_abs("/engines/engine[0]/starter/serviceable"), + trigger: MtbfTrigger.new(0) + }, {id:"engine/magnetos", name:"Magnetos", actuator: fail_random_magnetos(), diff --git a/Systems/engine.xml b/Systems/engine.xml index 22590dbb..5e8f5a7a 100644 --- a/Systems/engine.xml +++ b/Systems/engine.xml @@ -765,4 +765,101 @@ /engines/engine[0]/governor/serviceable-norm + + + + Starter temperature + noise-spike + + + + + /engines/engine/complex-engine-procedures + /engines/engine/starter-management + + + + input + + + + + + /controls/engines/engine[0]/starter + + /fdm/jsbsim/damage/repairing + + /sim/time/elapsed-sec + 5.0 + + + + + + 250.0 + + + + + + + /controls/engines/engine[0]/starter + + + 3.5 + + + + + /controls/engines/engine[0]/starter + + 300 + + + + + + 1.0 + + + + + + + /engines/engine/cowling-air-temperature-degf + 32 + + 0.556 + + + + /engines/engine[0]/starter/temperature-degc + + + Starter overheated + + + /engines/engine/complex-engine-procedures + /engines/engine/starter-management + + + /engines/engine[0]/starter/overheated + /fdm/jsbsim/damage/repairing + + + + /controls/engines/engine[0]/starter + + /engines/engine[0]/starter/temperature-degc + 100 + + + + + + + /engines/engine[0]/starter/overheated + + + diff --git a/c182s-set.xml b/c182s-set.xml index 1f53abf0..bd5a9df1 100644 --- a/c182s-set.xml +++ b/c182s-set.xml @@ -959,6 +959,7 @@ /engines/engine/allow-fuel-contamination /engines/engine/allow-oil-management /engines/engine/allow-sparkplug-icing + /engines/engine/starter-management /engines/engine/winter-kit-installed /fdm/jsbsim/settings/damage @@ -1331,6 +1332,7 @@ false false false + false false 15W-50 0 @@ -1354,6 +1356,9 @@ true + + true + 0 0 diff --git a/c182t-set.xml b/c182t-set.xml index 29715696..97e2de9f 100644 --- a/c182t-set.xml +++ b/c182t-set.xml @@ -873,6 +873,7 @@ /engines/engine/allow-fuel-contamination /engines/engine/allow-oil-management /engines/engine/allow-sparkplug-icing + /engines/engine/starter-management /engines/engine/winter-kit-installed /fdm/jsbsim/settings/damage @@ -1227,6 +1228,7 @@ false false false + false false 15W-50 0 @@ -1249,6 +1251,9 @@ true + + true + 0 0 diff --git a/gui/dialogs/aircraft-dialog.xml b/gui/dialogs/aircraft-dialog.xml index cd0269d8..f237720b 100644 --- a/gui/dialogs/aircraft-dialog.xml +++ b/gui/dialogs/aircraft-dialog.xml @@ -276,6 +276,35 @@ true + + hbox + + + vbox + 6 + + + + hbox + + left + + /engines/engine/starter-management + true + + + /engines/engine/complex-engine-procedures + + + + dialog-apply + + + + + true + + diff --git a/gui/dialogs/c182-extendedFailures.xml b/gui/dialogs/c182-extendedFailures.xml index f96eea7f..098cd840 100644 --- a/gui/dialogs/c182-extendedFailures.xml +++ b/gui/dialogs/c182-extendedFailures.xml @@ -369,6 +369,23 @@ 2 /sim/failure-manager/engine/governor/mtbf + + + 2 + 3 + right + + + + 2 + 4 + /sim/failure-manager/engine/starter/serviceable + + + 2 + 5 + /sim/failure-manager/engine/starter/mtbf +