Comsol
Overview
COMSOL Multiphysics (formerly FEMLAB) is a finite element analysis and solver software package for various physics and engineering applications, especially coupled phenomena, or multiphysics. COMSOL Multiphysics also offers an extensive and well-managed interface to MATLAB and its toolboxes for a large variety of programming, preprocessing and postprocessing possibilities. A similar interface is offered to COMSOL Script. The packages are cross-platform (Windows, Mac, Linux, Unix.) In addition to conventional physics-based user-interfaces, COMSOL Multiphysics also allows for entering coupled systems of partial differential equations (PDEs). The PDEs can be entered directly or using the so called weak form (see finite element method for a description of weak formulation).
Setup
No special setup is required to run Comsol.
Usage
- Interactive usage: To start Comsol GUI, use the command:
- Batch run - serial: Start the solver with your input file with the following command:
comsol batch <input file>
|
The input file is a file with .m extension. However, extension is omitted in the command line. See the following sample pbs script for running comsol script in batch:
#PBS -l nodes=1:ppn=1,walltime=12:30:00
#PBS -joe
cd $PBS_O_WORKDIR
comsol batch ht
|
Commands requiring a response from the user cannot be included in the script. Plots will not remain on the screen after you have run the batch, and you will lose all data that the script has not saved to file. You can run a m-file created in COMSOL Multiphysics in batch mode, provided that you delete all plot commands from the m-file before you run it. File IO functions such as save, load, fread, fwrite, fscanf, and fprintf are also not available, but saving and loading mph-files using flsave and flload is possible.
- Batch run- parallel: The parallel sections of Comsol are based on the parallel shared memory model. The solvers, assembly and meshing in Comol Multiphysics and the linear algebra functions in Comsol script benefit from parallelism. Use following command:
The sample pbs script is given below:
#PBS -l nodes=1:ppn=4,walltime=24:00:00
#PBS -joe
cd $PBS_O_WORKDIR
export COMSOL_NUM_THREADS=4
comsol -np 4 batch ht
|
- Comsol in Matlab: Comsol functions can be run in matlab. For more information, use following commands:
comsol --help
comsol matlab --help
|
- Comsol supports client-server mode where Client will be installed in your local machine which can be used to build models only. All the computation load will be taken by the server. Contact beatnic@aset.psu.edu if you need to install the client.
Documentation
Official documentation is available through Comsol menu--> help. PDF/HTML files of the documentation can be downloaded from /usr/global/comsol/doc on any system that Comsol is installed on.
Please send questions or suggestions about this web page to beatnic@aset.psu.edu
ASET | ITS | Penn State
|