Page 1 of 1

### Discontinuity Factor Calculation

Posted: Thu Mar 10, 2016 1:40 am
Hello,

I've been experimenting with the "set adf" capabilities in Serpent2. I was attempting to extract ADFs from a 3x3 assembly problem and noticed that the discontinuity factor calculated in Serpent is not equal to the ratio of the heterogeneous surface flux to the homogeneous surface flux printed from Serpent. See the following:

Code: Select all

``````DF_SURFACE                (idx, [1:  4])  = '2000' ;
DF_SYM                    (idx, 1)        = 0 ;
DF_N_SURF                 (idx, 1)        = 4 ;
DF_N_CORN                 (idx, 1)        = 4 ;
DF_VOLUME                 (idx, 1)        =  1.03226E+02 ;
DF_SURF_AREA              (idx, 1)        =  1.01600E+01 ;
DF_MID_AREA               (idx, 1)        =  1.01600E+00 ;
DF_CORN_AREA              (idx, 1)        =  1.01600E+00 ;
DF_SURF_IN_CURR           (idx, [1: 112]) = [  1.19446E-01 0.00115  8.36708E-02 0.00048  2.51228E-02 0.00189  ];
DF_SURF_OUT_CURR          (idx, [1: 112]) = [  1.19446E-01 0.00115  8.36708E-02 0.00048  2.51228E-02 0.00189  ];
DF_SURF_NET_CURR          (idx, [1: 112]) = [  0.00000E+00 0.0E+00  0.00000E+00 0.0E+00  0.00000E+00 0.0E+00  ];
DF_MID_IN_CURR            (idx, [1: 112]) = [  1.19266E-02 0.00242  8.36191E-03 0.00164  2.51793E-03 0.00468  ];
DF_MID_OUT_CURR           (idx, [1: 112]) = [  1.19266E-02 0.00242  8.36191E-03 0.00164  2.51793E-03 0.00468  ];
DF_MID_NET_CURR           (idx, [1: 112]) = [  0.00000E+00 0.0E+00  0.00000E+00 0.0E+00  0.00000E+00 0.0E+00  ];
DF_CORN_IN_CURR           (idx, [1: 112]) = [  1.18836E-02 0.00209  8.38126E-03 0.00273  2.51155E-03 0.00768  ];
DF_CORN_OUT_CURR          (idx, [1: 112]) = [  1.18836E-02 0.00209  8.38126E-03 0.00273  2.51155E-03 0.00768  ];
DF_CORN_NET_CURR          (idx, [1: 112]) = [  0.00000E+00 0.0E+00  0.00000E+00 0.0E+00  0.00000E+00 0.0E+00  ];
DF_HET_VOL_FLUX           (idx, [1:  28]) = [  4.70044E-02 0.00070  3.29212E-02 0.00066  9.90222E-03 0.00070  ];
DF_HET_SURF_FLUX          (idx, [1: 112]) = [  4.70014E-02 0.00131  3.29527E-02 0.00075  9.86727E-03 0.00271  ];
DF_HET_CORN_FLUX          (idx, [1: 112]) = [  4.66334E-02 0.00412  3.28975E-02 0.00487  9.88944E-03 0.00902  ];
DF_HOM_VOL_FLUX           (idx, [1:  28]) = [  0.00000E+00 0.0E+00  0.00000E+00 0.0E+00  0.00000E+00 0.0E+00  ];
DF_HOM_SURF_FLUX          (idx, [1: 112]) = [  1.69258E-02 0.41398  1.18163E-02 0.41460  3.53995E-03 0.41424  ];
DF_HOM_CORN_FLUX          (idx, [1: 112]) = [  1.69431E-02 0.41336  1.18480E-02 0.41321  3.54588E-03 0.41278  ];
DF_SURF_DF                (idx, [1: 112]) = [  1.10469E+00 0.00555  1.10462E+00 0.00980  1.11104E+00 0.01159  ];
DF_CORN_DF                (idx, [1: 112]) = [  1.09743E+00 0.00314  1.10292E+00 0.00796  1.13574E+00 0.00484  ];``````
This is for the top left assembly in the 3x3 array. The center assembly is different from the other 8 assemblies and has a graphite block in it.

Originally, I found that all of the heterogeneous values were the same for each assembly. When I scanned the source code, it seems that Serpent calculates the heterogeneous currents and surface fluxes by using the absolute position of the given surface, and not it's translated location (i.e. when filled into a lattice for example). To correct this, I created an additional surface that encompasses the region I want the ADFs for. However, I am confused because in the source I also found this:

Code: Select all

``````/* Homogeneous surface flux */

ptr = RDB[gcu + GCU_RES_FG_DF_HOM_SURF_FLUX];
CheckPointer(FUNCTION_NAME, "(ptr)", DATA_ARRAY, ptr);
flx = BufVal(ptr, m, i);

/* Heterogeneous surface flux */

ptr = RDB[gcu + GCU_RES_FG_DF_HET_SURF_FLUX];
CheckPointer(FUNCTION_NAME, "(ptr)", DATA_ARRAY, ptr);
val = BufVal(ptr, m, i)/ds[m];

/* Discontinuity factor */

if (flx > 0.0)
{
ptr = RDB[gcu + GCU_RES_FG_DF_SURF_DF];
CheckPointer(FUNCTION_NAME, "(ptr)", DATA_ARRAY, ptr);
}``````
Therefore, I would expect that the ratio of the two surface fluxes would equal the discontinuity factor. But this is not what I see in the output file. Any help is greatly appreciated!

Thanks,
Andrew

### Re: Discontinuity Factor Calculation

Posted: Thu Mar 10, 2016 11:08 am
The surface listed in the ADF card is taken as super-imposed over the geometry, meaning that its coordinates are relative to universe 0. So basically you need to define a separate ADF surface and position it correctly, even though there was a similar physical surface as part of the geometry.

I compared the flux ratio with the ADF's in a simple test case and the values seem to match. Did you get any warnings about negative values in the homogeneous flux solution? The statistical errors in your results are very large and I think this mismatch may be somehow related to the failure of the flux solver (for example, the failed result is written in the flux result but discarded from the ADF).

### Re: Discontinuity Factor Calculation

Posted: Thu Mar 10, 2016 7:18 pm
Jaakko,

Ok, thank you for confirming the surface is super-imposed over the geometry. This is what I thought. And yes, I did receive warnings about negative values in the homogeneous flux solution. There are other regions where the values do match, it just happened that this region did not. I'm assuming I just need to increase my statistics and hopefully that should help with the convergence.

On a related note, I saw in the source that you might be looking at using the other following geometries for the ADF calculation:

Code: Select all

``````    case SURF_CUBE:
case SURF_CUBOID:
case SURF_HEXXPRISM:
case SURF_HEXYPRISM:``````
We are extremely interested in using the cube or cuboid geometry for the ADF calculation. I'm curious if this is something you've experimented with already? We're looking at extending the 3x3 assembly problem to add 9 layers making it a 3x3x9 problem. The cuboid would allow us to look at specific sections of that problem whereas the square prism would contain information for all of the 9 layers combined. Is this something that could easily be done?

Thanks,
Andrew

### Re: Discontinuity Factor Calculation

Posted: Thu Mar 10, 2016 8:18 pm
I added the rectangular prism this week, which required some of the same modifications as extending the methodology to 3D surfaces. We should be able to start implementing cubes and cuboids soon, but I cannot tell beforehand how much work that will take.

### Re: Discontinuity Factor Calculation

Posted: Fri Mar 11, 2016 1:47 pm
To be precise, it is extending the homogeneous diffusion flux solver to 3D that takes time. I could do an intermediate update with the capability to calculate 3D ADF's when all boundary conditions are reflective. Would that help at all?

### Re: Discontinuity Factor Calculation

Posted: Fri Mar 11, 2016 6:44 pm
Jaakko,

I believe that would be helpful. What we're really after are the heterogeneous currents and fluxes on the 6 surfaces of the cube/cuboid. We would be able to produce our own homogeneous solutions for non-reflective boundary conditions. So as long as the heterogeneous currents and surface flux values printed in the ADF block are correct, that would be a huge help!

Thanks,
Andrew