154 lines
18 KiB
Markdown
154 lines
18 KiB
Markdown
<style>
|
|
r { color: Red }
|
|
o { color: Orange }
|
|
gr { color: Green }
|
|
cs { color: Red; background-color: White }
|
|
fs { color: Yellow; background-color: Black}
|
|
csfs {color: Orange; background-color: #5f6a6a }
|
|
done {color: green}
|
|
reply {color: blue; font-weight: bold}
|
|
note {color: red; background-color: Black; font-style: italic; font-weight: bold}
|
|
</style>
|
|
|
|
## Reviewer #2
|
|
|
|
Here I provide the requested review of **"KARL - A Monte Carlo model for atomic and molecular processes in the tritium atmosphere of the KATRIN experiment"**.
|
|
|
|
Clearly this is a very useful piece of software that has implemented a lot of important functionality for tritium experiments such as KATRIN. I commend the authors on their decision to publish and release their code.
|
|
|
|
The paper itself has a number of weaknesses, however, and I believe it needs a major revision before I can recommend it for publication. I give point-by-point comments referenced to line number below, but summarize the most important points here.
|
|
|
|
The paper omits much of the information that is the most interesting about this work - for example, detailed plots of what cross sections are implemented, a quantitative comparison of different stepping approaches, performance metrics, and so on. This material should be included to make this paper a comprehensive and useful reference for the code.
|
|
|
|
|
|
1. <done>The text needs a deep edit for concision and clarity. In several places the same idea is repeated in several subsequent sentences, and often a lot of words are spent on basic concepts that will be clear to most authors (e.g., what is a vector field?), while when complex ideas that are more specific to this code are just skipped over or referenced out (e.g., what does the Boris algorithm do and in what sense is it more or less optimal than the other option?). The text should be refocussed towards the aspects that make this codebase particularly interesting and/or nontrivial, and the language improved and condensed throughout.
|
|
</done><br>
|
|
<reply>Following the two referee reports we have made a large number of changes. While doing so we have tried to clarify the logic, avoided repetitions and focussed on the new developments. As far as we know the KARL code is the only freely available code for the simulation of tritium experiments - this is the point that makes it most interesting.<br>We have reduced the explaination of basic concepts to a minimum, but we believe that a minimal explaination is required for context. </reply>
|
|
|
|
2. <fs>C, F: Almost all the "results" are referred out to Ref [7], which makes the reader wonder why it is necessary to have two papers rather than one. I would like to encourage the authors to bring the results forward into this text. <cs>I also encourage them to include the scripts that generate these as documented examples in the code repository</cs>, since these are the actual code use cases that an external user may want to recreate.
|
|
</fs>
|
|
|
|
3. <cs>C, F: Barely any performance estimates are given. For the two stepper algorithms, for example, how different are the simulation results, and at what relative CPU cost? What degree of uncertainty is associated with granularity of the geometry? How many events need be simulated for a typical application in KATRIN and how long does this take? Which of the processes carry the most time cost, and can any of them be neglected for faster simulations without losing too much accuracy?
|
|
</cs>
|
|
|
|
4. <done>I took a look at the source code. There are almost no comments anywhere, in either the headers or source, and this is especially problematic when many of the functions accept an argument that is simply named "object". It seems to me it would be good practice to add comments to at least add comments to explain what each function does, what it accepts as input and gives as output.
|
|
</done><br> <reply> We have written extensive comments for the source code. Our main objective was to make the functions readable, some of the inner workings are not that well documented. </reply>
|
|
|
|
5. <done>C, F: There are some example scripts given in the codebase, but they are not referenced in the paper, do not come with documentation, and it is not clear what they do in terms of expected input, processing and output. Somewhere it should be made clear how one should run these examples, what they do, and what the expected output is. Furthermore, the examples should contain at least some semi-realistic use cases of the code for addressing relevant physics questions for tritium experiments.
|
|
</done><br> <reply> We have added a section to the README in karl that explains a bit what the different given json files are. A semi-realistic use case is always included with katrin_parameter_example.json.</reply>
|
|
|
|
I now proceed to give some line-by-line comments -
|
|
|
|
Page 3:
|
|
|
|
Line 27: <done>C: Please define what is meant by "high" energy electrons. How dominant is elastic scattering over inelastic in this energy range?
|
|
</done><br> <reply>We have rephrased this completely. High-energy electrons usually refers to energies near the endpoint of beta decay. </reply>
|
|
|
|
Line 32: <done>I don't know what is meant by "ab initio" in this sentence.
|
|
</done><br><reply>We have omitted "ab initio" preserving the original meaning</reply>
|
|
|
|
Line 38: <done>The definition of a Markov chain is that the process depends only on current state but not on past history of the system. But as described later, there appear to nonlinear feedback terms where the path of the electron depends on other interactions in its history like the possible creation of ions that lead to further recombination. So it seems a Markov chain may not be an ideal description here?
|
|
</done><br><reply>We agree that the final implementation of the code - due to the use of the recombination technique - is no longer a Markov chain. The use of the term "Markov" in this paragraph is on the other hand superfluous.</reply>
|
|
|
|
Line 35: <done>C: clarify somehow that the spectrum referred to here is the one before any scattering interactions.
|
|
</done><br><reply>This should be much more concise now.</reply>
|
|
|
|
Line 40: <done>It is not clear what is meant by the "whole energy range"</done><br><reply>We have tried to clarify this part.</reply>
|
|
|
|
Line 41: <done>I find this description very confusing. It is not clear what the authors mean by a "branch", what constitutes a "new branch" or an "initial branch", and what is meant by the idea of the branches "feeding back". I have a feeling that the authors have a mental model of the process in mind but have not explained this model to the reader by this point.</done><br><reply>We have rephrased the whole branch thing and have tested the text with an independent researcher... We hope that the current version is now understandable.</reply>
|
|
|
|
Page 4:
|
|
|
|
Line 13: <done>"High resolution" -> resolution in what quantity? What does high mean in this context? I also don't understand what phase space evolution would necessarily be expected to have better or worse resolution than particle tracking MC.</done><br><reply>We have tried to explain this in more detail. In fact we are developing a very boiled down version of the phasespace solver, but a reasonable comparison of the two approaches is rather complex. We can however acknowledge that the phasespace code is only feasible for 1D simulations...</reply>
|
|
|
|
Line 24: <done>mention the mean free path used to sample a poisson process (as written it suggests a fixed distance step)</done><br> <reply> The equation for the mean free path is given right after this text. </reply>
|
|
|
|
Line 28: <cs>C: "density is proportional to cumulated time" - presumably it depends not only on the time but also on the flux into the segment and also the volume of the segment? How large are the segments? Is there variability of density across those segments?</cs> <note> text changes necessary? Stuff is explaned in the non-introduction part </note><fs>Sag was dazu!</fs>
|
|
|
|
Line 31: <done>"likeliness of recombination" → "rate of recombination"?</done> <reply> Reworded the sentence to make the original intent clearer </reply>
|
|
|
|
Page 5:
|
|
|
|
Line 21: <done>mean free path has been used earlier, introduce the acronym then.</done><br><reply>Done</reply>
|
|
|
|
Page 9:
|
|
<done>C: "Additionally, the particle class only accepts…" → the relevance of this comment is not clear to me. What would be the alternative?</done><br> <reply> removed that sentence </reply>
|
|
|
|
Page 10: <fs> F: "The density fields need a higher resolution than the density difference". Why? Can you be quantitative about the scale of error introduced with some different resolutions? Perhaps a plot showing the accuracy for a few choices?</fs>
|
|
|
|
Page 11-12: <fs> F: It reads oddly that the drift mover is treated in so much more analytical detail than the Boris one. I suggest to balance these better, ideally increasing the level of description of the Boris approach to match the drift one. I would also like to see some performance comparisons of these two options, in terms of simulation time and performance. Some general discussion is given as to why the user may choose one or other, but an evaluation of how well they work in some realistic test cases seems relevant here.</fs>
|
|
|
|
Page 13: <done>
|
|
I see that trapped particles are killed by the simulation. But doesnt this invalidate the density field calculation, since trapped particles should have a very long retention time and hence contribute a lot to the density? Do trapped particles also</done><br><reply>You are essentially correct: Dumping particles could invalidate the density fields. This is a somewhat delicate choice of the max interaction counter. We have added some plots showing which max interaction numbers yield correct density fields. </reply>
|
|
|
|
Line 36: <cs>C: what does "macroscopic" mean in this sentence?</cs> <note> changed; let someone read over to check if better </note>
|
|
|
|
Figure 1: <csfs>C, F: Don't the ions and electrons - especially trapped ones - contribute to the space charge in the volume, and hence affect the E and B fields? So shouldn't there be a line "into" the E and B fields box from somewhere? How are the effects of space charge handled in general?</csfs>
|
|
|
|
General comment: <cs>C: for each kind of interaction I recommend to include an equation so its clear to the reader what the process is, e.g. "elastic scattering e + X -> e+ X, where X=[T2, ….or whatever else]". I understand that the code is written to allow flexibility so these can be extended, but explaining what is implemented now will help the reader understand the role of each process.</cs> <note> Included prototypical interaction examples and changed text a bit </note>
|
|
|
|
Page 14: <done>Elastic scattering: please include figures of the various cross sections, indicating the models that are combined, the data, and the version recommended for use in simulations in KARL.</done><br><reply>This has been updated.</reply>
|
|
|
|
Line 40: <done>"for tracked particles the drift velocity is assumed to be zero and the density field". Why is this a valid assumption? I can imagine a particle making gyro orbits has a typical velocity much larger than its mean drift velocity, for example.</done><br><reply>This sentence has been extremely misleading - we have removed it completely.</reply>
|
|
|
|
Line 44: <done>C, F: the description here is confusing. Presumably theta and phi are drawn in the COM frame and then mapped to lab frame, not vice versa, right? It reads here as if they are randomly drawn in the lab frame, if thats so please explain why and how.</done>
|
|
<br><reply> As before we have clarified the use of lab and COM frame, which should solve this problem.</reply>
|
|
|
|
Clustering: <fs>F: please include a figure with the cross sections. It is actually not totally clear here what clustering interactions are considered (what exactly is the initial state and what is the final state), can you explain it more explicitly? Please also briefly explain the approaches taken in refs 15,16 to evaluate these cross sections.</fs><br><reply>As for many other processes also here more plots and equations are given.</reply> %Reference 19&20
|
|
|
|
Page 15: <fs>F: Recombination: please include a figure giving the cross sections from data and recommended cross section for use in KARL. Briefly explain the approaches taken in 17,18,19 to measure or evaluate these cross sections. Also, can you comment on whether recombination strictly two body or if three body effects are improtant, for example?</fs>
|
|
|
|
Charge exchange: <done>please give figures, equation for process, brief discussion on how its measured.</done><br><reply>Figures have been added.</reply>
|
|
|
|
Excitation: <done>C, F: same comment as above.</done><br><reply></reply>
|
|
|
|
Page 16: <done>Line 15: Shouldn't the ionization energy threshold be applied in the center of mass frame? Text suggests it is in the lab frame. Please also give plots of cross sections etc.</done><br><reply>You are completely right, this has been corrected. "A few" cross section plots have been added. </reply>
|
|
|
|
Page 17: <done> "the fastest axis refers to the axis for which the entry can be accessed the quickest". This note doesn't make sense to me; my understanding is that to access a 4D array you give 4 coordinates A[j,k,l,m]. Please clarify in what sense any axis is quicker than any other.</done><br> <reply> We have added a sentence about it being an effect of caching. "fastest axis" for multi-dimensional arrays typically refers to the axis which is stored in the neighboring memory cells. </reply>
|
|
|
|
<done>On this page the text is quite verbose with some things being repeated in multiple sentences. I recommend to edit and condense this section.
|
|
<br>Page 18:
|
|
First paragraph of this section seems verbose, can be trimmed down.
|
|
<br>Line 41: I don't understand why the sentence begins "However," -this seems to imply something in contradiction to the previous paragraph, but it is not. Instead consider "Alternatively,"</done>
|
|
<reply> We have rephrased this paragraph.</reply>
|
|
|
|
Line 53: <done>F: what is the meaning of either "reasonable" and "robust" in this context?</done><br><reply>We have changed this to physically correct and low-noise</reply>
|
|
|
|
Line 55: <done>F: This is the first mention of rotation. Where is the physics of molecular rotation included? Is it improbable? How much so? Please expand.</done><br><reply>After internal discussions we have reached the conclusion that mentioning molecular rotation at this stage is unnecessary. </reply>
|
|
|
|
Page 19:
|
|
Line 40: <done>C, F: I think "however" is an odd construction here. I would suggest to begin with "the injector class can be configured in a number of ways. The most commonly used is…". And later, "another approach to injection is…"</done><br> <reply> The "however" was removed </reply>
|
|
|
|
Figure 3: <cs>C</r>: Please explain "weak scaling" and "Ideal" in this figure.</cs>
|
|
|
|
Page 21:
|
|
|
|
Line 16: <cs>C: less than 1Gb, but for how many events?</cs> <note> text change necessary? It is mentioned that only derived properties (density, current, deletions) are stored, for which the size does not depend on the number of events. Maybe mention the parameters for the largest output? </note>
|
|
|
|
<done>Lines 20-21: I find it hard to understand what this sentence is trying to tell me.</done><br><reply>We are unsure which sentence was meant here>
|
|
|
|
Line 37: <cs>C: Value has to be provided by its value and its unit; dual use of the word value, seems circular?</cs> <note> changed, proof-reading necessary </note>
|
|
|
|
<done>Line 42: "Functions are an integral part of the code", is this not a statement about code in general, or perhaps even mathematics in general?</done><br><reply>We have removed this more philosophical statement.</reply>
|
|
|
|
Line 42: <csfs> C, F: More generally in this section it seems far too many words are spent explaining concepts that any user of this code will already know, and can be easily inferred from reading the source code, for example, explaining what a scalar or vector field is. It seems that lines P21 L42 - Page 22 L33 could be replaced with a single sentence, "the code implements utility classes for functions returning scalar fields, and three kinds of vector fields (constant vector, Z-pointing vector, and generic vector)", for example.</csfs>
|
|
|
|
Page 24:
|
|
<csfs> C, F
|
|
The particle queue is introduced, and then it is clarified that it is not a queue. The code design seems appropriate, but can't the authors then rename it to something other than a queue, since it is not one??</csfs> Queue2List
|
|
|
|
Test cases section:
|
|
|
|
<csfs> C, F
|
|
The test provided is one useful unit test. But it does not seem to me to be as generic a test as the authors claim, since recovery of the Maxwell Boltzmann distribution after thermalization is a very generic expectation and would happen in any energy and momentum-conversing system where the particle kinematics are randomized by interactions with background gas - this test would pass even if the various interactions, geometry, etc were implemented dramatically wrongly. Some more strenuous tests (compared to either data or calculated expectations) would seem to me to be appropriate to validate the code, here.</csfs>
|
|
|
|
Page 26:
|
|
|
|
<done>F: Ref [7] is referenced heavily here. I think it is not really appropriate to defer all discussions of tests and results to another paper - if it is not a self contained reference to the code, its not so clear what the purpose of the current paper is. I suggest:
|
|
Include results of tests here and
|
|
Ensure they are implemented as example scripts in the code base.</done><br><reply>
|
|
We have followed your suggestion and moved a number of results and many tests - the majority of those are not included in [7] - in the paper. We would like to point out that the primary purpose of this paper is the distribution of simulation tools which are required by the community. </reply>
|
|
|
|
Page 27:
|
|
|
|
Line 15-24 <done>F: a lot of claims are given here in a short space it is not obvious from the results presented that this is the interpretation. Can the authors provide more plots or quantitative arguments to demonstrate that the observed distributions are a result of the expected dynamics of clustering?</done><br><reply>We have now added the cross section graph for the clustering and also several plots showing the composition of the species. It seems evident for us that with growing distance from the center the tritium ions undergo clustering processes. </reply> |