Importing MCNP .i file yields empty geometry – Cubit 2025.8

Hello Cubit / Coreform community,

I’m encountering a problem trying to import a MCNP input file (.i / .inp) into Cubit 2025.8 (licensed with a one-month evaluation license). When I use Import → MCNP (or via import cf_mcnp), a blank dialog box appears (no text or options in it), and after clicking “Finish,” no geometry or volumes show up in the model tree or view.Even after switching to a simple MCNP input file, the import still fails.

Thank you very much in advance for your time and help!

Hi @yancy,
could you please share one of the MCNP files that you are trying to import.

test.txt (822 Bytes)

Hi @yancy - two things (one minor, one major) the minor one - If I recall the first line of an MCNP input deck should be the title card (uncommented). The major one, your input cell description is, well, wrong.

You have as cell 1,
1 1 -1.205 -10 10 -10 10 -10 10 imp:n=1
which should be
1 1 -1.205 10 -11 12 -13 14 -15 imp:n=1
Cell 2, should be
2 0 -10 :11 :-12:-13:-14:-15 imp:n=0
Making those modifications, results in


Hope that helps…

I’m sorry for taking up your time on such a trivial mistake. I didn’t look carefully at the contents of the input deck; it was AI-generated, and in fact I only understand the Serpent input format. My apologies again.
The deck I originally intended to run was MCNP.i, a very complicated one, and the png showed the blank window I mentioned earlier. When I switched to the simpler test2.i, the pop-up still contained no text and no geometry was created. (For uploading to the forum, I appended a “.txt” extension to the file.)
MCNP Import Options
MCNP.i.txt (82.6 KB)
test2.i.txt (356 Bytes)

I truly appreciate your unwavering patience and kindness throughout this process~

No problem @yancy, we’re all here to either help or get help :slight_smile:

So test2.i works fine for me, on the command line try;

import mcnp "path/to/file/test.i

When I run that on test2.i, I get the following.

Which looks reasonable to me, however your other geometry there are some super subtle things going on that we need to talk about - we should really write something for the Coreform manual on this, but here goes my cack handed attempt.

Halfspace CSG geometries like that used by MCNP, Serpent etc build a boundary representation of a shape by chaining together logical expressions, like those you see in MCNP. Indeed, infinite spaces are inherently supported and this poses a problem for CAD since this is antithetical to how we represent shaps in solid body CAD systems. So what we do in the MCNP importer is figure out the size of the bounding ‘world sphere’ and use that to bound everything. Imagine the case of defining the interior of a simple box;


This is fine, and works great, however if we were to define the exterior of the box, then we would end up with a similar expression - the issue here is that the volumes are built in the order they are received, and intermediate unite operations result in a volume which has two seperate bits the left hand bit and the right hand bit which are unconnected - in Cubit terms it results in a body, but the underlying library which does this work isn’t using bodies, it uses volumes.

Therefore there is a little work involved, but if you change the order of your CSG expression you should find that it parses correctly.

1 Like

Hi @yancy,
sorry for the late reply.

Please don’t use the import dialogue and run the command instead.

import mcnp "C:/Users/offic/Downloads/mcnp.i" 

It works!!!The command import mcnp "C:/Yunxin/Cubit/spr3/MCNP.i" successfully imported the model, whereas the previously attempted command import "cf_mcnp" "C:/Yunxin/Cubit/spr3/MCNP.i" had failed. Thank you for your patient guidance—it was a tremendous help! Wishing you happiness every day!

The issue has been resolved. Thank you for your patient and detailed responses with illustrations! Wish you a joyful life! :grinning: