The Free and Handy Computational Fluid Dynamics Software
Basics of CFD
General aspects of computational fluid dynamics (CFD) are explained. For more detailed mathematical information on the simulation solver used in Flowsquare+, see this page.
In computational fluid dynamics, a simulation program iteratively solves a set of fluid equations to see the flow field a small time, \(\Delta t\) seconds, into the future. Here, \(\Delta t\) is called time step size. Each iteration procedure is usually called "step" or "time step", and by performing a simulation for \(N\) time steps, you will have the solution of \(t=N\times \Delta t\) seconds in the future. This process of iteratively obtaining future solution \(\Delta t\) by \(\Delta t\) is called time advancement or time-stepping.
Let's say your \(\Delta t\) is 0.01 seconds, and you performed CFD for 1000 time steps starting from \(t=0\). After the simulation, you can obtain the fluid velocity (temperature, density and species mass concentration as well if you solve thermofluid/mass concentration simulations) field at \(t=10\) seconds!
Generally, a simulation with a smaller \(\Delta t\) yields a solution with higher accuracy. However, with a smaller \(\Delta t\), it requires more time steps to reach the same physical time. More time steps mean you need to solve the set of equations for more times, leading to a longer simulation time (wall-clock time). Therefore, we need to choose an optimal \(\Delta t\) on the balance of accuracy and cost.
Flowsquare+ dynamically select an optimal \(\Delta t\) based on a dimensional number called CFL number, so you do not need to worry too much about this!
- Time step
- Time step size, \(\Delta t\)
- Time advancement, time-stepping
In most CFD, the simulation domain is first divided into many control volumes (discretization), and the set of fluid flow equations are solved on each of discretized volume or mesh point. Flowsquare+ employs Cartesian uniform mesh, in which the simulation domain with dimensions of \((L_x, L_y, L_z)\) is discretized into \((N_x, N_y, N_z)\) mesh points in each direction.
The distance between mesh points are called mesh size, which is essentially the spatial resolution, denoted for each direction by \(\Delta x, \Delta y, \Delta z\). Thus, the volume of each mesh is \(\Delta x\times \Delta y\times \Delta z\).
Generally, greater the number of mesh points is, higher the simulation accuracy becomes. However, since the equations need to be solved on more mesh points, the simulation time tends to get longer. We need to choose optimal dimensions of \(N_x\)、\(N_y\)、\(N_z\) that achieve reasonable spatial resolution and computational cost.
- Spatial discretization
- Mesh point
- Mesh size, \(\Delta x, \Delta y, \Delta z\)
We mentioned that Flowsquare+ solves fluid flow equations on each discretized mesh point at each time step over the time and space. These equations are generally called transport equations, and they are based on governing equations of fluid flow after applying some assumptions and mathematical models to reduce the computational costs.
- Transport equations