CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   high speed flow in pipe (https://www.cfd-online.com/Forums/openfoam-solving/219419-high-speed-flow-pipe.html)

hiep.nguyentrong July 26, 2019 00:26

high speed flow in pipe
 
Hi, i want to solve fluid flow in pipe with mach ~0.6.
i used density-based, ideal gas with sutherland law. pressure inlet and pressure outlet on fluent. Result seem good.
But when im try to use openFoam using rhoSimpleFoam, i get errors at first timestep. here is my boundary conditions.
Can u help me whats wrong with this?
Quote:

u
inlet
{
type pressureInletVelocity;
value uniform (200 0 0);
}
outlet
{
type zeroGradient;
}
Quote:

p
inlet
{
type totalPressure;
p0 uniform 60000;
}
outlet
{
type fixedValue;
value uniform 0;
}

Carlo_P July 31, 2019 06:02

Hey Hiep,
can you post your message error, please?
The BC seems to be not correct.
Are you sure that the pressure in the outlet would be 0?.

Furthrmore, I would prefer InletOutlet for the Outlet U.
The InletOutlet doesn't allow the flow to come inside and is a more robust.


Another suggestion. Try to use a very small value of the relaxation factor of rho.


Do you know that for rhoSimpleFoam you need to have also rho and alpha_T as BC?

hiep.nguyentrong August 1, 2019 04:43

Quote:

Originally Posted by Carlo_P (Post 740587)
Hey Hiep,
can you post your message error, please?
The BC seems to be not correct.
Are you sure that the pressure in the outlet would be 0?.

Furthrmore, I would prefer InletOutlet for the Outlet U.
The InletOutlet doesn't allow the flow to come inside and is a more robust.


Another suggestion. Try to use a very small value of the relaxation factor of rho.


Do you know that for rhoSimpleFoam you need to have also rho and alpha_T as BC?

Hi Carlo,
thanks for reply,
here is my problem after 2 iterations
https://upanh.pro/image/HjKKpS
im wrong with pressure outlet, in my case, i set it to 101325
when i set U file like this
Code:

outlet
{
type          inletOutlet;
inletValue  uniform (200 0 0);
}

i get the same error
here is my rho file
Code:

".*"
{
type          caculated;
value          1.225;
}

alphat file
Code:

walls
{
type        compressible::alphatWallFunction;
Prt          0.85;
value      uniform 0;
}
inlet
{
type        calculated;
value        0;
}
outlet
{
type        calculated;
value        0;
}


Carlo_P August 6, 2019 05:50

the rho file is wrong.
You have to put the value at outlet and in inlet zerogradient.
It is not physical that the pressure change and not the rho.

hiep.nguyentrong August 8, 2019 04:40

Quote:

Originally Posted by Carlo_P (Post 741243)
the rho file is wrong.
You have to put the value at outlet and in inlet zerogradient.
It is not physical that the pressure change and not the rho.

when i put inlet and outlet is zeroGradient, result is the same. :confused:

sufjanst August 8, 2019 05:32

In u, you specify a velocity of 200 m/s
But in p you specify a pressure-RAISE from 60000 in the inlet to 101325 in the outlet.

Your pressure B/C should develop a sucking towards the inlet, which is inconsistent with your u.
Are you sure, you didn't mix up something in the B/Cs?


As far as I know, you can not specify the pressure drop and velocity B/C, because you velocity results from the pressure drop or the other way round.



I would do it like this
u
inlet
{
type fixedValue;
value uniform (200 0 0);
}
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}


p
inlet
{
type zeroGradient;
}
outlet
{
type fixeValue;
value uniform 101325;
}

hiep.nguyentrong August 8, 2019 05:46

Quote:

Originally Posted by sufjanst (Post 741496)
In u, you specify a velocity of 200 m/s
But in p you specify a pressure-RAISE from 60000 in the inlet to 101325 in the outlet.

Your pressure B/C should develop a sucking towards the inlet, which is inconsistent with your u.
Are you sure, you didn't mix up something in the B/Cs?


As far as I know, you can not specify the pressure drop and velocity B/C, because you velocity results from the pressure drop or the other way round.



I would do it like this
u
inlet
{
type fixedValue;
value uniform (200 0 0);
}
outlet
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}


p
inlet
{
type zeroGradient;
}
outlet
{
type fixeValue;
value uniform 101325;
}

i was try your case but nothing change.
i want to put total pressure to inlet, i dont know the p0 is abs pressure or gauge press but when im try both, again, this error still come to me:confused:

sufjanst August 8, 2019 10:51

If you want to specify pressure AND velocity in your inlet you should put your outlet pressure to zeroGradient.

Carlo_P August 9, 2019 03:10

It is better to start with a simpler case, i.e. use a speed as 2 m/s.
If this doesn't run, you are sure that you have a problem somewhere.

P is the static pressure. If you want the totalpressure, you have to use totalPressure. (check the correct sintax)
Bit it is not so robust to put velocity and totalpressure in inlet.
Try to reach a result with velocity in inlet and totalpressure in outlet. You can change later, if you need.

Futhermore, run it with simpleFoam. You have to change tje p file.
It must run. It is not a correct result, but you have to reach it.
It would be possible also to switj later from simpleFoam to rhoSimpleFoam.

hiep.nguyentrong August 9, 2019 04:16

Quote:

Originally Posted by Carlo_P (Post 741601)
It is better to start with a simpler case, i.e. use a speed as 2 m/s.
If this doesn't run, you are sure that you have a problem somewhere.

P is the static pressure. If you want the totalpressure, you have to use totalPressure. (check the correct sintax)
Bit it is not so robust to put velocity and totalpressure in inlet.
Try to reach a result with velocity in inlet and totalpressure in outlet. You can change later, if you need.

Futhermore, run it with simpleFoam. You have to change tje p file.
It must run. It is not a correct result, but you have to reach it.
It would be possible also to switj later from simpleFoam to rhoSimpleFoam.

i was try it and run well with 2m/s and simpleFoam solver.
but the dimensional of pressure in simpleFoam and rhoSimpleFoam is diffirence. is any way to change between 2 cases?
i dont know what exactly this totalpressure in rhoSimpleFoam work.
The pressureControl report: p max 8e8 and p min is -1.7e7 :(


All times are GMT -4. The time now is 20:10.