Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timesteps behaviour #13

Open
phigas opened this issue Jan 23, 2024 · 4 comments
Open

timesteps behaviour #13

phigas opened this issue Jan 23, 2024 · 4 comments

Comments

@phigas
Copy link
Contributor

phigas commented Jan 23, 2024

Currently the timesteps are all of equal size which is useful to show the profiles converging.
But this means that for the final converged timestep only few phonons are actually considered.
The way it should be done is that the first couple timesteps are shorter and that the final timestep is long.
Maybe it's possible to have multiple smaller timesteps and then add them together to one big one. This way the convergence can still be evaluated and still many phonons are evaluated in the main timestep

@anufrievroman
Copy link
Owner

anufrievroman commented Feb 19, 2024

So, finally after checking the last version, I think it would be better to still have several short time segments across the whole simulation time, like previously, to visualize the convergence. Just that last N time segments are merged for better thermal conductivity calculation, but uncertainty is still calculated from the different time segments. So that there is still NUMBER_OF_TIME_SEGMENTS, which includes smaller NUMBER_OF_INITILIZATION_TIME_SEGMENTS, and all the remaining segments are averaged to get the final value.

@phigas
Copy link
Contributor Author

phigas commented Feb 21, 2024

The reason i did not choose this is because it is more difficult to implement. You would have to add up the heat and flux maps you need and find a place to output the extra tc. It's true that the old method made it easier to see convergence.

Currently the virtual start times of the phonons are generated from 0 to end of simulation. A very easy alternative would have been to instead generate the phonons from -t to end of simulation with t being some initialization time.

@anufrievroman
Copy link
Owner

anufrievroman commented Feb 27, 2024

Finally, I've reimplemented things a bit, similar to how it was before, with several equal timesteps, but now the final thermal conductivity is calculated as average after the stabilization, as shown below. So, this way we can see the convergence, can calculate the standard deviation (shown there as a region) #17 and at the same time still use many phonons to get a stable average value, not just the last value, like previously.

Here is the new plot generated by the program:
image

I'll add a display of actual value and a few other things.

@anufrievroman
Copy link
Owner

So, the final timeframe behavior is like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants