Release Notes > The COMSOL API for Use with Java® > COMSOL 4.4 API Changes

COMSOL 4.4 API Changes
Physics Interfaces
The default Initial Value features in the following interfaces have been extended:
-
-
-
-
Previously, only the initial mass fractions could be specified. Now, the initial values can be specified in terms of mass fractions, mole fractions, molar concentrations, number densities, or densities. When opening an old Model MPH file, Mixture specification is set to Mass fractions, and the mass fractions specified are entered in the respective text fields. In old model files for Java®, commands specifying the initial value of a mass fraction return an error in version 5.0 and later. To specify the initial mass fraction of a species w2, which is the second in the list of species (seen in the Dependent Variables section when clicking the interface), change the COMSOL API Java® command
model.physics("chcs").feature("init1").set("w2", 1, "0.1");
to
model.physics("chcs").feature("init1").set("w0", 2, "0.1");
The Pressure Acoustics, Frequency Domain interface and the Boundary Mode Acoustics interface have a new default feature. If the default feature has been edited in a Java® file, the following line should be added to the Java® file to obtain the old behavior for Pressure Acoustics, Frequency Domain:
model.physics("acpr").feature().create("pam1",
"PressureAcousticsModel").selection().all();
or
model.physics("acbm").feature().create("pam1",
"PressureAcousticsModel").selection().all();
for Boundary Mode Acoustics.
This line should be added directly after the line where the physics interface is created.
-
In version 5.2 and later: mod1_solid_contact_old_p1, mod1_solid_cm_old_p1.
-
In version earlier than 5.0: mod1_solid_contact_p1_old, mod1_solid_cm_p1_old.
The parameter form in the property EquationForm can no longer be set to ModeAnalysis in 3D and 2D axisymmetric calculations for the Pressure Acoustics, Frequency Domain and Pressure Acoustics, Transient interfaces. In these cases, the parameter modeFreq has been removed.