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

MOOSE Support in ICE

Introduction

The Multi-physics Object Oriented Simulation Environment (MOOSE) is parallel, finite-element framework developed at Idaho National Laboratory (INL). To learn more about it, check out MOOSE Framework. ICE has always provided strong support for MOOSE input generation, simulation execution, and data visualization as a core part of the platform. As of the summer of 2015, that support has been greatly updated to incorporate comments from the MOOSE internal development team and MOOSE application developers. The updated support provides a unified interface for interacting with the MOOSE framework, and tools for the embedded visualizations of problem meshes, simulation output meshes, and Postprocessor CSV plotting. Additionally, we have improved our MOOSE tooling to incorporate real-time updating from a running MOOSE simulation back to ICE. Users can now specify a list of Postprocessor values they care about, launch their simulation, and see, in real-time, those Postprocessor plots updating.

This article will detail these new updates, and walk you through the use of the new MOOSE support in ICE. It will detail ICE installation, MOOSE input generation, existing MOOSE input file loading, simulation launch, and post-simulation data visualization. Additionally, ICE now supports MOOSE application development. To see a tutorial on that, check out Developing MOOSE Applications with ICE.

ICE Installation

The ICE team has developed a new and improved mechanism for users to install ICE and its dependencies. The ICE install can now be completed using a simple python script, which can be downloaded at ICE Install, or can be found (soon) in the MOOSE Git repository under the scripts directory. To install ICE, simply execute this script in the following manner:

python Install_ICE.py

Running this script will pull down the correct versions of ICE, VisIt, and HDFJava for your operating system, unpack them, and configure the ICE application to use the downloaded VisIt and HDFJava dependencies. For Mac users, this script will additionally configure ICE to use the current user's environment variables and register those environments with ICE through the Apple Application Launch Service. All of this will enable you to simple double click the created ICE application icon (~/Applications/ICE.app for Mac, and for Linux, an ICE application icon in the Programming category of the applications menu).

Furthermore, you can customize the install with command line arguments to the python install script. To download and configure ICE in a specified directory, simply:

python Install_ICE.py --prefix /path/to/install

To install the latest unstable version of ICE (currently required for the MOOSE support described in this article), simply:

python Install_ICE.py --unstable

For Windows users, we also provide MSI installers at the same files download URL. Just download the installer specific to your architecture, run it, and you'll be ready to use ICE.

Prerequisites

To use the MOOSE support in ICE, you'll need to have MOOSE installed on your system, and any MOOSE-based application you would like to use (could just be moose_test if you don't have any other application). To install MOOSE on your system, check out mooseframework.org/getting-started. If you would like to install MOOSE and create a MOOSE-based application of your own (or clone an existing application) from with ICE itself, check out the Developing MOOSE Applications with ICE article.

MOOSE Perspective

ICE comes bundled with a MOOSE Perspective that organizes the various views and windows that a MOOSE user or developer would need to efficiently work with MOOSE in ICE. The updated MOOSE perspective shows the Item Viewer, Resources View, Project Explorer, MOOSE Data Tree View, and Properties tab to the user to enable efficient interaction with the framework.

To access the MOOSE Perspective, use the the ICE toolbar at the top and navigate to:

Window > Open Perspective > Other...

Select MOOSE in the window that pops up and click OK. Alternatively, you can also access the same pop-up menu by clicking the Open Perspective button in the upper right-hand corner of the ICE workbench.

ICE OpenPerspective.png

Once the MOOSE Perspective opens, you should notice the workbench now contains fewer UI components, and resembles something like this:

New moose perspective.png

Connecting to VisIt

If you would like to view embedded visualizations within the ICE MOOSE tools, you'll need to specify a connection to VisIt first. In order to do so, simply open the Preferences menu item in the top toolbar (on Mac, Eclipse ICE > Preferences, on Linux, Window > Preferences). In the Preferences wizard, navigate to the Visualization Preference node in the left tree view, open it, and select the VisIt node (Preferences > Visualization > VisIt). In that preferences view, you can add a connection to VisIt by click the add button and specifying the path to the VisIt executable.

Visit connection.png


The MOOSE Workflow Item

Previous version of MOOSE support in ICE presented the MOOSE user with two separate Items for interaction with MOOSE: the MOOSE Model Builder and the MOOSE Launcher. The ICE team has done away with that separation and now allows users to construct a MOOSE Workflow Item, which presents a unified interface for MOOSE simulation development in a more efficient manner. To create a new MOOSE Workflow Item simply click the green "+" button in the Item Viewer, located on the left-hand side of the ICE workbench and MOOSE perspective.

ICE CreateItem.png

This will prompt a window to pop up; select the MOOSE Workflow Item, and click Finish.

Item selector.png

Alternatively, if you'd like to import an existing *.i input file to modify, click the yellow item import arrow located at the top of the ICE workbench.

ICE ImportItem.png

A wizard will pop up prompting you to specify two things: the *.i file you'd like to import from your filesystem, and what kind of Item you'd like to import it into. Browse to the file and select the MOOSE Workflow Item from the list.

Now let's take a look at the use of the MOOSE Item in each of these two cases.

Creating a new MOOSE Workflow Item

When you select the MOOSE Workflow Item for the first time, you'll be presented with the following form:

New moose item.png

To begin using the MOOSE Workflow Item, you'll need to specify a MOOSE-based application. As you can see in the above picture, this is the first time we've used the MOOSE Workflow Item, so there are no available applications to select and ICE is indicating that we must import one.

Moose-based-app.png

This MOOSE-Based Application Entry allows the user to navigate to either a local or remote MOOSE-based application. Once selecting the application, this Entry saves the value for the future, i.e. it persists between ICE executions so that the user can reuse the same application over and over again. To specify an application, click the Browse button. Upon doing so, you'll be presented with a dialog to specify whether this application is hosted locally or remotely. Select local, for now, and you'll be presented with a File Dialog, search for your application and click finish.

Local or remote.png

Local file browser.png

With your application imported, the next step is to save the current MOOSE Workflow Item to trigger the generation of the MOOSE input tree for that application.

App imported.png

Input tree.png

From this tree, you can start constructing your MOOSE input file. You can add children to the tree nodes, delete children, and set properties for each block in the Properties View.

Updates to the MOOSE Tree

The MOOSE tree has been improved and made smarter. Blocks that require a variable to be specified, such as the Kernels block, now only let users specify a variable that has been created in the Variables block. Adding or removing variables from the Variables block will update those blocks with variable entries to display only a list of the currently available variables. Additionally, all file entries in the MOOSE tree will dynamically show up in the Output File Parameters Data component on the MOOSE Workflow form.

Combined vars.png

Combined dynamic files.png

Importing an Existing MOOSE Workflow Item

As mentioned above, you can import an existing MOOSE input file as a new MOOSE Workflow Item. Clicking the yellow import arrow icon in the toolbar and selecting the input file and MOOSE Workflow Item will import a new MOOSE Workflow Item into the main form editor area in the MOOSE perspective. Its tree view will already be populated with the contents of the file. Next, select the application this MOOSE Workflow Item corresponds to and click save. This will merge the current tree corresponding to the input file with the applications YAML tree, resulting in a view like this:

Merged tree.png

Using a Remote MOOSE-based Application

ICE let's MOOSE users point to remotely hosted MOOSE-based applications just as easily as locally hosted ones. To use a remote application, simply select Remote on the Local/Remote dialog after clicking the Browse button on the MOOSE-Based Application entry. You will be presented with a remote connection dialog, shown below.

Remote connection.png

Fill out the New Connection wizard with the information needed to connect to the remote host. After filling this out, the remote file browser will load up and you can navigate to the remotely hosted application.

Remote app.png

Viewing the Mesh

ICE now has support for embedded visualizations, and the MOOSE support in ICE provides this embedded view to allow users to view the mesh for a given application run. To view the mesh for a given MOOSE Workflow Item and input tree, simply look in the Resources View for the mesh file and double click it (with a valid VisIt connection present). The mesh will open in an embedded view in the MOOSE Workflow Item's Mesh and Output Files tab. It is completely interactive, you can rotate the view and zoom in and out to get a good look at the mesh you are using for the current MOOSE application launch.

Mesh resource.png

Mesh view.png

Launching the Application

Launching your MOOSE-based application is simple. If you selected a remotely hosted application, then ICE handles the appropriate remote launch semantics (file uploads/downloads, remote invocation, etc). If you selected a local application, ICE handles the local execution of your application in your workspaces default/jobs folder. MOOSE users can also specify the number of MPI processes and Intel TBB threads to use in the simulation execution, shown below.

Parallel exec.png

To launch the application, simply click the Go button for the Launch the Job action in the top right of the MOOSE Workflow Item. This will execute the simulation and pipe the output to the Console view.

Moose console view.png

When the simulation finishes, you'll notice the Resources view has been populated with a list of files generated by the simulation. These files include all Postprocessor CSV files and the simulation output Exodus file. To view them in the embedded visualization view in the Mesh and Outputs tab, simply double click the file. For the output Exodus file, you can right click on the Plot to navigate a context menu of all possible plots to view. Simply select the solution field you're interested in viewing on the mesh, as shown below.

Solution mesh.png

Real-time Updating for Postprocessor Values

ICE and MOOSE can now communicate in real-time during a simulation execution over web sockets. Now, as a simulation is running, MOOSE can communicate things such as Postprocessor values in real-time so that ICE can display a dynamically updating plot of the Postprocessor during simulation execution. When the user selects the Launch the Job process, ICE adds an ICEUpdater block to the Outputs block in the MOOSE tree that directs MOOSE to communicate with ICE over a web connection during simulation execution. So, as the simulation is running, you can double-click a Postprocessor CSV file in the Resources view and view it populate in real-time. Or, if you'd like your plots to open immediately, you can select them in the Show Postprocessors component on the MOOSE form. If these Postprocessors are enabled, ICE will immediately open up the Postprocessor plot when the simulation is executed.

Pp view.png

Dynamic update.png

Back to the top