Global Control Variables
Specify those components of the Global Control Variables that are globally available. To add this feature, either right-click the Optimization interface node and select it from the context menu, or on the Physics toolbar, click Global Control Variables (). In some cases, select it from the Global submenu.
Control Variables
In the table, enter Variable names, Initial values, and Lower and Upper Bounds of global control variables. To specify equality constraints, simply make sure the upper and lower bounds have the same value.
Move control variable rows up and down using the Move up () and Move down () buttons. To remove a control variable, select some part of that variable’s row in the table and click the Delete button (). You can also save the definitions of the global control variables to a text file by clicking the Save to file button () and using the Save to File dialog box that appears. To load a text file with global control variables, use the Load from file button () and using the Load from File dialog box that appears. Data must be separated by spaces or tabs.
If you have LiveLink™ for Excel®, you can also click the Load from Excel File () and Save to Excel File () buttons.
See the LiveLink™ for Excel® User’s Guide for more information. Or go to https://www.comsol.com/livelink-for-excel/ to learn more about the product.
Discretization
To show the Discretization section, select Advanced Physics Options in the Show More Options dialog box on the Model Builder window’ toolbar. The default choice of Value type when using splitting of complex variables is Real. This means that if the solver is set up to split complex variables in real and imaginary parts, no imaginary part is allocated for the control variable field, which is therefore guaranteed to be real. Choose Complex to allocate both real and imaginary parts.
Control Variable Scaling
Enter a Scale indicating a typical magnitude of the control variables. The relative solver tolerances refer to variables rescaled with respect to this scale, and it may also influences the search pattern of some optimization solvers.