|
From: | Ed Meyer |
Subject: | Re: Pump - Problems |
Date: | Sun, 14 Apr 2013 14:04:02 -0700 |
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
v=2;%m/s
#Another equations
Re=p*v*D/vis; %Reynolds
#EQUATIONS SET
y(1)=a-b*Q^1.5-P2+P1; %Empirical/Pump
y(2)=(8*FM*p*L*Q/(pi*D^5))-P2+P3;%Relation flow and pressure loss
y(3)=-2*log10((E/(3.7*D))+(2.51/(Re*sqrt(FM))))-1/sqrt(FM);%Colebroock
equation
endfunction
#Initial values
x0=[200105 5 1.5e-2];
%Solving
[x,fval,info]=fsolve(@(x) fun(x),x0);
--
View this message in context: http://octave.1599824.n4.nabble.com/Pump-Problems-tp4651820p4651848.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
[Prev in Thread] | Current Thread | [Next in Thread] |