3D-ICE 3.0.0
thermal_grid.c
1/******************************************************************************
2 * This file is part of 3D-ICE, version 3.1.0 . *
3 * *
4 * 3D-ICE is free software: you can redistribute it and/or modify it under *
5 * the terms of the GNU General Public License as published by the Free *
6 * Software Foundation, either version 3 of the License, or any later *
7 * version. *
8 * *
9 * 3D-ICE is distributed in the hope that it will be useful, but WITHOUT *
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
12 * more details. *
13 * *
14 * You should have received a copy of the GNU General Public License along *
15 * with 3D-ICE. If not, see <http://www.gnu.org/licenses/>. *
16 * *
17 * Copyright (C) 2021 *
18 * Embedded Systems Laboratory - Ecole Polytechnique Federale de Lausanne *
19 * All Rights Reserved. *
20 * *
21 * Authors: Arvind Sridhar Alessandro Vincenzi *
22 * Giseong Bak Martino Ruggiero *
23 * Thomas Brunschwiler Eder Zulian *
24 * Federico Terraneo Darong Huang *
25 * Luis Costero Marina Zapater *
26 * David Atienza *
27 * *
28 * For any comment, suggestion or request about 3D-ICE, please register and *
29 * write to the mailing list (see http://listes.epfl.ch/doc.cgi?liste=3d-ice) *
30 * Any usage of 3D-ICE for research, commercial or other purposes must be *
31 * properly acknowledged in the resulting products or publications. *
32 * *
33 * EPFL-STI-IEL-ESL Mail : 3d-ice@listes.epfl.ch *
34 * Batiment ELG, ELG 130 (SUBSCRIPTION IS NECESSARY) *
35 * Station 11 *
36 * 1015 Lausanne, Switzerland Url : http://esl.epfl.ch/3d-ice *
37 ******************************************************************************/
38
39#include <stdlib.h> // For the memory functions calloc/free
40#include <assert.h>
41
42#include "thermal_grid.h"
43#include "macros.h"
44
45/******************************************************************************/
46
48{
49 tgrid->NLayers = (CellIndex_t) 0u ;
50 tgrid->LayersTypeProfile = NULL ;
51 tgrid->LayersProfile = NULL ;
52 tgrid->Channel = NULL ;
53 tgrid->TopHeatSink = NULL ;
54 tgrid->BottomHeatSink = NULL ;
55}
56
57/******************************************************************************/
58
60{
61 tgrid->NLayers = get_number_of_layers (dimensions) ;
62
63 tgrid->LayersTypeProfile =
64
65 (StackLayerType_t *) calloc (tgrid->NLayers, sizeof (StackLayerType_t)) ;
66
67 if (tgrid->LayersTypeProfile == NULL)
68
69 return TDICE_FAILURE ;
70
71 tgrid->LayersProfile = (Layer_t *) calloc (tgrid->NLayers, sizeof (Layer_t)) ;
72
73 if (tgrid->LayersProfile == NULL)
74 {
75 free (tgrid->LayersTypeProfile) ;
76
77 return TDICE_FAILURE ;
78 }
79
80 CellIndex_t lindex = 0 ;
81
82 while (lindex != tgrid->NLayers)
83 {
84 tgrid->LayersTypeProfile [lindex] = TDICE_LAYER_NONE ;
85
86 layer_init (tgrid->LayersProfile + lindex) ;
87
88 lindex ++ ;
89 }
90
91 return TDICE_SUCCESS ;
92}
93
94/******************************************************************************/
95
97{
98 if (tgrid->LayersTypeProfile != NULL ) free (tgrid->LayersTypeProfile) ;
99 if (tgrid->LayersProfile != NULL )
100 {
101 CellIndex_t lindex = 0 ;
102
103 while (lindex != tgrid->NLayers)
104 {
105 layer_destroy (tgrid->LayersProfile + lindex) ;
106
107 lindex ++ ;
108 }
109 free (tgrid->LayersProfile) ;
110 }
111
112 thermal_grid_init (tgrid) ;
113}
114
115/******************************************************************************/
116
117Error_t thermal_grid_fill (ThermalGrid_t *tgrid, StackElementList_t *list)
118{
119 StackElementListNode_t *stkeln ;
120 bool has_4RM_layers = false;
121
122 for (stkeln = stack_element_list_end (list) ;
123 stkeln != NULL ;
124 stkeln = stack_element_list_prev (stkeln))
125 {
126 StackElement_t *stack_element = stack_element_list_data (stkeln) ;
127
128 CellIndex_t index = stack_element->Offset ;
129
130 switch (stack_element->SEType)
131 {
133 {
134 CellIndex_t tmp = 0u ;
135 LayerListNode_t *lnd ;
136
137 for (lnd = layer_list_end (&stack_element->Pointer.Die->Layers) ;
138 lnd != NULL ;
139 lnd = layer_list_prev (lnd))
140 {
141 tgrid->LayersTypeProfile [index + tmp] = TDICE_LAYER_SOLID ;
142
143 layer_copy (tgrid->LayersProfile + index + tmp, layer_list_data(lnd)) ;
144
145 tmp++ ;
146 }
147
148 tmp = stack_element->Pointer.Die->SourceLayerOffset ;
149
150 tgrid->LayersTypeProfile [index + tmp] = TDICE_LAYER_SOURCE ;
151
152 break ;
153 }
155 {
156 tgrid->LayersTypeProfile [index] = TDICE_LAYER_SOLID ;
157
158 layer_copy (tgrid->LayersProfile + index, stack_element->Pointer.Layer) ;
159
160 break ;
161 }
163 {
164 tgrid->Channel = stack_element->Pointer.Channel ;
165
166 // Stores the wall material as a new layer (without ID and layout)
167
168 Layer_t tmplayer ;
169
170 layer_init (&tmplayer) ;
171
172 tmplayer.Height = stack_element->Pointer.Channel->Height ;
173
174 material_copy (&(tmplayer.Material), &(stack_element->Pointer.Channel->WallMaterial)) ;
175 // Add the element id
176 string_copy(&tmplayer.Id, &stack_element->Id);
177
178 CellIndex_t tmp ;
179
180 for (tmp = 0u ; tmp != stack_element->Pointer.Channel->NLayers ; tmp++)
181
182 layer_copy (tgrid->LayersProfile + index + tmp, &tmplayer) ;
183
184 layer_destroy (&tmplayer) ;
185
186 switch (stack_element->Pointer.Channel->ChannelModel)
187 {
189
191 has_4RM_layers = true;
192
193 break ;
194
196
198 tgrid->LayersTypeProfile [index + 1] = TDICE_LAYER_VWALL_CHANNEL ;
199 tgrid->LayersTypeProfile [index + 2] = TDICE_LAYER_CHANNEL_2RM ;
200 tgrid->LayersTypeProfile [index + 3] = TDICE_LAYER_TOP_WALL ;
201
202 break ;
203
205
207 tgrid->LayersTypeProfile [index + 1] = TDICE_LAYER_VWALL_PINFINS ;
208 tgrid->LayersTypeProfile [index + 2] = TDICE_LAYER_PINFINS_INLINE ;
209 tgrid->LayersTypeProfile [index + 3] = TDICE_LAYER_TOP_WALL ;
210
211 break ;
212
214
216 tgrid->LayersTypeProfile [index + 1] = TDICE_LAYER_VWALL_PINFINS ;
218 tgrid->LayersTypeProfile [index + 3] = TDICE_LAYER_TOP_WALL ;
219
220 break ;
221
223
224 fprintf (stderr, "WARNING: unset channel model\n") ;
225
226 break ;
227
228 default :
229
230 fprintf (stderr,
231 "WARNING: unknown channel model %d\n",
232 stack_element->Pointer.Channel->ChannelModel) ;
233
234 break ;
235 }
236
237 break ;
238 }
240
241 fprintf (stderr, "Error! Found stack element with unset type\n") ;
242 break ;
243
244 default :
245
246 fprintf (stderr, "Error! Unknown stack element type %d\n", stack_element->SEType) ;
247
248 } /* switch stack_element->Type */
249 }
250
251 StackElement_t *bmost = stack_element_list_data (stack_element_list_end (list)) ;
252 StackElement_t *tmost = stack_element_list_data (stack_element_list_begin (list)) ;
253
254 if (tmost->TopSink != NULL)
255 {
256 tgrid->TopHeatSink = tmost->TopSink ;
257
259 {
260 if (tgrid->LayersTypeProfile [tgrid->NLayers - 1] == TDICE_LAYER_SOLID)
261
263
264 else if (tgrid->LayersTypeProfile [tgrid->NLayers - 1] == TDICE_LAYER_SOURCE)
265
267 }
269 {
270 if(has_4RM_layers)
271 {
272 // The pluggable heat sink assumes an uniform grid size, and the
273 // 4RM model has cells with different lengths to adapt to the
274 // size of the microchannels
275 fprintf (stderr, "Error: 4RM layers and top pluggable heat sink"
276 " are not supported together, use the 2RM model"
277 " instead\n") ;
278
279 return TDICE_FAILURE;
280 }
281
282 if (tgrid->LayersTypeProfile [tgrid->NLayers - 1] == TDICE_LAYER_SOLID)
283
285
286 else if (tgrid->LayersTypeProfile [tgrid->NLayers - 1] == TDICE_LAYER_SOURCE)
287
289 }
290 else
291 {
292 fprintf (stderr, "Unknown top heatsink model\n") ;
293 }
294 }
295
296 if (bmost->BottomSink != NULL)
297 {
298 tgrid->BottomHeatSink = bmost->BottomSink ;
299
300 if (tgrid->LayersTypeProfile [ 0 ] == TDICE_LAYER_SOLID)
301
303
304 else if (tgrid->LayersTypeProfile [ 0 ] == TDICE_LAYER_SOURCE)
305
307
312 {
313 fprintf (stderr, "Top and bottom sink on the same layer ! not handled yed\n") ;
314
315 return TDICE_FAILURE;
316 }
317 }
318
319 return TDICE_SUCCESS;
320}
321
322/******************************************************************************/
323
324
326(
327 ThermalGrid_t *tgrid,
328 Dimensions_t *dimensions,
329 Non_uniform_cellListNode_t* i_cell
330)
331{
332 CellIndex_t layer_index = i_cell->Data.layer_info;
333 if (layer_index >= tgrid->NLayers)
334 {
335 //spreder layer
336 HeatSink_t *sink = tgrid->TopHeatSink;
337 return get_spreader_capacity(sink) ;
338 }
339
340 switch (tgrid->LayersTypeProfile [layer_index])
341 {
342 case TDICE_LAYER_SOLID :
343 case TDICE_LAYER_SOURCE :
350
351 return ( get_volumetric_heat_capacity (tgrid->LayersProfile + layer_index,
352 0, 0,
353 dimensions)
354 * i_cell->Data.length
355 * i_cell->Data.width
356 * get_cell_height (dimensions, layer_index)
357 ) ;
359
360 if (i_cell->Data.isChannel)
361
362 return ( tgrid->Channel->Coolant.VHC
363 * i_cell->Data.length
364 * i_cell->Data.width
365 * get_cell_height (dimensions, layer_index)
366 ) ;
367
368 else
369
370 return ( get_volumetric_heat_capacity (tgrid->LayersProfile + layer_index,
371 0, 0,
372 dimensions)
373 * i_cell->Data.length
374 * i_cell->Data.width
375 * get_cell_height (dimensions, layer_index)
376 ) ;
377
381
382 return ( tgrid->Channel->Coolant.VHC
383 * tgrid->Channel->Porosity
384 * i_cell->Data.length
385 * i_cell->Data.width
386 * get_cell_height (dimensions, layer_index)
387 ) ;
388
391
392 return ( get_volumetric_heat_capacity (tgrid->LayersProfile + layer_index,
393 0, 0,
394 dimensions)
395 * (1.0 - tgrid->Channel->Porosity)
396 * i_cell->Data.length
397 * i_cell->Data.width
398 * get_cell_height (dimensions, layer_index)
399 ) ;
400
403
404 return 0.0 ;
405
406 case TDICE_LAYER_NONE :
407
408 fprintf (stderr, "ERROR: unset layer type\n") ;
409
410 return 0.0 ;
411 default :
412
413 fprintf (stderr, "ERROR: Not supported layer type in Non-uniform grid scenario %d\n",
414 tgrid->LayersTypeProfile [layer_index]) ;
415
416 return 0.0 ;
417
418 }
419}
420
421/******************************************************************************/
422
423
425(
426 ThermalGrid_t *tgrid,
427 Dimensions_t *dimensions,
428 CellIndex_t layer_index,
429 CellIndex_t row_index,
430 CellIndex_t column_index
431)
432{
433 if (layer_index > tgrid->NLayers)
434 {
435 fprintf (stderr,
436 "ERROR: layer index %d is out of range\n", layer_index) ;
437
438 return 0.0 ;
439 }
440
441 switch (tgrid->LayersTypeProfile [layer_index])
442 {
443 case TDICE_LAYER_SOLID :
444 case TDICE_LAYER_SOURCE :
451
452 return ( get_volumetric_heat_capacity (tgrid->LayersProfile + layer_index,
453 row_index, column_index,
454 dimensions)
455 * get_cell_length (dimensions, column_index)
456 * get_cell_width (dimensions, row_index)
457 * get_cell_height (dimensions, layer_index)
458 ) ;
459
461
463
464 return ( tgrid->Channel->Coolant.VHC
465 * get_cell_length (dimensions, column_index)
466 * get_cell_width (dimensions, row_index)
467 * get_cell_height (dimensions, layer_index)
468 ) ;
469
470 else
471
472 return ( get_volumetric_heat_capacity (tgrid->LayersProfile + layer_index,
473 row_index, column_index,
474 dimensions)
475 * get_cell_length (dimensions, column_index)
476 * get_cell_width (dimensions, row_index)
477 * get_cell_height (dimensions, layer_index)
478 ) ;
479
483
484 return ( tgrid->Channel->Coolant.VHC
485 * tgrid->Channel->Porosity
486 * get_cell_length (dimensions, column_index)
487 * get_cell_width (dimensions, row_index)
488 * get_cell_height (dimensions, layer_index)
489 ) ;
490
493
494 return ( get_volumetric_heat_capacity (tgrid->LayersProfile + layer_index,
495 row_index, column_index,
496 dimensions)
497 * (1.0 - tgrid->Channel->Porosity)
498 * get_cell_length (dimensions, column_index)
499 * get_cell_width (dimensions, row_index)
500 * get_cell_height (dimensions, layer_index)
501 ) ;
502
505
506 return 0.0 ;
507
508 case TDICE_LAYER_NONE :
509
510 fprintf (stderr, "ERROR: unset layer type\n") ;
511
512 return 0.0 ;
513
514 default :
515
516 fprintf (stderr, "ERROR: unknown layer type %d\n",
517 tgrid->LayersTypeProfile [layer_index]) ;
518
519 return 0.0 ;
520 }
521}
522
523/******************************************************************************/
525(
526 ThermalGrid_t *tgrid,
527 Dimensions_t *dimensions,
528 ConnectionListNode_t* i_cell,
529 Non_uniform_cellListNode_t* node,
530 int16_t direction_note
531)
532{
533 CellIndex_t layer_index = node->Data.layer_info;
534 ChipDimension_t cell_height;
535 if (layer_index>=dimensions->Grid.NLayers) //spreder layer
536 {
537 HeatSink_t *sink = tgrid->TopHeatSink;
538 return get_spreader_conductance_top_bottom_nonuniform(sink, i_cell->Data.value);
539 }
540 switch (tgrid->LayersTypeProfile [layer_index])
541 {
542 //We have different method compared with uniform 3D-ICE, we first know there is a connection, then we caculate the conductance.
543 //As for the conductance with the temperature, heatsink, we caculate it later.
544 //Therefore, in the following cases, the layer is actually connected to the bottom/top layer.
545
546 case TDICE_LAYER_SOLID :
547 case TDICE_LAYER_SOURCE :
548 cell_height = get_cell_height (dimensions, layer_index);
549 if (layer_index != 0 && layer_index != dimensions->Grid.NLayers-1 )
550 cell_height = cell_height/2.0;
551 return (get_thermal_conductivity (tgrid->LayersProfile + layer_index,0,0,dimensions)
552 * i_cell->Data.value) / cell_height ;
553
556 assert(layer_index == last_layer (dimensions));
557 if (layer_index == first_layer (dimensions))
558
559 return (get_thermal_conductivity (tgrid->LayersProfile + layer_index,0,0,dimensions)
560 * i_cell->Data.value) / (get_cell_height (dimensions, layer_index)) ;
561 else
562
563 return (get_thermal_conductivity (tgrid->LayersProfile + layer_index,0,0,dimensions)
564 * i_cell->Data.value) / (get_cell_height (dimensions, layer_index)/2.0) ;
565
566
571
572 return (get_thermal_conductivity (tgrid->LayersProfile + layer_index,0,0,dimensions)
573 * i_cell->Data.value) / (get_cell_height (dimensions, layer_index)/2.0) ;
574
576
577 if (node->Data.isChannel)
578 if (direction_note == 1)
579 return tgrid->Channel->Coolant.HTCTop * i_cell->Data.value ;
580 else
581 return tgrid->Channel->Coolant.HTCBottom * i_cell->Data.value ;
582
583
584 else
585
586 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index, 0, 0, dimensions)
587 * i_cell->Data.value )
588 / (get_cell_height (dimensions, layer_index) / 2.0) ;
589
591
592 if (direction_note == 1)
593 return tgrid->Channel->Coolant.HTCTop * i_cell->Data.value ;
594 else
595 return tgrid->Channel->Coolant.HTCBottom * i_cell->Data.value ;
596
598
600 * i_cell->Data.value ;
601
603
605 * i_cell->Data.value ;
606
609
610 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
611 0, 0,
612 dimensions)
613 * i_cell->Data.value
614 )
615 / (get_cell_height (dimensions, layer_index) / 2.0)
616 * (1.0 - tgrid->Channel->Porosity) ;
617
620
621 return 0.0 ;
622
623 case TDICE_LAYER_NONE :
624
625 fprintf (stderr, "ERROR: unset layer type\n") ;
626
627 return 0.0 ;
628
629 default :
630
631 fprintf (stderr, "ERROR: unknown layer type %d\n",
632 tgrid->LayersTypeProfile [layer_index]) ;
633
634 return 0.0 ;
635 }
636}
637
638/******************************************************************************/
639// north south
641(
642 ThermalGrid_t *tgrid,
643 Dimensions_t *dimensions,
644 ChipDimension_t length_value,
645 Non_uniform_cellListNode_t* node,
646 Conductance_t direction_note
647)
648{
649 CellIndex_t layer_index = node->Data.layer_info;
650 if (layer_index>=dimensions->Grid.NLayers) //spreder layer
651 {
652 HeatSink_t *sink = tgrid->TopHeatSink;
654 }
655 switch (tgrid->LayersTypeProfile [layer_index])
656 {
657 case TDICE_LAYER_SOLID :
658 case TDICE_LAYER_SOURCE :
665 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,0,0,dimensions)
666 * length_value
667 * get_cell_height (dimensions, layer_index) )
668 / ( node->Data.width / 2.0) ;
669
671
672 if (node->Data.isChannel)
673
674 return direction_note * get_convective_term
675
676 (tgrid->Channel, dimensions, layer_index, 0, 0) ;
677
678 else
679
680 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
681 0, 0,
682 dimensions)
683 * length_value
684 * get_cell_height (dimensions, layer_index)
685 )
686 / (node->Data.width / 2.0) ;
687
691
692 // Darong_TODO
693 // fprintf (stderr, "ERROR: unknown layer type %d\n",
694 // tgrid->LayersTypeProfile [layer_index]) ;
695
696 // return 0.0 ;
697 return direction_note * get_convective_term_nonuniform
698
699 (tgrid->Channel, dimensions, layer_index, length_value) ;
700
702
703 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
704 0, 0,
705 dimensions)
706 * length_value
707 * get_cell_height (dimensions, layer_index)
708 )
709 / (length_value / 2.0)
710 * (1.0 - tgrid->Channel->Porosity) ;
711
715
716 return 0.0 ;
717
718 case TDICE_LAYER_NONE :
719
720 fprintf (stderr, "ERROR: unset layer type\n") ;
721
722 return 0.0 ;
723
724 default :
725
726 fprintf (stderr, "ERROR: unknown layer type %d\n",
727 tgrid->LayersTypeProfile [layer_index]) ;
728
729 return 0.0 ;
730 }
731}
732
733/******************************************************************************/
734// West and East
736(
737 ThermalGrid_t *tgrid,
738 Dimensions_t *dimensions,
739 ConnectionListNode_t* i_cell,
740 Non_uniform_cellListNode_t* node
741)
742{
743 CellIndex_t layer_index = node->Data.layer_info;
744 // if (layer_index > tgrid->NLayers)
745 // {
746 // fprintf (stderr,
747 // "ERROR: layer index %d is out of range\n", layer_index) ;
748
749 // return 0.0 ;
750 // }
751 if (layer_index>=dimensions->Grid.NLayers) //spreder layer
752 {
753 HeatSink_t *sink = tgrid->TopHeatSink;
755 }
756 switch (tgrid->LayersTypeProfile [layer_index])
757 {
758 case TDICE_LAYER_SOLID :
759 case TDICE_LAYER_SOURCE :
766
767 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
768 0, 0,
769 dimensions)
770 * i_cell->Data.value
771 * get_cell_height (dimensions, layer_index)
772 )
773 / (node->Data.length / 2.0) ;
774
776
777 if (node->Data.isChannel)
778
779 return tgrid->Channel->Coolant.HTCSide
780 * i_cell->Data.value
781 * get_cell_height (dimensions, layer_index) ;
782
783 else
784
785 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
786 0, 0,
787 dimensions)
788 * i_cell->Data.value
789 * get_cell_height (dimensions, layer_index)
790 )
791 / (node->Data.length / 2.0) ;
792
800
801 return 0.0 ;
802
803 case TDICE_LAYER_NONE :
804
805 fprintf (stderr, "ERROR: unset layer type\n") ;
806
807 return 0.0 ;
808
809 default :
810
811 fprintf (stderr, "ERROR: unknown layer type %d\n",
812 tgrid->LayersTypeProfile [layer_index]) ;
813
814 return 0.0 ;
815 }
816}
817
818/******************************************************************************/
820(
821 ThermalGrid_t *tgrid,
822 Dimensions_t *dimensions,
823 ConnectionListNode_t* i_cell,
824 CellIndex_t node1_index,
825 CellIndex_t node2_index,
826 Conductance_t* sign_note
827)
828{
829 *sign_note = 1.0; // default value
830 Non_uniform_cellListNode_t* node1 = dimensions->Cell_list.First;
831 Non_uniform_cellListNode_t* node2 = dimensions->Cell_list.First;
832
833 for (CellIndex_t i = 0; i<node1_index; i++)
834 node1 = node1->Next;
835
836 for (CellIndex_t i = 0; i<node2_index; i++)
837 node2 = node2->Next;
838
839 Conductance_t g1;
840 Conductance_t g2;
841
842 if(i_cell->Data.direction == 0) // z direction
843 {
844 int16_t direction_note;
845 if (node1->Data.layer_info < node2->Data.layer_info)
846 {
847 direction_note = 1; //use htc_top
848 }
849 else
850 {
851 direction_note = -1; //use htc_botom
852 }
853 g1 = get_conductance_non_uniform_z(tgrid, dimensions, i_cell, node1, direction_note);
854 g2 = get_conductance_non_uniform_z(tgrid, dimensions, i_cell, node2, -direction_note);
855
856 if(g1 == 0)
857 return -g2;
858 else if(g2 == 0)
859 return -g1;
860 else
861 return -PARALLEL(g1,g2);
862 }
863 else if(i_cell->Data.direction == 1) //West East
864 {
865 g1 = get_conductance_non_uniform_x(tgrid, dimensions, i_cell, node1);
866 g2 = get_conductance_non_uniform_x(tgrid, dimensions, i_cell, node2);
867 return -PARALLEL(g1,g2);
868 }
869 else if(i_cell->Data.direction == 2) // North South
870 {
871 Conductance_t direction_note;
872 if (node1->Data.left_y < node2->Data.left_y)
873 {
874 direction_note = 1; //same didrection for coolant and conductance
875 }
876 else
877 {
878 direction_note = -1; //opposite didrection for coolant and conductance
879 }
880
881 if (node2->Data.isChannel == 1)
882 {
883 *sign_note = -1;
884 return get_conductance_non_uniform_y(tgrid, dimensions, i_cell->Data.value, node2, direction_note);
885 }
886 else
887 {
888 g1 = get_conductance_non_uniform_y(tgrid, dimensions, i_cell->Data.value, node1, direction_note);
889 g2 = get_conductance_non_uniform_y(tgrid, dimensions, i_cell->Data.value, node2, -direction_note);
890 return -PARALLEL(g1,g2);
891 }
892
893 }
894 else
895 {
896 fprintf (stderr, "ERROR: wrong direction of the connection\n") ;
897
898 return 0.0 ;
899 }
900}
901/******************************************************************************/
902
904(
905 ThermalGrid_t *tgrid,
906 Dimensions_t *dimensions,
907 CellIndex_t layer_index,
908 CellIndex_t row_index,
909 CellIndex_t column_index
910)
911{
912 if (layer_index > tgrid->NLayers)
913 {
914 fprintf (stderr,
915 "ERROR: layer index %d is out of range\n", layer_index) ;
916
917 return 0.0 ;
918 }
919
920 switch (tgrid->LayersTypeProfile [layer_index])
921 {
922 case TDICE_LAYER_SOLID :
923 case TDICE_LAYER_SOURCE :
924
925 if (layer_index == last_layer (dimensions))
926
927 return 0.0 ;
928
929 else if (layer_index == first_layer (dimensions))
930
931 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
932 row_index, column_index,
933 dimensions)
934 * get_cell_length (dimensions, column_index)
935 * get_cell_width (dimensions, row_index)
936 )
937 / get_cell_height (dimensions, layer_index) ;
938
939 else
940
941 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
942 row_index, column_index,
943 dimensions)
944 * get_cell_length (dimensions, column_index)
945 * get_cell_width (dimensions, row_index)
946 )
947 / (get_cell_height (dimensions, layer_index) / 2.0) ;
948
951
952 return ( 2.0
953 * get_thermal_conductivity (tgrid->LayersProfile + layer_index,
954 row_index, column_index,
955 dimensions)
956 * tgrid->TopHeatSink->AmbientHTC
957 * get_cell_length (dimensions, column_index)
958 * get_cell_width (dimensions, row_index)
959 )
960 /
961 ( get_cell_height (dimensions, layer_index)
962 * tgrid->TopHeatSink->AmbientHTC
963 + 2.0
964 * get_thermal_conductivity (tgrid->LayersProfile + layer_index,
965 row_index, column_index,
966 dimensions)
967 ) ;
968
971
972 assert(layer_index == last_layer (dimensions));
973
974 // Corner case: when we have a single layer, the last layer is also the first layer
975 if (layer_index == first_layer (dimensions))
976
977 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
978 row_index, column_index,
979 dimensions)
980 * get_cell_length (dimensions, column_index)
981 * get_cell_width (dimensions, row_index)
982 )
983 / get_cell_height (dimensions, layer_index) ;
984
985 else
986
987 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
988 row_index, column_index,
989 dimensions)
990 * get_cell_length (dimensions, column_index)
991 * get_cell_width (dimensions, row_index)
992 )
993 / (get_cell_height (dimensions, layer_index) / 2.0) ;
994
995
998
999 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1000 row_index, column_index,
1001 dimensions)
1002 * get_cell_length (dimensions, column_index)
1003 * get_cell_width (dimensions, row_index)
1004 )
1005 / (get_cell_height (dimensions, layer_index) / 2.0) ;
1006
1008
1010
1011 return tgrid->Channel->Coolant.HTCTop
1012 * get_cell_width (dimensions, row_index)
1013 * get_cell_length (dimensions, column_index) ;
1014
1015 else
1016
1017 // We assume that layer_index is not the top most layer
1018 // or the bottom most layer
1019
1020 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1021 row_index, column_index,
1022 dimensions)
1023 * get_cell_length (dimensions, column_index)
1024 * get_cell_width (dimensions, row_index)
1025 )
1026 / (get_cell_height (dimensions, layer_index) / 2.0) ;
1027
1029
1030 return tgrid->Channel->Coolant.HTCTop
1031 * get_cell_width (dimensions, row_index)
1032 * get_cell_length (dimensions, column_index) ;
1033
1035
1037 * get_cell_width (dimensions, row_index)
1038 * get_cell_length (dimensions, column_index) ;
1039
1041
1043 * get_cell_width (dimensions, row_index)
1044 * get_cell_length (dimensions, column_index) ;
1045
1048
1049 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1050 row_index, column_index,
1051 dimensions)
1052 * get_cell_length (dimensions, column_index)
1053 * get_cell_width (dimensions, row_index)
1054 )
1055 / (get_cell_height (dimensions, layer_index) / 2.0)
1056 * (1.0 - tgrid->Channel->Porosity) ;
1057
1060
1061 return 0.0 ;
1062
1063 case TDICE_LAYER_NONE :
1064
1065 fprintf (stderr, "ERROR: unset layer type\n") ;
1066
1067 return 0.0 ;
1068
1069 default :
1070
1071 fprintf (stderr, "ERROR: unknown layer type %d\n",
1072 tgrid->LayersTypeProfile [layer_index]) ;
1073
1074 return 0.0 ;
1075 }
1076}
1077
1078/******************************************************************************/
1079
1081(
1082 ThermalGrid_t *tgrid,
1083 Dimensions_t *dimensions,
1084 CellIndex_t layer_index,
1085 CellIndex_t row_index,
1086 CellIndex_t column_index
1087)
1088{
1089 if (layer_index > tgrid->NLayers)
1090 {
1091 fprintf (stderr,
1092 "ERROR: layer index %d is out of range\n", layer_index) ;
1093
1094 return 0.0 ;
1095 }
1096
1097 switch (tgrid->LayersTypeProfile [layer_index])
1098 {
1099 case TDICE_LAYER_SOLID :
1100 case TDICE_LAYER_SOURCE :
1101
1102 if (layer_index == first_layer (dimensions))
1103
1104 return 0.0 ;
1105
1106 else if (layer_index == last_layer (dimensions))
1107
1108 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1109 row_index, column_index,
1110 dimensions)
1111 * get_cell_length (dimensions, column_index)
1112 * get_cell_width (dimensions, row_index)
1113 )
1114 / get_cell_height (dimensions, layer_index) ;
1115
1116 else
1117
1118 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1119 row_index, column_index,
1120 dimensions)
1121 * get_cell_length (dimensions, column_index)
1122 * get_cell_width (dimensions, row_index)
1123 )
1124 / (get_cell_height (dimensions, layer_index) / 2.0) ;
1125
1130
1131 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1132 row_index, column_index,
1133 dimensions)
1134 * get_cell_length (dimensions, column_index)
1135 * get_cell_width (dimensions, row_index)
1136 )
1137 / (get_cell_height (dimensions, layer_index) / 2.0) ;
1138
1141
1142 return ( 2.0
1143 * get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1144 row_index, column_index,
1145 dimensions)
1146 * tgrid->BottomHeatSink->AmbientHTC
1147 * get_cell_length (dimensions, column_index)
1148 * get_cell_width (dimensions, row_index)
1149 )
1150 /
1151 ( get_cell_height (dimensions, layer_index)
1152 * tgrid->BottomHeatSink->AmbientHTC
1153 + 2.0
1154 * get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1155 row_index, column_index,
1156 dimensions)
1157 ) ;
1158
1160
1162
1163 return tgrid->Channel->Coolant.HTCBottom
1164 * get_cell_width (dimensions, row_index)
1165 * get_cell_length (dimensions, column_index) ;
1166
1167 else
1168
1169 // We assume that layer_index is not the top most layer
1170 // or the bottom most layer
1171
1172 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1173 row_index, column_index,
1174 dimensions)
1175 * get_cell_length (dimensions, column_index)
1176 * get_cell_width (dimensions, row_index)
1177 )
1178 / (get_cell_height (dimensions, layer_index) / 2.0) ;
1179
1181
1182 return tgrid->Channel->Coolant.HTCBottom
1183 * get_cell_width (dimensions, row_index)
1184 * get_cell_length (dimensions, column_index) ;
1185
1187
1189 * get_cell_width (dimensions, row_index)
1190 * get_cell_length (dimensions, column_index) ;
1191
1193
1195 * get_cell_width (dimensions, row_index)
1196 * get_cell_length (dimensions, column_index) ;
1197
1200
1201 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1202 row_index, column_index,
1203 dimensions)
1204 * get_cell_length (dimensions, column_index)
1205 * get_cell_width (dimensions, row_index)
1206 )
1207 / (get_cell_height (dimensions, layer_index) / 2.0)
1208 * (1.0 - tgrid->Channel->Porosity) ;
1209
1212
1213 return 0.0 ;
1214
1215 case TDICE_LAYER_NONE :
1216
1217 fprintf (stderr, "ERROR: unset layer type\n") ;
1218
1219 return 0.0 ;
1220
1221 default :
1222
1223 fprintf (stderr, "ERROR: unknown layer type %d\n",
1224 tgrid->LayersTypeProfile [layer_index]) ;
1225
1226 return 0.0 ;
1227 }
1228}
1229
1230/******************************************************************************/
1231
1233(
1234 ThermalGrid_t *tgrid,
1235 Dimensions_t *dimensions,
1236 CellIndex_t layer_index,
1237 CellIndex_t row_index,
1238 CellIndex_t column_index
1239)
1240{
1241 if (layer_index > tgrid->NLayers)
1242 {
1243 fprintf (stderr,
1244 "ERROR: layer index %d is out of range\n", layer_index) ;
1245
1246 return 0.0 ;
1247 }
1248
1249 switch (tgrid->LayersTypeProfile [layer_index])
1250 {
1251 case TDICE_LAYER_SOLID :
1252 case TDICE_LAYER_SOURCE :
1259
1260 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1261 row_index, column_index,
1262 dimensions)
1263 * get_cell_length (dimensions, column_index)
1264 * get_cell_height (dimensions, layer_index)
1265 )
1266 / (get_cell_width (dimensions, row_index) / 2.0) ;
1267
1269
1271
1272 return get_convective_term
1273
1274 (tgrid->Channel, dimensions, layer_index, row_index, column_index) ;
1275
1276 else
1277
1278 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1279 row_index, column_index,
1280 dimensions)
1281 * get_cell_length (dimensions, column_index)
1282 * get_cell_height (dimensions, layer_index)
1283 )
1284 / (get_cell_width (dimensions, row_index) / 2.0) ;
1285
1289
1290 return get_convective_term
1291
1292 (tgrid->Channel, dimensions, layer_index, row_index, column_index) ;
1293
1295
1296 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1297 row_index, column_index,
1298 dimensions)
1299 * get_cell_length (dimensions, column_index)
1300 * get_cell_height (dimensions, layer_index)
1301 )
1302 / (get_cell_width (dimensions, row_index) / 2.0)
1303 * (1.0 - tgrid->Channel->Porosity) ;
1304
1308
1309 return 0.0 ;
1310
1311 case TDICE_LAYER_NONE :
1312
1313 fprintf (stderr, "ERROR: unset layer type\n") ;
1314
1315 return 0.0 ;
1316
1317 default :
1318
1319 fprintf (stderr, "ERROR: unknown layer type %d\n",
1320 tgrid->LayersTypeProfile [layer_index]) ;
1321
1322 return 0.0 ;
1323 }
1324}
1325
1326/******************************************************************************/
1327
1329(
1330 ThermalGrid_t *tgrid,
1331 Dimensions_t *dimensions,
1332 CellIndex_t layer_index,
1333 CellIndex_t row_index,
1334 CellIndex_t column_index
1335)
1336{
1337 if (layer_index > tgrid->NLayers)
1338 {
1339 fprintf (stderr,
1340 "ERROR: layer index %d is out of range\n", layer_index) ;
1341
1342 return 0.0 ;
1343 }
1344
1345 switch (tgrid->LayersTypeProfile [layer_index])
1346 {
1347 case TDICE_LAYER_SOLID :
1348 case TDICE_LAYER_SOURCE :
1355
1356 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1357 row_index, column_index,
1358 dimensions)
1359 * get_cell_length (dimensions, column_index)
1360 * get_cell_height (dimensions, layer_index)
1361 )
1362 / (get_cell_width (dimensions, row_index) / 2.0) ;
1363
1365
1367
1368 return - get_convective_term
1369
1370 (tgrid->Channel, dimensions, layer_index, row_index, column_index) ;
1371
1372 else
1373
1374 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1375 row_index, column_index,
1376 dimensions)
1377 * get_cell_length (dimensions, column_index)
1378 * get_cell_height (dimensions, layer_index)
1379 )
1380 / (get_cell_width (dimensions, row_index) / 2.0) ;
1381
1385
1386 return - get_convective_term
1387
1388 (tgrid->Channel, dimensions, layer_index, row_index, column_index) ;
1389
1391
1392 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1393 row_index, column_index,
1394 dimensions)
1395 * get_cell_length (dimensions, column_index)
1396 * get_cell_height (dimensions, layer_index)
1397 )
1398 / (get_cell_width (dimensions, row_index) / 2.0)
1399 * (1.0 - tgrid->Channel->Porosity) ;
1400
1404
1405 return 0.0 ;
1406
1407 case TDICE_LAYER_NONE :
1408
1409 fprintf (stderr, "ERROR: unset layer type\n") ;
1410
1411 return 0.0 ;
1412
1413 default :
1414
1415 fprintf (stderr, "ERROR: unknown layer type %d\n",
1416 tgrid->LayersTypeProfile [layer_index]) ;
1417
1418 return 0.0 ;
1419 }
1420}
1421
1422/******************************************************************************/
1423
1425(
1426 ThermalGrid_t *tgrid,
1427 Dimensions_t *dimensions,
1428 CellIndex_t layer_index,
1429 CellIndex_t row_index,
1430 CellIndex_t column_index
1431)
1432{
1433 if (layer_index > tgrid->NLayers)
1434 {
1435 fprintf (stderr,
1436 "ERROR: layer index %d is out of range\n", layer_index) ;
1437
1438 return 0.0 ;
1439 }
1440
1441 switch (tgrid->LayersTypeProfile [layer_index])
1442 {
1443 case TDICE_LAYER_SOLID :
1444 case TDICE_LAYER_SOURCE :
1451
1452 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1453 row_index, column_index,
1454 dimensions)
1455 * get_cell_width (dimensions, row_index)
1456 * get_cell_height (dimensions, layer_index)
1457 )
1458 / (get_cell_length (dimensions, column_index) / 2.0) ;
1459
1461
1463
1464 return tgrid->Channel->Coolant.HTCSide
1465 * get_cell_width (dimensions, row_index)
1466 * get_cell_height (dimensions, layer_index) ;
1467
1468 else
1469
1470 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1471 row_index, column_index,
1472 dimensions)
1473 * get_cell_width (dimensions, row_index)
1474 * get_cell_height (dimensions, layer_index)
1475 )
1476 / (get_cell_length (dimensions, column_index) / 2.0) ;
1477
1485
1486 return 0.0 ;
1487
1488 case TDICE_LAYER_NONE :
1489
1490 fprintf (stderr, "ERROR: unset layer type\n") ;
1491
1492 return 0.0 ;
1493
1494 default :
1495
1496 fprintf (stderr, "ERROR: unknown layer type %d\n",
1497 tgrid->LayersTypeProfile [layer_index]) ;
1498
1499 return 0.0 ;
1500 }
1501}
1502
1503/******************************************************************************/
1504
1506(
1507 ThermalGrid_t *tgrid,
1508 Dimensions_t *dimensions,
1509 CellIndex_t layer_index,
1510 CellIndex_t row_index,
1511 CellIndex_t column_index
1512)
1513{
1514 if (layer_index > tgrid->NLayers)
1515 {
1516 fprintf (stderr,
1517 "ERROR: layer index %d is out of range\n", layer_index) ;
1518
1519 return 0.0 ;
1520 }
1521
1522 switch (tgrid->LayersTypeProfile [layer_index])
1523 {
1524 case TDICE_LAYER_SOLID :
1525 case TDICE_LAYER_SOURCE :
1532
1533 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1534 row_index, column_index,
1535 dimensions)
1536 * get_cell_width (dimensions, row_index)
1537 * get_cell_height (dimensions, layer_index)
1538 )
1539 / (get_cell_length (dimensions, column_index) / 2.0) ;
1540
1542
1544
1545 return tgrid->Channel->Coolant.HTCSide
1546 * get_cell_width (dimensions, row_index)
1547 * get_cell_height (dimensions, layer_index) ;
1548
1549 else
1550
1551 return ( get_thermal_conductivity (tgrid->LayersProfile + layer_index,
1552 row_index, column_index,
1553 dimensions)
1554 * get_cell_width (dimensions, row_index)
1555 * get_cell_height (dimensions, layer_index)
1556 )
1557 / (get_cell_length (dimensions, column_index) / 2.0) ;
1558
1566
1567 return 0.0 ;
1568
1569 case TDICE_LAYER_NONE :
1570
1571 fprintf (stderr, "ERROR: unset layer type\n") ;
1572
1573 return 0.0 ;
1574
1575 default :
1576
1577 fprintf (stderr, "ERROR: unknown layer type %d\n",
1578 tgrid->LayersTypeProfile [layer_index]) ;
1579
1580 return 0.0 ;
1581 }
1582}
1583
1584/******************************************************************************/
Cconv_t get_convective_term(Channel_t *channel, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
Cconv_t get_convective_term_nonuniform(Channel_t *channel, Dimensions_t *dimensions, CellIndex_t layer_index, ChipDimension_t cell_length)
Definition: channel.c:285
CellDimension_t get_cell_height(Dimensions_t *dimensions, CellIndex_t layer_index)
Definition: dimensions.c:536
CellIndex_t get_number_of_layers(Dimensions_t *dimensions)
Definition: dimensions.c:631
CellDimension_t get_cell_length(Dimensions_t *dimensions, CellIndex_t column_index)
Definition: dimensions.c:478
CellDimension_t get_cell_width(Dimensions_t *dimensions, CellIndex_t row_index)
Definition: dimensions.c:515
CellIndex_t last_layer(Dimensions_t *dimensions)
Definition: dimensions.c:470
CellIndex_t first_layer(Dimensions_t *dimensions)
Conductance_t get_spreader_conductance_north_south(HeatSink_t *hsink)
Definition: heat_sink.c:396
Capacity_t get_spreader_capacity(HeatSink_t *hsink)
Definition: heat_sink.c:377
Conductance_t get_spreader_conductance_east_west(HeatSink_t *hsink)
Definition: heat_sink.c:387
Conductance_t get_spreader_conductance_top_bottom_nonuniform(HeatSink_t *hsink, ChipDimension_t area)
Definition: heat_sink.c:415
void layer_destroy(Layer_t *layer)
Definition: layer.c:80
SolidTC_t get_thermal_conductivity(Layer_t *layer, CellIndex_t row_index, CellIndex_t column_index, Dimensions_t *dimensions)
Definition: layer.c:187
void layer_copy(Layer_t *dst, Layer_t *src)
Definition: layer.c:62
SolidVHC_t get_volumetric_heat_capacity(Layer_t *layer, CellIndex_t row_index, CellIndex_t column_index, Dimensions_t *dimensions)
Definition: layer.c:215
void layer_init(Layer_t *layer)
Definition: layer.c:46
#define PARALLEL(x, y)
Definition: macros.h:88
#define EFFECTIVE_HTC_PF_STAGGERED(darcy_velocity)
Definition: macros.h:207
#define IS_CHANNEL_COLUMN(channel_model, column)
Definition: macros.h:101
#define EFFECTIVE_HTC_PF_INLINE(darcy_velocity)
Definition: macros.h:192
void material_copy(Material_t *dst, Material_t *src)
Definition: material.c:55
void string_copy(String_t *dst, String_t *src)
Definition: string_t.c:53
CellDimension_t Height
Definition: channel.h:78
Coolant_t Coolant
Definition: channel.h:106
CellIndex_t NLayers
Definition: channel.h:98
ChannelModel_t ChannelModel
Definition: channel.h:74
Material_t WallMaterial
Definition: channel.h:110
ChannelDimension_t Porosity
Definition: channel.h:90
CoolantVHC_t VHC
Definition: coolant.h:82
CoolantHTC_t HTCSide
Definition: coolant.h:66
CoolantHTC_t HTCTop
Definition: coolant.h:72
DarcyVelocity_t DarcyVelocity
Definition: coolant.h:93
CoolantHTC_t HTCBottom
Definition: coolant.h:78
CellIndex_t SourceLayerOffset
Definition: die.h:81
LayerList_t Layers
Definition: die.h:90
Collections of all the structures that are needed for the thermal simulation.
Definition: dimensions.h:311
GridDimensions_t Grid
Definition: dimensions.h:318
Non_uniform_cellList_t Cell_list
Definition: dimensions.h:337
CellIndex_t NLayers
Definition: dimensions.h:173
Structure used to store data about the heat dissipation through the top or bottom surfaces of the 2D/...
Definition: heat_sink.h:69
HeatSinkModel_t SinkModel
Definition: heat_sink.h:72
AmbientHTC_t AmbientHTC
Definition: heat_sink.h:77
Structure used to store data about the layers that compose the 2D/3D stack.
Definition: layer.h:72
String_t Id
Definition: layer.h:83
CellDimension_t Height
Definition: layer.h:75
Material_t Material
Definition: layer.h:79
Structure used to store data about the stack element that compose the 2D/3D stack.
Definition: stack_element.h:93
StackElement_p Pointer
HeatSink_t * TopSink
CellIndex_t Offset
StackElementType_t SEType
HeatSink_t * BottomSink
Structure used to store data about the thermal cells / RC nodes.
Definition: thermal_grid.h:68
StackLayerType_t * LayersTypeProfile
Definition: thermal_grid.h:75
Channel_t * Channel
Definition: thermal_grid.h:84
HeatSink_t * BottomHeatSink
Definition: thermal_grid.h:92
HeatSink_t * TopHeatSink
Definition: thermal_grid.h:88
Layer_t * LayersProfile
Definition: thermal_grid.h:80
CellIndex_t NLayers
Definition: thermal_grid.h:71
Conductance_t get_conductance_non_uniform(ThermalGrid_t *tgrid, Dimensions_t *dimensions, ConnectionListNode_t *i_cell, CellIndex_t node1_index, CellIndex_t node2_index, Conductance_t *sign_note)
Definition: thermal_grid.c:820
Capacity_t get_capacity(ThermalGrid_t *tgrid, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
Definition: thermal_grid.c:425
Error_t thermal_grid_build(ThermalGrid_t *tgrid, Dimensions_t *dimensions)
Definition: thermal_grid.c:59
Conductance_t get_conductance_south(ThermalGrid_t *tgrid, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
Conductance_t get_conductance_east(ThermalGrid_t *tgrid, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
Conductance_t get_conductance_top(ThermalGrid_t *tgrid, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
Definition: thermal_grid.c:904
Error_t thermal_grid_fill(ThermalGrid_t *tgrid, StackElementList_t *list)
Definition: thermal_grid.c:117
Conductance_t get_conductance_non_uniform_y(ThermalGrid_t *tgrid, Dimensions_t *dimensions, ChipDimension_t value, Non_uniform_cellListNode_t *node, Conductance_t direction_note)
Definition: thermal_grid.c:641
Conductance_t get_conductance_north(ThermalGrid_t *tgrid, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
void thermal_grid_destroy(ThermalGrid_t *tgrid)
Definition: thermal_grid.c:96
Capacity_t get_capacity_non_uniform(ThermalGrid_t *tgrid, Dimensions_t *dimensions, Non_uniform_cellListNode_t *i_cell)
Definition: thermal_grid.c:326
Conductance_t get_conductance_bottom(ThermalGrid_t *tgrid, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
void thermal_grid_init(ThermalGrid_t *tgrid)
Definition: thermal_grid.c:47
Conductance_t get_conductance_non_uniform_x(ThermalGrid_t *tgrid, Dimensions_t *dimensions, ConnectionListNode_t *i_cell, Non_uniform_cellListNode_t *node)
Definition: thermal_grid.c:736
Conductance_t get_conductance_west(ThermalGrid_t *tgrid, Dimensions_t *dimensions, CellIndex_t layer_index, CellIndex_t row_index, CellIndex_t column_index)
Conductance_t get_conductance_non_uniform_z(ThermalGrid_t *tgrid, Dimensions_t *dimensions, ConnectionListNode_t *i_cell, Non_uniform_cellListNode_t *node, int16_t direction_note)
Definition: thermal_grid.c:525
double Capacity_t
Definition: types.h:119
double Conductance_t
Definition: types.h:113
Error_t
Definition: types.h:401
@ TDICE_SUCCESS
The function returns with success.
Definition: types.h:402
@ TDICE_FAILURE
The function retuerns with a generic error.
Definition: types.h:403
StackLayerType_t
Definition: types.h:243
@ TDICE_LAYER_CHANNEL_2RM
Definition: types.h:286
@ TDICE_LAYER_CHANNEL_4RM
Definition: types.h:282
@ TDICE_LAYER_SOURCE_CONNECTED_TO_SPREADER
Definition: types.h:274
@ TDICE_LAYER_SOLID_CONNECTED_TO_AMBIENT
Definition: types.h:258
@ TDICE_LAYER_SOLID_CONNECTED_TO_SPREADER
Definition: types.h:262
@ TDICE_LAYER_NONE
Definition: types.h:246
@ TDICE_LAYER_SOURCE_CONNECTED_TO_PCB
Definition: types.h:278
@ TDICE_LAYER_PINFINS_STAGGERED
Definition: types.h:294
@ TDICE_LAYER_SOLID
Definition: types.h:250
@ TDICE_LAYER_SOLID_CONNECTED_TO_PCB
Definition: types.h:266
@ TDICE_LAYER_SOURCE
Definition: types.h:254
@ TDICE_LAYER_SOURCE_CONNECTED_TO_AMBIENT
Definition: types.h:270
@ TDICE_LAYER_PINFINS_INLINE
Definition: types.h:290
@ TDICE_LAYER_BOTTOM_WALL
Definition: types.h:310
@ TDICE_LAYER_VWALL_CHANNEL
Definition: types.h:298
@ TDICE_LAYER_VWALL_PINFINS
Definition: types.h:302
@ TDICE_LAYER_TOP_WALL
Definition: types.h:306
@ TDICE_CHANNEL_MODEL_PF_INLINE
Inline pin fins - 2 Resistors model.
Definition: types.h:350
@ TDICE_CHANNEL_MODEL_PF_STAGGERED
Staggered pin fins - 2 Resistors model.
Definition: types.h:351
@ TDICE_CHANNEL_MODEL_NONE
Undefined type.
Definition: types.h:347
@ TDICE_CHANNEL_MODEL_MC_4RM
Microchannel - 4 Resistors model.
Definition: types.h:348
@ TDICE_CHANNEL_MODEL_MC_2RM
Microchannel - 2 Resistors model.
Definition: types.h:349
double ChipDimension_t
Definition: types.h:187
@ TDICE_STACK_ELEMENT_NONE
Undefined type.
Definition: types.h:326
@ TDICE_STACK_ELEMENT_LAYER
Layer.
Definition: types.h:327
@ TDICE_STACK_ELEMENT_CHANNEL
Channel.
Definition: types.h:328
@ TDICE_STACK_ELEMENT_DIE
Die.
Definition: types.h:329
uint32_t CellIndex_t
Definition: types.h:213
@ TDICE_HEATSINK_TOP
Top heat sink (top-most layer)
Definition: types.h:226
@ TDICE_HEATSINK_TOP_PLUGGABLE
Top pluggable heat sink.
Definition: types.h:228
Channel_t * Channel
Definition: stack_element.h:74
Layer_t * Layer
Definition: stack_element.h:72