Git Product home page Git Product logo

freepaths's People

Contributors

anufrievroman avatar fbarbierchebbah avatar gluchkos avatar phigas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

freepaths's Issues

Bug in parabola bottom

The collimating behaviour of the bottom parabola is incorrect. The scattering seems to be happening in the wrong direction.

bottom focussing
top collimating
top focussing
bottom collimating

Further ideas for PointLineHole

The PointLineHole can be used to draw shapes using a bunch of points and a circle will be drawn at every point.

  • An option for having the ends of the line be flat instead of rounded could be useful
  • Currently the scattering simply uses the circle scattering to determine the new phonon direction. Instead we could use the slope calculated with the adjacent points in the list. This way the shape would still be determined with the circles but the scattering would be "smooth".
  • Instead of having a fixed thickness through the entire line the thickness could be variable. For example defined by a function

Parameter sweep

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

Multiprocessing improvement

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 and Errors

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.

Organize materials and their properties

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.

Autocompletion

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

Conical pillars seems to work correctly, but sometimes some phonons escape, which probably means that something is wrong.

Separate post-run analysis

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:

  • Re-plotting maps without phonons in hole, or with white patches of holes on top.
  • Re-plotting distributions with desired ranges and bins.
  • Re-plotting with different color maps and other cosmetics
  • Changing in which time segments thermal conductivity is calculated

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.

Animations no longer work

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.

Organize scattering functions

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.

timesteps behaviour

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

Source distributions as objects

Instead of hard-coding the distributions, they could be objects like random, lambert, directional etc with the property direction.

automatic parameter validity checks

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.

colorama not automatically installed

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.