Assemble
The Assemble node () provides access to the raw data of any assembled matrix or vector. Right-click the Solution node and select Other>Assemble. Select the appropriate check boxes for the matrices and vectors you want to inspect or modify and save the model as a model file for Java®. You can also display the values of these system matrices in a table using the System Matrix node () found under Results>Derived Values. The saved Java file now contains code for assembling the selected matrices and vectors that can be used to access the matrix rows, columns, values, and so forth. For information about the eliminated system, see Elimination Constraint Handling.
Note that some study types require that additional parameters are defined. In order to get the expected matrices, you have to specify these parameters manually. If you get an error about undefined variables, you can define the variables in the Parameters node found under Global Definitions. Note that the value you set is the one that is used in the expressions where the variable is found. Some examples of variables that might be needed:
t, the requested output time.
timestep, the time step used by the solver, for time-dependent problems.
freq, the frequency to assemble the problem for, for frequency-dependent problems.
There are also other variables that might be needed: phase (the phase), niterCMP (the nonlinear iteration number), and CFLCMP (a pseudo-time-stepping control variable).
Eliminated Output
In this section you can choose to output matrices and vectors that are passed to the linear solvers — that is, where constraints have been eliminated — by enabling one or several of the following check boxes: Eliminated load vector (Lc), Eliminated stiffness matrix (Kc), Eliminated damping matrix (Dc), Eliminated mass matrix (Ec), Constraint null-space basis (Null), Constraint force null-space basis (Nullf), Particular solution (ud), and Scale vector (uscale).
Noneliminated Output
In this section you can choose to output matrices and vectors that the solver assembles before the elimination step by enabling one or several of the following check boxes: Load vector (L), Stiffness matrix (K), Damping matrix (D), Mass matrix (E), Constraint vector (M), Constraint Jacobian (N), and Constraint force Jacobian (NF).
Optimization Output
In this section you can choose to output matrices and vectors assembled during optimization by enabling one or several of the following check boxes: Optimization constraint Jacobian (NP), Optimization constraint vector (MP), Lower bound constraint vector (MLB), and Upper bound constraint vector (MUB).
Advanced
If you want to assemble an eigenvalue problem, you can set the Eigenvalue name (default: lambda) and the Value of eigenvalue linearization point by first selecting the Set eigenvalue name check box.
Constants
In this section you can define constants that can be used as temporary constants in the solver. You can use the constants in the model or to define values for internal solver parameters. These constants overrule any previous definition (for example, from Global Definitions). The constant values are expressions and can, for example, include the range() operator, units, and global expressions. The constant name can be a new or an existing global parameter. The constant is temporary in the sense that it is only defined during the solver run. You cannot override parameters used in the following parts of the model:
Also, the Parametric and Time Dependent solvers overrule any definition of solver constants.
Constants settings for a solver node do not carry over to postprocessing.
Some examples of when it can be useful to define constants for a solver:
When you want to define auxiliary parameters that are part of the equations like CFLCMP or niterCMP and where the solver does not define these parameters.
Click the Add button () to add a constant and then define its name in the Constant name column and its value (a numerical value or parameter expression) in the Constant value column. By default, any defined parameters are first added as the constant names, but you can change the names to define other constants. Click Delete () to remove the selected constant from the list.
Log
This section, which is initially empty, contains a log from the assembling Select the Keep warnings in stored log to keep warning messages in this log so that the information in those warnings is also available when reopening the model.
Assemble in the COMSOL Multiphysics Programming Reference Manual.