### Improving and Troubleshooting the Sizing Process

Check the Continuous Solution First

For small problems with less than ten independently sized pipes, it should be possible to obtain a Discrete solution in a few minutes or less. Larger problems can take a long time to solve, so it is important to point the sizing process in a good starting direction.

The Discrete problem is generally much more difficult to solve than the Continuous, and most of the Discrete methods depend on an initial Continuous solution. Therefore, it is important to ensure the Continuous solution is good. There are a few guidelines to consider:

• Check the quality of the Continuous Solution before proceeding to the Discrete Solution - If the Continuous solution is not ideal, then the methods which use the Continuous solution for a starting point will have a poor Discrete solution as well.

• Ensure the Discrete Solution is worse than the Continuous Solution - A Discrete solution always places further limits on the solution, and should therefore have a negative impact on the Objective. If the Discrete solution is better than the Continuous, this means that either the Continuous solution is poor, or that there are numerical issues affecting the solution by some small amount. If the difference is significant, this likely indicates an issue with the sizing process, the solver, or user input.

• Check for Consistent Continuous Solutions - Using any of the Continuous methods should give comparable results. If this is not the case, it may indicate that ANS is finding Local Minimums with one or more of the methods.

• Use the best Continuous Solution to Proceed - If one of the methods is finding a better Continuous Solution than the others, and the results are reasonable, this result should be used as the basis for the Discrete Solution.

Determine if the solution is a Local Minimum

It is possible for ANS to get stuck in a local minimum and not find the global minimum. If this is happening, there are a few things to try:

• Change the initial pipe sizes

• Use a different Sizing Method - Pure Discrete Methods are inherently better suited to finding global minimums.

• Temporarily remove some of the Design Requirements - This can help identify Design Requirements that are actually driving the sizing process. Having too many Design Requirements can make the system much more difficult to solve with minimal gain.

Use a Different Search Method

The different search methods have different strengths and weaknesses. It is possible that one method will struggle with a problem that others can easily find a solution for.

It is also a good indicator that the best solution has been found if different methods agree.

Use Logical Design Requirements

• Design Requirements in Closed Areas of a Model - ANS will attempt to identify Design Requirements that are irrelevant and ignore them during the sizing process. However, depending on ANS to do this is not advised, Design Requirements on closed areas should be removed. For example, it is not meaningful to apply a minimum flow rate requirement on a closed pipe - it is possible that ANS will not find a Feasible solution if such a Design Requirement is left in place.

• Conflicting Design Requirements - It is easy to apply requirements that are impossible to meet. For example, a minimum flow rate greater than an in-line Flow Control Valve setpoint, a maximum pressure lower than the connected Assigned Pressure, or a maximum speed on a compressor that has been manually set to a higher speed. With these types of Design Requirements, ANS will (correctly) conclude that no feasible design exists, and the results may not be meaningful.

Change the Initial Pipe Sizes

The sizing process uses the initial pipe sizes defined by the user as a starting point. It is possible to start the sizing process in an area that poses difficultly. Increasing or decreasing the initial pipe sizes can help.

Simplify the Problem

It is good practice to solve a simpler problem first, before proceeding to a more complex problem.

• Be sure the model solves as expected before using ANS - Any issues that are present in the base hydraulic model will also be present in the sizing process.

• Find a Continuous Solution before searching for a Discrete solution.

• Use a small number of Design Requirements, and add them as necessary. For troubleshooting purposes, it can be useful to remove Design Requirements that are necessary in the final design.

• Decrease the number of variables - Adding more pipes to Common Size Groups, and limiting the number of Common Size Groups, can make the problem much easier to solve.