Time Dependent, Modal Reduced-Order Model
A Time Dependent, Modal Reduced-Order Model node () contains settings for a reduced-order model that uses a time-domain modal method. See Modal Reduced-Order Models.
Click Export Reduced Model () to save the reduced-order model to file as COMSOL Reduced Model file (MPHROM-file). Note that export is only possible if all defined outputs are linear quantities.
The Settings window for a Time Dependent, Modal, Reduced-Order Model node contains the following sections:
Usage
Here you specify whether the reduced-order model should have stateless or stateful interface. Choose Stateless (the default) or Stateful from the Interface list. In the former case, the reduced-order model acts as a black box that uses an internal solver and does not expose its state. In the latter case, the reduced-order model exposes a set of reduced-order equations and state DOFs to the solver used for the calling model, and you can choose whether to solve for the reduced-order model in the same way as for a physics interface.
If you choose Stateless, also specify the Time value to be used when evaluating outputs. It is by default set to t, which means that the reduced-order model will be evaluated for the same time as in the calling model in which it is used.
If you choose Stateful, from the Equation form list, choose Study controlled (the default) or Time domain. When the setting is Study controlled, the study controls the equation form for the reduced-order model. It then appears as Automatic (Time dependent), for example, in the Physics and Variables Selection section in the study step’s Settings window.
Model Control Inputs
The list in this section contains the reduced-order model input quantities that were set as active in the corresponding Model Reduction node’s Model Control Inputs section when the reduced-order model was created. For each model control input in the Variable column, specify a corresponding Expression to be used when evaluating outputs from the reduced-order model, or when using the stateful interface, when solving reduced-order equations. The default expression is the name of the corresponding reduced-order model input variable. The effect of this is that the reduced-order model will be evaluated for the same value of the input as is seen by the calling model in which it is used. This is usually the desired behavior.
Constraint Modes
The table in this section specifies constraints for the modal reduced-order model. Each row corresponds to a constraint mode in the basis, and also to a potential constraint on the reduced-order model.
The Modal Reduction solver classifies constraints in the unreduced model when training the reduced-order model according to whether they depend on a reduced-order model input or not. Constraints depending on more than one reduced-order model input are considered an error. Input-dependent constraints are then compared to the constraint modes. If a constraint can be satisfied by a single constraint mode, then that mode is considered to be input-controlled. Constraints that can be satisfied by more than one constraint mode are considered an error during training. Input-controlled modes are treated differently from other modes. There are five columns in the table: Mode, Description, Constrained, Expression, and Variable.
The Mode column contains the index corresponding to the constraint mode’s position in the basis.
The Description column allows for specifying the description to be used for the variable in results analysis and menus. By default it will be Constraint mode X, where X is the number of the constraint mode.
The Constrained column determines whether the corresponding constraint mode will be constrained. When the constraint mode is input controlled, the check box is selected by default; otherwise, it is unchecked.
The Expression column contains the value to which the constraint mode state will be constrained, if the constraint is active. If the mode is input controlled, then the Expression field will contain the name of the variable representing the expression specified for this input in the Model Control Inputs section, and the field will not be editable. Otherwise, its default value is 0.
The Variable column contains a variable name identifying the reduced-order model state associated with each constraint mode. The variable is defined as <rom>.state(<index>). This column is only available for reduced-order models with a stateful interface.
The constraints defined by the settings in the Constraint Modes table are applied in a symmetric way directly on the constraint mode states. This has a few important implications:
1
2
3
4
The symmetric application of constraints means that the equations of any dependent variables used in the Expression column of an active constraint will get a reaction term contribution. This may or may not be the desired behavior.
Outputs
This section provides an overview of output quantities that the reduced-order model makes available for evaluation, both during solution and in postprocessing. These outputs are defined in the corresponding Model Reduction node’s Outputs section. The Variable column shows the variable names defined by the reduced-order model.
When the Use output dependent variables check box is selected, the reduced-order model also declares the dependent variable names entered in the Dependent variable column. When the reduced-order model is part of another model, these dependent variables can be assigned the value of the corresponding output variable each time a solution is stored. If the reduced-order model has a stateless interface, this behavior is controlled by the Store output dependent variables setting in the Physics and Variables Selection section of each study step where the reduced-order model is used. If the reduced-order model has a stateful interface, this behavior is controlled by whether the reduced-order model is solved for in a given study step. Apart from the setting to solve for a reduced-order model with a stateful interface, these settings are only available for reduced-order models that have outputs.
Online Settings
This section displays a list of dependent variable fields which this reduced-order model can reconstruct. When the reduced-order model is used in a calling model, it defines an operator <rom_name>.eval(<expr>), where <rom_name> is the Name of the reduced-order model and <expr> is an arbitrary expression.
Field reconstruction is not possible in a Reduced Model node that uses reduced-order model data saved in a COMSOL Reduced Model file and then imported. The original model data needed is then not available.
Use the Load factor to scale the constant part of the right-hand side of the unreduced model. This in practice scales all loads and source terms with the specified factor. Inhomogeneous constraints are not affected.
If the reduced-order model has a stateless interface, specify a Relative tolerance for the BDF time-stepping method used in the internal solver. This setting is only available when Stateless is selected from the Interface list in the Usage section above.
Information
This section contains information about the reduced-order model: Which study it was created from, which solution data that contains the reduced model data, the model reduction method, the unreduced study type, and some general information about the model reduction.
Matrices
Under Matrices, all matrices that the reduced model solution includes are listed. The listed matrices can be accessed using the COMSOL API.
Vectors
Under Vectors, all vectors that the reduced model solution includes are listed. The listed vectors can be accessed using the COMSOL API.
Build Log
The build log contains output from the reduced-order model solution process, similar to other solver logs.
State-Space System from the Reduced-Order Model
The matrices used to formulate the first-order and second-order state-space systems are generated by building the Time Dependent, Modal Reduced-Order Model.
If the second derivatives are zero, and Brdot (the time-derivative input matrix) is zero, let Kud denote the stiffness matrix K times Ud, which is a particular solution satisfying the constraints. Then, the state-space equations can be written in this first-order form:
The initial condition becomes
where B0r is the initial value input matrix.
The linearized output is computed by
where Y0 is the output bias vector.
With eliminated constrained modes, the state-space equations can be written in this first-order form:
The initial condition, with B0r = 0, becomes
The linearized output, with Y0 = 0, is then computed by
The eliminated MAxe and Cxe vectors are available for output (see the table below).
A second-order formulation can be rewritten on this form by adding states corresponding to .
The following matrices and vectors are available with the first-order formulation:
Here, Ir in the second-order definition represents the identity matrix.
To access these matrices and vectors, right-click Results>Derived Values, choose System Matrix, and in the settings for the System Matrix node, choose Time Dependent, Modal Reduced-Order Model from the Solution list. The Matrix list in the Output section then includes all matrices and vectors of interest.