@open3cl/engine 1.0.0
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/10_besoin_fr.js +76 -0
- package/10_clim.js +45 -0
- package/11_besoin_ecs.js +25 -0
- package/11_ecs.js +95 -0
- package/11_nadeq.js +87 -0
- package/11_nadeq.spec.js +55 -0
- package/12.4_pac.js +54 -0
- package/13.2_generateur_combustion.js +295 -0
- package/13.2_generateur_combustion_bouilleur.js +173 -0
- package/13.2_generateur_combustion_ch.js +195 -0
- package/13.2_generateur_combustion_chaudiere.js +151 -0
- package/13.2_generateur_pac.js +36 -0
- package/13_rendement_distribution_ecs.js +12 -0
- package/14_generateur_ecs.js +388 -0
- package/15_conso_aux.js +257 -0
- package/16.2_production_enr.js +328 -0
- package/16.2_production_enr.spec.js +251 -0
- package/16_conso_eclairage.js +37 -0
- package/2021_04_13_confort_ete.js +61 -0
- package/2021_04_13_qualite_isolation.js +174 -0
- package/3.1_b.js +141 -0
- package/3.2.1_mur.js +331 -0
- package/3.2.1_mur.spec.js +46 -0
- package/3.2.2_plancher_bas.js +259 -0
- package/3.2.2_plancher_bas.spec.js +88 -0
- package/3.2.3_plancher_haut.js +158 -0
- package/3.3.1.4_porte.js +32 -0
- package/3.3_baie_vitree.js +308 -0
- package/3.3_baie_vitree.spec.js +333 -0
- package/3.4_pont_thermique.js +463 -0
- package/3_deperdition.js +258 -0
- package/4_ventilation.js +197 -0
- package/5_conso_ventilation.js +127 -0
- package/6.1_apport_gratuit.js +61 -0
- package/6.1_apport_gratuit.spec.js +181 -0
- package/6.2_surface_sud_equivalente.js +109 -0
- package/7_inertie.js +178 -0
- package/7_inertie.spec.js +263 -0
- package/8_intermittence.js +5 -0
- package/9_besoin_ch.js +198 -0
- package/9_chauffage.js +291 -0
- package/9_chauffage.spec.js +101 -0
- package/9_conso_ch.js +95 -0
- package/9_conso_ch.spec.js +255 -0
- package/9_emetteur_ch.js +122 -0
- package/9_generateur_ch.js +230 -0
- package/9_generateur_ch.spec.js +87 -0
- package/README.md +43 -0
- package/apport_et_besoin.js +55 -0
- package/conso.js +529 -0
- package/conso.spec.js +90 -0
- package/core/assets/domain/add-additionnal-ue-values-tables.js +57 -0
- package/core/assets/domain/synchronize-assets.js +29 -0
- package/core/assets/domain/synchronize-assets.spec.js +37 -0
- package/core/assets/domain/synchronize-c1-tables.js +61 -0
- package/core/assets/domain/synchronize-c1-tables.spec.js +35 -0
- package/core/assets/domain/synchronize-dpe-ges-limit-values-tables.js +73 -0
- package/core/assets/domain/synchronize-dpe-ges-limit-values-tables.spec.js +72 -0
- package/core/assets/domain/synchronize-enum-tables.js +77 -0
- package/core/assets/domain/synchronize-enum-tables.spec.js +31 -0
- package/core/assets/domain/synchronize-solicitations-tables.js +72 -0
- package/core/assets/domain/synchronize-solicitations-tables.spec.js +47 -0
- package/core/assets/domain/synchronize-valeur-tables.js +146 -0
- package/core/assets/domain/synchronize-valeur-tables.spec.js +54 -0
- package/core/conf/infrastructure/application.config.js +33 -0
- package/core/file/infrastructure/adapter/file.store.js +75 -0
- package/core/file/infrastructure/adapter/file.store.spec.js +30 -0
- package/core/tv/infrastructure/assets/additional-ue-values.js +69 -0
- package/core/tv/infrastructure/tvs.store.js +40 -0
- package/core/tv/infrastructure/tvs.store.spec.js +34 -0
- package/core/util/infrastructure/object-util.js +23 -0
- package/core/util/infrastructure/object-util.spec.js +25 -0
- package/engine.js +503 -0
- package/enums.js +1155 -0
- package/ficheTechnique.js +86 -0
- package/ficheTechnique.spec.js +181 -0
- package/index.js +4 -0
- package/package.json +87 -0
- package/tv/18.2_sollicitations_ext.ods +0 -0
- package/tv/18.5_c1.ods +0 -0
- package/tv/dpe_ges_limit_values.ods +0 -0
- package/tv.js +80811 -0
- package/tvs.d.ts +7 -0
- package/utils.js +500 -0
- package/utils.spec.js +36 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { Inertie } from './7_inertie.js';
|
|
2
|
+
|
|
3
|
+
describe('Inertie unit tests', () => {
|
|
4
|
+
/**
|
|
5
|
+
* @see : Methode_de_calcul_3CL_DPE_2021-338.pdf Page 53
|
|
6
|
+
*/
|
|
7
|
+
const inertie = new Inertie();
|
|
8
|
+
|
|
9
|
+
it.each([
|
|
10
|
+
[1, 1, 0, 9],
|
|
11
|
+
[1, 1, 0, 11],
|
|
12
|
+
[1, 1, 0, 12],
|
|
13
|
+
[0, 1, 0, 10],
|
|
14
|
+
[1, 0, 2, 9],
|
|
15
|
+
[1, 0, 4, 9],
|
|
16
|
+
[1, 0, 9, 9],
|
|
17
|
+
[0, 0, 9, 10],
|
|
18
|
+
[0, 0, 3, 9],
|
|
19
|
+
[0, 0, 3, 9]
|
|
20
|
+
])(
|
|
21
|
+
'should get inertie %s for plancher_bas with methode_saisie_u %s, type_isolation_id %s and type_plancher_bas %s',
|
|
22
|
+
(
|
|
23
|
+
inertie_result,
|
|
24
|
+
enum_methode_saisie_u_id,
|
|
25
|
+
enum_type_isolation_id,
|
|
26
|
+
enum_type_plancher_bas_id
|
|
27
|
+
) => {
|
|
28
|
+
const de = {
|
|
29
|
+
enum_methode_saisie_u_id,
|
|
30
|
+
enum_type_isolation_id,
|
|
31
|
+
enum_type_plancher_bas_id
|
|
32
|
+
};
|
|
33
|
+
expect(inertie.calculateInertiePbLourd(de)).toBe(inertie_result);
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
it.each([
|
|
38
|
+
[1, 2, 8],
|
|
39
|
+
[1, 4, 8],
|
|
40
|
+
[1, 9, 8],
|
|
41
|
+
[0, 1, 8],
|
|
42
|
+
[1, 2, 8],
|
|
43
|
+
[1, 2, 11],
|
|
44
|
+
[0, 3, 8]
|
|
45
|
+
])(
|
|
46
|
+
'should get inertie %s for plancher_haut with type_isolation_id %s and type_plancher_haut %s',
|
|
47
|
+
(inertie_result, enum_type_isolation_id, enum_type_plancher_haut_id) => {
|
|
48
|
+
const de = {
|
|
49
|
+
enum_type_isolation_id,
|
|
50
|
+
enum_type_plancher_haut_id
|
|
51
|
+
};
|
|
52
|
+
expect(inertie.calculateInertiePhLourd(de)).toBe(inertie_result);
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
it.each([
|
|
57
|
+
[1, 1, 0, 2, 0],
|
|
58
|
+
[1, 1, 0, 3, 0],
|
|
59
|
+
[1, 1, 0, 4, 0],
|
|
60
|
+
[1, 1, 0, 19, 0],
|
|
61
|
+
[1, 0, 2, 19, 0],
|
|
62
|
+
[1, 0, 4, 19, 0],
|
|
63
|
+
[1, 0, 9, 19, 0],
|
|
64
|
+
[0, 0, 1, 19, 0],
|
|
65
|
+
[1, 1, 0, 11, 8.3],
|
|
66
|
+
[1, 1, 0, 13, 8.3],
|
|
67
|
+
[0, 1, 0, 11, 6.2],
|
|
68
|
+
[0, 1, 0, 13, 6.2],
|
|
69
|
+
[1, 1, 0, 12, 11.3],
|
|
70
|
+
[0, 1, 0, 12, 9.2],
|
|
71
|
+
[1, 1, 0, 8, 10.6],
|
|
72
|
+
[0, 1, 0, 8, 9.2],
|
|
73
|
+
[1, 1, 0, 9, 10.6],
|
|
74
|
+
[0, 1, 0, 9, 9.2],
|
|
75
|
+
[1, 1, 0, 10, 10.6],
|
|
76
|
+
[0, 1, 0, 10, 9.2],
|
|
77
|
+
[1, 1, 0, 15, 10.6],
|
|
78
|
+
[0, 1, 0, 15, 9.2],
|
|
79
|
+
[0, 0, 0, 15, 9.2]
|
|
80
|
+
])(
|
|
81
|
+
'should get inertie %s for mur with methode_saisie_u %s, type_isolation_id %s, materiaux_structure_mur %s and epaisseur_structure %s',
|
|
82
|
+
(
|
|
83
|
+
inertie_result,
|
|
84
|
+
enum_methode_saisie_u_id,
|
|
85
|
+
enum_type_isolation_id,
|
|
86
|
+
enum_materiaux_structure_mur_id,
|
|
87
|
+
epaisseur_structure
|
|
88
|
+
) => {
|
|
89
|
+
const de = {
|
|
90
|
+
enum_methode_saisie_u_id,
|
|
91
|
+
enum_type_isolation_id,
|
|
92
|
+
enum_materiaux_structure_mur_id,
|
|
93
|
+
epaisseur_structure
|
|
94
|
+
};
|
|
95
|
+
expect(inertie.calculateInertieMurLourd(de)).toBe(inertie_result);
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
|
|
99
|
+
test('should get inertie for mur getting epaisseur_structure from description', () => {
|
|
100
|
+
const de = {
|
|
101
|
+
enum_type_isolation_id: 2,
|
|
102
|
+
enum_materiaux_structure_mur_id: 12
|
|
103
|
+
};
|
|
104
|
+
expect(inertie.calculateInertieMurLourd(de)).toBe(0);
|
|
105
|
+
|
|
106
|
+
de.description = "Mur en blocs de béton creux d'''épaisseur ≥ 25 cm non isolé";
|
|
107
|
+
expect(inertie.calculateInertieMurLourd(de)).toBe(1);
|
|
108
|
+
|
|
109
|
+
de.description = "Mur en blocs de béton creux d'épaisseur 4 cm non isolé";
|
|
110
|
+
expect(inertie.calculateInertieMurLourd(de)).toBe(0);
|
|
111
|
+
|
|
112
|
+
de.description = 'Mur en blocs de béton creux';
|
|
113
|
+
expect(inertie.calculateInertieMurLourd(de)).toBe(0);
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
test('should get inertie for plancher_bas with the majority surface', () => {
|
|
117
|
+
const enveloppe = {
|
|
118
|
+
plancher_bas_collection: {
|
|
119
|
+
plancher_bas: [
|
|
120
|
+
{
|
|
121
|
+
donnee_entree: {
|
|
122
|
+
enum_methode_saisie_u_id: 1,
|
|
123
|
+
enum_type_plancher_bas_id: 9,
|
|
124
|
+
surface_paroi_opaque: 100
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
donnee_entree: {
|
|
129
|
+
enum_methode_saisie_u_id: 0,
|
|
130
|
+
enum_type_plancher_bas_id: 9,
|
|
131
|
+
surface_paroi_opaque: 25
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
plancher_haut_collection: {},
|
|
137
|
+
mur_collection: {}
|
|
138
|
+
};
|
|
139
|
+
// surface plancher_bas_lourd > 0.5 * surface plancher_bas
|
|
140
|
+
expect(inertie.calculateInertie(enveloppe).inertie_plancher_bas_lourd).toBe(1);
|
|
141
|
+
|
|
142
|
+
enveloppe.plancher_bas_collection.plancher_bas[0].donnee_entree.surface_paroi_opaque = 18;
|
|
143
|
+
|
|
144
|
+
// surface plancher_bas_lourd < 0.5 * surface plancher_bas
|
|
145
|
+
expect(inertie.calculateInertie(enveloppe).inertie_plancher_bas_lourd).toBe(0);
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
test('should get inertie for plancher_haut with the majority surface', () => {
|
|
149
|
+
const enveloppe = {
|
|
150
|
+
plancher_haut_collection: {
|
|
151
|
+
plancher_haut: [
|
|
152
|
+
{
|
|
153
|
+
donnee_entree: {
|
|
154
|
+
enum_type_isolation_id: 2,
|
|
155
|
+
enum_type_plancher_haut_id: 8,
|
|
156
|
+
surface_paroi_opaque: 100
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
donnee_entree: {
|
|
161
|
+
enum_type_isolation_id: 0,
|
|
162
|
+
enum_type_plancher_haut_id: 8,
|
|
163
|
+
surface_paroi_opaque: 25
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
plancher_bas_collection: {},
|
|
169
|
+
mur_collection: {}
|
|
170
|
+
};
|
|
171
|
+
// surface plancher_haut_lourd > 0.5 * surface plancher_haut
|
|
172
|
+
expect(inertie.calculateInertie(enveloppe).inertie_plancher_haut_lourd).toBe(1);
|
|
173
|
+
|
|
174
|
+
enveloppe.plancher_haut_collection.plancher_haut[0].donnee_entree.surface_paroi_opaque = 18;
|
|
175
|
+
|
|
176
|
+
// surface plancher_haut_lourd < 0.5 * surface plancher_haut
|
|
177
|
+
expect(inertie.calculateInertie(enveloppe).inertie_plancher_haut_lourd).toBe(0);
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
test('should get inertie for mur with the majority surface', () => {
|
|
181
|
+
const enveloppe = {
|
|
182
|
+
mur_collection: {
|
|
183
|
+
mur: [
|
|
184
|
+
{
|
|
185
|
+
donnee_entree: {
|
|
186
|
+
enum_type_isolation_id: 2,
|
|
187
|
+
enum_materiaux_structure_mur_id: 2,
|
|
188
|
+
surface_paroi_opaque: 100
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
donnee_entree: {
|
|
193
|
+
enum_type_isolation_id: 1,
|
|
194
|
+
enum_materiaux_structure_mur_id: 2,
|
|
195
|
+
surface_paroi_opaque: 25
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
plancher_bas_collection: {},
|
|
201
|
+
plancher_haut_collection: {}
|
|
202
|
+
};
|
|
203
|
+
// surface mur_lourd > 0.5 * surface mur
|
|
204
|
+
expect(inertie.calculateInertie(enveloppe).inertie_paroi_verticale_lourd).toBe(1);
|
|
205
|
+
|
|
206
|
+
enveloppe.mur_collection.mur[0].donnee_entree.surface_paroi_opaque = 18;
|
|
207
|
+
|
|
208
|
+
// surface mur_lourd < 0.5 * surface mur
|
|
209
|
+
expect(inertie.calculateInertie(enveloppe).inertie_paroi_verticale_lourd).toBe(0);
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
test('should get enum_classe_inertie_id', () => {
|
|
213
|
+
const enveloppe = {
|
|
214
|
+
mur_collection: {
|
|
215
|
+
mur: [
|
|
216
|
+
{
|
|
217
|
+
donnee_entree: {
|
|
218
|
+
enum_type_isolation_id: 2,
|
|
219
|
+
enum_materiaux_structure_mur_id: 2,
|
|
220
|
+
surface_paroi_opaque: 100
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
plancher_bas_collection: {
|
|
226
|
+
plancher_bas: [
|
|
227
|
+
{
|
|
228
|
+
donnee_entree: {
|
|
229
|
+
enum_type_isolation_id: 2,
|
|
230
|
+
enum_type_plancher_bas_id: 9,
|
|
231
|
+
surface_paroi_opaque: 100
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
},
|
|
236
|
+
plancher_haut_collection: {
|
|
237
|
+
plancher_haut: [
|
|
238
|
+
{
|
|
239
|
+
donnee_entree: {
|
|
240
|
+
enum_type_isolation_id: 2,
|
|
241
|
+
enum_type_plancher_haut_id: 8,
|
|
242
|
+
surface_paroi_opaque: 100
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
]
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
// inertie_plancher_bas_lourd = 1 + inertie_plancher_haut_lourd = 1 + inertie_paroi_verticale_lourd = 1
|
|
249
|
+
expect(inertie.calculateInertie(enveloppe).enum_classe_inertie_id).toBe('1');
|
|
250
|
+
|
|
251
|
+
// inertie_plancher_bas_lourd = 1 + inertie_plancher_haut_lourd = 1 + inertie_paroi_verticale_lourd = 0
|
|
252
|
+
enveloppe.mur_collection.mur[0].donnee_entree.enum_type_isolation_id = 0;
|
|
253
|
+
expect(inertie.calculateInertie(enveloppe).enum_classe_inertie_id).toBe('2');
|
|
254
|
+
|
|
255
|
+
// inertie_plancher_bas_lourd = 1 + inertie_plancher_haut_lourd = 0 + inertie_paroi_verticale_lourd = 0
|
|
256
|
+
enveloppe.plancher_haut_collection.plancher_haut[0].donnee_entree.enum_type_isolation_id = 0;
|
|
257
|
+
expect(inertie.calculateInertie(enveloppe).enum_classe_inertie_id).toBe('3');
|
|
258
|
+
|
|
259
|
+
// inertie_plancher_bas_lourd = 0 + inertie_plancher_haut_lourd = 0 + inertie_paroi_verticale_lourd = 0
|
|
260
|
+
enveloppe.plancher_bas_collection.plancher_bas[0].donnee_entree.enum_type_isolation_id = 0;
|
|
261
|
+
expect(inertie.calculateInertie(enveloppe).enum_classe_inertie_id).toBe('4');
|
|
262
|
+
});
|
|
263
|
+
});
|
package/9_besoin_ch.js
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import enums from './enums.js';
|
|
2
|
+
import tvs from './tv.js';
|
|
3
|
+
import { calc_Qdw_j } from './14_generateur_ecs.js';
|
|
4
|
+
import { calc_besoin_ecs_j } from './11_besoin_ecs.js';
|
|
5
|
+
import { calc_Qrec_gen_j } from './9_generateur_ch.js';
|
|
6
|
+
import { calc_ai_j, calc_as_j } from './6.1_apport_gratuit.js';
|
|
7
|
+
import { calc_sse_j } from './6.2_surface_sud_equivalente.js';
|
|
8
|
+
import { mois_liste } from './utils.js';
|
|
9
|
+
|
|
10
|
+
export default function calc_besoin_ch(
|
|
11
|
+
ilpa,
|
|
12
|
+
ca_id,
|
|
13
|
+
zc_id,
|
|
14
|
+
inertie_id,
|
|
15
|
+
Sh,
|
|
16
|
+
GV,
|
|
17
|
+
nadeq,
|
|
18
|
+
instal_ecs,
|
|
19
|
+
instal_ch,
|
|
20
|
+
bv,
|
|
21
|
+
ets
|
|
22
|
+
) {
|
|
23
|
+
const ca = enums.classe_altitude[ca_id];
|
|
24
|
+
const zc = enums.zone_climatique[zc_id];
|
|
25
|
+
const inertie = enums.classe_inertie[inertie_id];
|
|
26
|
+
|
|
27
|
+
let besoin_ch = 0;
|
|
28
|
+
let besoin_ch_depensier = 0;
|
|
29
|
+
|
|
30
|
+
const dh21 = tvs.dh21[ilpa];
|
|
31
|
+
const dh19 = tvs.dh19[ilpa];
|
|
32
|
+
const Nref21 = tvs.nref21[ilpa];
|
|
33
|
+
const Nref19 = tvs.nref19[ilpa];
|
|
34
|
+
|
|
35
|
+
let sumNref19 = 0;
|
|
36
|
+
let sumNref21 = 0;
|
|
37
|
+
let sumDh19 = 0;
|
|
38
|
+
let sumDh21 = 0;
|
|
39
|
+
let QrecDistr = 0;
|
|
40
|
+
let QrecDistrDepensier = 0;
|
|
41
|
+
const e = tvs.e[ilpa];
|
|
42
|
+
|
|
43
|
+
let pertes_distribution_ecs_recup = 0;
|
|
44
|
+
let pertes_distribution_ecs_recup_depensier = 0;
|
|
45
|
+
let pertes_stockage_ecs_recup = 0;
|
|
46
|
+
let pertes_stockage_ecs_recup_depensier = 0;
|
|
47
|
+
let pertes_generateur_ch_recup = 0;
|
|
48
|
+
let pertes_generateur_ch_recup_depensier = 0;
|
|
49
|
+
let fraction_apport_gratuit_ch = 0;
|
|
50
|
+
let fraction_apport_gratuit_depensier_ch = 0;
|
|
51
|
+
|
|
52
|
+
const Qgw_total = instal_ecs.reduce((acc, instal_ecs) => {
|
|
53
|
+
const gen_ecs = instal_ecs.generateur_ecs_collection.generateur_ecs;
|
|
54
|
+
|
|
55
|
+
// 17.2.1.1 Calcul des consommations de chauffage, de refroidissement, d’ECS et d’auxiliaires
|
|
56
|
+
// Pour les installations ECS collectives, pas de récupération de stockage d'ECS
|
|
57
|
+
if (Number.parseInt(instal_ecs.donnee_entree.enum_type_installation_id) !== 1) {
|
|
58
|
+
return acc;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
acc +
|
|
63
|
+
gen_ecs.reduce((acc, gen_ecs) => {
|
|
64
|
+
// Pas de récupération de stockage si le ballon est hors volume chauffé
|
|
65
|
+
if (
|
|
66
|
+
gen_ecs.donnee_entree.position_volume_chauffe_stockage === 0 ||
|
|
67
|
+
gen_ecs.donnee_entree.position_volume_chauffe === 0
|
|
68
|
+
) {
|
|
69
|
+
return acc;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return acc + (gen_ecs.donnee_intermediaire.Qgw || 0);
|
|
73
|
+
}, 0)
|
|
74
|
+
);
|
|
75
|
+
}, 0);
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* 11.4 Plusieurs systèmes d’ECS (limité à 2 systèmes différents par logement)
|
|
79
|
+
* Les besoins en ECS pour chaque générateur sont / 2
|
|
80
|
+
*/
|
|
81
|
+
const prorataEcs = instal_ecs.length > 1 ? 0.5 : 1;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Création de la liste des générateurs de chauffage pour lesquels il y a une récupération d'énergie
|
|
85
|
+
*
|
|
86
|
+
* 9.1.1 - Pertes récupérées de génération pour le chauffage sur le mois j (Wh)
|
|
87
|
+
* Ce calcul ne s’applique qu’au générateur pour lesquels des pertes à l’arrêt Qp0 sont prises en compte.
|
|
88
|
+
* Seules les pertes des générateurs et des ballons de stockage en volume chauffé sont récupérables. Les pertes
|
|
89
|
+
* récupérées des générateurs d’air chaud sont nulles.
|
|
90
|
+
*
|
|
91
|
+
* @type {GenerateurChauffageItem[]}
|
|
92
|
+
*/
|
|
93
|
+
const gen_ch_recup = instal_ch.flatMap((inst_ch) =>
|
|
94
|
+
inst_ch.generateur_chauffage_collection.generateur_chauffage.filter(
|
|
95
|
+
(gen_ch) =>
|
|
96
|
+
gen_ch.donnee_intermediaire.qp0 && (gen_ch.donnee_entree.position_volume_chauffe ?? 0)
|
|
97
|
+
)
|
|
98
|
+
);
|
|
99
|
+
|
|
100
|
+
for (const mois of mois_liste) {
|
|
101
|
+
const nref19 = Nref19[ca][mois][zc];
|
|
102
|
+
const nref21 = Nref21[ca][mois][zc];
|
|
103
|
+
|
|
104
|
+
const Qrec_stock_19 = (0.48 * nref19 * Qgw_total) / (24 * 365);
|
|
105
|
+
const Qrec_stock_21 = (0.48 * nref21 * Qgw_total) / (24 * 365);
|
|
106
|
+
pertes_stockage_ecs_recup += Qrec_stock_19 / 1000;
|
|
107
|
+
pertes_stockage_ecs_recup_depensier += Qrec_stock_21 / 1000;
|
|
108
|
+
|
|
109
|
+
// pertes distribution
|
|
110
|
+
const becs_j = calc_besoin_ecs_j(ca, mois, zc, nadeq, false) * prorataEcs;
|
|
111
|
+
const becs_j_dep = calc_besoin_ecs_j(ca, mois, zc, nadeq, true) * prorataEcs;
|
|
112
|
+
sumNref19 += nref19;
|
|
113
|
+
sumNref21 += nref21;
|
|
114
|
+
|
|
115
|
+
QrecDistr += instal_ecs.reduce((acc, ecs) => acc + calc_Qdw_j(ecs, becs_j), 0);
|
|
116
|
+
QrecDistrDepensier += instal_ecs.reduce((acc, ecs) => acc + calc_Qdw_j(ecs, becs_j_dep), 0);
|
|
117
|
+
|
|
118
|
+
// bvj
|
|
119
|
+
const dh19j = dh19[ca][mois][zc];
|
|
120
|
+
sumDh19 += dh19j;
|
|
121
|
+
const dh21j = dh21[ca][mois][zc];
|
|
122
|
+
sumDh21 += dh21j;
|
|
123
|
+
const aij = calc_ai_j(Sh, nadeq, nref19);
|
|
124
|
+
const aij_dep = calc_ai_j(Sh, nadeq, nref21);
|
|
125
|
+
const ssej = calc_sse_j(bv, ets, ca, zc, mois);
|
|
126
|
+
const ej = e[ca][mois][zc];
|
|
127
|
+
const asj = calc_as_j(ssej, ej);
|
|
128
|
+
const Fj = calc_Fj(GV, asj, aij, dh19j, inertie);
|
|
129
|
+
const Fj_dep = calc_Fj(GV, asj, aij_dep, dh21j, inertie);
|
|
130
|
+
|
|
131
|
+
fraction_apport_gratuit_ch += Fj * dh19j;
|
|
132
|
+
fraction_apport_gratuit_depensier_ch += Fj_dep * dh21j;
|
|
133
|
+
|
|
134
|
+
const bvj = dh19j === 0 ? 0 : calc_bvj(GV, Fj);
|
|
135
|
+
const bvj_dep = dh21j === 0 ? 0 : calc_bvj(GV, Fj_dep);
|
|
136
|
+
|
|
137
|
+
// pertes generation
|
|
138
|
+
const Bch_hp_j = bvj * dh19j;
|
|
139
|
+
const Bch_hp_j_dep = bvj_dep * dh21j;
|
|
140
|
+
|
|
141
|
+
gen_ch_recup.forEach((gen_ch) => {
|
|
142
|
+
pertes_generateur_ch_recup += calc_Qrec_gen_j(gen_ch, nref19, Bch_hp_j) / (1000 * 1000);
|
|
143
|
+
pertes_generateur_ch_recup_depensier +=
|
|
144
|
+
calc_Qrec_gen_j(gen_ch, nref21, Bch_hp_j_dep) / (1000 * 1000);
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
besoin_ch += Bch_hp_j / 1000;
|
|
148
|
+
besoin_ch_depensier += Bch_hp_j_dep / 1000;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
pertes_distribution_ecs_recup = (0.48 * sumNref19 * QrecDistr) / 8760;
|
|
152
|
+
pertes_distribution_ecs_recup_depensier = (0.48 * sumNref21 * QrecDistrDepensier) / 8760;
|
|
153
|
+
|
|
154
|
+
const recup =
|
|
155
|
+
pertes_distribution_ecs_recup + pertes_stockage_ecs_recup + pertes_generateur_ch_recup;
|
|
156
|
+
const recup_depensier =
|
|
157
|
+
pertes_distribution_ecs_recup_depensier +
|
|
158
|
+
pertes_stockage_ecs_recup_depensier +
|
|
159
|
+
pertes_generateur_ch_recup_depensier;
|
|
160
|
+
|
|
161
|
+
besoin_ch -= recup;
|
|
162
|
+
besoin_ch_depensier -= recup_depensier;
|
|
163
|
+
|
|
164
|
+
fraction_apport_gratuit_ch /= sumDh19;
|
|
165
|
+
fraction_apport_gratuit_depensier_ch /= sumDh21;
|
|
166
|
+
|
|
167
|
+
return {
|
|
168
|
+
besoin_ch,
|
|
169
|
+
besoin_ch_depensier,
|
|
170
|
+
pertes_distribution_ecs_recup,
|
|
171
|
+
pertes_distribution_ecs_recup_depensier,
|
|
172
|
+
pertes_stockage_ecs_recup,
|
|
173
|
+
/* pertes_stockage_ecs_recup_depensier: pertes_stockage_ecs_recup_depensier, */
|
|
174
|
+
pertes_generateur_ch_recup,
|
|
175
|
+
pertes_generateur_ch_recup_depensier,
|
|
176
|
+
fraction_apport_gratuit_ch,
|
|
177
|
+
fraction_apport_gratuit_depensier_ch
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function calc_Fj(GV, asj, aij, dhj, inertie) {
|
|
182
|
+
if (dhj == 0) return 0;
|
|
183
|
+
|
|
184
|
+
let pow;
|
|
185
|
+
if (inertie === 'très lourde' || inertie === 'lourde') pow = 3.6;
|
|
186
|
+
else if (inertie === 'moyenne') pow = 2.9;
|
|
187
|
+
else if (inertie === 'légère') pow = 2.5;
|
|
188
|
+
|
|
189
|
+
const Xj = (asj + aij) / (GV * dhj);
|
|
190
|
+
const Fj = (Xj - Xj ** pow) / (1 - Xj ** pow);
|
|
191
|
+
/* console.warn(Fj) */
|
|
192
|
+
return Fj;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function calc_bvj(GV, Fj) {
|
|
196
|
+
const bvj = GV * (1 - Fj);
|
|
197
|
+
return bvj;
|
|
198
|
+
}
|