00001 /* This file is part of Cloudy and is copyright (C)1978-2010 by Gary J. Ferland and 00002 * others. For conditions of distribution and use see copyright notice in license.txt */ 00003 /*dense_fabden called by dlaw command, returns density for any density law */ 00004 #include "cddefines.h" 00005 #include "rfield.h" 00006 #include "dense.h" 00007 00008 /*dense_fabden called by dlaw command, returns density for any density law */ 00009 double dense_fabden(double radius, 00010 double depth) 00011 { 00012 double fabden_v = pow(10.,dense.DensityLaw[0]); 00013 if( rfield.lgUSphON ) 00014 fabden_v *= pow(radius/rfield.rstrom,dense.DensityLaw[1]); 00015 else 00016 fabden_v *= pow(depth/rfield.rstrom,dense.DensityLaw[1]); 00017 00018 return fabden_v; 00019 }