MENU
helyx-valve

SIMULATING TRANSIENT FLOW IN A CLOSING BUTTERFLY VALVE

MULTIPOINT ADJOINT OPTIMISATION II

April 17, 2019 Comments (0) Views: 407 Adjoint, Featured, HELYX, Video

MULTIPOINT ADJOINT OPTIMISATION

ENGYS developers and application engineers have been closely involved in the success of the adjoint optimisation methodology since its first implementation into CFD codes more than 10 years ago. Since those early days, ENGYS has constantly driven the development forward to improve robustness and accuracy as well expanding the functionality. HELYX-Adjoint has been adapted as the primary easy-to-use tool for adjoint based topology- and shape-optimisation by many companies. In the next few paragraphs I want to shed some light on a fairly recent implementation in the area of multipoint adjoint topology optimisation.

THE PROBLEM

The geometry and configuration used here is extremely simplified and fictitious, purely chosen to deliver the message. The method has been successfully applied to complex real-world geometries, alas, the cool stuff is confidential.

If you are familiar with topology optimisation, you will know that the method works from a given design space with fixed boundary conditions and tries to converge to a new shape according to the objective functions given.

In this case we have two ducts (green & red duct) that need to somehow pass each other in a given spherical design volume. Inlet and outlet interfaces for both ducts are fixed and the objective is to get a solution with minimum losses for both ducts. At the same time, we want duct shapes that are fairly simple and easy to manufacture.

Design Space
Fig. 1 Design Space

The first objective is handled by the “minimise power loss” function. This will be based on a system of adjoint equations generating volume sensitivities based on the primal flow solution penalizing “bad” cells. For generating “pleasing” shapes we found that the “minimise duct volume” objective is quite helpful. This, not being a real adjoint objective, does not require additional computational effort, but merely says all cells are “bad”. Both objectives get combined with an assigned weight, driving the topology engine, in this case a levelset approach that is our default method and known to produce smooth shapes. The whole process takes place in a single simulation solving the primal solution, the adjoint solution and driving the topology engine in an iterative cycle. In the end it results in a converged solution giving a final shape for a duct based on the weights chosen for each objective. For a single duct problem this process is well established and routine.

In this particular case however, we are faced with the problem that two ducts with separate flows need to be optimised and their pathways cross each other. A shared geometry, i.e. a manifold is not what we are after, we want two separate ducts.

I will not go into detail about the actual CFD boundary conditions. The mesh is fine enough to give smooth results, coarse enough to have the simulation run in a few minutes. The flow rates for both ducts are the same.

Doing It Old Style

A viable approach is to first optimise one duct, arrive at a final shape, freeze that shape and then optimise the second duct with the first being a hard obstacle. Nothing wrong with that method, so we go ahead and run an adjoint optimisation for the green duct, which is rather uninteresting, being a straight path.

The result is kind of a bloated tube, quite typical for an adjoint topology optimisation. Nothing exciting, really. We note the resulting power loss and will use it to normalize all other results. So, it’s =1. In the second step we use the optimised green duct shape as an obstacle within our design volume, forcing the solver to come up with a shape for the red duct that has to go around it, while still trying to optimise for the two objectives, minimal power loss and small volume.

Resulting in this solution.

Giving a normalized power loss of = 1.92. While being a somewhat “clever” design, we nevertheless discard it as not viable from a manufacturing point of view. Too expensive and complicated to put in place. Tricking the adjoint solver into an asymmetric solution (by the sophisticated method of sticking a baffle into the domain) we get the following solution:

Power loss comes out as = 2.53. Unsurprisingly, it’s higher than the clever design, since we have further constrained the design space. It’s now a red duct that can be manufactured and installed fairly easy. However, the power loss discrepancy between green duct and red duct is quite high. Keep in mind, same inlet/outlet diameter and same flow rate.

Doing It Old Style, The Other Way Around

Now the experienced engineer would have done it the other way around to start with, given the fact that red duct is already hampered by having to bend around a 45° angle instead of going straight. So lets follow the same procedure, but start with red duct first. Giving it all the freedom of the design space it wants to look like this:

Bending, slightly bloated. Nothing extravagant. Normalized power loss is = 1.60, so quite a lot down from the previous result of 2.53. Lets see how green duct behaves if it has to go around the red duct.

Power loss = 1.37, but … discarded for the above mentioned reasons. Introducing a baffle to make it harder to path around the upper side and green duct looks like this:

Going around the red duct in a single path now, bending downwards and upwards resulting in a power loss of = 2.10 . So now we have the situation that green duct suffers quite badly while red duct gets away with its best solution.

Enter Multipoint Optimisation

We can mark our solutions in a power loss red duct vs. green duct diagram. First our two solutions with the clever symmetric splits. Giving us a Pareto front based on two data points (only, so a mere straight line).

Fig. 2 Pareto front based on two best solutions (split ducts)

Since we discarded those designs due to their complexity and cost to manufacture, the Pareto front shifts to the right and up, now based on the two solutions to the problem, in which we enforced an asymmetric single path for the second duct to be optimised.

Fig. 3 Pareto front shift based on easy-to-build solutions

Looking at that Pareto front intensely, two questions pop up.

  • Unhappy with the large difference in power loss between green duct and red duct for both viable solutions, how can we come up with a solution that lies, say, in the middle of this Pareto front somewhere between our two solutions?
  • Is the Pareto front actually a straight line or is it indeed of hyperbolic shape, i.e. is there a viable (and easy to manufacture) solution that lies on the left hand side of the straight front?

And this is where the recently implemented multipoint process comes in. Previously, the two ducts were only weakly coupled, i.e. the interaction was only one way. First duct is fixed, second duct has to find a solution around it, without a chance of first duct cooperating. With the new approach we strongly couple the two optimisations. Both adjoint topology optimisations (i.e. green duct and red duct) run concurrently and constantly communicate with each other. Communication is done via a new objective function, “minimise overlap”. This new objective checks for cells that are currently part of both duct solutions and penalises them as “bad”. This is again done with a weight, which needs to be high enough to not only minimise overlap but completely erase it from the solution. Computationally this does not add much to the cost of doing it with the old process. We still only run two flow solutions (green duct & red duct) and for each one an associated set of adjoint equations for the power loss objective. The overlap check is cheap.

Now let’s look at the results.

Note that the overlap objective is set to only kick in after the ducts have already formed somewhat. So we allow the ducts to optimise separately for the first few iterations without noticing the other, then the overlap kicks in and also forces separation while the optimisation refines and converges. Not only is the process oddly pleasing to watch but the results are also nice. We did not have to force any asymmetry here, the results came out like this straight away. Both ducts also result in almost equal normalized power loss. Green duct = 1.74 and red duct = 1.71. Putting this into our diagram the solution lies indeed left hand of our initial straight line.

Fig. 4 Position of multipoint solution

Success! Creating more points on the Pareto front would now only be a matter of rerunning with different weights for the power loss objectives and we would indeed form a hyperbolic shape.

Summary And Looking Beyond

Sure, the final solution is not a jaw dropping new design of two ducts passing, but the simple example is suitable for demonstrating the process. It was also only shown for two ducts. Can we make it more complex? Certainly!

Keep in mind that the solution is not a simple pathing algorithm but a full adjoint optimisation for minimizing power loss in each single duct.

As we are quite excited about this new functionality, this is only one part of the multipoint optimisation development. The other part has to do with “robust design”. Robust design is aiming at finding an optimal solution to a given set of conditions (e.g. flow rate) without the final design being absolutely terrible if the conditions just change slightly (e.g. 110% flow rate). So a robust design might not be the global optimum in a parameter space but a local optimum with gentle gradients around it. The Cheops Pyramid rather than the Burj Khalifa. Not as high but you don’t necessarily fall to certain death if you take a step off its highest point. In optimisation processes robust design is achieved by running separate simulations with different conditions (e.g. different flow rates) and combining the effects with some weights. For example your most likely design condition of 100% flow rate gets a weight of 0.6 while 90% and 110% flow rate conditions get a weight of 0.2 each. By shifting the weights you can adjust your robustness, i.e. slide between the pyramid and the skyscraper.

In adjoint multipoint optimisation we do the same thing. We define n amount of primal conditions (e.g. different flow rates) and run those primals and the associated adjoint equations systems concurrently. Based on the weights cells are penalized and the topology engines converges towards a final robust shape. Obviously the cost scales with n.

We can also combine, and in fact have done this for clients (cool stuff = confidential), the robust design with the duct routing functionality highlighted here,  running a single optimisation with effectively more than 30 objectives.

If you are interested to learn more or think this functionality can help you in your design process, the method is readily available in our HELYX-Adjoint module. Feel free to contact us via info@engys.com or drop a comment below.

Tags: ,