#include <stdio.h>
#include "types.h"
#include "string_t.h"
#include "dimensions.h"
#include "material.h"
#include "coolant.h"
Go to the source code of this file.
|
struct | Channel_t |
| Structure used to store data about the channel that compose the 2D/3D stack. More...
|
|
|
void | channel_init (Channel_t *channel) |
|
void | channel_copy (Channel_t *dst, Channel_t *src) |
|
void | channel_destroy (Channel_t *channel) |
|
Channel_t * | channel_calloc (void) |
|
Channel_t * | channel_clone (Channel_t *channel) |
|
void | channel_free (Channel_t *channel) |
|
void | channel_print (Channel_t *channel, FILE *stream, String_t prefix, Dimensions_t *dimensions) |
|
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) |
|
Temperature_t | get_max_temperature_channel_outlet (Channel_t *channel, Dimensions_t *dimensions, Temperature_t *temperatures) |
|
Temperature_t | get_min_temperature_channel_outlet (Channel_t *channel, Dimensions_t *dimensions, Temperature_t *temperatures) |
|
Temperature_t | get_avg_temperature_channel_outlet (Channel_t *channel, Dimensions_t *dimensions, Temperature_t *temperatures) |
|
Temperature_t | get_gradient_temperature_channel_outlet (Channel_t *channel, Dimensions_t *dimensions, Temperature_t *temperatures) |
|
◆ Channel_t
◆ channel_calloc()
Allocates memory for a structure of type Channel_t
The content of the new structure is set to default values calling channel_init
- Returns
- the pointer to the new structure
-
NULL
if the memory allocation fails
Definition at line 91 of file channel.c.
◆ channel_clone()
Allocates memory for a new copy of the structure channel
- Parameters
-
channel | the address of the structure to clone |
- Returns
- a pointer to a new structure
-
NULL
if the memory allocation fails
-
NULL
if the parameter channel is NULL
Definition at line 104 of file channel.c.
◆ channel_copy()
Copies the structure src into dst , as an assignement
The function destroys the content of dst and then makes the copy
- Parameters
-
dst | the address of the left term sructure |
src | the address of the right term structure |
Definition at line 63 of file channel.c.
◆ channel_destroy()
Destroys the content of the fields of the structure channel
The function releases any dynamic memory used by the structure and resets its state calling channel_init .
- Parameters
-
channel | the address of the structure to destroy |
Definition at line 82 of file channel.c.
◆ channel_free()
Frees the memory space pointed by channel
The function destroys the structure channel and then frees its memory. The pointer channel must have been returned by a previous call to channel_calloc or channel_clone .
If channel is NULL
, no operation is performed.
- Parameters
-
channel | the pointer to free |
Definition at line 121 of file channel.c.
◆ channel_init()
Inits the fields of the channel structure with default values
- Parameters
-
channel | the address of the structure to initalize |
Definition at line 46 of file channel.c.
◆ channel_print()
Prints the channel declaration as it looks in the stack file
- Parameters
-
channel | the address of the structure to print |
stream | the output stream (must be already open) |
prefix | a string to be printed as prefix at the beginning of each line |
dimensions | pointer to the structure storing the dimensions |
Definition at line 134 of file channel.c.
◆ get_avg_temperature_channel_outlet()
Returns the average temperature at the outlet of the channel
- Parameters
-
channel | pointer to the channel |
dimensions | pointer to the structure storing the dimensions |
temperatures | pointer to the temperature of the first thermal cell in the layer where channel is placed |
- Returns
- The average temperature at the outlet of the channel
Definition at line 402 of file channel.c.
◆ get_convective_term()
Returns the convective C term, depending on the type of channel and the location of the thermal cell
- Parameters
-
channel | pointer to the channel |
dimensions | pointer to the structure storing the dimensions |
layer_index | the index of the layer |
row_index | the index of the row |
column_index | the index of the column |
- Returns
C
, the convective term
◆ get_convective_term_nonuniform()
Returns the convective C term, depending on the type of channel and the length of the thermal cell
- Parameters
-
channel | pointer to the channel |
dimensions | pointer to the structure storing the dimensions |
layer_index | the index of the layer |
cell_length | the cell length |
- Returns
C
, the convective term
Definition at line 284 of file channel.c.
◆ get_gradient_temperature_channel_outlet()
Returns the gradient temperature at the outlet of the channel
- Parameters
-
channel | pointer to the channel |
dimensions | pointer to the structure storing the dimensions |
temperatures | pointer to the temperature of the first thermal cell in the layer where channel is placed |
- Returns
- The gradient temperature at the outlet of the channel
Definition at line 431 of file channel.c.
◆ get_max_temperature_channel_outlet()
Returns the maximum temperature at the outlet of the channel
- Parameters
-
channel | pointer to the channel |
dimensions | pointer to the structure storing the dimensions |
temperatures | pointer to the temperature of the first thermal cell in the layer where channel is placed |
- Returns
- The maximum temperature at the outlet of the channel
Definition at line 344 of file channel.c.
◆ get_min_temperature_channel_outlet()
Returns the minimum temperature at the outlet of the channel
- Parameters
-
channel | pointer to the channel |
dimensions | pointer to the structure storing the dimensions |
temperatures | pointer to the temperature of the first thermal cell in the layer where the channel is placed |
- Returns
- The minimum temperature at the outlet of the channel
Definition at line 373 of file channel.c.