GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 17.6% 16 / 0 / 91
Functions: 20.6% 13 / 0 / 63
Branches: 10.7% 3 / 0 / 28

src/airflow/contam/PrjAirflowElements.hpp
Line Branch Exec Source
1 /***********************************************************************************************************************
2 * OpenStudio(R), Copyright (c) Alliance for Energy Innovation, LLC.
3 * See also https://openstudio.net/license
4 ***********************************************************************************************************************/
5
6 #ifndef AIRFLOW_CONTAM_PRJAIRFLOWELEMENTS_HPP
7 #define AIRFLOW_CONTAM_PRJAIRFLOWELEMENTS_HPP
8
9 #include "PrjDefines.hpp"
10 #include "PrjSubobjects.hpp"
11 #include "ContamEnums.hpp"
12 #include <string>
13 #include <vector>
14
15 #include "../AirflowAPI.hpp"
16
17 namespace openstudio {
18 namespace contam {
19
20 class Reader;
21 namespace detail {
22 class PlrOrfImpl;
23 class PlrLeakImpl;
24 class PlrConnImpl;
25 class PlrGeneralImpl;
26 class PlrTest1Impl;
27 class PlrTest2Impl;
28 class PlrCrackImpl;
29 class PlrStairImpl;
30 class PlrShaftImpl;
31 class PlrBackDamperImpl;
32 class QfrQuadraticImpl;
33 class QfrCrackImpl;
34 class QfrTest2Impl;
35 class AfeDorImpl;
36 class DrPl2Impl;
37 class AfeFlowImpl;
38 class AfeFanImpl;
39 class AfeCsfImpl;
40 class AfeSupImpl;
41 } // namespace detail
42
43 /** The AirflowElement object is the base class of all airflow elements. */
44 class AIRFLOW_API AirflowElement
45 {
46 public:
47 /** Destroy the object. */
48 150 virtual ~AirflowElement() = default;
49 /** Write the object to a string. */
50 virtual std::string write() = 0;
51 /** Convert an input string into an airflow element type enum. */
52 static AirflowElementType convertTag(const std::string& tag);
53 /** Read an airflow element from a Reader object. */
54 static AirflowElement* readElement(Reader& input);
55 // virtual void recompute(){}
56 /** Returns the element number, in order from 1 to the number of airflow elements. */
57 virtual int nr() const = 0;
58 /** Sets the element number. This should only be done with care. */
59 virtual void setNr(const int nr) = 0;
60 /** Returns the icon used to represent flow path. */
61 virtual int icon() const = 0;
62 /** Sets the icon used to represent flow path. */
63 virtual void setIcon(const int icon) = 0;
64 /** Returns the element data type. */
65 virtual std::string dataType() const = 0;
66 /** Returns the element name. */
67 virtual std::string name() const = 0;
68 /** Sets the element name. */
69 virtual void setName(const std::string& name) = 0;
70 /** Returns the element description. */
71 virtual std::string desc() const = 0;
72 /** Sets the element description. */
73 virtual void setDesc(const std::string& desc) = 0;
74 };
75
76 /** The PlrOrj object is an airflow element representing an orifice. */
77 class AIRFLOW_API PlrOrf : public AirflowElement
78 {
79 public:
80 /** @name Constructors and Destructors */
81 //@{
82
83 /** Create a new object with default values. */
84 PlrOrf();
85 /** Create a new object. */
86 PlrOrf(int nr, int icon, std::string name, std::string desc);
87 /** Create a new object. */
88 PlrOrf(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double area, double dia, double coef,
89 double Re, int u_A, int u_D);
90 /** Create a new object. */
91 PlrOrf(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string area,
92 std::string dia, std::string coef, std::string Re, int u_A, int u_D);
93 /** Create a new object from another object. */
94 PlrOrf(const PlrOrf& other);
95 /** Destroy the object. */
96 ✗ virtual ~PlrOrf() override = default;
97
98 //@}
99 /** @name Operators */
100 //@{
101
102 /** Copy operator */
103 PlrOrf& operator=(const PlrOrf& other);
104 /** Equality operator */
105 bool operator==(const PlrOrf& other) const;
106 /** Inequality operator */
107 bool operator!=(const PlrOrf& other) const;
108
109 //@}
110 /** @name Input and Output */
111 //@{
112
113 /** Read an object from a Reader. */
114 void read(Reader& input);
115 /** Read object details from a Reader. */
116 void readDetails(Reader& input);
117 /** Write the object to a string. */
118 std::string write() override;
119
120 //@}
121 /** @name Getters and Setters */
122 //@{
123
124 /** Returns the element number, in order from 1 to the number of airflow elements. */
125 int nr() const override;
126 /** Sets the element number. This should only be done with care. */
127 void setNr(const int nr) override;
128 /** Returns the icon used to represent flow path. */
129 int icon() const override;
130 /** Sets the icon used to represent flow path. */
131 void setIcon(const int icon) override;
132 /** Returns the element data type. */
133 ✗ std::string dataType() const override {
134 ✗ return "plr_orfc";
135 }
136 /** Returns the element name. */
137 std::string name() const override;
138 /** Sets the element name. */
139 void setName(const std::string& name) override;
140 /** Returns the element description. */
141 std::string desc() const override;
142 /** Sets the element description. */
143 void setDesc(const std::string& desc) override;
144 /** Returns the laminar flow coefficient. */
145 double lam() const;
146 /** Sets the laminar flow coefficient. */
147 bool setLam(const double lam);
148 /** Sets the laminar flow coefficient. */
149 bool setLam(const std::string& lam);
150 /** Returns the turbulent flow coefficient. */
151 double turb() const;
152 /** Sets the turbulent flow coefficient. */
153 bool setTurb(const double turb);
154 /** Sets the turbulent flow coefficient. */
155 bool setTurb(const std::string& turb);
156 /** Returns the pressure exponent. */
157 double expt() const;
158 /** Sets the pressure exponent. */
159 bool setExpt(const double expt);
160 /** Sets the pressure exponent. */
161 bool setExpt(const std::string& expt);
162 /** Returns the actual area [m^2]. */
163 double area() const;
164 /** Sets the actual area [m^2]. */
165 bool setArea(const double area);
166 /** Sets the actual area [m^2]. */
167 bool setArea(const std::string& area);
168 /** Returns the hydraulic diameter [m]. */
169 double dia() const;
170 /** Sets the hydraulic diameter [m]. */
171 bool setDia(const double dia);
172 /** Sets the hydraulic diameter [m]. */
173 bool setDia(const std::string& dia);
174 /** Returns the flow coefficient. */
175 double coef() const;
176 /** Sets the flow coefficient. */
177 bool setCoef(const double coef);
178 /** Sets the flow coefficient. */
179 bool setCoef(const std::string& coef);
180 /** Returns the laminar/turbulet transition Reynolds number. */
181 double Re() const;
182 /** Sets the laminar/turbulet transition Reynolds number. */
183 bool setRe(const double Re);
184 /** Sets the laminar/turbulet transition Reynolds number. */
185 bool setRe(const std::string& Re);
186 /** Returns the display units for area. */
187 int u_A() const;
188 /** Sets the display units for area. */
189 void setU_A(const int u_A);
190 /** Returns the display units for diameter. */
191 int u_D() const;
192 /** Sets the display units for diameter. */
193 void setU_D(const int u_D);
194 //@}
195
196 private:
197 std::shared_ptr<detail::PlrOrfImpl> m_impl;
198 };
199
200 /** The PlrLeak object is the base class of the leakage area airflow elements. */
201 class AIRFLOW_API PlrLeak : public AirflowElement
202 {
203 public:
204 /** @name Constructors and Destructors */
205 //@{
206
207 /** Create a new object with default values. */
208 PlrLeak();
209 /** Create a new object. */
210 PlrLeak(int nr, int icon, std::string name, std::string desc);
211 /** Create a new object. */
212 PlrLeak(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double coef, double pres, double area1,
213 double area2, double area3, int u_A1, int u_A2, int u_A3, int u_dP);
214 /** Create a new object. */
215 PlrLeak(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string coef,
216 std::string pres, std::string area1, std::string area2, std::string area3, int u_A1, int u_A2, int u_A3, int u_dP);
217 /** Create a new object from another object. */
218 PlrLeak(const PlrLeak& other);
219 /** Destroy the object. */
220 43 virtual ~PlrLeak() override = default;
221
222 //@}
223 /** @name Operators */
224 //@{
225
226 /** Copy operator */
227 PlrLeak& operator=(const PlrLeak& other);
228 /** Equality operator */
229 bool operator==(const PlrLeak& other) const;
230 /** Inequality operator */
231 bool operator!=(const PlrLeak& other) const;
232
233 //@}
234 /** @name Input and Output */
235 //@{
236
237 /** Read an object from a Reader. */
238 void read(Reader& input);
239 /** Read object details from a Reader. */
240 void readDetails(Reader& input);
241 /** Write the object to a string. */
242 std::string write() override;
243
244 //@}
245 /** @name Getters and Setters */
246 //@{
247
248 /** Returns the element number, in order from 1 to the number of airflow elements. */
249 int nr() const override;
250 /** Sets the element number. This should only be done with care. */
251 void setNr(const int nr) override;
252 /** Returns the icon used to represent flow path. */
253 int icon() const override;
254 /** Sets the icon used to represent flow path. */
255 void setIcon(const int icon) override;
256 /** Returns the element data type. */
257 virtual std::string dataType() const override = 0;
258 /** Returns the element name. */
259 std::string name() const override;
260 /** Sets the element name. */
261 void setName(const std::string& name) override;
262 /** Returns the element description. */
263 std::string desc() const override;
264 /** Sets the element description. */
265 void setDesc(const std::string& desc) override;
266 /** Returns the laminar flow coefficient. */
267 double lam() const;
268 /** Sets the laminar flow coefficient. */
269 bool setLam(const double lam);
270 /** Sets the laminar flow coefficient. */
271 bool setLam(const std::string& lam);
272 /** Returns the turbulent flow coefficient. */
273 double turb() const;
274 /** Sets the turbulent flow coefficient. */
275 bool setTurb(const double turb);
276 /** Sets the turbulent flow coefficient. */
277 bool setTurb(const std::string& turb);
278 /** Returns the pressure exponent. */
279 double expt() const;
280 /** Sets the pressure exponent. */
281 bool setExpt(const double expt);
282 /** Sets the pressure exponent. */
283 bool setExpt(const std::string& expt);
284 /** Returns the flow coefficient. */
285 double coef() const;
286 /** Sets the flow coefficient. */
287 bool setCoef(const double coef);
288 /** Sets the flow coefficient. */
289 bool setCoef(const std::string& coef);
290 /** Returns the reference pressure drop [Pa]. */
291 double pres() const;
292 /** Sets the reference pressure drop [Pa]. */
293 bool setPres(const double pres);
294 /** Sets the reference pressure drop [Pa]. */
295 bool setPres(const std::string& pres);
296 /** Returns the leakage area per item [m^2]. */
297 double area1() const;
298 /** Sets the leakage area per item [m^2]. */
299 bool setArea1(const double area1);
300 /** Sets the leakage area per item [m^2]. */
301 bool setArea1(const std::string& area1);
302 /** Returns the leakage area per unit length [m^2/m]. */
303 double area2() const;
304 /** Sets the leakage area per unit length [m^2/m]. */
305 bool setArea2(const double area2);
306 /** Sets the leakage area per unit length [m^2/m]. */
307 bool setArea2(const std::string& area2);
308 /** Returns the leakage area per unit area [m^2/m^2]. */
309 double area3() const;
310 /** Sets the leakage area per unit area [m^2/m^2]. */
311 bool setArea3(const double area3);
312 /** Sets the leakage area per unit area [m^2/m^2]. */
313 bool setArea3(const std::string& area3);
314 /** Returns the display units of area 1. */
315 int u_A1() const;
316 /** Sets the display units of area 1. */
317 void setU_A1(const int u_A1);
318 /** Returns the display units of area 2. */
319 int u_A2() const;
320 /** Sets the display units of area 2. */
321 void setU_A2(const int u_A2);
322 /** Returns the display units of area 3. */
323 int u_A3() const;
324 /** Sets the display units of area 3. */
325 void setU_A3(const int u_A3);
326 /** Returns the display units of pressure. */
327 int u_dP() const;
328 /** Sets the display units of pressure. */
329 void setU_dP(const int u_dP);
330 //@}
331 private:
332 std::shared_ptr<detail::PlrLeakImpl> m_impl;
333 };
334
335 /** The PlrLeak1 object is an airflow element representing a leakage area on a per-item basis. */
336 class AIRFLOW_API PlrLeak1 : public PlrLeak
337 {
338 public:
339 /** @name Constructors and Destructors */
340 //@{
341
342 /** Create a new object with default values. */
343 PlrLeak1();
344 /** Create a new object. */
345 PlrLeak1(int nr, int icon, std::string name, std::string desc);
346 /** Create a new object. */
347 PlrLeak1(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double coef, double pres, double area1,
348 double area2, double area3, int u_A1, int u_A2, int u_A3, int u_dP);
349 /** Create a new object. */
350 PlrLeak1(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string coef,
351 std::string pres, std::string area1, std::string area2, std::string area3, int u_A1, int u_A2, int u_A3, int u_dP);
352 //** Create a new object from another object. */
353 //PlrLeak(const PlrLeak &other);
354 /** Destroy the object. */
355 60 virtual ~PlrLeak1() override = default;
356
357 //@}
358 /** @name Getters and Setters */
359 //@{
360
361 /** Returns the element data type. */
362 5 std::string dataType() const override {
363
1/1
✓ Branch 1 taken 5 times.
10 return "plr_leak1";
364 }
365 //@}
366 };
367
368 /** The PlrLeak2 object is an airflow element representing a leakage area on a per-unit-length basis. */
369 class AIRFLOW_API PlrLeak2 : public PlrLeak
370 {
371 public:
372 /** @name Constructors and Destructors */
373 //@{
374
375 /** Create a new object with default values. */
376 PlrLeak2();
377 /** Create a new object. */
378 PlrLeak2(int nr, int icon, std::string name, std::string desc);
379 /** Create a new object. */
380 PlrLeak2(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double coef, double pres, double area1,
381 double area2, double area3, int u_A1, int u_A2, int u_A3, int u_dP);
382 /** Create a new object. */
383 PlrLeak2(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string coef,
384 std::string pres, std::string area1, std::string area2, std::string area3, int u_A1, int u_A2, int u_A3, int u_dP);
385 /** Create a new object. */
386 PlrLeak2(int icon, std::string name, std::string desc, double lam, double turb, double expt, double coef, double pres, double area2);
387 /** Create a new object. */
388 PlrLeak2(int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string coef, std::string pres,
389 std::string area2);
390 //** Create a new object from another object. */
391 //PlrLeak(const PlrLeak &other);
392 /** Destroy the object. */
393 8 virtual ~PlrLeak2() override = default;
394
395 //@}
396 /** @name Getters and Setters */
397 //@{
398
399 /** Returns the element data type. */
400 ✗ std::string dataType() const override {
401 ✗ return "plr_leak2";
402 }
403 //@}
404 };
405
406 /** The PlrLeak3 object is an airflow element representing a leakage area on a per-unit-area basis. */
407 class AIRFLOW_API PlrLeak3 : public PlrLeak
408 {
409 public:
410 /** @name Constructors and Destructors */
411 //@{
412
413 /** Create a new object with default values. */
414 PlrLeak3();
415 /** Create a new object. */
416 PlrLeak3(int nr, int icon, std::string name, std::string desc);
417 /** Create a new object. */
418 PlrLeak3(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double coef, double pres, double area1,
419 double area2, double area3, int u_A1, int u_A2, int u_A3, int u_dP);
420 /** Create a new object. */
421 PlrLeak3(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string coef,
422 std::string pres, std::string area1, std::string area2, std::string area3, int u_A1, int u_A2, int u_A3, int u_dP);
423 //** Create a new object from another object. */
424 //PlrLeak(const PlrLeak &other);
425 /** Destroy the object. */
426 12 virtual ~PlrLeak3() override = default;
427
428 //@}
429 /** @name Getters and Setters */
430 //@{
431
432 /** Returns the element data type. */
433 1 std::string dataType() const override {
434
1/1
✓ Branch 1 taken 1 time.
2 return "plr_leak3";
435 }
436 //@}
437 };
438
439 /** The PlrConn object is an airflow element representing a ASCOS connection. */
440 class AIRFLOW_API PlrConn : public AirflowElement
441 {
442 public:
443 /** @name Constructors and Destructors */
444 //@{
445
446 /** Create a new object with default values. */
447 PlrConn();
448 /** Create a new object. */
449 PlrConn(int nr, int icon, std::string name, std::string desc);
450 /** Create a new object. */
451 PlrConn(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double area, double coef, int u_A);
452 /** Create a new object. */
453 PlrConn(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string area,
454 std::string coef, int u_A);
455 /** Create a new object from another object. */
456 PlrConn(const PlrConn& other);
457 /** Destroy the object. */
458 ✗ virtual ~PlrConn() override = default;
459
460 //@}
461 /** @name Operators */
462 //@{
463
464 /** Copy operator */
465 PlrConn& operator=(const PlrConn& other);
466 /** Equality operator */
467 bool operator==(const PlrConn& other) const;
468 /** Inequality operator */
469 bool operator!=(const PlrConn& other) const;
470
471 //@}
472 /** @name Input and Output */
473 //@{
474
475 /** Read an object from a Reader. */
476 void read(Reader& input);
477 /** Read object details from a Reader. */
478 void readDetails(Reader& input);
479 /** Write the object to a string. */
480 std::string write() override;
481
482 //@}
483 /** @name Getters and Setters */
484 //@{
485
486 /** Returns the element number, in order from 1 to the number of airflow elements. */
487 int nr() const override;
488 /** Sets the element number. This should only be done with care. */
489 void setNr(const int nr) override;
490 /** Returns the icon used to represent flow path. */
491 int icon() const override;
492 /** Sets the icon used to represent flow path. */
493 void setIcon(const int icon) override;
494 /** Returns the element data type. */
495 ✗ std::string dataType() const override {
496 ✗ return "plr_conn";
497 }
498 /** Returns the element name. */
499 std::string name() const override;
500 /** Sets the element name. */
501 void setName(const std::string& name) override;
502 /** Returns the element description. */
503 std::string desc() const override;
504 /** Sets the element description. */
505 void setDesc(const std::string& desc) override;
506 /** Returns the laminar flow coefficient. */
507 double lam() const;
508 /** Sets the laminar flow coefficient. */
509 bool setLam(const double lam);
510 /** Sets the laminar flow coefficient. */
511 bool setLam(const std::string& lam);
512 /** Returns the turbulent flow coefficient. */
513 double turb() const;
514 /** Sets the turbulent flow coefficient. */
515 bool setTurb(const double turb);
516 /** Sets the turbulent flow coefficient. */
517 bool setTurb(const std::string& turb);
518 /** Returns the pressure exponent. */
519 double expt() const;
520 /** Sets the pressure exponent. */
521 bool setExpt(const double expt);
522 /** Sets the pressure exponent. */
523 bool setExpt(const std::string& expt);
524 /** Returns the actual area [m^2]. */
525 double area() const;
526 /** Sets the actual area [m^2]. */
527 bool setArea(const double area1);
528 /** Sets the actual area [m^2]. */
529 bool setArea(const std::string& area1);
530 /** Returns the flow coefficient. */
531 double coef() const;
532 /** Sets the flow coefficient. */
533 bool setCoef(const double coef);
534 /** Sets the flow coefficient. */
535 bool setCoef(const std::string& coef);
536 /** Returns the display units of area. */
537 int u_A() const;
538 /** Sets the display units of area. */
539 void setU_A(const int u_A1);
540 //@}
541
542 private:
543 std::shared_ptr<detail::PlrConnImpl> m_impl;
544 };
545
546 /** The PlrGeneral object is the base class for general power law elements. */
547 class AIRFLOW_API PlrGeneral : public AirflowElement
548 {
549 public:
550 /** @name Constructors and Destructors */
551 //@{
552
553 /** Create a new object with default values. */
554 PlrGeneral();
555 /** Create a new object. */
556 PlrGeneral(int nr, int icon, std::string name, std::string desc);
557 /** Create a new object. */
558 PlrGeneral(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt);
559 /** Create a new object. */
560 PlrGeneral(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt);
561 /** Create a new object from another object. */
562 PlrGeneral(const PlrGeneral& other);
563 /** Destroy the object. */
564 ✗ virtual ~PlrGeneral() override = default;
565
566 //@}
567 /** @name Operators */
568 //@{
569
570 /** Copy operator */
571 PlrGeneral& operator=(const PlrGeneral& other);
572 /** Equality operator */
573 bool operator==(const PlrGeneral& other) const;
574 /** Inequality operator */
575 bool operator!=(const PlrGeneral& other) const;
576
577 //@}
578 /** @name Input and Output */
579 //@{
580
581 /** Read an object from a Reader. */
582 void read(Reader& input);
583 /** Read object details from a Reader. */
584 void readDetails(Reader& input);
585 /** Write the object to a string. */
586 std::string write() override;
587
588 //@}
589 /** @name Getters and Setters */
590 //@{
591
592 /** Returns the element number, in order from 1 to the number of airflow elements. */
593 int nr() const override;
594 /** Sets the element number. This should only be done with care. */
595 void setNr(const int nr) override;
596 /** Returns the icon used to represent flow path. */
597 int icon() const override;
598 /** Sets the icon used to represent flow path. */
599 void setIcon(const int icon) override;
600 /** Returns the element data type. */
601 virtual std::string dataType() const override = 0;
602 /** Returns the element name. */
603 std::string name() const override;
604 /** Sets the element name. */
605 void setName(const std::string& name) override;
606 /** Returns the element description. */
607 std::string desc() const override;
608 /** Sets the element description. */
609 void setDesc(const std::string& desc) override;
610 /** Returns the laminar flow coefficient. */
611 double lam() const;
612 /** Sets the laminar flow coefficient. */
613 bool setLam(const double lam);
614 /** Sets the laminar flow coefficient. */
615 bool setLam(const std::string& lam);
616 /** Returns the turbulent flow coefficient. */
617 double turb() const;
618 /** Sets the turbulent flow coefficient. */
619 bool setTurb(const double turb);
620 /** Sets the turbulent flow coefficient. */
621 bool setTurb(const std::string& turb);
622 /** Returns the pressure exponent. */
623 double expt() const;
624 /** Sets the pressure exponent. */
625 bool setExpt(const double expt);
626 /** Sets the pressure exponent. */
627 bool setExpt(const std::string& expt);
628 //@}
629
630 private:
631 std::shared_ptr<detail::PlrGeneralImpl> m_impl;
632 };
633
634 /** The PlrQcn object is an airflow element representing volume flow rate power law leakage. */
635 class AIRFLOW_API PlrQcn : public PlrGeneral
636 {
637 public:
638 /** @name Constructors and Destructors */
639 //@{
640
641 /** Create a new object with default values. */
642 PlrQcn();
643 /** Create a new object. */
644 PlrQcn(int nr, int icon, std::string name, std::string desc);
645 /** Create a new object. */
646 PlrQcn(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt);
647 /** Create a new object. */
648 PlrQcn(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt);
649 //** Create a new object from another object. */
650 //PlrQcn(const PlrQcn &other);
651 /** Destroy the object. */
652 ✗ virtual ~PlrQcn() override = default;
653
654 //@}
655 /** @name Getters and Setters */
656 //@{
657
658 /** Returns the element data type. */
659 ✗ std::string dataType() const override {
660 ✗ return "plr_qcn";
661 }
662 //@}
663 };
664
665 /** The PlrQcn object is an airflow element representing mass flow rate power law leakage. */
666 class AIRFLOW_API PlrFcn : public PlrGeneral
667 {
668 public:
669 /** @name Constructors and Destructors */
670 //@{
671
672 /** Create a new object with default values. */
673 PlrFcn();
674 /** Create a new object. */
675 PlrFcn(int nr, int icon, std::string name, std::string desc);
676 /** Create a new object. */
677 PlrFcn(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt);
678 /** Create a new object. */
679 PlrFcn(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt);
680 //** Create a new object from another object. */
681 //PlrQcn(const PlrQcn &other);
682 /** Destroy the object. */
683 ✗ virtual ~PlrFcn() override = default;
684
685 //@}
686 /** @name Getters and Setters */
687 //@{
688
689 /** Returns the element data type. */
690 ✗ std::string dataType() const override {
691 ✗ return "plr_fcn";
692 }
693 //@}
694 };
695
696 /** The PlrTest1 object is an airflow element representing 1-point test data power law leakage. */
697 class AIRFLOW_API PlrTest1 : public AirflowElement
698 {
699 public:
700 /** @name Constructors and Destructors */
701 //@{
702
703 /** Create a new object with default values. */
704 PlrTest1();
705 /** Create a new object. */
706 PlrTest1(int nr, int icon, std::string name, std::string desc);
707 /** Create a new object. */
708 PlrTest1(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double dP, double Flow, int u_P, int u_F);
709 /** Create a new object. */
710 PlrTest1(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string dP,
711 std::string Flow, int u_P, int u_F);
712 /** Create a new object. */
713 PlrTest1(int icon, std::string name, std::string desc, double lam, double turb, double expt, double dP, double Flow);
714 /** Create a new object. */
715 PlrTest1(int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string dP, std::string Flow);
716 /** Create a new object from another object. */
717 PlrTest1(const PlrTest1& other);
718 /** Destroy the object. */
719 163 virtual ~PlrTest1() override = default;
720
721 //@}
722 /** @name Operators */
723 //@{
724
725 /** Copy operator */
726 PlrTest1& operator=(const PlrTest1& other);
727 /** Equality operator */
728 bool operator==(const PlrTest1& other) const;
729 /** Inequality operator */
730 bool operator!=(const PlrTest1& other) const;
731
732 //@}
733 /** @name Input and Output */
734 //@{
735
736 /** Read an object from a Reader. */
737 void read(Reader& input);
738 /** Read object details from a Reader. */
739 void readDetails(Reader& input);
740 /** Write the object to a string. */
741 std::string write() override;
742
743 //@}
744 /** @name Getters and Setters */
745 //@{
746
747 /** Returns the element number, in order from 1 to the number of airflow elements. */
748 int nr() const override;
749 /** Sets the element number. This should only be done with care. */
750 void setNr(const int nr) override;
751 /** Returns the icon used to represent flow path. */
752 int icon() const override;
753 /** Sets the icon used to represent flow path. */
754 void setIcon(const int icon) override;
755 /** Returns the element data type. */
756 ✗ std::string dataType() const override {
757 ✗ return "plr_test1";
758 }
759 /** Returns the element name. */
760 std::string name() const override;
761 /** Sets the element name. */
762 void setName(const std::string& name) override;
763 /** Returns the element description. */
764 std::string desc() const override;
765 /** Sets the element description. */
766 void setDesc(const std::string& desc) override;
767 /** Returns the laminar flow coefficient. */
768 double lam() const;
769 /** Sets the laminar flow coefficient. */
770 bool setLam(const double lam);
771 /** Sets the laminar flow coefficient. */
772 bool setLam(const std::string& lam);
773 /** Returns the turbulent flow coefficient. */
774 double turb() const;
775 /** Sets the turbulent flow coefficient. */
776 bool setTurb(const double turb);
777 /** Sets the turbulent flow coefficient. */
778 bool setTurb(const std::string& turb);
779 /** Returns the pressure exponent. */
780 double expt() const;
781 /** Sets the pressure exponent. */
782 bool setExpt(const double expt);
783 /** Sets the pressure exponent. */
784 bool setExpt(const std::string& expt);
785 /** Returns the pressure drop [Pa]. */
786 double dP() const;
787 /** Sets the pressure drop [Pa]. */
788 bool setDP(const double dP);
789 /** Sets the pressure drop [Pa]. */
790 bool setDP(const std::string& dP);
791 /** Returns the flow rate [kg/s].*/
792 double Flow() const;
793 /** Sets the flow rate [kg/s].*/
794 bool setFlow(const double Flow);
795 /** Sets the flow rate [kg/s].*/
796 bool setFlow(const std::string& Flow);
797 /** Returns the display units of pressure drop. */
798 int u_P() const;
799 /** Sets the display units of pressure drop. */
800 void setU_P(const int u_P);
801 /** Returns the display units of flow. */
802 int u_F() const;
803 /** Sets the display units of flow. */
804 void setU_F(const int u_F);
805 //@}
806
807 private:
808 std::shared_ptr<detail::PlrTest1Impl> m_impl;
809 };
810
811 /** The PlrTest2 object is an airflow element representing 2-point test data power law leakage. */
812 class AIRFLOW_API PlrTest2 : public AirflowElement
813 {
814 public:
815 /** @name Constructors and Destructors */
816 //@{
817
818 /** Create a new object with default values. */
819 PlrTest2();
820 /** Create a new object. */
821 PlrTest2(int nr, int icon, std::string name, std::string desc);
822 /** Create a new object. */
823 PlrTest2(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double dP1, double F1, double dP2, double F2,
824 int u_P1, int u_F1, int u_P2, int u_F2);
825 /** Create a new object. */
826 PlrTest2(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string dP1,
827 std::string F1, std::string dP2, std::string F2, int u_P1, int u_F1, int u_P2, int u_F2);
828 /** Create a new object from another object. */
829 PlrTest2(const PlrTest2& other);
830 /** Destroy the object. */
831 ✗ virtual ~PlrTest2() override = default;
832
833 //@}
834 /** @name Operators */
835 //@{
836
837 /** Copy operator */
838 PlrTest2& operator=(const PlrTest2& other);
839 /** Equality operator */
840 bool operator==(const PlrTest2& other) const;
841 /** Inequality operator */
842 bool operator!=(const PlrTest2& other) const;
843
844 //@}
845 /** @name Input and Output */
846 //@{
847
848 /** Read an object from a Reader. */
849 void read(Reader& input);
850 /** Read object details from a Reader. */
851 void readDetails(Reader& input);
852 /** Write the object to a string. */
853 std::string write() override;
854
855 //@}
856 /** @name Getters and Setters */
857 //@{
858
859 /** Returns the element number, in order from 1 to the number of airflow elements. */
860 int nr() const override;
861 /** Sets the element number. This should only be done with care. */
862 void setNr(const int nr) override;
863 /** Returns the icon used to represent flow path. */
864 int icon() const override;
865 /** Sets the icon used to represent flow path. */
866 void setIcon(const int icon) override;
867 /** Returns the element data type. */
868 ✗ std::string dataType() const override {
869 ✗ return "plr_test2";
870 }
871 /** Returns the element name. */
872 std::string name() const override;
873 /** Sets the element name. */
874 void setName(const std::string& name) override;
875 /** Returns the element description. */
876 std::string desc() const override;
877 /** Sets the element description. */
878 void setDesc(const std::string& desc) override;
879 /** Returns the laminar flow coefficient. */
880 double lam() const;
881 /** Sets the laminar flow coefficient. */
882 bool setLam(const double lam);
883 /** Sets the laminar flow coefficient. */
884 bool setLam(const std::string& lam);
885 /** Returns the turbulent flow coefficient. */
886 double turb() const;
887 /** Sets the turbulent flow coefficient. */
888 bool setTurb(const double turb);
889 /** Sets the turbulent flow coefficient. */
890 bool setTurb(const std::string& turb);
891 /** Returns the pressure exponent. */
892 double expt() const;
893 /** Sets the pressure exponent. */
894 bool setExpt(const double expt);
895 /** Sets the pressure exponent. */
896 bool setExpt(const std::string& expt);
897 /** Returns the point 1 pressure drop [Pa]. */
898 double dP1() const;
899 /** Sets the point 1 pressure drop [Pa]. */
900 bool setDP1(const double dP);
901 /** Sets the point 1 pressure drop [Pa]. */
902 bool setDP1(const std::string& dP);
903 /** Returns the point 1 flow rate [kg/s].*/
904 double F1() const;
905 /** Sets the point 1 flow rate [kg/s].*/
906 bool setF1(const double Flow);
907 /** Sets the point 1 flow rate [kg/s].*/
908 bool setF1(const std::string& Flow);
909 /** Returns the point 2 pressure drop [Pa]. */
910 double dP2() const;
911 /** Sets the point 2 pressure drop [Pa]. */
912 bool setDP2(const double dP);
913 /** Sets the point 2 pressure drop [Pa]. */
914 bool setDP2(const std::string& dP);
915 /** Returns the point 2 flow rate [kg/s].*/
916 double F2() const;
917 /** Sets the point 2 flow rate [kg/s].*/
918 bool setF2(const double Flow);
919 /** Sets the point 2 flow rate [kg/s].*/
920 bool setF2(const std::string& Flow);
921 /** Returns the display units of point 1 pressure drop. */
922 int u_P1() const;
923 /** Sets the display units of point 1 pressure drop. */
924 void setU_P1(const int u_P);
925 /** Returns the display units of point 1 flow. */
926 int u_F1() const;
927 /** Sets the display units of point 1 flow. */
928 void setU_F1(const int u_F);
929 /** Returns the display units of point 2 pressure drop. */
930 int u_P2() const;
931 /** Sets the display units of point 2 pressure drop. */
932 void setU_P2(const int u_P);
933 /** Returns the display units of point 2 flow. */
934 int u_F2() const;
935 /** Sets the display units of point 2 flow. */
936 void setU_F2(const int u_F);
937 //@}
938
939 private:
940 std::shared_ptr<detail::PlrTest2Impl> m_impl;
941 };
942
943 /** The PlrCrack object is an airflow element representing power law leakage through a crack. */
944 class AIRFLOW_API PlrCrack : public AirflowElement
945 {
946 public:
947 /** @name Constructors and Destructors */
948 //@{
949
950 /** Create a new object with default values. */
951 PlrCrack();
952 /** Create a new object. */
953 PlrCrack(int nr, int icon, std::string name, std::string desc);
954 /** Create a new object. */
955 PlrCrack(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double length, double width, int u_L,
956 int u_W);
957 /** Create a new object. */
958 PlrCrack(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string length,
959 std::string width, int u_L, int u_W);
960 /** Create a new object from another object. */
961 PlrCrack(const PlrCrack& other);
962 /** Destroy the object. */
963 ✗ virtual ~PlrCrack() override = default;
964
965 //@}
966 /** @name Operators */
967 //@{
968
969 /** Copy operator */
970 PlrCrack& operator=(const PlrCrack& other);
971 /** Equality operator */
972 bool operator==(const PlrCrack& other) const;
973 /** Inequality operator */
974 bool operator!=(const PlrCrack& other) const;
975
976 //@}
977 /** @name Input and Output */
978 //@{
979
980 /** Read an object from a Reader. */
981 void read(Reader& input);
982 /** Read object details from a Reader. */
983 void readDetails(Reader& input);
984 /** Write the object to a string. */
985 std::string write() override;
986
987 //@}
988 /** @name Getters and Setters */
989 //@{
990
991 /** Returns the element number, in order from 1 to the number of airflow elements. */
992 int nr() const override;
993 /** Sets the element number. This should only be done with care. */
994 void setNr(const int nr) override;
995 /** Returns the icon used to represent flow path. */
996 int icon() const override;
997 /** Sets the icon used to represent flow path. */
998 void setIcon(const int icon) override;
999 /** Returns the element data type. */
1000 ✗ std::string dataType() const override {
1001 ✗ return "plr_crack";
1002 }
1003 /** Returns the element name. */
1004 std::string name() const override;
1005 /** Sets the element name. */
1006 void setName(const std::string& name) override;
1007 /** Returns the element description. */
1008 std::string desc() const override;
1009 /** Sets the element description. */
1010 void setDesc(const std::string& desc) override;
1011 /** Returns the laminar flow coefficient. */
1012 double lam() const;
1013 /** Sets the laminar flow coefficient. */
1014 bool setLam(const double lam);
1015 /** Sets the laminar flow coefficient. */
1016 bool setLam(const std::string& lam);
1017 /** Returns the turbulent flow coefficient. */
1018 double turb() const;
1019 /** Sets the turbulent flow coefficient. */
1020 bool setTurb(const double turb);
1021 /** Sets the turbulent flow coefficient. */
1022 bool setTurb(const std::string& turb);
1023 /** Returns the pressure exponent. */
1024 double expt() const;
1025 /** Sets the pressure exponent. */
1026 bool setExpt(const double expt);
1027 /** Sets the pressure exponent. */
1028 bool setExpt(const std::string& expt);
1029 /** Returns the crack length [m]. */
1030 double length() const;
1031 /** Sets the crack length [m]. */
1032 bool setLength(const double length);
1033 /** Sets the crack length [m]. */
1034 bool setLength(const std::string& length);
1035 /** Returns the crack width [m].*/
1036 double width() const;
1037 /** Sets the crack width [m].*/
1038 bool setWidth(const double width);
1039 /** Sets the crack width [m].*/
1040 bool setWidth(const std::string& width);
1041 /** Returns the display units of length. */
1042 int u_L() const;
1043 /** Sets the display units of length. */
1044 void setU_L(const int u_L);
1045 /** Returns the display units of width. */
1046 int u_W() const;
1047 /** Sets the display units of width. */
1048 void setU_W(const int u_W);
1049 //@}
1050
1051 private:
1052 std::shared_ptr<detail::PlrCrackImpl> m_impl;
1053 };
1054
1055 /** The PlrStair object is an airflow element representing level-to-level power law leakage in stairwells. */
1056 class AIRFLOW_API PlrStair : public AirflowElement
1057 {
1058 public:
1059 /** @name Constructors and Destructors */
1060 //@{
1061
1062 /** Create a new object with default values. */
1063 PlrStair();
1064 /** Create a new object. */
1065 PlrStair(int nr, int icon, std::string name, std::string desc);
1066 /** Create a new object. */
1067 PlrStair(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double Ht, double Area, double peo,
1068 int tread, int u_A, int u_D);
1069 /** Create a new object. */
1070 PlrStair(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string Ht,
1071 std::string Area, std::string peo, int tread, int u_A, int u_D);
1072 /** Create a new object from another object. */
1073 PlrStair(const PlrStair& other);
1074 /** Destroy the object. */
1075 12 virtual ~PlrStair() override = default;
1076
1077 //@}
1078 /** @name Operators */
1079 //@{
1080
1081 /** Copy operator */
1082 PlrStair& operator=(const PlrStair& other);
1083 /** Equality operator */
1084 bool operator==(const PlrStair& other) const;
1085 /** Inequality operator */
1086 bool operator!=(const PlrStair& other) const;
1087
1088 //@}
1089 /** @name Input and Output */
1090 //@{
1091
1092 /** Read an object from a Reader. */
1093 void read(Reader& input);
1094 /** Read object details from a Reader. */
1095 void readDetails(Reader& input);
1096 /** Write the object to a string. */
1097 std::string write() override;
1098
1099 //@}
1100 /** @name Getters and Setters */
1101 //@{
1102
1103 /** Returns the element number, in order from 1 to the number of airflow elements. */
1104 int nr() const override;
1105 /** Sets the element number. This should only be done with care. */
1106 void setNr(const int nr) override;
1107 /** Returns the icon used to represent flow path. */
1108 int icon() const override;
1109 /** Sets the icon used to represent flow path. */
1110 void setIcon(const int icon) override;
1111 /** Returns the element data type. */
1112 ✗ std::string dataType() const override {
1113 ✗ return "plr_stair";
1114 }
1115 /** Returns the element name. */
1116 std::string name() const override;
1117 /** Sets the element name. */
1118 void setName(const std::string& name) override;
1119 /** Returns the element description. */
1120 std::string desc() const override;
1121 /** Sets the element description. */
1122 void setDesc(const std::string& desc) override;
1123 /** Returns the laminar flow coefficient. */
1124 double lam() const;
1125 /** Sets the laminar flow coefficient. */
1126 bool setLam(const double lam);
1127 /** Sets the laminar flow coefficient. */
1128 bool setLam(const std::string& lam);
1129 /** Returns the turbulent flow coefficient. */
1130 double turb() const;
1131 /** Sets the turbulent flow coefficient. */
1132 bool setTurb(const double turb);
1133 /** Sets the turbulent flow coefficient. */
1134 bool setTurb(const std::string& turb);
1135 /** Returns the pressure exponent. */
1136 double expt() const;
1137 /** Sets the pressure exponent. */
1138 bool setExpt(const double expt);
1139 /** Sets the pressure exponent. */
1140 bool setExpt(const std::string& expt);
1141 /** Returns the distance between levels [m]. */
1142 double Ht() const;
1143 /** Sets the distance between levels [m]. */
1144 bool setHt(const double Ht);
1145 /** Sets the distance between levels [m]. */
1146 bool setHt(const std::string& Ht);
1147 /** Returns the cross-sectional area [m^2]. */
1148 double area() const;
1149 /** Sets the cross-sectional area [m^2]. */
1150 bool setArea(const double Area);
1151 /** Sets the cross-sectional area [m^2]. */
1152 bool setArea(const std::string& Area);
1153 /** Returns the density of people [pers/m^2]. */
1154 double people() const;
1155 /** Sets the density of people [pers/m^2]. */
1156 bool setPeople(const double peo);
1157 /** Sets the density of people [pers/m^2]. */
1158 bool setPeople(const std::string& peo);
1159 /** Returns the tread type: 1 = open tread 0 = closed. */
1160 int tread() const;
1161 /** Sets the tread type: 1 = open tread 0 = closed. */
1162 void setTread(const int tread);
1163 /** Returns the display units of area. */
1164 int u_A() const;
1165 /** Sets the display units of area. */
1166 void setU_A(const int u_A);
1167 /** Returns the display units of distance. */
1168 int u_D() const;
1169 /** Sets the display units of distance. */
1170 void setU_D(const int u_D);
1171 //@}
1172
1173 private:
1174 std::shared_ptr<detail::PlrStairImpl> m_impl;
1175 };
1176
1177 /** The PlrShaft object is an airflow element representing level-to-level power law leakage in shafts. */
1178 class AIRFLOW_API PlrShaft : public AirflowElement
1179 {
1180 public:
1181 /** @name Constructors and Destructors */
1182 //@{
1183
1184 /** Create a new object with default values. */
1185 PlrShaft();
1186 /** Create a new object. */
1187 PlrShaft(int nr, int icon, std::string name, std::string desc);
1188 /** Create a new object. */
1189 PlrShaft(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double Ht, double area, double perim,
1190 double rough, int u_A, int u_D, int u_P, int u_R);
1191 /** Create a new object. */
1192 PlrShaft(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string Ht,
1193 std::string area, std::string perim, std::string rough, int u_A, int u_D, int u_P, int u_R);
1194 /** Create a new object from another object. */
1195 PlrShaft(const PlrShaft& other);
1196 /** Destroy the object. */
1197 12 virtual ~PlrShaft() override = default;
1198
1199 //@}
1200 /** @name Operators */
1201 //@{
1202
1203 /** Copy operator */
1204 PlrShaft& operator=(const PlrShaft& other);
1205 /** Equality operator */
1206 bool operator==(const PlrShaft& other) const;
1207 /** Inequality operator */
1208 bool operator!=(const PlrShaft& other) const;
1209
1210 //@}
1211 /** @name Input and Output */
1212 //@{
1213
1214 /** Read an object from a Reader. */
1215 void read(Reader& input);
1216 /** Read object details from a Reader. */
1217 void readDetails(Reader& input);
1218 /** Write the object to a string. */
1219 std::string write() override;
1220
1221 //@}
1222 /** @name Getters and Setters */
1223 //@{
1224 /** Returns the element number, in order from 1 to the number of airflow elements. */
1225 int nr() const override;
1226 /** Sets the element number. This should only be done with care. */
1227 void setNr(const int nr) override;
1228 /** Returns the icon used to represent flow path. */
1229 int icon() const override;
1230 /** Sets the icon used to represent flow path. */
1231 void setIcon(const int icon) override;
1232 /** Returns the element data type. */
1233 ✗ std::string dataType() const override {
1234 ✗ return "plr_shaft";
1235 }
1236 /** Returns the element name. */
1237 std::string name() const override;
1238 /** Sets the element name. */
1239 void setName(const std::string& name) override;
1240 /** Returns the element description. */
1241 std::string desc() const override;
1242 /** Sets the element description. */
1243 void setDesc(const std::string& desc) override;
1244 /** Returns the laminar flow coefficient. */
1245 double lam() const;
1246 /** Sets the laminar flow coefficient. */
1247 bool setLam(const double lam);
1248 /** Sets the laminar flow coefficient. */
1249 bool setLam(const std::string& lam);
1250 /** Returns the turbulent flow coefficient. */
1251 double turb() const;
1252 /** Sets the turbulent flow coefficient. */
1253 bool setTurb(const double turb);
1254 /** Sets the turbulent flow coefficient. */
1255 bool setTurb(const std::string& turb);
1256 /** Returns the pressure exponent. */
1257 double expt() const;
1258 /** Sets the pressure exponent. */
1259 bool setExpt(const double expt);
1260 /** Sets the pressure exponent. */
1261 bool setExpt(const std::string& expt);
1262 /** Returns the distance between levels [m]. */
1263 double Ht() const;
1264 /** Sets the distance between levels [m]. */
1265 bool setHt(const double Ht);
1266 /** Sets the distance between levels [m]. */
1267 bool setHt(const std::string& Ht);
1268 /** Returns the cross-sectional area [m^2]. */
1269 double area() const;
1270 /** Sets the cross-sectional area [m^2]. */
1271 bool setArea(const double Area);
1272 /** Sets the cross-sectional area [m^2]. */
1273 bool setArea(const std::string& Area);
1274 /** Returns the perimeter [m]. */
1275 double perim() const;
1276 /** Sets the perimeter [m]. */
1277 bool setPerim(const double perim);
1278 /** Sets the perimeter [m]. */
1279 bool setPerim(const std::string& perim);
1280 /** Returns the roughness [m]. */
1281 double rough() const;
1282 /** Sets the roughness [m]. */
1283 bool setRough(const double rough);
1284 /** Sets the roughness [m]. */
1285 bool setRough(const std::string& rough);
1286 /** Returns the display units of area. */
1287 int u_A() const;
1288 /** Sets the display units of area. */
1289 void setU_A(const int u_A);
1290 /** Returns the display units of distance. */
1291 int u_D() const;
1292 /** Sets the display units of distance. */
1293 void setU_D(const int u_D);
1294 /** Returns the display units of perimeter. */
1295 int u_P() const;
1296 /** Sets the display units of perimeter. */
1297 void setU_P(const int u_P);
1298 /** Returns the display units of roughness. */
1299 int u_R() const;
1300 /** Sets the display units of roughness. */
1301 void setU_R(const int u_R);
1302 //@}
1303
1304 private:
1305 std::shared_ptr<detail::PlrShaftImpl> m_impl;
1306 };
1307
1308 /** The PlrBackDamper object is the base class of backdraft damper airflow elements. */
1309 class AIRFLOW_API PlrBackDamper : public AirflowElement
1310 {
1311 public:
1312 /** @name Constructors and Destructors */
1313 //@{
1314
1315 /** Create a new object with default values. */
1316 PlrBackDamper();
1317 /** Create a new object. */
1318 PlrBackDamper(int nr, int icon, std::string name, std::string desc);
1319 /** Create a new object. */
1320 PlrBackDamper(int nr, int icon, std::string name, std::string desc, double lam, double Cp, double xp, double Cn, double xn);
1321 /** Create a new object. */
1322 PlrBackDamper(int nr, int icon, std::string name, std::string desc, std::string lam, std::string Cp, std::string xp, std::string Cn,
1323 std::string xn);
1324 /** Create a new object from another object. */
1325 PlrBackDamper(const PlrBackDamper& other);
1326 /** Destroy the object. */
1327 ✗ virtual ~PlrBackDamper() override = default;
1328
1329 //@}
1330 /** @name Operators */
1331 //@{
1332
1333 /** Copy operator */
1334 PlrBackDamper& operator=(const PlrBackDamper& other);
1335 /** Equality operator */
1336 bool operator==(const PlrBackDamper& other) const;
1337 /** Inequality operator */
1338 bool operator!=(const PlrBackDamper& other) const;
1339
1340 //@}
1341 /** @name Input and Output */
1342 //@{
1343
1344 /** Read an object from a Reader. */
1345 void read(Reader& input);
1346 /** Read object details from a Reader. */
1347 void readDetails(Reader& input);
1348 /** Write the object to a string. */
1349 std::string write() override;
1350
1351 //@}
1352 /** @name Getters and Setters */
1353 //@{
1354 /** Returns the element number, in order from 1 to the number of airflow elements. */
1355 int nr() const override;
1356 /** Sets the element number. This should only be done with care. */
1357 void setNr(const int nr) override;
1358 /** Returns the icon used to represent flow path. */
1359 int icon() const override;
1360 /** Sets the icon used to represent flow path. */
1361 void setIcon(const int icon) override;
1362 /** Returns the element data type. */
1363 virtual std::string dataType() const override = 0;
1364 /** Returns the element name. */
1365 std::string name() const override;
1366 /** Sets the element name. */
1367 void setName(const std::string& name) override;
1368 /** Returns the element description. */
1369 std::string desc() const override;
1370 /** Sets the element description. */
1371 void setDesc(const std::string& desc) override;
1372 /** Returns the laminar flow coefficient. */
1373 double lam() const;
1374 /** Sets the laminar flow coefficient. */
1375 bool setLam(const double lam);
1376 /** Sets the laminar flow coefficient. */
1377 bool setLam(const std::string& lam);
1378 /** Returns the turbulent flow coefficient (dP > 0). */
1379 double Cp() const;
1380 /** Sets the turbulent flow coefficient (dP > 0). */
1381 bool setCp(const double Cp);
1382 /** Sets the turbulent flow coefficient (dP > 0). */
1383 bool setCp(const std::string& Cp);
1384 /** Returns the pressure exponent (dP > 0). */
1385 double xp() const;
1386 /** Sets the pressure exponent (dP > 0). */
1387 bool setXp(const double xp);
1388 /** Sets the pressure exponent (dP > 0). */
1389 bool setXp(const std::string& xp);
1390 /** Returns the turbulent flow coefficient (dP < 0). */
1391 double Cn() const;
1392 /** Sets the turbulent flow coefficient (dP < 0). */
1393 bool setCn(const double Cn);
1394 /** Sets the turbulent flow coefficient (dP < 0). */
1395 bool setCn(const std::string& Cn);
1396 /** Returns the pressure exponent (dP < 0). */
1397 double xn() const;
1398 /** Sets the pressure exponent (dP < 0). */
1399 bool setXn(const double xn);
1400 /** Sets the pressure exponent (dP < 0). */
1401 bool setXn(const std::string& xn);
1402 //@}
1403 private:
1404 std::shared_ptr<detail::PlrBackDamperImpl> m_impl;
1405 };
1406
1407 /** The PlrBdq object is a backdraft damper airflow element in volumetric flow form. */
1408 class AIRFLOW_API PlrBdq : public PlrBackDamper
1409 {
1410 public:
1411 /** @name Constructors and Destructors */
1412 //@{
1413
1414 /** Create a new object with default values. */
1415 PlrBdq();
1416 /** Create a new object. */
1417 PlrBdq(int nr, int icon, std::string name, std::string desc);
1418 /** Create a new object. */
1419 PlrBdq(int nr, int icon, std::string name, std::string desc, double lam, double Cp, double xp, double Cn, double xn);
1420 /** Create a new object. */
1421 PlrBdq(int nr, int icon, std::string name, std::string desc, std::string lam, std::string Cp, std::string xp, std::string Cn, std::string xn);
1422 /** Create a new object from another object. */
1423 //PlrBdq(const PlrBdq &other);
1424 /** Destroy the object. */
1425 ✗ virtual ~PlrBdq() override = default;
1426
1427 //@}
1428 /** @name Getters and Setters */
1429 //@{
1430 /** Returns the element data type. */
1431 ✗ virtual std::string dataType() const override {
1432 ✗ return "plr_bdq";
1433 }
1434 //@}
1435 };
1436
1437 /** The PlrBdf object is a backdraft damper airflow element in mass flow form. */
1438 class AIRFLOW_API PlrBdf : public PlrBackDamper
1439 {
1440 public:
1441 /** @name Constructors and Destructors */
1442 //@{
1443
1444 /** Create a new object with default values. */
1445 PlrBdf();
1446 /** Create a new object. */
1447 PlrBdf(int nr, int icon, std::string name, std::string desc);
1448 /** Create a new object. */
1449 PlrBdf(int nr, int icon, std::string name, std::string desc, double lam, double Cp, double xp, double Cn, double xn);
1450 /** Create a new object. */
1451 PlrBdf(int nr, int icon, std::string name, std::string desc, std::string lam, std::string Cp, std::string xp, std::string Cn, std::string xn);
1452 /** Create a new object from another object. */
1453 //PlrBdf(const PlrBdf &other);
1454 /** Destroy the object. */
1455 ✗ virtual ~PlrBdf() override = default;
1456
1457 //@}
1458 /** @name Getters and Setters */
1459 //@{
1460 /** Returns the element data type. */
1461 ✗ std::string dataType() const override {
1462 ✗ return "plr_bdf";
1463 }
1464 //@}
1465 };
1466
1467 /** The QfrGeneral object is the base class for general quadratic airflow elements. */
1468 class AIRFLOW_API QfrGeneral : public AirflowElement
1469 {
1470 public:
1471 /** @name Constructors and Destructors */
1472 //@{
1473
1474 /** Create a new object with default values. */
1475 QfrGeneral();
1476 /** Create a new object. */
1477 QfrGeneral(int nr, int icon, std::string name, std::string desc);
1478 /** Create a new object. */
1479 QfrGeneral(int nr, int icon, std::string name, std::string desc, double a, double b);
1480 /** Create a new object. */
1481 QfrGeneral(int nr, int icon, std::string name, std::string desc, std::string a, std::string b);
1482 /** Create a new object from another object. */
1483 QfrGeneral(const QfrGeneral& other);
1484 /** Destroy the object. */
1485 ✗ virtual ~QfrGeneral() override = default;
1486
1487 //@}
1488 /** @name Operators */
1489 //@{
1490
1491 /** Copy operator */
1492 QfrGeneral& operator=(const QfrGeneral& other);
1493 /** Equality operator */
1494 bool operator==(const QfrGeneral& other) const;
1495 /** Inequality operator */
1496 bool operator!=(const QfrGeneral& other) const;
1497
1498 //@}
1499 /** @name Input and Output */
1500 //@{
1501
1502 /** Read an object from a Reader. */
1503 void read(Reader& input);
1504 /** Read object details from a Reader. */
1505 void readDetails(Reader& input);
1506 /** Write the object to a string. */
1507 std::string write() override;
1508
1509 //@}
1510 /** @name Getters and Setters */
1511 //@{
1512 /** Returns the element number, in order from 1 to the number of airflow elements. */
1513 int nr() const override;
1514 /** Sets the element number. This should only be done with care. */
1515 void setNr(const int nr) override;
1516 /** Returns the icon used to represent flow path. */
1517 int icon() const override;
1518 /** Sets the icon used to represent flow path. */
1519 void setIcon(const int icon) override;
1520 /** Returns the element data type. */
1521 virtual std::string dataType() const override = 0;
1522 /** Returns the element name. */
1523 std::string name() const override;
1524 /** Sets the element name. */
1525 void setName(const std::string& name) override;
1526 /** Returns the element description. */
1527 std::string desc() const override;
1528 /** Sets the element description. */
1529 void setDesc(const std::string& desc) override;
1530 /** Returns the flow rate coefficient. */
1531 double a() const;
1532 /** Sets the flow rate coefficient. */
1533 bool setA(const double a);
1534 /** Sets the flow rate coefficient. */
1535 bool setA(const std::string& a);
1536 /** Returns the flow rate^2 coefficient. */
1537 double b() const;
1538 /** Sets the flow rate^2 coefficient. */
1539 bool setB(const double b);
1540 /** Sets the flow rate^2 coefficient. */
1541 bool setB(const std::string& b);
1542 //@}
1543 private:
1544 std::shared_ptr<detail::QfrQuadraticImpl> m_impl;
1545 };
1546
1547 /** The QfrQab object is an airflow element representing volume flow rate quadratic leakage. */
1548 class AIRFLOW_API QfrQab : public QfrGeneral
1549 {
1550 public:
1551 /** @name Constructors and Destructors */
1552 //@{
1553
1554 /** Create a new object with default values. */
1555 QfrQab();
1556 /** Create a new object. */
1557 QfrQab(int nr, int icon, std::string name, std::string desc);
1558 /** Create a new object. */
1559 QfrQab(int nr, int icon, std::string name, std::string desc, double a, double b);
1560 /** Create a new object. */
1561 QfrQab(int nr, int icon, std::string name, std::string desc, std::string a, std::string b);
1562 /** Create a new object from another object. */
1563 //QfrQab(const QfrQab &other);
1564 /** Destroy the object. */
1565 ✗ virtual ~QfrQab() override = default;
1566
1567 //@}
1568 /** @name Getters and Setters */
1569 //@{
1570
1571 /** Returns the element data type. */
1572 ✗ std::string dataType() const override {
1573 ✗ return "qfr_qab";
1574 }
1575 //@}
1576 };
1577
1578 /** The QfrFab object is an airflow element representing mass flow rate quadratic leakage. */
1579 class AIRFLOW_API QfrFab : public QfrGeneral
1580 {
1581 public:
1582 /** @name Constructors and Destructors */
1583 //@{
1584
1585 /** Create a new object with default values. */
1586 QfrFab();
1587 /** Create a new object. */
1588 QfrFab(int nr, int icon, std::string name, std::string desc);
1589 /** Create a new object. */
1590 QfrFab(int nr, int icon, std::string name, std::string desc, double a, double b);
1591 /** Create a new object. */
1592 QfrFab(int nr, int icon, std::string name, std::string desc, std::string a, std::string b);
1593 /** Create a new object from another object. */
1594 //QfrFab(const QfrFab &other);
1595 /** Destroy the object. */
1596 ✗ virtual ~QfrFab() override = default;
1597
1598 //@}
1599 /** @name Getters and Setters */
1600 //@{
1601
1602 /** Returns the element data type. */
1603 ✗ std::string dataType() const override {
1604 ✗ return "qfr_fab";
1605 }
1606 //@}
1607 };
1608
1609 /** The QfrCrack object is an airflow element representing quadratic leakage through a crack. */
1610 class AIRFLOW_API QfrCrack : public AirflowElement
1611 {
1612 public:
1613 /** @name Constructors and Destructors */
1614 //@{
1615
1616 /** Create a new object with default values. */
1617 QfrCrack();
1618 /** Create a new object. */
1619 QfrCrack(int nr, int icon, std::string name, std::string desc);
1620 /** Create a new object. */
1621 QfrCrack(int nr, int icon, std::string name, std::string desc, double a, double b, double length, double width, double depth, int nB, int u_L,
1622 int u_W, int u_D);
1623 /** Create a new object. */
1624 QfrCrack(int nr, int icon, std::string name, std::string desc, std::string a, std::string b, std::string length, std::string width,
1625 std::string depth, int nB, int u_L, int u_W, int u_D);
1626 /** Create a new object from another object. */
1627 QfrCrack(const QfrCrack& other);
1628 /** Destroy the object. */
1629 ✗ virtual ~QfrCrack() override = default;
1630
1631 //@}
1632 /** @name Operators */
1633 //@{
1634
1635 /** Copy operator */
1636 QfrCrack& operator=(const QfrCrack& other);
1637 /** Equality operator */
1638 bool operator==(const QfrCrack& other) const;
1639 /** Inequality operator */
1640 bool operator!=(const QfrCrack& other) const;
1641
1642 //@}
1643 /** @name Input and Output */
1644 //@{
1645
1646 /** Read an object from a Reader. */
1647 void read(Reader& input);
1648 /** Read object details from a Reader. */
1649 void readDetails(Reader& input);
1650 /** Write the object to a string. */
1651 std::string write() override;
1652
1653 //@}
1654 /** @name Getters and Setters */
1655 //@{
1656 /** Returns the element number, in order from 1 to the number of airflow elements. */
1657 int nr() const override;
1658 /** Sets the element number. This should only be done with care. */
1659 void setNr(const int nr) override;
1660 /** Returns the icon used to represent flow path. */
1661 int icon() const override;
1662 /** Sets the icon used to represent flow path. */
1663 void setIcon(const int icon) override;
1664 /** Returns the element data type. */
1665 ✗ std::string dataType() const override {
1666 ✗ return "qfr_crack";
1667 }
1668 /** Returns the element name. */
1669 std::string name() const override;
1670 /** Sets the element name. */
1671 void setName(const std::string& name) override;
1672 /** Returns the element description. */
1673 std::string desc() const override;
1674 /** Sets the element description. */
1675 void setDesc(const std::string& desc) override;
1676 /** Returns the flow rate coefficient. */
1677 double a() const;
1678 /** Sets the flow rate coefficient. */
1679 bool setA(const double a);
1680 /** Sets the flow rate coefficient. */
1681 bool setA(const std::string& a);
1682 /** Returns the flow rate^2 coefficient. */
1683 double b() const;
1684 /** Sets the flow rate^2 coefficient. */
1685 bool setB(const double b);
1686 /** Sets the flow rate^2 coefficient. */
1687 bool setB(const std::string& b);
1688 /** Returns the crack length [m]. */
1689 double length() const;
1690 /** Sets the crack length [m]. */
1691 bool setLength(const double length);
1692 /** Sets the crack length [m]. */
1693 bool setLength(const std::string& length);
1694 /** Returns the crack width [m].*/
1695 double width() const;
1696 /** Sets the crack width [m].*/
1697 bool setWidth(const double width);
1698 /** Sets the crack width [m].*/
1699 bool setWidth(const std::string& width);
1700 /** Sets the crack depth [m].*/
1701 double depth() const;
1702 /** Sets the crack depth [m].*/
1703 bool setDepth(const double depth);
1704 /** Sets the crack depth [m].*/
1705 bool setDepth(const std::string& depth);
1706 /** Returns the number of bends. */
1707 int nB() const;
1708 /** Sets the number of bends. */
1709 void setNB(const int nB);
1710 /** Returns the display units of length. */
1711 int u_L() const;
1712 /** Sets the display units of length. */
1713 void setU_L(const int u_L);
1714 /** Returns the display units of width. */
1715 int u_W() const;
1716 /** Sets the display units of width. */
1717 void setU_W(const int u_W);
1718 /** Returns the display units of depth. */
1719 int u_D() const;
1720 /** Sets the display units of width. */
1721 void setU_D(const int u_D);
1722 //@}
1723 private:
1724 std::shared_ptr<detail::QfrCrackImpl> m_impl;
1725 };
1726
1727 /** The QfrTest2 object is an airflow element representing 2-point test data quadratic leakage. */
1728 class AIRFLOW_API QfrTest2 : public AirflowElement
1729 {
1730 public:
1731 /** @name Constructors and Destructors */
1732 //@{
1733
1734 /** Create a new object with default values. */
1735 QfrTest2();
1736 /** Create a new object. */
1737 QfrTest2(int nr, int icon, std::string name, std::string desc);
1738 /** Create a new object. */
1739 QfrTest2(int nr, int icon, std::string name, std::string desc, double a, double b, double dP1, double F1, double dP2, double F2, int u_P1,
1740 int u_F1, int u_P2, int u_F2);
1741 /** Create a new object. */
1742 QfrTest2(int nr, int icon, std::string name, std::string desc, std::string a, std::string b, std::string dP1, std::string F1, std::string dP2,
1743 std::string F2, int u_P1, int u_F1, int u_P2, int u_F2);
1744 /** Create a new object from another object. */
1745 QfrTest2(const QfrTest2& other);
1746 /** Destroy the object. */
1747 ✗ virtual ~QfrTest2() override = default;
1748
1749 //@}
1750 /** @name Operators */
1751 //@{
1752
1753 /** Copy operator */
1754 QfrTest2& operator=(const QfrTest2& other);
1755 /** Equality operator */
1756 bool operator==(const QfrTest2& other) const;
1757 /** Inequality operator */
1758 bool operator!=(const QfrTest2& other) const;
1759
1760 //@}
1761 /** @name Input and Output */
1762 //@{
1763
1764 /** Read an object from a Reader. */
1765 void read(Reader& input);
1766 /** Read object details from a Reader. */
1767 void readDetails(Reader& input);
1768 /** Write the object to a string. */
1769 std::string write() override;
1770
1771 //@}
1772 /** @name Getters and Setters */
1773 //@{
1774 /** Returns the element number, in order from 1 to the number of airflow elements. */
1775 int nr() const override;
1776 /** Sets the element number. This should only be done with care. */
1777 void setNr(const int nr) override;
1778 /** Returns the icon used to represent flow path. */
1779 int icon() const override;
1780 /** Sets the icon used to represent flow path. */
1781 void setIcon(const int icon) override;
1782 /** Returns the element data type. */
1783 ✗ std::string dataType() const override {
1784 ✗ return "qfr_test2";
1785 }
1786 /** Returns the element name. */
1787 std::string name() const override;
1788 /** Sets the element name. */
1789 void setName(const std::string& name) override;
1790 /** Returns the element description. */
1791 std::string desc() const override;
1792 /** Sets the element description. */
1793 void setDesc(const std::string& desc) override;
1794 /** Returns the flow rate coefficient. */
1795 double a() const;
1796 /** Sets the flow rate coefficient. */
1797 bool setA(const double a);
1798 /** Sets the flow rate coefficient. */
1799 bool setA(const std::string& a);
1800 /** Returns the flow rate^2 coefficient. */
1801 double b() const;
1802 /** Sets the flow rate^2 coefficient. */
1803 bool setB(const double b);
1804 /** Sets the flow rate^2 coefficient. */
1805 bool setB(const std::string& b);
1806 /** Returns the point 1 pressure drop [Pa]. */
1807 double dP1() const;
1808 /** Sets the point 1 pressure drop [Pa]. */
1809 bool setDP1(const double dP);
1810 /** Sets the point 1 pressure drop [Pa]. */
1811 bool setDP1(const std::string& dP);
1812 /** Returns the point 1 flow rate [kg/s].*/
1813 double F1() const;
1814 /** Sets the point 1 flow rate [kg/s].*/
1815 bool setF1(const double Flow);
1816 /** Sets the point 1 flow rate [kg/s].*/
1817 bool setF1(const std::string& Flow);
1818 /** Returns the point 2 pressure drop [Pa]. */
1819 double dP2() const;
1820 /** Sets the point 2 pressure drop [Pa]. */
1821 bool setDP2(const double dP);
1822 /** Sets the point 2 pressure drop [Pa]. */
1823 bool setDP2(const std::string& dP);
1824 /** Returns the point 2 flow rate [kg/s].*/
1825 double F2() const;
1826 /** Sets the point 2 flow rate [kg/s].*/
1827 bool setF2(const double Flow);
1828 /** Sets the point 2 flow rate [kg/s].*/
1829 bool setF2(const std::string& Flow);
1830 /** Returns the display units of point 1 pressure drop. */
1831 int u_P1() const;
1832 /** Sets the display units of point 1 pressure drop. */
1833 void setU_P1(const int u_P);
1834 /** Returns the display units of point 1 flow. */
1835 int u_F1() const;
1836 /** Sets the display units of point 1 flow. */
1837 void setU_F1(const int u_F);
1838 /** Returns the display units of point 2 pressure drop. */
1839 int u_P2() const;
1840 /** Sets the display units of point 2 pressure drop. */
1841 void setU_P2(const int u_P);
1842 /** Returns the display units of point 2 flow. */
1843 int u_F2() const;
1844 /** Sets the display units of point 2 flow. */
1845 void setU_F2(const int u_F);
1846 //@}
1847 private:
1848 std::shared_ptr<detail::QfrTest2Impl> m_impl;
1849 };
1850
1851 /** The AfeDor object is an airflow element representing 2-way flow through a single opening. */
1852 class AIRFLOW_API AfeDor : public AirflowElement
1853 {
1854 public:
1855 /** @name Constructors and Destructors */
1856 //@{
1857
1858 /** Create a new object with default values. */
1859 AfeDor();
1860 /** Create a new object. */
1861 AfeDor(int nr, int icon, std::string name, std::string desc);
1862 /** Create a new object. */
1863 AfeDor(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double dTmin, double ht, double wd, double cd,
1864 int u_T, int u_H, int u_W);
1865 /** Create a new object. */
1866 AfeDor(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string dTmin,
1867 std::string ht, std::string wd, std::string cd, int u_T, int u_H, int u_W);
1868 /** Create a new object from another object. */
1869 AfeDor(const AfeDor& other);
1870 /** Destroy the object. */
1871 ✗ virtual ~AfeDor() override = default;
1872
1873 //@}
1874 /** @name Operators */
1875 //@{
1876
1877 /** Copy operator */
1878 AfeDor& operator=(const AfeDor& other);
1879 /** Equality operator */
1880 bool operator==(const AfeDor& other) const;
1881 /** Inequality operator */
1882 bool operator!=(const AfeDor& other) const;
1883
1884 //@}
1885 /** @name Input and Output */
1886 //@{
1887
1888 /** Read an object from a Reader. */
1889 void read(Reader& input);
1890 /** Read object details from a Reader. */
1891 void readDetails(Reader& input);
1892 /** Write the object to a string. */
1893 std::string write() override;
1894
1895 //@}
1896 /** @name Getters and Setters */
1897 //@{
1898 /** Returns the element number, in order from 1 to the number of airflow elements. */
1899 int nr() const override;
1900 /** Sets the element number. This should only be done with care. */
1901 void setNr(const int nr) override;
1902 /** Returns the icon used to represent flow path. */
1903 int icon() const override;
1904 /** Sets the icon used to represent flow path. */
1905 void setIcon(const int icon) override;
1906 /** Returns the element data type. */
1907 ✗ std::string dataType() const override {
1908 ✗ return "dor_door";
1909 }
1910 /** Returns the element name. */
1911 std::string name() const override;
1912 /** Sets the element name. */
1913 void setName(const std::string& name) override;
1914 /** Returns the element description. */
1915 std::string desc() const override;
1916 /** Sets the element description. */
1917 void setDesc(const std::string& desc) override;
1918 /** Returns the laminar flow coefficient. */
1919 double lam() const;
1920 /** Sets the laminar flow coefficient. */
1921 bool setLam(const double lam);
1922 /** Sets the laminar flow coefficient. */
1923 bool setLam(const std::string& lam);
1924 /** Returns the turbulent flow coefficient. */
1925 double turb() const;
1926 /** Sets the turbulent flow coefficient. */
1927 bool setTurb(const double turb);
1928 /** Sets the turbulent flow coefficient. */
1929 bool setTurb(const std::string& turb);
1930 /** Returns the pressure exponent. */
1931 double expt() const;
1932 /** Sets the pressure exponent. */
1933 bool setExpt(const double expt);
1934 /** Sets the pressure exponent. */
1935 bool setExpt(const std::string& expt);
1936 /** Returns the minimum temperature difference for two-way flow [C]. */
1937 double dTmin() const;
1938 /** Sets the minimum temperature difference for two-way flow [C]. */
1939 bool setDTmin(const double dTmin);
1940 /** Sets the minimum temperature difference for two-way flow [C]. */
1941 bool setDTmin(const std::string& dTmin);
1942 /** Returns the height of doorway [m]. */
1943 double height() const;
1944 /** Sets the height of doorway [m]. */
1945 bool setHeight(const double ht);
1946 /** Sets the height of doorway [m]. */
1947 bool setHeight(const std::string& ht);
1948 /** Sets the width of doorway [m]. */
1949 double width() const;
1950 /** Sets the width of doorway [m]. */
1951 bool setWidth(const double wd);
1952 /** Sets the width of doorway [m]. */
1953 bool setWidth(const std::string& wd);
1954 /** Returns the discharge coefficient. */
1955 double cd() const;
1956 /** Sets the discharge coefficient. */
1957 bool setCd(const double cd);
1958 /** Sets the discharge coefficient. */
1959 bool setCd(const std::string& cd);
1960 /** Returns the display units of temperature. */
1961 int u_T() const;
1962 /** Sets the display units of temperature. */
1963 void setU_T(const int u_T);
1964 /** Returns the display units of height. */
1965 int u_H() const;
1966 /** Sets the display units of height. */
1967 void setU_H(const int u_H);
1968 /** Returns the display units of width. */
1969 int u_W() const;
1970 /** Sets the display units of width. */
1971 void setU_W(const int u_W);
1972 //@}
1973 private:
1974 std::shared_ptr<detail::AfeDorImpl> m_impl;
1975 };
1976
1977 /** The DrPl2 object is an airflow element representing 2-way flow through an opening using two power law models. */
1978 class AIRFLOW_API DrPl2 : public AirflowElement
1979 {
1980 public:
1981 /** @name Constructors and Destructors */
1982 //@{
1983
1984 /** Create a new object with default values. */
1985 DrPl2();
1986 /** Create a new object. */
1987 DrPl2(int nr, int icon, std::string name, std::string desc);
1988 /** Create a new object. */
1989 DrPl2(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double dH, double ht, double wd, double cd,
1990 int u_H, int u_W);
1991 /** Create a new object. */
1992 DrPl2(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string dH, std::string ht,
1993 std::string wd, std::string cd, int u_H, int u_W);
1994 /** Create a new object from another object. */
1995 DrPl2(const DrPl2& other);
1996 /** Destroy the object. */
1997 ✗ virtual ~DrPl2() override = default;
1998
1999 //@}
2000 /** @name Operators */
2001 //@{
2002
2003 /** Copy operator */
2004 DrPl2& operator=(const DrPl2& other);
2005 /** Equality operator */
2006 bool operator==(const DrPl2& other) const;
2007 /** Inequality operator */
2008 bool operator!=(const DrPl2& other) const;
2009
2010 //@}
2011 /** @name Input and Output */
2012 //@{
2013
2014 /** Read an object from a Reader. */
2015 void read(Reader& input);
2016 /** Read object details from a Reader. */
2017 void readDetails(Reader& input);
2018 /** Write the object to a string. */
2019 std::string write() override;
2020
2021 //@}
2022 /** @name Getters and Setters */
2023 //@{
2024 /** Returns the element number, in order from 1 to the number of airflow elements. */
2025 int nr() const override;
2026 /** Sets the element number. This should only be done with care. */
2027 void setNr(const int nr) override;
2028 /** Returns the icon used to represent flow path. */
2029 int icon() const override;
2030 /** Sets the icon used to represent flow path. */
2031 void setIcon(const int icon) override;
2032 /** Returns the element data type. */
2033 ✗ std::string dataType() const override {
2034 ✗ return "dor_pl2";
2035 }
2036 /** Returns the element name. */
2037 std::string name() const override;
2038 /** Sets the element name. */
2039 void setName(const std::string& name) override;
2040 /** Returns the element description. */
2041 std::string desc() const override;
2042 /** Sets the element description. */
2043 void setDesc(const std::string& desc) override;
2044 /** Returns the laminar flow coefficient. */
2045 double lam() const;
2046 /** Sets the laminar flow coefficient. */
2047 bool setLam(const double lam);
2048 /** Sets the laminar flow coefficient. */
2049 bool setLam(const std::string& lam);
2050 /** Returns the turbulent flow coefficient. */
2051 double turb() const;
2052 /** Sets the turbulent flow coefficient. */
2053 bool setTurb(const double turb);
2054 /** Sets the turbulent flow coefficient. */
2055 bool setTurb(const std::string& turb);
2056 /** Returns the pressure exponent. */
2057 double expt() const;
2058 /** Sets the pressure exponent. */
2059 bool setExpt(const double expt);
2060 /** Sets the pressure exponent. */
2061 bool setExpt(const std::string& expt);
2062 /** Returns the distance above/below midpoint [m]. */
2063 double dH() const;
2064 /** Sets the distance above/below midpoint [m]. */
2065 bool setDH(const double dH);
2066 /** Sets the distance above/below midpoint [m]. */
2067 bool setDH(const std::string& dH);
2068 /** Returns the height of doorway [m]. */
2069 double height() const;
2070 /** Sets the height of doorway [m]. */
2071 bool setHeight(const double ht);
2072 /** Sets the height of doorway [m]. */
2073 bool setHeight(const std::string& ht);
2074 /** Sets the width of doorway [m]. */
2075 double width() const;
2076 /** Sets the width of doorway [m]. */
2077 bool setWidth(const double wd);
2078 /** Sets the width of doorway [m]. */
2079 bool setWidth(const std::string& wd);
2080 /** Returns the discharge coefficient. */
2081 double cd() const;
2082 /** Sets the discharge coefficient. */
2083 bool setCd(const double cd);
2084 /** Sets the discharge coefficient. */
2085 bool setCd(const std::string& cd);
2086 /** Returns the display units of height. */
2087 int u_H() const;
2088 /** Sets the display units of height. */
2089 void setU_H(const int u_H);
2090 /** Returns the display units of width. */
2091 int u_W() const;
2092 /** Sets the display units of width. */
2093 void setU_W(const int u_W);
2094 //@}
2095 private:
2096 std::shared_ptr<detail::DrPl2Impl> m_impl;
2097 };
2098
2099 /** The AfeFlow object is the base class of constant flow rate airflow elements. */
2100 class AIRFLOW_API AfeFlow : public AirflowElement
2101 {
2102 public:
2103 /** @name Constructors and Destructors */
2104 //@{
2105
2106 /** Create a new object with default values. */
2107 AfeFlow();
2108 /** Create a new object. */
2109 AfeFlow(int nr, int icon, std::string name, std::string desc);
2110 /** Create a new object. */
2111 AfeFlow(int nr, int icon, std::string name, std::string desc, double Flow, int u_F);
2112 /** Create a new object. */
2113 AfeFlow(int nr, int icon, std::string name, std::string desc, std::string Flow, int u_F);
2114 /** Create a new object from another object. */
2115 AfeFlow(const AfeFlow& other);
2116 /** Destroy the object. */
2117 6 virtual ~AfeFlow() override = default;
2118
2119 //@}
2120 /** @name Operators */
2121 //@{
2122
2123 /** Copy operator */
2124 AfeFlow& operator=(const AfeFlow& other);
2125 /** Equality operator */
2126 bool operator==(const AfeFlow& other) const;
2127 /** Inequality operator */
2128 bool operator!=(const AfeFlow& other) const;
2129
2130 //@}
2131 /** @name Input and Output */
2132 //@{
2133
2134 /** Read an object from a Reader. */
2135 void read(Reader& input);
2136 /** Read object details from a Reader. */
2137 void readDetails(Reader& input);
2138 /** Write the object to a string. */
2139 std::string write() override;
2140
2141 //@}
2142 /** @name Getters and Setters */
2143 //@{
2144 /** Returns the element number, in order from 1 to the number of airflow elements. */
2145 int nr() const override;
2146 /** Sets the element number. This should only be done with care. */
2147 void setNr(const int nr) override;
2148 /** Returns the icon used to represent flow path. */
2149 int icon() const override;
2150 /** Sets the icon used to represent flow path. */
2151 void setIcon(const int icon) override;
2152 /** Returns the element data type. */
2153 std::string dataType() const override = 0;
2154 /** Returns the element name. */
2155 std::string name() const override;
2156 /** Sets the element name. */
2157 void setName(const std::string& name) override;
2158 /** Returns the element description. */
2159 std::string desc() const override;
2160 /** Sets the element description. */
2161 void setDesc(const std::string& desc) override;
2162 /** Returns the design flow rate [kg/s or m^3/s]. */
2163 double Flow() const;
2164 /** Sets the design flow rate [kg/s or m^3/s]. */
2165 bool setFlow(const double Flow);
2166 /** Sets the design flow rate [kg/s or m^3/s]. */
2167 bool setFlow(const std::string& Flow);
2168 /** Returns the display units of design flow rate. */
2169 int u_F() const;
2170 /** Sets the display units of design flow rate. */
2171 void setU_F(const int u_F);
2172 //@}
2173 private:
2174 std::shared_ptr<detail::AfeFlowImpl> m_impl;
2175 };
2176
2177 /** The AfeCmf object is an airflow element representing constant mass flow rate. */
2178 class AIRFLOW_API AfeCmf : public AfeFlow
2179 {
2180 public:
2181 /** @name Constructors and Destructors */
2182 //@{
2183
2184 /** Create a new object with default values. */
2185 AfeCmf();
2186 /** Create a new object. */
2187 AfeCmf(int nr, int icon, std::string name, std::string desc);
2188 /** Create a new object. */
2189 AfeCmf(int nr, int icon, std::string name, std::string desc, double Flow, int u_F);
2190 /** Create a new object. */
2191 AfeCmf(int nr, int icon, std::string name, std::string desc, std::string Flow, int u_F);
2192 /** Create a new object from another object. */
2193 //AfeCmf(const AfeCmf &other);
2194 /** Destroy the object. */
2195 12 virtual ~AfeCmf() override = default;
2196
2197 //@}
2198 /** @name Getters and Setters */
2199 //@{
2200 /** Returns the element data type. */
2201 1 std::string dataType() const override {
2202
1/1
✓ Branch 1 taken 1 time.
2 return "fan_cmf";
2203 }
2204 //@}
2205 };
2206
2207 /** The AfeCvf object is an airflow element representing constant volume flow rate. */
2208 class AIRFLOW_API AfeCvf : public AfeFlow
2209 {
2210 public:
2211 /** @name Constructors and Destructors */
2212 //@{
2213
2214 /** Create a new object with default values. */
2215 AfeCvf();
2216 /** Create a new object. */
2217 AfeCvf(int nr, int icon, std::string name, std::string desc);
2218 /** Create a new object. */
2219 AfeCvf(int nr, int icon, std::string name, std::string desc, double Flow, int u_F);
2220 /** Create a new object. */
2221 AfeCvf(int nr, int icon, std::string name, std::string desc, std::string Flow, int u_F);
2222 /** Create a new object from another object. */
2223 //AfeCvf(const AfeCvf &other);
2224 /** Destroy the object. */
2225 ✗ virtual ~AfeCvf() override = default;
2226
2227 //@}
2228 /** @name Getters and Setters */
2229 //@{
2230 /** Returns the element data type. */
2231 ✗ std::string dataType() const override {
2232 ✗ return "fan_cvf";
2233 }
2234 //@}
2235 };
2236
2237 /** The AfeFan object is an airflow element representing a fan with performance data. */
2238 class AIRFLOW_API AfeFan : public AirflowElement
2239 {
2240 public:
2241 /** @name Constructors and Destructors */
2242 //@{
2243
2244 /** Create a new object with default values. */
2245 AfeFan();
2246 /** Create a new object. */
2247 AfeFan(int nr, int icon, std::string name, std::string desc);
2248 /** Create a new object. */
2249 AfeFan(int nr, int icon, std::string name, std::string desc, double lam, double turb, double expt, double rdens, double fdf, double sop,
2250 double off, std::vector<double> fpc, double Sarea, int u_Sa, std::vector<FanDataPoint> data);
2251 /** Create a new object. */
2252 AfeFan(int nr, int icon, std::string name, std::string desc, std::string lam, std::string turb, std::string expt, std::string rdens,
2253 std::string fdf, std::string sop, std::string off, std::vector<std::string> fpc, std::string Sarea, int u_Sa,
2254 std::vector<FanDataPoint> data);
2255 /** Create a new object from another object. */
2256 AfeFan(const AfeFan& other);
2257 /** Destroy the object. */
2258 ✗ virtual ~AfeFan() override = default;
2259
2260 //@}
2261 /** @name Operators */
2262 //@{
2263
2264 /** Copy operator */
2265 AfeFan& operator=(const AfeFan& other);
2266 /** Equality operator */
2267 bool operator==(const AfeFan& other) const;
2268 /** Inequality operator */
2269 bool operator!=(const AfeFan& other) const;
2270
2271 //@}
2272 /** @name Input and Output */
2273 //@{
2274
2275 /** Read an object from a Reader. */
2276 void read(Reader& input);
2277 /** Read object details from a Reader. */
2278 void readDetails(Reader& input);
2279 /** Write the object to a string. */
2280 std::string write() override;
2281
2282 //@}
2283 /** @name Getters and Setters */
2284 //@{
2285 /** Returns the element number, in order from 1 to the number of airflow elements. */
2286 int nr() const override;
2287 /** Sets the element number. This should only be done with care. */
2288 void setNr(const int nr) override;
2289 /** Returns the icon used to represent flow path. */
2290 int icon() const override;
2291 /** Sets the icon used to represent flow path. */
2292 void setIcon(const int icon) override;
2293 /** Returns the element data type. */
2294 ✗ std::string dataType() const override {
2295 ✗ return "fan_fan";
2296 }
2297 /** Returns the element name. */
2298 std::string name() const override;
2299 /** Sets the element name. */
2300 void setName(const std::string& name) override;
2301 /** Returns the element description. */
2302 std::string desc() const override;
2303 /** Sets the element description. */
2304 void setDesc(const std::string& desc) override;
2305 /** Returns the laminar flow coefficient. */
2306 double lam() const;
2307 /** Sets the laminar flow coefficient. */
2308 bool setLam(const double lam);
2309 /** Sets the laminar flow coefficient. */
2310 bool setLam(const std::string& lam);
2311 /** Returns the turbulent flow coefficient. */
2312 double turb() const;
2313 /** Sets the turbulent flow coefficient. */
2314 bool setTurb(const double turb);
2315 /** Sets the turbulent flow coefficient. */
2316 bool setTurb(const std::string& turb);
2317 /** Returns the pressure exponent. */
2318 double expt() const;
2319 /** Sets the pressure exponent. */
2320 bool setExpt(const double expt);
2321 /** Sets the pressure exponent. */
2322 bool setExpt(const std::string& expt);
2323 /** Returns the reference fluid density [kg/m^3]. */
2324 double rdens() const;
2325 /** Sets the reference fluid density [kg/m^3]. */
2326 bool setRdens(const double rdens);
2327 /** Sets the reference fluid density [kg/m^3]. */
2328 bool setRdens(const std::string& rdens);
2329 /** Returns the free delivery flow (prise = 0) [kg/s]. */
2330 double fdf() const;
2331 /** Returns the free delivery flow (prise = 0) [kg/s]. */
2332 bool setFdf(const double fdf);
2333 /** Returns the free delivery flow (prise = 0) [kg/s]. */
2334 bool setFdf(const std::string& fdf);
2335 /** Returns the shut-off pressure (flow = 0) [Pa]. */
2336 double sop() const;
2337 /** Sets the shut-off pressure (flow = 0) [Pa]. */
2338 bool setSop(const double sop);
2339 /** Sets the shut-off pressure (flow = 0) [Pa]. */
2340 bool setSop(const std::string& sop);
2341 /** Returns the minimum RPM fraction: fan is off if (RPM/rated RPM) < off. */
2342 double off() const;
2343 /** Returns the minimum RPM fraction: fan is off if (RPM/rated RPM) < off. */
2344 bool setOff(const double off);
2345 /** Returns the minimum RPM fraction: fan is off if (RPM/rated RPM) < off. */
2346 bool setOff(const std::string& off);
2347 /** Returns the fan performance polynomial coefficients. */
2348 std::vector<double> fpc() const;
2349 /** Sets the fan performance polynomial coefficients. */
2350 bool setFpc(const std::vector<double>& fpc);
2351 /** Sets the fan performance polynomial coefficients. */
2352 bool setFpc(const std::vector<std::string>& fpc);
2353 /** Returns the shut-off orifice area [m^2]. */
2354 double Sarea() const;
2355 /** Returns the shut-off orifice area [m^2]. */
2356 bool setSarea(const double Sarea);
2357 /** Returns the shut-off orifice area [m^2]. */
2358 bool setSarea(const std::string& Sarea);
2359 /** Returns the display units of shut-off orifice area. */
2360 int u_Sa() const;
2361 /** Sets the display units of shut-off orifice area. */
2362 void setU_Sa(const int u_Sa);
2363 /** Returns the vector of fan data points. */
2364 std::vector<FanDataPoint> data() const;
2365 /** Sets the vector of fan data points. */
2366 void setData(const std::vector<FanDataPoint>& data);
2367 //@}
2368 private:
2369 std::shared_ptr<detail::AfeFanImpl> m_impl;
2370 };
2371
2372 /** The AfeCvf object is the base class of airflow element representing cubic spline leakage. */
2373 class AIRFLOW_API AfeCsf : public AirflowElement
2374 {
2375 public:
2376 /** @name Constructors and Destructors */
2377 //@{
2378
2379 /** Create a new object with default values. */
2380 AfeCsf();
2381 /** Create a new object. */
2382 AfeCsf(int nr, int icon, std::string name, std::string desc);
2383 /** Create a new object. */
2384 AfeCsf(int nr, int icon, std::string name, std::string desc, int u_x, int u_y, std::vector<XyDataPoint> data);
2385 /** Create a new object from another object. */
2386 AfeCsf(const AfeCsf& other);
2387 /** Destroy the object. */
2388 ✗ virtual ~AfeCsf() override = default;
2389
2390 //@}
2391 /** @name Operators */
2392 //@{
2393
2394 /** Copy operator */
2395 AfeCsf& operator=(const AfeCsf& other);
2396 /** Equality operator */
2397 bool operator==(const AfeCsf& other) const;
2398 /** Inequality operator */
2399 bool operator!=(const AfeCsf& other) const;
2400
2401 //@}
2402 /** @name Input and Output */
2403 //@{
2404
2405 /** Read an object from a Reader. */
2406 void read(Reader& input);
2407 /** Read object details from a Reader. */
2408 void readDetails(Reader& input);
2409 /** Write the object to a string. */
2410 std::string write() override;
2411
2412 //@}
2413 /** @name Getters and Setters */
2414 //@{
2415 /** Returns the element number, in order from 1 to the number of airflow elements. */
2416 int nr() const override;
2417 /** Sets the element number. This should only be done with care. */
2418 void setNr(const int nr) override;
2419 /** Returns the icon used to represent flow path. */
2420 int icon() const override;
2421 /** Sets the icon used to represent flow path. */
2422 void setIcon(const int icon) override;
2423 /** Returns the element name. */
2424 std::string name() const override;
2425 /** Sets the element name. */
2426 void setName(const std::string& name) override;
2427 /** Returns the element description. */
2428 std::string desc() const override;
2429 /** Sets the element description. */
2430 void setDesc(const std::string& desc) override;
2431 /** Returns the display units for x. */
2432 int u_x() const;
2433 /** Sets the display units for x. */
2434 void setU_x(const int u_x);
2435 /** Returns the display units for y. */
2436 int u_y() const;
2437 /** Sets the display units for y. */
2438 void setU_y(const int u_y);
2439 /** Returns the data point vector of (x,y) pairs. */
2440 std::vector<XyDataPoint> data() const;
2441 /** Sets the data point vector. */
2442 void setData(const std::vector<XyDataPoint>& data);
2443 //@}
2444 private:
2445 std::shared_ptr<detail::AfeCsfImpl> m_impl;
2446 };
2447
2448 /** The AfeFsp object is an airflow element representing cubic spline leakage with mass flow rate as a function of pressure drop. */
2449 class AIRFLOW_API AfeFsp : public AfeCsf
2450 {
2451 public:
2452 /** @name Constructors and Destructors */
2453 //@{
2454
2455 /** Create a new object with default values. */
2456 AfeFsp();
2457 /** Create a new object. */
2458 AfeFsp(int nr, int icon, std::string name, std::string desc);
2459 /** Create a new object. */
2460 AfeFsp(int nr, int icon, std::string name, std::string desc, int u_x, int u_y, std::vector<XyDataPoint> data);
2461 /** Create a new object from another object. */
2462 //AfeFsp(const AfeCsf &other);
2463 /** Destroy the object. */
2464 ✗ virtual ~AfeFsp() override = default;
2465 //@}
2466
2467 //@}
2468 /** @name Getters and Setters */
2469 //@{
2470
2471 /** Returns the element data type. */
2472 ✗ std::string dataType() const override {
2473 ✗ return "csf_fsp";
2474 }
2475 //@}
2476 };
2477
2478 /** The AfeQsp object is an airflow element representing cubic spline leakage with volume flow rate as a function of pressure drop. */
2479 class AIRFLOW_API AfeQsp : public AfeCsf
2480 {
2481 public:
2482 /** @name Constructors and Destructors */
2483 //@{
2484
2485 /** Create a new object with default values. */
2486 AfeQsp();
2487 /** Create a new object. */
2488 AfeQsp(int nr, int icon, std::string name, std::string desc);
2489 /** Create a new object. */
2490 AfeQsp(int nr, int icon, std::string name, std::string desc, int u_x, int u_y, std::vector<XyDataPoint> data);
2491 /** Create a new object from another object. */
2492 //AfeQsp(const AfeCsf &other);
2493 /** Destroy the object. */
2494 ✗ virtual ~AfeQsp() override = default;
2495 //@}
2496
2497 //@}
2498 /** @name Getters and Setters */
2499 //@{
2500
2501 /** Returns the element data type. */
2502 ✗ std::string dataType() const override {
2503 ✗ return "csf_qsp";
2504 }
2505 //@}
2506 };
2507
2508 /** The AfePsf object is an airflow element representing cubic spline leakage with pressure drop as a function of mass flow rate. */
2509 class AIRFLOW_API AfePsf : public AfeCsf
2510 {
2511 public:
2512 /** @name Constructors and Destructors */
2513 //@{
2514
2515 /** Create a new object with default values. */
2516 AfePsf();
2517 /** Create a new object. */
2518 AfePsf(int nr, int icon, std::string name, std::string desc);
2519 /** Create a new object. */
2520 AfePsf(int nr, int icon, std::string name, std::string desc, int u_x, int u_y, std::vector<XyDataPoint> data);
2521 /** Create a new object from another object. */
2522 //AfePsf(const AfePsf &other);
2523 /** Destroy the object. */
2524 ✗ virtual ~AfePsf() override = default;
2525 //@}
2526
2527 //@}
2528 /** @name Getters and Setters */
2529 //@{
2530
2531 /** Returns the element data type. */
2532 ✗ std::string dataType() const override {
2533 ✗ return "csf_psf";
2534 }
2535 //@}
2536 };
2537
2538 /** The AfePsq object is an airflow element representing cubic spline leakage with pressure drop as a function of volume flow rate. */
2539 class AIRFLOW_API AfePsq : public AfeCsf
2540 {
2541 public:
2542 /** @name Constructors and Destructors */
2543 //@{
2544
2545 /** Create a new object with default values. */
2546 AfePsq();
2547 /** Create a new object. */
2548 AfePsq(int nr, int icon, std::string name, std::string desc);
2549 /** Create a new object. */
2550 AfePsq(int nr, int icon, std::string name, std::string desc, int u_x, int u_y, std::vector<XyDataPoint> data);
2551 /** Create a new object from another object. */
2552 //AfePsq(const AfePsq &other);
2553 /** Destroy the object. */
2554 ✗ virtual ~AfePsq() override = default;
2555 //@}
2556
2557 //@}
2558 /** @name Getters and Setters */
2559 //@{
2560
2561 /** Returns the element data type. */
2562 ✗ std::string dataType() const override {
2563 ✗ return "csf_psq";
2564 }
2565 //@}
2566 };
2567
2568 /** The AfeSup object is an airflow element that combines multiple elements into a single element. */
2569 class AIRFLOW_API AfeSup : public AirflowElement
2570 {
2571 public:
2572 /** @name Constructors and Destructors */
2573 //@{
2574
2575 /** Create a new object with default values. */
2576 AfeSup();
2577 /** Create a new object. */
2578 AfeSup(int nr, int icon, std::string name, std::string desc);
2579 /** Create a new object. */
2580 AfeSup(int nr, int icon, std::string name, std::string desc, int sched, int u_H, std::vector<AirflowSubelementData> subelements);
2581 /** Create a new object from another object. */
2582 AfeSup(const AfeSup& other);
2583 /** Destroy the object. */
2584 ✗ virtual ~AfeSup() override = default;
2585
2586 //@}
2587 /** @name Operators */
2588 //@{
2589
2590 /** Copy operator */
2591 AfeSup& operator=(const AfeSup& other);
2592 /** Equality operator */
2593 bool operator==(const AfeSup& other) const;
2594 /** Inequality operator */
2595 bool operator!=(const AfeSup& other) const;
2596
2597 //@}
2598 /** @name Input and Output */
2599 //@{
2600
2601 /** Read an object from a Reader. */
2602 void read(Reader& input);
2603 /** Read object details from a Reader. */
2604 void readDetails(Reader& input);
2605 /** Write the object to a string. */
2606 std::string write() override;
2607
2608 //@}
2609 /** @name Getters and Setters */
2610 //@{
2611 /** Returns the element number, in order from 1 to the number of airflow elements. */
2612 int nr() const override;
2613 /** Sets the element number. This should only be done with care. */
2614 void setNr(const int nr) override;
2615 /** Returns the icon used to represent flow path. */
2616 int icon() const override;
2617 /** Sets the icon used to represent flow path. */
2618 void setIcon(const int icon) override;
2619 /** Returns the element data type. */
2620 ✗ std::string dataType() const override {
2621 ✗ return "sup_afe";
2622 }
2623 /** Returns the element name. */
2624 std::string name() const override;
2625 /** Sets the element name. */
2626 void setName(const std::string& name) override;
2627 /** Returns the element description. */
2628 std::string desc() const override;
2629 /** Sets the element description. */
2630 void setDesc(const std::string& desc) override;
2631 /** Returns the scheduled sub-element number (only one). */
2632 int sched() const;
2633 /** Sets the scheduled sub-element number (only one). */
2634 void setSched(const int sched);
2635 /** Returns the display units of relative height. */
2636 int u_H() const;
2637 /** Sets the display units of relative height. */
2638 void setU_H(const int u_H);
2639 /** Returns the sub-element data vector. */
2640 std::vector<AirflowSubelementData> subelements() const;
2641 /** Sets the sub-element data vector. */
2642 void setSubelements(const std::vector<AirflowSubelementData>& subelements);
2643 //@}
2644 private:
2645 std::shared_ptr<detail::AfeSupImpl> m_impl;
2646 };
2647
2648 } // namespace contam
2649 } // namespace openstudio
2650
2651 #endif // AIRFLOW_CONTAM_PRJAIRFLOWELEMENTS_HPP
2652