00001
00002
00003
00004 #include "cddefines.h"
00005 #include "rfield.h"
00006 #include "dense.h"
00007
00008
00009 double dense_fabden(double radius,
00010 double depth)
00011 {
00012 double a , b;
00013 a = depth;
00014 b = radius;
00015
00016 fprintf(ioQQQ,"PROBLEM DISASTER The default version of dense_fabden is "
00017 "still in dense_fabden.cpp - edit and replace this file to use your version.\n");
00018
00019 return(a*b);
00020
00021
00022 # if 0
00023 double fabden_v;
00024 double z , z0 , density , rad_midplane;
00025 DEBUG_ENTRY( "dense_fabden()" );
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 if( depth > radius )
00046 TotalInsanity();
00047
00048 rad_midplane = radius * cos( dense.DensityLaw[0] );
00049 z = radius * sin( dense.DensityLaw[0] );
00050 z0 = 0.047 * pow( rad_midplane/AU , 1.25 ) * AU;
00051
00052 density = 1.4e-9 * pow( rad_midplane/AU , -11./4. ) * sexp( POW2(z/z0) );
00053
00054 fabden_v = density/(ATOMIC_MASS_UNIT * 1.2);
00055
00056 fprintf(ioQQQ, "bug dense_fabden zone %.2f radius %e density %e \n",
00057 fnzone , radius , fabden_v );
00058 return( fabden_v );
00059 # endif
00060
00061 #if 0
00062
00063
00064 if( rfield.lgUSphON )
00065 dense.DensityLaw[2] = rfield.rstrom/PARSEC;
00066
00067
00068 powexp = MIN2((radius/parsec-dense.DensityLaw[2])/dense.DensityLaw[1],dense.DensityLaw[3]);
00069 fabden_v = pow(10.,dense.DensityLaw[0])*exp(powexp);
00070
00071 fabden_v = dense.DensityLaw[0];
00072
00073 temp = radius + depth;
00074 if( fabden_v == 0. )
00075 {
00076 cdEXIT(EXIT_FAILURE);
00077 }
00078 else
00079 {
00080
00081
00082
00083 return( fabden_v*temp );
00084 }
00085 #endif
00086 }