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/)
-   -   What is wrong with my pressure? buoyantBoussinesqSimpleFoam (https://www.cfd-online.com/Forums/openfoam-solving/155237-what-wrong-my-pressure-buoyantboussinesqsimplefoam.html)

andko628 June 27, 2015 06:12

What is wrong with my pressure? buoyantBoussinesqSimpleFoam
 
1 Attachment(s)
Hello,

My pressure ends up like this all the time, I have tried so many different BC's but nothing seems to help. The velocity and temperature fields seems fine though.

Attachment 40425

I am using the solver buoyantBoussinesqSimpleFoam.

Thanks for help!

fusij June 29, 2015 18:27

It is better to be more clear when posting questions. Which pressure are you visualising in the figure above, p or p_rgh? Your solver uses the Boussinesq approximation and introduces a modified pressure term, so you really have two pressure definitions that you can visualize (p and p_rgh). Definitions are p=p_rgh+rhok*gh, so p includes the buoyancy contribution.

andko628 July 1, 2015 04:13

Quote:

Originally Posted by fusij (Post 552624)
It is better to be more clear when posting questions. Which pressure are you visualising in the figure above, p or p_rgh? Your solver uses the Boussinesq approximation and introduces a modified pressure term, so you really have two pressure definitions that you can visualize (p and p_rgh). Definitions are p=p_rgh+rhok*gh, so p includes the buoyancy contribution.

Hello!

Sorry for the lack of information, I simply just thought it was an ordinary error that you could solve quite fast.

In the figure i visualise p but p_rgh shows only the same value in the entire volume. My BC's are:

p_rgh: outlet - fixedValue 101325; all other boundaries - fixedFluxPressure;

p: calculated on all boundaries.

I really appreciate your help!

mathew1105 June 30, 2019 13:28

did you solved your problem?


i am simulaing the same case but i am having troubles with the convergence of the simulation.


Could you please tell me which were your BC for the velocity?




Thank You

Mahmoud Abbaszadeh June 13, 2022 06:15

Quote:

Originally Posted by andko628 (Post 552808)
Hello!

Sorry for the lack of information, I simply just thought it was an ordinary error that you could solve quite fast.

In the figure i visualise p but p_rgh shows only the same value in the entire volume. My BC's are:

p_rgh: outlet - fixedValue 101325; all other boundaries - fixedFluxPressure;

p: calculated on all boundaries.

I really appreciate your help!



Could you please share your experience if you've made any progress on this thread? Cheers

Yann June 13, 2022 08:51

Hi,

The thread is quite old so I do not know if the original author will answer.
I experienced something similar with buoyantSimpleFoam and in my case it was related to the writePrecision setting in controlDict.

By default writePrecision is set to 6 which means data will be written with 6 significant figures. When working with absolute pressure, this leads to rounding up pressure values to the nearest Pascal.
For natural convection, the pressure difference is usually quite small and writePrecision needs to be increased in order to write pressure values with a precision fitting the actual pressure gradient in the flow.

Please note this is a matter of write precision so it does not affect the simulation by itself. But it can cause issues when restarting a simulation since the solver will read the latest time step / iteration.

I hope this helps,
Yann

Mahmoud Abbaszadeh June 13, 2022 10:45

Dear Foamers,

It’s been a while that I’ve had the same problem in setting the correct BC for similar problems. Here is the review of how I solved this issue:

Problem: steady state open channel flow simulation. In this scenario, normally the simpleFoam is employed. The BCs are given by:


BCs: inlet, outlet, wall, topWall

U:

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

outlet
{
type zeroGradient;
}

wall
{
type noSlip;
}

atmosphere
{
type slip;
}

p:

atmosphere
{
type zeroGradient;
}

inlet
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform 0;
}

wall
{
type fixedFluxPressure; //remember that we cannot use Drichlet and Neuman BC at the same time
value uniform 0;
}


As one can see, selecting fixedValue BC for the outlet pressure is physically incorrect even though one can get result. To resolve this issue, I decided to use the hydrostatic pressure as the outlet BC for the pressure. To this end, one need to either define gravity in the governing equation or else use a steady state solver that has gravity in the equations. I went for the second approach. The only available solver for incompressible fluids that has this feature is buoyantBoussinesqSimpleFoam. When this solver is selected, the BCs needs to be defined for the U, p, and p_rgh. Generally, p_rgh=p-rho*g*h. I have searched a lot and finally could find the correct way of setting BC for the foregoing parameters.


U:

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

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

wall
{
type noSlip;
}

atmosphere
{
type slip;
}


P:

atmosphere
{
type zeroGradient;
}

inlet
{
type zeroGradient;
}

outlet
{
type calculated;
value $internalField;
}

wall
{
type zeroGradient;

}



P_rgh

inlet
{
type fixedFluxPressure;
}

outlet
{
type fixedValue;
value uniform 0;
}

wall
{
type fixedFluxPressure;
}

atmosphere
{
type fixedFluxPressure;
}


let me know if it is not clear.

Keep Foaming


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