3D-ICE 3.0.0
Data Structures | Typedefs | Functions
channel.h File Reference
#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.

Data Structures

struct  Channel_t
 Structure used to store data about the channel that compose the 2D/3D stack. More...
 

Typedefs

typedef struct Channel_t Channel_t
 

Functions

void channel_init (Channel_t *channel)
 
void channel_copy (Channel_t *dst, Channel_t *src)
 
void channel_destroy (Channel_t *channel)
 
Channel_tchannel_calloc (void)
 
Channel_tchannel_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)
 

Typedef Documentation

◆ Channel_t

typedef struct Channel_t Channel_t

Definition of the type Channel_t

Definition at line 116 of file channel.h.

Function Documentation

◆ channel_calloc()

Channel_t * channel_calloc ( void  )

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()

Channel_t * channel_clone ( Channel_t channel)

Allocates memory for a new copy of the structure channel

Parameters
channelthe 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()

void channel_copy ( Channel_t dst,
Channel_t src 
)

Copies the structure src into dst , as an assignement

The function destroys the content of dst and then makes the copy

Parameters
dstthe address of the left term sructure
srcthe address of the right term structure

Definition at line 63 of file channel.c.

◆ channel_destroy()

void channel_destroy ( Channel_t channel)

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
channelthe address of the structure to destroy

Definition at line 82 of file channel.c.

◆ channel_free()

void channel_free ( Channel_t channel)

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
channelthe pointer to free

Definition at line 121 of file channel.c.

◆ channel_init()

void channel_init ( Channel_t channel)

Inits the fields of the channel structure with default values

Parameters
channelthe address of the structure to initalize

Definition at line 46 of file channel.c.

◆ channel_print()

void channel_print ( Channel_t channel,
FILE *  stream,
String_t  prefix,
Dimensions_t dimensions 
)

Prints the channel declaration as it looks in the stack file

Parameters
channelthe address of the structure to print
streamthe output stream (must be already open)
prefixa string to be printed as prefix at the beginning of each line
dimensionspointer to the structure storing the dimensions

Definition at line 134 of file channel.c.

◆ get_avg_temperature_channel_outlet()

Temperature_t get_avg_temperature_channel_outlet ( Channel_t channel,
Dimensions_t dimensions,
Temperature_t temperatures 
)

Returns the average temperature at the outlet of the channel

Parameters
channelpointer to the channel
dimensionspointer to the structure storing the dimensions
temperaturespointer 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()

Cconv_t get_convective_term ( Channel_t channel,
Dimensions_t dimensions,
CellIndex_t  layer_index,
CellIndex_t  row_index,
CellIndex_t  column_index 
)

Returns the convective C term, depending on the type of channel and the location of the thermal cell

Parameters
channelpointer to the channel
dimensionspointer to the structure storing the dimensions
layer_indexthe index of the layer
row_indexthe index of the row
column_indexthe index of the column
Returns
C , the convective term

◆ get_convective_term_nonuniform()

Cconv_t get_convective_term_nonuniform ( Channel_t channel,
Dimensions_t dimensions,
CellIndex_t  layer_index,
ChipDimension_t  cell_length 
)

Returns the convective C term, depending on the type of channel and the length of the thermal cell

Parameters
channelpointer to the channel
dimensionspointer to the structure storing the dimensions
layer_indexthe index of the layer
cell_lengththe cell length
Returns
C , the convective term

Definition at line 284 of file channel.c.

◆ get_gradient_temperature_channel_outlet()

Temperature_t get_gradient_temperature_channel_outlet ( Channel_t channel,
Dimensions_t dimensions,
Temperature_t temperatures 
)

Returns the gradient temperature at the outlet of the channel

Parameters
channelpointer to the channel
dimensionspointer to the structure storing the dimensions
temperaturespointer 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()

Temperature_t get_max_temperature_channel_outlet ( Channel_t channel,
Dimensions_t dimensions,
Temperature_t temperatures 
)

Returns the maximum temperature at the outlet of the channel

Parameters
channelpointer to the channel
dimensionspointer to the structure storing the dimensions
temperaturespointer 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()

Temperature_t get_min_temperature_channel_outlet ( Channel_t channel,
Dimensions_t dimensions,
Temperature_t temperatures 
)

Returns the minimum temperature at the outlet of the channel

Parameters
channelpointer to the channel
dimensionspointer to the structure storing the dimensions
temperaturespointer 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.