help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pump - Problems


From: Dmitri A. Sergatskov
Subject: Re: Pump - Problems
Date: Sun, 14 Apr 2013 14:51:49 -0500




On Sun, Apr 14, 2013 at 1:25 PM, klausp <address@hidden> wrote:
Thank you Dmitri!

Well, I understand that the mathematical model wasn´t right. I corrected the
problem but it still not working.
I´ve tried different initial values and some substituctes of the Colebrook
law (like Haaland). And isn´t working. could someone give more one tip?

Thank you!
Klaus Peter

>>>warning: matrix singular to machine precision, rcond = 4.36065e-018
warning: attempting to find minimum norm solution
warning: zgelsd: rank deficient 3x3 matrix, rank = 2, tol = -1.000000e+000
>>>warning: matrix singular to machine precision, rcond = 2.66901e-020
warning: attempting to find minimum norm solution
warning: zgelsd: rank deficient 3x3 matrix, rank = 2, tol = -1.000000e+000
warning: matrix singular to machine precision, rcond = 8.19905e-022
warning: attempting to find minimum norm solution
warning: zgelsd: rank deficient 3x3 matrix, rank = 2, tol = -1.000000e+000
warning: matrix singular to machine precision, rcond = 4.57172e-017
warning: attempting to find minimum norm solution
warning: zgelsd: rank deficient 3x3 matrix, rank = 2, tol = -1.000000e+000
warning: matrix singular to machine precision, rcond = 4.36065e-018
warning: attempting to find minimum norm solution
warning: zgelsd: rank deficient 3x3 matrix, rank = 2, tol = -1.000000e+000


The code:
%pump1
clear all;

#FUNCTION DEFINITION
function y=fun(x)


#VARIABLES
%x=diam;

P2=x(1);
Q= x(2);
FM=x(3);

#PARAMETERS DEFINITION AND CONVERTION TO INTERNATIONAL SYSTEM
P1=14.696;%psi
P3=14.696;%psi
P1=P1*6894.75729;%Pa
P3=P3*6894.75729;%Pa

a=16.7; %psi
a=a*6894.75729;%Pa

b=0.052;%psi/(gpm)^1,5
b=6894.75*b;%Pa/(gpm)^1,5
L=50;%ft
L=0.305*L;%m
p=62.4;%lbm/ft3
p=16.02*p;%kg/m3

vis=0.00003228;%VISCOSITY-lbs/ft2
vis=0.00102;%m.s/ft2


E=0.00006;%metros

D=2.469;%in
D=D*0.0254;meters

After i added the missing comment sign in front of "meters" here,
it solves on my computer:

octave:1> pump1
octave:2> x
x =

 Columns 1 and 2:

   2.1647e+05 - 8.4475e-04i   1.3400e-04 + 4.9852e-07i

 Column 3:

   2.1617e-02 + 6.9720e-12i

octave:3> fval
fval =

 Columns 1 and 2:

  -3.1244e-03 + 8.4164e-04i   7.8784e+02 + 4.3129e+02i

 Column 3:

  -1.8517e-07 + 1.1457e-09i

octave:4> info
info =  2

I suspect you might have different copies of this code and your
are running not the code you are posting...
 
Regards,

Dmitri.
--


reply via email to

[Prev in Thread] Current Thread [Next in Thread]