+ All Categories
Home > Documents > Creation of MCNP Input Files With a Visual · PDF file,J,e 11, WHC-SA-2019-FP w Creation of...

Creation of MCNP Input Files With a Visual · PDF file,J,e 11, WHC-SA-2019-FP w Creation of...

Date post: 06-Feb-2018
Category:
Upload: vuongphuc
View: 220 times
Download: 2 times
Share this document with a friend
12
,J ,e 11, WHC-SA-2019-FP w Creation of MCNP Input Files ' With a Visual Editor R. A. Schwarz L. L. Carter N. Shrivastava DatePublished January1994 To Be Presented at 8th Intemational Conference on RadiationShielding Arlington,Texas. April 24-27, 1994 Prepared forthe U.S. Department of Energy Office of EnvironmentalRestorationand Waste Management (_) '"_ Ue_ W_;_it8 ]10 _= P.O, Box 1970 Hanfor¢i Company Richland, Washington 99352 HanfordOperationsand EngineeringConlractorforthe _ U.S. Department ofEnergyunderContract DE-ACO6-87RL10930 i ii nln ii , nn into i, in COp/right U oonm By==pue= oi thi= article,theI_.bher imd_' _ admowledgell theU.$. Government's tightto reuun ncnex=usivL roydy-fme#k:,ma,o inandtoany cq=yngm¢_Mmngmmpaper. Approved for PublicRelease )_ _ (_T J ,, DIIgTi_tBUTION OF THIS DOCUMENT IS UNLIMITED
Transcript

,J

,e

11,

WHC-SA-2019-FP

w

Creation of MCNP Input Files•' With a Visual Editor

R.A. SchwarzL. L. CarterN.Shrivastava

DatePublished

January1994

To Be Presented at8th IntemationalConferenceon RadiationShieldingArlington,Texas.April24-27, 1994

Prepared for the U.S. Department of EnergyOffice of Environmental RestorationandWaste Management

(_) '"_ • Ue_

W_;_it8 ]10 _= P.O, Box 1970

Hanfor¢iCompanyRichland,Washington99352HanfordOperationsand EngineeringConlractorforthe _U.S.DepartmentofEnergyunderContractDE-ACO6-87RL10930

i i i nln ii , nn into i,in

COp/right Uoonm By==pue= oi thi=article,theI_.bher imd_' _ admowledgelltheU.$. Government'stighttoreuun• ncnex=usivLroydy-fme#k:,ma,oinandtoanycq=yngm¢_Mmngmmpaper.

Approvedfor PublicRelease )_ _ (_T

J,, DIIgTi_tBUTION OF THIS DOCUMENT IS UNLIMITED

WHC-SA-2019-FP

CREATIONOF HCNPINPUTFILES WITHA VISUALEDITOR

R. A. Schwarz L.L. Carter N. Shrivastava(509) 376-5977 (509) 376-3929 (.509) 376-5651

a

WestinghouseHanfordCompanyP.O. Box 1970

• Richland,WA 99352

ABSTRACT

A vlsualeditorfor the MCNP computercode is describedthat enablesthecreationof the geometryportionof an inputfilewhiledynamicallyviewingthe geometryas it evolves. This menu-drivengraphicalinterfaceis basedonC-languageroutinesthat interfacewith the screenand call FORTRANroutinesthat initializethe inputdata and preparethe informationfor the geometryplots. Advancedfeaturesof the visualeditorincludethe creationoftransformations;universes,includingfillsof cellscontainingthe universes;and visualizationof the evolvinggeometryduringsuch creations.This visualeditorhas been developedfor an x-windowenvironmentand has beenwrittenusingx-viewlibraries. A preliminaryversionhas been releasedatWestinghouseHanfordCompany.

I. INTRODUCTION

The laborious creation of input files with a line editor for complexthree-dimensional transport calculations is frustratingly slow. It is alsosubject to input errors because of the lack of a dynamic visualization of thegeemetry and calculational model being created.

A seminar in February 1992 at Los Alamos National Laboratory (LANL)addressed the subject of input automation and the visualization of input andoutput for the MCNPMonte Carlo code. Subsequently, Westinghouse HanfordCompany(WHC)had discussions with the MCNPcode developers (LANL) aboutvarious possible solutions for improving the outdated line editor approach.In the summerof 1992, WHCbegan work on the graphical interface summarized inthis paper, and the MCNPcode developers have been working on someother

• approaches. These efforts will eventually lead to software packages that willenable users to create input files in a muchmore efficient and reliablemanner.

A preliminaryversionof our visualeditorhas alreadybeen releasedatWHC, whichenablesa dynamiccreationof the geometryusingtwo or more cross-sectionalviews. It is now beingupgradedto includethe data card portionofthe inputfile:

The geometryportionof the visualeditoris describedin this paper.This menu-drivengraphicalinterfaceis basedon C-languageroutinesthatinterfacewith the screen. TheseC routinesalso call FORTRANsubroutineswrittenat WHC, whichin turn call slightlymodifiedFORTRANsubroutinesfrom

!

' B I

WHC-SA-2019-FP

I

the MCNP initiationand plot modules. TheseFORTRANsubroutinesconstantlycheckthe evolvinginputdata beingreceivedfrom the C routinesand generatethe informationfor dynamicallyplottingthe geome}cryin up to ten cross-sectionalviews.

This visualeditorhas been developedfor an x-windowenvironmentand has. beenwrittenusingx-viewlibraries.The most importantmenu-drivenportion

of this graphicalinterfacewill be shown,includingillustrationsof thecreationof a simplegeometry.

II. OVERVIEW:THEHAIN PANELANDPLOTTINGFEATURES

The visual editor is described here by showinga number of pictures ofthe screen during the creation of a simple geometry to illustrate the mostimportant features. Figure 1 showsa typical screen during the early portionof the creation of the geometry. The screen displayed is described asfollows.

The Main Panel is in the upperleft-handcornerof FigureI. Thisincludesa <Reinitiate>buttonthat is displayedas <Initiate>when the visualeditoris firstexecuted,and this is the firstbuttonexercisedat thebeginningof an editingsession. It readsin a partialinputfile,if oneexistsfrom a previousedit session,or asksthe user to type in a titlecardwhen startingfrom scratch. Then this <Initiate>buttonturnsto "Reinitiate"and is occasionallyusedto read in the newlycreatedinputfile. The<SurfaceCreation>buttonis used to createnew Surfacesand activatesthe NewSurfaceCreationPanel,shownin the upperright-handportionof the screen.The <Cell Creation>buttonis used to createnew cellswith a New CellCreationPanel. The surfaceand cell creationsubmenuswill be discussedandtheiruse will be demonstratedin an example. The <Edit>buttondisplaysascrollinglist of the cell cards,the surfacecards,or both and allowsforvariousoperationson alreadycreatedcellsor surfaces. Plottingof specificcellsand surfacescan be turnedoff or on in this submenu. The <Color>togglecan be used to createthe geometryplotsin coloror blackand white.

The <BackupInp> buttonwill writeout the currentstateof the inputfile beingcreatedto a file calledinpn and to a file calledinpn"n"toprovidea time sequenceof backupinputfiles. Here "n" is an integerused to

. definea file name that is unique. The <UpdatePlots>buttonwill updatethecross-sectionalviewsof the evolvinggeometry. The defaultis to do this

• automaticallyanytimea new surfaceor cell is created,but for largeinputfilesthe user may not want to take time to obtaina plot at everystep. The<DataCards>buttonwill displaythe submenuchoicesof "Materials,""Importances,""Transformations,"and "Other." Presentlyonly the"Transformations"choiceis fullyimplemented,and the treatmentof the otherdata cards is now beingincluded. Finally,the <Quit>buttonat the top ofthe main menu is used to quit the visualeditingsession,at whichtime afinalinpn file is createdthat representsthe inputfile at the end of thesession.

|IWItO_'SC

_ .(1)

• ,I_

o Ii :.:_:1o • ..,-++'_+++_'--,(De-- I

(1/1:3. . L "" oe-mt. .. ee'oo_fO _ et_t Oe'MI +

o,... J.q3JL1GI IN'tlX3

,, -_-rOI o m _,

U3 C eOep(_ ": . + I -

0 eo _,. ... *= [ : "" "_'" : _".1" -- t 0 " ' t ' " O 0

u_ (A_.o'w..+-d '} T.A lnn,_nm.) -- .. _'-_ _"w.u,,.d) (_ mrk,--,m)01 ' o. " o t " o - o t

....

0 ', .,:+ : . -

(/) e- .. ."ill°Ill IIIIIUl q m q Illellll elll_ ll_le_ i. spin3 I_)(A¢: _.o.m k,-.. -m.q,._..= ._ _- ,-.. _ .-.,.. ,v +++

"_ I " _++'.' o -- _::_+-_'_' ++_,++++_"°'+'i+ - .OLO_'OL* ' • .... " +• " '."_ .+ . + .. _ u.qmn..o.,.e .:.+.!.++-._..._,,_,o_,_)

S..

+• -++++++.-+-+:+:.":;+_++_:_.+_++".++ ' - ". +.+- ,m_,,io,o,_i"s mini . ..... .++;' + " _+++;_[] . +_{-+;i_:..:.

i " + ' " :+ :: r_;. ":" +: " + ' J •

WHC-SA-2OIg-FP

Two Cross-SectionalViewsof the geometryare shownin the lowerportionof FigureI. To the left of each of theseplots is a descriptionof theorigin (center)of the plot andthe extent(horizontaland vertical)from thecenterof the plot. Any of theseentriescan be changedby pointingto themwith the mouse;however,othermethodswill be describedthat are typicallyeasierto use to make such changes. Just belowtheseentriesare toggle

• <surface>and <cell>buttonsto includesurfaceor cell numbers,respectively,on the plots. Also providedis a toggle<refresh>buttonthat,when placedinthe "on" position,will automaticallyrefreshthe plot for each new cell or

. surface. When the toggleis placedin the "off"position,it is necessarytomanuallyuse the <UpdatePlots>buttonon the main panel.

The horizontaland verticalbasisvectorsare shownabovethe upperleft-handcornerof each plot. (Theleft-handplot is an x-z view and theright-handplot is an x-y view,by default,as shownin FigureI.) Thesebasisvectorscan be changedby pointingto them with the mouse;althoughitis more convenientto use the <BASIS>buttonthatgives a menu with choices,such as xz, xy, yz, etc. The <LABELS>buttonallowsfor the selectionof theplot labelfor each cell (defaultcell number),such as importances,weightwindows,etc.,and will be used extensivelyas the editoris extendedtoincludethe creationof all data cards. The <ZOOM>and <MULTIPLIER>buttonscan be used to zoom in on a portionof the geometryor to multiplythe extentsby a constant. The <LAST PLOT>buttonwill replacethe presentplotwith thepreviousplot. The <PLOTS>buttonallowsone to createand recallup to fiveplots on the left (one at a time)and five on the right (oneat a time).

III, THE SURFACECREATIONPANEL

The New SurfaceCreationPanelis shownin the upperright-handportionof Figure1. The plotsof FigureI showthe evolvinggeometryaftersurfacesI to 9 have been created. (Notethat thesesurfacesshow up on theplotseven thoughthere are no cellsyet.) The New SurfaceCreationPanelinFigureI is shownimmediatelyafterthe creationof surface9. Hence,thesurfacenumbershownin the panel is by default10, and the defaultsurfacetype is that of the last surfacecreated. The coefficientsto describethesurfacecan eitherbe enteredby keyboardor by usingthe mouse. If highaccuracyis not required,the coefficientscan be specifiedby positioningthemouseon the plot and clickingthe mouseat the desiredlocationfor thesurface(or clickingtwiceat two differentlocationsfor two coefficients).

The menu attachedto the surfacetype buttonsis shownin Figure2. Tothe rightis a <register>buttonto includea surfaceas part of the evolvinggeometryand a <quit>buttonto leavethe New SurfaceCreationPanel.

IV. THECELLCREATIONPANEL

A typicalscreenlayoutduringthe creationof cellsis showninFigure3, in which the New Cell CreationPanelis in the upperright-handportionof the screen. Pertinentinformationfor the new cell is inputin theleft-handand centralportionsof this panel,such as materialnumber,universenumber,transformationnumber,etc. The right-handportionof this

• WHC-SA-2019-FP

Figure2. New SurfaceCreationPanelShowingAttachedMenus.

• • .... • New Surface Creation

sphere yj_ _¢yllnder " _F'_ cone _I_ quadratic y Ooru, Y_ _MODE UNITS

_) - [_ SURFACECREATE _

=N01009.2

panelis primarilyconcernedwith the descriptionof the surfacesboundingthecell. To illustratethe creationof a simplecell,the followingis thesequenceof mousemovementthat led to the creationof cell 3 (Figure3).

The mousewas sequentiallydraggedacrosssurfaces4, 5, G, 7, and Iwith the left buttondepressed,as shownby the (added)dashedlineson the left-handplot. (Formore generalthree-dimensionalgeometries,someof the surfaceswouldhave appearedonly on theright-handplot,so both plotswouldbe used in designatingboundingsurfaceswith the mouse.) The senseof the cell is designatedbypositioningthe mousesomewhereinsideof wherecell 3 will be andpushingthe left button. Then the <Paste>buttonis selectedfromthe right-handportionof the New Cell CreationPanel. Becausethecell is now completelydefined,the <Register>buttonis selectedtoregisterthe cell and updatethe plots. The responsesto thissequenceof operationsare shownby the scrolledprintat the leftof the panel. For example,just abovethe "POINTACCEPTED"messageare the surfacenumberswith senses"-4 5 G -7 -1," resultingfromthe left mouse buttonbeingpressedto designatethe sense.

The disjointcell 2 was createdin a similarfashionexcepttwo mousesequences,similarto the one describedfor cell 3 followedby a pasteoperationeach time,were requiredto pastethe two portionsof the disjointcell together. After completingthe two pasteoperationsthe cell was

" registered.

Cell 4 is insidethe sphereof surfaceI with cellsI, Z, and 3 cut out.• This can be specifiedby draggingthe mouse acrosssurfaceI with the left

buttondown;movingthe mousesomewhereinsidethe sphereand pressingtheleft buttonto designatethe sense;selecting"Paste;"sequentiallyenteringI, 2, and 3 at the "Not"portionof the New Cell CreationPanelwith thekeyboardto excludethesecells;and registeringthe cell by pushingthe<Register>button. Ratherthan enteringthe I, 2, and 3 at the "Not,"themousecouldhave been sequentiallydraggedacrossthe four planesurfacesofcell I followedby a sensedesignationinsideof thesesurfacesand a "Cut"tocut it out of cell 4. This processis repeatedfor cell 3 and each of the twodisjointsegmentsof cell 2.

. • . , ...... ,. . • , Ira

• _" . 4Ii Cellnumbor:. • UnborN,numbor. ;: .;!',._!..'.:_'_

• --." amrla aromovod-> i Fill number.

• ' • 4 | II 7 Tr_neforn_tion nund_c

" '* POINTACCEPTED- SoINtPseto_rC_ Mou_ SenN: _ x _ Y __ L. :* _;. _::_d _ _ _ 0" CELLPASTED-Sele_tRegbt_rdmllO_OOOmo_ .,; lal,O_a,la,_fo_mn_,p_ _ _,n.

• ", :ELL REGISTERED " " "_? '":_'_'_:':_._I_Z_*_._: _ "' ::3

• " :[ ::I::o o 'v - • , , _.ii i_?_........ •. . |

(,,,,1

I °"_"I , ---,m [] ,.,_, [] ,.,,,o _ o

-! "_' _]--"" -sat) _o13x I

-] ,.,.. -I e... _ -n.mae

:3lOO.O0 lO0.iNI

"o

::3

4 • , r--4 ........ _'_\ .;"..... "_''• . : : / m

,,] • ,,. (I)

\" L.._..;,,.;." y ,,<"", _

,4I

WHC-SA-2019-FP

The mousesensetogglesfor x, y, and z at the lowerleft portionof theNew Cell CreationPanelin Figure3 are used to choosecell sensesin morecomplexsituations.One or more of the threecoordinatesfor the senseareselectedfrom one plot. The remainingcoordinatesare selectedfrom otherplotswherethe mouse sensebuttonsare toggledin betweenthesepartialselectionsof the sensecoordinates.

Q

Universes,includingtransformations,are also allowed. There arevariousways to do this. Typicallythe cell with the "fill=n"is first

, createdwithoutany transformation.Then the cellswith the corresponding"u=n"are created. Finally,if a transformationis involved,the cell withthe "fill=n"is modifiedto includethe transformation,and the geometryplotswill then show the resultof the transformation.This can be extendedtoincludeuniversesinsideof universes.

Anotheroptionfor cell creationis the <Registerfor cell splitting>buttonon the New Cell CreationPanel. This can be used to splitcertaintypesof cellsinto any numberof cellsof uniformwidth. The user goesthroughthe stepsto createthe cell that is to be split. Insteadof pushingthe <register>buttonat this point,the <Registerfor cell splitting>buttonis selectedand anotherpanelappears. On this panelthe numberof cells,n,to be createdinsidethis spaceis enteredby keyboard. The visualeditorautomaticallycreatesthe additionalsurfacesneededand the n cells. Thiscan be used to: dividea,slabregioninton slabsin the x, y, or z direction;dividea sphereor regionbetweentwo spheresinton concentricspheres;dividea cylindricalregioninton cylindricalregions(radially,axially,orboth);or dividea box-in-boxinto n cells.

V. THE EDIT PANEL,MODIFICATIONS,ANDERRORRECOVERY

The main panelbutton<Edit>can be selectedto displaycells,surfaces,or both on a panel. An examplefor the four cellsin the simplegeometryunderdiscussionis shownin Figure4, wherethe scrollbarswould be usedtov.iewcells in a largergeometry. Any of thesecellscan be taggedwith theleft buttonof the mouse,and the buttonson the right-handside can be usedto operateon this cell (e. g., deletethe cell with the "delete,"insertanew cell at this locationin the inp filewith the "insert,"hide or show thecell on the plotswith the "hide"or "show"options). The <Edit>buttonwillswitchto a Cell Edit Panelthat looksjust likethe New Cell CreationPanel,exceptthis cell is displayedfor modification.At this pointone can also

• selecta <New Cell>buttonthat gives "likebut" capabilities(i.e.,to createa new cell like the one displayedexceptfor some changes,such as a newtransformation).

VI. SUMMARY

In this paperwe have describeda visualeditorfor the MCNP computercode. This enablesthe creationo_ the geometryportionof an inputfilewhiledynamicallyviewingthe geometryas it evolves. This menu-drivengraphicalinterfaceis basedon C-languageroutinesthat interfacewith thescreen. These C routinesalso call FORTRANsubroutineswrittenat WHC, whichin turn call slightlymodifiedFORTRANsubroutinesfrom the MCNP initiation

7

• WHC-SA-2OIg-FP

Figure4. Edit PanelShowingCell Cardsand ControlButtons.

_' ,.

[] Cell Description

• + ' 1 1 1.0000 38-2-9-I2 2 1.5000 (3-2-76-1):(-45a-9-1)3 3 2.0000 -456-7-14 3 2.0000 -1#2#1#3

_ _ r_ F_

l_T++]?_+C:_:+::._:.S+++,.+__>.+.+ _::';_;_, +.+*;:_++:+,++_+++:.;_::.::+:+'."+++:,c+_++_+:_.S+_++::.'+(u.... ".r_.":+++_':_ : :;''++].'++.:: --: +

+°o+++++.++++.....+++++++++++.....+++++++++++++++++.++++++++++,.++++++++++++.++++++++<++++m+++.+++<+!+i+++ ++ .................. > "+ +_ ....... ++ ........ '+++ ....... +' ++ ..... , ....... _ ................................. + 1+ " " " + C' how + + +

_++<_++ _,+Z ++_+ . + _ ++ +" _+ d ++ +_ +++ r .... + + _ "++ "+1 "*--p+ + + _ _'++1 + _+d _++&_ _8 +++, + . + _+ + r'' _ "+ ) ++ + .... . < . + + . + ......

+IMOIOOg,4

.+

and plot modules. These FORTRANsubroutines constantly check the evolvinginput data being received from the C routines and generate the information for'dynamically plotting the geometry in up to ten cross-sectional views.

The flexible menusystem has been demonstrated by showing the screen atvarious times in the creation of an examplegeometry. This visual editor hasbeen developed for an x-window environment and has been written using x-viewlibraries. A preliminary version has been released at WHC.

Advancedfeatures of the visual editor include the creation oftransformations;universes,includingfillsof cellscontainingthe universes;and visualizationof the evolvinggeometryduringsuch creations. Plannedmodificationsto furtherimproveand extendthis graphicalinputpackageincludethe following:

• Upgradethoseportionsthat use x-viewto MOTIF

• Allowthe user to i,putimportanceand weight-windowdata cardsusingpowerfulvisualizationfeaturesof the evolvinggeometryplots

• Includethe specificationof latticesin the geometryportion

• Allowthe user to inputthe materialcardsusingvisualhelpsfor, availablecross-sectionalsets for each isotope

• Allowthe user to inputthe sourcewith upgradesto the plotsthat• visuallyshow the sourcelocation

• Allow for all otherdata cards,includingflexibleoptionsforspecifyingtallies.

4

WHC-SA-2OIg-FP

i

DISTRIBUTION

.Numb.erof copies

OFFSITE@

3 ANS Headquarters555 NorthKensingtonAvenueLa GrangePark,Illinois 60525

Attention: Kris Filpovich

ONSITE

5 U,,S,Departmentof Energv-RichlandOperationsOffice

R. A. Almquist(5) NI-39

25 WestinghouseHanfordCompany

L. L. Carter(20) H0-35R. A. Schwarz H0-35N. Shrivastava H0-35InformationReleaseAdministration(3) L8-07

Dlstr-1

, , ' _ Ill _ ' , i

i II


Recommended