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/)
-   -   BC for pressure-pressure run in simpleFoam (https://www.cfd-online.com/Forums/openfoam-solving/225372-bc-pressure-pressure-run-simplefoam.html)

bastil March 25, 2020 01:23

BC for pressure-pressure run in simpleFoam
 
Hello all,

I am trying to run a simpleFoam case with pressure inlet and pressure outlet. I know this is not be best way to do (but it runs in the commercial solvers I know). However, in this case I only have pressure BCs available. I tried following BCs:

Pressure: "totalPressure" for inlet patch, "fixedValue" for outlet pach -> looks reasonable

Velocity: "pressureNormalInletOutletVelocity" for both inlet and outlet patches. I want the solver to calculate velocity based on fluxes and pressure and make the direction normal to the patch faces. However, this gives me a velocity field of more or less zero everywhere in the domain and therefore zero mass flow as well. -> not reasonable

What are the correct/best BCs for the velocity field for this kind of BCs? Thanks.

linnemann March 25, 2020 04:35

This is what I've used succesfully.

0/U
Code:

    inlet
    }
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);

    }

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

0/p
Code:

    inlet
    {
        type            totalPressure;
        p0              uniform 25.5426;
        value          uniform 25.5426;
    }

    outlet
    {
        type            fixedValue;
        value          uniform 0;
    }


bastil March 25, 2020 07:29

Thanks. This was one of my previous trys. Good news: Results where he same as for my last try. Bad news: Velocity results are not physical.

linnemann March 25, 2020 07:31

Remember to use normalized pressure.

OF uses p/rho in in-compressible cases.

bastil March 25, 2020 08:36

I know, I did use normalized pressure. Volume flow is far from expected (e-10 instead of e-4). Indeed I did run the same case with velocity-inlet before and I know what pressure drop should give what volume-flow.

bastil March 26, 2020 03:50

Ok, I quick-checked with the "squaredBend" tutorial with OpenFOAM-v1906. The BCs given from linnemann above works as expected for this geometry.
I am currently investigating why it does not work as expected for my model.

tas38 March 27, 2020 03:51

bastil,

I agree with the bc combination suggest by linnemann. For your particular case, is the dynamic pressure a significant fraction of the total pressure? If so, you may simply be setting the inflow total pressure too low.

bastil March 27, 2020 04:57

Quote:

Originally Posted by tas38 (Post 763126)
For your particular case, is the dynamic pressure a significant fraction of the total pressure? If so, you may simply be setting the inflow total pressure too low.

No it's not. However, my geometry is widely spreading over serveral arms and just merging together those arms at in- and outlet. Seems there is kind of numerical flutuation between the arms that make a solution impossilbe so far.
Suggestions on how to solve this are welcome.


All times are GMT -4. The time now is 06:43.