MoDeNa  1.0
Software framework facilitating sequential multi-scale modelling
bubbleRadius.h
Go to the documentation of this file.
1 
19 bool isNaN(double var);
20 double bubbleRadius (const double m0, const double m1);
21 double nodeRadius(const double &v);
22 
23 bool isNaN(double var)
24 {
25  volatile double d = var;
26  return d != d;
27 }
28 double bubbleRadius (const double m0, const double m1)
29 {
30  double R;
31  R = pow((3.0*m1/(4.0*M_PI*m0)), 1.0/3.0);
32  if (isNaN(R)) {
33  R=init_size;
34  }
35  return R;
36 }
37 
38 double nodeRadius(const double &v)
39 {
40  return (pow((6.0*v/M_PI), 1/3.0));
41 }
bool isNaN(double var)
checks if the passed argument is not a number
Definition: bubbleRadius.h:23
double init_size
initial mean bubble diameter, m
double bubbleRadius(const double m0, const double m1)
radius of bubbles based on the moments
Definition: bubbleRadius.h:28
real(dp), dimension(:), allocatable d
diffusion coefficients (for each dissolved gas)
Definition: globals.f90:106
double nodeRadius(const double &v)
radius of bubbles at each node
Definition: bubbleRadius.h:38