CFD

How to write a CFD library: The sparse matrix class

In this article, we will first look at why sparse matrices, as found in CFD applications, really need to be stored with an adequate sparse matrix storage format, by looking at some back of the envelop calculations that show that we can save a significant amount of data by using an appropriate storage format. We …

How to write a CFD library: The sparse matrix class Read More »

How to write a CFD library: The vector class

The vector class provides a fundamental building block in our linear system of equations solver library. We have already seen in the previous article how it will be used by our conjugate gradient algorithm, in this week’s article, we look at how to implement the vector class itself. Next week, we’ll close the loop by …

How to write a CFD library: The vector class Read More »

How to write a CFD library: The Conjugate Gradient class

When it comes to Computational Fluid Dynamics (CFD) applications, the Conjugate Gradient (CG) method is one of the more used algorithms to solve the linear system of equations . It offers fast convergence, low storage requirements, and is relatively easy to implement. In this week’s article, we’ll look at how we can implement this algorithm …

How to write a CFD library: The Conjugate Gradient class Read More »

How to write a CFD library: Basic library structure

In last week’s article, we developed the discretised equation for the 1D heat diffusion equation using the finite volume method. We looked at why we need an implicit time integration technique and why this requires a linear system of equations solver. In this week’s article, we’ll explore how to set up a basic project structure …

How to write a CFD library: Basic library structure Read More »

How to write a CFD library: Discretising the model equation

In this article, I want to quick-start our discussion on libraries and introduce a model problem that is simple enough for us to code, yet can be exploited to show how we can develop a library that is solving a real-world CFD problem; solving the linear system of equations . While we are limiting ourselves …

How to write a CFD library: Discretising the model equation Read More »