Debian Codegraph @

Aircraft/c172p/Systems/c172p-heat.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <!--
4 Copyright (c) 2015 onox
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 -->
19
20 <system name="c172p heat">
21
22 <property value="37.0">heat/human-body-temp-degc</property>
23
24 <channel name="cabin-doors-windows">
25
26 <aerosurface_scale name="heat/door-left">
27 <input>/sim/model/door-positions/leftDoor/position-norm</input>
28 <zero_centered>false</zero_centered>
29 <domain>
30 <min>0.5</min>
31 <max>1.0</max>
32 </domain>
33 <range>
34 <min>0.0</min>
35 <max>1.0</max>
36 </range>
37 <clipto>
38 <min>0.0</min>
39 <max>1.0</max>
40 </clipto>
41 </aerosurface_scale>
42
43 <aerosurface_scale name="heat/door-right">
44 <input>/sim/model/door-positions/rightDoor/position-norm</input>
45 <zero_centered>false</zero_centered>
46 <domain>
47 <min>0.5</min>
48 <max>1.0</max>
49 </domain>
50 <range>
51 <min>0.0</min>
52 <max>1.0</max>
53 </range>
54 <clipto>
55 <min>0.0</min>
56 <max>1.0</max>
57 </clipto>
58 </aerosurface_scale>
59
60 <aerosurface_scale name="heat/door-baggage">
61 <input>/sim/model/door-positions/baggageDoor/position-norm</input>
62 <zero_centered>false</zero_centered>
63 <domain>
64 <min>0.0</min>
65 <max>1.0</max>
66 </domain>
67 <range>
68 <min>0.0</min>
69 <max>0.5</max>
70 </range>
71 <clipto>
72 <min>0.0</min>
73 <max>0.5</max>
74 </clipto>
75 </aerosurface_scale>
76
77 <aerosurface_scale name="heat/window-left">
78 <input>/sim/model/door-positions/leftWindow/position-norm</input>
79 <zero_centered>false</zero_centered>
80 <domain>
81 <min>0.5</min>
82 <max>1.0</max>
83 </domain>
84 <range>
85 <min>0.0</min>
86 <max>0.2</max>
87 </range>
88 <clipto>
89 <min>0.0</min>
90 <max>0.2</max>
91 </clipto>
92 </aerosurface_scale>
93
94 <aerosurface_scale name="heat/window-right">
95 <input>/sim/model/door-positions/rightWindow/position-norm</input>
96 <zero_centered>false</zero_centered>
97 <domain>
98 <min>0.5</min>
99 <max>1.0</max>
100 </domain>
101 <range>
102 <min>0.0</min>
103 <max>0.2</max>
104 </range>
105 <clipto>
106 <min>0.0</min>
107 <max>0.2</max>
108 </clipto>
109 </aerosurface_scale>
110
111 <summer name="heat/doors-windows-left">
112 <input>heat/door-left</input>
113 <input>heat/window-left</input>
114 <clipto>
115 <min>0.0</min>
116 <max>1.0</max>
117 </clipto>
118 </summer>
119
120 <summer name="heat/doors-windows-right">
121 <input>heat/door-right</input>
122 <input>heat/window-right</input>
123 <clipto>
124 <min>0.0</min>
125 <max>1.0</max>
126 </clipto>
127 </summer>
128
129 <summer name="heat/doors-windows-total">
130 <input>heat/doors-windows-left</input>
131 <input>heat/doors-windows-right</input>
132 <input>heat/door-baggage</input>
133 </summer>
134
135 <summer name="heat/humans-count">
136 <input>/pax/pilot/present</input>
137 <input>/pax/co-pilot/present</input>
138 <input>/pax/left-passenger/present</input>
139 <input>/pax/right-passenger/present</input>
140 </summer>
141
142 </channel>
143
144 <channel name="cabin-temperature">
145
146 <!-- The exhaust gas temperature controls how much the air is
147 heated up.
148 -->
149 <pure_gain name="heat/heat-exhaust-gas-temp-degc">
150 <input>/engines/active-engine/egt-norm</input>
151
152 <!-- Extra heat (in Celsius) when EGT is at maximum. EGT is
153 usually between 0.4 and 0.6.
154 -->
155 <gain>60.0</gain>
156 </pure_gain>
157
158 <!-- Computes the difference in temperature between the cabin
159 heat intake (behind propeller) and the cabin.
160 -->
161 <summer name="heat/cabin-heat-temp-diff">
162 <input>/environment/temperature-degc</input>
163 <input>-heat/cabin-air-temp-degc</input>
164 <input>heat/heat-exhaust-gas-temp-degc</input>
165 </summer>
166
167 <!-- Computes the difference in temperature between the cabin
168 air intake (ventilating air door on the right side of the
169 fuselage) and the cabin.
170 -->
171 <summer name="heat/cabin-air-temp-diff">
172 <input>/environment/temperature-degc</input>
173 <input>-heat/cabin-air-temp-degc</input>
174 </summer>
175
176 <summer name="heat/cabin-human-temp-diff">
177 <input>heat/human-body-temp-degc</input>
178 <input>-heat/cabin-air-temp-degc</input>
179 <clipto>
180 <min>-0.01</min>
181 <max> 0.10</max>
182 </clipto>
183 </summer>
184
185 <scheduled_gain name="heat/cabin-air-transfer-heat-duct">
186 <input>heat/cabin-heat-temp-diff</input>
187 <gain>/environment/aircraft-effects/cabin-heat-set</gain>
188 <table>
189 <independentVar lookup="row">/engines/active-engine/rpm</independentVar>
190 <independentVar lookup="column">/velocities/airspeed-kt</independentVar>
191 <tableData>
192 40 120
193 0 0.10 0.50
194 700 0.25 0.60
195 2800 0.50 1.00
196 </tableData>
197 </table>
198 </scheduled_gain>
199
200 <scheduled_gain name="heat/cabin-air-transfer-air-duct">
201 <input>heat/cabin-air-temp-diff</input>
202 <gain>/environment/aircraft-effects/cabin-air-set</gain>
203 <table>
204 <independentVar lookup="row">/engines/active-engine/rpm</independentVar>
205 <independentVar lookup="column">/velocities/airspeed-kt</independentVar>
206 <tableData>
207 40 120
208 0 0.10 0.50
209 700 0.25 0.60
210 2800 0.50 1.00
211 </tableData>
212 </table>
213 </scheduled_gain>
214
215 <!-- Even with the air slider closed, there is still some small
216 amount of heat transferred via the fuselage.
217 -->
218 <summer name="heat/cabin-air-transfer-fuselage">
219 <input>/environment/temperature-degc</input>
220 <input>-heat/cabin-air-temp-degc</input>
221 <clipto>
222 <min>-0.1</min>
223 <max> 0.1</max>
224 </clipto>
225 </summer>
226
227 <scheduled_gain name="heat/cabin-air-transfer-overhead-vent-left">
228 <input>heat/cabin-air-temp-diff</input>
229 <gain>/controls/climate-control/overhead-vent-front-left</gain>
230 <table>
231 <independentVar>/velocities/airspeed-kt</independentVar>
232 <tableData>
233 40 0.10
234 120 0.50
235 </tableData>
236 </table>
237 </scheduled_gain>
238
239 <scheduled_gain name="heat/cabin-air-transfer-overhead-vent-right">
240 <input>heat/cabin-air-temp-diff</input>
241 <gain>/controls/climate-control/overhead-vent-front-right</gain>
242 <table>
243 <independentVar>/velocities/airspeed-kt</independentVar>
244 <tableData>
245 40 0.10
246 120 0.50
247 </tableData>
248 </table>
249 </scheduled_gain>
250
251 <pure_gain name="heat/cabin-air-transfer-doors-windows">
252 <input>heat/cabin-air-temp-diff</input>
253 <gain>heat/doors-windows-total</gain>
254 </pure_gain>
255
256 <pure_gain name="heat/cabin-air-transfer-humans">
257 <input>heat/cabin-human-temp-diff</input>
258 <gain>heat/humans-count</gain>
259 </pure_gain>
260
261 <summer name="heat/cabin-air-transfer-total">
262 <input>heat/cabin-air-transfer-heat-duct</input>
263 <input>heat/cabin-air-transfer-air-duct</input>
264 <input>heat/cabin-air-transfer-fuselage</input>
265 <input>heat/cabin-air-transfer-overhead-vent-left</input>
266 <input>heat/cabin-air-transfer-overhead-vent-right</input>
267 <input>heat/cabin-air-transfer-doors-windows</input>
268 <input>heat/cabin-air-transfer-humans</input>
269 </summer>
270
271 <integrator name="heat/cabin-air-temp-degc">
272 <input>heat/cabin-air-transfer-total</input>
273
274 <!-- This is the constant that actually controls how fast
275 (or slow) the cabin temperature changes.
276 -->
277 <c1>0.030</c1>
278 </integrator>
279
280 </channel>
281
282 <channel name="surface-temperature">
283
284 <summer name="heat/surface-cabin-heat-transfer">
285 <input>heat/cabin-air-temp-degc</input>
286 <input>-heat/surface-temp-degc</input>
287
288 <!-- If the pilot opens the air slider, the cabin air temp might
289 start increasing or decreasing fast. Clip the difference to
290 limit this effect.
291 -->
292 <clipto>
293 <min>-5.0</min>
294 <max> 5.0</max>
295 </clipto>
296 </summer>
297
298 <integrator name="heat/surface-temp-degc">
299 <input>heat/surface-cabin-heat-transfer</input>
300
301 <!-- This is the constant that actually controls how fast
302 (or slow) the surface temperature changes.
303 -->
304 <c1>0.020</c1>
305 </integrator>
306
307 </channel>
308
309 <channel name="cabin-dewpoint">
310
311 <fcs_function name="heat/non-humans-airflow">
312 <function>
313 <quotient>
314 <sum>
315 <abs>
316 <property>heat/cabin-air-transfer-air-duct</property>
317 </abs>
318 <abs>
319 <product>
320 <quotient>
321 <property>heat/cabin-air-transfer-heat-duct</property>
322 <property>heat/cabin-heat-temp-diff</property>
323 </quotient>
324 <property>heat/cabin-air-temp-diff</property>
325 </product>
326 </abs>
327 <abs>
328 <property>heat/cabin-air-transfer-doors-windows</property>
329 </abs>
330 <abs>
331 <property>heat/cabin-air-transfer-overhead-vent-left</property>
332 </abs>
333 <abs>
334 <property>heat/cabin-air-transfer-overhead-vent-right</property>
335 </abs>
336 </sum>
337 <abs>
338 <property>heat/cabin-air-temp-diff</property>
339 </abs>
340 </quotient>
341 </function>
342 </fcs_function>
343
344 <pure_gain name="heat/humans-airflow">
345 <input>heat/humans-count</input>
346 <gain>0.1</gain>
347 </pure_gain>
348
349 <fcs_function name="heat/future-cabin-rel-humidity">
350 <function>
351 <quotient>
352 <sum>
353 <product>
354 <property>heat/non-humans-airflow</property>
355 <property>/environment/relative-humidity</property>
356 </product>
357 <product>
358 <property>heat/humans-airflow</property>
359 <!-- Human breath: 35 C with 95 % RH -->
360 <value>95.0</value>
361 </product>
362 </sum>
363 <sum>
364 <property>heat/non-humans-airflow</property>
365 <property>heat/humans-airflow</property>
366 </sum>
367 </quotient>
368 </function>
369 </fcs_function>
370
371 <summer name="heat/cabin-rel-humidity-diff">
372 <input>heat/future-cabin-rel-humidity</input>
373 <input>-heat/cabin-relative-humidity</input>
374
375 <clipto>
376 <min>-10.0</min>
377 <max> 10.0</max>
378 </clipto>
379 </summer>
380
381 <integrator name="heat/cabin-relative-humidity">
382 <input>heat/cabin-rel-humidity-diff</input>
383
384 <!-- This is the constant that actually controls how fast
385 (or slow) the cabin relative humidity changes.
386 -->
387 <c1>0.015</c1>
388
389 <!-- Keep relative humidity above zero to prevent
390 math domain error (which happens in ln(x) for x = 0).
391 -->
392 <clipto>
393 <min> 0.1</min>
394 <max>100.0</max>
395 </clipto>
396 </integrator>
397
398 <!-- Computing the dewpoint using the Arden Buck equation:
399
400 y_m(T, RH) = ln(RH/100 * exp((b - T/d) * (T/(c+T)))
401
402 using the following constants:
403
404 b = 17.67; c = 243.5 celsius; d = 234.5 celsius
405
406 from:
407
408 Bolton, D. (1980). The computation of equivalent potential
409 temperature. Monthly weather review, 108(7), 1046-1053.
410 -->
411 <fcs_function name="heat/cabin-dewpoint-ym">
412 <function>
413 <ln>
414 <product>
415 <quotient>
416 <property>heat/cabin-relative-humidity</property>
417 <value>100.0</value>
418 </quotient>
419 <exp>
420 <product>
421 <difference>
422 <value>17.67</value>
423 <quotient>
424 <property>heat/cabin-air-temp-degc</property>
425 <value>234.5</value>
426 </quotient>
427 </difference>
428 <quotient>
429 <property>heat/cabin-air-temp-degc</property>
430 <sum>
431 <value>243.5</value>
432 <property>heat/cabin-air-temp-degc</property>
433 </sum>
434 </quotient>
435 </product>
436 </exp>
437 </product>
438 </ln>
439 </function>
440 </fcs_function>
441
442 <!-- Computing dewpoint using the Arden Buck equation using constants
443 that give a maximum error of 0.1 % for -30.0 <= T <= +35.0.
444
445 Reference: https://en.wikipedia.org/wiki/Dew_point#Calculating_the_dew_point
446 -->
447 <fcs_function name="heat/cabin-dewpoint-degc">
448 <function>
449 <quotient>
450 <product>
451 <value>243.5</value>
452 <property>heat/cabin-dewpoint-ym</property>
453 </product>
454 <difference>
455 <value>17.67</value>
456 <property>heat/cabin-dewpoint-ym</property>
457 </difference>
458 </quotient>
459 </function>
460 </fcs_function>
461
462 <!-- Normalized human perception of dew point:
463
464 0.0 is dry; 0.1 - 0.5 is comfortable; 0.7 is somewhat uncomfortable;
465 0.8 - 0.9 is very uncomfortable; 1.0 is extremely high.
466
467 Reference: https://en.wikipedia.org/wiki/Dew_point#Relationship_to_human_comfort
468 -->
469 <fcs_function name="heat/cabin-dewpoint-perception-norm">
470 <function>
471 <table>
472 <independentVar>heat/cabin-dewpoint-degc</independentVar>
473 <tableData>
474 10 0.0
475 13 0.3
476 16 0.5
477 18 0.7
478 21 0.8
479 24 0.9
480 26 1.0
481 </tableData>
482 </table>
483 </function>
484 </fcs_function>
485
486 </channel>
487
488 <channel name="fog-and-frost">
489
490 <summer name="heat/surface-dewpoint-diff">
491 <input>heat/cabin-dewpoint-degc</input>
492 <input>-heat/surface-temp-degc</input>
493
494 <!-- Small maximum to slowdown increase and decrease of fog
495 and frost.
496 -->
497 <clipto>
498 <min>-0.5</min>
499 <max> 0.5</max>
500 </clipto>
501 </summer>
502
503 <switch name="heat/moisture-windup-trigger">
504 <default value="0"/>
505
506 <test logic="AND" value="1">
507 heat/surface-dewpoint-diff GT 0
508 heat/moisture-norm GE 1
509 </test>
510
511 <test logic="AND" value="1">
512 heat/surface-dewpoint-diff LT 0
513 heat/moisture-norm LE 0
514 </test>
515 </switch>
516
517 <integrator name="heat/moisture-norm">
518 <input>heat/surface-dewpoint-diff</input>
519 <trigger>heat/moisture-windup-trigger</trigger>
520
521 <!-- This is the constant that actually controls how fast
522 (or slow) the moisture changes.
523 -->
524 <c1>0.010</c1>
525
526 <clipto>
527 <min>0.0</min>
528 <max>1.0</max>
529 </clipto>
530 </integrator>
531
532 <pure_gain name="heat/moisture-fog-level">
533 <input>heat/moisture-norm</input>
534 <gain>1.6</gain>
535 </pure_gain>
536
537 <pure_gain name="heat/moisture-frost-level">
538 <input>heat/moisture-norm</input>
539 <gain>1.0</gain>
540 </pure_gain>
541
542 <switch name="heat/fog-level">
543 <default value="heat/moisture-fog-level"/>
544 <test logic="AND" value="0">
545 heat/cabin-air-temp-degc LE 0
546 </test>
547 </switch>
548
549 <switch name="heat/frost-level">
550 <default value="heat/moisture-frost-level"/>
551 <test logic="AND" value="0">
552 heat/cabin-air-temp-degc GT 0
553 </test>
554 </switch>
555
556 </channel>
557
558 </system>