COMPUTATIONAL FLUID DYNAMICS

CFD

If my work is about post harvest storage, and managing temperatures and air flow in sugar beet clamps, Computational Fluid Dynamics (CFD) might just be the secret sauce. In the course I took, CFD was defined in the first lecture as: “approximate solution of governing equations using numerical techniques“. Looking back at the end of the course, this is a really good definition, but also one that wouldn’t mean much to an outsider. So put another way, CFD is the method engineers use to model systems that have gases and liquids – i.e. fluids – flowing through them, so as to understand how velocity, pressure, temperature, etc behaves within the system. They are models (so only approximate) based on mechanisms defined by laws of physics (the governing equations) using the simplified versions of these governing equations (numerical techniques).

Getting to know these methods (it’s really a compilation of many methods) has meant going back to some physics and mathematical concepts I thought were well in my past. It’s been hard work, but it has been so rewarding.

There are many brands of CFD software. Comsol and Ansys are two of the big commercial packages in use. The below is an analysis done in the free Academic version of Ansys in about 30 minutes purely for the purposes of showing interested parties how it can be used. What you’re looking at is a sugar beet clamp of 9m width, 3m height, being subjected to a 5m/s wind. Well, you’re actually seeing the air space 15m to the left, 25m to the right, and 15m above the ground a clamp is sitting on. The wind is blowing left to right, with the green area showing wind at 5m/s. The clamp clearly acts as a wind-break: the blue behind the clamp is wind at around 1m/s. The red area is wind of around 8m/s, so the clamp also causes an area of increased wind velocity. This all feels like it’s inline with expectations…

Commerical software is much easier to use for those of us used to graphical user interfaces. These interfaces generally make it easy to make changes to a model and rerun. The problem with the commercial software is that it is either limited in the detail permitted (free version), or expensive (full versions). If you have the time and patience to do your own coding, then many people have built simple CFD models in MatLab (also not free), or with the open source CFD modelling software OpenFOAM. OpenFOAM is actually a whole whole bunch of C++ script files that anyone can download and edit to build their CFD model. It can be tricky, but with this approach, the sky is the limit. It might be because I’ve been visiting a strong hold of OpenFOAM (the Energy Sciences Department of Lund University), but it does seem like this is the advanced front of CFD software.

Here is an index of OpenFOAM related posts I’ve done as I build a CFD model as part of my PhD.

TopicSolverCase filesTags and NotesPost
Updated 3D ventilationOwn: clampPimpleFoamclamp_vent_02incompressible, turbulent, transient. blockMesh, topoSet, setFields. Velocity, pressure, temperature. Porous medium.Link
Time variant inlet conditions on velocity and temperatureOwn: clampPimpleFoamclamp_07incompressible, turbulent, transient. blockMesh, topoSet, setFields. Velocity, pressure, temperature. Porous media.Link
Modelling a porous membraneOwn: clampPimpleFoamclamp_06incompressible, turbulent, transient. blockMesh, topoSet, setFields. Velocity, pressure, temperature. Porous media.Link
Adding second energy equation to pimpleFoamOwn: clampPimpleFoam-1 to
Own: clampPimpleFoam-2
clamp_05incompressible, turbulent, transient. blockMesh, topoSet, setFields. Velocity, pressure, temperature. Porous medium.Link
Adding energy equation to pimpleFoampimpleFoam to
Own: clampPimpleFoam-1
clamp_04incompressible, turbulent, transient. blockMesh, topoSet. Velocity, pressure, temperature. Porous medium.Link
Moving to a transient solverpimpleFoamclamp_03incompressible, turbulent, transient. blockMesh, topoSet. Velocity, pressure. Porous medium.Link
3D ventilated clampsimpleFoamclamp_vent_01incompressible, turbulent, steady state. Blender, createFeatures, snappyHexMesh, topoSet. Velocity, pressure. Porous medium.Link
Adding accurate Darcy and Forchheimer coefficients*simpleFoamclamp_02incompressible, turbulent, steady state. Velocity, pressure. Porous medium. *NB: kinematic velocity for the fluid was wrong in this example. It has been updated in the case files.Link