Dense granular flows exist in many solid particle heat exchangers and solar receivers studied in the field of Concentrating Solar Power (CSP). By tracking particles individually with the Discrete Element Method (DEM), the details of particle friction, collisions, and mixing can be modeled accurately. An open source DEM-based code for modeling heat transfer in dense granular flows is presented, called Dense Particle Heat Transfer (DPHT). It uses one-way coupling, with DEM run first to find the particle positions and DPHT run second to calculate heat transfer between particles and any walls. Heat transfer is computed with six sub-models, including effects from contact conduction, conduction through the thin fluid gap between particles, and thermal radiation. Simulations are run to investigate particle-particle radiation, with DPHT matching a full Monte Carlo ray tracing simulation to within 1.6%, whereas the "local environment temperature" models from literature show physically unrealistic results. As a test of the accuracy of DPHT, a simulation is run to replicate published experimental work, and results in terms of total heat transfer are within 4%. Finally, a tubular heat exchanger is analyzed, and a "radial" mixer design is introduced, increasing heat transfer by 8%. Several DEM-based heat transfer codes have been described in literature, but they are often kept in-house. Some open source codes exist as well, but they generally have drawbacks including missing heat transfer modes, insufficient flexibility to make significant changes, and incomplete documentation. DPHT aims to simplify this modeling method by providing a flexible, open source solution.