Based on Dolence et al. 2009 ApJ. Originally downloaded from Astrophysical Code Library @ UI.
GRMONTY is parallelized using OpenMP. This version is configured to use input from harm2d.
NEWS
There is now a GPU-accelerated version of grmonty: GPUmonty. Compatible with NVIDIA GPUs. Over 10x faster than grmonty.
grmonty/
├── src/
│ ├── main.c # Entry point
│ ├── physics/ # Radiation physics (compton, synchrotron)
│ ├── geometry/ # Geodesics, tetrads
│ └── model/ # HARM model implementation
├── include/ # Header files (decs.h, constants.h, harm_model.h)
├── data/ # Input data files (dump019, hotcross.dat)
├── test/ # Test reference files
├── scripts/ # Utility scripts (plspec.m, speclab.m)
├── build/ # Build artifacts (generated)
└── makefile
make # Build (requires OpenMP-enabled gcc)
export OMP_NUM_THREADS=8 # Set threads (bash)
./grmonty 5000000 data/dump019 4.e19 # RunArguments are:
- estimate of photon number (actual number is probabilistic due to scattering)
- harm dump file for model
- mass unit (few x 10^19 is appropriate for Sgr A*)
This will output spectrum to grmonty.spec which should be identical to test/grmonty_spec_verify.
diff grmonty.spec test/grmonty_spec_verifyUse python and the nmmn module:
import nmmn.sed
s=nmmn.sed.SED()
s.grmonty('grmonty.spec')
plot(s.lognu, s.ll)Old-fashioned way: Use the SM scripts in scripts/ to plot up broad-band spectral energy distribution.
Replace src/model/harm_model.c with your own source model. You must supply:
init_model
make_super_photon
bias_func
get_fluid_params
report_spectrum
stop_criterion
record_criterion
gcon_func
gcov_func
get_connection
- make it work with HARMPI
- GPU support: CUDA (see GPUmonty)
- parallelize with MPI
- add bremsstrahlung
- nonthermal electron distribution
- dynamic metrics as input
- add LICENSE
Code and methods: Dolence et al. 2009 ApJ
Applications:
- Sgr A* SED model: Moscibrodzka et al. 2009 ApJ); Moscibrodzka et al. 2014 A&A
- M87 jet/RIAF SED ( Moscibrodzka et al. 2016 A&A)
- Jet and RIAF SEDs for stellar mass black holes (O'Riordan, Pe'er & McKinney 2016 ApJ)
grmonty is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file or the GNU General Public License for more details.