[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Pump - Problems
From: |
klausp |
Subject: |
Pump - Problems |
Date: |
Sat, 13 Apr 2013 11:30:15 -0700 (PDT) |
Hi guys,
I am having some problems with a small project.
Nowadays I am studing chemical engeneering and in one subject we are working
with Octave. I am not "that expert".
It´s a simples pump situation. The problem is returning the message
following message:
warning: matrix singular to machine precision, rcond = 0
warning: attempting to find minimum norm solution
warning: dgelsd: rank deficient 3x3 matrix, rank = 2
warning: matrix singular to machine precision, rcond = 0
warning: attempting to find minimum norm solution
warning: dgelsd: rank deficient 3x3 matrix, rank = 2
I can´t find anything wrong on 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 SISTEM
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;
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
Q=(pi*(D/2)^2)*v; %m^3/s
#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);%Coolebrock
equation
endfunction
#Initial values
x0=[200105 5 1.5e-2];
%Solving
[x,fval,info]=fsolve(@(x) fun(x),x0);
---------------------------------------------------------------------------------------------
I would be thankfull for your help,
Klaus Peter
--
View this message in context:
http://octave.1599824.n4.nabble.com/Pump-Problems-tp4651820.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Pump - Problems,
klausp <=