Release Notes > Chemical Reaction Engineering Module > Backward Compatibility with Version 5.0 and Earlier

Backward Compatibility with Version 5.0 and Earlier
reaction Engineering and Chemistry interfaces
The API syntax for creating surface species has changed. Running Java® files from previous versions may fail due to the new default name indexes, including ads for surface species and s for solids in the Reaction Engineering and Chemistry interfaces. The surface species names and solid species names need to be changed accordingly in any Java® code:
The following shows an example of the needed code change:
Version 5.0 and earlier:
model.physics("re").feature("rch1").set("formula", "A+B(S)=>C+D(s)");
model.physics("re").feature("spec1").set("specName", "As(s)");
model.physics("chem").feature("rch1").set("formula", "A+B(S)=>C+D(s)");
model.physics("chem").feature("spec1").set("specName", "As(s)");
Change this to
Version 5.2 and later:
model.physics("re").feature("rch1").set("formula", "A+B(s)=>C+D(ads)");
model.physics("re").feature("spec1").set("specName", "As(ads)");
model.physics("chem").feature("rch1").set("formula", "A+B(s)=>C+D(ads)");
model.physics("chem").feature("spec1").set("specName", "As(ads)");
Transport of Concentrated Species Interface
Updated Internal Variable Names
The internal variable names of vector and tensor components have changed in the Transport of Concentrated Species interface. In most cases, users will not be affected by this change. When opening a model file created in a previous version, the previous variable definitions remain. However, when updating or recomputing the solution, new variable names will be generated. This means that if any of these variable names have been used in a user-defined expression or plot, they need to be updated manually as described below.
In version 5.1, the spatial direction indicator string (x, xy, and so on) has been moved to the end of the variable name. This applies to all vector and tensor variables generated by the interface.
For example, the diffusive flux vector components have changed (in 5.0 and earlier) from
tcs.dfluxx_w1, tcs.dfluxy_w1, tcs.dfluxz_w1
to (in 5.2 and later)
tcs.dflux_w1x, tcs.dflux_w1y, tcs.dflux_w1z
and the components of the diffusion tensor, defined by the Fick’s Law diffusion model, have been changed (in 5.0 and earlier) from
tcs.Dfxx_w1, tcs.Dfxy_w1, tcs.Dfxz_w1, tcs.Dfyx_w1, ...
to (in 5.2 and later)
tcs.Df_w1xx, tcs.Df_w1xy, tcs.Df_w1xz, tcs.Df_w1yx, ...
Java® API Syntax Changes
The API syntax for setting physics properties has been changed in the Transport of Concentrated Species interface. Now the property name corresponds to the name of the GUI section containing the property. In order to run Java® files from previous versions, apply the syntax changes as given in the examples below:
Version 5.0 and earlier:
model.physics("tcs").prop("DiffusionModel").setIndex("DiffusionModel", "MaxwellStefan", 0);
model.physics("tcs").prop("DiffusionModel").setIndex("DiffusionModel", "MixtureAveraged", 0);
model.physics("tcs").prop("DiffusionModel").setIndex("DiffusionModel", "FicksLaw", 0);
model.physics("tcs").prop("Convection").setIndex("Convection", "0", 0);
model.physics("tcs").prop("Migration").setIndex("Migration", "0", 0);
model.physics("tcs").prop("Regularization").setIndex("Regularization", "1", 0);
For version 5.2 and later, change this to:
model.physics("tcs").prop("TransportMechanism").set("DiffusionModel", "MaxwellStefan");
model.physics("tcs").prop("TransportMechanism").set("DiffusionModel", "MixtureAveraged");
model.physics("tcs").prop("TransportMechanism").set("DiffusionModel", "FicksLaw"); model.physics("tcs").prop("TransportMechanism").set("Convection", false);
model.physics("tcs").prop("TransportMechanism").set("Migration", false); model.physics("tcs").prop("AdvancedSettings").set("Regularization", "0");
Surface Reactions Interface
Updated Internal Variable Names
The same pattern for vector and tensor variable name changes, as described in the Transport of Concentrated Species Interface section above, holds true for the Surface Reactions interface in version 5.2a.
Java® API Syntax Changes
The API syntax for setting the diffusion tensor of surface species, the molar mass and density of the bulk species, and initial values have been changed in the Surface Reactions interface.
Setting Diffusion Tensor
 
The surface species name needs to be included in the first argument of the set method. In order to run Model Java® files from previous versions, apply the syntax changes as shown in the example below:
Version 5.0 and earlier:
model.physics("sr").feature("sp1").set("D_0", new String[]{"Dcs1", "0", "0", "0", "Dcs1", "0", "0", "0", "Dcs1"});
model.physics("sr").feature("sp1").set("D_1", new String[]{"Dcs2", "0", "0", "0", "Dcs2", "0", "0", "0", "Dcs2"});
For version 5.2 and later, change this to:
model.physics("sr").feature("sp1").set("D_cs1", new String[]{"Dcs1", "0", "0", "0", "Dcs1", "0", "0", "0", "Dcs1"});
model.physics("sr").feature("sp1").set("D_cs2", new String[]{"Dcs2", "0", "0", "0", "Dcs2", "0", "0", "0", "Dcs2"});
Setting Molar Mass and Density
 
The bulk species name needs to be included in the first argument of the setIndex method. Apply the Java® API syntax changes as shown in the example below:
Version 5.0 and earlier:
model.physics("sr").feature("sp1").set("M_0", "Mcb1");
model.physics("sr").feature("sp1").set("M_1", "Mcb2");
 
model.physics("sr").feature("sp1").set("rho_0", "rhocb1");
model.physics("sr").feature("sp1").set("rho_1", "rhocb2");
For version 5.2 and later, change this to:
model.physics("sr").feature("sp1").setIndex("M_cb1", "Mcb1", 0);
model.physics("sr").feature("sp1").setIndex("M_cb2", "Mcb2", 0);
 
model.physics("sr").feature("sp1").setIndex("rho_cb1", "rhocb1", 0);
model.physics("sr").feature("sp1").setIndex("rho_cb2", "rhocb2", 0);
Setting Initial Values
 
Apply the Java® API syntax changes as shown in the example below:
Version 5.0 and earlier:
model.physics("sr").feature("init1").set("cs1", "cs10");
model.physics("sr").feature("init1").set("cs2", "cs20");
model.physics("sr").feature("init1").set("cb1", "cb10");
model.physics("sr").feature("init1").set("cb2", "cb20");
For version 5.2 and later, change this to:
model.physics("sr").feature("init1").setIndex("initcs", "cs10", 0);
model.physics("sr").feature("init1").setIndex("initcs", "cs20", 1);
model.physics("sr").feature("init1").setIndex("initcb", "cb10", 0);
model.physics("sr").feature("init1").setIndex("initcb", "cb20", 1);