Difference between revisions of "COMSOL"

Line 3: Line 3:
''From the COMSOL Website:'' '''COMSOL Multiphysics®''' is a general-purpose software platform, based on advanced numerical methods, for modeling and simulating physics-based problems. With COMSOL Multiphysics, you will be able to account for coupled or multiphysics phenomena. With more than 30 add-on products to choose from, you can further expand the simulation platform with dedicated physics interfaces and tools for electrical, mechanical, fluid flow, and chemical applications. Additional interfacing products connect your COMSOL Multiphysics simulations with technical computing, CAD, and ECAD software.
''From the COMSOL Website:'' '''COMSOL Multiphysics®''' is a general-purpose software platform, based on advanced numerical methods, for modeling and simulating physics-based problems. With COMSOL Multiphysics, you will be able to account for coupled or multiphysics phenomena. With more than 30 add-on products to choose from, you can further expand the simulation platform with dedicated physics interfaces and tools for electrical, mechanical, fluid flow, and chemical applications. Additional interfacing products connect your COMSOL Multiphysics simulations with technical computing, CAD, and ECAD software.


{{AppVersion|5.2}}
{{AppVersion|5.2a}}


{{AuthorizedUsers}}
{{AuthorizedUsers}}
Line 10: Line 10:
*Workstation/PC, Cluster
*Workstation/PC, Cluster


{{AppModule|apps/comsol/5.2}}
{{AppModule|apps/comsol/5.2a}}


=== Available COMSOL Modules ===
=== Available COMSOL Modules ===
Line 34: Line 34:
{{SLURMAppParams}}
{{SLURMAppParams}}


The fastest and easiest way to run COMSOL jobs on the CIRCE HPC cluster, is to run them via '''Web Apps'''. Click [https://cwa.rc.usf.edu/cwa_applications/research-computing/54 here] to run COMSOL 5.2.
The fastest and easiest way to run COMSOL jobs on the CIRCE HPC cluster, is to run them via '''Web Apps'''. Click [https://cwa.rc.usf.edu/cwa_applications/research-computing/54 here] to run COMSOL 5.2a.


Other versions of COMSOL can be found using the '''Web Apps''' tab at the top of the page.
Other versions of COMSOL can be found using the '''Web Apps''' tab at the top of the page.
Line 44: Line 44:
Once connected to CIRCE, you can open COMSOL using the steps below:
Once connected to CIRCE, you can open COMSOL using the steps below:


<pre style="white-space:pre-wrap; width:40%; border:1px solid lightgrey; background:#000000; color:white;">[user@login0 ~]$ module add apps/comsol/5.2
<pre style="white-space:pre-wrap; width:40%; border:1px solid lightgrey; background:#000000; color:white;">[user@login0 ~]$ module add apps/comsol/5.2a
[user@login0 ~]$ comsol</pre>
[user@login0 ~]$ comsol</pre>


Line 64: Line 64:


module purge
module purge
module add apps/comsol/5.2
module add apps/comsol/5.2a


export TMPDIR=&quot;/path/to/temp/dir&quot;
export TMPDIR=&quot;/path/to/temp/dir&quot;
Line 87: Line 87:


module purge
module purge
module add apps/comsol/5.2
module add apps/comsol/5.2a


export TMPDIR=&quot;/path/to/temp/dir&quot;
export TMPDIR=&quot;/path/to/temp/dir&quot;

Revision as of 16:41, 23 August 2016

Description

From the COMSOL Website: COMSOL Multiphysics® is a general-purpose software platform, based on advanced numerical methods, for modeling and simulating physics-based problems. With COMSOL Multiphysics, you will be able to account for coupled or multiphysics phenomena. With more than 30 add-on products to choose from, you can further expand the simulation platform with dedicated physics interfaces and tools for electrical, mechanical, fluid flow, and chemical applications. Additional interfacing products connect your COMSOL Multiphysics simulations with technical computing, CAD, and ECAD software.

Version

  • 5.2a

Authorized Users

  • CIRCE account holders
  • RRA account holders
  • SC account holders

Platforms

  • CIRCE cluster
  • RRA cluster
  • SC cluster
  • Workstation/PC, Cluster

Modules

COMSOL requires the following module file to run:

  • apps/comsol/5.2a

Available COMSOL Modules

  • AC/DC Module
  • CFD Module
  • Chemical Reaction Engineering Module
  • Heat Transfer Module
  • MEMS Module
  • Microfluidics Module
  • Nonlinear Structural Materials Module
  • Particle Tracing Module
  • RF Module
  • Structural Mechanics Module
  • Subsurface Flow Module
  • CAD Import Module
  • ECAD Import Module
  • LiveLink for MATLAB

Running Jobs via Web Apps

The COMSOL user guide is essential to understanding the application and making the most of it. The guide and this page should help you to get started with your simulations. Please refer to the Documentation section for a link to the guide.

  • Note on CIRCE: Make sure to run your jobs from your $WORK directory!
  • Note: Scripts are provided as examples only. Your SLURM executables, tools, and options may vary from the example below. For help on submitting jobs to the queue, see our SLURM User’s Guide.

The fastest and easiest way to run COMSOL jobs on the CIRCE HPC cluster, is to run them via Web Apps. Click here to run COMSOL 5.2a.

Other versions of COMSOL can be found using the Web Apps tab at the top of the page.

If you need more control over your workflow, keep reading below.

Jobs Shorter than 30 Minutes in Length

Once connected to CIRCE, you can open COMSOL using the steps below:

[user@login0 ~]$ module add apps/comsol/5.2a
[user@login0 ~]$ comsol

Running COMSOL on CIRCE

The COMSOL user guide is essential to understanding the application and making the most of it. The guide and this page should help you to get started with your simulations. Please refer to the Documentation section for a link to the guide.

  • Note on CIRCE: Make sure to run your jobs from your $WORK directory!
  • Note: Scripts are provided as examples only. Your SLURM executables, tools, and options may vary from the example below. For help on submitting jobs to the queue, see our SLURM User’s Guide.

Running Comsol on CIRCE is quite trivial. When you are ready to run the solver against your model, save the model and copy the ‘.mph’ file to CIRCE via which ever method you prefer and run:

sbatch --job-name=mymodel.mph runcomsol.sh

You will need to add the following information in a script file and reference it in the sbatch command argument:

#!/bin/bash
#
#SBATCH --time=04:00:00
#SBATCH --mem-per-cpu=2048
#SBATCH --ntasks=8

#### SLURM 8 processor COMSOL test to run for 4 hours.

module purge
module add apps/comsol/5.2a

export TMPDIR="/path/to/temp/dir"

comsol -clustersimple batch -inputfile ${SLURM_JOB_NAME} \
       -outputfile ${SLURM_JOB_NAME//\.mph/}.out.mph \
       -batchlog ${SLURM_JOB_NAME}.${SLURM_JOB_ID}.comsol_log \
       -tmpdir $TMPDIR


For non-distributed, SMP jobs, the following script will work:

#!/bin/bash
#
#SBATCH --time=24:00:00
#SBATCH --mem=16384
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=12

#### SLURM 12 processor COMSOL test to run for 24 hours.

module purge
module add apps/comsol/5.2a

export TMPDIR="/path/to/temp/dir"

comsol batch -np ${SLURM_NTASKS} -inputfile ${SLURM_JOB_NAME} \
        -outputfile ${SLURM_JOB_NAME}.${SLURM_JOB_ID} \
        -batchlog ${SLURM_JOB_NAME}.${SLURM_JOB_ID}.comsol_log \
        -tmpdir $TMPDIR


Solution data will be stored within the ‘.mph’ file and can be viewed on your local machine simply by copying the file back once you are done. A preferred way to deal with this is to use your home directory share to map your CIRCE home directory as a network drive. Then, you can simply save the file to the network drive, move it to your /work directory, and run the simulation on CIRCE. When the simulation is complete, copy the file back to your home on CIRCE, and re-open the file to review the results on your desktop.

Documentation

Home Page, User Guides, and Manuals

Benchmarks, Known Tests, Examples, Tutorials, and Other Resources

More Job Information

See the following for more detailed job submission information:

Reporting Bugs

Report bugs with COMSOL to the IT Help Desk: rc-help@usf.edu