ANSYS OptiSLang Tutorial
This tutorial will introduce you to utilizing the OptiSLang optimization ANSYS workbench plugin. For this example, we will use End to End Desktops on the Rescale platform. Details on End To End Desktops can be found here. We will create an input file from the respective ANSYS software, start a Rescale job, submit, open an interactive session, and transfer the results back to ANSYS.
When you submit jobs to the workstation, you are limited to the resources on the workstation. ANSYS provides an option to scale up and submit jobs to a larger remote cluster. However, the workflow is complicated. End-to-End Desktops automates this process and hence provides the option to submit jobs to a large cluster with ease. ANSYS Optimization and Parameter sweeps are complicated and End-to-End Desktops provide a seamless methodology to run such jobs on the Rescale platform.
The job files for this tutorial can be accessed by clicking the Import Job Setup button below. Download the tutorial:
In this section, we will begin with the job input files. The input files for this example, are for that of a Motor NVH Optimization workflow. This involves the coupling of electromagnetic force from Maxwell to structural harmonic and acoustics.
- Maxwell:2D Transient
- Structural: 3D Harmonic
- Acoustics: 3D Harmonic
- Interested frequency range: 2000 - 4800 Hz
|Machine Type||Internal Permanent Magnet Adjustable Speed Motor|
|Rated Output Power||75kW|
|Number of Poles||8|
In order to begin, the input files must be uploaded to the Rescale Platform. On the Rescale platform, preform the following actions:
Log into the rescale platform
Click on the + New Job icon on the top left hand corner of the dashboard
Name the job something appropriate
Click on Upload from this computer and browse to the location where the workbench archive was saved. Select the file and click Open
Next, click next at the bottom right hand corner of the page to continue on to software settings
Now that the input files have been incorperated into the job, we will now choose the software enviornment we wish to utilize.
Check the box labeled Launch an End-to-end desktop (interactive mode) located to just below the workflow schematic.
Click on the +Add Software button, search with keywords ANSYS and select workbench software v19.2 from the menu.
Select the desired licensing option. If you wish to use Rescale Licenses, select the Use On-Demand License by checking the box as shown below. Also, check the box to agree to the Software Licensing Agreement.
Alternatively, if you are using your own licenses, select the Use Existing License and specify the relevant licensing information.
Click on Next to move on to hardware settings
On the Hardware Settings page, you are able to select the hardware configuration you would like to run the simulation on. In this tutorial we will choose:
Core Type: Emerald with on-demand option
Number of Cores: 18
The hardware summary page would provide details of the Hardware Settings that have been selected (see below):
Be sure to set a Maximum Job Duration so that the cluster will be terminated after the simulation
Now, you can click on Submit on the top right of the screen to launch the job
Launch End-to-End Desktop
Once the job is launched, you will notice that it looks very similar to a batch job with an additional button to Connect Interactive Session on the top right of the screen
Go to the Status Tab to view the progress of the job submission
Click on Connect Interactive Session on the top right of the screen. This will open an in-browser End-to-End Desktop that is running Linux. Alternatively, you can connect to your local desktop using your choice of VNC client. Instructions on how to do this can be found here.
- Once the Desktop is launched, you will see the icon for ANSYS Workbench. Click on the icon to launch
- Once ANSYS Workbench is launched, click on File and then click on Open. Browse to the shared folder as shown below and select the input file. Click on Open. You will be prompted to save the file. Click on Save in the same folder
The Project Schematic will be displayed like the image below. The next few steps will show how to submit this analysis and distribute it across the cluster.
Once the Project Schematic has been displayed. Right click on Parameters and click on Properties On this workbench project, the force is varied and the output is Equivalent stress. These are 8 design points. The next few steps will show how to submit this analysis and distribute it across the cluster.
On the Parameter Set tab you will see the Solution Process Settings. Use the following settings. For Update Option select ** Submit to Remote Solver Manager**. Set RSM Queue to Local. This will allow the job to distribute by default
Under Design Point Update Proceiss, use the following settings. Set Job Submission to One job for Each Design Point. Set Component Execution Mode to Parallel. Set Number of Processes to 2. Each of the 8 design points will utilize 2 cores and hence 16 cores in total. Emerald settings do not allow for 16 so the hardware settings must be set to 18 cores in total.
Under License Checkout, set option to On-Demand. Each job will checkout a license with this option. The other option is to use Reserved License which allows you to use parametric packs, which might be a more viable option for parametric runs
By clicking Next, we can Review the Job setup.
4 Input parameters have been setup in Maxwell, including:
- Width of slot opening (Slot_Open)
- height of the slot opening (Slot_Open_Height)
- Q-axis flux path width on the rotor (Qaxis_Width)
- thickness of rotor magnetic bridge near the airgap (Flux_Bridge)
Go to the tool box on the righthand side, dropdown to the optiSLang plugin and add a sensitivity system to the project schematic. Ensure that the workstation is connected to the workbench parameter set. With Sensitivity open set the parameter selections and range to the following settings
- Set Zlength_m and speed_mech_rpm to constant
- Set the range for the four parameters as following then click Next
- In Sampling Method choose Other then click Next
- Choose number of samples that is needed and then hit “finish”
To update design points simultaneously, highlight Parameter Set and right click properties
- Set up Update Option and Job Submission.
- Component Execution Mode is for number of cores to be used for each solver.
Save the project. The model is ready to submit at this point and it will take roughly 30 minutess (Right Click DOE -> Update). A completed model is saved at ws2.proj
The design results of this process can be viewed on though the Results sensitivity tab or the Result Designs tab located in the NPQL tab located in Optimization.