emil.sekula
03-28-2007, 11:49 AM
Hello
I am new one here. I don't know how this forum works exactly but I have wrote in this section. I need some help. I need an one program that calculates "structure functions" of time and velocity date. It is function used in fluid mechanics, especially in turbulence. Does somebody has it ? Could somebody help me ?
Regards
kutta
01-22-2009, 03:08 AM
Hello
I am new one here. I don't know how this forum works exactly but I have wrote in this section. I need some help. I need an one program that calculates "structure functions" of time and velocity date. It is function used in fluid mechanics, especially in turbulence. Does somebody has it ? Could somebody help me ?
Regards
Dear Comrade
As a very simple example deploying the variables like velocity, area of tube etc in hydraulics,Please try the following and execute to find out how the variables are deployed to get the output in the structure form in c++ .
Thanking you
As
Kutta(C.R.Muthukumar)
/**Using Bernoullis Theorem:(Venturion.CPP)
Problem can be stated as: A pipe 300 metres long has a slope of 1 in 100 and
tapers from 120 cms diametre atthe high end to 60 cm diameter at
the low end.The discharge in the pipe is 2000 litres per minute.
If the pressure atthe high end is 700 gms per cm^2,find
the pressure at the low end.Ignore friction(one litre =1000c.c)
Discharge Z=C.Sqrt.
Where Z= discharge in c.c per sec;
C= meter constant;
C= a1*a2 / Sqrt(a1+a2)(a1-a2) * Sqrt*2g;
a1=area of enlarged end
a2=area of lower end in cms;
accelation dueto gravity g= 987.28;
The above problem coming under fluid mechanics
can be solved /tried as under in C++ shown be; .
Hope this suffices ur request.
*/
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <iomanip.h>
const double g=978.28;
const int PIE =65;
using namespace std;
class Venturion
{
public:
float v1,p1,z1,a1,r1,l1;
float v2,p2,z2,a2,r2,l2;
float Z,x,y;
public:
void Veturion(){};
void Venturion1(float a1,float a2);
void Venturion2(float v1,float v2 );
void Venturion3(float l1,float p1,float v1);
void display();
};
void Venturion::Venturion1(float a1,float a2)
{
a1 = (PIE*r1*r1)/4;
a2 = (PIE*r2*r2)/4;
}
void Venturion::Venturion2(float v1,float v2 )
{
v1 =(Z/60)*a1;
v2 =(Z/60)*a2;
}
void Venturion::Venturion3(float l1,float p1,float v1)
{
x = l1+p1+v1;
y = l1+p1+v1;
x = l2+p2+v2;
y = l2+p2+v2;
}
void Venturion::display()
{
cout << a1;
cin >> a1;
cout << a2;
cin >> a2;
cout << v1;
cin >> v1;
cout << v2;
cin >> v2;
cout << x;
cin >> x;
cout << y;
cin >> y;
cout << endl;
// cin >> endl;
}
int main()
{
Venturion C1;
C1.display();
return 0;
}