So I’m trying to use OpenMC to quantify various forms of error in a calculation I’m doing with another code. To that end I am trying to run it in multigroup mode to quantify the error introduced by that approximation while still avoiding spatial/angular discretization errors.
I can get multigroup mode running for OpenMC just fine, but when I try to run the calculation it is prohibitively slow. For instance, with the input files I am including, running on 32 processors the continuous energy records a simulation rate of 220187 particles/second, and in fact gets as high as 1.31723e+06 particles/second when I turn up the number of particles started. These are very respectable speeds and ones which I can work with. However, when I try to run the MG calculation, the simulation rate is LESS than 5 particles/second. This is clearly prohibitively slow for any real use. It does not seem clear to me why MG calculations should be slower than CE, in fact I would expect the opposite (and particularly not THIS much slower).
So I want to know, am I doing something wrong in these inputs? Is there something I’m doing here that is making OpenMC act super slow in the MG calculation? Or is it simply a case that OpenMC is slow for multigroup calculations? I will mention that the inputs I’m attaching are not the actual problem I’m interested in, but they are similarish and also exhibit the problematic behavior.
The problem is that your energy group structure seems to have been with the intention of MeV units, but you’ve actually set the cutoff to 20 eV rather than 20 MeV. If you change this, it seems to run just fine.
I’ve opened up a pull request to create a helpful error message for anyone who faces this in the future.
Oh wow. Yep that’s exactly what’s going wrong! I think I did this because I was also trying MCNP and it measures everything in MeV and forgot to convert back for my XS here. Thanks so much Gavin!
Ok one last quick question @gridley, am I ordering my energy groups correctly for this?
As you can see I’m using the continuous Watt spectrum for the source energy (which is supposed to represent some spontaneous fission, which I believe should work fine for MG mode since it just generates source in the MG bins I think), however I am concerned that potentially my group structure should be reverse ordered.
I am ordering it from 0 to the maximum since that’s how it’s demonstrated in the OpenMC MG examples, however all the OpenMC MG examples are k-eigenvalue problems so the energy group structure is arbitrary, but for a fixed source problem it’s not and the structure order does matter since the source is the Watt spectrum.
Ah yeah, I get that concern. You should just be listing the energy bin boundaries in increasing order, and, correspondingly, listing the cross sections in the same order that the bin boundaries progress in. Should be pretty clear if the setup is wrong, since everything would be born thermal. There would be zero agreement with the CE results, then.