Extracting nuleation positions

aspects of evaluating simulation results and their graphic presentation using either DisplayMICRESS or other software tools. Features and possibilities of DisplayMICRESS
Moritz
Posts: 40
Joined: Fri Aug 06, 2021 11:13 am
anti_bot: 333

Re: Extracting nuleation positions

Post by Moritz » Sat Mar 19, 2022 4:19 pm

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

Bernd
Posts: 1504
Joined: Mon Jun 23, 2008 9:29 pm

Re: Extracting nuleation positions

Post by Bernd » Sun Mar 20, 2022 11:45 am

Hi Moritz,

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

Bernd

ralph
Posts: 167
Joined: Wed Apr 27, 2011 4:42 pm
anti_bot: 333

Re: Extracting nuleation positions

Post by ralph » Mon Mar 21, 2022 9:42 am

... 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

Moritz
Posts: 40
Joined: Fri Aug 06, 2021 11:13 am
anti_bot: 333

Re: Extracting nuleation positions

Post by Moritz » Wed Mar 23, 2022 7:11 pm

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

Post Reply