精品文档---下载后可任意编辑第一讲: 如何运行 MCNP 程序 执行命令语句\mcnp i=(输入文件名) o=(输出文件名) …[选项]选项 [i|p|x|r|z]i=process input file 过程输入文件p=plot geometry 几何画图x=process cross-sections 截面处理r=run particle transport 运行粒子输运z=plot tally results,plot cross-sections 画记数结果,画截面。具体执行过程:假定 mcnp.exe 在 C:\\mcnp\bin\子目录下,在 DOS 窗口里,在命令行提示符>后敲入,C:\\mcnp\bin>mcnp i|p|x|r|z i=(输入文件名) o=(输出文件名)╛其中╛为回车键。缺省文件名:inp→ascii input file ascii 码输入文件outp→ascii output file ascii 码输出文件runtpe→binary restart file 二进制转储文件举例如下:C:\\mcnp\bin>mcnp ixr i=greatwall 其中 greatwall 是你自己编写的源程序输入文件。这个命令行语句,将读入输入文件 greatwall,调用 XS 数据库,并且运行 mcnp。.1 是你自己选择的输出文件名,每次输出必须更改输出文件名,或者不更改但删除上一次的输出文件名,否则程序运行出错。你也可以改成.2,.8,等等,任你选择。这样运行的结果,就会有如下输出:greatwall.1.o→ascii 码输出文件greatwall.1.r→转储文件其中,转储文件也可以作为下一次运行的输入文件,进行接续运行。关于接续运行,将在以后的讲座中详细介绍。你自己定义的文件名,将使你能够跟踪上述的辅助文件。练习:众坛友,请运行下面的 greatwall 文件,临时不要计较文件里的内容,以后的讲座,会陆续予以讲解。程序的目的是,画出在一个立方体当中有一个球体。message: datapath=C:\mcnp\bintitle --greatwall: U sphere in Al shpere in water cube---cc quick intro run, plot, interrupts etcc精品文档---下载后可任意编辑c *** cell descriptions ***c10 1 -18.7 -1 imp:n=1 $ Pu Spherec20 2 -7.8 +1 -2 imp:n=1 $ Al shellc30 3 -1 +2 -3 imp:n=1 $ waterc40 0 +3 imp:n=0 $ outside worldc1 sph 0 0 0 5 $ Sphere at origin radius 2 cm c2 sph 0 0 0 5.02 $ outter Al spherical shell 0.5 cm thickc 3 box +20 -20 -20 0 40 0 0 0 40 -40 0 0 $ surrounding H2Oc *** Source Card***csdef $ default sourcec c *** Material Cards **...