data(CoefBomba)
CoefSP8A44<-subset(CoefBomba,Qn==8&Etapas==44)
fSP8A44<-fBomba(Bomba=CoefSP8A44,H=40)
SP8A44=with(fSP8A44,{
Pac=seq(lim[1],lim[2],by=100)
Pb=fPb(Pac)
etam=Pb/Pac
Ph=fPh(Pac)
etab=Ph/Pb
f=fFrecuencia(Pac)
Caudal=fCaudal(Pac)
result=data.frame(Caudal,Pac,Pb,Ph,etam,etab,f)})
#Efficiency of the motor, pump and the motor-pump
SP8A44$etamb=with(SP8A44,etab*etam)
p<-xyplot(etam+etab+etamb~Pac,data=SP8A44,type='l')
direct.label(p)
#Mechanical, hydraulic and electrical power
p<-xyplot(Pb+Ph~Pac,data=SP8A44,type='l')
direct.label(p)
#Flow and electrical power
xyplot(Caudal~Pac,data=SP8A44,type='l')
Run the code above in your browser using DataLab