anufrievroman / freepaths Goto Github PK
View Code? Open in Web Editor NEWMonte Carlo simulator of phonon and heat transport in nanostructures
Home Page: https://anufrievroman.gitbook.io/freepaths
License: Other
Monte Carlo simulator of phonon and heat transport in nanostructures
Home Page: https://anufrievroman.gitbook.io/freepaths
License: Other
The PointLineHole can be used to draw shapes using a bunch of points and a circle will be drawn at every point.
Do do a parameter sweep currently it is necessary to have a default config file and to customize it with some code and then run it automatically. Because the config file is copied into the results folder it is necessary to store it somewhere until the simulation ends. It could be useful to have a more elegant solution. Maybe something like this:
# define the parameters and values as a dict
PARAMETER_SWEEP_VALUES = {
'T': (4, 50, 300),
}
# Option between grid search and specified combinations like in comsol
PARAMETER_SWEEP_TYPE = 'grid search'
# check that the name contains the parameters to sweep for .format
OUTPUT_FOLDER_NAME = 'Simulation at T: {T}'
If a parameter sweep is specified the program would call a special script that would execute the different simulations
Currently the Multiprocessing works by assigning the phonons to the subprocesses before they are started which results in some finishing before others.
Ideally this should be handled by a worker pool which assigns the phonons to the subprocesses while they run.
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.
Now the material properties are present both in materials.py
and in phonon.py
when the internal scattering time is initialized. Basically, all material properties should be in one place, and preferably in separate files, so that user could add their own materials more easily.
Writing the config files would be a lot more convenient with autocompletion for the parameters, holes and sources.
It could be implemented so that putting from freepaths import typehinting
at the beginning of the config would unlock all that.
Conical pillars seems to work correctly, but sometimes some phonons escape, which probably means that something is wrong.
In the future, I plan to separate the running of the simulation from the analysis so that the analysis could be performed separately with many different parameters. This will free the config files from unnecessary options, and will allow creating pretty plots without rerunning the entire simulations. Example of things that could be redone after the simulation:
Most of this can be achieved just by user re-plotting things from raw data. I am not sure what would be the best way to do it? Create a separate command, or just provide a bunch of scripts for analysis, or keep all the settings in the config and allow rerunning freepaths
without rerunning the simulation, like with --idle
flag.
After update of the imageio library, the animations seem to be broken and do nor render correctly. The frames are saved correctly, but the produced .gif has frames in the wrong order it seems.
Might be related to this issue.
Need to organize scattering functions a bit better. Preferably so that each object has its own class, probably which inherits from a more general class of primitives. So that scattering functions on primitives are shared between all shapes. Also, there is some legacy code written by Felix that needs to be integrated at some point.
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
Instead of hard-coding the distributions, they could be objects like random
, lambert
, directional
etc with the property direction
.
To improve the usability of the software certain parameters should be checked against the simulation after it finished.
For example if the pixel size is smaller than one step of a phonon it could give a warning.
Or if the timesteps are too short compared to the times the phonons need to travel through the structure.
Maybe there is even a way to give a clear measure of convergence.
Now Cp must be entered in parameters, but it might be calculated from phonon dispersion.
When installing freepaths using pip colorama is not installed automatically so when trying to run a simulation a ModuleNotFoundError is thrown.
This is easily fixed by installing colorama manually but is it not possible to have it installed as a dependency?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.