It is currently Tue Dec 10, 2024 6:05 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Sep 25, 2009 4:38 am 
Offline

Joined: Tue Aug 11, 2009 2:40 pm
Posts: 2
Location: Seoul National University
I used galprop v.50p for my recent paper about CR from decaying DM.

While I used it, I found some bug in the code averaging DM density.
( "DM_profile_av()" in "gen_DM_source.cc")
The calculation with 3-d coordinate or non-cuspy profile is OK. But
the calculation with cuspy profile like NFW in 2-d coordinate make
unacceptably large CR fluxes. It maybe the problem in averaging DM
near the origin (Jacobi factor become significant in this region.).

By simply changing "int nuse" into "double ruse" and "nuse++" into "ruse+=rr",
code produce appropriate result.




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
double Galprop::DM_profile_av(double r,double z,double dr,double dz,double dzz)
{
double DM_profile_av_=0.0;
int nuse=0;
double ruse=0;

for (double zz=z-dz/2.; zz<=z+dz/2.; zz+=dzz)
for (double rr=r-dr/2.; rr<=r+dr/2.; rr+=dr/10.)
{
if (rr<0.) continue;
DM_profile_av_+=rr*DM_profile(rr,0,zz);
ruse+=rr;
}
return (DM_profile_av_/ruse);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_________________
Ji-Haeng Huh (jhhuh@phya.snu.ac.kr)
High Energy Phenomenology Group
Dept. of Physics/Astronomy
Seoul National University, Seoul, Korea


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group