Page 2 of 2

Re: Extracting nuleation positions

Posted: Sat Mar 19, 2022 4:19 pm
by Moritz
Hello Ralph,

thanks again for your kind help. But when I apply this to the values I got for the zell pointers, I come to weird results. Here is an example:

dimX = 100 cells or 6 µm (grid spacing = 0.06)

zp for seed 1: 13187

For z:
zp = 13187 - 1 = 13186
z = 13186 / (100 + 2) = 129.2745

For x:
zp = 13187 - 129.2745 * (100 + 2) = 1.001
x = zp = 1.001

If I do this for every seed that I have, for z I get values between 1 and slightly above 833, which makes sense as I have 833 cells in z direction.
But the value for x stays the same. This is confusing, as it should also change up to 100, as this is the number of cells in x direction.

Do you have an idea, what could be the problem?

Best regards,

Moritz

Re: Extracting nuleation positions

Posted: Sun Mar 20, 2022 11:45 am
by Bernd
Hi Moritz,

As Ralph said above, the trick is to use integer division...

Bernd

Re: Extracting nuleation positions

Posted: Mon Mar 21, 2022 9:42 am
by ralph
... or in other words:
Take the whole number part before the decimal point for the coordinates.
This can be done by an integer division, type casting of the result or cutting by a function (e.g. math.floor() in Python).

Best,
Ralph

Re: Extracting nuleation positions

Posted: Wed Mar 23, 2022 7:11 pm
by Moritz
Dear Bernd and Ralph,

thank you very much for your patience! I did not pu tmuch attention on the integer division and for some reason thought, that this was a "normal" division. Now everything makes sense and the visualisation works.

Best regards

Moritz