cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2017 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 /*dense_fabden called by dlaw command, returns density for any density law */
4 #include "cddefines.h"
5 #include "rfield.h"
6 #include "dense.h"
8 /*dense_fabden implements the dlaw command, returns density using
9  * current position and up to ten parameters on dlaw command line */
10 double dense_fabden(double radius,
11  double depth)
12 {
13  double fabden_v = exp10(dense.DensityLaw[0]);
14  if( rfield.lgUSphON )
15  fabden_v *= pow(radius/rfield.rstrom,dense.DensityLaw[1]);
16  else
17  fabden_v *= pow(depth/rfield.rstrom,dense.DensityLaw[1]);
19  return fabden_v;
20 }
double exp10(double x)
Definition: cddefines.h:1383
t_dense dense
Definition: global.cpp:15
t_rfield rfield
Definition: rfield.cpp:9
realnum rstrom
Definition: rfield.h:355
t_radius radius
Definition: radius.cpp:5
double dense_fabden(double radius, double depth)
double pow(double x, int i)
Definition: cddefines.h:782
double DensityLaw[10]
Definition: dense.h:191
bool lgUSphON
Definition: rfield.h:353