GALPROP
https://galprop.stanford.edu/forum/

Time Dependent Sources
https://galprop.stanford.edu/forum/viewtopic.php?f=20&t=184
Page 1 of 1

Author:  erccarls [ Thu Mar 06, 2014 5:04 am ]
Post subject:  Time Dependent Sources

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.

Author:  strong [ Thu Mar 06, 2014 8:23 am ]
Post subject:  Re: Time Dependent Sources

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.

Author:  erccarls [ Thu Mar 06, 2014 6:06 pm ]
Post subject:  Re: Time Dependent Sources

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

Author:  strong [ Fri Mar 07, 2014 5:55 am ]
Post subject:  Re: Time Dependent Sources

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.

Author:  erccarls [ Fri Mar 07, 2014 3:04 pm ]
Post subject:  Re: Time Dependent Sources

Just what I was looking for! Thank you so much for your quick response and this wonderful piece of software.

Best,
-Eric Carlson

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/