Reduced-Order Model Outputs
A reduced-order model makes its output available to the calling model in the form of variables and operators. You can define output variables in the Model Reduction study step before training the reduced-order model, specifying an output variable base name and a corresponding global expression valid in the unreduced model. Variables defined in this way become available as global variables in a calling model, but with a namespace prepended to indicate which reduced-order model instance they belong to. For example, an output variable defined as g in the Model Reduction study step will be rom1.g in the caller if the reduced-order model feature name is rom1.
The eval operator
Some types of reduced-order models define operators with fixed base names, but using the reduced-order model feature namespace. For example, reduced-order models that are capable of reconstructing the complete solution vector define <rom>.eval(<expr>) which evaluates the expression <expr> using the reconstructed solution. Note that the expression <expr> is interpreted in the context of the unreduced model. When used in a domain evaluation, expression values are computed at corresponding locations in the unreduced model (whose mesh is stored with the reduced-order model). In these respects, <rom>.eval(<expr>) operates in the same way as the withsol operator used for retrieving expression values from a specified solution.
The eval operator defined by a reduced-order model using a stateful interface supports a complete Jacobian with respect to the reduced-order model states. This means, in practice, that it can be used for creating bi-directional couplings between a reduced-order model and the main calling model (or another reduced-order model). Not only can the eval operator be used in other equations. It is also possible to use test(<rom>.eval(<expr>)) to effectively modify the reduced-order equations defined by the reduced-order model.
The state Operator
Reduced-order models using a stateful interface define the operator <rom>.state(<index>) which provide direct access to the states declared by the reduced-order model and solved by the main solver. In situations when the states have well-defined physical meaning this can be used for example for adding constraints or loads directly to the states.