Warning about capitalized argument

Dear All,
I’m modeling a hexagonal fuel assembly with rounded corners taking advantage of the openmc.model.hexagonal_prism function.

When running the notebook cell containing that function, I get the following warning:

/home/valerio/.local/lib/python3.8/site-packages/openmc/surface.py:1510: FutureWarning: "ZCylinder(…) accepts an argument named ‘r’, not ‘R’. Future versions of OpenMC will not accept the capitalized version.
warn(_WARNING_UPPER.format(type(self).name, ‘r’, ‘R’),

Being a warning, the simulation works perfectly.
Nevertheless, I was wondering what could cause that warning message. looking here and there, I found that in the file funcs.py the line 189 reads as:

   args = {'R': corner_radius, 'boundary_type': boundary_type}

After changing the line as follows

   args = {'r': corner_radius, 'boundary_type': boundary_type}

the warning is now gone.

Since I’m not an expert, I’m wondering if what I have done is proper.
BTW, I’m using OpenMC version 0.12.2.

@valerio69 Thanks for pointing this out. You’re right – that line of code should have 'r', not 'R'. Are you interested in submitting a small pull request to the openmc-dev/openmc repo to fix this? That would give you appropriate credit as a contributor, but I understand it may be a hassle. If you’d rather not, let me know and I’ll go ahead and submit a fix.

@paulromano I tried to submit a pull request. I’m not sure to have done it in the proper way (I’m new to GitHub). If it did not work you can go ahead submitting a fix.

It was perfect – already merged so that will show up in the next release. Thanks again!