Page 1 of 2

### Cuboidal Lattice (type 11) Syntax

Posted: Wed Jun 14, 2017 12:14 am
Hello,

I'm trying to make a 3x3x3 cuboidal lattice (type 11).

I'm using the syntax

Code: Select all

``````lat 10 11 0 0 0 3 3 3 35 35 35
1
2
1
2
1
2
1
2
1
``````
But I get an error "invalid number of lattice elements".

Any suggestions?

### Re: Cuboidal Lattice (type 11) Syntax

Posted: Wed Jun 14, 2017 10:11 am
You are creating a 3x3x3 lattice, so the expected number of entries is 27.

### Re: Cuboidal Lattice (type 11) Syntax

Posted: Wed Jun 14, 2017 8:09 pm
Haha! I'm an idiot!

### Re: Cuboidal Lattice (type 11) Syntax

Posted: Wed Jun 14, 2017 9:50 pm
Okay, I think I've got the ordering. Can you confirm the following?

is it:

Given a 3x3x3 lattice of pitch 10.

Looking along the positive Z axis the (XY plane)

We can take three slices as follows:

slice 1 @ z=-5
07 08 09
04 05 06
01 02 03

slice 2 @ z=0
16 17 18
13 14 15
10 11 12

slice 3 @ z=5
25 26 27
22 23 24
19 20 21

Where the number corresponds the line number relative to the LAT card?

### Re: Cuboidal Lattice (type 11) Syntax

Posted: Wed Jun 14, 2017 10:28 pm
Okay, here's a python script I wrote to figure out the line number from the cell index.

Code: Select all

``````#CellNumber to Line Number
import math

xCells = 3
yCells = 3
zCells = 3

#a layer is collection of cells on the XY plane
layerCells = xCells*yCells

#a line is a colelction of cells along the X axis.
lineCells = xCells

#start counting at 0,0,0
cell = (2,2,2)

xPos = cell[0]
yPos = cell[1]
zPos = cell[2]

#counting from bototm
zOffset = (zPos)*layerCells + 1
yOffset = yPos*lineCells
xOffset = xPos

#line 1 is the one immediatly after the lat card.
line = zOffset + yOffset + xOffset
print(line)
``````

### Re: Cuboidal Lattice (type 11) Syntax

Posted: Wed Jul 03, 2019 2:02 pm
Hi all,
I'm trying to create cuboidal lattice(type11) with element numbers 128x128x243 and getting this error. What does it mean?

### Re: Cuboidal Lattice (type 11) Syntax

Posted: Wed Jul 03, 2019 5:47 pm
Found my answer. I can write 128x128 lattice with latice type 1 but can't create 128x128x1 lattice with lattice type 11. Program said that the number must be between 1 and 100 (for lattice type 11) . That's a restrictive limitation.

### Re: Cuboidal Lattice (type 11) Syntax

Posted: Thu Jul 04, 2019 11:11 am
Hi,

the sanity check limits for the lattice size seem to be quite small. See this earlier post on how to increase it.

Basically, you'll have to modify the input value checks at lines 3851-3861 of readinput.c:

Code: Select all

``````              /* Lattice size */

nx = (long)TestParam(pname, fname, line, params[j++], PTYPE_INT,
1, 100);

ny = (long)TestParam(pname, fname, line, params[j++], PTYPE_INT,
1, 100);

nz = (long)TestParam(pname, fname, line, params[j++], PTYPE_INT,
1, 100);
``````
Also, your 128x128x243 lattice will exceed the default limit on lattice items so you'll also need to modify line 148 in header.h:

Code: Select all

``#define MAX_LATTICE_ITEMS        100000``
-Ville

### Re: Cuboidal Lattice (type 11) Syntax

Posted: Sat Jul 06, 2019 5:08 pm
Thank you Ville.

### Re: Cuboidal Lattice (type 11) Syntax

Posted: Mon Aug 12, 2019 9:49 pm
I tried the new version of serpent sss2.1.31 to my previous input file but with the new version I got this error:

Input error in parameter "lat" on line 6724 in file "Input.i":

Invalid value "11", must be between 1 and 9

Does the new version have different definition of the lattice type or any suggestion?