CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Boundary conditions for 'wind tunnel' (https://www.cfd-online.com/Forums/openfoam-pre-processing/125935-boundary-conditions-wind-tunnel.html)

odellar November 4, 2013 13:11

Boundary conditions for 'wind tunnel'
 
2 Attachment(s)
Hi all,

I'm trying to set up a simulation that acts as a 'wind tunnel', with a backward facing step in the test section.

I'm using a RANS solver (pisoFoam) with k-epsilon turbulence model.

I've got it all to solve but the results aren't believable - so I think it's to do with my boundary/initial conditions - so here's what I've got at the moment:

Inlet:
U - uniform 30m/s field:
Code:

inlet
    {
        type            fixedValue;
        value          uniform (30 0 0);
    }

p - allow solver to compute required pressure at inlet in order to produce sufficient pressure gradient across test section:
Code:

inlet
    {
        type            zeroGradient;
    }

Outlet:
U - fully developed, so dU/dx = 0:
Code:

outlet
    {
        type            zeroGradient;
    }

p - fixed at 0 (relative pressure):
Code:

outlet
    {
        type            fixedValue;
        value          uniform 0;
    }

Fixed walls: U and p, zeroGradient.

Initial k and epsilon for the inlet were calculated, and outlet set to zeroGradient. Fixed walls use k and epsilon wall functions.

Now when the flow reaches steady state I'd expect there to be a higher pressure at the inlet than outlet in order to drive the flow, but a significant drop in pressure just aft of the step in the recirculation region - in the first image I've posted you can see the velocity contours/stream tracer looks as you'd expect - 30m/s at the inlet, about 15m/s at the outlet, and there's the recirculation region just aft of the step. However in the second image the pressure distribution looks all wrong.. The high pressure is at the outlet, not the inlet, and there doesn't seem to be any drop in pressure in the recirculation region.

Please help!

Thanks a lot,
Olie

tomf November 5, 2013 03:41

Hi Odellar,

I think you should keep pressure indeed at zeroGradient for the walls, but for the velocity you should use a fixedValue with a velocity of uniform (0 0 0). Otherwise there is no reason why your pressure would drop (no friction).

Regards.
Tom

odellar November 5, 2013 07:10

[QUOTE=tomf;460581]Hi Odellar,

I think you should keep pressure indeed at zeroGradient for the walls, but for the velocity you should use a fixedValue with a velocity of uniform (0 0 0). Otherwise there is no reason why your pressure would drop (no friction).

Regards.
Tom[/QUOTE

Hi Tom,

I'd actually made a mistake typing that - yes I have set the walls to U (0 0 0) (no-slip boundary condition).

Thanks anyway!!

tomf November 5, 2013 08:31

Hi,

Ah, I've looked at it more closely now. You are plotting static pressure, which will drop with the velocity (Bernoulli's principle). If you calculate total pressure (p+0.5*mag(U)^2) you will probably see the drop you expect.

Regards,
Tom

odellar November 5, 2013 09:08

Quote:

Originally Posted by tomf (Post 460625)
Hi,

Ah, I've looked at it more closely now. You are plotting static pressure, which will drop with the velocity (Bernoulli's principle). If you calculate total pressure (p+0.5*mag(U)^2) you will probably see the drop you expect.

Regards,
Tom

OH I assumed it was plotting total pressure - do you know how I set it to display total pressure?

Thanks,
Olie

tomf November 5, 2013 10:32

Hi,

You can either use the ptot OpenFOAM utility or use the calculator in paraView to get the total pressure. Than you have this as an additional variable in paraView.

Regards,
Tom

odellar November 5, 2013 11:31

Quote:

Originally Posted by tomf (Post 460651)
Hi,

You can either use the ptot OpenFOAM utility or use the calculator in paraView to get the total pressure. Than you have this as an additional variable in paraView.

Regards,
Tom

Oh excellent yes, now getting the results I was after - thanks a lot!!!


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