PolyUMod Installation for COMSOL Multiphysics

In this tutorial you will learn to:
- Verify that your PolyUMod installation is properly setup for use with COMSOL Multiphysics
PolyUMod is a licensed set of advanced user-material models delivered as a shared library (usermat) for COMSOL Multiphysics. Running a COMSOL Multiphysics model using a PolyUMod material model therefore requires both the PolyUMod license and the PolyUMod-COMSOL shared library. This is normally configured as part of the Polymer FEM software installation. This document demonstrates how to verify that configuration.
Note that steps 1 and 2 are optional, as they should have been performed by the PolyUMod Installer.
1. Check that the License Server is Running
Confirm that the PolyUMod license server is running by opening the license server website, e.g. https://10.0.0.123:5054
if the license is served on a computer with the IP address 10.0.0.123
, or https://localhost:5054
if served locally.
For more info check the the license server user’s manual, and our tutorial on the license server.
2. Check the License Environment Variable
Confirm that the RLM_LICENSE
environment variable points to the license server. The variable should have a value like: 5053@localhost
, where you need to replace localhost
with the host name of the license server.
3. Copy jar-File
This step is not needed in COMSOL Multiphysics version 6.0 and later.
Copy the file com.comsol.testextmat_1.0.0.jar
from the folder C:\Program Files\PolymerFEM\PolyUMod\PolyUMod_COMSOL\COMSOL_v5.6
to the COMSOL folder C:\Program Files\COMSOL\COMSOL56\Multiphysics\plugins
.
4. Change the COMSOL Multiphysics Preferences
Note that this step is not necessary when using COMSOL Multiphysics version 5.6 and later.
Open the preferences dialog in COMSOL Multiphysics, and go to the security
section. Change the settings to the following.
5. Run a Test Case
Run a PolyUMod test using the following commands:
- Start COMSOL Multiphysics
- Open COMSOL model
PolyUModCOMSOL_TNM_Demo1.mph
located in the folderC:\Program Files\PolymerFEM\PolyUMod\Test_Cases_COMSOL
- Expand the Global Definitions > Materials > External Material node and click browse at the library input. Locate the polyumod.dll file. Make sure the text includes the full path and not just the filename.
- Run Study 1.
- The installation is successful if Study 1 runs to completion.
COMSOL Multiphysics Settings
Perform the following steps when setting up a COMSOL Multiphysics simulation that is using PolyUMod:
- Right click on
Global Definition
> Materials
and selectExternal Material
. - In the Library input locate the polyumod.dll file. By default, this file should be the PolyUMod installation directory in sub-folder
C:\Program Files\PolymerFEM\PolyUMod\PolyUMod_COMSOL
.
Provide the full path in the input box, not just the filename. The directory used here must be included in the PATH environment variable. See installation for details. - Change the Interface Type to
Lagrangian Interface to PolyUMod
. If this option is not available check that the .jar file specified in the installation is copied to the right place. - Rename the State Name to
SS
or any other variable not already used by COMSOL Multiphysics. - Define the Material model parameters array in the Material Contents section. The array has the PolyUMod material constants, comma separated and enclosed in {} brackets. This array can be input manually or exported from the MCalibration software.
- Input the Number of states according which is also output by the MCalibration software and depends on the selected material model
In the Solid Mechanics physics select Material Models > External Stress-Strain Relation
. Select the applicable domains and make sure the External material input points to the correct external material model.
Recommended Analysis Settings
- We recommend only using the PolyUMod materials with Time Dependent solvers. Inertia terms may be ignored by setting Structural Transient Behavior to Quasi-static.
- In the Time Dependent Solver node set Steps taken by solver to Strict. This requires COMSOL to solve exactly at the time steps required for output.
- Set the Maximum step to a reasonably small value that ensures the solver will not take big steps. This is important since most of the material models in PolyUMod are path
dependent, and large steps compromise material model accuracy. - Set Consistent initialization to Off. Manually check that the initial conditions are consistent.
- Both Segregated and Fully Coupled solvers can be used with PolyUMod. If you use a Fully Coupled solver set Maximum number of iterations to 10. Also use one of the following solver Newton iteration settings:
a. Set Nonlinear method to Automatic (Newton)
b. Set Nonlinear method to Constant (Newton) and set Jacobian update to On every iteration. This helps with convergence for highly nonlinear material models.
Error Checking
If a COMSOL with PolyUMod material does not converge then check the following:
- Confirm that a Time Dependent solver is selected.
- Confirm that Steps taken by the time dependent solver is set to Strict.
- Confirm that Consistent initialization in the time dependent solver is set to Off.
- Confirm PolyUMod license is active. If inactive, a window will pop up with the message “Fatal Error: can’t read license data”.
- Confirm that the polyumod.dll file is in a directory defined in the PATH.
Final Notes
Please contact us at support@PolymerFEM.com if you have any problems installing or using PolyUMod with COMSOL.