Property Predicates
Many important objects in the simulation tree have properties that can be used to generate useful queries.
For instance, you can use property predicates to identify all velocity inlet boundaries or all fluid regions.
To create a property predicate, select the property in the Properties window and drag it into the query editor.
The search results from a property predicate query contain the same type of object as the one to which the property belongs (the owning object).
The following examples illustrate how you can use this feature:
- To find all regions of type Fluid:
- Select a region.
- Find the Type property.
- Drag the property into the query editor.
If Type is set to Fluid Region, the query provides the desired search results. Otherwise, you can edit the predicate.
- In the edit mode of the predicate, set the
Type property as desired.
- To find interfaces with contacts, and then the ones without them:
- Drag the
Contacts property into the query editor to obtain
[Boundary Interface.Contacts is empty]
.
- Change the predicate to
[Boundary Interface.Contacts is not empty]
.
- Drag the
Contacts property into the query editor to obtain
- To find all the regions that have not been assigned parts, drag the
Parts property of a region into the query editor to get
[Region.Parts is empty]
. - To find all prism layers that are set to
Custom, drag the
Prism Layers property of the
Prism Layers node under a custom mesh control.
The results are unnamed objects that have that property. However, you may be more interested in the custom controls themselves. For details on how to modify the query to return those objects, see Example: Finding Custom Controls with Prism Layers of Type Parent.
How Common Properties Affect Predicates
In Simcenter STAR-CCM+, shared properties among objects usually reflect the fact that those objects belong to a certain class.
For example, the annotation types iteration, logo, and simple text have different sets of properties, but they also share the Opacity property. This sharing reflects the common class of the objects as annotations. Therefore, when you drag and drop the property of an annotation into the query editor, the appearance of the predicate depends on which property you choose.
For example, when you drag and drop the Solution Time property of the iteration annotation, you get the following predicate:
[Iteration Annotation.Solution Time is false]

However, when you drag and drop the Opacity property of the same type of annotation, you get a different predicate:
[Annotation.Opacity = 1.0]

As another example, consider cylinder, cone, and sphere parts, which belong to the Shape Part class. Each class of objects can in turn be a subclass of other classes. For example, the Shape Part class belongs to the Mesh Part class, which belongs to the Geometry Part class.
The sphere has a Radius property that is unique to it (geometrically). As a result, the specific sphere type appears in a predicate when you drag and drop that property into the query editor:
[Sphere Part.Radius = 0.5 m]

However, if you drag and drop the Index property of the sphere, the predicate reflects the fact that the sphere shares that property with other parts in the Geometry Parts class:
[Geometry Part.Index = 2]

Controlling Object Types in Predicates
Suppose that you have a threshold derived part and want to create a predicate that limits the search results to the type threshold. This option is not available in the drop-down lists for manual creation of predicates.
However, you can drag any node into the query editor and a Type query for that node appears. In the example that follows, if you drag and drop your
Threshold node, a
[Type is Threshold]
predicate appears in the query editor.

This principle of type restrictions can apply to the example of annotations. If you drag the Opacity property of a simple text annotation into the query editor, the results of the query include objects of type iteration, logo, and simple text, since all of them are annotations with the Opacity property.
To restrict the results to simple text annotations, drag a simple text annotation node into the query editor where the initial predicate
[Annotations.Opacity = 1.0]
is defined. You get a
compound predicate:
[Annotation.Opacity = 1.0] AND [Type is Text Annotation]

The second predicate restricts the results to text annotations.