19.7. Tutorial: Creating a Custom Analysis Project

Engineering Knowledge Manager

User's Guide | Chapter 19: Working With Analysis Projects |

19.6. Updating an Analysis Project Folder |  | Chapter 20: Displaying 3D Simulation Images Using VCollab
Prev |  | Next

## 19.7. Tutorial: Creating a Custom Analysis Project

The following tutorial contains step-by-step instructions for creating an analysis project in EKM using a custom type instead of the built-in analysis project type. Sample files are provided for your convenience.

You will perform the following tasks:

- Add a custom type to the system that defines an analysis project container.

- Add a custom application to the queue where the analysis will be executed.

- Create an analysis project folder.

- Specify analysis execution settings.

- Upload input files.

- Execute the analysis.

Note: To be able to use the sample files successfully, you must complete the first two configuration steps described in the README.txt file in the `/Data/Shared Data/Sample Files` folder.

### Step 1: Add a Custom Type

A sample custom type for an analysis project is provided in the Samples Files folder. The user designated as the Root User for the current repository must add this file to the workspace configuration.

Note: In order to configure custom types for your workspace, you must perform a restricted configuration. This logs out other users and locks down the workspace while you are configuring it. You may need to notify other users that the workspace will be inaccessible while you perform this configuration.

To add the sample custom type to your workspace configuration:

1. Sign in to the workspace that you want to configure. You must be the designated Root User for the workspace.

2. From the main drop box, select Data. Navigate to the /Shared Data/Sample Files/conf/customTypes folder and select the TestAnalysis.type.xml file.

3. Select (Download) > Using Browser, and then download the file to your desktop.

4. Once the file has been downloaded, check the Users page to see if any users are currently logged in. Such users are identified with green icons. If any users are logged in, let them know that they will be briefly logged out of the workspace.

5. To configure the workspace, select Administration from the main drop box. Click and select Begin Workspace Configuration.

6. Click OK to continue.

7. Navigate to the Configuration/Custom Types folder, then select (Upload) > Files/Archives Using Browser.

8. In the Upload - Select Files dialog box, click Add, and then select the downloaded TestAnalysis.type.xml file on your desktop.

9. Click Next >. The file is uploaded to the `Custom Types` folder.

### Understanding Custom Types

It would be a good idea to have a quick look at the content of the file that you added to your workspace configuration, so that you understand how it will be used when the analysis project is created.

To view the definition of the analysis project type, select the TestAnalysis.type.xml file in the /Configuration/customTypes folder, and then select (Edit) > Custom Type. The Edit Custom Type dialog box appears:

On the General tab we can see that the file defines a folder type named TestAnalysis, which is an extension of the built-in `AnalysisContainer` type. This means that TestAnalysis will be one of the available folder types when you create a new folder in the repository.

On the Children tab there are two children defined. This means that inputs and outputs can be added to the analysis project folder.

On the Type Attributes tab, the input pattern specified is `inputs/*`, which means that all files in the inputs subfolder will be treated as inputs of the analysis. The output pattern specified is `outputs/*`, which means that all files in the outputs sub-folder will be treated as outputs of the analysis.

### Accepting the Configuration

With the new custom type added to the workspace, you can accept the configuration.

1. Click and select Accept Workspace Configuration.

2. In the Accept Workspace Configuration dialog box, click Accept.

### Step 2: Add a Custom Application

A sample external application for creating an analysis job is provided in the Sample Files folder. An administrator must add this application to the Local job submission queue.

1. In the Data section, navigate to the /Shared Data/Sample Files/conf/applications folder, and then select the analysisSolve.app.xml file.

2. Select (Edit) > Copy, and then copy the application to the /Administration/Servers/Master/Local queue.

The figure below shows the settings for the analysisSolve application:

### Step 3: Create an Analysis Project Folder

With the custom type configured, you can now create a folder for the analysis project.

Note: This task can be performed by any user with `Create` permission.

1. In the Data section, navigate to the folder in the repository where you would like the catalog to reside.

2. Select (New) > Folder.

3. In the New Folder dialog box, type `My Test Analysis` in the Name edit box, and then select `Test Analysis` from the Type drop box. (Test Analysis is available in this drop box because you added the custom TestAnalysis.type.xml file to your workspace configuration.)

4. Click OK. A new My Test Analysis folder is created.

### Step 4: Specify Analysis Execution Settings

Next you will select a process template to execute the analysis. A sample process template is provided in the Sample Files folder.

1. Select the new My Test Analysis folder, then select (Edit) > Execution Settings.

2. In the Edit Analysis Execution Settings dialog box, specify the settings shown below:

3. Click OK.

4. Navigate to the /Shared Data/Sample Files/process-templates folder and select the test-analysis.pt.xml file. Request approval to promote the process template to the executable stage by selecting (Edit) > Lifecycle > Promote.

The test-analysis.pt.xml process template has two nodes: an auto node named solve, and a monitor node named monitor. When executed, this process will simulate an analysis.

The execution of an analysis project depends on the analysis-solve.py script. This file can be found in the /Shared Data/Sample Files/apps folder.

### Step 5: Upload Input Files

Next you will need to provide some input files for the analysis. Upload or copy input files to the My Test Analysis folder. For your convenience, sample simulation files are provided in the /Shared Data/Sample Files folder.

### Step 6: Execute the Analysis

To execute the analysis, you simply update the analysis project folder.

1. Select the My Test Analysis folder, then select (Edit) > Update Analysis.

2. From the main drop box, select Processes.

   As mentioned earlier, the process has two tasks: solve and monitor. When the process is executed, a job is created using the analysisSolve application. When the job has been successfully executed, all files in the inputs subfolder are copied to the outputs subfolder.

Contains proprietary and confidential information of ANSYS, Inc. and its subsidiaries and affiliates.

Prev | Up / Contents | Next

Release 18.2 - © ANSYS, Inc. All rights reserved.