Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Creating RELAP7 Input Files with ICE

The capabilities in this document are brand new and while we assert that they work, that may not be the case on all systems for all users. Problems should be reported directly to the ICE team by sending an email to the project list or reporting a bug.

Getting Started

This document is designed to outline the basic steps of setting up and using the RELAP-7 plugins in ICE. There are two different tasks for the input generation and launching of RELAP-7 within ICE:

  • MOOSE Model Builder - Generates a set of input files necessary to launch a RELAP-7 job.
  • RELAP-7 Launcher - Initiates the RELAP-7 codes to run on a local or remote system using the files generated from the MOOSE Model Builder.

Prerequisites

You should have RELAP-7 installed on a machine, either your local machine or a remote machine.

Generating MOOSE-specific input files in ICE requires YAML files to be downloaded ahead of time. We cannot provide these files for you, so you will have to generate them from MOOSE or request them from the MOOSE team. You can use the command ./r7_moose-opt --yaml > relap.yaml to generate the file.

Open relap.yaml and check if it starts with

**START YAML FILE

and/or ends with

**END YAML FILE

If these two lines are in the file, remove them, because they are not valid YAML.

Create a directory named MOOSE in your local file system in one of the following directories:

On Linux, use: /home/<user>/ICEFiles/default/

On Mac OS X, use: /Users/<user>/ICEFiles/default/

On Windows, use: C:\Users\<user>\ICEFiles\default\

Installation and Configuration

Place the all of the MOOSE YAML files (relap.yaml and any others) in the MOOSE directory before launching ICE. If you have never launched ICE on your system before, you will also have to create the ICEFiles/default directory.

Creating Input

After ICE is properly installed and configured, the first step in utilizing the RELAP-7 plugins is using ICE to generate the appropriate input files for the RELAP-7 simulations.

This tutorial will demonstrate the general procedure for generating RELAP-7 input in ICE.

To begin, launch ICE (if it isn't already running), and you should be presented with an empty workbench.

EmptyNiCEWorkspace.png

We must first create a MOOSE Model Builder item. ICE provides three options for creating new items (all highlighted in blue below). The user may click on the green plus icon (+) located near the top-right corner of the Item Viewer, click on the New Item button in the main ICE toolbar, or choose File > Create an Item.

CreateNewItemOptions.png

This will launch a dialog prompting you to select a task (or Item) to create. Find MOOSE Model Builder in the Item Selector list (you may need to scroll down) and select OK.

SelectMOOSEModelBuilder.png

Defining and modifying input parameters

A MOOSE Model Builder will appear in the main workspace, and the Input Data -- Tree View will be activated in the left-hand column. If any YAML files for MOOSE-based application exist in the ICEFiles/default/MOOSE/ directory, they will appear in the main workbench window.

MOOSEModelBuilderForm.png

Under the MOOSE Model Builder form, select RELAP7 from the available MOOSE-based applications.

SelectRELAPApp.png

Next, save the form by clicking the Save button (outlined in blue below) in the toolbar, or press Ctrl+S on your keyboard.

SaveButton.png

You can now begin adding specifics to your RELAP-7 input model. To add Components to your RELAP-7 model, select Components in the Input Data -- Tree View column on the left, and click the the Add Child button above. This will prompt you with a list of plant components to select from. Simply choose the component you would like to add, and click OK. In this example, we're beginning by adding a Pump.

SelectCompAddChild.png

AddCompDialog.png

Once a child (a Pump in this case) is added to the tree view, you can edit its parameters. In this example, expand the Components node to reveal the Pump that was just added.

ExpandComps.png

Select the Pump component by clicking its name, and a number of Pump-specific parameters will be displayed in the Properties view. You can now edit the parameters as you see fit. (If for any reason you cannot see the Properties view, you can reveal it by navigating from the main ICE toolbar at the top: Window > Show View > Other... > General > Properties. You can then drag the Properties view around to anywhere in the workbench that is convenient for you.)

EditPropsView.png

Continue adding children to the tree view and editing parameters in the same manner until you have created a satisfactory plant model.

Generating RELAP-7 input files

The last step involved before launching a RELAP-7 job is actually generating the input files based on the model just created.

First, use the Output File Name field to specify the name of your RELAP-7 file. Apply the name by clicking the floppy-disk Save button mentioned earlier.

Next, you must select which nodes in our RELAP-7 model tree you'd like to be written into an input file. To do so, go through the tree and select the nodes you'd like to use by clicking the checkbox next to its name. Note: You only need to select the top-level nodes (i.e. Components, CoupledProblems, Debug, EoS, etc.); the children will be automatically added.

Lastly, find the Process drop-down menu located in the top right-hand corner of your MOOSE Model Builder tab. Select Write MOOSE File from the menu, and press the Go! button. Doing this will launch a script in the background to convert your input parameters into a file format that RELAP-7 can understand. This operation should take no more than a second or two, and the message "Done!" should appear near the top of the MOOSE Model Builder tab when it is complete.

MOOSEWriteFile.png

This file will be created in your /home/<user>/ICEFiles/default/ directory and will have the file name you specified. It's important to note that if you have a previously generated RELAP-7 input file in your default directory, generating another input file with the same name will overwrite your existing file without warning.

This completes the RELAP-7 input generation task. The file generated will be used in the next step by the RELAP-7 Launcher to run the RELAP-7 problem. However, if you'd like to review your input file before launching, you can do so by opening the File > Open File... menu in ICE, and navigating to the file. Once opened, you will be able to review the input file generated.

RELAPInputFile.png

Launching a RELAP-7 job

Once you've generated appropriate input files, launching RELAP-7 is a relatively simple task.

To get started, click the green "+" button once more to create a new ICE Item. Select RELAP-7 Launcher from the menu and click OK.

RELAPLauncherItem.png

A form will appear in the main ICE workbench area. This form contains the information necessary for launching a RELAP-7 problem.

RELAPLauncherWorkbench.png

Setting the input file and host

The first piece of necessary information is to specify an input file.

If you are using an input file that was created elsewhere, it must be in your /home/<user>/ICEFiles/default/ directory prior to creating the RELAP-7 Launcher Item or you will need to import it.

To import a file not in the directory, click "File->Import File" and pick the file that you want to import. It will appear in the list of input files in the RELAP-7 launcher. You may also use ICE's import button.

From the Input File drop-down menu, select an appropriate RELAP-7 file. If you created your own input file in the previous step using the MOOSE Model Builder, this file should appear in the list of available files.

RELAPLauncherSelectInput.png

The next step is to specify on which machine RELAP-7 will be run, either locally or remotely. A list of hosts used at ORNL is displayed by default, however, additional hosts can be added by clicking the "+" button to the right of the Hosts table. When adding hosts, set the Execution Path to the /trunk/r7_moose/ directory of the machine's RELAP-7 installation. If you are launching on a remote machine, also be sure that you have appropriate privileges for the RELAP-7 install directory.

RELAPHostTable.png

Setting parallel execution (optional)

Optionally, if you'd like to take advantage of parallel processing, you may specify the number of MPI process and/or Intel Thread Building Block (TBB) threads.

ParallelExecution.png

To use multiple MPI processes, change the marked field to an integer value anywhere between 1 and 10000. Note that mpirun must be specified in the host machine's PATH variable. If you choose not to change this field, the default value of 1 MPI process is used.

To use multiple TBB threads, change the marked field to an integer value anywhere between 1 and 256. Note that the host machine must have Intel TBB support. If you choose not to change this field, the default value of 1 TBB thread is used.

Launching RELAP-7

Once the input file and host is specified, apply your settings by clicking the floppy disk button located in the upper-left corner of the ICE workbench, which is the Save button.

SaveButton.png

If you make any subsequent changes to the RELAP-7 Launcher form, you will have to re-apply them by saving the form in the same way.

Lastly, use the Process menu in the upper right-hand corner; select the Launch the Job task from the drop-down menu and click the Go! button. Depending on your host machine's configuration, you may be prompted for login credentials.

LaunchJob.png

RELAPLogin.png

Visualizing Output

This section requires VisIt 2.8, which may or may not be released at press time. Contact the ICE team if you need a pre-release copy.

The output produced by a RELAP-7 job can be visually analyzed in ICE by utilizing the Visualization perspective. Select Window > Perspective > Other... from the menu bar at the top of the ICE workbench. From the resulting dialog, select Visualization and press OK.

PerspectiveDialogViz.png

An empty Visualization perspective will replace the existing ICE perspective in the workbench.

VizPerspective.png

Rendering in ICE's Visualization perspective is executed through a connection to the external visualization software application, VisIt. To establish this connection, click Launch VisIt near the upper-right corner of the ICE workbench.

LaunchVisItButton.png

A dialog for connecting to VisIt will appear. This dialog allows the user to start a new instance of VisIt on their local machine or a remote machine. The dialog additionally allows the user to connect to an already running instance of VisIt. Select a connection option and enter the appropriate parameters before clicking "OK".

VisItLaunchDialog.png

If the connection to VisIt is successful, a Visualization Editor will be opened in the main workbench area. Click the Open File button from the Visualization File Viewer in the right-hand column of the workbench.

OpenVizFile.png

A dialog for exploring the local file system will appear. Navigate to and select the .e file produced by the RELAP-7 job execution. (Note: This may require adjusting the file extension filter in the dialog to get the file to appear.) After dismissing the file dialog, ensure that the file is selected in the Visualization File Viewer. Click the Add Plot button in the Plot Viewer on the left-hand side of the workbench.

AddPlotButton.png

A dialog for selecting plots to add to the Plot Viewer will appear. Check any number of plots to add and click OK.

AddPlotDialog.png

To display a plot in the Visualization Editor, select the plot in the Plot Viewer. Click and drag on the image to manipulate its orientation.

RELAPinVisIt.png

Back to the top