// Williams Hazens Equation 

function WilliamsHazens(c, q, dh){
	this.c = c;
	this.q = q;
	this.dh = dh;
}

// returns pressure drop psi
WilliamsHazens.prototype.pressureDrop = function(){
	return 4.52 * Math.pow(this.q,1.852) / (Math.pow(this.c,1.852) * Math.pow(this.dh,4.8655)); 
}

// returns pressure drop ft h2o
WilliamsHazens.prototype.pressureDropFt = function(){
	return 0.2083 * Math.pow(100/this.c,1.852) * Math.pow(this.q,1.852) / Math.pow(this.dh,4.8655); 
}

// returns input values
WilliamsHazens.prototype.inputValues = function(){
	var msg = this.c + " " + this.q + " " + this.dh;
	return msg;
}

// Copyright engineeringtoolbox.com