Learn how to utilize imported CFD data in nTop to help minimize turbulence within a fluid domain, generate plumbing geometries with near equivalent exit flowrates, or any number of design considerations and performance requirements driven by your CFD. The goal is to utilize CFD early in the design process.
- CFD Data
- Plumbing Geometries
- Field Driven Design
We use an imported three-dimensional velocity field from CFD results in this example. We truncate the low-velocity regions (i.e., where we may see eddies develop, have areas of low pressure, etc.) and generate a new implicit body from the truncated data. Any variable exported from your CFD tools in CSV format, either as scalar or vector point maps, can be used.
1. Using the Custom Block:
Currently, there are two versions of the Field from Fluid Domain custom block. Both perform the same operation, except version 5.0 does not have the smoothen operation (step 2 of this procedure). Two versions exist because the entire custom block will recalculate when an input value is changed (Currently a bug that the product team is addressing). Having the smoothen process separated allows you to adjust the smoothing values without recalculating the whole custom block. The complete list of differences between versions 5.0 and 5.1 is described below.
Field from Fluid Domain Version 5.0
- Performs base field from fluid domain operation
Field from Fluid Domain Version 5.1
- Performs base field from fluid domain operation and smoothing process
- Grid & Tolerance Size combined and Renamed to Build & Tolerance Size
- Interpolation and Iteration of Smoothen Field (Step 4 of Block Breakdown) were removed from inputs. Their preset values are now Linear and 1, respectively.
2. Smoothen Implicit:
Using Version 5.0: Add a Smoothen Body block after the custom block to get a better resulting implicit.
Using Version 5.1: This block is already included and does not need to be added.
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.
CSV Point Map:
Utilizing the Import Scalar Point Map block, navigate to the file path and define the inputs. The CSV point map should be unitless, as defining the units will scale the object appropriately.
Upper and Lower Bounds:
In the GIF below, the heads-up display (HUD) allows you to adjust a field's lower and upper bounds. By changing the sliders, you can determine the correct values for the bounds. Once selected, the bounds can be manually input into the notebook.
Resolution: The granularity of this value will impact the resolution of the field; however, it will increase computation time. A good starting value should be 0.01mm. If the Implicit body generated is outside the bounds of the point map, decrease this value. This value needs to be less than 1.0 and greater than 0.0.
Build/Tolerance Size: Size of the sampled grid spacing and Mesh Tolerance. An example starting point would be 30% of the mesh size used to run your CFD. The smaller this value, the longer the block will take to compute. As with any mesh, find a balance between accuracy and time to solve. The value defines the size of all the building blocks that will ultimately generate the final shape. In most cases, a final Smoothen Body operation will be required at the very end.
Min Feature Size: Option to specify the approximate size of the implicit body's smallest feature(s) that should be preserved during the conversion. When provided, features smaller than this input will be filtered out and not included in the final result. This is not a Minimum Element Size control.
Grid Size: This value will need to be iterated until the final implicit lies within the truncated points. It's easiest to turn the point visibility on while going through this process. A good starting value at the moment seems to be about three to four times the Build/Tolerance Size.
This value will need to be iterated until the final implicit lies within the truncated points. It's easiest to turn the point visibility on while going through this process. You should not need to exceed three.
Interpolation Type: Either Linear or Cubic.
Ready to Generate: Click when ready to compute.
1. Field from Point Map
In this step, we turn the point map into a Field. Add a Field from Point Map block, and drag the Import Scalar Point Map block from Step 1 into the first input. From Version 5.0 and on, the Interpolation and Extrapolation were removed from the inputs section. For most cases, Interpolation and Extrapolation will remain the same; therefore, they are now predefined variables. These variables can still be changed when editing the custom block if necessary. Learn more about Interpolation and Extrapolation here.
2. Clamp and Ramp 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.
2.1. Using a Clamp block, drag and drop the block from Step 1 into the Scalar field. From what we determined with the HUD, set the Lower and Upper bounds.
2.2. Using two Ramp blocks, set the positive space. Drag in the Original Body or whichever iteration of your design proceeds this step. Use the Upper Bound for the In min and the Lower Bound for the In Max. The Out max will be the resolution you specified, and the Continuity will be Geometric. The Out min will contain the second Ramp block. The Scalar field is again the Original Body, while the Upper Bound variable is both the In min and max. Set the Out min and Out max values to -1 and 0, respectively. The Continuity should be set to geometric.
2.3. The final sub-step is to multiply these two blocks using the Multiply block.
3. Bounding Box
Define the bounding box for the Implicit Body. Utilizing the Set Field Bounding Box block, we insert the block from Step 2.3 and the bounding box of the original imported point map.
4. Smoothen the Field
Our next 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 3. 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) means the Grid Size especially may vary. The Smooth Iterations/Interpolation types have been removed and are now predefined variables.
5. Meshing for a Cleaner Implicit
The following step is to use a Mesh from Implicit Body block with our raw implicit from Step 5. This will allow us to apply the Tolerance and Minimum Feature Size inputs. The resulting mesh will be a cleaner result.
6. Resulting Implicit
The second to last step of the custom block is to convert the polished mesh into an implicit body.
7. Final Smoothen
The final step is to smoothen the implicit body.
Additional steps can be taken to generate the 'final' implicit, of our fluid domain, either for our next iteration or to 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 #2 below.
Image #1: Boolean Operations to clean and generate final geometry.
Image #2: 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 'final' geometry.
Now that you have your final implicit model with the appropriate ports, our next steps are to mesh the implicit, 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 #3 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 resulting in the three outlets within 3.5% of the mean exit flowrate.
Image #3: 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 final iterations' results (the pink part seen above).
If you still have questions, the support team would be happy to help you.
Both current versions of this custom block are available for download. For a comparison of the two versions, please see step 1 of the procedure of this article.
CB-Field from Fluid Domain - 5.0
- This link teaches you how to export CSV files from Ansys CFD Post: How to export variables in CSV format from Ansys CFD Post
- This link will teach you how to Display, View and Import your CFD Data: How to display and view imported CFD data