
[Sponsors] 
January 2, 2013, 14:55 
Negative absolute pressure in rhoPorousMRFSimpleFoam

#1 
Senior Member
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 9 
Hi,
I am trying to solve a simple problem of compressible flow through a 2D rectangular duct with a porous zone in between. The domain is described in the attached pdf I ran 150 iterations and I am getting negative absolute pressure in the domain, which is nonphysical. I am monitoring pressure at inlet. The 0 constant and system folders are in the attached tar file. run the script "./runIt". Observe the values of inlet pressure in log file. How can absolute pressure go negative at all? What is going wrong in such a simple problem? Thank you! 

January 4, 2013, 07:14 

#2 
Senior Member

Hello,
It seems the solver is having problem with the boundary condition. In your case, why don't you put the BC for the pressure as; internalField uniform 0; outlet { type fixedValue; value uniform 0; } Since, at the inlet boundary of your problem case you are defining the Velocity(U). Also, if you want to use the same BC which you have mentioned in your case, then try changing the BC for velocity(U) too. 

January 4, 2013, 09:16 

#3 
Senior Member
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 9 
Thanks, Tushar. The solution diverges in the first iteration itself when I put zero on outlet and internalField. It gives a floating point exception.


January 4, 2013, 23:58 

#4 
Senior Member

Hello friend,
I rechecked your case, Have you changed the "controlDict" file?? Since, I am not an expert but, it seems the function that you might have added in it, could be responsible for the divergence of pressure. Do, run the solver without the function and recheck the solution. 

January 7, 2013, 14:42 

#5 
Senior Member
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 9 
Yes I have changed the controlDict file. But as per my understanding, the additional piece of code I have written is only for post processing purpose.
Removing that piece of code did not affect the solution. 

January 9, 2013, 02:38 
Hello friend,

#6 
Senior Member

How you are defining "porosityWall" in your case? I think the problem lies somewhere with "porosityWall" you might have mistaken some parameters.
You need to check those with the available case models. I wish this will solve your problem.  Best regards, Tushar 

January 9, 2013, 07:51 

#7 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 22 
you have a massflow as inlet bc and you are running a 2D case,
so my question is then if the value of the massflow is specified in kg/s/m or in kg/s and if the width of the channel is 1 meter or just 'thin' because that will matter. remember that the area of the inlet will be the actual area used when calculating the inlet velocity 

January 9, 2013, 14:36 

#8 
Senior Member
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 9 
Thanks, Niklas. You are absolutely right. I wanted to simulate 1 meter depth, but the depth in blockMesh I gave was 10mm. I was not aware of the fact that the actual area of the inlet will be used by OpenFOAM for a 2D case.
Now I have increased the depth to 1 meter and the mass flow rate I have entered is in kg/s. Actually I am trying to simulate a canonical problem for a bigger 3D problem that I am trying to solve. My original problem is same (compressible+porous+high flow rates but subsonic flow with Ma < 0.4), but it is 3D. Unfortunately I am not allowed to share the data of that problem. I have increased the mass flow rate to 0.5 kg/s. Upto 0.5 kg/s, there is no negative absolute pressure. But as I increase the flow rate, the negative pressure problem starts becoming more and more prominent. For 0.5 kg/s the solution stabilizes, and I get a convergence. But for higher flow rates there is instability, and in some cases it causes the solution to blow up. I am not able to understand this negative absolute pressure, and the instability at the start of the solution. I simulated the same problem in Fluent, and the solution is smooth. The OpenFOAM results and the Fluent results are with 1% difference. I am attaching the updated files for simulation. Script to run is "runIt.sh". Also, I am attaching plots of the convergence history. 

January 9, 2013, 15:23 

#9 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 22 
how does these settings work


January 9, 2013, 15:53 

#10 
Senior Member
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 9 
Thanks for the settings.
The damping for pressure is amazing. Attached jpeg file shows residuals for first few iterations. I will try these setting for my main problem. I would like to know the reason behind the change in settings. Also, the problem of negative pressure at the start of iterations still exists (though eventually it disappears). Though this does not have effect on final solution since it is a steady state problem, I am not able to understand how the equation of state is getting satisfied with negative absolute pressure. The domain does not show negative absolute temperature anywhere. 

January 10, 2013, 10:29 

#11 
Senior Member
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 9 
Hi Niklas,
I have an important question about the boundary condition at outlet. For pressure, you have suggested totalPressure boundary condition at outlet with the value of p0 =101325 Pa. But when I postprocess, it shows static pressure = 101325 Pa at the outlet. So is OpenFOAM really fixing the static pressure at outlet instead of total pressure? Why is this happening despite of the value specified for total pressure? 

January 10, 2013, 10:46 

#12 
Senior Member
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 9 
So I looked at the totalPressureFvPatchScalarField.C and the code is:
operator==(p0p  0.5*(1.0  pos(phip))*magSqr(Up)); My reading of the equation: pos(1) function returns 1, since flow is leaving the domain. This make the term  0.5*(1.0  pos(phip))*magSqr(Up) go to zero and so static pressure value is equal to total pressure value. But, I am not able to understand what p0p does and what the = operator does. Can someone please check my explanation and help me understand p0p and = operator? 

January 10, 2013, 10:49 

#13 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 22 
Im going to make a wild guess here and assume that your massflow is too low to really make a difference.
What happens if you increase the massflow? 

January 10, 2013, 10:52 

#14 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 22 
and/or your convergence criteria for pressure is too large


January 10, 2013, 12:32 

#15 
Senior Member
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 9 
Thank you, Niklas.
If I have understood you correctly, do you mean to say that for higher mass flow rates and/or tighter convergence criterion for pressure, the static pressure might deviate from the desired value? For the current flow conditions, inlet mass flow rate = 2kg/s Velocity at outlet = 160 m/s Static pressure at outlet = 101325 Pa Total pressure at outlet (cal from ptot utility) = 106703 Pa Maximum mach number = 0.285 For higher flow rates (> 4kg/s) and with current settings, the solution diverges after 2 iterations 

January 11, 2013, 04:09 

#16  
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 22 
Quote:
I cant explain why the static pressure is 101325, other than that you havent converged the pressure enough. About the divergence, try to reduce the underrelaxation for rho even more and observe... What that low underrelaxation I would run more than 2000 iteration just to see if there is something changing slowly after that. 

January 11, 2013, 10:47 

#17  
Senior Member
Join Date: Nov 2009
Location: Michigan
Posts: 135
Rep Power: 9 
Quote:
1. Residuals < 1e06 2. Inlet pressure value remains constant for >2000 iterations 3. Outlet pressure value rock solid at 101325 for all iterations suggesting that the solver is not solving for static pressure at outlet Quote:


January 13, 2013, 13:59 

#18  
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 22 
Quote:


January 13, 2013, 17:01 

#19  
Member
Join Date: Jun 2012
Posts: 73
Rep Power: 6 
Quote:
The =operator just defines what happens when the boundary conditions are updated. So in this case, the static pressure at the outlet is calculated using the above equation. 

January 14, 2013, 09:10 

#20 
Super Moderator
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 22 
Hmm, I've never thought about this but its correct.
Using total pressure as outlet bc is most likely unstable considering that you can reduce the pressure and increase the velocity, while maintaining the value of p0. use fixedValue instead. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Negative Absolute Pressure  mike  FLUENT  8  December 18, 2014 04:50 
Manifold Absolute Pressure in Engine Simulations  abminternet  OpenFOAM  4  July 4, 2011 11:45 
seeking for help about a room with negative pressure  mengyue1  FLUENT  0  November 26, 2009 07:40 
negative static pressure  Selo melo  FLUENT  5  December 18, 2006 10:30 
avoiding negative absolute pressure!!!  Tania  FLUENT  8  March 30, 2004 18:41 