


{"id":395940,"date":"2024-12-02T12:19:54","date_gmt":"2024-12-02T12:19:54","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/395940\/"},"modified":"2024-12-02T12:19:54","modified_gmt":"2024-12-02T12:19:54","slug":"395940","status":"publish","type":"reply","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/395940\/","title":{"rendered":"Reply To: NA"},"content":{"rendered":"<p>&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Hello Jason,&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Let me try to reconstruct what was lost because of the database corruption. This time I have a local backup.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&nbsp;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;<strong>&lt;u&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;General recommendations&lt;\/span&gt;&lt;\/u&gt;<\/strong>&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Do not use Ansys Workbench for shape optimization. You can prepare your calculations there. But the automation of WB can conflict with the various files the optimizer creates. I strongly recommend using the standalone version of Fluent for the optimization.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Do a sensitivity study before running the optimization. Note that Fluent can only post-process the sensitivity fields of the current calculation. To compare them, you need either separate sessions or export the results to EnSight to have both loaded at the same time. This analysis has multiple goals:&lt;\/span&gt;&lt;\/p&gt;<\/p>\n<ul>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Understand which regions of which operating condition are sensitive.&lt;\/span&gt;<\/li>\n<p>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Understand how different observable definitions might influence the result.&lt;\/span&gt;<\/li>\n<p>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Understand if or where observables support each other or are conflicting.&lt;\/span&gt;<\/li>\n<\/ul>\n<p>&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;You can explore different optimization strategies:&lt;\/span&gt;&lt;\/p&gt;<\/p>\n<ul>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Explore different observables. Some might work better than others. For example, the velocity magnitude does not have a sign and can be maximized or minimized for the two directions. The mass flux has a sign and must be treated differently. For other boundary conditions you might need the pressure drop but measuring the total pressure drop between inlet and outlet or the pressure drop in one of the channels can lead to different results.&lt;\/span&gt;<\/li>\n<p>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;You can apply a split optimization strategy. First, optimize the forward path on its own. Then optimize the reverse direction on its own. This simplifies the optimization process. Depending on the sensitivity distribution, you might want to restrict the deformability of certain regions.&lt;\/span&gt;<\/li>\n<p>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;!&#8211;[endif]&#8211;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;With the upcoming 2025 R1 (available in January), you can test if the optimizer can keep the mass flow rate in the forward direction above a user-defined minimum and minimize it in the other direction.&lt;\/span&gt;<\/li>\n<\/ul>\n<p>&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Also keep in mind that you have sharp corners in your geometry. The separation at these corners is often transient in nature, which influences the stability of the adjoint calculation more than it influences the stability of the flow calculation. The residual minimization scheme can often bring the adjoint residuals down. But you should be sure that the flow calculation is stable, i.e., stopping the flow calculation at different iterations does not show a different flow field. There are averaging methods available if this cannot be achieved but I do not recommend them before you have more experience with more stable flow calculations.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&nbsp;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;<strong>&lt;u&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Boundary conditions&lt;\/span&gt;&lt;\/u&gt;<\/strong>&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;You have two possibilities for your BC types. You can use two pressure inlet BCs or a combination of mass flow\/velocity and pressure outlet BCs.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;The advantage of the pressure inlet BCs is the easy way to parameterize them. Don&rsquo;t get confused by the name, when the flow goes out of the pressure inlet it behaves just like the pressure outlet BC type. You might need to initialize the flow calculation between the optimization steps, though. And two pressure BCs are not the most stable setup to begin with.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;The advantage of mass flow inlet or velocity inlet and pressure outlet BCs is their stability. However, changing the BCs in an automated process is not available as a built-in method in Fluent. You need a few lines of script to do this.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;But the choice of BC should be driven by what you want to model. The Tesla valve should choke the flow for the reverse direction. While it is doing this regardless of the boundary conditions, the outcome for the optimization can be very different. For pressure BCs the mass flow rate reduces, which can change the flow behavior (e.g., the existence or strength of recirculation and separation). For mass flow\/velocity + pressure BCs the pressure drop changes but the general flow behavior is unlikely to change.&lt;br&gt;Consider the true operating conditions that apply to operating the device. There might be more than just the two general flow directions.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;I outlined the script to change the BC-type in the other thread if you need that. Because of the limitations of scripting support especially for Scheme, I cannot provide more details. When you have difficulties, test the script line by line before using it within the optimization loop.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;To initialize the flow and\/or adjoint solution, search the documentation for &ldquo;;@&rdquo;. You can find it in the Fluent 2024 R2 User&rsquo;s Guide, III. Solution mode, chapter 48.2.6. Using the Gradient-Based Optimizer, step 10: <a href=\"https:\/\/ansyshelp.ansys.com\/public\/account\/secured?returnurl=\/Views\/Secured\/corp\/v242\/en\/flu_ug\/flu_adj_usage.html%23flu_adj_sec_adjoint_grad_opt\" target=\"_blank\" rel=\"noopener\">https:\/\/ansyshelp.ansys.com\/public\/account\/secured?returnurl=\/Views\/Secured\/corp\/v242\/en\/flu_ug\/flu_adj_usage.html%23flu_adj_sec_adjoint_grad_opt<\/a>&lt;br&gt;Add a new execute command using &ldquo;Execute Repeatedly every 1 Design Iteration&rdquo; with the following three lines:&lt;\/span&gt;&lt;\/p&gt;<\/p>\n<pre class=\"MsoNormal\">&lt;span lang=\"EN-US\" style=\"mso-ansi-language: EN-US;\"&gt;\/solve\/initialize\/hyb-initialization yes&lt;\/span&gt;&lt;br&gt;&lt;span lang=\"EN-US\" style=\"mso-ansi-language: EN-US;\"&gt;\/adjoint\/run\/initialize&lt;\/span&gt;&lt;br&gt;&lt;span lang=\"EN-US\" style=\"mso-ansi-language: EN-US;\"&gt;;@before-flow&lt;\/span&gt;<\/pre>\n<p>&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/12\/02-12-2024-1733140582-mceclip0.png\" width=\"422\" height=\"345\" \/>&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Depending on your strategy and operating conditions you might want to split this into two commands to initialize flow and adjoint separately at different steps of the optimization process.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Note: 2025 R1 will initialize automatically when you have more than one objective.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&nbsp;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;<strong>&lt;u&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Adjoint convergence&lt;\/span&gt;&lt;\/u&gt;<\/strong>&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;From what you have shown, I&rsquo;m not concerned about the adjoint convergence. The residual minimization scheme can reduce the adjoint residuals quite reliably. If it struggles, you can increase the number of modes.&lt;br&gt;Important: Never show the expert controls of the residual minimization stabilization scheme! Just having this box checked can change the behavior of the stabilization! Only use it when you know how it influences the calculation.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Typically, I use Solution-Based Controls Initialization to reset the solver controls on initialization, 10 iterations for the first scheme without auto detection, and 20 on the second. That should be enough to converge the adjoint. If it&rsquo;s not, increase the number of modes slowly. If you ever need values above 140 it&rsquo;s time to think about alternative strategies and closer examination of the flow and adjoint solutions. For a better understanding, I recommend the training material for the gradient-based optimization that is available on the Ansys Learning Hub.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;en-DE&#8221; style=&#8221;mso-no-proof: yes;&#8221;&gt;<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/12\/02-12-2024-1733140623-mceclip1.png\" width=\"589\" height=\"376\" \/>&lt;br&gt;&lt;!&#8211;[endif]&#8211;&gt;&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;I also recommend taking a closer look at the flow behavior when you have convergence difficulties with adjoint. Do you have separation or recirculating flow somewhere? If yes, is this stable when you stop the calculation at different iterations or does it change slightly?&lt;br&gt;There are advanced diagnosis tools available in the text interface by keeping the cell residuals for the flow and the adjoint calculation, if you really want to dive deeper into understanding what is happening. I do not recommend this step. It requires a lot of experience to make sense out of the values that you see there. But it does exist if you want to analyze the stability on a cell level. Search the User&rsquo;s Guide for &ldquo;cell residuals&rdquo; for the flow solver and check chapter 48.2.3.4. Printing and Postprocessing the Adjoint Equation Residuals for the adjoint solver. Again: I do not recommend this unless you have a lot of time to gain understanding of how to interpret the results with many different cases.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&nbsp;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;<strong>&lt;u&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Sensitivity analysis&lt;\/span&gt;&lt;\/u&gt;<\/strong>&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Taking a closer look at the shape sensitivity is often ignored but it can give you valuable insights. The quantities you want to look at are the log10 shape sensitivity or the surface shape sensitivity. The first one is a logarithmic scale of the shape sensitivity, which makes it easier to see the distribution because it has a very large range. The second one is a smoothed version of the shape sensitivity.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;I recommend to start with the surface shape sensitivity but before you do, change the postprocess options that you can access from the Design ribbon. Make sure the surface shape sensitivity is set to spring. The default radial basis function approach can be computationally expensive. Whichever method you use, this is just to get an impression of the sensitivity distribution, it is not used for anything by the mesh morphing. The Design Tool uses the raw shape sensitivity and applies the smoothing during the morphing process, which depends on the selected morphing method.&lt;br&gt;Unfortunately, it is not possible to export the surface shape sensitivity vector components to EnSight. If you want to use EnSight for a direct comparison, use the unsmoothed shape sensitivity components instead.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Use vector plots for 2D cases. For 3D cases it is often more convenient to start with contour plots of the normal surface shape sensitivity. Check the regions of high absolute values for both flow directions.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;<img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/12\/02-12-2024-1733141924-mceclip2.png\" \/><img decoding=\"async\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/12\/02-12-2024-1733141928-mceclip3.png\" \/>&lt;\/span&gt;&lt;\/p&gt;<\/p>\n<ul>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;!&#8211;[endif]&#8211;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Are the regions similar?&lt;\/span&gt;<\/p>\n<ul>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;If yes, is the sign identical (general direction of the vector)?&lt;\/span&gt;<\/p>\n<ul>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;If yes, both observables support each other, it&rsquo;s just a question of scaling them appropriately.&lt;\/span&gt;<\/li>\n<p>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;If no, either the observables are in conflict with each other. Optimization without defining trade-offs is either very challenging or even impossible.&lt;\/span&gt;<\/li>\n<\/ul>\n<\/li>\n<p>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;If no, how different are they? Would it be possible to concentrate the shape change of one flow direction to certain regions and the reversed direction to different ones?&lt;\/span&gt;<\/li>\n<\/ul>\n<\/li>\n<p>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;!&#8211;[endif]&#8211;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;How different are the absolute values of the shape sensitivities?&lt;\/span&gt;<\/p>\n<ul>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Remember that the shape sensitivity has a unit that depends on the selected observable. If the observables are comparable (e.g., both use the average velocity magnitude at one boundary), differences indicate how to scale the objectives.&lt;\/span&gt;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Based in the outcome of looking at the shape sensitivities you can derive an optimization strategy.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Remember: depending on maximizing or minimizing the observable, you might need to reverse the direction of the sensitivity vectors!&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&nbsp;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;<strong>&lt;u&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Optimization strategy&lt;\/span&gt;&lt;\/u&gt;<\/strong>&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;As indicated initially, there are different strategies possible. The flexibility of the optimizer is limited in favor of a fully automated workflow. Depending on the strategy that you want to use, you might need to do this manually.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;<em>&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Standard approach&lt;br&gt;&lt;\/span&gt;<\/em>&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Based on the sensitivity analysis, you can set you objectives and hope for the best. While this works well for a single objective, it rarely works for multiple objectives or conditions.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;<em>&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Consecutive optimizations&lt;br&gt;&lt;\/span&gt;<\/em>&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;This approach works best when the sensitivities have their extreme values in different regions of the domain. It is mostly useless when they are in conflict everywhere. Just run the optimizations with a single objective\/condition. Once this cannot be continued, change the flow direction and run a new optimization.&lt;br&gt;&lt;\/span&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;You can also change the region easily with this approach, for example, to optimize the straight part of the pipe for the forward calculation and the bended part for the reversed direction.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;<em>&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Customized approaches&lt;br&gt;&lt;\/span&gt;<\/em>&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Obviously, there are more approaches.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Similar to the consecutive approach from above, you could do this in one step. There is no tool in Fluent to automate this apart from writing your own full optimization script. The idea is to set the first condition, calculate flow and adjoint, set the region and design conditions as needed, and morph the mesh. Then switch to the second condition and repeat. With this alternating approach you can run a combined optimization but with different settings for the mesh morphing.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;You can also use different observables for the directions. I didn&rsquo;t test this. But you could come up with an idea to maximize the flow rate through different parts of the domain, e.g., for the reverse direction maximize the flow rate through the bend, for the forward direction maximize the flow rate through the outlet. You can implement this in the optimizer by setting an objective to &lsquo;none&rsquo; for the condition where it is not relevant. This will still calculate the adjoint for it, but it is not considered during mesh morphing.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;As indicated above, 2025 R1 offers new methods for the optimization that can be useful for a case like this. You can implement a similar procedure yourself. Just run a single-objective optimization but stop it when the observable for the other operating condition is outside the bounds (e.g., the mass flow rate for the primary flow direction drops below a user-defined minimum). Only if this is the case, optimize for the other direction until it is well above the threshold. Then continue with the first set of settings.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;There are more. I hope you get the idea that there is not just the workflow that is implemented in the gradient-based optimizer. That is the most common one, but not the only one. Understand the sensitivities. Then derive a workflow to change the shape in a promising way.&lt;\/span&gt;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&nbsp;&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;<strong>&lt;u&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Conclusions&lt;\/span&gt;&lt;\/u&gt;<\/strong>&lt;\/p&gt;&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Optimizing a Tesla valve design is not the most trivial task.&lt;\/span&gt;&lt;\/p&gt;<\/p>\n<ol>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Start with the boundary conditions. Which ones are reasonable to describe the physics of the problem?&lt;\/span&gt;<\/li>\n<p>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Shed a thought or two about local stability of the flow calculation.&lt;\/span&gt;<\/li>\n<p>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;!&#8211;[endif]&#8211;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Think of possible observables. There are often more than one possible objective functions and because of the nature of the adjoint method the resulting shape can be quite different.&lt;\/span&gt;<\/li>\n<p>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Analyze the sensitivities for the different operating conditions and observables. Understand where they support each other and where they are in conflict.&lt;\/span&gt;<\/li>\n<p>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Derive possible optimization strategies. Not all of them are available as built-in capabilities. Be creative, then simplify.&lt;\/span&gt;<\/li>\n<p>&lt;li class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;Run the optimization. Analyze how it performs. Fine-tune the approach or use one of the other strategies.&lt;\/span&gt;<\/li>\n<\/ol>\n<p>&lt;p class=&#8221;MsoNormal&#8221;&gt;&lt;span lang=&#8221;EN-US&#8221; style=&#8221;mso-ansi-language: EN-US;&#8221;&gt;I hope I didn&rsquo;t miss a question and that I covered all of the lost information.&lt;\/span&gt;&lt;\/p&gt;<\/p>\n","protected":false},"template":"","class_list":["post-395940","reply","type-reply","status-publish","hentry"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Hello Jason,Let me try to reconstruct what was lost because of the database corruption. This time I have a local backup. General recommendationsDo not use Ansys Workbench for shape optimization. You can prepare your calculations there. But the automation\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/395940\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Ansys Learning Forum | Ansys Innovation Space\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Reply To: NA | Ansys Learning Forum\" \/>\n\t\t<meta property=\"og:description\" content=\"Hello Jason,Let me try to reconstruct what was lost because of the database corruption. This time I have a local backup. General recommendationsDo not use Ansys Workbench for shape optimization. You can prepare your calculations there. But the automation\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/395940\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-12-02T12:19:54+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-12-02T12:19:54+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Reply To: NA | Ansys Learning Forum\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Hello Jason,Let me try to reconstruct what was lost because of the database corruption. This time I have a local backup. General recommendationsDo not use Ansys Workbench for shape optimization. You can prepare your calculations there. But the automation\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/395940\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/395940\\\/#listItem\",\"name\":\"Reply To: NA\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/395940\\\/#listItem\",\"position\":2,\"name\":\"Reply To: NA\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"name\":\"Home\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#organization\",\"name\":\"Ansys Learning Forum\",\"description\":\"Ansys Innovation Space\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/395940\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/395940\\\/\",\"name\":\"Reply To: NA | Ansys Learning Forum\",\"description\":\"Hello Jason,Let me try to reconstruct what was lost because of the database corruption. This time I have a local backup. General recommendationsDo not use Ansys Workbench for shape optimization. You can prepare your calculations there. But the automation\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/reply\\\/395940\\\/#breadcrumblist\"},\"datePublished\":\"2024-12-02T12:19:54+00:00\",\"dateModified\":\"2024-12-02T12:19:54+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/\",\"name\":\"Ansys Learning Forum\",\"description\":\"Ansys Innovation Space\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Reply To: NA | Ansys Learning Forum","description":"Hello Jason,Let me try to reconstruct what was lost because of the database corruption. This time I have a local backup. General recommendationsDo not use Ansys Workbench for shape optimization. You can prepare your calculations there. But the automation","canonical_url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/395940\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/395940\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","position":1,"name":"Home","item":"https:\/\/innovationspace.ansys.com\/forum","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/395940\/#listItem","name":"Reply To: NA"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/395940\/#listItem","position":2,"name":"Reply To: NA","previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","name":"Home"}}]},{"@type":"Organization","@id":"https:\/\/innovationspace.ansys.com\/forum\/#organization","name":"Ansys Learning Forum","description":"Ansys Innovation Space","url":"https:\/\/innovationspace.ansys.com\/forum\/"},{"@type":"WebPage","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/395940\/#webpage","url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/395940\/","name":"Reply To: NA | Ansys Learning Forum","description":"Hello Jason,Let me try to reconstruct what was lost because of the database corruption. This time I have a local backup. General recommendationsDo not use Ansys Workbench for shape optimization. You can prepare your calculations there. But the automation","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/395940\/#breadcrumblist"},"datePublished":"2024-12-02T12:19:54+00:00","dateModified":"2024-12-02T12:19:54+00:00"},{"@type":"WebSite","@id":"https:\/\/innovationspace.ansys.com\/forum\/#website","url":"https:\/\/innovationspace.ansys.com\/forum\/","name":"Ansys Learning Forum","description":"Ansys Innovation Space","inLanguage":"en-US","publisher":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#organization"}}]},"og:locale":"en_US","og:site_name":"Ansys Learning Forum | Ansys Innovation Space","og:type":"article","og:title":"Reply To: NA | Ansys Learning Forum","og:description":"Hello Jason,Let me try to reconstruct what was lost because of the database corruption. This time I have a local backup. General recommendationsDo not use Ansys Workbench for shape optimization. You can prepare your calculations there. But the automation","og:url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/395940\/","article:published_time":"2024-12-02T12:19:54+00:00","article:modified_time":"2024-12-02T12:19:54+00:00","twitter:card":"summary_large_image","twitter:title":"Reply To: NA | Ansys Learning Forum","twitter:description":"Hello Jason,Let me try to reconstruct what was lost because of the database corruption. This time I have a local backup. General recommendationsDo not use Ansys Workbench for shape optimization. You can prepare your calculations there. But the automation"},"aioseo_meta_data":{"post_id":"395940","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2025-10-17 19:29:06","updated":"2026-08-12 19:22:07","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/forum\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tReply To: NA\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/innovationspace.ansys.com\/forum"},{"label":"Reply To: NA","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/reply\/395940\/"}],"acf":[],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/395940","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/reply"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/replies\/395940\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=395940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}