Create Stage 2 (TEM3P)
=======================

.. rst-class:: step-number

1\. New Stage

To add a second stage to the project, go to the :guilabel:`ACE3P` menu and select the :guilabel:`Add Stage...` item to open the dialog for specifying the new stage. In the dialog, set the :guilabel:`Mesh` field to ``Import New Mesh File``. For the :guilabel:`Mesh File` field, we are going to use the ``RfGunBody.gen`` file from the :program:`ACE3P` code workshops. You can download a copy of this file from the `ModelBuilder for ACE3P Data Folder <https://data.kitware.com/#collection/58fa68228d777f16d01e03e5/folder/60aef5cf2fa25629b9b69632>`_.

For a more detailed description of adding a stage to a project, refer to :ref:`Create Stage 2 (Track3P)`.

.. image:: images/rfgun-add-new-stage.png
    :align: center

|

.. rst-class:: step-number

2\. Modules Tab

To set up the analysis, select the :guilabel:`Modules` tab and set the :guilabel:`Analysis` to ``TEM3P``.  For the :guilabel:`TEM3P` type, select ``Thermal/Elastic``, and then check both checkboxes for :guilabel:`Elastic` and :guilabel:`Thermal`.  Next to the :guilabel:`Thermal` checkbox, select ``Linear`` from the drop-down menu.

Below that, check the :guilabel:`Source` checkbox and set the path to the ``omega3p_results`` directory used in stage 1. The steps to do this, which are described in more detail in the :ref:`Window example<Specify Track3P Analysis (part 1)>` (Modules Tab section), are as follows:

a. Make sure the :guilabel:`NERSC File Browser` panel is visible.
b. In the :guilabel:`Analysis Stages` panel, select the :program:`Omega3P` stage.
c. In the :guilabel:`Simulation Jobs` panel, select the job you ran previously, so that you see the job details at the bottom of the panel.
d. Near the bottom of the :guilabel:`Simulation Jobs` panel, inline with the :guilabel:`Remote Directory` field, find the right-facing green-arrow tool button and click it. (If this button is disabled, you will need to first login into NERSC to enable it.)
e. In the :guilabel:`NERSC File Browser` panel, find the ``omega3p_results`` directory. Right-click over it to open a context menu and select the :guilabel:`Copy Path to Clipboard` item.
f. In the :guilabel:`Analysis Stages` panel, select the ``TEM3P`` stage.
g. In the :guilabel:`Attribute Editor`, paste the directory path into the :guilabel:`Path` field.

.. image:: images/rfgun-modules2.png
    :align: center

|
