TYCHO  1.3.0
 All Data Structures Files Functions Variables Enumerations Enumerator
/home/kapf/tycho_docu/kinematic_dyanmic_viscosity.c
Go to the documentation of this file.
1 /*
2  * kinematic_viscosity.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 
23 double kinematic_viscosity(double temperature, double density) {
24 
25  double kinematic_viscosity;
26 
27  if ((temperature >= 200) && (temperature <= 1400)) {
28  kinematic_viscosity = (C1_visc * pow(temperature, 1.5)) / (temperature + S_visc);
29  kinematic_viscosity = kinematic_viscosity / density;
30  } else {
31  kinematic_viscosity = 0.0;
32  }
33 
34  return kinematic_viscosity;
35 }
36 
42 double dynamic_viscosity(double temperature) {
43 
44  double dynamic_viscosity;
45 
46  if ((temperature >= 200) && (temperature <= 1400)) {
47  dynamic_viscosity = (C1_visc * pow(temperature, 1.5)) / (temperature + S_visc);
48  } else {
49  dynamic_viscosity = 0.0;
50  }
51 
52  return dynamic_viscosity;
53 }