Page 1 of 1

Reversed order for z in: det myDet1 n dtl mySurf1 dn 1 10 20 20 0.0 72.0 36 -11 11 23

Posted: Fri Aug 21, 2020 9:40 am
by sjjamsa
Hi!

Maybe this is a feature instead of a bug, but it sure is confusing:

When using a Cylindrical mesh for detector, like this:

det myDet1 n dtl mySurf1 dn 1 440 645 20 0.0 72.0 36 -114 114 23

The output has the z-slots in "reverse order":
(The following is through SerpentTools, but the same thing is already in the _det0.m -file.)


{
'R': array([[440. , 450.25 , 445.125],
[450.25 , 460.5 , 455.375],
[460.5 , 470.75 , 465.625],
[470.75 , 481. , 475.875],
[481. , 491.25 , 486.125],
[491.25 , 501.5 , 496.375],
[501.5 , 511.75 , 506.625],
[511.75 , 522. , 516.875],
[522. , 532.25 , 527.125],
[532.25 , 542.5 , 537.375],
[542.5 , 552.75 , 547.625],
[552.75 , 563. , 557.875],
[563. , 573.25 , 568.125],
[573.25 , 583.5 , 578.375],
[583.5 , 593.75 , 588.625],
[593.75 , 604. , 598.875],
[604. , 614.25 , 609.125],
[614.25 , 624.5 , 619.375],
[624.5 , 634.75 , 629.625],
[634.75 , 645. , 639.875]]),
'PHI': array([[ 0., 2., 1.],
[ 2., 4., 3.],
[ 4., 6., 5.],
[ 6., 8., 7.],
[ 8., 10., 9.],
[10., 12., 11.],
[12., 14., 13.],
[14., 16., 15.],
[16., 18., 17.],
[18., 20., 19.],
[20., 22., 21.],
[22., 24., 23.],
[24., 26., 25.],
[26., 28., 27.],
[28., 30., 29.],
[30., 32., 31.],
[32., 34., 33.],
[34., 36., 35.],
[36., 38., 37.],
[38., 40., 39.],
[40., 42., 41.],
[42., 44., 43.],
[44., 46., 45.],
[46., 48., 47.],
[48., 50., 49.],
[50., 52., 51.],
[52., 54., 53.],
[54., 56., 55.],
[56., 58., 57.],
[58., 60., 59.],
[60., 62., 61.],
[62., 64., 63.],
[64., 66., 65.],
[66., 68., 67.],
[68., 70., 69.],
[70., 72., 71.]]),
'Z': array([[ 104.087 , 114. , 109.043 ],
[ 94.1739 , 104.087 , 99.1304 ],
[ 84.2609 , 94.1739 , 89.2174 ],
[ 74.3478 , 84.2609 , 79.3043 ],
[ 64.4348 , 74.3478 , 69.3913 ],
[ 54.5217 , 64.4348 , 59.4783 ],
[ 44.6087 , 54.5217 , 49.5652 ],
[ 34.6957 , 44.6087 , 39.6522 ],
[ 24.7826 , 34.6957 , 29.7391 ],
[ 14.8696 , 24.7826 , 19.8261 ],
[ 4.95652, 14.8696 , 9.91304],
[ -4.95652, 4.95652, 0. ],
[ -14.8696 , -4.95652, -9.91304],
[ -24.7826 , -14.8696 , -19.8261 ],
[ -34.6957 , -24.7826 , -29.7391 ],
[ -44.6087 , -34.6957 , -39.6522 ],
[ -54.5217 , -44.6087 , -49.5652 ],
[ -64.4348 , -54.5217 , -59.4783 ],
[ -74.3478 , -64.4348 , -69.3913 ],
[ -84.2609 , -74.3478 , -79.3043 ],
[ -94.1739 , -84.2609 , -89.2174 ],
[-104.087 , -94.1739 , -99.1304 ],
[-114. , -104.087 , -109.043 ]])}


Is this a feature or a bug?

Thank you!

Cheerio!
- Simppa -

Re: Reversed order for z in: det myDet1 n dtl mySurf1 dn 1 10 20 20 0.0 72.0 36 -11 11 23

Posted: Fri Aug 21, 2020 10:58 am
by Ana Jambrina
For cylindrical mesh detector, for z-direction, it is set to be that way: from zmax to zmin.

Re: Reversed order for z in: det myDet1 n dtl mySurf1 dn 1 10 20 20 0.0 72.0 36 -11 11 23

Posted: Fri Aug 21, 2020 11:23 am
by sjjamsa
Yes, I can see Serpent saves the grid as it does. The question is rather: should it ?

For example, it confuses SerpentTools: The R,Z plot it creates is vertically displaced.

Re: Reversed order for z in: det myDet1 n dtl mySurf1 dn 1 10 20 20 0.0 72.0 36 -11 11 23

Posted: Fri Aug 21, 2020 11:34 am
by Ana Jambrina
How serpentTools processes Serpent outputs, probably is a question for serpentTools team.
(In general, you do not modify the code based on a post-processing tool; it is the other way around).

Re: Reversed order for z in: det myDet1 n dtl mySurf1 dn 1 10 20 20 0.0 72.0 36 -11 11 23

Posted: Fri Aug 21, 2020 12:49 pm
by sjjamsa
How serpentTools processes Serpent outputs, probably is a question for serpentTools team.
Yes, however, that is not the question. I'm discussing the interface serpent has to any post-processing system one wishes to use. SerpentTools was just an example.

Regardless of the post-processing system used, it is curious that one coordinate axis is presented differently from the others and needs special attention every time it is used! Thus, this is no way specific to SerpentTools.
(In general, you do not modify the code based on a post-processing tool; it is the other way around).
I disagree. These should be developed together for the best results. One should consider the interface of the software for all users of the interface.

Re: Reversed order for z in: det myDet1 n dtl mySurf1 dn 1 10 20 20 0.0 72.0 36 -11 11 23

Posted: Thu Sep 03, 2020 8:28 am
by Jaakko Leppänen
It is what it is.

Re: Reversed order for z in: det myDet1 n dtl mySurf1 dn 1 10 20 20 0.0 72.0 36 -11 11 23

Posted: Thu Sep 03, 2020 9:00 am
by sjjamsa
Keeping interfaces constant is a virtue as well :-)

And now since it is "documented" to stay the way it is, I can work around it in e.g. SerpentTools.

Thank you for the clarification.

Best regards,
- Simppa -