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

paracrystalline model simulation #507

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

pkienzle
Copy link
Contributor

@pkienzle pkienzle commented Jun 8, 2022

For checking implementation of #284 corrections we can simulate a lattice of spheres and compare the resulting patterns.

The dnn parameter as currently implemented represents lattice spacing. For example, the following shows that the peak positions are aligned when the lattice spacing (a=500) matches dnn in the code.

$ python explore/realspace.py -w 0.06 -t fcc -n 20,20,20  -s 10000 -m 500 -z 500,500,500 sphere radius=10

The lineshape broadening appears to be less in the theory than in the simulation for a given distortion factor but I have not investigated different distortion factors and different simulation sizes. It may be that the distortion model (gaussian around the lattice point) is not implemented correctly or does not match what the paracrystal models are using for distortion.

Ignore details at low q due to finite lattice size.

The realspace.py is using an incorrect scaling factor, so ignore offset in y.

The basic simulation of a 2D pattern does not have enough resolution to verify the details of the simulation:

$ python explore/realspace.py -d 2 -w 0.06 -t fcc -n 10,10,10  -s 10000 -m 500 -z 250,250,250 -q 0.2 -v 20,30,40 sphere radius=10

Increasing the lattice size did not help. Increasing the name of samples to s=150000 has not yet completed running since the algorithm is O(n²).

@butlerpd
Copy link
Member

Now that the paracrystalline models have been corrected, is this still relevant @pkienzle? If so is it correct given the fix is different from what was supposed in #284?

@pkienzle
Copy link
Contributor Author

The simulation code is still relevant in as much as it can be used to cross check the analytical results. It may also be useful in the development of models of different types of distortion. It is not part of the released packages so the code does not need careful checking.

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

Successfully merging this pull request may close these issues.

3 participants