This file contains the utility functions used by the heat transfer simulation in 1D and 2D to help in calculations.
More...
#include <stdio.h>
Go to the source code of this file.
|
| unsigned ll | _cal_num_time (double time_step, double time_limit) |
| | This is a function calculates the number of steps in the time untils we reach the time limit given the rate of change of the time and the time_limit.
|
| |
| ll | _cal_num_space (double length, double space_step) |
| | This is a function calculates the number of steps we will move in the dimentions untils we reach the length given the rate of change of the space and the length of the object.
|
| |
This file contains the utility functions used by the heat transfer simulation in 1D and 2D to help in calculations.
◆ _cal_num_space()
| ll _cal_num_space |
( |
double |
length, |
|
|
double |
space_step |
|
) |
| |
This is a function calculates the number of steps we will move in the dimentions untils we reach the length given the rate of change of the space and the length of the object.
- Parameters
-
| length | The length of the object. |
| space_step_x | The rate of change of the space in x-axis. |
- Returns
- number of steps we will move as a long long integer.
◆ _cal_num_time()
| unsigned ll _cal_num_time |
( |
double |
time_step, |
|
|
double |
time_limit |
|
) |
| |
This is a function calculates the number of steps in the time untils we reach the time limit given the rate of change of the time and the time_limit.
- Parameters
-
| time_step | The rate of change of the time. |
| time_limit | The time that we want to measure the temperature of the object after. |
- Returns
- number of steps we will move as a long long integer.