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/)
-   -   Gas flow through a pipe (https://www.cfd-online.com/Forums/openfoam-solving/236538-gas-flow-through-pipe.html)

aneps June 3, 2021 16:55

Gas flow through a pipe
 
Hello everyone, I am a newbie to Openfoam. Rather than just following lessons, I am right away into making the models I am interested. I made a simple pipe geometry with air flow. I know the pressure at the entrace (2.5 mbar) and at the exit (0 mbar).

After making geometry and meshing with salome, I imported the UNV mesh file to openfoam. I am using icoFOAM solver from the example (cavity).I modified the 'p' file as

boundaryField
{
Inlet
{
type fixedValue;
value uniform 8194.8;
}
Outlet
{
type fixedValue;
value 0;
}
Walls
{
type zeroGradient;
}
}

I am wondering if this is the right way to apply fixed pressure at the inlet and outlet. 2.5 mbar means 25.49 Kg/m^2. This divided by density at this pressure will give 8194.8.

The result I get is quite strange. Obviously wrong!. Can anyone tell me is this correct way to simulate if we know only the inlet and outlet pressure (no velocity information). This is more practical case, because we measure only pressure with a gauge at the both ends.

Is it correct to use icoFoam for this example?

cfdcheckers June 4, 2021 20:29

Quote:

Originally Posted by aneps (Post 805268)
Hello everyone, I am a newbie to Openfoam. Rather than just following lessons, I am right away into making the models I am interested. I made a simple pipe geometry with air flow. I know the pressure at the entrace (2.5 mbar) and at the exit (0 mbar).

After making geometry and meshing with salome, I imported the UNV mesh file to openfoam. I am using icoFOAM solver from the example (cavity).I modified the 'p' file as

boundaryField
{
Inlet
{
type fixedValue;
value uniform 8194.8;
}
Outlet
{
type fixedValue;
value 0;
}
Walls
{
type zeroGradient;
}
}

I am wondering if this is the right way to apply fixed pressure at the inlet and outlet. 2.5 mbar means 25.49 Kg/m^2. This divided by density at this pressure will give 8194.8.

The result I get is quite strange. Obviously wrong!. Can anyone tell me is this correct way to simulate if we know only the inlet and outlet pressure (no velocity information). This is more practical case, because we measure only pressure with a gauge at the both ends.

Is it correct to use icoFoam for this example?


Hi, I'm a newbie as well but I think static pressure BC at both inlet and outlet is not advised - it becomes very difficult for the solver to manage the errors and it can blow up. Just what I have been reading on the forum and elsewhere. Does your case run? Can you share more details?


I'm also learning and trying to run a pressure driven flow case. But my setup crashes: https://www.cfd-online.com/Forums/op...onditions.html

2538sukham June 4, 2021 23:51

In case we dont about a boundary condition, i think we normally use $calulated so that the solver will calculate the pressure or velocity at the prescribed boundary. I might be wrong so you can check it out in the documentation.

cfdcheckers June 6, 2021 00:27

Quote:

Originally Posted by 2538sukham (Post 805341)
In case we dont about a boundary condition, i think we normally use $calulated so that the solver will calculate the pressure or velocity at the prescribed boundary. I might be wrong so you can check it out in the documentation.


I don't think this is correct. At least in tutorials I've seen it for k, epsilon etc, only..


All times are GMT -4. The time now is 01:27.