// Pump Calulator

function PumpCalculator(q, rho, g, h, eta){
	this.q = q; // m3/s
	this.rho = rho; // kg/m3
	this.g = g; // m/s2
	this.h = h; // m
	this.eta = eta;
}

// returns hydraulic power (W)
PumpCalculator.prototype.hydraulicPower = function(){
	return this.q * this.rho * this.g * this.h; 
}

// returns shaft power
PumpCalculator.prototype.shaftPower = function(){
	return this.q * this.rho * this.g * this.h / this.eta; 
}

// returns input values
PumpCalculator.prototype.inputValues = function(){
	var msg = this.q + " " + this.rho + " " + this.g + " " + this.h + " " + this.eta;
	return msg;
}

// Copyright engineeringtoolbox.com