Wiki: Common mistakes

In this page, we will be sharing some common errors that might occur in Comsol and their solutions. We are planning to continuously update this page throughout the semester and hopefully, this will become a reference during your projects as well.

Please don’t hesitate to post comments below or send emails to us if you experience any other problems.

P&S Comsol Team: Manuel Kohli, Raphael Schwanninger

Common Mistakes:

  • Not assigning materials to all the domains.
  • Not entering required material parameters.
  • Not meshing all the domains.
  • Not assigning proper boundary conditions: Especially if you have ports.
  • Wrong ordering of study steps. (Frequency Domain should be the last step)
Stationary Solver  
Error Message:  “- Feature: Stationary Solver 1 (sol1/s1)   Failed to find a solution.    Singular matrix.” 
Possible Solutions: Make sure you defined your ports correctly: Boundary selection Type of port: e.g. numeric (each ports needs their own boundary mode analysis in the study if they are numerically defined) Wave excitation: on/off (input/output)
Error Message: “- Feature: Stationary Solver 1 (sol1/s1)    Division by zero.    – Function: /    Failed to evaluate expression. … ” 
Possible Solutions:Study steps might be listed in wrong order: 
COMSOL works top-down. Make sure that study steps (e.g.boundary mode analysis) are listed higher than dependent study steps (e.g. frequency domain) If you also have parametric sweep, then in should be the top one to cover the other ones with the sweep.

2 comments on «Wiki: Common mistakes»

  1. Hello,

    I followed your advises but the problem still occurs.

    I am simulating Electric field propagation from an top coupled SMF-28 fiber into an uniform grating coupler, and then waveguide.

    In the meantime, I also changed the frequency domain study settings.
    Indeed, I changed the ” Values of Dependent Variables ” into the following ones :

    Method: Initial expression
    Study: Zero solution

    I think that errors came from the fact that COMSOL was looking for “initial conditions” for the new physics variable to come from the stored solution, which doesn’t contain any information on the new physics variables that have just been added to the model.

    However, even after all of these changes, problem still occurs.

    I will be glad to exchange by email ( ) with someone who already faced that problem, so that I can even share my COMSOL file.

    Feel free to provide any advises.

    Thank you in advance for your cooperation.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.