How do I create an SDEF card for lattice geometry?

  • #1
Alexander Camargo
34
10
TL;DR Summary
Configure sdef card for lattice cell
I would like some help to configure the SDEF card for a lattice cell.
I am configuring it but I am getting the error "fatal error. Cell 889 in SDEF CEL path not at lev=0"
I have tried several configurations but I am not having any success, please help me. I want to set cell 132 as my source


Code:
INPUT
c complex lattice 
888  0 -401 302 -403 304 -405 306 fill=999 imp:p=1 imp:e=1
889  0 -301 302 -303 304 -305 306 lat=1 u=999 imp:p=1 imp:e=1
              fill=0:253 0:126 0:221
     222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 
................
................
222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222 222
222 
1 -0.001205 -301 302 -303 304 -305 306 u=222 imp:p=1 imp:e=1  $Air
1 like 222 but mat=35 rho=-1.030 u=1 imp:p=1 imp:e=1 $ Adrenal_left
2 like 222 but mat=35 rho=-1.030 u=2 imp:p=1 imp:e=1 $ Adrenal_right
.......
......
132 like 222 but mat=32 rho=-1.040 u=132 imp:p=1 imp:e=1 $ Thyroid
886 46 -0.0012 -6000 #888 #1002 imp:p=1 imp:e=1

c -------size of latice------------
301 px 0.2137000
302 px 0
303 py 0.2137000
304 py 0
305 pz 0.8
306 pz 0
c --------Size of the array------------
401 px 54.2798
403 py 27.1399
405 pz 177.6
990 py 0.0 
c universe
6000 rcc 0 0 -101 0 0 1000 3501

sdef CEL=d1 PAR=2 ERG=1 pos=0 0 0
si1 L (132<222<889)
sp1 1
 
Last edited by a moderator:
Engineering news on Phys.org
  • #2
Do you have over seven million "222"s in your input file? There are probably better ways to structure the problem but in the short term can I introduce you to "222 7161275r"? With this being a medical simulation I'm not sure where this is going and the input fragment is a bit too broken to run but I think I see some issues...

You are using LIKE n BUT, where n seems to be a universe, and I think it should be cell.

The main problem I think is that 0 0 0, the source position is on the edge (actually a corner) of a cell. To know where a particle starts a test 0 > 0 would fail, but 0 < 0 would also fail. This can lead to weird behavior. As a rule, never place a point source on the edge of a cell.

Best of luck, let us know if that helps!
 
  • #3
Do I need to put the pos inside the cell of interest? Because the cell I want to make the source is well above the position 0 0 0, but mcnp understands by the exclusion method that I only want the voxels of cell 132?

I'm very confused with this configuration, I set the pos to 0.001 0.001 0.001 and now I get the error "input 1 in SI 4 for independent variable cel at last sampled position 0.00000E+00 0.00000E+00 0.00000E+00 seems incorrect."

I changed the multiples 222 to 222 7161275r and that shortened the input a lot, thanks. But the source error still remains. Am I making a mistake in SI? in sp? Do I have to set xyz to the size of the lattice?

1733834487372.png
 
  • #4
This is so far from what I know it could be genius or madness or nonsense and I cannot tell.

Why a 'lattice source', why not a volume source and why is CEL=888 not good enough? There are histogram distributions of cell numbers fed into position coordinates. There is a hierarchical cell specification normally used for tallies in an SI card. Has any of this been shown to function correctly?

I guessed from the first fragment you are implementing a voxel model but I don't see how this fits. Why would every voxel need it's own source? I think I need some background about what this is and why this approach.
 
Back
Top