Coder Social home page Coder Social logo

giuliots95 / optimize_pipe_diameter_and_pressure_drop Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 278 KB

The code in this project solves the problem of finding the optimal diameter for a straight pipe conveying an incompressible fluid, for user defined mass flow rates. The best design solution is considered the one that minimizes both the pressure drop per unitary pipe length and the pipe diameter. Solutions are ranked according to TOPSIS method. The user can input the pipe absolute roughness, to identify the pipe material, and the density and dynamic viscosity, depending from the fluid to be studied.

License: GNU General Public License v3.0

MATLAB 100.00%
genetic-algorithm pareto multiobjective-optimization pipe pressure-drop

optimize_pipe_diameter_and_pressure_drop's Introduction

Optimize_pipe_diameter_and_pressure_drop

CONTENT This script solves the problem of finding the optimal diameter for a straight pipe coneying an incompressible fluid, for different mass flow rates. The best design solution is considered the one that minimizes both the pressure drop per unitary pipe length and the pipe diameter.

DESIGN VARIABLE There is 1 design variable (the pipe diameter) and 2 competitive objectives, so the problem is solved with the Pareto-optimum approach, that will output a "practical" compromise solution.

The user can express both lower and upper boundaries for the search of the optimal pipe diameter and can provide lower and upper boundary for the flow velocity [m/s], thus constraining the optimization problem.

PROBLEM CONSTANTS To perform the optimization, some fluid properties such as fluid dynamic viscosity and density shall be imposed. The rated mass flow rate to be conveyed by the pipe and the pipe absolute roughness (that depends from the pipe material and conditions) shall be given as constant inputs.

SOLVER CHOICE Non dominated configurations are found with the multi-objective genetic algorithm solver "gamultiobj", but other algorithms such as "paretosearch" can be used, editing the solver section.

Note that both multi-objective solvers do not support integer variables as default, while "ga" solver enables also mixed-integer problems, but was conceived for mono-objective optimization only. One could also define a scalar overall cost function, as it was done in [1], but the purpose of this study is to consider the 2 objectives in a strictly separated manner.

HOW IT WORKS For each mass flow rate, the program calculates non-dominated designs in terms of pipe diameter [m] and pressure drop per meter [mm H20/m]. The best solution is chosen with the TOPSIS method. For a closer look on this outranking method, a good explanation is provided by [2]. Since there are only 2 objectives, I chose to assign an equal weight (for instance, the array {0.5, 0.5}) to each one, thinking that they have the same importance. The user is free to change the weights when calling the topsis.m function. For example, one could assign w=[0.25, 0.75] to make the diameter objective more relevant.

Finally, the best design for each flow rate is represented in the "pipe chart", that the log-log chart commonly used by technicians to speed up pipelines sizing.

Note that commonly available pipe charts are provided for specific pipe applications, e.g. for pipes conveying domestic water etc. So, they are valid only for a specific fluid, meaning that fluid properties are implicitly assumed as constants amd also the fluid flow is assumed to be fully turbulent. In this program instead, user can change the fluid properties as desuired (e.g. how does the pipe design change if viscosity is higher than standard?). Moreover, no simplifying assumptions on the fluid flow are made to calculate friction coefficient and pressure losses. So this program was conceived to provide a more general and less "application dependant" approach to pipe diameter optimization.

References:

[1] S. B. Genic, B. M. Jacimovic, V. B. Genic, Economic optimiztion of pipe diameter for complete turbulence, Energy and Buildings 45 (2012) p. 335โ€“338. doi:10.1016/j.enbuild.2011.10.054

[2] X. Li et al. Application of the Entropy Weight and TOPSIS Method in Safety Evaluation of Coal Mines, Procedia Engineering. doi:10.1016/j.proeng.2011.11.2410

optimize_pipe_diameter_and_pressure_drop's People

Contributors

giuliots95 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.