Some Modeling Problems using OpenMC x OpenMOC

172 views
Skip to first unread message

Casimiro Rino Kuswanto

unread,
Mar 24, 2021, 3:55:46 AM3/24/21
to OpenMOC Users Group
Hello,
My name is Rino.

Currently, I'm trying to model the Research Reactor TRIGA Mark II using OpenMOC.
But, since I couldn't input the multi-group cross-section (mgxs) data for the reactor using OpenMOC, I have followed 
to make the modeling and do the simulation.

I have some questions and problems while doing this.
1. Is it possible to run the simulation using OpenMOC if the outermost part of the reactor's geometry is not square? In my case, the outermost part is a circle (zcylinder).
I've tried to model it by following 
to get the geometry that I want. But, it always errors when it's time to solve using OpenMOC CPUSolver.

2. To solve the first problem, I've tried to make the (xmin, xmax, ymin, ymax) at the outermost part of the geometry. And the next problem is, what should I do about the area between the circle and the xy-plane? Because, when I try to do the CPUSolver, it was an error too because there is no material in it.

3. How to fill or make the 'air' or 'vacuum' material? Because sometimes it is needed to fill the 'air follower control rod'.

4. In my previous conversation, I've asked why there is a big difference between the OpenMC and OpenMOC results. But I still wonder why. Previously, I made the mgxs type in order like this: 
mgxs_lib.mgxs_types = ['total', 'nu-fission', 'fission', 'scatter matrix', 'chi'];
and the results: OpenMC = about 1. ; OpenMOC = about 0.05.
When I changed the 'total' type to 'nu-transport', 
mgxs_lib.mgxs_types = ['nu-transport', 'nu-fission', 'fission', 'nu-scatter matrix', 'chi'];
the result of OpenMOC was raised up (about 0.6), but still not close to OpenMC result.
I just wonder why this could happen?

5. I still confused why I get the big different results on OpenMOC when I made the different energy groups (in OpenMC). 
When I used two groups only, let's say
groups.group_edges = np.array([0., 0.625, 20.0e6]),
I got the OpenMOC CPUSolver result = about 1.003.
But, when I changed using four group, let's say
group.group_edges = np.array([0.005, 0.625, 15.96, 5530, 1e7]),
I got the OpenMOC CPUSolver result = about 0.6.
And, I've tried too to changed the lowest edge 0.005 to 0., the result was raised up to about 0.9. 
Is there something wrong with my program? How to fix this?


Thank you very much. Sorry for the long questions.

Sincerely,
Rino

Guillaume Giudicelli

unread,
Mar 24, 2021, 4:19:48 PM3/24/21
to OpenMOC Users Group
Hi Rino

I ll try to answer your questions

1) OpenMOC cannot handle non-rectangular boundary conditions currently as the tracks need to be laid down periodically. 
2) You should indeed add a rectangular region around your domain. It's easier if you add it in your openmc model, then transfer it to OpenMOC like before.
3) You can fill a Cell by using the Python API. Locate your OpenMOC cell in geometry.getAllCells() and then use cell.setFill() to add a material fill. 
4) Agreement between OpenMOC and openmc should be within a few percent or lower. The difference between total and transport cross sections has to do with the treatment of scattering. With transport cross sections, the forward scattering is essentially removed from the total cross section. You may want to look at https://www.tandfonline.com/doi/pdf/10.1080/18811248.2008.9711430 to learn more about this. How to model scattering will be very important for the accuracy of your results. 
5) Transport solvers should typically use more groups than 2 or 4. They are very accurate in space, so the discretization in energy should be finer to be consistent. I am not sure what group structure is appropriate for a TRIGA, probably the same as for light water reactors.
Still to explain the differences between 2 and 4 groups, I would look at the spectrum for openmc and see if there is no issue with the lower thermal or the high energy boundaries in your 4 groups structure for example. 

Hope this helps,
Guillaume

Casimiro Rino Kuswanto

unread,
Apr 1, 2021, 6:53:37 AM4/1/21
to OpenMOC Users Group
Hi, Guillaume.

Sorry for the long response.
Thank you in advance for your help. It helps me a lot!

Sincerely,
Rino

Casimiro Rino Kuswanto

unread,
May 3, 2021, 10:47:46 AM5/3/21
to OpenMOC Users Group
Hello all.

I have another question. 

If I ran the simulation for pin-cell from the sample-input, then I got some plots such as flux-fsr-0.png, flux-fsr-1.png, flux-fsr-2.png, and source-regions-z-0.png.
I know that each color from source-regions-z-0.png represents each FSRs.

My question is, how do we match the color and the FSR ID?

Furthermore, I'm still working on my previous project. From the log file, it was stated that I used (for example) 17 FSR. I just wonder that is there any way to plot the flux in averaged mode (plot_energy_fluxes)? (For example, from the previous pin-cell (sample-input), used 3 FSR. How to make so there is only one (averaged) flux-fsr.png file ?)

Thank you very much.

Sincerely,
Rino

Guillaume Giudicelli

unread,
May 3, 2021, 12:33:29 PM5/3/21
to Casimiro Rino Kuswanto, OpenMOC Users Group
Hi Rino

If I remember correctly, there's no link between the FSR ids and the colors used in the plot. 
That could be a cool feature, the code for it is in openmoc/plotter.py if you want to have a look
What do you mean by averaged mode? Do you want a spatial or energy-spectrum plot of the fluxes?

Best,
Guillaume


--
You received this message because you are subscribed to a topic in the Google Groups "OpenMOC Users Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openmoc-users/vy0IiHh1ngk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openmoc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openmoc-users/8d209740-4aae-443d-8566-f3cc573fe70en%40googlegroups.com.

Guillaume Giudicelli

unread,
May 3, 2021, 2:40:03 PM5/3/21
to Casimiro Rino Kuswanto, OpenMOC Users Group
flux-fsr-0.png is the plot for fsr 0.
You are mentioning the cells, not the fsrs. FSRs are numbered arbitrarily, depending on the order they are reached by each thread. So the ordering is not deterministic unless you are running a single thread. Even then, it's difficult to know the order ahead of time, without considering the tracks one by one. 

You can link fsr to cells using geometry.getFSRId(some point). Look at geometry.h geometry.cpp for all the options linking cells and fsrs in the C++, then check in openmoc/ for one that is available in the Python API. 

You can look at plot_spatial_fluxes for your second question.

Best,
Guillaume

Le lun. 3 mai 2021 à 11:50, Casimiro Rino Kuswanto <rinoa...@gmail.com> a écrit :
Hi Guillaume,

Thanks for your reply.

Sorry, for the previous question, I mean that how do we know which FSR is plotted as the flux-fsr-0.png, flux-fsr-1.png, etc.?
For example as in the pin-cell (sample-input). Based on my understanding, this pin-cell is consists of a fuel cell and a moderator cell. And then, this moderator cell is divided into 2 rings. And then, by MOC, there will be used 3 FSRs (I saw this on the log files, [  NORMAL ]  Total number of FSRs 3). So, if we call the: 
plotter.plot_energy_fluxes(solver, fsrs=range(geometry.getNumFSRs())),
then we will get 3 output files:  flux-fsr-0.png, flux-fsr-1.png, and  flux-fsr-2.png

My question is, is flux-fsr-0.png represent fuel, moderator (ring1), or moderator (ring2)? How do we know the order?

And for the second question (averaged one), could we just get only one plot of flux in energy that stands for all FSRs? 

Thank you very much :)

Sincerely,
Rino

Casimiro Rino Kuswanto

unread,
May 4, 2021, 1:18:05 PM5/4/21
to OpenMOC Users Group
Hi Guillaume,

Sorry, I still have another question. 

How to extract the value of the plots (plot_energy_fluxes and/or plot_spatial_fluxes) into text outputs
I mean, is it possible to get the text (.txt, .csv, log files, or something) output file for example from the flux-fsr-0.png that contains the exact value that drawn on the plot?

How to set the power of the reactor in OpenMOC (or OpenMC)? 
Previously, I didn't set it and just follow the flow from 

Thank you very much for your help.

Regards,
Rino

Guillaume Giudicelli

unread,
May 6, 2021, 12:01:24 AM5/6/21
to Casimiro Rino Kuswanto, OpenMOC Users Group
Hi Casimiro

I don't think there's an option for that from the plotter. You can always access the scalar fluxes from the solver (solver.getFlux(fsr number, group)) manually.
Or you could modify the plotter, it's python code. 

I previously replied to someone trying to do the same thing, normalize to the reactor power. See:
https://groups.google.com/g/openmoc-users/c/Cy3-aF7KZqA (the last message not the first one)

Best,
Guillaume

Reply all
Reply to author
Forward
0 new messages