Skip to content

llevant

See and check MCNP geometry, fast. llevant reads an MCNP input file and tells you what is where in it. It works on any model, from a test problem to a 425 000-cell fusion reactor:

  • look at it: 3D views and exact slices, in an interactive viewer or as images;
  • find mistakes: gaps and overlaps (where MCNP loses particles), with their size and location;
  • measure: the volume and mass of every cell, material or universe, with an honest uncertainty;
  • ask questions: which cell holds this point, which cells this line crosses;
  • compare: which cells changed between two versions of a model;
  • show results: meshtal, MCTAL and per-cell results drawn over the geometry.

It reads every MCNP surface type and macrobody, universes and fills at any depth, lattices and transforms (the full list).

The llevant viewer: a 3D view and a slice side by side

Three ways to use it

  • The viewer


    A window with a 3D view and a slice side by side. Click on things, hide them, cut the model open, look for problems. No programming needed.

    The viewer

  • The command line


    One command per question (llevant check model.i), for images, checks and volumes in scripts and batch jobs.

    The command line

  • Python


    Load a model once, then ask it millions of questions with numpy arrays; images show inline in Jupyter.

    Python

Start here

  1. Install llevant: one pip install, or a download.
  2. Getting started: a ten-minute tour on a small example model.
  3. How do I…?: the common jobs, step by step.

Stuck? See Help and FAQ, or open an issue.

How fast?

On a 425 000-cell fusion reactor model, on a 16-thread laptop:

Open the model 1.3 s (36 s the first time, then it is cached)
Locate points 5.4 million per second
Trace lines 330 000 lines of 1 m per second
A slice 0.1 s for a 1000 × 1000 image
Check for gaps and overlaps the whole 36 × 37 × 35 m building in under 3 minutes
Viewer 60 frames per second while turning the model (GPU)

The details are in Benchmarks.

Licence

llevant is free software under the EUPL-1.2 licence.