
[Sponsors] 
Solving momentum Equation from known pressure field 

LinkBack  Thread Tools  Search this Thread  Display Modes 
July 6, 2021, 19:13 
Solving momentum Equation from known pressure field

#1 
New Member
Naive CFD
Join Date: Jun 2021
Posts: 24
Rep Power: 3 
Hi All,
This may sound a bit naive but i have been stuck upon this question for few days. I am solving a 2D lid driven flow using SIMPLE algorithm. Till now, I have a working code which give accurate results with respect to benchmark values. But as i am experimenting with this. i decided to feed a known pressure field into the the discretized momentum equations to solve for the velocity field. (omitting the solution of Poisson equations for pressure). However, starting from random velocity fields with known boundary conditions, I am only able to achieve convergence upto Reynolds number of 100 and beyond that the solution does not converge and gives inaccurate velocity fields even if i feed correct pressure field. I tried same thing in openFOAM by modifying the solver to omit the pressure calculation step and feed the correct pressure field as initial condition. The result remains the same, the solution converges upto 100 Reynolds number beyond that the solution does not converge. I was wondering what can be the reason behind this. Thanks in advance. PS: if my question is not clear please feel free to ask for more details. 

July 7, 2021, 05:02 

#2 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,148
Rep Power: 66 
The best way to do this kind of test is using the exact Taylor solution.
However, you need to think of the pressure gradient as a known term in the momentum but you no longer solve the continuity equation. This is the issue. 

July 7, 2021, 07:37 

#3 
Senior Member

Pressure and velocity boundary conditions are usually interlinked and you can't just skip one of them. Also, the continuity preserving mass flux in the momentum equations is based on the pressure. As a matter of fact, you are just using a random wrong modification of an algorithm
What you are trying to do just works at low Re number because viscosity is high enough to sustain what you are trying to do. Follow the Filippo suggestion and you'll see that you're having 0th order accuracy even when velocity converges. Besides this, a random velocity field initialization is not, in general, guaranteed to converge even if using the correct algorithm. The higher the Re, the more true this becomes. 

July 7, 2021, 09:23 

#4  
New Member
Continuum
Join Date: Aug 2009
Posts: 19
Rep Power: 15 
Quote:
Good morning, First, I think your question is entirely clear. Second, I was in a situation to run this test since I had a Ghia comparison simulation setup at Re 100. I used the solved pressure field, disabled the pressure solution and then initialized just the uv velocities to 0 m/s. My CFD code uses a PPE formulation (nonFOAM). Anyway, it did solve rapidly using the fixed pressure field. then I set the lid velocity at x4, so Re ~ 400. Same approach. Get P field, init uv = 0, solve just uv momentum (in this case w is solved but the domain is 2D). To my surprise, I am seeing exactly as you've noted. I'd have to give some thought as to the reasons. I cannot load an image of the v field but it looks discontinuous like shock waves. Regards 

July 7, 2021, 09:25 

#5  
New Member
Continuum
Join Date: Aug 2009
Posts: 19
Rep Power: 15 
Quote:
Agree with this assertion. Also, the PPE source includes an evolving DIV(v)/dt term. Thinking that the P field must be corrected in situ with the momentum solution. Regards 

July 7, 2021, 09:49 

#6  
Senior Member

Quote:
Random initialization vs a constant also is kind of a main difference. Yet, it is unclear to me what you both mean by convergence. Are we taliking about machine epsilon difference with a regular solution or what? In the end, you both should know what algorithms you are using and how, exactly, a fixed initial pressure affects them. In general, my expectation, is that it is not guaranteed at all to converge to the right solution. In general, if the current pressure correction is not making the current mass flow divergence free (and it can't if it doesn't come from the pressure solved with the current vleocity field) I see a problem. 

July 7, 2021, 09:55 

#7  
New Member
Continuum
Join Date: Aug 2009
Posts: 19
Rep Power: 15 
Quote:
Sorry, not clear. The v field is solving properly but does not look like the proper field when P, u, v solved in unison. My solver is an ADI based methodology with parabolized PPE so there is no iteration  only time based marching. I solved at a nominal CFD of 1.0. I tried this simulation since I've seen this in general. the PPE is slow to converge. In general, I have found no way to speed the pressure solution along side the momentum solution. Without any backing mathematics, I'd say that this has converged to an unrealistic solution, sort of like a quasisteady point, unrealistic of course. Interesting find. Regards 

July 7, 2021, 11:46 

#8 
New Member
Naive CFD
Join Date: Jun 2021
Posts: 24
Rep Power: 3 
Thanks, Fillipo, Sbaffini, and Continuum for quick and apt responses.
I am convinced that not solving continuity is the issue. However, I am not sure why this fact is a problem at higher Reynolds numbers and gives correct velocity values at lower Re. I will reiterate that first I run a simulation at a particular Reynolds number and save the corresponding pressure field. After this, I start my test by disabling the pressure solution step as I am feeding the pressure field obtained earlier as an input to momentum equations. So my approach is similar to what was used by @Continuum. Regarding random initialization of the velocity field with known boundary conditions, I have tried all zero values to initialize the velocity as well. As Sbaffini said at a lower Reynolds number the viscous effects are high enough to sustain what I am doing and give correct results. This sounds correct but warrants a question of why these high viscous effects circumvent the need to solve continuity equation. Also Sbaffini, sorry I used the term convergence rather loosely, what it meant was that at higher Reynolds numbers the velocity fields that i obtained from correct pressure fields (pressure field being obtained and saved earlier by SIMPLE for given Reynolds number) are not correct. These velocity fields have discontinuities as @continuum suggested. Thanks again. 

July 7, 2021, 11:59 

#9  
Senior Member

Quote:
Very roughly speaking, an explanation could be: at least for incompressible flows, the pressure adapts to the dominant term in the momentum equations. For high Re number this is the convective term (that also depends from pressure because of typical RhieChow treatment). For low Re cases it is the diffusive term. So, assume convective term is negligible, what you have is iterations on the velocity field until the diffusive term balances a fixed source term (the pressure gradient). 

July 7, 2021, 12:12 

#10 
New Member
Naive CFD
Join Date: Jun 2021
Posts: 24
Rep Power: 3 
Thanks Sbaffini, for checking correctness, (Sorry, this sounds repetitive.)
Simulation 1: I run a simulation that gives me velocity field and pressure field up to machine precision. Simulation 2: Now I use this pressure from simulation 1 to obtain velocity field with same boundary conditions, with pressure solution disabled so just using the momentum equations. Checking correctness 3: The velocity fields that are obtained in simulation 2 are checked against the ones obtained from simulation 1. Ideally, that should match because they are corresponding to the same pressure field. In my case, they match exactly for low Reynolds number and do not match or even look the same at higher Reynolds number. On a different note, these are also checked against the work of Ghia et. al. for benchmarking. 

July 7, 2021, 12:29 

#11 
Senior Member

So, within machine precision? Or do you have any other quantification of the difference?
If it is so, than the dominance of the viscous effects might be the explanation. Together with the fact that this specific case only has wall boundary conditions so, overall, continuity is also preserved. One way to prove this would be to redo the experiment without the convective term alltogether. Or, differently, to compare the convective terms in the two solutions (might be more cumbersone in a finite volume context). Indeed, one scenario is the one with negligible convection. The other one is with selfbalanced, but not completely negligible, convection. Probably, this case is a mixture of both. That is, lowRe seems a mandatory requirement for things to work, but probably would not work by itself in all the cases. 

July 7, 2021, 12:35 

#12 
New Member
Naive CFD
Join Date: Jun 2021
Posts: 24
Rep Power: 3 
Thanks Sbaffin,Yes machine precision is the only measure.
This seems like a good hypothesis, I will try to do it again with the your suggestions and get back. 

July 7, 2021, 13:13 

#13  
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,095
Rep Power: 29 
Quote:
Very hard to tell what happening it there but in my code Wildkatze when flow model was developed from benchmark solution, i also first solved momentum with given pressure field and had absolutely no problems getting converged results. If pressure is fixed then momentum actually works much easy. My guess is that the fluxes in your case are not okay thus you face issues. 

July 7, 2021, 13:18 

#14 
New Member
Naive CFD
Join Date: Jun 2021
Posts: 24
Rep Power: 3 
Hi Arjun, Thanks for the response.Can you share some more details about the flow that you were solving. Also, what was the Reynolds number of the flow you were solving. Also is it possible for you to share your code.


July 7, 2021, 13:35 

#15  
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,095
Rep Power: 29 
Quote:
I used this https://onlinelibrary.wiley.com/doi/...fld.1650190502 But it should not matter. If it matters then something is wrong somewhere. As I mentioned momentum is much much easier to solve from given pressure field than to get pressure from velocity. 

July 7, 2021, 22:41 
reply

#16 
New Member
spiceagent
Join Date: Jun 2021
Posts: 3
Rep Power: 3 
he solution converges upto 100 Reynolds number beyond that the solution does not converge.
I was wondering what can be the reason behind this. VidMate  Tataindicombroadband.in Last edited by spiceagent11; July 9, 2021 at 07:42. 

July 7, 2021, 23:25 

#17 
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,095
Rep Power: 29 

July 8, 2021, 02:14 

#18 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,148
Rep Power: 66 
To understand the issue I suggest to consider the Hodge decomposition
a + Grad p = a* At the steady state, if you provide the correct discrete pressure gradient field it must balance convection and diffusion terms, discretized with the same operators. 

July 8, 2021, 04:29 

#19  
Senior Member

Quote:
1) A non pressurefree method (where GRAD(p_n) is used in first advancing u_n to u*)? 2) A mass flux that, for a given velocity field, is mass preserving only if based on the pressure correction for the current flow field u*? My doubt, in these conditions, is on the practical reachability of the same steady state achieved with the correct algorithm and independently from the case. Analytical solutions are nice, but typically hide certain exact balances between terms (e.g., in the Taylor solution the pressure gradient always balances the convective term) which might mask some issues. 

July 8, 2021, 04:35 

#20  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,148
Rep Power: 66 
Quote:
Div Grad p = Div a* With the correct BCs you should be able to solve for V. 

Tags 
cfd, lid driven cavity, simple algorithm 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Suppress twoPhaseEulerFoam energy  AlmostSurelyRob  OpenFOAM Running, Solving & CFD  33  September 25, 2018 17:45 
Segmentation fault when using reactingFOAM for Fluids  Tommy Floessner  OpenFOAM Running, Solving & CFD  4  April 22, 2018 12:30 
Free surface issues with interDyMFoam for hydroturbine  oumnion  OpenFOAM Running, Solving & CFD  0  October 6, 2017 14:05 
chtMultiRegionSimpleFoam turbulent case  Aditya Patil  OpenFOAM Running, Solving & CFD  6  April 24, 2017 22:13 
Moving mesh  Niklas Wikstrom (Wikstrom)  OpenFOAM Running, Solving & CFD  122  June 15, 2014 06:20 