Mechanical / Map-DL


Ansys Mechanical is a finite element analysis (FEA) tool that enables you to analyze complex product architectures and solve difficult mechanical problems. You can use Ansys Mechanical to simulate real world behavior of components and sub-systems, and customize it to test design variations quickly and accurately. ANSYS Mechanical has interfaces to other pre and post processing packages supplied by ANSYS and can make use of built in MPI to utilize multiple cross node CPU and can scale to hundreds of cores.


Module loading

After connecting to Bessemer (see Establishing a SSH connection), you can start an interactive graphical session or submit a batch job using ANSYS programs activating them and making them available with one of the module load commands below:

module load ANSYS/19.4
module load ANSYS/20.1/binary
module load ANSYS/20.2/binary
module load ANSYS/21.1/binary

Interactive jobs

While using a X11 GUI forwarding supported SSH client, an interactive session can be started on Bessemer with the srun --pty bash -i command which supports graphical applications. You can load an ANSYS module above and then start the ANSYS mechanical launcher program by running the launcher command.

If desired, the ANSYS Workbench GUI executable can be launched with the ansyswb command. To use more than a single core, you should write a batch job script and ANSYS mechanical APDL script file for submission to the batch queues.


Batch jobs

MAPDL is capable of running in both MPI and SMP parallel environments but will use its in-build MPI communications for both. On Bessemer, cross node jobs are not permitted and there is no mpi-rsh parallel environment. This necessitates the use of the default SMP OpenMP parallel environment (up to 40 cores on a single node only). The lack of other options compared to ANSYS Mechanical on ShARC is as a result of execution on a single node not requiring these options.

Sample SMP MAPDL Scheduler Job Script

Mapdl mechanical: the following is an example batch submission script, mech_job.sh, to run the mechanical executable mapdl with input file CrankSlot_Flexible.inp, and carry out a mechanical simulation. The script requests 2 cores using the SMP parallel environment with a runtime of 60 mins and 2 GB of real memory per core.

Hint

  • The argument $SLURM_NTASKS is a SLURM scheduler variable which will return the requested number of tasks.

#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=2
#SBATCH --mem=4000
#SBATCH --job-name=ansys_mech-test
#SBATCH --output=output_ansys_mech_test
#SBATCH --time=01:00:00
#SBATCH --mail-user=joe.bloggs@sheffield.ac.uk
#SBATCH --mail-type=ALL
module load ANSYS/20.2
mapdl -smp -dir $(pwd) -b -np $SLURM_NTASKS -j solution -i CrankSlot_Flexible.inp

The job is submitted to the queue by typing:

sbatch mech_job.sh