How to use nTopology to help design plumbing domains


Learn how to utilize imported CFD data in nTopology to help minimize turbulence within a fluid domain, generate plumbing geometries with near equivalent exit flowrates, or any number of design considerations and/or performance requirements that are driven by your CFD. The goal is to utilize CFD early in the design process. 

In this example, we use an imported three-dimensional velocity field from CFD results. We truncate the regions of low velocity (i.e. where we may see eddies develop, have regions of low pressure, etc), and generate a new implicit body from the truncated data. Any type of variable that can be exported from your CFD tools in CSV format, either as scalar or vector point maps, can be used. 


1. Import Scalar Field 
Utilizing the Import Scalar Point Map block, navigate to the file path and define the inputs. 

Image #1: Velocity point map block.

In the GIF below, the heads up display (HUD) allows you to adjust the lower and upper bounds of a field. This visualization helps us determine our bounds for Steps 3 and 5.
Image #2: Viewing the import CSV/Point Map field.

2. Field from Point Map
In this step, we turn the point map into a Field. Add in a Field from Point Map block, drag the Import Scalar Point Map block from Step 1 into the first input and define your Interpolation and Extrapolation settings. Learn more about Interpolation and Extrapolation here.

Image #3: Field from Point Map block.

3. Clamp the Field

This cuts off the field outside the point list and lets us set all positive space (i.e. outside the part) as 0.

3.1. Using a Clamp block, drag and drop the block from Step 2 into the first input and then right-click on the Min and Max inputs to create variables for the Lower and Upper Bounds of the Import Point Map. From what we determined in Step 1 with the HUD, set the Lower and Upper bounds.

3.2. Using a second Clamp block, set the positive space. Drag in the Original Body or whichever iteration of your design proceeds this step. Set the Min and Max values to -1 and 0 respectively.

3.3. The final sub-step is to multiply these two Clamp blocks together using the Multiply block.

Image #4: Multiply block with two nested Clamp blocks.

4. Re-Normalize the Field

We scaled the field with the Clamp, so this normalizes it back to the data set. Divide by 1 mm to remove units. This makes the field look like the originally imported one so that the threshold matches the values in the HUD.

Using two Divides and a Max block set up your blocks as seen in Image #5 below. The input into the first nested Divide block is the block from Step 3 and the input into the Max block is the Value List from the imported points from Step 1. You can access this by clicking the "?" in the block and navigating to Properties, seen in Image #6 below.

Note: When the Max block first appears it looks like it does at the bottom of the picture below, you can click on the drop-down arrow to access the Block Overload and change it to Scalar List. 

Image #5: The top blocks are used to normalize the field. The bottom block shows access to the Block Overload.

Image #6: Extracting data from the block Properties. 


5. Threshold Value, Units, and Bounding Box
The final steps before generating our new geometry are a final normalization that helps us truncate the imported field, assign units to the field, and finally, a Bounding Box to confine the field.
The workflow currently only works if the Upper Bound is kept at the maximum value of the import field. A future iteration will be developed that allows both to be turned into a variable.

5.1. Using a Divide block, divide the Lower Bound by the Upper Bound.
5.2. Create a Subtract block, seen under 5.3 in Image #7 below. In the first input drag and drop the block from Step 2. Generate a variable from the second input and then drag and drop the block from Step 5.1, generating a field.
5.3. Add a Multiply block. We multiply the Subtract block by -1mm; this accomplishes two tasks, assigning units to the field and flipping the sign. All space outside of an Implicit body is positive while all space inside is negative and the boundary between them is zero. In Image #8 below, left is the field before we multiply by -1mm.
5.4. Define the bounding box for the Implicit Body. Utilizing the Set Field Bounding Box block we insert the block from Step 5.3 and the bounding box of the imported points from Step 1, seen in Image #6 above.

Image #7: Blocks and steps used to reassign proper units and bounds.

Image #8: Shows the before (L) and after (R) fields regarding Step 5.

6. Smoothen the Field
Our second to the last step is to smooth out the Field and generate our Implicit. This is done by utilizing the Smoothen Body block. The first input is the block from Step 5.4. From here, it is a matter of adjusting the Grid Size and Smooth Iterations as needed. Depending on the size of our part, the density of the imported points (i.e. mesh density form analysis) the Grid Size especially may vary.

Image #9: Smooth Body block.

7. Generate the 'Final' Implicit
The last step is to generate the 'final' implicit, of our fluid domain, either for our next iteration or to then begin creating the piping geometry we intended to manufacture. 

The first thing we typically need to do is Boolean Intersect our block from Step 6 with the Original design space, during the truncation and smooth process our Inlet and Outlets ports can get distorted. The Boolean Intersect step trims them off and then we Boolean Union the intersected body to our desired inlet and outlet ports, see Image #11 below.

Image #10: Boolean Operations to clean and generate final geometry. 

Image #11: The image on the left is the output from Step 6 (Smoothen Body), the image in the center is the intersection with the original design space (trimming the ports and re-confining to design space), the image on the right is the 'fina' geometry.


Now that you have your final implicit model with the appropriate ports our next steps are to mesh the implicit, to evaluate how this iteration compares to the performance requirements, and either repeat the iterative process (i.e. the procedure above) or begin shelling operations of the fluid domain created above to generate the plumbing geometry we would eventually manufacture. 

Image #12 below shows the iterations and results from the case study presented in this article. Beginning with an oversized design space (the top left part) and defining the constraint to have Outlet Uniformity with one inlet and three outlets.  After only four iterations the part and process converged on a solution that resulted in the three outlets being within 3.5% of the mean exit flowrate.


Image #12: The top half of the image shows the iterations and velocity fields brought in from Ansys Fluent. The bottom half of the images show the results from the final iterations (the pink part seen above). 

That should do it! If you followed the steps above you should have a workflow ready to Import your CSV files and turn them into an Implicit Field and Body.

If you still have questions the support team would be happy to help you.


The Custom Block of this file is below via Box. It is the third version of this workflow. As mentioned it currently only supports changing the Lower Bound, the Upper Bound needs to remain at the Max value of the points imported. You can use the block and workflow as is or use it as a starting point for making your own and tailoring it to your specific workflow.

CB - Field From Fluid Domain 3.0 - (19092021)

More on this Topic:





 import imported map fluid point domain designs CFD computational plumbing 
Was this article helpful?



Please sign in to leave a comment.