Relationship Predicates
This type of predicate includes tree hierarchy functionality (from versions of Simcenter STAR-CCM+ prior to v11.06) and current referencing operators.
General Principles
Suppose a part surface Bottom_Interface_SandMold has a Boundary property Casting: Bottom_Interface_SandMold. That part surface is referencing the boundary Bottom_Interface_SandMold.
If you create the predicate
[Relationship referencing Casting: Bottom_Interface_SandMold]
, the results include all objects that reference the boundary.

Similarly, the boundary Bottom_Interface_SandMold is referenced by the part surface Bottom_Interface_SandMold.

Since the Boundary property of a part surface already provides the referencing information, why is it useful to have a query for it? The following examples clarify this and other aspects of relationship predicates.
Example: Finding Geometry Parts in a Set of Reports
Suppose that a report called Maximum1Report has a part called Casting and Maximum2Report has a part called SandMold. A relationship predicate can make a query work as follows:
[Relationship referenced by Maximum1Report]

This query returns the Casting node, as well several other objects that are also referenced by Maximum1Report (for example the Units node and the Representations node). To restrict the search results to the geometry part Casting, add a type predicate:
[Relationship 'referenced by' Maximum1Report] AND [Type is Geometry Part]

This query represents all geometry parts, in a particular report (Maximum1Report); in this case, it returns only Casting.
Suppose that you are interested in all reports that utilize the field function Temperature, and want to find all geometry parts that are used in that class of reports. A tedious and error-prone approach would be selecting each report node, looking at the Field Function property on each one, and writing down the ones that use the Temperature field function. You could then create a predicate with a static list consisting of the items you wrote down.
A better approach is to use a nested query together with the relationship/referenced by predicate. First, create the inner filter using a property predicate. This step gives you all reports utilizing the field function Temperature.

Next, to create the outer filter, modify the initial filter by replacing Maximum1Report with the filter Filter-Reports-TemperatureFieldFunction.

This filter is dynamic in the sense that if any other reports with the Temperature field function are added, the results get updated automatically with those reports.
Example: Finding Part Surfaces Assigned to Tagged Boundaries
Suppose that you have specified some boundaries of interest with the tag MyBoundaries. To find all part surfaces that are assigned to these boundaries, use a relationship/referencing nested query that is combined with a tag predicate.
In this example, the tag query is
[Tag contains MyBoundaries]
, in a filter called
Filter-MyBoundaries. As shown in the following screenshot, five tagged boundaries are selected in the tree, and the query results appear at right as expected.

Each of these boundaries can have its own set of referencing objects. For instance, below are the results for Bottom_Interface_Cast. The part surface Bottom_Interface_Cast appears first.

You can generalize this query to find all part surfaces that reference boundaries that are tagged with MyBoundaries. The query result contains all the objects that reference the boundaries, including objects besides the part surfaces. There are two possible approaches for generalizing the query: static and dynamic.
The static approach, which is tedious and error-prone, is to modify the relationship/referencing predicate to include all tagged boundaries, selecting them one at a time in the object selector.
The dynamic approach, which is more flexible and automatic, is to modify the relationship/referencing predicate to have a filter value of Filter-MyBoundaries. This option returns all objects that reference the items listed in the Filter-MyBoundaries filter.

To narrow the scope of the query results to part surfaces, combine this predicate with a
[Type is Part Surface]
predicate.

The resulting compound predicate is
[Relationship referencing MyBoundariesFilter] AND [Type is Part Surface]
where
MyBoundariesFilter
is
[Tag contains MyBoundaries]
.
If you tag more boundaries with the MyBoundaries tag, the query results get updated automatically, which makes this approach dynamic.

Example: Finding Regions with a Particular Continuum
There are instances where property predicates are not available. For example, the Physics Continuum property of a region cannot be dragged into the query editor.
To find all regions that are associated with a particular physics continuum:
- Create a relationship predicate with the referenced by operator.
- For the value of the query, select the continuum of interest (in the example below,
Casting Physics).
The initial results include various types of objects such as regions and interfaces.
- To restrict the query results to regions, drag the
Regions node into the query editor, creating a compound predicate:
[Relationship referenced by Casting Physics] AND [Type is Region]
Example: Finding Custom Controls with Prism Layers of Type Parent
In Property Predicates, one example involves finding prism layers that were set to Custom. As it is, the resulting query gives non-named Prism Layers nodes, which are the same type as the owning object, Controls. However, the objects of interest are the actual named custom control nodes (in this example OnePrismLayer and ThreePrismLayers), which are parents of the nodes listed in the query results.

To retrieve these named objects, use a nested query with the technique in the following example:
- Name the existing query Filter-Parent-Prism-Layers. Observe that the custom controls of interest are hierarchically above the Prism Layers nodes that the first filter found.
- To redirect search results and capture the actual objects of interest, create a query with the following:
- a Relationship predicate
- an above in tree operator
- a value that selects the filter Filter-Parent-Prism-Layers
Although the query results include the custom controls, they also include other objects that are not of interest.
- To restrict the results, combine this predicate with a
[Type is Surface Control]
predicate.This modification provides a list of all custom controls that contain custom prism layers. As objects of this type are added to the tree, the query is updated automatically.
Example: Finding Output Parts from Mesh Operations
When building reusable mesh pipelines you often want to use the output parts from one operation, such as a boolean subtract operation, as the input to another operation. The relationship predicate,
Contents of
, can provide you with access to objects that are referenced by the properties of another object.
In the following example, you want to obtain the parts that result from the boolean subtract operation, Subtract From Fluid, as input to the automated mesh operation, Fluid Domain Poly Mesh. When you create the filter, (or in this case, a dynamic query), you can query objects from several of the mesh operation properties. Here, you choose Output Parts, which identifies the parts that result from executing the Subtract From Fluid operation.
