Skip to content

COMSOL

COMSOL Multiphysics is a finite element analysis, solver, and simulation software package for various physics and engineering applications, especially coupled phenomena and multiphysics.

COMSOL is available as a module on Apocrita.

Usage

To run the default version of COMSOL, simply load the comsol module:

$ module load comsol
$ comsol --help

Usage: comsol [options] [target] [target arguments]

COMSOL commands:

   comsol                       Run COMSOL Multiphysics Desktop
   comsol batch                 Run a COMSOL job
   comsol compile               Compile a model file for Java or compile an
                                  application into an executable application
                                  (the latter option requires COMSOL Compiler)
   comsol mphclient             Run COMSOL Multiphysics Desktop client
   comsol mphserver             Run COMSOL Multiphysics Server
   comsol mphserver matlab      Run MATLAB with COMSOL Multiphysics Server
   comsol hydra                 Run Hydra commands
   comsol mpd                   Run MPD commands

The above output has been truncated, run the comsol [command] --help command to see the full list of available options.

Example job

GUI support via OnDemand

To use the COMSOL GUI, launch the software via the OnDemand COMSOL interactive app. If you see a "Graphics Initialisation Failed" message box, delete the running COMSOL OnDemand job, and start a new session - you should not see this message on subsequent job launches.

Serial job

Here is an example job running on 4 cores and 20GB of memory:

#!/bin/bash
#$ -cwd
#$ -j y
#$ -pe smp 4
#$ -l h_vmem=5G

module load comsol

comsol batch -np auto \
             -tmpdir "${TMPDIR}" \
             -inputfile inputfile \
             -outputfile outputfile \
             -study study001

References