I have forgotten
my Password

Or login with:

  • Facebookhttp://facebook.com/
  • Googlehttps://www.google.com/accounts/o8/id
  • Yahoohttps://me.yahoo.com

Bernoulli inv

Returns the elevation, pressure or velocity inside a fluid given the other two parameters.
Controller: CodeCogs

Private project under development, to help contact the author: Contact Controller

Interface

C++
Excel

Bernoulli Inv

 
doubleBernoulli_invinttarget
doubleenergy
doubledensity
doubleelevation
doublepressure
doublevelocity )[inline]
This function uses the total energy \inline E within a fluid along with its weight density \inline \rho and, given two out of the three fluid parameters (elevation \inline Z, pressure \inline P, velocity \inline v) it is able to calculate the third one using the simplifed Bernoulli equation: where \inline g is the acceleration of gravity, 32.2 ft/s.

The example code below shows how this function acts as the inverse of the module, by computing each parameter on account of the other two, the total energy and the weight density of the fluid.

In order to return the desired parameter, the function takes a target argument which can be ELEVATION, PRESSURE or VELOCITY correspondingly. The value of the desired parameter as argument in the function call is ingored, but a convenient way is to denote it by a null value as you may notice in the given example code.

Example 1

#include <stdio.h>
#include <codecogs/engineering/fluids/imperial/bernoulli_inv.h>
 
int main()
{
  double
  Z = Engineering::Fluids::Imperial::Bernoulli_inv(ELEVATION,
  214.826817683595, 0.34, 0, 0.5, 2),
  P = Engineering::Fluids::Imperial::Bernoulli_inv(PRESSURE,
  214.826817683595, 0.34, 3, 0, 2),
  v = Engineering::Fluids::Imperial::Bernoulli_inv(VELOCITY,
  214.826817683595, 0.34, 3, 0.5, 0);
 
  printf("   Energy = 214.826817683595 ft\n");
  printf("  Density = 0.34 lb/ft^3\n\n");
  printf("Elevation = %.10lf ft\n", Z);
  printf(" Pressure = %.10lf lb/in^2\n", P);
  printf(" Velocity = %.10lf ft/s\n", v);
 
  return 0;
}

Output

Energy = 214.826817683595 ft
  Density = 0.34 lb/ft^3
 
Elevation = 3.0000000000 ft
 Pressure = 0.5000000000 lb/in^2
 Velocity = 2.0000000000 ft/s

References

The Engineering Division, Crane Co., "Flow of fluids through valves, fittings, and pipe", Chicago, 1957

Parameters

targetELEVATION, PRESSURE or VELOCITY
energytotal head (ft)
densityweight density of fluid (lb/ft)
elevationpotential head or elevation above reference level (ft)
pressurepressure (lb/in)
velocitymean velocity of flow (ft/s)

Returns

The numerical value of the desired parameter.

Authors

Lucian Bentea (July 2006)
Source Code

This module is private, for owner's use only.

Not a member, then Register with CodeCogs. Already a Member, then Login.