CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Can anybody please check my boundary conditions? (https://www.cfd-online.com/Forums/openfoam/90934-can-anybody-please-check-my-boundary-conditions.html)

srakshit August 3, 2011 04:47

Why the outlet pressure is set fixedValue = zero? It should be zeroGradient.

lovecraft22 August 3, 2011 06:53

2 Attachment(s)
Thank you Sukanta.

I changed the pressure boundary condition as the following:

Code:

boundaryField
{
    inlet
    {
        type            fixedValue;
        value          uniform 0;
    }

    outlet
    {
        type            zeroGradient;
    }

Now the overall flow field is more reasonable but the velocity is too high at some points and I still have some strange feature (see pic attached).

What do you think?


Thank you!

Balakrshnan Ramakrishnan August 3, 2011 07:00

Quote:

Originally Posted by srakshit (Post 318633)
Why the outlet pressure is set fixedValue = zero? It should be zeroGradient.

If the velocity is specified at the inlet, usually we take the case that outlet is at atmospheric pressure.
Since we use relative scale for pressure, we assume the atmospheric pressure is zero.
The outlet is to be set to zero if it is at atmospheric pressure.
If you get a pressure below zero, its less than atmospheric pressure.

I hope I am correct.

srakshit August 3, 2011 07:04

But why inlet is fixed at zero now? Change in to zeroGradient

You have 30 m/s constant flow. Just tell me one thing if U at inlet is 30 m/s and Pressure is zero in that patch...is it consistent?

Balakrshnan Ramakrishnan August 3, 2011 07:09

Quote:

Originally Posted by srakshit (Post 318660)
But why inlet is fixed at zero now? Change in to zeroGradient

You have 30 m/s constant flow. Just tell me one thing if U at inlet is 30 m/s and Pressure is zero in that patch...is it consistent?

I am not able to make the mesh given in this case since I use OF-1.7.x.
But from blockMeshDict I can say there is something wrong with naming the patches.
I guess in this case the patches inlet and outlet are swapped. But I am not sure.

:)
If the inlet is set to some velocity, say 30 m/s, the pressure is set to zeroGradient.
Also if the outlet is set to be with a pressure ( fixedValue )of zero , then the inlet
should be zeroGradient. I do this in my cases and I get good results

srakshit August 3, 2011 07:10

Quote:

If the velocity is specified at the inlet, usually we take the case that outlet is at atmospheric pressure.
Since we use relative scale for pressure, we assume the atmospheric pressure is zero.
The outlet is to be set to zero if it is at atmospheric pressure.
If you get a pressure below zero, its less than atmospheric pressure.

I hope I am correct.
I do not think the pressure specified in the solver is relative. So u should either keep it floating or keep the absolute pressure.

Balakrshnan Ramakrishnan August 3, 2011 07:21

Quote:

Originally Posted by srakshit (Post 318662)
I do not think the pressure specified in the solver is relative. So u should either keep it floating or keep the absolute pressure.

The solver uses Gauge pressure - reference to the atmospheric pressure- where atmospheric pressure is zero. In absolute pressures negative value is not possible(except in some cases like trees). But in our simulation we get negative pressures all the time. So it cannot be absolute pressure. whatever we do in normal CFD(everyday) is Gauge pressure.

Hope this helps

lovecraft22 August 3, 2011 07:48

1 Attachment(s)
1. I had to change the inlet condition also because otherwise I got an error which basically said that the solver couldn't find any reference cell for pressure.

2. Pressure is relative, so (I think) you can have 30m/s velocity with 0 pressure because that mean that the pressure s the same as ambient static pressure

3. Inlet and outlet are fine, just checked them in paraview.

4. I ran the simulation for another 1000 iterations and the strange behavior underlined in previous pic disappeared but I'm still getting way too high velocity…

Balakrshnan Ramakrishnan August 3, 2011 07:52

@lovecraft22

Why is there a zero velocity line (vertical streak of blue)at the inlet? is it due to your boundary conditions?

srakshit August 3, 2011 07:56

its because the velocity = 30 m/s at inlet.

what is the outlet velocity boundary in this case?

Balakrshnan Ramakrishnan August 3, 2011 07:56

1 Attachment(s)
May be you can have a look at my simulation -> see attached pic

lovecraft22 August 3, 2011 07:59

2 Attachment(s)
That's my inlet condition: he velocity is not 0 but 30m/s.

About the outlet, the velocity is around 3000 m/s!!
It's an hypersonic cylinder!

srakshit August 3, 2011 08:02

what boundary condition you are using for outlet?

Also what pRefValue you are using?

lovecraft22 August 3, 2011 08:08

Quote:

Originally Posted by Balakrshnan Ramakrishnan (Post 318679)
May be you can have a look at my simulation -> see attached pic

Could you upload your boundary conditions?

Thank you!

srakshit August 3, 2011 08:16

Try these boundary settings

for pressure

inlet
{
type freestreamPressure;
}

outlet
{
type freestreamPressure;
}

for velocity

inlet
{
type freestream;
freestreamValue uniform (30 0 0);
}

outlet
{
type freestream;
freestreamValue uniform (30 0 0);
}

lovecraft22 August 3, 2011 08:28

You have to define one pressure value at least.

I set the pressure value to 0 at the inlet and the rest as you suggested.
Now it's running, let's see what comes out.

Balakrshnan Ramakrishnan August 3, 2011 08:41

Quote:

Originally Posted by lovecraft22 (Post 318682)
That's my inlet condition: he velocity is not 0 but 30m/s.

About the outlet, the velocity is around 3000 m/s!!
It's an hypersonic cylinder!

Oops i thought you are just doing low velocity simulations.

which solver you use for hypersonic flows?

lovecraft22 August 3, 2011 08:43

I was just kidding about the fact that though I'm running a low velocity simulation yet I get an hypersonic velocity at the outlet…

Balakrshnan Ramakrishnan August 3, 2011 08:44

Quote:

Originally Posted by lovecraft22 (Post 318698)
I was just kidding about the fact that though I'm running a low velocity simulation yet I get an hypersonic velocity at the outlet…

Lol... :D

Which version of OF are you using?

lovecraft22 August 3, 2011 08:46

OpenFoam 2.0.0


All times are GMT -4. The time now is 16:13.