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 - 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
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.i.txt (82.6 KB) test2.i.txt (356 Bytes)
I truly appreciate your unwavering patience and kindness throughout this process~
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.
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!