A well ordered workshop – is it inherently capable of making us more productive? Is it really worth the effort to get organized? Steve Jobs offered the following thought: “That's been one of my mantras - focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains.”
In part 1 of this blog, I presented a drug delivery catheter, placed in a stenosed artery, to illustrate how Simulation Parameters let us study a range of blood flow rates in a realistic way, enabling the exploration of a broad combination of patient physiologies and catheter sizes. I also outlined how Global Tagging could be used to group objects that would be otherwise difficult to associate logically. From there, Custom Sim Trees, built on tags, showed concise views of the sim file, making it easier to review and to more quickly comprehend the approach to the problem being solved. Today, I’ll bring us up to date on enhancements to Filters and I’ll introduce a new feature in STAR-CCM+ v11.06®, Simulation Tree Comparison.
We use filters to identify and separate a “relevant few” from a “peripheral many.” To find the relevant few, filters use queries, applying one or more conditional statements (or predicates) to generate a candidate list. How does this help? By applying a logic-based approach coded into your sim file, you can reliably and reproducibly find objects and select them for use in things like mesh operations, derived parts, scene displayers and reports. Let’s consider an example: you’re working with a sim file that contains several operations (surface wrapping, subtraction, imprinting, automated meshing with custom controls). Part names are common across many of the objects in your parts node. You want to run a parts-based report to calculate the pressure drag, but how can you tell which part boundaries are the correct ones to use for the report? Step 1: Drag the boundary property for any part to the query filter editor, and change the predicate logic to look for only those boundary surfaces that are associated with a region – in other words, query for those parts where the Part Surface Boundary is set.
Step 1: Use drag and drop to set up your first filter.
At this point, we have a pretty long list and what we ultimately want is just the car parts, excluding the wheels. Step 2: we’ll modify our query, leveraging a parts numbering convention (“01” for mirror parts, “02” for window parts or “05” for car body parts) that is already established in the parts node. Our query now returns the parts we need.
Step 2: Modify your filter to narrow down your list.
A new enhancement in STAR-CCM+ v11.06 is worth noting here. The feature, Selection via Clipboard, lets you place your selection from your node tree onto the clipboard using [CTRL][C]. Back to our example then, Step 3: Highlight the parts of interest in the query filter editor and right click to select them in the simulation. Next, use [CTRL][C] to place the selection on the clipboard. Step 4: Navigate to your parts-based reportto calculate the pressure drag, recover your selection from the clipboard and evaluate your report.
Steps 3 & 4: Leverage your clipboard contents to easily and robustly update your reports.
Let’s apply our GetParts filter to a scalar displayer. When I select the filter using the standard Selector via the ellipsis button […], I see that I’ve missed a part on the back of the car as illustrated in the figure below.
Dynamic queries provide a powerful and flexible way to build logic-based selections for automation.
My next step then is to go back to my filter and modify it to include the wing. However, after I make this change, my displayer does not update – here’s where the power of query-based selection becomes obvious. Choosing the GetParts filter with the query-based selector propagates all filter modifications dynamically. At present, query-based selection is limited to mesh operations, displayers and derived parts. However, we will be broadening support for query-based selection in an upcoming release, so stay tuned.
Last, let’s talk about Simulation Tree Comparison. Over the course of a study, it’s sometimes difficult to keep track of the changes made to a sim file as it matures. Being able to do a side-by-side comparison of the node tree lets you zoom in on exactly where the differences are without having to rely on visual memory. Several revisions of the notional sports car example shown above were performed, and differences between two earlier versions are shown below with color cues (vision deficiency friendly).
Differences between two .sim files are highlighted using Simulation Tree Comparison
Are we moving mountains yet? Well, what is exciting is that the combination of the four tools, Simulation Parameters, Global Tagging, enhancements to Filters and Simulation Tree Comparison, all delivered with STAR-CCM+ v11.06, will give you an unprecedented ability to manage and manipulate your sim files and to automate your workflows. I’ll close with the following thought from Henry David Thoreau: “Our life is frittered away by detail. Simplify, simplify, simplify!” And, a great way to simplify is to use the right tools for the right job.