You are viewing the documentation for an older COMSOL version. The latest version is available here.
Searching Nodes and Settings in the Model Tree
You can find models by matching on their node properties, features, and settings in the model tree. You use a similar search syntax for field expressions involving these nodes as when searching on general item fields — see Basic Field Expressions.
In this section you will learn how to write basic filter queries that match on models with a particular node or setting, as well as advanced filter queries that match on models in which a particular node or setting is nested within other nodes.
Basic Node Field Expressions
You write a basic node field expression filter using an @-notation of the general form:
@node{@<field-name>:<field-value>}
with <field-name> equal to the name of one of the available fields in Table 3-2 and <field-value> the value being filtered on. Write, for example,
@node{@type:rotor}
to find all models with nodes of a type that contains the word rotor. With this, you can, for example, find models that have a Frozen Rotor study step, or models that have a Beam Rotor interface. Write
@node{@type:(beam AND rotor)}
to narrow the search to the latter models.
You can leave out the boolean AND as Model Manager automatically adds this whenever there is a space between two search words or two field expressions.
You can match a node on several properties, features, and settings by combining several expressions within @node{…}. Write
@node{@type:(beam rotor) @comment:"Use axial vibration"}
to find a model with a Beam Rotor interface for which a certain comment has been written in the Comments field in the Properties window for the node — see also Phrase Matching.
A node field expression can also be combined with item field expressions, as well as with other node field expressions. Write
@lastModifiedBy:Alice @node{@type:(beam rotor)}
to find models with a Beam Rotor interface that were last modified by user Alice.
Using Named Nodes
Oftentimes you want to find models with a node of a particular type. One challenge that you then face is that the Type field for a Node Type may match wider than you perhaps anticipated. Writing
@node{@type:(time dependent)}
will match on Time Dependent study steps. But it will also match on Time-Dependent Solvers, which may not be what you wanted. Write
@node{@apiClass:StudyFeature @type:(time dependent)}
to only match on the study step.
You can find the API class, as well as all other node fields, of a particular node in the Node table in the Details dialog box opened from The Contents Section. These often have a technical name that may be challenging to remember. To help you with this, Model Manager comes with a set of predefined named nodes that work as aliases. You will match on only a Time Dependent study step by writing
@studyStep{@type:(time dependent)}
A complete listing of all named nodes is given in Table 3-4.
You use an API type field expression when a named node is not enough to distinguish types. Writing
@physics{@type:(electric currents)}
will match on models with an Electric Currents interface. But it will also match on models with an Electric Currents in Layered Shells interface. Write
@physics{@apiType:ConductiveMedia}
to only match the former physics interface.
Basic Setting Field Expressions
You write a basic setting field expression filter using an @-notation of the general form:
@setting{@<field-name>:<field-value>}
with <field-name> equal to the name of one of the available fields in Table 3-3 and <field-value> the value being filtered on. As for node field expressions, you can include several expressions within @setting{…}. Write, for example,
@setting{@description:Length @value:9\[cm\]}
to find all models with a setting Length having value 9[cm] — see also Escaping Reserved Characters. When the setting is a scalar, you can also match on a range of values:
@setting{@description:Length @scalarReal:[0.05 TO 0.15]}
You can find the available settings of a particular node under Setting in the Details dialog box opened from The Contents Section. You may find it useful, for example, to include a filter on the Name setting field whenever the Description setting field matches too wide.
Nested Node and Setting Matching
You can write custom filter queries that match on settings for a particular node by nesting @setting{…} within @node{…}, or within any of the names nodes. Write
@parameters{@setting{@description:Length @scalarReal:0.09}}
to match a parameter setting on a Parameters node.
There is no limit on the number of setting field expressions you can include. Write, for example,
@parameters{@created:[9/1/21 TO 9/31/21] @setting{@description:Length @scalarReal:0.09} @setting{@description:Width @scalarReal:0.05}}
to find models with a Parameters node created in September 2021, such that the node has a Length parameter with value 9[cm] and a Width parameter with value 5[cm].
You can also nest two or more node field expressions inside each other. Write, for example,
@component{@spaceDimension:2 @physics{@apiType:ConductiveMedia}}
to find all models with a 2D component that contains an Electric Currents interface.