PolyUMod Installation for COMSOL Multiphysics

In this tutorial you will learn to:

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.

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

Copy the file com.comsol.testextmat_1.0.0.jar from the folder C:\Program Files\PolymerFEM\PolyUMod\PolyUMod_COMSOL_v5.5 to the COMSOL folder C:\Program Files\COMSOL\COMSOL55\Multiphysics\plugins.

4. Change the COMSOL Multiphysics Preferences

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_v54.mph located in the folder C:\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:

  1. Right click on Global Definition > Materials and select External Material.
  2. 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.
  3. 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.
  4. Rename the State Name to SS or any other variable not already used by COMSOL Multiphysics.
  5. 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.
  6. 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

  1. We recommend only using the PolyUMod materials with Time Dependent solvers. Inertia terms may be ignored by setting Structural Transient Behavior to Quasi-static.
  2. 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.
  3. 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.
  4. Set Consistent initialization to Off. Manually check that the initial conditions are consistent.
  5. 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:

  1. Confirm that a Time Dependent solver is selected.
  2. Confirm that Steps taken by the time dependent solver is set to Strict.
  3. Confirm that Consistent initialization in the time dependent solver is set to Off.
  4. Confirm PolyUMod license is active. If inactive, a window will pop up with the message “Fatal Error: can’t read license data”.
  5. 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.