Sabine Goodwin's blog
http://www.cd-adapco.com/blogs/sabine-goodwin
enDriving Down your Simulation Time with our Coupled Solver
http://www.cd-adapco.com/blog/sabine-goodwin/driving-down-your-simulation-time-our-coupled-solver
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>I wanted to take a moment and shine the spotlight on our coupled density-based solver. I must admit, I am perhaps a bit of a biased writer because after all, I have spent most of my career in industry analyzing and optimizing aircraft performance in flight regimes where the need for accurate shock capturing was part of daily life. Coupled solvers with a density-based approach have a proven track record for delivering robust solutions for these types of applications so it should come as no surprise that these numerical methods continue to spark my interest.</p>
<p>If you haven’t been performing your CFD simulations from under a rock, you have probably overheard your co-workers griping about coupled density-based approaches (paper-thin cubicle walls and open-plan offices are good for something!), with statements ranging from “they don’t perform well at low speeds” to “they just require too much memory”. Forget this for a minute because I am here to tell you that CD-adapco has made great strides in driving down the simulation times of our coupled solver for all speed regimes, resulting in a multi-purpose tool able handle a wide range of applications across many industries. Let me shed some light on how this is accomplished and what it means for our users.</p>
<p>Coupled density-based methods solve the conservation equations for mass, momentum and energy simultaneously using a (pseudo-) time-stepping approach. It is indeed true that solving this hyperbolic system of equations becomes ill-conditioned at low Mach numbers due to a disparity in convective and acoustic wave speeds, and it is well known that this leads to a significant deterioration in convergence. In addition, round-off errors are also larger at low Mach numbers resulting in a reduced accuracy. But there is a solution to this problem. To eliminate the numerical stiffness at low speeds, the coupled solver in STAR-CCM+ uses an automatic low-Mach pre-conditioning. To explain this in simple terms, think of it as the introduction of an artificial speed of sound (or compressibility) into the system and the effect of it is that it decreases the disparity among its eigenvalues (the system becomes less stiff). This powerful numerical tool not only enables fast convergence of solutions at low speeds, it also improves the accuracy of the results.</p>
<p>Problem solved? Not completely. Employing a low-Mach pre-conditioning technique can be problematic for some internal flows in which pressure differences must be established across regions of low speed flow, such as large vessels, long pipes, or flows with embedded recirculation zones. In these cases, the method may have problems with slow convergence of the mass balance (continuity) making it difficult to establish final mass flow. To alleviate this numerical problem, we have developed the novel Continuity Convergence Accelerator (CCA). This technique requires the solution of one additional elliptical equation, incurring a minimal increase in CPU time of the order of 5-10% per iteration. The result is that it greatly improves local and global balance of mass in cases where the pressure propagation through low-speed regions is important and leads to a significant acceleration in convergence (up to 50% in some cases).</p>
<p>There are several additional features in STAR-CCM+ that further enhance the stability and convergence of the coupled flow solver. For high supersonic and hypersonic flow, the AUSM+ (also known as awesome+) differencing scheme aids stability and insures accurate capturing of discontinuities. In addition, grid sequencing initialization provides a better initial condition for all speeds by solving an approximate initial solution via a series of coarsened meshes. It is like giving your CFD solutions a head start. It takes just a little computational effort (seconds to minutes) to perform the grid sequencing initialization and the pay-off is that it allows much more aggressive CFLs early on, resulting in a significantly faster convergence. Finally, our expert solutions driver combines a CFL ramp with corrections control/limiting and leads to a straight forward and robust convergence acceleration with little user input. This approach is hands-off (sit back and relax!) and helps to get to the results in 20 to 50% fewer iterations as compared to manual ramping. </p>
<p><img alt="" class="media-image" height="374" width="262" typeof="foaf:Image" src="http://cd-adapco.biz/sites/default/files/styles/large/public/Grid_sequencing_4.png?itok=9xqocv5h" /> </p>
<p>One of the most significant advantages of using a coupled solver is that its performance is not sensitive to mesh density (meaning that CPU scales linearly with cell count). This characteristic of the coupled solver pays off specifically for cases where large meshes, high accuracy and quick turnaround are required. To illustrate this, consider Formula 1 design, an application where our coupled solver has been pushed hard (and there aren’t even any shocks to resolve!). F1 teams are regulated on the amount of CFD/wind tunnel time that that can be used and their meshes are usually massive. The key to success here is to get a lot of simulation throughput while ensuring high fidelity and accuracy. For these cases, using the coupled solver has allowed a significant reduction in computational cost, by 25%, resulting in many more computations per year. </p>
<p>It is true, one of the trade-offs of using a coupled density-based solver is that more memory is required, but in my opinion, this should not be the focus of your future water cooler discussions. The bottom line for the CFD community is a quick turn-around of accurate solutions for a complete range of speed regimes and applications and CD-adapco has been constantly improving on STAR-CCM+’s coupled solver to meet these needs. </p>
<p>Have you used our coupled solver? What do you think? If you have read this far, you must have an opinion, so please leave me your comments in the section below.</p>
</div></div></div><span property="dc:title" content="Driving Down your Simulation Time with our Coupled Solver" class="rdf-meta"></span>Mon, 12 Aug 2013 02:35:05 +0000Sabine Goodwin6179 at http://www.cd-adapco.comUnlocking the Mystery of the Adjoint Solver
http://www.cd-adapco.com/blog/sabine-goodwin/unlocking-mystery-adjoint-solver
<div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p class="sub_title">The biggest challenge of gradient-based shape optimization using high-fidelity CFD has always been the formidable computational expense tied to constructing the sensitivity of the objective (or cost) functions with respect to the design variables.</p>
<p>Take for example the case of a typical external aerodynamics application. An aircraft manufacturer wants to improve on the operational performance of the existing fleet by adding winglets to their aging aircraft. This modernization will only pay off if the installation of the winglet results in significant fuel savings. The company aerodynamics expert is convinced that a good business case can be made and she takes the initiative by designing an initial winglet that can be retrofitted on the aging aircraft. The design is parameterized by a significant number of design variables such as span-wise airfoil sections with varying thickness and camber, winglet sweep, taper ratio, toe angle, cant angle and height. An initial CFD solution at cruise C<sub>L</sub> confirms that the aerodynamicist knows her craft because the winglet already shows potential on the first try! Results indicate a slight reduction in overall drag of the system, but unfortunately the wing root bending moment has increased which will require re-enforcing of the structure, negating the drag reduction in the process. The question for our expert now becomes: how does altering the shape of the winglet affect span-wise lift distribution (or induced drag) and how can I design an efficient winglet requiring minimal structural modifications and still meet my tight project deadline?</p>
<p>The standard approach to solving this problem has been to use finite-differences to estimate the gradient of the cost function with respect to the design variables. This is a costly procedure that involves first computing a baseline solution, then perturbing each design parameter one at a time and performing an additional solution following each perturbation; a process that amounts to one additional flow solution for every design variable. A gradient–based optimizer can then use this information, together with repeated evaluations of the cost, to alter the geometry in such a way that the cost function is driven to a minimum. You can imagine that in the case of the winglet design, with such a significant number of design variables defining the shape, the high computational cost associated with this approach makes it almost intractable. In addition, it’s also an inefficient way of doing things because the influence of the parameter changes are only understood after multiple iterations of the optimization cycle. The only option for the designer is to significantly decrease the CPU requirements by reducing the number of design variables to just a few, greatly limiting the scope and success of the project.</p>
<p>What if there was a powerful tool available to compute the sensitivity of the cost function with respect to many design variables at the CPU cost equivalent to just one flow solution? And not only that… What if this method also provided guidance on how to best optimize the design from the start? Integration of an adjoint solver as part of a CFD suite enables this economical sensitivity analysis and is a promising strategy for performing shape optimization involving few cost functions and many design variables, as is the case for the aircraft manufacturer’s winglet design for derivative aircraft.</p>
<p>For most of us, adjoint solvers remain a bit of a mystery and the mathematical underpinnings of the method can be quite intimidating. To explain it in very general terms, the approach is based on optimal control theory where the cost function is defined using Lagrange multipliers to include both the flow solution and the mesh movement solution as constraints on the optimization. By taking the derivative of this cost function with respect to the design variables first, and by solving the adjoint equations for the Lagrange multipliers next, the sensitivity of cost function with respect to the flow residual (mass, momentum and energy) and the mesh coordinates is obtained. It is then straightforward to compute the sensitivity of the cost function with respect to all of the design variables simultaneously through a simple matrix multiplication.</p>
<p>The adjoint solver is a very attractive approach because not only does it provide great insight into the system performance early on, it also offers a faster route to an improved design. Let’s go back to the winglet design problem. It does not matter how many design variables were required to parameterize the geometry, by performing one solution of the flowfield on the baseline winglet and one solution of the adjoint equations (at a CPU cost equivalent to one flow solution), all the important information is now available for the optimizer to make an informed decision towards improvement. Imagine the cost and time savings!</p>
<p>And it doesn’t end here. With the adjoint solver, the sensitivity of the cost function with respect to the flow residual is computed. This is effectively a measure of error in the solution and opens the door for uncertainty quantification. In addition, it provides a mathematical formulation for identifying areas requiring further mesh resolution to better capture the cost function. Instead of depending on solution gradients to resolve the mesh, the aerodynamicist can let the code do the work and she is likely to be impressed by the non-intuitive ways the mathematics refines the winglet mesh. This has the potential of significantly reducing mesh sizes while increasing accuracy resulting in a much more practical optimization process.</p>
<p>Optimal control theory has been around for many years, so why is an adjoint approach to design optimization using CFD not yet main-stream? The bottom line is that implementation with CFD can be complex (there are several approaches e.g. continuous vs. discrete) and especially the transformation of surface sensitivities into a smooth shape through mesh morphing is challenging. The demand from our user community has been high and as a result, STAR-CCM+ will include an integrated discrete adjoint solver in v8.04. The solver provides both 1<sup>st</sup> and 2<sup>nd</sup> order adjoints for a wide range of cost functions and is broadly compatible with the existing STAR-CCM+ physics models. CD-adapco has a dedicated team working on delivering additional features for the adjoint solver in the near future including adding the mesh morpher and integration with optimization tools. Look out for it in future releases!</p>
<p><img alt="" class="media-image" height="374" width="499" typeof="foaf:Image" src="http://solutions.cd-adapco.com/sites/default/files/styles/large/public/Revised_Image.jpg?itok=r6_RKNMs" /></p>
</div></div></div><div class="field field-name-field-industries field-type-taxonomy-term-reference field-label-above"><div class="field-label">Industries: </div><div class="field-items"><div class="field-item even"><a href="/industries/aerospace-defense" typeof="skos:Concept" property="rdfs:label skos:prefLabel">Aerospace & Defense</a></div></div></div><div class="field field-name-field-products field-type-taxonomy-term-reference field-label-above"><div class="field-label">Products: </div><div class="field-items"><div class="field-item even"><a href="/products/star-ccm%C2%AE" typeof="skos:Concept" property="rdfs:label skos:prefLabel">STAR-CCM+®</a></div></div></div><span property="dc:title" content="Unlocking the Mystery of the Adjoint Solver" class="rdf-meta"></span>Mon, 17 Jun 2013 21:38:24 +0000Sabine Goodwin6012 at http://www.cd-adapco.com