@open3cl/engine 1.8.41 → 1.8.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/5_conso_ventilation.js +10 -2
- package/5_conso_ventilation.spec.js +35 -11
- package/README.md +13 -13
- package/engine.js +1 -1
- package/package.json +1 -1
package/5_conso_ventilation.js
CHANGED
|
@@ -30,6 +30,15 @@ const pvent_immeuble = {
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Ratio du temps d'utilisation du mode mécanique d'une ventilation hybride (valeurs tabulées).
|
|
35
|
+
* Les valeurs arrondies de la méthode sont appliquées telles quelles (et non 14/168 ou 28/168),
|
|
36
|
+
* comme dans le moteur de référence (Calcul_ventilation.cs, Calcul_Paux : 0,083 / 0,167).
|
|
37
|
+
* @see Methode_de_calcul_3CL_DPE_2021-338.pdf - §5, page 42
|
|
38
|
+
*/
|
|
39
|
+
export const RATIO_HYBRIDE_INDIVIDUEL = 0.083;
|
|
40
|
+
export const RATIO_HYBRIDE_COLLECTIF = 0.167;
|
|
41
|
+
|
|
33
42
|
/**
|
|
34
43
|
* 5 - Calcul des consommations d’auxiliaires de ventilation
|
|
35
44
|
* Retourne le coefficient en fonction du type d'habitation et du type de ventilation
|
|
@@ -42,8 +51,7 @@ function getCoefficient(th, hybride) {
|
|
|
42
51
|
if (!hybride) {
|
|
43
52
|
return 1;
|
|
44
53
|
}
|
|
45
|
-
|
|
46
|
-
return ratio / (24 * 7);
|
|
54
|
+
return th === 'maison' ? RATIO_HYBRIDE_INDIVIDUEL : RATIO_HYBRIDE_COLLECTIF;
|
|
47
55
|
}
|
|
48
56
|
|
|
49
57
|
export default function calc_pvent(di, de, du, th) {
|
|
@@ -9,7 +9,11 @@ vi.mock('./utils.js', () => ({
|
|
|
9
9
|
requestInput: (de, du, field) => de[field]
|
|
10
10
|
}));
|
|
11
11
|
|
|
12
|
-
const {
|
|
12
|
+
const {
|
|
13
|
+
default: calc_pvent,
|
|
14
|
+
RATIO_HYBRIDE_INDIVIDUEL,
|
|
15
|
+
RATIO_HYBRIDE_COLLECTIF
|
|
16
|
+
} = await import('./5_conso_ventilation.js');
|
|
13
17
|
|
|
14
18
|
/**
|
|
15
19
|
* 5. Consommation des auxiliaires de ventilation
|
|
@@ -49,12 +53,11 @@ describe('calc_pvent - consommation des auxiliaires de ventilation', () => {
|
|
|
49
53
|
expect(di.pvent_moy).toBe(80);
|
|
50
54
|
});
|
|
51
55
|
|
|
52
|
-
test("maison, ventilation hybride : ratio de temps d'utilisation
|
|
56
|
+
test("maison, ventilation hybride : ratio de temps d'utilisation tabulé (0,083)", () => {
|
|
53
57
|
const de = { type_ventilation: 'ventilation hybride après 2012', ventilation_post_2012: 1 };
|
|
54
58
|
calc_pvent(di, de, du, 'maison');
|
|
55
|
-
// hybride => type 'simple flux auto', post_2012 forcé à 0, coef =
|
|
56
|
-
|
|
57
|
-
expect(di.pvent_moy).toBeCloseTo(65 * coef, 10);
|
|
59
|
+
// hybride => type 'simple flux auto', post_2012 forcé à 0, coef = 0,083 (valeur tabulée §5 p.42)
|
|
60
|
+
expect(di.pvent_moy).toBeCloseTo(65 * 0.083, 10);
|
|
58
61
|
});
|
|
59
62
|
|
|
60
63
|
test('immeuble, VMC double flux : Pvent proratisé au débit et à la surface ventilée', () => {
|
|
@@ -70,8 +73,8 @@ describe('calc_pvent - consommation des auxiliaires de ventilation', () => {
|
|
|
70
73
|
expect(di.conso_auxiliaire_ventilation).toBeCloseTo(8.76 * 110, 10);
|
|
71
74
|
});
|
|
72
75
|
|
|
73
|
-
test("immeuble, ventilation hybride : ratio de temps d'utilisation
|
|
74
|
-
// Branche `th !== 'maison'` du ratio hybride (
|
|
76
|
+
test("immeuble, ventilation hybride : ratio de temps d'utilisation collectif tabulé (0,167)", () => {
|
|
77
|
+
// Branche `th !== 'maison'` du ratio hybride (0,167 au lieu de 0,083)
|
|
75
78
|
di.qvarep_conv = 2;
|
|
76
79
|
const de = {
|
|
77
80
|
type_ventilation: 'ventilation hybride de 2001 à 2012',
|
|
@@ -80,8 +83,29 @@ describe('calc_pvent - consommation des auxiliaires de ventilation', () => {
|
|
|
80
83
|
};
|
|
81
84
|
calc_pvent(di, de, du, 'immeuble');
|
|
82
85
|
// hybride => type 'simple flux auto', post_2012 forcé à 0 => pvent_immeuble = 0.46
|
|
83
|
-
|
|
84
|
-
|
|
86
|
+
expect(di.pvent_moy).toBeCloseTo(0.46 * 2 * 50 * 0.167, 10);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
test('ventilation hybride : ratios tabulés de la méthode, pas 14/168 ni 28/168', () => {
|
|
90
|
+
// @see Methode_de_calcul_3CL_DPE_2021-338.pdf - §5 page 42 (Collectif 0,167 / individuel 0,083)
|
|
91
|
+
expect(RATIO_HYBRIDE_INDIVIDUEL).toBe(0.083);
|
|
92
|
+
expect(RATIO_HYBRIDE_COLLECTIF).toBe(0.167);
|
|
93
|
+
expect(RATIO_HYBRIDE_INDIVIDUEL).not.toBeCloseTo(14 / 168, 4);
|
|
94
|
+
expect(RATIO_HYBRIDE_COLLECTIF).not.toBeCloseTo(28 / 168, 4);
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
test('appartement, ventilation hybride : ratio collectif (0,167) et consommation = 8,76 × Pvent', () => {
|
|
98
|
+
// Valeur de référence : autotest CSTB APP4-0-13 (hybride, Qvarep 1,17, Sh 96 m²) =>
|
|
99
|
+
// Pventmoy Tribu = 0,46 × 1,17 × 96 × 0,167 = 8,6284224 W
|
|
100
|
+
di.qvarep_conv = 1.17;
|
|
101
|
+
const de = {
|
|
102
|
+
type_ventilation: 'ventilation hybride après 2012',
|
|
103
|
+
ventilation_post_2012: 1,
|
|
104
|
+
surface_ventile: 96
|
|
105
|
+
};
|
|
106
|
+
calc_pvent(di, de, du, 'appartement');
|
|
107
|
+
expect(di.pvent_moy).toBeCloseTo(8.6284224, 9);
|
|
108
|
+
expect(di.conso_auxiliaire_ventilation).toBeCloseTo(8.76 * 8.6284224, 9);
|
|
85
109
|
});
|
|
86
110
|
});
|
|
87
111
|
|
|
@@ -119,12 +143,12 @@ describe('calc_pvent - routage de tous les types de ventilation', () => {
|
|
|
119
143
|
];
|
|
120
144
|
|
|
121
145
|
test.each(hybrides)(
|
|
122
|
-
'ventilation hybride "%s" : simple flux auto avec ratio
|
|
146
|
+
'ventilation hybride "%s" : simple flux auto avec ratio 0,083 (maison)',
|
|
123
147
|
(type_ventilation) => {
|
|
124
148
|
const di = {};
|
|
125
149
|
// Même avec ventilation_post_2012 = 1, l'hybride force post_2012 = 0 (=> 65 W)
|
|
126
150
|
calc_pvent(di, { type_ventilation, ventilation_post_2012: 1 }, {}, 'maison');
|
|
127
|
-
expect(di.pvent_moy).toBeCloseTo(65 *
|
|
151
|
+
expect(di.pvent_moy).toBeCloseTo(65 * 0.083, 10);
|
|
128
152
|
}
|
|
129
153
|
);
|
|
130
154
|
|
package/README.md
CHANGED
|
@@ -370,7 +370,7 @@ Ces résultats sont **générés automatiquement** à la fin de `npm run test:co
|
|
|
370
370
|
|
|
371
371
|
<!-- CORPUS:START -->
|
|
372
372
|
|
|
373
|
-
> **Version `1.8.
|
|
373
|
+
> **Version `1.8.41`** · branche `main` · généré le 2026-10-10
|
|
374
374
|
> Seuil de tolérance **5%**
|
|
375
375
|
|
|
376
376
|
<table>
|
|
@@ -403,24 +403,24 @@ Ces résultats sont **générés automatiquement** à la fin de `npm run test:co
|
|
|
403
403
|
|
|
404
404
|
<table>
|
|
405
405
|
<tr>
|
|
406
|
-
<td align="center"><strong>
|
|
407
|
-
<td align="center"><strong>4,
|
|
406
|
+
<td align="center"><strong>5,03 ms</strong><br/><sub>moyenne</sub></td>
|
|
407
|
+
<td align="center"><strong>4,37 ms</strong><br/><sub>médiane</sub></td>
|
|
408
408
|
<td align="center"><strong>0,12 ms</strong><br/><sub>min</sub></td>
|
|
409
|
-
<td align="center"><strong>
|
|
409
|
+
<td align="center"><strong>579,2 ms</strong><br/><sub>max</sub></td>
|
|
410
410
|
</tr>
|
|
411
411
|
</table>
|
|
412
412
|
|
|
413
413
|
| Corpus | Moyenne | Médiane | Min | Max | p95 | p99 |
|
|
414
414
|
| :--------------------------------------------- | ------: | ------: | ------: | -------: | ------: | ------: |
|
|
415
|
-
| **Généraliste** | 4,
|
|
416
|
-
| **Appartement · chauffage individuel (2025)** | 3,
|
|
417
|
-
| **Logement individuel (2025)** |
|
|
418
|
-
| **Maison individuelle (2025)** | 5,
|
|
419
|
-
| **Immeuble · chauffage individuel** |
|
|
420
|
-
| **Appartement · chauffage collectif (2025)** | 4,
|
|
421
|
-
| **Immeuble · chauffage collectif** | 5,
|
|
422
|
-
| **Immeuble · chauffage mixte** | 4,
|
|
423
|
-
| **Individuel généré depuis l'immeuble (2026)** | 5,
|
|
415
|
+
| **Généraliste** | 4,29 ms | 3,83 ms | 0,23 ms | 32,6 ms | 7,90 ms | 10,9 ms |
|
|
416
|
+
| **Appartement · chauffage individuel (2025)** | 3,69 ms | 3,37 ms | 1,32 ms | 28,5 ms | 6,33 ms | 8,22 ms |
|
|
417
|
+
| **Logement individuel (2025)** | 5,06 ms | 4,44 ms | 1,56 ms | 66,4 ms | 9,43 ms | 13,7 ms |
|
|
418
|
+
| **Maison individuelle (2025)** | 5,88 ms | 5,24 ms | 1,90 ms | 49,5 ms | 10,6 ms | 14,2 ms |
|
|
419
|
+
| **Immeuble · chauffage individuel** | 6,22 ms | 5,27 ms | 0,12 ms | 84,0 ms | 12,6 ms | 19,7 ms |
|
|
420
|
+
| **Appartement · chauffage collectif (2025)** | 4,18 ms | 3,77 ms | 1,37 ms | 36,4 ms | 6,96 ms | 8,88 ms |
|
|
421
|
+
| **Immeuble · chauffage collectif** | 5,43 ms | 4,57 ms | 0,14 ms | 114,1 ms | 9,98 ms | 17,3 ms |
|
|
422
|
+
| **Immeuble · chauffage mixte** | 4,88 ms | 3,99 ms | 0,20 ms | 579,2 ms | 9,79 ms | 16,2 ms |
|
|
423
|
+
| **Individuel généré depuis l'immeuble (2026)** | 5,64 ms | 4,81 ms | 1,59 ms | 57,5 ms | 10,6 ms | 16,2 ms |
|
|
424
424
|
|
|
425
425
|
<sub>La moyenne est tirée vers le haut par les DPE collectifs, dont le coût atteint plusieurs
|
|
426
426
|
dizaines de fois la médiane : c’est la médiane qui décrit le cas courant, et p95/p99 le cas
|
package/engine.js
CHANGED
|
@@ -33,7 +33,7 @@ import getFicheTechnique from './ficheTechnique.js';
|
|
|
33
33
|
import { ProductionENR, ratioProrataPvLogement } from './16.2_production_enr.js';
|
|
34
34
|
import DpeSanitizerService from './dpe-sanitizer.service.js';
|
|
35
35
|
|
|
36
|
-
const LIB_VERSION = '1.8.
|
|
36
|
+
const LIB_VERSION = '1.8.42';
|
|
37
37
|
|
|
38
38
|
const dpeSanitizerService = new DpeSanitizerService();
|
|
39
39
|
|