|
[Sponsors] |
November 25, 2016, 11:34 |
Pressure flips from positive to negative
|
#1 |
New Member
Jeroen
Join Date: Oct 2016
Posts: 21
Rep Power: 10 |
So, I've read a few posts about the prefcell and prefvalue but apparently I don't understand it yet.
I'm using adjoinShapeOptimizationFoam, which uses simpleFoam to solve pressure and velocity. However, from iteration 4 to iteration 5, suddenly my pressure at the inlet becomes negative. This behaviour is also visible in my objective function because it has a pressure term included. At the inlet I assign a velocity and at the outlet I set the pressure to zero. So does anyone know where this behaviour comes from? EDIT: In the plot and file I used P = 1 at the outlet |
|
November 25, 2016, 12:02 |
|
#2 |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
prefcell and prefvalue fix the value for pressure, if it is not fixed by anything else.
The reason is quite simple: if the pressure differential equation is solved, you will get an integration constant. If your BCs only demand the gradient of pressure to be a certain value, your BC do not impose any condition on this integration constant. Numerically you do, however, need such a constraint, which is achieved by simply fixing the value for pressure in one cell. In your case, your BC demands a value for P at the outlet, therefore prefcell and prefvalue do nothing. Your BC seem appropriate. It seems like your simulation is not properly converging, or diverging even. Post your fvSolution and fvSchemes files and the solver output and someone may be able to diagnose the issue. |
|
November 26, 2016, 06:51 |
|
#3 |
New Member
Jeroen
Join Date: Oct 2016
Posts: 21
Rep Power: 10 |
Hi Kevin,
Thanks for your reply, good to know how the reference value works! However this was my first idea what could be wrong so I have to look further now. In the attachment are my fvSolution and fvSchemes, which I left 'as downloaded' from OF and the log file from my solution. Only 25 iterations, but the behaviour already happens from iteration 4 to 5. Also in the residual plot you can see p_resiudual is increasing significantly from iteration 2 to 5. Any idea? Thanks in advance! Jeroen EDIT: In the plot only p, Ux and Uy are of interest, the adjoint solutions shouldn't have an effect on the primal solution. |
|
December 6, 2016, 06:53 |
|
#4 |
New Member
Jeroen
Join Date: Oct 2016
Posts: 21
Rep Power: 10 |
Solved it by rewriting the entire solver based on simpleFoam instead of adjointShapeOptimizationFoam. Must've been something wrong with the latter.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[blockMesh] Errors during blockMesh meshing | Madeleine P. Vincent | OpenFOAM Meshing & Mesh Conversion | 51 | May 30, 2016 11:51 |
High negative pressure with interPhaseChangeFoam | legione | OpenFOAM Running, Solving & CFD | 7 | July 5, 2015 11:28 |
seeking for help about a room with negative pressure | mengyue1 | FLUENT | 0 | November 26, 2009 07:40 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 06:13 |
Hydrostatic pressure in 2-phase flow modeling (long) | DS & HB | Main CFD Forum | 0 | January 8, 2000 16:00 |