COMSOL 4.1 API Changes

The following changes were made to the COMSOL API between version 4.0a and 4.1:

  • In version 4.0a the property nonlin in the stationary solver could have the values auto, on, off, and linearized. The default was in most cases auto, but in some cases, specifically in a frequency-domain study, the default was linearized. In version 4.1 the possible values are auto, on, off, and linper, with auto as default, except in the Frequency Domain, Linearized study step where the default is linper. The value linearized can still be set, but this is treated as auto. If the problem is linear and the linearization point is zero, auto should give the same solution as linearized. For nonlinear problems where the linearization point is zero, the solution given by auto might be slightly different, and probably more accurate, while changing to off should give exactly the same solution as linearized. When there is a nonzero linearization point it is relevant to use option linper. This option works like linearized except that source terms which are to contribute in the linearized problem must be enclosed by the linper operator.
  • In this CFD Module, Earth Science mode, in the Darcy’s Law interface, Brinkman interface, Richards’ Equation interface, and the Poroelasticity interface, the permeability and porosity are now material parameters and they do no longer have a default value. If the default value was used in a java file you now have to set the value. The following example sets the permeability to the old default value:

    model.physics(“dl“).feature(“dlm1“).set(kappa_mat,userdef);
    model.physics(“dl“).feature(“dlm1“).set(kappa,3e-11);

  • The pressure variable in solid mechanics, typically solid.pw, now only gets allocated degrees of freedom for incompressible materials. If you have referred to it, for example, during segregation in the solver, the code will have to be changed to remove the field.
  • The solution to eigenvalue and eigenfrequency problems may now appear in a different order.

COMSOL 4.0a API Changes

The following changes were made to the COMSOL API between version 4.0 and 4.0a:

  • The load face parameter (Fph) of the Phase feature in AcousticStructure, TransientAcousticStructure, ThermallyInducedStresses, SolidMechanics, JouleHeatingThermalExpansion, Poroelasticity, and FluidStructureInteraction has changed interpretation from degrees to radians.
  • physics.field() of Beam and Truss are not backward compatible with 4.0. Scalar fields are now vector fields.
  • The variables for strain and stress in the Shell interface have been renamed. Variable names that began with lowercase s now begin with uppercase S. For variables names that ended in lowercase l (L), the letter was moved to the third position, e.g., emXXl is now emlXX.
  • Force loads on solids and trusses have been moved from material to spatial frame. This implies that index notation of some variables have changed from uppercase XYZ to lowercase xyz.

1 The acoustics interfaces (PressureAcoustics, TransientPressureAcoustics, AcousticStructure, and TransientAcousticStructure) have been moved from material to spatial frame. This implies that index notation of vector variables have change from uppercase XYZ to lowercase xyz.