Local Mean Age (LMA) is a game-changer in fluid flow analysis! It reveals how long fluid spends in different parts of your model, helping you pinpoint stagnant areas and optimize flow. With our latest updates, LMA now delivers faster, more reliable results, letting you visualize fluid behavior in real time. Whether you’re working with pipe networks or complex systems, LMA gives you the insights you need to boost performance and streamline your designs. Get ready to take your simulations to the next level!
What is LMA and what can it do for you?
Local Mean Age, known as LMA, can show the amount of time the working fluid spends throughout the model – it can show which regions are stagnant and which are free-flowing. The example below predicts LMA in a pipe network using three types of pumping devices:
- Axial fan
- Right cylinder blower with axial inflow and radial outflow
- Annular blower with radial inflow and outflow
LMA = 0 BCs are automatically applied to the discharge faces of each pump. You can see the LMA values grow as we transverse each pipe loop. CFD2 computes the velocity field and CFD1 computes LMA at the intermediate save times and at end of run.
New and improved
With our first update to CFD 2019, we’ve improved solution stability, solve times, and results capability.
Solution stability – changing from implicit to explicit solving:
Our original LMA equation looked like this:
An ill-conditioned matrix can result, leading to long wall clock times for solving it, and in some cases, the LMA solutions become so ill-conditioned that we cannot get a solution.
Adding an inertial term, the LMA equation now looks like this:
Using an explicit marching technique avoids ill-conditioned matrices, guaranteeing a solution.
Solve times – re-cast explicit into an implicit form:
Solving the LMA equations explicitly takes considerable time, as we need to use a small time step size to ensure numerical stability. We’ve explored multi-threading and found that we can optimally employ 10-15 threads.
But this wasn’t the end of the story. Three things (the existence of a source term; the large element size ratios; and the unstructured mesh) make convergence difficult and here, we have all three. It was time for a new tactic – take the explicit discretized equations and re-cast them into an implicit form. The Implicit approach being applied to the explicit discretized LMA equations works pretty smooth.
This implicit form has many advantages:
- It is solvable. Convergence is not an issue since the 1/time step term can be used to control the diagonal dominance and the matrix condition number.
- Convergence can be computed using the L2 norm of delta phi.
- In this discretized form, the expense of forming the C matrix (advection + diffusion) is needed only once. The source term (1) and the diagonal addition (1/delta tau) are such simple forms that they can be computed on the fly and the LMA equation can be solved over and over again, modulating the time step size, until the LMA is steady.
Fortunately, the accelerant solver leaves the Cij matrix undisturbed during the solve process, making it perfectly suited for performing many consecutive solves of our implicit form. With a controller to oversee the convergence of the LMA solution, we have a pretty good solution after 10 calls to the accelerant solver.
Results capability – removing previous barriers:
In the original LMA code, there is logic to either compute LMA at every iteration or only at end of run. The logic also allowed extra “end of run” iterations to ensure LMA convergence.
With the advent of the new LMA solver, those options are unnecessary and really don’t make sense. We are guaranteeing that we get a convergence solution every time we call the LMA solver, so extra iterations are unnecessary. Additionally, rather than worrying about every iteration versus just at end of run, it makes more sense to do the following:
- Update the LMA solution for each intermediate save point to include it in the *.res files.
- Ensure that the LMA solution updates for the last iteration of a run, even when you press the stop button or when the job stops due to auto convergence.
This allows the LMA field to render at all visualization checkpoints available to the user. It also prevents CPU resources from being wasted on LMA computations during iterations where it can’t be visualized. This saves significant wall clock time, as previous LMA calculations often dominated overall run times when computed at each iteration.
Because of these updates, we don’t have to support just end of run LMA calculations now – they are not that expensive, and we think it is more important to allow visualization of LMA coming from our *.res files. That eliminated flags, had clumsy controls, and makes LMA a special case. Instead, supporting intermediate saves and “end of job” saves gives the user the experience that is consistent with other field variables, such as velocity, pressure, etc.
The bottom line
Local Mean Age (LMA) analyses are more accessible to you, enabling you to be able to achieve more reliable results with faster solve times, ultimately seeing your LMA solution evolve with your overall solution.
Just another way your CFD team is working for you
This post was done in collaboration with David Waite