It is currently Fri Aug 07, 2020 10:44 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Time Dependent Sources
PostPosted: Thu Mar 06, 2014 5:04 am 
Offline

Joined: Thu Apr 05, 2012 10:40 pm
Posts: 14
Hi All,

Is it currently possible (or easy to modify existing code) to add time dependent sources? I am new to Galprop, but it would be helpful, for example, to inject a CR species at a spatial location all at once -- i.e. a delta-function or narrow gaussian-- and let it evolve for a set amount of time.

I imagine something similar is done in the treatment of supernova injection.


Top
 Profile  
 
PostPosted: Thu Mar 06, 2014 8:23 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
yes, with existing code but only time-independently
However by running for a series of limited times you can easily produce the time-dependent solution.
It must be run in 3D obviously.

The parameters for 1 source with sample values are

n_cr_sources = 1 number of pointlike cosmic-ray sources 3D only!
cr_source_x_01 = 10.0 x position of cosmic-ray source 1 (kpc)
cr_source_y_01 = 10.0 y position of cosmic-ray source 1
cr_source_z_01 = 0.1 z position of cosmic-ray source 1
cr_source_w_01 = 0.1 sigma width of cosmic-ray source 1
cr_source_L_01 = 1.0 luminosity of cosmic-ray source 1

For more details see the Explanatory Supplement.
For this purpose it is better to use the explicit time scheme in the updated version available at http://sourceforge.net/projects/galprop .
At present only point-like sources are possible, not Gaussian etc, but that would be relatively easy, I can tell you more if required.

_________________
Andy Strong, MPE


Top
 Profile  
 
PostPosted: Thu Mar 06, 2014 6:06 pm 
Offline

Joined: Thu Apr 05, 2012 10:40 pm
Posts: 14
Hi Prof. Strong,

Thank you for your reply. I did see the spatial insertion in the galdef, but I was mostly interested in the time aspect. I would like to inject a CR species as a delta function in time. Is it possible to modify the code relatively easily to, for example, add a source term to a given grid site at time step zero (or later timesteps)?

I am running in the explicit time mode and am trying to solve for a transient signal, not the equilibrium solution. Currently I can do this, but the source is a constant luminosity one.

I would be willing to dig into the code a bit if this is something doable, but your guidance on where to begin, or just feasibility, would be appreciated.

Best,
Eric


Top
 Profile  
 
PostPosted: Fri Mar 07, 2014 5:55 am 
Offline

Joined: Wed May 17, 2006 7:02 am
Posts: 285
Location: MPE Garching
It can be done in propel.cc
Refering to r2423 (currently the latest)
look around line 2103 (3D section)
total_source_function = particle .primary_source_function;

here you can set it to zero after the first timestep, then it will be a delta injection in time.

The later section on SNR events is also time-dependent, looking at this could help.

If you study this routine it should be clear enough how to do what you want, I can help further as required.

NB as I mentioned the explicit (not Crank-Nicolson/operator spilitting) method is important especially for a point source for accurate results.

_________________
Andy Strong, MPE


Top
 Profile  
 
PostPosted: Fri Mar 07, 2014 3:04 pm 
Offline

Joined: Thu Apr 05, 2012 10:40 pm
Posts: 14
Just what I was looking for! Thank you so much for your quick response and this wonderful piece of software.

Best,
-Eric Carlson


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

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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