Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

MATLAB function Colebrook

Example 1.1 Solution of the Colebrook Equation by Successive Substitution, Linear Interpolation, and Newton Raph on Methods. Develop MATLAB functions to solve nonlinear equations by the successive substitution method, the linear interpolation, and the Newton-Raphson root-finding techniques. Use these functions to calculate the friction factor from the Colebrook equation [Eq. (1.4)] for flow of a fluid in a pipe with e/Z> =10 and Njf, = 10. Compare these methods with each other. [Pg.15]

The next section in the function is the main iteration loop, in which the iteration according to Eq. (1.29) takes place and (he convergence is checked. In the case of the Colebrook equation, Eq. (1.4) is rearranged to solve for/ The right-hand side of this equation is taken as g(f ) and is introduced in the MATLAB function Colebrookg.m. Numerical results of the calculations are also shown, if requested, in each iteration of this section. [Pg.16]

Linear interpolation method (U.m) This function consists of the same parts as the XGX.m function. The number of input arguments is one more than that of XGX.m, because the linear interpolation method needs two starting points. Special care should be taken to introduce two starting values in which the function have opposite signs. Eq. (1.5) is used without change as the function the root of which is to be located. This function is contained in a MATLAB function called Colebrook.m. [Pg.16]

Newton-Raphson method (NR.mh The structure of this function is the same as that of the two previous functions. The derivative of the function is taken numerically to reduce the inputs. It is also more applicable for complicated functions. The reader may simply introduce the derivative function in another MATLAB function and use it instead of numerical derivation. In the case of the Colebrook equation, the same MATLAB function Colebrookm, which represents Eq. (1,5), may be used with this function to calculate the value of the friction factor. [Pg.16]


See other pages where MATLAB function Colebrook is mentioned: [Pg.16]    [Pg.26]   
See also in sourсe #XX -- [ Pg.16 , Pg.24 ]




SEARCH



Colebrook

MATLAB

MATLAB functions

© 2024 chempedia.info