anufrievroman / freepaths

Monte Carlo simulator of phonon and heat transport in nanostructures
https://anufrievroman.gitbook.io/freepaths
Other
14 stars 4 forks source link

Convergence and Errors #17

Open phigas opened 7 months ago

phigas commented 7 months ago

Convergence of the simulation of margins of error for the output values is something that has not been looked at at all for this software. If it is not possible to provide quantitative error sizes for the outputs i think the next best option would be to at least have a indicator of convergence or stability. Or at the very least provide a tutorial that explains the factors and parameters contributing to convergence and errors.

anufrievroman commented 6 months ago

I think there could be a tutorial about convergences. I'll draft my thoughts about it here first. Basically, there are two main convergences, with time and with the number of phonons.

1) Convergence with number of phonons is easy to demonstrate by plotting it for 10, 100, 1000 phonons etc. This is the responsibility of the user, but there could be an example. I'll take an example from Kim's paper when it's published.

2) Convergence with time is a bit harder, it's related to issue #13. I'll think how to make it so that we still record some data to show the convergence. For the quantities like the thermal conductivity, the standard deviation can be estimated either by rerunning the simulation N times (responsibility of the user and what I did in some works in the past) or considering N last converged values of the quantity (responsibility of the program).

3) Also, there could be a module that creates plots with convergence after the program has finished. Since for some quantities we have data for all phonons, we could simply plot curves for all phonons, for 10% phonons, for 1% phonons etc. This could be used to see the convergence for MFP and things like that. That seems easy to make.