Fatal error PutText Empty String

Report any suspected bugs and unexpected behavior here
Post Reply
nemoeon
Posts: 6
Joined: Wed May 05, 2021 12:15 pm
Security question 1: No
Security question 2: 7

Fatal error PutText Empty String

Post by nemoeon » Mon May 17, 2021 1:20 pm

Hello everyone,

I'm trying to import an unstructured mesh from Open FOAM using the command solid 3 with its associated files fuel.ifc and the linked OF files owners, points, faces, neighbour and materials. This geometry is a fuel pin divided in several parts which all have different material compositions.

When I'm running serpent, the mesh generation seems to work fine and then the message "Fatal error in function PutText: Empty string Simulation aborted." appears. The only post that talk of this error is here : viewtopic.php?f=25&t=1942&p=4683&hilit=puttext#p4683 but I didn't find out what was my problem.

Does anyone know what I should do ?

Here is the input file:

Code: Select all

%%%%% MULTIPHYSICS INTERFACE FILE %%%%%
% --- Create geometry from OF mesh and create universe 1 with the materials given in polymesh 
solid 3
"./fuel.ifc"

%%%%% SURFACES %%%%%
surf 1 	cuboid 0 0.748 0 0.748 0 0.1
surf 2 	inf
surf 3 	cyl 0 0 0.5148 0 0.1

%%%%% CELLS  %%%%%
cell 	w 		2	water		3	-2
cell 	gap 		2	gapgas		    	-3
cell 	msh  	0 	fill 			1   	-1
cell 	out 		0	outside 		1

%%%%%% BOUNDARY CONDITIONS %%%%%
set bc 2 2 3

%%%%% MATERIALS %%%%%
include materials

set power 5
set pop 50000 300 50

The materials file which is included in the input file (initially all fuel materials have the same composition):

Code: Select all

% --- Water 
 mat water -0.6604292670741628 tmp 600 %moder lwtr 1001 rgb 0 0 255
8016.06c       -0.888515712289727
1001.06c       -0.11106446403621588
5010.06c       -8.354491113732231e-05
5011.06c       -0.0003362787629195737


% --- Gap gas : Helium 
mat gapgas -1E-4 rgb 255 255 255
 2004.06c     1.0
 


% --- Cladding material Zircaloy-4
%     [Composition from PNNL-15870, Rev. 1]

mat cladding -6.55000E+00 rgb 150 150 150
 8016.06c  -1.19276E-06
24050.06c  -4.16117E-05
24052.06c  -8.34483E-04
24053.06c  -9.64457E-05
24054.06c  -2.44600E-05
26054.06c  -1.12572E-04
26056.06c  -1.83252E-06
26057.06c  -4.30778E-05
26058.06c  -5.83334E-06
40090.06c  -4.97862E-01
40091.06c  -1.09780E-01
40092.06c  -1.69646E-01
40094.06c  -1.75665E-01
40096.06c  -2.89068E-02
50112.06c  -1.27604E-04
50114.06c  -8.83732E-05
50115.06c  -4.59255E-05
50116.06c  -1.98105E-06
50117.06c  -1.05543E-06
50118.06c  -3.35688E-06
50119.06c  -1.20069E-06
50120.06c  -4.59220E-06
50122.06c  -6.63497E-04
50124.06c  -8.43355E-04


% --- Fuel : 3.0 wt-% enriched UO2
mat fuel_1 -10.4215 rgb 255 0 0 %burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_2 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_3 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_4 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_5 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_6 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_7 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_8 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_9 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_10 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_11 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_12 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_13 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_14 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_15 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_16 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_17 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_18 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_19 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22

mat fuel_20 -10.4215 rgb 255 255 150 burn 1 
92235.09c       7.06071945996411e+20
92238.09c       2.254128110370425e+22
 8016.09c       4.649470609940133e+22


And here is the fuel.ifc file

Code: Select all

9 1 2 
1 ./ifc/Q
-10.4215 900.0
10 1 50 
./coupling/points
./coupling/faces
./coupling/owner
./coupling/neighbour
./coupling/materials
-1
./ifc/T 1
-1

Finally an extract of the log command sss2:

Code: Select all

Begin calculation on Mon May 17 11:13:32 2021

Reading input file "sss_coupled"...
Reading multi-physics interface "./fuel.ifc"...
Composition of mesh:
Tetrahedrons:      0
Pyramids:          0
Prisms:            50
Hexahedrons:       1200
Other polyhedrons: 0

Checking initial mesh:

 - Checked neighbority for 5075 surfaces:
   0 fails due to face not in owner cells face list.
   0 fails due to side of face not being -1 for owner cell.
   0 fails due to face not in neighbor cells face list.
   0 fails due to side of face not being +1 for neighbor cell.
 - Checked that barycenter is inside cell for 1250 cells, 0 failed


Dividing simple mesh to tetrahedrons.
Checking divided mesh.

Reading input file "materials"...

Checking duplicate input definitions...
OK.

Reading unstructured mesh based geometries...
OK.

Processing unstructured mesh based geometries:
OK.

Creating geometry...
OK.

Counting geometry zones...

The geometry consists of 3 levels:

Level 0 size: max 2 zones
Level 1 size: max 7350 zones
Level 2 size: max 2 zones

Processing cells...
OK.

Linking materials to geometry...
OK.

Counting cells...
OK.

Processing data for group constant generation:

 - 70 energy groups in micro-group structure
 - 2 energy groups in macro-group structure
 - B1 fundamental mode calculation is not run
 - Group constants generated in 1 universes
 - Discontinuity factors are not calculated
 - Pin-power distributions are not calculated
 - Albedos are not calculated
 - Poison cross sections are not calculated

Processing multi-physics interfaces...

Creating search mesh for interface ./fuel.ifc:

  10% complete
  20% complete
  30% complete
  40% complete
  50% complete
  60% complete
  70% complete
  80% complete
  90% complete
 100% complete

Processing densities for interface ./fuel.ifc...

OpenFOAM mesh based interface "./fuel.ifc":

 - Dimensions: x = [-0.0, 0.5]; y = [0.0, 0.5]; z = [0.0, 0.1]
 - Initial number of cells: 1250
 - Divided into a number of child cells: 7350
 - Using mat-card material densities:
      fuel_1 --- 1.0421E+01 g/cm3
      fuel_2 --- 1.0421E+01 g/cm3
      fuel_3 --- 1.0421E+01 g/cm3
      fuel_4 --- 1.0421E+01 g/cm3
      fuel_5 --- 1.0421E+01 g/cm3
      fuel_6 --- 1.0421E+01 g/cm3
      fuel_7 --- 1.0421E+01 g/cm3
      fuel_8 --- 1.0421E+01 g/cm3
      fuel_9 --- 1.0421E+01 g/cm3
     fuel_10 --- 1.0421E+01 g/cm3
     fuel_11 --- 1.0421E+01 g/cm3
     fuel_12 --- 1.0421E+01 g/cm3
     fuel_13 --- 1.0421E+01 g/cm3
     fuel_14 --- 1.0421E+01 g/cm3
     fuel_15 --- 1.0421E+01 g/cm3
     fuel_16 --- 1.0421E+01 g/cm3
     fuel_17 --- 1.0421E+01 g/cm3
     fuel_18 --- 1.0421E+01 g/cm3
     fuel_19 --- 1.0421E+01 g/cm3
     fuel_20 --- 1.0421E+01 g/cm3
    cladding --- 6.5500E+00 g/cm3
 - Density factors between 1.0000 and 1.0000.
 - Possibly multiple materials in interface

***** Mon May 17 11:13:32 2021:

 - MPI task         = 0
 - OpenMP thread    = 0
 - RNG parent seed  = 1621242812556

Fatal error in function PutText:

Empty string

Simulation aborted.
Thanks in advance ;)
Noe P
LRS - EPFL - Switzerland

Ana Jambrina
Posts: 545
Joined: Tue May 26, 2020 5:32 pm
Security question 1: No
Security question 2: 7

Re: Fatal error PutText Empty String

Post by Ana Jambrina » Mon May 17, 2021 1:52 pm

Are you running Serpent 2.1.31? There is a bug in processinterface.c related with the file name within the interface (already fixed in the latest release version 2.1.32).
This can be addressed by changing (in Serpent 2.1.31) lines 152-156 and lines 194-198 of 'processinterface.c' from:

Code: Select all

          end = strlen(tmpstr)-1;

          for (i = strlen(tmpstr)-1; i > beg; i--)
            if (tmpstr[i] == '.')
              end = i;
to

Code: Select all

          end = strlen(tmpstr);

          for (i = end - 1; i > beg; i--)
            if (tmpstr[i] == '.')
              end = i;
Note: these modifications can be avoided by changing the file name 'Q' in the interface file ‘fuel.ifc’ to something else (longer than a single character).
- Ana

nemoeon
Posts: 6
Joined: Wed May 05, 2021 12:15 pm
Security question 1: No
Security question 2: 7

Re: Fatal error PutText Empty String

Post by nemoeon » Tue May 18, 2021 11:40 am

Thanks Ana for your quick answer !

Indeed, I work on Serpent 2.1.31. I've tried your fix and it didn't work and I still have the issue. Anyway your note is the best way to solve the problem. I've just changed the name of Q and now it runs.
Noe P
LRS - EPFL - Switzerland

Ana Jambrina
Posts: 545
Joined: Tue May 26, 2020 5:32 pm
Security question 1: No
Security question 2: 7

Re: Fatal error PutText Empty String

Post by Ana Jambrina » Tue May 18, 2021 12:00 pm

I tested myself in Serpent 2.1.31 and it does work. Did you do the change twice? The same block of lines needs to be changed between lines 152-156 and 194-198 (recompiling the source after the changes).
- Ana

nemoeon
Posts: 6
Joined: Wed May 05, 2021 12:15 pm
Security question 1: No
Security question 2: 7

Re: Fatal error PutText Empty String

Post by nemoeon » Tue May 18, 2021 12:48 pm

Right, my mistake, I've forgot to change the "-1"
I've tried another time and now it works.

Thanks again :D
Noe P
LRS - EPFL - Switzerland

Post Reply