-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBodyModel.cpp
More file actions
955 lines (901 loc) · 36.5 KB
/
Copy pathBodyModel.cpp
File metadata and controls
955 lines (901 loc) · 36.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
#ifndef _BODYMODEL_CPP_
#define _BODYMODEL_CPP_
#include "BodyModel.hpp"
namespace BODYMODEL
{
/** \copydoc head */
ELEMENT::Element* head(){
ELEMENT::Element* head = new ELEMENT::SphereElement(13,2);
// Other attributes
head->length = -1;
head->hx = 0;
head->a_nat = 3.0;
head->a_frc = 113.0;
head->a_mix = -5.70;
head->a_sk = 0.0835;
head->a_sed = 0.00;
head->a_stnd = 0;
head->a_sw = 0.095;
head->a_dl = 0.055;
head->a_cs = 0.030;
head->a_sh = 0.0;
head->n_j = 0;
// addWashers(obj,N,r0,rf,k,rho,c,w_bl,q_m,index)
head->addWashers(
5, // Number of washers to add
0, // m, inner radius
0.0860, // m, outer radius
0.49, // W/m^2, conductivity
1080, // kg/m^3, density
3850, // J/kg/K, specific heat capacity
10.1320e-3,// 1/s, tissue permeability
13400, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
head->addWashers(
2, // Number of washers to add
0.0860, // m, inner radius
0.1005, // m, outer radius
1.16, // W/m^2, conductivity
1500, // kg/m^3, density
1591, // J/kg/K, specific heat capacity
0e-3,// 1/s, tissue permeability
0, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
head->addWashers(
2, // Number of washers to add
0.1005, // m, inner radius
0.1020, // m, outer radius
0.16, // W/m^2, conductivity
850, // kg/m^3, density
2300, // J/kg/K, specific heat capacity
.0036e-3,// 1/s, tissue permeability
58, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
head->addWashers(
4, // Number of washers to add
0.1020, // m, inner radius
0.1040, // m, outer radius
0.47, // W/m^2, conductivity
1085, // kg/m^3, density
3680, // J/kg/K, specific heat capacity
5.4800e-3,// 1/s, tissue permeability
368, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
SECTOR::Sector *forehead = new SECTOR::Sector();
forehead->phi = 10*M_PI/180.0; // rad, interior angle of sector
forehead->psiSed = 1.0; // -, sedentary view factor
forehead->psiStnd = 1.0; // -, standard view factor
forehead->echelon = 0.99; // -, emission coefficient
head->addSector(forehead);
SECTOR::Sector *headBack = new SECTOR::Sector();
headBack->phi = 170*M_PI/180.0; // rad, interior angle of sector
headBack->psiSed = 0.90; // -, sedentary view factor
headBack->psiStnd = 0.90; // -, standard view factor
headBack->echelon = 0.80; // -, emission coefficient
head->addSector(headBack);
// Make sure totally filled!
assert(head->getState()==ELEMENT::wsAdded);
return head;
}
/** \copydoc face */
ELEMENT::Element* face(){
ELEMENT::Element* face = new ELEMENT::CylinderElement(7,1);
// Other attributes
face->length = 0.0984;
face->hx = 0;
face->a_nat = 3.0;
face->a_frc = 113.0;
face->a_mix = -5.70;
face->a_sk = 0.0418;
face->a_sed = 0.00;
face->a_stnd = 0;
face->a_sw = 0.054;
face->a_dl = 0.046;
face->a_cs = 0.033;
face->a_sh = 0.002;
face->n_j = 0;
// addWashers(obj,N,r0,rf,k,rho,c,w_bl,q_m,index)
face->addWashers(
1, // Number of washers to add
0, // m, inner radius
0.0268, // m, outer radius
0.420, // W/m^2, conductivity
1085, // kg/m^3, density
3768, // J/kg/K, specific heat capacity
0.538e-3,// 1/s, tissue permeability
684, // W/m^3, specific basal metabolism
1, // muscle
.2); // respiratory
face->addWashers(
1, // Number of washers to add
0.0268, // m, inner radius
0.0542, // m, outer radius
1.16, // W/m^2, conductivity
1500, // kg/m^3, density
1591, // J/kg/K, specific heat capacity
0e-3,// 1/s, tissue permeability
0, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
face->addWashers(
1, // Number of washers to add
0.0542, // m, inner radius
0.0680, // m, outer radius
0.42, // W/m^2, conductivity
1085, // kg/m^3, density
3768, // J/kg/K, specific heat capacity
0.538e-3,// 1/s, tissue permeability
684, // W/m^3, specific basal metabolism
1, // muscle
.25); // respiratory
face->addWashers(
2, // Number of washers to add
0.0680, // m, inner radius
0.0760, // m, outer radius
0.16, // W/m^2, conductivity
850, // kg/m^3, density
2300, // J/kg/K, specific heat capacity
0.0036e-3,// 1/s, tissue permeability
58, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
face->addWashers(
2, // Number of washers to add
0.0760, // m, inner radius
0.0780, // m, outer radius
0.47, // W/m^2, conductivity
1085, // kg/m^3, density
3680, // J/kg/K, specific heat capacity
11.17e-3,// 1/s, tissue permeability
368, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
SECTOR::Sector *faceFront = new SECTOR::Sector();
faceFront->phi = 210*M_PI/180.0; // rad, interior angle of sector
faceFront->psiSed = 0.9; // -, sedentary view factor
faceFront->psiStnd = 0.9; // -, standard view factor
faceFront->echelon = 0.99; // -, emission coefficient
face->addSector(faceFront);
// Make sure totally filled!
assert(face->getState()==ELEMENT::wsAdded);
return face;
}
/** \copydoc neck */
ELEMENT::Element* neck(){
ELEMENT::Element* neck = new ELEMENT::CylinderElement(11,2);
// Other attributes
neck->length = 0.0842;
neck->hx = 0;
neck->a_nat = 1.6;
neck->a_frc = 130.0;
neck->a_mix = -6.50;
neck->a_sk = 0.0417;
neck->a_sed = 0.03;
neck->a_stnd = 0.01;
neck->a_sw = 0.042;
neck->a_dl = 0.031;
neck->a_cs = 0.025;
neck->a_sh = 0.002;
neck->n_j = 0;
// addWashers(obj,N,r0,rf,k,rho,c,w_bl,q_m,index)
neck->addWashers(
1, // Number of washers to add
0, // m, inner radius
0.0190, // m, outer radius
0.75, // W/m^2, conductivity
1357, // kg/m^3, density
1700, // J/kg/K, specific heat capacity
0e-3,// 1/s, tissue permeability
0, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
neck->addWashers(
4, // Number of washers to add
0.0190, // m, inner radius
0.0546, // m, outer radius
0.42, // W/m^2, conductivity
1085, // kg/m^3, density
3768, // J/kg/K, specific heat capacity
0.5380e-3,// 1/s, tissue permeability
684, // W/m^3, specific basal metabolism
1, // muscle
.25); // not respiratory
neck->addWashers(
2, // Number of washers to add
0.0546, // m, inner radius
0.0556, // m, outer radius
0.16, // W/m^2, conductivity
850, // kg/m^3, density
2300, // J/kg/K, specific heat capacity
0.0036e-3,// 1/s, tissue permeability
58, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
neck->addWashers(
4, // Number of washers to add
0.0556, // m, inner radius
0.0567, // m, outer radius
0.47, // W/m^2, conductivity
1085, // kg/m^3, density
3680, // J/kg/K, specific heat capacity
6.8e-3,// 1/s, tissue permeability
368, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
SECTOR::Sector *neckAnterior = new SECTOR::Sector();
neckAnterior->phi = 180*M_PI/180.0; // rad, interior angle of sector
neckAnterior->psiSed = 0.7; // -, sedentary view factor
neckAnterior->psiStnd = 0.7; // -, standard view factor
neckAnterior->echelon = 0.99; // -, emission coefficient
neck->addSector(neckAnterior);
SECTOR::Sector *neckPosterior = new SECTOR::Sector();
neckPosterior->phi = 180*M_PI/180.0; // rad, interior angle of sector
neckPosterior->psiSed = 0.75; // -, sedentary view factor
neckPosterior->psiStnd = 0.75; // -, standard view factor
neckPosterior->echelon = 0.99; // -, emission coefficient
neck->addSector(neckPosterior);
// Make sure totally filled!
assert(neck->getState()==ELEMENT::wsAdded);
return neck;
}
/** \copydoc shoulders */
ELEMENT::Element* shoulders(){
ELEMENT::Element* shoulders = new ELEMENT::CylinderElement(7,1);
// Other attributes
shoulders->length = 0.3200;
shoulders->hx = 0.80;
shoulders->a_nat = 5.9;
shoulders->a_frc = 216.0;
shoulders->a_mix = -10.80;
shoulders->a_sk = 0.03;
shoulders->a_sed = 0.05;
shoulders->a_stnd = 0.02;
shoulders->a_sw = 0.037;
shoulders->a_dl = 0.020;
shoulders->a_cs = 0.010;
shoulders->a_sh = 0.0002;
shoulders->n_j = 1;
// addWashers(obj,N,r0,rf,k,rho,c,w_bl,q_m,index)
shoulders->addWashers(
1, // Number of washers to add
0, // m, inner radius
0.0370, // m, outer radius
0.75, // W/m^2, conductivity
1357, // kg/m^3, density
1700, // J/kg/K, specific heat capacity
0e-3,// 1/s, tissue permeability
0, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
shoulders->addWashers(
2, // Number of washers to add
0.0370, // m, inner radius
0.0390, // m, outer radius
0.42, // W/m^2, conductivity
1085, // kg/m^3, density
3768, // J/kg/K, specific heat capacity
0.5380e-3,// 1/s, tissue permeability
684, // W/m^3, specific basal metabolism
1, // muscle
0); // not respiratory
shoulders->addWashers(
2, // Number of washers to add
0.0390, // m, inner radius
0.0440, // m, outer radius
0.16, // W/m^2, conductivity
850, // kg/m^3, density
2300, // J/kg/K, specific heat capacity
0.0036e-3,// 1/s, tissue permeability
58, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
shoulders->addWashers(
2, // Number of washers to add
0.0440, // m, inner radius
0.0460, // m, outer radius
0.47, // W/m^2, conductivity
1085, // kg/m^3, density
3680, // J/kg/K, specific heat capacity
1.01e-3,// 1/s, tissue permeability
368, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
SECTOR::Sector *shouldersTop = new SECTOR::Sector();
shouldersTop->phi = 130*M_PI/180.0; // rad, interior angle of sector
shouldersTop->psiSed = 0.90; // -, sedentary view factor
shouldersTop->psiStnd = 0.90; // -, standard view factor
shouldersTop->echelon = 0.99; // -, emission coefficient
shoulders->addSector(shouldersTop);
// Make sure totally filled!
assert(shoulders->getState()==ELEMENT::wsAdded);
return shoulders;
}
/** \copydoc thorax */
ELEMENT::Element* thorax(){
ELEMENT::Element* thorax = new ELEMENT::CylinderElement(19,3);
// Other attributes
thorax->length = 0.3060;
thorax->hx = 0;
thorax->a_nat = 0.5;
thorax->a_frc = 180.0;
thorax->a_mix = -7.40;
thorax->a_sk = 0.1290;
thorax->a_sed = 0.12;
thorax->a_stnd = 0.07;
thorax->a_sw = 0.101;
thorax->a_dl = 0.141;
thorax->a_cs = 0.0005;
thorax->a_sh = 0.6305;
thorax->n_j = 1;
// addWashers(obj,N,r0,rf,k,rho,c,w_bl,q_m,index)
thorax->addWashers(
1, // Number of washers to add
0, // m, inner radius
0.0773, // m, outer radius
0.28, // W/m^2, conductivity
550, // kg/m^3, density
3718, // J/kg/K, specific heat capacity
(4.9e-3)/60/5.744209713,// 1/s, tissue permeability. Note: Respiratory!
600, // W/m^3, specific basal metabolism
0, // not muscle
.3); // respiratory
thorax->addWashers(
3, // Number of washers to add
0.0773, // m, inner radius
0.0891, // m, outer radius
0.75, // W/m^2, conductivity
1357, // kg/m^3, density
1700, // J/kg/K, specific heat capacity
0e-3,// 1/s, tissue permeability
0, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
thorax->addWashers(
3, // Number of washers to add
0.0891, // m, inner radius
0.1234, // m, outer radius
0.42, // W/m^2, conductivity
1085, // kg/m^3, density
3768, // J/kg/K, specific heat capacity
0.5380e-3,// 1/s, tissue permeability
684, // W/m^3, specific basal metabolism
1, // muscle
0); // not respiratory
thorax->addWashers(
6, // Number of washers to add
0.1234, // m, inner radius
0.1268, // m, outer radius
0.16, // W/m^2, conductivity
850, // kg/m^3, density
2300, // J/kg/K, specific heat capacity
0.0036e-3,// 1/s, tissue permeability
58, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
thorax->addWashers(
6, // Number of washers to add
0.1268, // m, inner radius
0.1290, // m, outer radius
0.47, // W/m^2, conductivity
1085, // kg/m^3, density
3680, // J/kg/K, specific heat capacity
1.58e-3,// 1/s, tissue permeability
368, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
SECTOR::Sector *thoraxAnterior = new SECTOR::Sector();
thoraxAnterior->phi = 150*M_PI/180.0; // rad, interior angle of sector
thoraxAnterior->psiSed = 0.80; // -, sedentary view factor
thoraxAnterior->psiStnd = 0.90; // -, standard view factor
thoraxAnterior->echelon = 0.99; // -, emission coefficient
thorax->addSector(thoraxAnterior);
SECTOR::Sector *thoraxPosterior = new SECTOR::Sector();
thoraxPosterior->phi = 150*M_PI/180.0; // rad, interior angle of sector
thoraxPosterior->psiSed = 0.95; // -, sedentary view factor
thoraxPosterior->psiStnd = 0.95; // -, standard view factor
thoraxPosterior->echelon = 0.99; // -, emission coefficient
thorax->addSector(thoraxPosterior);
SECTOR::Sector *thoraxInferior = new SECTOR::Sector();
thoraxInferior->phi = 60*M_PI/180.0; // rad, interior angle of sector
thoraxInferior->psiSed = 0.05; // -, sedentary view factor
thoraxInferior->psiStnd = 0.10; // -, standard view factor
thoraxInferior->echelon = 0.99; // -, emission coefficient
thorax->addSector(thoraxInferior);
// Make sure totally filled!
assert(thorax->getState()==ELEMENT::wsAdded);
return thorax;
}
/** \copydoc abdomen */
ELEMENT::Element* abdomen(){
ELEMENT::Element* abdomen = new ELEMENT::CylinderElement(19,3);
// Other attributes
abdomen->length = 0.5520;
abdomen->hx = 0;
abdomen->a_nat = 0.5;
abdomen->a_frc = 180.0;
abdomen->a_mix = -9.0;
abdomen->a_sk = 0.1210;
abdomen->a_sed = 0.46;
abdomen->a_stnd = 0.20;
abdomen->a_sw = 0.181;
abdomen->a_dl = 0.161;
abdomen->a_cs = 0.0205;
abdomen->a_sh = 0.24;
abdomen->n_j = 1;
// addWashers(obj,N,r0,rf,k,rho,c,w_bl,q_m,index)
abdomen->addWashers(
1, // Number of washers to add
0, // m, inner radius
0.0785, // m, outer radius
0.53, // W/m^2, conductivity
1000, // kg/m^3, density
3697, // J/kg/K, specific heat capacity
4.31e-3,// 1/s, tissue permeability. Note: Respiratory!
4100, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
abdomen->addWashers(
3, // Number of washers to add
0.0785, // m, inner radius
0.0834, // m, outer radius
0.75, // W/m^2, conductivity
1357, // kg/m^3, density
1700, // J/kg/K, specific heat capacity
0e-3,// 1/s, tissue permeability
0, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
abdomen->addWashers(
3, // Number of washers to add
0.0834, // m, inner radius
0.1090, // m, outer radius
0.42, // W/m^2, conductivity
1085, // kg/m^3, density
3768, // J/kg/PosteriorK, specific heat capacity
0.5380e-3,// 1/s, tissue permeability
684, // W/m^3, specific basal metabolism
1, // muscle
0); // not respiratory
abdomen->addWashers(
6, // Number of washers to add
0.1090, // m, inner radius
0.1244, // m, outer radius
0.16, // W/m^2, conductivity
850, // kg/m^3, density
2300, // J/kg/K, specific heat capacity
0.0036e-3,// 1/s, tissue permeability
58, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
abdomen->addWashers(
6, // Number of washers to add
0.1244, // m, inner radius
0.1260, // m, outer radius
0.47, // W/m^2, conductivity
1085, // kg/m^3, density
3680, // J/kg/K, specific heat capacity
1.44e-3,// 1/s, tissue permeability
368, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
SECTOR::Sector *abdomenAnterior = new SECTOR::Sector();
abdomenAnterior->phi = 150*M_PI/180.0; // rad, interior angle of sector
abdomenAnterior->psiSed = 0.80; // -, sedentary view factor
abdomenAnterior->psiStnd = 0.90; // -, standard view factor
abdomenAnterior->echelon = 0.99; // -, emission coefficient
abdomen->addSector(abdomenAnterior);
SECTOR::Sector *abdomenPosterior = new SECTOR::Sector();
abdomenPosterior->phi = 150*M_PI/180.0; // rad, interior angle of sector
abdomenPosterior->psiSed = 0.95; // -, sedentary view factor
abdomenPosterior->psiStnd = 0.95; // -, standard view factor
abdomenPosterior->echelon = 0.99; // -, emission coefficient
abdomen->addSector(abdomenPosterior);
SECTOR::Sector *abdomenInferior = new SECTOR::Sector();
abdomenInferior->phi = 60*M_PI/180.0; // rad, interior angle of sector
abdomenInferior->psiSed = 0.20; // -, sedentary view factor
abdomenInferior->psiStnd = 0.30; // -, standard view factor
abdomenInferior->echelon = 0.99; // -, emission coefficient
abdomen->addSector(abdomenInferior);
// Make sure totally filled!
assert(abdomen->getState()==ELEMENT::wsAdded);
return abdomen;
}
/** \copydoc arms */
ELEMENT::Element* arms(){
ELEMENT::Element* arms = new ELEMENT::CylinderElement(16,3);
// Other attributes
arms->length = 1.274;
arms->hx = 4.13;
arms->a_nat = 8.3;
arms->a_frc = 216.0;
arms->a_mix = -10.8;
arms->a_sk = 0.1800;
arms->a_sed = 0.19;
arms->a_stnd = 0.08;
arms->a_sw = 0.133;
arms->a_dl = 0.095;
arms->a_cs = 0.1945;
arms->a_sh = 0.04;
arms->n_j = 0;
// addWashers(obj,N,r0,rf,k,rho,c,w_bl,q_m,index)
arms->addWashers(
1, // Number of washers to add
0, // m, inner radius
0.0153, // m, outer radius
0.75, // W/m^2, conductivity
1357, // kg/m^3, density
1700, // J/kg/K, specific heat capacity
0e-3,// 1/s, tissue permeability
0, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
arms->addWashers(
3, // Number of washers to add
0.0153, // m, inner radius
0.0343, // m, outer radius
0.42, // W/m^2, conductivity
1085, // kg/m^3, density
3768, // J/kg/PosteriorK, specific heat capacity
0.5380e-3,// 1/s, tissue permeability
684, // W/m^3, specific basal metabolism
1, // muscle
0); // not respiratory
arms->addWashers(
6, // Number of washers to add
0.0343, // m, inner radius
0.0401, // m, outer radius
0.16, // W/m^2, conductivity
850, // kg/m^3, density
2300, // J/kg/K, specific heat capacity
0.0036e-3,// 1/s, tissue permeability
58, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
arms->addWashers(
6, // Number of washers to add
0.0401, // m, inner radius
0.0418, // m, outer radius
0.47, // W/m^2, conductivity
1085, // kg/m^3, density
3680, // J/kg/K, specific heat capacity
1.1e-3,// 1/s, tissue permeability
368, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
SECTOR::Sector *armsAnterior = new SECTOR::Sector();
armsAnterior->phi = 135*M_PI/180.0; // rad, interior angle of sector
armsAnterior->psiSed = 0.75; // -, sedentary view factor
armsAnterior->psiStnd = 0.85; // -, standard view factor
armsAnterior->echelon = 0.99; // -, emission coefficient
arms->addSector(armsAnterior);
SECTOR::Sector *armsPosterior = new SECTOR::Sector();
armsPosterior->phi = 135*M_PI/180.0; // rad, interior angle of sector
armsPosterior->psiSed = 0.80; // -, sedentary view factor
armsPosterior->psiStnd = 0.90; // -, standard view factor
armsPosterior->echelon = 0.99; // -, emission coefficient
arms->addSector(armsPosterior);
SECTOR::Sector *armsInferior = new SECTOR::Sector();
armsInferior->phi = 90*M_PI/180.0; // rad, interior angle of sector
armsInferior->psiSed = 0.10; // -, sedentary view factor
armsInferior->psiStnd = 0.20; // -, standard view factor
armsInferior->echelon = 0.99; // -, emission coefficient
arms->addSector(armsInferior);
// Make sure totally filled!
assert(arms->getState()==ELEMENT::wsAdded);
return arms;
}
/** \copydoc hands */
ELEMENT::Element* hands(){
ELEMENT::Element* hands = new ELEMENT::CylinderElement(9,2);
// Other attributes
hands->length = .62;
hands->hx = .57;
hands->a_nat = 8.3;
hands->a_frc = 216.0;
hands->a_mix = -10.8;
hands->a_sk = 0.0900;
hands->a_sed = 0.02;
hands->a_stnd = 0.01;
hands->a_sw = 0.049;
hands->a_dl = 0.121;
hands->a_cs = 0.1100;
hands->a_sh = 0.002;
hands->n_j = 0;
// addWashers(obj,N,r0,rf,k,rho,c,w_bl,q_m,index)
hands->addWashers(
1, // Number of washers to add
0, // m, inner radius
0.0070, // m, outer radius
0.75, // W/m^2, conductivity
1357, // kg/m^3, density
1700, // J/kg/K, specific heat capacity
0e-3,// 1/s, tissue permeability
0, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
hands->addWashers(
2, // Number of washers to add
0.0070, // m, inner radius
0.0174, // m, outer radius
0.42, // W/m^2, conductivity
1085, // kg/m^3, density
3768, // J/kg/PosteriorK, specific heat capacity
0.5380e-3,// 1/s, tissue permeability
684, // W/m^3, specific basal metabolism
1, // muscle
0); // not respiratory
hands->addWashers(
2, // Number of washers to add
0.0174, // m, inner radius
0.0204, // m, outer radius
0.16, // W/m^2, conductivity
850, // kg/m^3, density
2300, // J/kg/K, specific heat capacity
0.0036e-3,// 1/s, tissue permeability
58, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
hands->addWashers(
4, // Number of washers to add
0.0204, // m, inner radius
0.0226, // m, outer radius
0.47, // W/m^2, conductivity
1085, // kg/m^3, density
3680, // J/kg/K, specific heat capacity
4.54e-3,// 1/s, tissue permeability
368, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
SECTOR::Sector *handsHandback = new SECTOR::Sector();
handsHandback->phi = 180*M_PI/180.0; // rad, interior angle of sector
handsHandback->psiSed = 0.80; // -, sedentary view factor
handsHandback->psiStnd = 0.80; // -, standard view factor
handsHandback->echelon = 0.99; // -, emission coefficient
hands->addSector(handsHandback);
SECTOR::Sector *handsPalm = new SECTOR::Sector();
handsPalm->phi = 180*M_PI/180.0; // rad, interior angle of sector
handsPalm->psiSed = 0.10; // -, sedentary view factor
handsPalm->psiStnd = 0.20; // -, standard view factor
handsPalm->echelon = 0.99; // -, emission coefficient
hands->addSector(handsPalm);
// Make sure totally filled!
assert(hands->getState()==ELEMENT::wsAdded);
return hands;
}
/** \copydoc legs */
ELEMENT::Element* legs(){
ELEMENT::Element* legs = new ELEMENT::CylinderElement(19,3);
// Other attributes
legs->length = 1.39;
legs->hx = 6.90;
legs->a_nat = 5.3;
legs->a_frc = 220.0;
legs->a_mix = -11;
legs->a_sk = 0.2080;
legs->a_sed = 0.11;
legs->a_stnd = 0.60;
legs->a_sw = 0.261;
legs->a_dl = 0.230;
legs->a_cs = 0.2;
legs->a_sh = 0.0813;
legs->n_j = 1;
// addWashers(obj,N,r0,rf,k,rho,c,w_bl,q_m,index)
legs->addWashers(
1, // Number of washers to add
0, // m, inner radius
0.0220, // m, outer radius
0.75, // W/m^2, conductivity
1357, // kg/m^3, density
1700, // J/kg/K, specific heat capacity
0e-3,// 1/s, tissue permeability
0, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
legs->addWashers(
6, // Number of washers to add
0.0220, // m, inner radius
0.0480, // m, outer radius
0.42, // W/m^2, conductivity
1085, // kg/m^3, density
3768, // J/kg/PosteriorK, specific heat capacity
0.5380e-3,// 1/s, tissue permeability
684, // W/m^3, specific basal metabolism
1, // muscle
0); // not respiratory
legs->addWashers(
6, // Number of washers to add
0.0480, // m, inner radius
0.0533, // m, outer radius
0.16, // W/m^2, conductivity
850, // kg/m^3, density
2300, // J/kg/K, specific heat capacity
0.0036e-3,// 1/s, tissue permeability
58, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
legs->addWashers(
6, // Number of washers to add
0.0533, // m, inner radius
0.0553, // m, outer radius
0.47, // W/m^2, conductivity
1085, // kg/m^3, density
3680, // J/kg/K, specific heat capacity
1.05e-3,// 1/s, tissue permeability
368, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
SECTOR::Sector *legsAnterior = new SECTOR::Sector();
legsAnterior->phi = 150*M_PI/180.0; // rad, interior angle of sector
legsAnterior->psiSed = 0.85; // -, sedentary view factor
legsAnterior->psiStnd = 0.90; // -, standard view factor
legsAnterior->echelon = 0.99; // -, emission coefficient
legs->addSector(legsAnterior);
SECTOR::Sector *legsPosterior = new SECTOR::Sector();
legsPosterior->phi = 150*M_PI/180.0; // rad, interior angle of sector
legsPosterior->psiSed = 0.95; // -, sedentary view factor
legsPosterior->psiStnd = 0.90; // -, standard view factor
legsPosterior->echelon = 0.99; // -, emission coefficient
legs->addSector(legsPosterior);
SECTOR::Sector *legsInferior = new SECTOR::Sector();
legsInferior->phi = 60*M_PI/180.0; // rad, interior angle of sector
legsInferior->psiSed = 0.10; // -, sedentary view factor
legsInferior->psiStnd = 0.65; // -, standard view factor
legsInferior->echelon = 0.99; // -, emission coefficient
legs->addSector(legsInferior);
// Make sure totally filled!
assert(legs->getState()==ELEMENT::wsAdded);
return legs;
}
/** \copydoc feet */
ELEMENT::Element* feet(){
ELEMENT::Element* feet = new ELEMENT::CylinderElement(11,2);
// Other attributes
feet->length = 1.39;
feet->hx = 6.90;
feet->a_nat = 5.3;
feet->a_frc = 220.0;
feet->a_mix = -11.0;
feet->a_sk = 0.0750;
feet->a_sed = 0.1100;
feet->a_stnd = 0.60;
feet->a_sw = 0.047;
feet->a_dl = 0.100;
feet->a_cs = 0.3765;
feet->a_sh = 0.002;
feet->n_j = 3;
// addWashers(obj,N,r0,rf,k,rho,c,w_bl,q_m,index)
feet->addWashers(
1, // Number of washers to add
0, // m, inner radius
0.0200, // m, outer radius
0.75, // W/m^2, conductivity
1357, // kg/m^3, density
1700, // J/kg/K, specific heat capacity
0e-3,// 1/s, tissue permeability
0, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
feet->addWashers(
2, // Number of washers to add
0.0200, // m, inner radius
0.0250, // m, outer radius
0.42, // W/m^2, conductivity
1085, // kg/m^3, density
3768, // J/kg/K, specific heat capacity
0.5380e-3,// 1/s, tissue permeability
684, // W/m^3, specific basal metabolism
1, // muscle
0); // not respiratory
feet->addWashers(
4, // Number of washers to add
0.0250, // m, inner radius
0.0326, // m, outer radius
0.16, // W/m^2, conductivity
850, // kg/m^3, density
2300, // J/kg/K, specific heat capacity
0.0036e-3,// 1/s, tissue permeability
58, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
feet->addWashers(
4, // Number of washers to add
0.0326, // m, inner radius
0.0350, // m, outer radius
0.47, // W/m^2, conductivity
1085, // kg/m^3, density
3680, // J/kg/K, specific heat capacity
1.5e-3,// 1/s, tissue permeability
368, // W/m^3, specific basal metabolism
0, // not muscle
0); // not respiratory
SECTOR::Sector *feetInstep = new SECTOR::Sector();
feetInstep->phi = 180*M_PI/180.0; // rad, interior angle of sector
feetInstep->psiSed = 0.90; // -, sedentary view factor
feetInstep->psiStnd = 0.90; // -, standard view factor
feetInstep->echelon = 0.99; // -, emission coefficient
feet->addSector(feetInstep);
SECTOR::Sector *feetSole = new SECTOR::Sector();
feetSole->phi = 180*M_PI/180.0; // rad, interior angle of sector
feetSole->psiSed = 1.0; // -, sedentary view factor
feetSole->psiStnd = 1.0; // -, standard view factor
feetSole->echelon = 0.99; // -, emission coefficient
feet->addSector(feetSole);
// Make sure totally filled!
assert(feet->getState()==ELEMENT::wsAdded);
return feet;
}
void BodyModel::addElement( ELEMENT::Element* element )
{
// Must have been allocated!
assert(_state==allocated);
// Must have space remaining!
assert(elemIdx<nElements);
elements[elemIdx++] = element;
if(elemIdx == nElements)
_state = elementsAdded;
}
void BodyModel::computeN()
{
assert(_state==elementsAdded);
N = 1;
for(int i=0;i<nElements;i++){
N += elements[i]->N;
}
}
void BodyModel::Compute()
{
assert(_state==elementsAdded);
// Subcompute (left DFS)
for(int i=0;i<nElements;i++)
elements[i]->subCompute(&(skinSurfaceArea));
// Compute sub attributes (right DFS)
for(int i=0;i<nElements;i++)
elements[i]->compute((skinSurfaceArea));
// Compute node attributes
computeN();
V = new double[N];
V[N-1] = NAN; // Blood has no tangible volume
int idx = 0;
for(int elementIdx = 0; elementIdx < nElements; ++elementIdx){
V[idx] = elements[elementIdx]->washers[0]->volume*elements[elementIdx]->sumPhi/(2*M_PI);
idx++;
for(int sectIdx = 0; sectIdx < elements[elementIdx]->nSectors; ++sectIdx){
// Loop thru washers
for(int washIdx = 1; washIdx < elements[elementIdx]->nWashers; ++washIdx){
V[idx] = elements[elementIdx]->washers[washIdx]->volume
*elements[elementIdx]->sectors[sectIdx]->phi/(2*M_PI);
idx++;
}
}
}
_state = computed;
}
BODYMODEL::BodyModel* defaultBody(){
BodyModel* body = new BodyModel(10);
// Check allocation status
assert(body->getState() == BODYMODEL::allocated);
// Add elements
body->addElement(head());
body->addElement(face());
body->addElement(neck());
body->addElement(shoulders());
body->addElement(thorax());
body->addElement(abdomen());
body->addElement(arms());
body->addElement(hands());
body->addElement(legs());
body->addElement(feet());
// Check status now
assert(body->getState() == BODYMODEL::elementsAdded);
// Compute body parameters
body->Compute();
// Check status again
assert(body->getState() == BODYMODEL::computed);
return body;
}
}
#endif