I just wanted to share that I made this new repository for radiative heat transfer which is essentially a collection of functions I developed during my 9th semester at university.
This repository can be used for radiation heat transfer calculations in an enclosure including a participating medium. It contains a number of functions which collectively enables the user to ray trace a user defined geometry. The result of the ray tracing are four ‘exchange factor’ matrices which together describe how the enclosure is radiatively connected. Using the exchange factor matrices it is possible to quickly perform a heat transfer calculation on the entire enclosure, which would otherwise be computationally expensive to ray trace.
Features
Define a custom geometry
Ray trace the geometry
Option to view the ray tracing as it takes place (warning: computationally demanding, use few rays per emitter)
‘Save’ ray tracing result as Exchange Factor matrices (also as CSV-files)
Quickly calculate heat transfer in the geometry using the Exchange Factors
Avoid ray tracing the same geometry multiple times
Limitations
This repository is limited to a uniformly distributed gray participating medium (but I might add the option of generating weighted gray gasses matrices to approximate a nongray gas). It is only possible to use diffuse surface emission/reflection (but the emissivity can be set between 0 and 1). Furthermore the repository is also limited to 2D enclosures (or more accurately: specular/mirrorlike front and back, since the sampled distributions are 3D). Be aware that the Exchange Factor matrices can become very large for highly discretized domains (to the point where memory becomes a limitation). The scattering is limited to be isotropic.
Work-in-progress: Couple this radiation solver to a computational fluid dynamics solver, potentially including combustion.
I did not manage to get this registered as a package even though I attempted to do so (I think I might have done something wrong in the process).
Today I published a new version featuring a simplified way of defining the geometry, faster execution speed and an improved basic algorithm. The readme has been updated to match the new release (use the link above).
I see that not many people were interested in this subject.
This made me question whether I had published a ‘personal package’.
However, the following quote from the paper “The Past and Future of the
Monte Carlo Method in Thermal Radiation Transfer” by Howell and Daun (2021) reassured me:
“Finally, most problems solved using the Monte Carlo method
have been addressed using “one-off” in-house research codes constructed
for a particular problem. To the best of our knowledge, a
general “open-source” code incorporating all the attributes of
Monte Carlo (like OPENFOAM for CFD problems [186]) is not yet
available. The development of a verified and validated general
code would be a valuable contribution, particularly if it exploited
recent advancements in GPUs and parallel processing.”
My code is open-source, it is validated against an analytical result, it runs in parallel, it works on several different geometries (general) and the basic algorithm I developed is suitable for 3D ray tracing, which I plan to implement in a future release.
I am aware that I might not yet be an accomplished Julia programmer, but I take this as an opportunity for growth. I have already learned a lot, and I am very motivated for improving my package.
RayTraceHeatTransfer.jl is now version 0.2.1, refer to the github link above.
I used Documenter.jl to create docs (thanks for that package ) which can be found here: Home · Documentation
Geometry specification has been made modular and flexible which was made possible by improving my meshing algorithm.
My repository now also include a translated utility analytical function for calculating 3D view factors between arbitrary polygons (by permission from original Matlab authors).
Lastly, the matrix heat transfer problem is now solved directly as opposed to iteratively, due to an improved solution method I developed.
Future work:
Improving the ray tracing speed, by looking a allocations and profiling.
Making my code 3D, my fundamental algorithm has no dimensional limitations, so this should be relatively straight forward.
Looking into possibilities for porting the code to GPU.
I have been trying to understand the Monte Carlo Method for general-purpose radiative heat transfer on complex geometries and participating media. Unfortunately, I haven’t got much time to fully dedicate to this endeavor, but I’ve searched for solvers on the internet and skimmed through Howell’s chapter on it.
I have an interesting in helping to further develop this code. Let me know if you have an interest in continuing this project and if you’re open to sharing a bit of the know-how on the code.
I’m very glad to hear from you! I’m happy that you’re interested in the topic! Radiative transfer is a fascinating topic.
I can tell you that a lot is going on ‘behind the scenes’ regarding this package. I have developed a revolutionary algorithm for radiative transfer (not yet in the public package), which I am in the process of having published in Journal of Quantitative Spectroscopy and Radiative Transfer! When I am done, this package will be able to handle and solve high resolution problems with very high levels of scattering-reflection as well as arbitrary levels of extinction, and including angular and spectral distributions! I think my algorithm will have far-reaching consequences, and especially be relevant to climate sciences. I am very excited to share it all, but currently there is far too many new things going on for me to accept co-authors of the package. It will likely take a year or so since I have plans of publishing 4 articles on these matters and gradually releasing improved versions of the code. Now I can also solve much more complex problems (2d problems built from skewed triangles and quadrilaterals, and transparent 3d problems).
Good luck on your journey in radiative transfer, I recommend studying hard before contributing code.
Hi Niko! That’s really great news!! I will excitedly await for future updates, then. I was afraid the project had stopped. I don’t mind not being a co-author, of course; especially since I can’t really fully dedicate myself to such a project.
I wonder why 3D problems are limited to transparent media. Have you found some complexities in porting the 2D functionality to 3D?
As for my journey on radiative heat transfer, I am mostly focused on deterministic DOM and FAM coupled with FVM. That’s why I don’t understand much of the Monte Carlo approach. I am also currently on way to finishing my Master’s Thesis. My laboratory, though, will probably have an interest in stochastic methods in the future. And I am particularly curious myself, as Monte Carlo just seems physically more representative to the phenomena in my view, and provides excellent results.
In the meantime, I will be looking forward to your publications and other updates, then.
Hi Ophir!
Ah, I’m glad to hear, then you do actually know quite a bit about the topic. No, the project has not slowed down, if anything it has accelerated hehe. I’m really excited to share my papers. If you need ‘proof’ or want to track the process, here you can see that my paper has been through the first round of peer review: Elsevier - track your submission . I am currently working on some major revisions, primarily strengthening my validation section, but I am almost done with it, and ready for the second round of peer review. But it will be a phenomenal paper, and the following papers will broaden the method to the cases mentioned above. I work alone, I am an independent researcher, working primarily weekends and evenings, while working a full time job as an engineer as my ‘dayjob’, I am considering personally paying for my first paper to be ‘open access’, since I’m very proud of it! I discovered my algorithm in my hotel room at JuliaCon2024 in Eindhoven after studying the subject for a couple of years, and it took some months to write the paper. Regarding 3d, the main issue is visualization. Without visualization, validation is hard. And without validation you can’t really do anything. But my algorithm is not limited in any way like that. It is only the ray tracing which is hard to validate.
The first thought I had when reading the title would be impolite to reproduce here. Let’s just say that giving your name to a new method is a privilege of few haha. Also, it is very inspiring to know one can work important research independently and with a full-time job.
What do you mean, exactly, about visualization? I can think of a few cases for validating 3D radiative heat transfer algorithms. As long as you can produce a field of radiative heat fluxes or incident radiation, you should have some form of comparison. Then again, I guess the main issue would be getting good comparisons, as it won’t be surprising or necessarily bad for Monte Carlo solutions to deviate from other solutions. And it is hard to think of experimental validation cases… Another solution I can think of is doing coupled CFD for validation, which has good experimental results available. It is good to know, though, that the main issue is validating what’s there: 3D problems are already applicable.
Also, I am intrigued by the fact your transform can be applicable to other radiative transport methods. If you need help with people to review, I could try contacting some people I know.
I am aware that it’s a privilige, and quite frankly, also an honour, to be the one to ‘hand over’ a method like this. This method I found is very elegant mathematically and has a lot of desirable properties (it does not feel like I designed it, but rather, that I discovered it). I have good reasons to name it, and I think it is actually fair, since I found it through years of hard work and frantic searching (anyone could have found it, but no one else did). Another good reason to give it my name is that it will be evident already from the titles of the articles that they are about the same method. A third reason to give it the name I gave it is due to it’s historical similarities to the Fourier Transform, which was initially discovered for heat conduction, but subsequently found application in a vast amount of other fields. My algorithm, while developed for radiative heat transfer, is essentially a graph transport algorithm, independent of radiative transfer and dependent only on ‘connections’ and probabilities, and therefore, it could potentially impact any field involving transport of a conserved quantity along a graph/network.
Regarding the visualization, I specifically talk about the design of a 3d ray tracing algorithm. From your comments it seems clear that you have never designed or programmed a ray tracing algorithm. What one does when designing such an algorithm is to actually trace each and every ray (or bundle) throughout the domain. At least for me, the easiest way to know what is going on, is to visualize every step of the interactions of a single ray. While this is possible with a package such as Makie.jl, it is definitely not as straight forward as it is in 2d. What you talk about seems to be validations ‘after’ the algorithm has been designed, but in many cases, at least for me, that is not enough for designing and debugging a ray tracing algorithm. I need to know that every step is correct, and then after I ‘believe’ in my algorithm, then I can do the ‘system-wide’ validation against other results.
But yes, my algorithm works fine for 3D, both with transparent and participating media (in my paper I apply it to transparent 3d, by using an analytical method). I believe my method can also be used with other methods, but Monte Carlo will likely remain the superior choice, since it is possible to get arbitrary accuracy, with quantifiable uncertainty bounds.