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

MCNP cell: fill -1:1 acceptable as fill = -1:1 #50

Open
gvozdila opened this issue Apr 17, 2020 · 4 comments
Open

MCNP cell: fill -1:1 acceptable as fill = -1:1 #50

gvozdila opened this issue Apr 17, 2020 · 4 comments

Comments

@gvozdila
Copy link

Now cell string :
fill -1:1

makes an error like this:

File "/home/krom/.local/lib/python3.6/site-packages/csg2csg/MCNPCellCard.py", line 191, in __get_keyword_value
result = regex.search(string)[0]
TypeError: 'NoneType' object is not subscriptable

fill = -1:1 - is ok.
But MCNP accept any fill sting, fill -1:1 as acceptable as fill = -1:1

@gvozdila
Copy link
Author

Thank you for you work!

@makeclean
Copy link
Owner

Thanks for the issue @gvozdila, I've put very little effort into lattices so this may well fit into that category - I will work on a fix. Do you have an example input that you could share?

@py1sl
Copy link
Collaborator

py1sl commented Apr 17, 2020

i'll add this as a case for the refactoring of cell keyword handling i have been planning to do to fix #38 and related issues, but feel free to add a fix in the meantime

@gvozdila
Copy link
Author

It could be an example of square lattice in 2 directions.

c lattice example
1 1 1.1111 -10 u=1 imp:n=1 $ u1 for lattice
2 2 2.2222 -10 u=2 imp:n=1 $ u2 for lattice
3 0 -1 2 -3 4 u=3 imp:n=1 fill -1:1 -1:1 1 2 1 1 2 1 1 2 1 $ lattice cell filled with u=1 and u=2
4 0 -21 22 -23 24 -30 40 u=0 fill=3 imp:n=1
5 0 21:-22:23:-24:30:-40 u=0 imp:n=0 $ void

10 cz 20 $ big cylinder, it is surely bigger than lattice cell, so no unfilled space left
1 px 2.5 $ lattice cell boundary
2 px -2.5 $ lattice cell boundary
3 py 2.5 $ lattice cell boundary
4 py -2.5 $ lattice cell boundary
21 px 7.5 $ lattice boundary
22 px -7.5 $ lattice boundary
23 py 7.5 $ lattice boundary
24 py -7.5 $ lattice boundary
30 pz 10
40 pz -10

m1 1001 0.6 8016 0.3 92235 0.1
m2 5010 0.1 5011 0.2

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

No branches or pull requests

3 participants