|
[Sponsors] |
May 12, 2023, 10:50 |
How to set pressure bc?
|
#1 |
New Member
riccardo
Join Date: Mar 2023
Posts: 7
Rep Power: 3 |
Hi, I am modeling a vertical pipe, with inlet at the top and outlet at the bottom.
I set the velocity at the top. I would like to fix pressure at the top and, in a sense, see the pressure changes at the bottom, is it possible? I have both a file for p and for p_rgh. The problem is that the pressure at the bottom remains fixed to the initial value, while it changes at the inlet. For the moment I have set: p_rgh: inlet { type fixedFluxPressure; value $internalField; } outlet { type prghPressure; p $internalField; value $internalField; } p: inlet { type zeroGradient; } outlet { type zeroGradient; } However using different condition (for example zerogradient for p_rgh at outlet) ends up in an error. |
|
May 14, 2023, 07:29 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,207
Rep Power: 28 |
Hello Riccardo,
Knowing what solver you are using could be helpful here. Usually on solvers using p_rgh, we set the BC on p_rgh and p only uses calculated BCs (basically p is computed based on p_rgh, and you need to focus on setting proper BCs on p_rgh) On the setup you posted, you are fixing the pressure at the outlet using prghPressure, and you let it "free" at the inlet with fixedFluxPressure. So you get the expected behavior: the pressure is fixed at the outlet and it changes at the inlet (fixedFluxPressure basically adjusts pressure gradient to satisfy the velocity fixed on the patch) You will not be able to fix both pressure and velocity at the inlet as it will lead to numerical issues. You cannot use fixedFluxPressure + zeroGradient either since both are setting gradients and you need to fix a pressure value somewhere. If you want to fix an inlet pressure you will probably have to define an outlet velocity rather than an inlet one, and it might be more unstable. More about BCs general principles here: https://doc.cfd.direct/notes/cfd-gen...ary-conditions Hope this helps, Yann |
|
May 15, 2023, 04:43 |
|
#3 | |
New Member
riccardo
Join Date: Mar 2023
Posts: 7
Rep Power: 3 |
Quote:
p_rgh: inlet { type prghPressure; p $internalField; value $internalField; } outlet { type fixedFluxPressure; value $internalField; } gives some results that for my modeling are better because at outlet I see pressure changes. However I was wondering if this makes sense |
||
May 15, 2023, 06:14 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,207
Rep Power: 28 |
It depends on what you set for U on those patches. Pressure and velocity are coupled, so their BCs must work together.
More generally speaking, it's not possible to tell if your setup makes sense without knowing what kind of physics you are trying to simulate and which solver you are using. Yann |
|
Tags |
bc's, openfoam, pressure, vertical pipe, zerogradient |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] ICEM Scripting Issues | tylerplowright | ANSYS Meshing & Geometry | 33 | September 27, 2021 17:35 |
What is difference between static pressure and gauge pressure? | aja1345 | FLUENT | 1 | July 20, 2018 21:05 |
how to set exit pressure correctly? | sms1424 | STAR-CCM+ | 1 | April 26, 2016 16:49 |
How to set environment variables | kanishka | OpenFOAM Installation | 1 | September 4, 2005 11:15 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 06:13 |