|
[Sponsors] |
October 2, 2021, 11:11 |
Pressure equation in NS
|
#1 |
Senior Member
mohammad
Join Date: Sep 2015
Posts: 279
Rep Power: 12 |
Hi everyone
I have a question about pressure in NSE. I am looking at an algorithm in immersed boundary method which shows me the following equations for pressure correction; 1- which is a Poisson equation for pressure correction. However, I have another procedure as well for pressure equation in OpenFOAM as follows: 2- So as you see the procedure in the first method is really straightforward. On the other hand, the pressure equation in the second method (OpenFOAM) uses some fluid variables from velocity equation that is not suitable for my case. Indeed I have a field with different viscosity at different cells, and using pressure equation leads to a wrong solution for pressure like this: viscosity: pressure: So can anyone tell me what is the difference between these methods? Are these methods the same for my case? |
|
October 4, 2021, 01:32 |
|
#2 | ||
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34 |
Quote:
Here you will not have density in the equation. You just have dt. Quote:
Before the difference, The U interpolated to face is NOT U = A^-1 H - A^-1 grad P it is U = A^-1 H - (control volume) A^-1 grad P Where A is diagonal of momentum matrix. Now this is how openfoam writes it. In practice this is achieved by replacing A^-1 H as U current estimate of velocity So the way openfoam does is that it first create a variable U_rc = U current estimate - (control volume) A^-1 grad P Interpolate this variable to face centers and calculate the mass imblance to calculate the continuity source term. Fluent, Starccm etc do not create this intermediate variable U_rc they directly calculate flux by above formula on faces (so they are essentially same method, openfoam does not do different Rie and Chow method). Now about the main difference with the fractional solver that you wrote above. You can actually only keep the transient term of Ap from momentum equation diagonal , which will be ( control volume ) / dt and still use the openfoam (or fluent etc formula). It works because i have done so successfully. You can get then U_rc = U current estimate - dt grad P, which is same as your fractional solver formula and it does work good. |
|||
October 4, 2021, 03:50 |
|
#3 | ||
Senior Member
mohammad
Join Date: Sep 2015
Posts: 279
Rep Power: 12 |
Yes. But this is actual pressure value. In OF it will be divided by density. Quote:
I didn't tell anything about this. You are right. In different software you can find different implementations. However, OF just takes off-diagonal elements in momentum matrix system as H. Quote:
Again my question is something else. Why in the first method, the projection is so clear and without any viscosity/density dependent variables? But in the second method, for the pressure equation, OF deals with a set of fluid properties! |
|||
October 4, 2021, 04:02 |
|
#4 | |||
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34 |
Quote:
(if you mean the pressure in OF is divided by density then the placement of density shall remove that division so you shall have -den * ( grad (p/ den) ) NOT -grad( p/den) / den that you wrote. ) Quote:
You should double check here. Quote:
Your question was what is the difference between the two approach. The difference is one is ignoring the convection and diffusion term contribution to momentum equation diaginal when constructing pressure equation. Now if question is WHY then, the answer lies in the timeline of development of the schemes. Now we know that dt or A^-1 is just an approaximation to Schur compliment for Navier stokes equation. BAAACK then we did not know this. So the difference in approaches. |
||||
October 4, 2021, 04:27 |
|
#5 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,747
Rep Power: 66 |
I don't think it's really about neglecting the convection and diffusion terms...
It seems to me like the first one is explicitly assuming a constant viscosity and constant density fluid. Otherwise density would be inside the divergence operator and there would be another convection term. Even for incompressible flows (divergence free velocity field) there would still be a viscous (viscosity containing) term. There's also a negative sign missing in the 1st equation and inconsistent labeling in the 2nd equation. So not only do I not like whoever wrote the 1st set of equations, I wouldn't trust them either. Anyway, that's why the projection is "so clear" and without any viscosity and density dependent variables. |
|
October 4, 2021, 04:59 |
|
#6 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34 |
Quote:
The formula for Ap then comes out to be (control volume)/ dt + Sum of (convectiona and diffusion fluxes assuming constant density and viscosity). |
||
October 4, 2021, 11:47 |
|
#7 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73 |
I don't understand the question ... in the first method u** depends on the viscosity...
|
|
October 4, 2021, 20:08 |
|
#8 |
Senior Member
mohammad
Join Date: Sep 2015
Posts: 279
Rep Power: 12 |
||
October 4, 2021, 21:14 |
|
#9 | |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,747
Rep Power: 66 |
Quote:
u** usually denotes the true, unknown solution to the momentum equation with the correct pressure field. Regardless of whether u** is the true solution or the predictor using the guessed pressure field, they're both solutions to the momentum equation with a viscous term. Your pressure corrector therefore always contains some dependence on viscosity, at least inheriting some from the velocity predictor. |
||
October 4, 2021, 21:30 |
|
#10 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73 |
||
October 5, 2021, 02:12 |
|
#11 | |
Senior Member
mohammad
Join Date: Sep 2015
Posts: 279
Rep Power: 12 |
Quote:
|
||
October 5, 2021, 02:14 |
|
#12 |
Senior Member
mohammad
Join Date: Sep 2015
Posts: 279
Rep Power: 12 |
Ok. you mean when the pressure correction method is in a simple form, it is actually solved using FDM. But the second method that comes from OF is based on FVM. Am I right?
|
|
October 5, 2021, 02:21 |
|
#13 | |
Senior Member
mohammad
Join Date: Sep 2015
Posts: 279
Rep Power: 12 |
Quote:
Dear Arjun, My question still refers to imposing higher viscosity inside the particle, or making the solution independent from inside the particle. As I saw in the papers, IBMs (like Breugem) using the first method for pressure-velocity correction doesn't have any violated pressure field from NSE. However, the second method in OF gives rise to an irregular pressure field. |
||
October 5, 2021, 03:22 |
|
#14 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34 |
Quote:
So let me ask you this question: What is immersed boundary doing here for you? ------------------------ Immersed boundary is used to enforce the velocity usually. So question is are you using it this way here? |
||
October 5, 2021, 06:28 |
|
#15 | |
Senior Member
mohammad
Join Date: Sep 2015
Posts: 279
Rep Power: 12 |
Quote:
I don't believe in this. It is used to have a correct pressure and velocity fields corresponding to a solid object in the fluid field. This can be obtained using a suitable forcing approach. I can understand a number of immersed boundary methods like direct-forcing (Breugem or Uhlmann) or Ghost cell. However, the current immersed boundary method I am using now has some steps still unclear to me. That is my problem. Can I write for you this Immersed Boundary method to help me in understanding that? This is the key part of my problem. There is no paper describing this method in terms of CFD on internet. Cheers, Mohammad |
||
October 5, 2021, 11:55 |
|
#16 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34 |
So you did not answer the question poised.
Usually immersed boundary is to force the motion of solid body to the fluid domain in the backgroud. That is it is used to impose the velocity field. Now if you impose the velocity field, why do you need viscosity for? Velocity in the immersed region is decided by the body and is fixed. The viscosity is needed to solve the fluid flow equation. [QUOTE=mostanad;813622 I can understand a number of immersed boundary methods like direct-forcing (Breugem or Uhlmann) or Ghost cell. However, the current immersed boundary method I am using now has some steps still unclear to me. That is my problem. [/QUOTE] Quote:
There must be something ,missing here. |
||
October 5, 2021, 14:24 |
|
#17 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,849
Rep Power: 73 |
Quote:
You wrote the first method in a form suitable for FD method. However, this is not the key in your question. The pressure equation has a source term that depends on the convection, the dependence of the diffusive term can be disregarded if the velocity is divergence-free and divergence and laplacian commute (far from the solid boundary). The BC for the pressure equation requires to prescribe the normal velocity component on the surface of the body. Therefore your IBM need to fulfill this condition while the normal component of the pressure gradient is not required. |
||
October 5, 2021, 21:24 |
|
#18 | |
Senior Member
mohammad
Join Date: Sep 2015
Posts: 279
Rep Power: 12 |
Quote:
I need viscosity as I am changing my solver (which was working for Newtonian smoothly) to a non-Newtonian vicoplastic fluid. As you see in the following equation, the viscosity is obtained using the strain-rate: The Newtonian solver, which was working properly, is as follows: 1- Solving NSE in the entire region with fluid properties (viscosity) and Pimple algorithm. The result of previous time step is used as the initial values (previous region for particle) 2- Imposing the new solid body velocity in the new position. 3- Correcting pressure and velocity fields using the first pressure method (simple Poisson equation) 4- Finding forces from stress on particle and solving a Newtonian law for having the new velocity/position of the particle in the next time step. We just calculate it here. Imposing is done in next time step at step 3. As you see the first step assumes constant viscosity for all the regions. However, when it comes to viscoplastic non-Newtonian fluid, you should have the viscosity inside the particle based on its strain-rate, which results in a high viscosity. This makes trouble for me. Furthermore, I don't know why this method is working even for Newtonian. If I know that, making a change for non-Newtonian case becomes easier. If you feel any point is still unclear, please let me know. |
||
October 6, 2021, 01:50 |
|
#19 |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,285
Rep Power: 34 |
So this time you answered. Before I answer I wish to ask, what do you mean by getting into trouble?
I understand that results are not okay then, but I expect the solver to diverge too (when the bubbles have higher viscosity). |
|
October 6, 2021, 02:06 |
|
#20 | |
Senior Member
mohammad
Join Date: Sep 2015
Posts: 279
Rep Power: 12 |
Quote:
No. divergence doesn't happen. For Newtonian case, it gives an appropriate drag value coming from pressure gradient and viscous term. This gives rise to a correct terminal velocity for particle. On the other hand, when the viscosity gets high value inside the particle in non-Newtonian viscoplastic case because of low strain-rate, the pressure is not correct, so the drag is not good, then terminal velocity is incorrect. Just recall my previous thread when I had pressure values inside the particle. I think now you know more than any one else about my problem, as the other persons don't want to hear/understand my issue! It's about 6 months and I got stuck into this issue. Nobody knows why! |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressure fields in FOAM, p field, total pressure, etc. | Tobi | OpenFOAM Post-Processing | 9 | March 25, 2022 02:33 |
viscosity udf don't use correct temperature and strain rate | rezvani | Fluent UDF and Scheme Programming | 8 | May 27, 2021 06:40 |
question regarding LES of pipe flow - pimpleFoam | Dan1788 | OpenFOAM Running, Solving & CFD | 37 | December 26, 2017 15:42 |
The correction on pressure equation of SIMPLE algorithm in MRFSimpleFOAM solver | renyun0511 | OpenFOAM Running, Solving & CFD | 0 | November 10, 2010 02:47 |
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) | HB &DS | CFX | 0 | January 9, 2000 14:19 |