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, Eliminated stiffness matrix, Eliminated damping matrix, Eliminated mass matrix, Constraint null-space basis, Constraint force null-space basis, Particular solution (ud), and Scale vector.
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, Stiffness matrix, Damping matrix, Mass matrix, Constraint vector, Constraint Jacobian, and Constraint force Jacobian.
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, Optimization constraint vector, Lower bound constraint vector, and Upper bound constraint vector.
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). 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.