Page 1 of 1

dumsh problems with Serpent 2.1.30

Posted: Thu Dec 20, 2018 7:38 pm
by FrancescoDiLecce
Hello,
I am trying to construct an unstructured mesh detector (dumsh) with Serpent version 2.1.30.
dumsh has as parameter an unstructured mesh-based geometry universe created with solid 1.
The error message visualized is the following:

Code: Select all

Input error in parameter "det" on line 1 in file "nheatinggratot.inp":

Invalid cell index 1
where nheatinggratot.inp file is

Code: Select all

det umeshnheatingreftot dr -4 log_graphite dm log_graphite
dumsh uSolid 407983
 1               1
 2               2
 3               3
 4               4
 5               5
 6               6
...
Running the same input file with serpent version 2.1.29 no error comes out and the script is well coded.

Re: dumsh problems with Serpent 2.1.30

Posted: Wed Jan 02, 2019 1:07 pm
by Ville Valtavirta
Hi Francesco,

the processing of unstructured mesh based geometries and interfaces was revised for 2.1.30 and the detector was broken during that process.

The fix is rather simple, you'll need to edit the processumshgeometry.c file around line 147 to add some lines before

Code: Select all

      /* Check if interface based umsh */

      if((long)RDB[umsh + UMSH_PTR_FNAME] > 0)
        {
          /* Other things for these will be processed in processtetmesh.c */

          umsh = NextItem(umsh);

          continue;
        }
to get

Code: Select all

      /* Copy number of original cells */

      if ((long)RDB[loc0 + IFC_NC_PARENTS] > 0)
        WDB[umsh + UMSH_N_ORIG_CELLS] = RDB[loc0 + IFC_NC_PARENTS];
      else
        WDB[umsh + UMSH_N_ORIG_CELLS] = RDB[loc0 + IFC_NC];

      /* Check if interface based umsh */

      if((long)RDB[umsh + UMSH_PTR_FNAME] > 0)
        {
          /* Other things for these will be processed in processtetmesh.c */

          umsh = NextItem(umsh);

          continue;
        }
This will allow Serpent to use the correct number of original mesh cells in checking the indices for the "dumsh" bins.

-Ville