Guest Blogger, Karthik Ramaswamy, CFD Engineer at Flow Science, contributed this CFD best practices article.
Have you ever invested a significant amount of time generating CAD, meticulously setting up your mesh, defining initial and boundary conditions, and configuring your post-processing instructions only to find your stomach doing a backflip, a moment after you hit the ‘run’ button?
Will the simulation crash immediately? Will it run until 80% of simulation time and then decide to give up? Will the estimated completion time run into days instead of hours, minutes or even seconds?
As I am sure many seasoned CFD modelers will vouch for, this anxiety is quite normal and can be mitigated using a combination of deep breathing, meditation, and more importantly, good simulation practices. These CFD best practices are intended to not only help you reduce stress, but also run better simulations!
Double-check your setup
The rush to hit the ‘simulate’ button is quite real. It is important to remember though, that with great simulation power comes great simulation responsibility. Check and double-check your geometry, mesh and initial/boundary conditions, and be certain that your setup makes physical and numerical sense. Eliminating these initial setup errors will save you a tremendous amount of time.
Add complexity gradually
It is often helpful to break your problem down into bite-sized pieces and add simulation complexity in a step-by-step fashion. For instance, if you are modeling air entrainment in a hydraulic jump, you would follow these steps:
- First, set up a simulation to evaluate just the fluid flow – this would also be an opportunity to refine your numerical parameters, if necessary
- Then add models such as air entrainment and bulking, starting off with recommended values for inputs whose values are unknown
Another thing to consider: how relevant are the physical models? One would certainly like to get as close to reality as possible, but will activating surface tension be practical while modeling a river flow problem spanning tens of kilometers?
Use your simulation software effectively
You can begin improving your setup even before you start running your simulations. It is important to learn how you can leverage the features available in your CFD package. Many software, including FLOW-3D, have built-in capabilities to help you diagnose and improve your simulations on the fly. For instance, in FLOW-3D, the simulation monitor provides valuable information regarding convergence, performance, numerics, flow characteristics, etc., whereas runtime options allow you to control your simulation as it progresses. When things start to go awry, remember that these features can act as lifelines.
When all else fails, call in the experts
Software support exists for a reason, and having a good support structure is central to any good CFD company. Support engineers know the software inside out, and can identify obvious errors or unique solutions to problems you might be facing. Having seen a wide array of applications, they are in a position to provide insights to your problems and demonstrate better ways to solve them.
Leave it alone
Next, just sit back, relax (binge watch your favorite TV shows, start thinking about your next CFD project) and stop tinkering around with your simulation. It is a little-known fact that looking at your simulation output actually changes the results (no, we’re not kidding… actually, yes, we are).
Patience is a virtue, especially in the CFD world.
So there you have it, the next time your simulation-associated-nervousness kicks in, try following these CFD best practices!