Skip to content
Konstantin Batkov edited this page Jul 3, 2024 · 1 revision

mcnpview

When developing an MCNP geometry, a user needs to open the same geometric view in the mcplot viewer multiple times. It can be time consuming to enter the plot requests (such as origin, extend and basis) every time, so they can be read from a text file specified with the com argument:

mcnp i=inp com=filename

The mcnpview and zoom scripts make it easier for a user to save the current mcplot view in the comout file and then read it again in order to open the same view scene.

The mcnpview script is a wrapper around mcnp ip. Open your geometry by running

mcnpview /path/to/input/deck

set up the desired view and quit MCNP. Then save your view by running the zoom script:

zoom

A file called zoom will be created in the current folder with your plot requests.

To open the same view next time, specify the zoom file name as the second argument:

mcnpview /path/to/input/deck zoom

One can also temporarily specify additional plot requests, e.g.

mcnpview /path/to/input/deck zoom orig 100 200 300 ex 400

It is of course possible to rename the zoom file (ceated by the zoom script) in order to use several pre-defined views.

The mcplot viewer allows to export the view into the PostScript format by executing the file command. When mcplot is called by mcnpview the PostScript file will be converted into PDF if the ps2pdf tool is installed.

mcnpview assumes your MCNP binary is called mcnp6, but there is also the mcnpxview script which uses mcnpx.

Clone this wiki locally