TYCHO  1.3.0
 All Data Structures Files Functions Variables Enumerations Enumerator
/home/kapf/tycho_docu/alpha_heat_transfer.c
Go to the documentation of this file.
1 /*
2  * alpha_heat_transfer.c
3  *
4  * Author: Wolfgang Kapferer
5  */
6 
7 #include <stdio.h>
8 #include <stdlib.h>
9 #include <math.h>
10 
11 #ifdef _OPENMP
12 #include <omp.h>
13 #endif
14 
15 #include "variables_global.h"
16 #include "prototypes.h"
17 
25 double alpha_heat_transfer(int x, int y, int z, int direction) {
26 
27  double heat_transfer_coefficient;
28  double velocity_component_at_obstacle;
29 
30  //the x-y-z sweeps
31  if (direction == 0) velocity_component_at_obstacle = sqrt(pow(vy[x][y][z],2)+pow(vz[x][y][z],2));
32  if (direction == 1) velocity_component_at_obstacle = sqrt(pow(vx[x][y][z],2)+pow(vz[x][y][z],2));
33  if (direction == 2) velocity_component_at_obstacle = sqrt(pow(vx[x][y][z],2)+pow(vy[x][y][z],2));
34 
35 
36  if (velocity_component_at_obstacle <= 5) heat_transfer_coefficient = 5.6 + 4.0 * velocity_component_at_obstacle;
37  if (velocity_component_at_obstacle > 5) heat_transfer_coefficient = 7.2 + pow(velocity_component_at_obstacle, 0.78);
38 
39  return heat_transfer_coefficient;
40 }