FUNCTION
Bernoulli_inv
Returns the elevation, pressure or velocity inside a fluid given the other two parameters.
You're viewing an older version of this page (#5619). View the current version.
Interface
#include <codecogs/engineering/fluids/imperial/bernoulli_inv.h>
using namespace Engineering::Fluids::Imperial;
This function uses the total energy $E$ within a fluid along with its weight density $\rho$ and, given two out of the three fluid parameters (elevation $Z$, pressure $P$, velocity $v$) it is able to calculate the third one using the simplifed Bernoulli equation:
where $g$ is the acceleration of gravity, 32.2 ft/s².
The example code below shows how this function acts as the inverse of the \ref #366 "Bernoulli" 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 ignored, 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/sParameters
Returns
References
The Engineering Division, Crane Co., "Flow of fluids through valves, fittings, and pipe", Chicago, 1957
Interactive Calculator
Computing…
Set a range above first to export a graph.