Computational Fluid Dynamics (CFD) simulations can be very time-consuming and expensive to set up. They also require specialised knowledge and extensive computational resources.
Why are CFD Simulations Important?
Exploring multiple simulation scenarios is crucial during the initial stages of design and engineering projects. These simulations help designers optimise their projects, understand potential performance under varying conditions and identify areas for improvement through iterative exploration.
Parameterising these workflows is equally important. It allows for the flexible adjustment of variables, enabling the efficient testing of a wide range of conditions and configurations.
This approach enhances decision-making and significantly reduces the risks and costs associated with design iterations by identifying the most promising solutions before developing physical prototypes.
The Traditional Way: Running CFD Simulations Locally
This function primarily utilises two main Python libraries:
- Archaea geometry library: a base geometric library that includes basic geometric objects to create meshes and triangulated exports of meshes.
- Archaea-simulation: a library of wrapper definitions for simulation tools.
![](https://speckle.systems/content/images/2024/05/cfd-analysis-1.png)
Here’s how the function works:
- Parameters are processed using geometry and simulation libraries.
- OpenFOAM is run locally to perform the computations.
- After the computation, OpenFOAM produces post-processed results in the VTK geometrical data format.
- Then, the simulation library converts VTK geometrical data into Speckle meshes.
- And finally, these converted meshes are visualised in the Speckle viewer for analysis or presentation.
Behind the scenes
![](https://speckle.systems/content/images/2024/05/cfd-gif.gif)
CFD simulation is initiated by creating mesh geometry in STL format. This mesh geometry is triangulated and will act as the foundational blueprint. This is crucial as it allows the simulation to capture the complexities of fluid behaviour around the geometry.
Once the initial mesh is established over these STL geometries, the system embarks on a sophisticated process of volume mesh refinement. This is achieved by constructing a calculated bounding box that encapsulates the input geometry, thereby defining the parameters of the simulation space.
The workflow adjusts the scale factors based on user inputs, allowing for a tailored and precise establishment of the flow domain. This preparation paves the way for accurate and efficient simulations, enabling users to gain deeper insights into the fluid behaviour around their geometries.
Why the Traditional Way is Not Ideal
Running CFD simulations locally is challenging due to the heavy reliance on available hardware. The reliance on local infrastructure may introduce bottlenecks, especially in complex or large-scale simulation scenarios.
The Automate Way: Running CFD Simulations Effortlessly
This is where Automate emerges as a game-changer by leveraging the power of cloud computing, significantly simplifying the CFD workflow with the Automate function, enabling designers and engineers to efficiently set up, execute, and manage their simulations with unprecedented ease.
![](https://speckle.systems/content/images/2024/05/Untitled-design-1.gif)
Integrating the workflow with Automate includes:
- Efficient Setup and Execution: Cloud resources streamline the entire CFD workflow.
- Enhanced Visualisation and Sharing: Speckle’s 3D viewer allows for effortless retrieval and overlay of simulation results directly onto the input model, enhancing visualisation and analysis. This innovative approach accelerates the simulation process and opens new avenues for collaboration with other simulation tools.
Adapting developed workflow as Speckle Automate had smooth developer experience to change actors on the game easily.
Initially, STL geometry was created by given parameters using the geometry library, but with this function, input geometry was retrieved by Speckle connectors.
The capabilities of the geometric library were extended to enable Speckle 3D data to act as input for any Automate function.
![](https://speckle.systems/content/images/2024/05/cfd-analysis-2.png)
Function Inputs
This detailed breakdown of inputs underscores how Speckle’s Automate function simplifies complex CFD tasks, making them more accessible and efficient for users across various disciplines!
1. Wind Direction
Wind direction is a required parameter to rotate the calculation domain. The direction of the wind is commonly represented using meteorological angles (δ), designated as δ. These angles increase clockwise from the north (y) axis. In this convention, 0 degrees typically points to the north, 90 degrees points to the east, 180 degrees points to the south, and 270 degrees points to the west.
Meteorological conventions are widely used in weather and wind studies, making it essential to align the domain orientation with these angles. Math angles, designated by α, increase counterclockwise from the east (x) axis. For OpenFOAM simulations, users need to define wind direction from meteorological angles.
2. Wind Speed
Wind speed is another required parameter for simulation, defining one of the initial conditions for the inlet boundary. Data collected from weather stations provides precise values for specific heights and helps to create an Atmospheric Boundary Layer (ABL) for simulation.
However, creating an ABL is not only a recommended practice but an absolute necessity when simulating wind behaviour at varying altitudes.
3. Domain Sizing
The Automate function calculates the BoundingBox of the input geometry to scale it with given factors (x-y-z) to create a calculation domain. This domain is where OpenFOAM generates volume meshes to solve Navier-Stoke and continuity equations for fluid dynamics.
Sizing of the domain has an important impact on the quality of simulation, number of meshes, and calculation time.
4. Number of Cores
The distinctive feature of the Automate function is being able to define the number of cores for calculation. OpenFOAM supports parallelism through domain decomposition, which involves dividing the computational domain into smaller subdomains that can be solved concurrently.
This approach efficiently distributes computational work, reduces simulation times, and enables the modelling of larger and more complex problems.
How To Get the CFD Automate Function
We invite you to join the Beyond the Speckleverse hackathon, where you can try out our new CFD Automate function in action, now available in open beta! Don't miss this chance to experience firsthand how this feature can enhance your workflows.
::: tip
Watch our SpeckleCon demo to see it in action:
Speckle Automate DEMOS 🔥 - SpeckleCon 2023
:::
Starting The Automation is Easy
Enabling a function within Speckle is very straightforward! Here’s how to activate and use the CFD Automate function for your projects:
- Select a project and model: You can choose a Speckle project and a model for CFD simulations via our intuitive web app (app.speckle.systems). See our blog post here for more on navigating the new web app.
- Automation trigger: Setting up automation ensures that any new versions created through Speckle connectors trigger the CFD simulation automatically, updating results based on the latest model data.
- Result overlay: After each simulation, Speckle overlays the results onto the corresponding model version, allowing for immediate analysis of design changes.
Following these steps, you can leverage Automate to streamline CFD simulations, enhancing workflow efficiency and collaborative efforts in your design and engineering projects.
Conclusion
Today, Automate is in open beta, and we invite you to contribute your knowledge and expertise. You can join our Beyond the Speckleverse hackathon, where teams will use Automate to automate and drive efficiency within their current workflows. You can also share direct feedback or ask questions on our community forum!
You can get your Speckle account today and subscribe to our newsletter below if you'd like to receive more content like this: